@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
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.40.
|
|
7
|
+
<title>Plesk UI Library 3.40.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.f0d21187.js"></script>
|
|
30
30
|
</body>
|
|
31
31
|
</html>
|
|
@@ -33,7 +33,7 @@ declare class AutoClosable extends Component<AutoClosableProps> {
|
|
|
33
33
|
children: AutoClosable[];
|
|
34
34
|
addChild: (child: AutoClosable) => void;
|
|
35
35
|
removeChild: (child: AutoClosable) => void;
|
|
36
|
-
getIgnoreNodes: () => (
|
|
36
|
+
getIgnoreNodes: () => (RefObject<HTMLElement> | ReactInstance | {
|
|
37
37
|
new (): Node;
|
|
38
38
|
prototype: Node;
|
|
39
39
|
readonly ELEMENT_NODE: 1;
|
|
@@ -54,7 +54,7 @@ declare class AutoClosable extends Component<AutoClosableProps> {
|
|
|
54
54
|
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
55
55
|
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
56
56
|
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
57
|
-
} |
|
|
57
|
+
} | Text | null | undefined)[];
|
|
58
58
|
onOutsideClick: (event: MouseEvent) => void;
|
|
59
59
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
60
60
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import { Component, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import CM, { Editor, EditorChange, EditorConfiguration, ModeSpec, ModeSpecOptions, ScrollInfo } from 'codemirror';
|
|
3
3
|
import './CodeEditor.less';
|
|
4
4
|
type ExtendedEditorConfiguration = EditorConfiguration & {
|
|
5
5
|
enterMode?: string;
|
|
6
6
|
tabMode?: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
interface CodeEditorBaseProps {
|
|
9
9
|
/**
|
|
10
10
|
* The mode to use. When not given, this will default to the first mode that was loaded.
|
|
11
11
|
* @since 0.0.61
|
|
@@ -73,6 +73,8 @@ export interface CodeEditorProps {
|
|
|
73
73
|
*/
|
|
74
74
|
baseClassName?: string;
|
|
75
75
|
}
|
|
76
|
+
export interface CodeEditorProps extends CodeEditorBaseProps, Omit<ComponentPropsWithoutRef<'textarea'>, keyof CodeEditorBaseProps> {
|
|
77
|
+
}
|
|
76
78
|
type CodeEditorState = {
|
|
77
79
|
lineSeparator: string;
|
|
78
80
|
content?: string;
|
|
@@ -99,7 +101,7 @@ declare class CodeEditor extends Component<CodeEditorProps, CodeEditorState> {
|
|
|
99
101
|
onScroll: undefined;
|
|
100
102
|
};
|
|
101
103
|
state: CodeEditorState;
|
|
102
|
-
static getDerivedStateFromProps({ readOnly, autofocus, options }: CodeEditorProps
|
|
104
|
+
static getDerivedStateFromProps({ readOnly, autofocus, options }: Readonly<CodeEditorProps>, state: CodeEditorState): {
|
|
103
105
|
options: {
|
|
104
106
|
autofocus: boolean | undefined;
|
|
105
107
|
readOnly: string | boolean | undefined;
|
|
@@ -114,7 +116,7 @@ declare class CodeEditor extends Component<CodeEditorProps, CodeEditorState> {
|
|
|
114
116
|
electricChars?: boolean | undefined;
|
|
115
117
|
specialChars?: RegExp | undefined;
|
|
116
118
|
specialCharPlaceholder?: ((char: string) => HTMLElement) | undefined;
|
|
117
|
-
direction?: "
|
|
119
|
+
direction?: "rtl" | "ltr" | undefined;
|
|
118
120
|
rtlMoveVisually?: boolean | undefined;
|
|
119
121
|
keyMap?: string | undefined;
|
|
120
122
|
extraKeys?: string | CM.KeyMap | undefined;
|
|
@@ -40,6 +40,6 @@ declare class DrawerProgress extends Component<DrawerProgressProps, DrawerProgre
|
|
|
40
40
|
handleStatusChange: (status: Status) => void;
|
|
41
41
|
handleClose: () => void;
|
|
42
42
|
handleCancel: () => void;
|
|
43
|
-
render(): string | number | boolean |
|
|
43
|
+
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
44
44
|
}
|
|
45
45
|
export default DrawerProgress;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export { default } from './ExtendedStatusMessage';
|
|
2
|
+
export type { ExtendedStatusMessageProps } from './ExtendedStatusMessage';
|
|
2
3
|
export { default as ExtendedStatusMessageActions } from './ExtendedStatusMessageActions';
|
|
4
|
+
export type { ExtendedStatusMessageActionsProps } from './ExtendedStatusMessageActions';
|
|
3
5
|
export { default as ExtendedStatusMessageDescription } from './ExtendedStatusMessageDescription';
|
|
6
|
+
export type { ExtendedStatusMessageDescriptionProps } from './ExtendedStatusMessageDescription';
|
|
4
7
|
export { default as ExtendedStatusMessageSeparator } from './ExtendedStatusMessageSeparator';
|
|
8
|
+
export type { ExtendedStatusMessageSeparatorProps } from './ExtendedStatusMessageSeparator';
|
|
5
9
|
export { default as ExtendedStatusMessageTitle } from './ExtendedStatusMessageTitle';
|
|
10
|
+
export type { ExtendedStatusMessageTitleProps } from './ExtendedStatusMessageTitle';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import type { FormContextProps, FormErrors, FormValues } from '../Form/types';
|
|
3
3
|
import './FormField.less';
|
|
4
4
|
export declare const BASE_FORM_FIELD_CLASS_NAME: string;
|
|
@@ -14,7 +14,7 @@ export type FormFieldApi = {
|
|
|
14
14
|
getErrors: () => FormErrors | undefined;
|
|
15
15
|
getSeparator?: () => ReactNode;
|
|
16
16
|
};
|
|
17
|
-
export interface FormFieldProps {
|
|
17
|
+
export interface FormFieldProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
18
18
|
/**
|
|
19
19
|
* Field name.
|
|
20
20
|
* @since 0.0.54
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Component, ReactNode } from 'react';
|
|
1
|
+
import { Component, ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { ContentRect } from 'react-measure';
|
|
3
3
|
import './Grid.less';
|
|
4
4
|
type ColumnsNumber = 1 | 2 | 3 | 4 | 5 | 6 | 'auto';
|
|
5
5
|
type CalculateMaxColumns = (options: {
|
|
6
6
|
width: number;
|
|
7
7
|
}) => number;
|
|
8
|
-
export interface GridProps {
|
|
8
|
+
export interface GridProps extends ComponentPropsWithoutRef<'div'> {
|
|
9
9
|
/**
|
|
10
10
|
* Content of the `Grid`.
|
|
11
11
|
* @since 0.0.48
|
|
@@ -91,7 +91,7 @@ declare class Grid extends Component<GridProps, GridState> {
|
|
|
91
91
|
xs: ColumnsNumber | undefined;
|
|
92
92
|
};
|
|
93
93
|
handleResize: ({ bounds }: ContentRect) => void;
|
|
94
|
-
getGapSize(): 0 | 8 |
|
|
94
|
+
getGapSize(): 0 | 8 | 12 | 16 | 32 | 24;
|
|
95
95
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
96
96
|
}
|
|
97
97
|
export default Grid;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode, ReactElement, ElementType, FunctionComponent } from 'react';
|
|
2
2
|
import { IconName, IconProps } from '../Icon';
|
|
3
3
|
import './Heading.less';
|
|
4
|
-
type HeadingProps = {
|
|
4
|
+
export type HeadingProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Importance of the `Title`. Render as h1, h2, etc.
|
|
7
7
|
* @since 2.3.0
|
|
@@ -55,6 +55,11 @@ export interface InputNumberProps {
|
|
|
55
55
|
* @since 2.3.0
|
|
56
56
|
*/
|
|
57
57
|
incrementIcon?: string | IconProps | ReactElement<any>;
|
|
58
|
+
/**
|
|
59
|
+
* Size of the input.
|
|
60
|
+
* @since 2.3.0
|
|
61
|
+
*/
|
|
62
|
+
size?: number | 'sm' | 'md' | 'lg' | 'xl' | 'fill';
|
|
58
63
|
}
|
|
59
64
|
/**
|
|
60
65
|
* `InputNumber` component is used for entering integer numbers.
|
|
@@ -12,7 +12,7 @@ type ItemProps = {
|
|
|
12
12
|
hoverable?: boolean;
|
|
13
13
|
footer?: ReactNode;
|
|
14
14
|
};
|
|
15
|
-
type ItemListProps = {
|
|
15
|
+
export type ItemListProps = {
|
|
16
16
|
/**
|
|
17
17
|
* Add hover styles for `Item` inside `ItemList`.
|
|
18
18
|
* @since 2.1.0
|
|
@@ -73,7 +73,7 @@ type ItemListProps = {
|
|
|
73
73
|
* @ignore
|
|
74
74
|
*/
|
|
75
75
|
baseClassName?: string;
|
|
76
|
-
} & Omit<GridProps, 'children'>;
|
|
76
|
+
} & Omit<GridProps, 'children' | 'onSelect'>;
|
|
77
77
|
type ItemListState = {
|
|
78
78
|
ReorderableGrid: null | any;
|
|
79
79
|
ReorderableGridCol: null | any;
|
|
@@ -93,12 +93,12 @@ declare class ItemList extends Component<ItemListProps, ItemListState> {
|
|
|
93
93
|
baseClassName: string;
|
|
94
94
|
};
|
|
95
95
|
constructor(props: ItemListProps);
|
|
96
|
-
static getDerivedStateFromProps({ selectable, value: propValue }: ItemListProps
|
|
96
|
+
static getDerivedStateFromProps({ selectable, value: propValue }: Readonly<ItemListProps>, state: ItemListState): {
|
|
97
97
|
value: ItemValue | ItemValue[] | null;
|
|
98
98
|
} | null;
|
|
99
99
|
componentDidMount(): void;
|
|
100
100
|
createItemProps: (item: ReactElement<ItemProps>) => ItemProps;
|
|
101
|
-
renderNormal({ baseClassName, children, ...props }: ItemListProps): import("react/jsx-runtime").JSX.Element;
|
|
101
|
+
renderNormal({ baseClassName, children, onSelect, ...props }: ItemListProps): import("react/jsx-runtime").JSX.Element;
|
|
102
102
|
someChild(predicate: (child: ReactElement<ItemProps>) => boolean): boolean;
|
|
103
103
|
/**
|
|
104
104
|
* There are some states where we can't manage hoverable state
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode, ReactElement, ComponentPropsWithoutRef, ElementType } from 'react';
|
|
2
2
|
import { IconName, IconProps } from '../Icon';
|
|
3
3
|
import './Label.less';
|
|
4
|
+
export type LabelIntent = 'inactive' | 'success' | 'warning' | 'danger' | 'info';
|
|
4
5
|
type BaseLabelProps<T extends ElementType> = {
|
|
5
6
|
/**
|
|
6
7
|
* Content of the Label.
|
|
@@ -21,7 +22,7 @@ type BaseLabelProps<T extends ElementType> = {
|
|
|
21
22
|
* Intent of the Label.
|
|
22
23
|
* @since 0.0.42
|
|
23
24
|
*/
|
|
24
|
-
intent?:
|
|
25
|
+
intent?: LabelIntent;
|
|
25
26
|
/**
|
|
26
27
|
* The size of the Label.
|
|
27
28
|
* @since 3.32.0
|
|
@@ -46,7 +47,7 @@ type BaseLabelProps<T extends ElementType> = {
|
|
|
46
47
|
*/
|
|
47
48
|
baseClassName?: string;
|
|
48
49
|
};
|
|
49
|
-
type LabelProps<T extends ElementType> = BaseLabelProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof BaseLabelProps<T>>;
|
|
50
|
+
export type LabelProps<T extends ElementType> = BaseLabelProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof BaseLabelProps<T>>;
|
|
50
51
|
/**
|
|
51
52
|
* `Label` component is used for showing multiple characteristics or attributes of an object.
|
|
52
53
|
* @since 0.0.42
|
|
@@ -125,7 +125,7 @@ export default class Layout extends Component<LayoutProps, LayoutState> {
|
|
|
125
125
|
headerHeight: null;
|
|
126
126
|
isResponsive: boolean;
|
|
127
127
|
};
|
|
128
|
-
static getDerivedStateFromProps(props: LayoutProps
|
|
128
|
+
static getDerivedStateFromProps(props: Readonly<LayoutProps>, state: LayoutState): LayoutState;
|
|
129
129
|
componentDidMount(): void;
|
|
130
130
|
componentWillUnmount(): void;
|
|
131
131
|
private readonly headerRef;
|
|
@@ -315,7 +315,7 @@ declare class List<T extends ListData> extends Component<ListProps<T>, ListState
|
|
|
315
315
|
onReorderEnd: undefined;
|
|
316
316
|
};
|
|
317
317
|
state: ListState<T>;
|
|
318
|
-
static getDerivedStateFromProps<T extends ListData>({ sortColumn, sortDirection, selection, expandedRows, notExpandableRows, renderRowBody, data, pagination, vertical, rowKey, totalRows, filtered, }: ListProps<T
|
|
318
|
+
static getDerivedStateFromProps<T extends ListData>({ sortColumn, sortDirection, selection, expandedRows, notExpandableRows, renderRowBody, data, pagination, vertical, rowKey, totalRows, filtered, }: Readonly<ListProps<T>>, { prevSortColumn, prevSortDirection, prevData, prevSelection, prevPagination, prevExpandedRows, ...state }: ListState<T>): ListState<T>;
|
|
319
319
|
componentDidMount(): void;
|
|
320
320
|
componentDidUpdate(prevProps: ListProps<T>): void;
|
|
321
321
|
needScroll: boolean;
|
|
@@ -340,16 +340,16 @@ declare class List<T extends ListData> extends Component<ListProps<T>, ListState
|
|
|
340
340
|
accessKey?: string | undefined;
|
|
341
341
|
autoFocus?: boolean | undefined;
|
|
342
342
|
className?: string | undefined;
|
|
343
|
-
contentEditable?:
|
|
343
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
344
344
|
contextMenu?: string | undefined;
|
|
345
345
|
dir?: string | undefined;
|
|
346
|
-
draggable?: (boolean | "
|
|
346
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
347
347
|
hidden?: boolean | undefined;
|
|
348
348
|
id?: string | undefined;
|
|
349
349
|
lang?: string | undefined;
|
|
350
350
|
nonce?: string | undefined;
|
|
351
351
|
slot?: string | undefined;
|
|
352
|
-
spellCheck?: (boolean | "
|
|
352
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
353
353
|
style?: import("react").CSSProperties | undefined;
|
|
354
354
|
tabIndex?: number | undefined;
|
|
355
355
|
title?: string | undefined;
|
|
@@ -378,58 +378,58 @@ declare class List<T extends ListData> extends Component<ListProps<T>, ListState
|
|
|
378
378
|
itemRef?: string | undefined;
|
|
379
379
|
results?: number | undefined;
|
|
380
380
|
security?: string | undefined;
|
|
381
|
-
unselectable?: "
|
|
382
|
-
inputMode?: "search" | "
|
|
381
|
+
unselectable?: "on" | "off" | undefined;
|
|
382
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
383
383
|
is?: string | undefined;
|
|
384
384
|
"aria-activedescendant"?: string | undefined;
|
|
385
|
-
"aria-atomic"?: (boolean | "
|
|
386
|
-
"aria-autocomplete"?: "
|
|
385
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
386
|
+
"aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
|
|
387
387
|
"aria-braillelabel"?: string | undefined;
|
|
388
388
|
"aria-brailleroledescription"?: string | undefined;
|
|
389
|
-
"aria-busy"?: (boolean | "
|
|
390
|
-
"aria-checked"?: boolean | "
|
|
389
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
390
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
391
391
|
"aria-colcount"?: number | undefined;
|
|
392
392
|
"aria-colindex"?: number | undefined;
|
|
393
393
|
"aria-colindextext"?: string | undefined;
|
|
394
394
|
"aria-colspan"?: number | undefined;
|
|
395
395
|
"aria-controls"?: string | undefined;
|
|
396
|
-
"aria-current"?: boolean | "
|
|
396
|
+
"aria-current"?: boolean | "time" | "location" | "step" | "true" | "false" | "page" | "date" | undefined;
|
|
397
397
|
"aria-describedby"?: string | undefined;
|
|
398
398
|
"aria-description"?: string | undefined;
|
|
399
399
|
"aria-details"?: string | undefined;
|
|
400
|
-
"aria-disabled"?: (boolean | "
|
|
401
|
-
"aria-dropeffect"?: "link" | "
|
|
400
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
401
|
+
"aria-dropeffect"?: "link" | "copy" | "none" | "execute" | "move" | "popup" | undefined;
|
|
402
402
|
"aria-errormessage"?: string | undefined;
|
|
403
|
-
"aria-expanded"?: (boolean | "
|
|
403
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
404
404
|
"aria-flowto"?: string | undefined;
|
|
405
|
-
"aria-grabbed"?: (boolean | "
|
|
406
|
-
"aria-haspopup"?: boolean | "
|
|
407
|
-
"aria-hidden"?: (boolean | "
|
|
408
|
-
"aria-invalid"?: boolean | "
|
|
405
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
406
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
407
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
408
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
409
409
|
"aria-keyshortcuts"?: string | undefined;
|
|
410
410
|
"aria-label"?: string | undefined;
|
|
411
411
|
"aria-labelledby"?: string | undefined;
|
|
412
412
|
"aria-level"?: number | undefined;
|
|
413
413
|
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
414
|
-
"aria-modal"?: (boolean | "
|
|
415
|
-
"aria-multiline"?: (boolean | "
|
|
416
|
-
"aria-multiselectable"?: (boolean | "
|
|
414
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
415
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
416
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
417
417
|
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
418
418
|
"aria-owns"?: string | undefined;
|
|
419
419
|
"aria-placeholder"?: string | undefined;
|
|
420
420
|
"aria-posinset"?: number | undefined;
|
|
421
|
-
"aria-pressed"?: boolean | "
|
|
422
|
-
"aria-readonly"?: (boolean | "
|
|
423
|
-
"aria-relevant"?: "
|
|
424
|
-
"aria-required"?: (boolean | "
|
|
421
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
422
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
423
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
424
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
425
425
|
"aria-roledescription"?: string | undefined;
|
|
426
426
|
"aria-rowcount"?: number | undefined;
|
|
427
427
|
"aria-rowindex"?: number | undefined;
|
|
428
428
|
"aria-rowindextext"?: string | undefined;
|
|
429
429
|
"aria-rowspan"?: number | undefined;
|
|
430
|
-
"aria-selected"?: (boolean | "
|
|
430
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
431
431
|
"aria-setsize"?: number | undefined;
|
|
432
|
-
"aria-sort"?: "none" | "
|
|
432
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
433
433
|
"aria-valuemax"?: number | undefined;
|
|
434
434
|
"aria-valuemin"?: number | undefined;
|
|
435
435
|
"aria-valuenow"?: number | undefined;
|
|
@@ -7,8 +7,13 @@ type Messages = {
|
|
|
7
7
|
type Translate = (key: string, params?: {
|
|
8
8
|
[key: string]: unknown;
|
|
9
9
|
}, fallback?: string) => string | ReactNode[];
|
|
10
|
+
export declare const LocaleContext: import("react").Context<{
|
|
11
|
+
locale: {
|
|
12
|
+
lmsg: Translate;
|
|
13
|
+
};
|
|
14
|
+
} | undefined>;
|
|
10
15
|
export declare const useTranslate: (namespace?: string) => Translate;
|
|
11
|
-
type LocaleProviderProps = {
|
|
16
|
+
export type LocaleProviderProps = {
|
|
12
17
|
/**
|
|
13
18
|
* Localization messages
|
|
14
19
|
* @since 0.0.42
|
|
@@ -3,6 +3,7 @@ export type { MenuProps } from './Menu';
|
|
|
3
3
|
export { default as MenuItem } from './MenuItem';
|
|
4
4
|
export type { MenuItemProps } from './MenuItem';
|
|
5
5
|
export { default as MenuBaseItem } from './MenuBaseItem';
|
|
6
|
+
export type { MenuBaseItemProps } from './MenuBaseItem';
|
|
6
7
|
export { default as MenuSelectableItem } from './MenuSelectableItem';
|
|
7
8
|
export type { MenuSelectableItemProps } from './MenuSelectableItem';
|
|
8
9
|
export { default as MenuDivider } from './MenuDivider';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ContentRect } from 'react-measure';
|
|
2
2
|
import { PopperState } from '../Popper';
|
|
3
3
|
import { Placement } from 'popper.js';
|
|
4
|
-
import { Component, KeyboardEventHandler, MouseEvent, MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
4
|
+
import { Component, ComponentPropsWithoutRef, KeyboardEventHandler, MouseEvent, MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
5
5
|
import './Popover.less';
|
|
6
6
|
declare const PLACEMENT_MAP: Record<string, Placement>;
|
|
7
|
-
export interface
|
|
7
|
+
export interface BasePopoverProps {
|
|
8
8
|
/**
|
|
9
9
|
* The reference element used to position the popover.
|
|
10
10
|
* @since 0.0.65
|
|
@@ -35,7 +35,7 @@ export interface PopoverProps {
|
|
|
35
35
|
* Click handler for close button. If it is not defined then default behavior (hide popover) will be used.
|
|
36
36
|
* @since 0.0.42
|
|
37
37
|
*/
|
|
38
|
-
onClose
|
|
38
|
+
onClose?: () => void;
|
|
39
39
|
/**
|
|
40
40
|
* Popover placement
|
|
41
41
|
* @since 0.0.42
|
|
@@ -101,6 +101,8 @@ export interface PopoverProps {
|
|
|
101
101
|
*/
|
|
102
102
|
autoFocus?: boolean;
|
|
103
103
|
}
|
|
104
|
+
export interface PopoverProps extends BasePopoverProps, Omit<ComponentPropsWithoutRef<'div'>, keyof BasePopoverProps> {
|
|
105
|
+
}
|
|
104
106
|
type PopoverState = {
|
|
105
107
|
show?: boolean;
|
|
106
108
|
arrowInHeader: boolean;
|
|
@@ -136,7 +138,7 @@ declare class Popover extends Component<PopoverProps, PopoverState> {
|
|
|
136
138
|
show: boolean | undefined;
|
|
137
139
|
arrowInHeader: boolean;
|
|
138
140
|
};
|
|
139
|
-
static getDerivedStateFromProps(props: PopoverProps
|
|
141
|
+
static getDerivedStateFromProps(props: Readonly<PopoverProps>, state: PopoverState): {
|
|
140
142
|
show: boolean | undefined;
|
|
141
143
|
};
|
|
142
144
|
componentDidUpdate(_: PopoverProps, prevState: PopoverState): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import PopperJs, { Behavior, ModifierFn, Placement, Position } from 'popper.js';
|
|
2
|
-
import { Component, CSSProperties, PropsWithChildren, ReactElement, RefObject } from 'react';
|
|
2
|
+
import { Component, ComponentPropsWithoutRef, CSSProperties, PropsWithChildren, ReactElement, RefObject } from 'react';
|
|
3
3
|
export interface PopperState {
|
|
4
4
|
popperStyle: CSSStyleDeclaration | null;
|
|
5
5
|
arrowStyle: CSSStyleDeclaration | null;
|
|
6
6
|
actualPlacement: Placement | undefined;
|
|
7
7
|
}
|
|
8
|
-
export type
|
|
8
|
+
export type BasePopperProps = PropsWithChildren<{
|
|
9
9
|
/**
|
|
10
10
|
* Target for popper.
|
|
11
11
|
*/
|
|
@@ -59,6 +59,7 @@ export type PopperProps = PropsWithChildren<{
|
|
|
59
59
|
*/
|
|
60
60
|
baseClassName?: string;
|
|
61
61
|
}>;
|
|
62
|
+
export type PopperProps = BasePopperProps & Omit<ComponentPropsWithoutRef<'div'>, keyof BasePopperProps>;
|
|
62
63
|
/**
|
|
63
64
|
* `Popper` component.
|
|
64
65
|
*/
|
|
@@ -39,7 +39,7 @@ declare class Progress extends Component<ProgressProps, ProgressState> {
|
|
|
39
39
|
state: {
|
|
40
40
|
status: null;
|
|
41
41
|
};
|
|
42
|
-
static getDerivedStateFromProps({ children }: ProgressProps): {
|
|
42
|
+
static getDerivedStateFromProps({ children }: Readonly<ProgressProps>): {
|
|
43
43
|
status: string;
|
|
44
44
|
};
|
|
45
45
|
componentDidMount(): void;
|
|
@@ -107,8 +107,8 @@ declare class ProgressDialog extends Component<ProgressDialogProps, ProgressDial
|
|
|
107
107
|
className: null;
|
|
108
108
|
baseClassName: string;
|
|
109
109
|
};
|
|
110
|
-
static getDerivedStateFromProps({ isOpen }:
|
|
111
|
-
isOpen: boolean;
|
|
110
|
+
static getDerivedStateFromProps({ isOpen }: Readonly<ProgressDialogProps>): {
|
|
111
|
+
isOpen: boolean | undefined;
|
|
112
112
|
};
|
|
113
113
|
state: {
|
|
114
114
|
isOpen: boolean;
|
|
@@ -79,7 +79,7 @@ interface SectionState extends DerivedState {
|
|
|
79
79
|
export declare const SECTION_BASE_CLASS_NAME: string;
|
|
80
80
|
declare class Section extends Component<SectionProps, SectionState> {
|
|
81
81
|
state: SectionState;
|
|
82
|
-
static getDerivedStateFromProps(props: SectionProps
|
|
82
|
+
static getDerivedStateFromProps(props: Readonly<SectionProps>, state: SectionState): DerivedState;
|
|
83
83
|
handleResize: ({ bounds }: ContentRect) => void;
|
|
84
84
|
handleCollapse: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
85
85
|
renderCollapseButton({ baseClassName, collapsible, }: {
|
|
@@ -45,6 +45,7 @@ export type SegmentedControlProps<T> = {
|
|
|
45
45
|
className?: string;
|
|
46
46
|
style?: CSSProperties;
|
|
47
47
|
disabled?: boolean;
|
|
48
|
+
tooltip?: ReactNode;
|
|
48
49
|
} & DataAttributes)[];
|
|
49
50
|
/**
|
|
50
51
|
* Monospaced version of buttons (all button would have the same width).
|
|
@@ -96,7 +97,7 @@ declare class SegmentedControl<T = unknown> extends Component<SegmentedControlPr
|
|
|
96
97
|
baseClassName: string;
|
|
97
98
|
};
|
|
98
99
|
state: SegmentedControlState<T>;
|
|
99
|
-
static getDerivedStateFromProps<T>(props: SegmentedControlProps<T
|
|
100
|
+
static getDerivedStateFromProps<T>(props: Readonly<SegmentedControlProps<T>>, state: SegmentedControlState<T>): Partial<SegmentedControlState<T>>;
|
|
100
101
|
componentDidMount(): void;
|
|
101
102
|
componentDidUpdate(): void;
|
|
102
103
|
static contextType: import("react").Context<boolean | undefined>;
|