@plesk/ui-library 3.35.6 → 3.35.8
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/AutoClosable/AutoClosable.js +1 -0
- package/cjs/components/InputNumber/InputNumber.js +2 -2
- package/cjs/components/Item/Item.js +64 -153
- package/cjs/components/Overlay/Overlay.js +35 -25
- package/cjs/components/Popover/Popover.js +1 -1
- package/cjs/components/SegmentedControl/SegmentedControl.js +1 -0
- package/cjs/components/Tabs/SearchBar.js +40 -147
- package/cjs/components/Tabs/Tab.js +2 -49
- package/cjs/components/Tabs/Tabs.js +48 -99
- package/cjs/components/Toolbar/ToolbarItem.js +1 -0
- package/cjs/components/index.js +14 -11
- 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 +441 -626
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +8 -12
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/AutoClosable/AutoClosable.js +1 -0
- package/esm/components/InputNumber/InputNumber.js +2 -2
- package/esm/components/Item/Item.js +64 -153
- package/esm/components/Overlay/Overlay.js +35 -25
- package/esm/components/Popover/Popover.js +1 -1
- package/esm/components/SegmentedControl/SegmentedControl.js +1 -0
- package/esm/components/Tabs/SearchBar.js +40 -147
- package/esm/components/Tabs/Tab.js +1 -49
- package/esm/components/Tabs/Tabs.js +49 -99
- package/esm/components/Toolbar/ToolbarItem.js +1 -0
- package/esm/components/index.js +1 -2
- package/esm/index.js +1 -1
- package/package.json +28 -33
- package/styleguide/build/bundle.50841a29.js +2 -0
- package/styleguide/build/{bundle.8a07b2dd.js.LICENSE.txt → bundle.50841a29.js.LICENSE.txt} +27 -23
- package/styleguide/index.html +2 -2
- package/types/src/components/Action/Action.d.ts +1 -1
- package/types/src/components/Alert/Alert.d.ts +1 -1
- package/types/src/components/AutoClosable/AutoClosable.d.ts +23 -21
- package/types/src/components/AuxiliaryActions/AuxiliaryActions.d.ts +1 -1
- package/types/src/components/Badge/Badge.d.ts +1 -1
- package/types/src/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/types/src/components/Button/Button.d.ts +2 -2
- package/types/src/components/Button/ButtonContext.d.ts +1 -1
- package/types/src/components/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/types/src/components/Card/PreviewPanel.d.ts +2 -2
- package/types/src/components/Carousel/Carousel.d.ts +1 -1
- package/types/src/components/Checkbox/Checkbox.d.ts +1 -1
- package/types/src/components/ClosingConfirmation/useClosingConfirmation.d.ts +1 -1
- package/types/src/components/ComboBox/ComboBox.d.ts +2 -2
- package/types/src/components/ComboBox/ComboBoxOption.d.ts +1 -1
- package/types/src/components/ComboBoxDropdown/ComboBoxDropdown.d.ts +5 -5
- package/types/src/components/ConsoleOutput/ConsoleOutput.d.ts +2 -2
- package/types/src/components/ContentLoader/ContentLoader.d.ts +2 -2
- package/types/src/components/ContentLoader/IconsLoader.d.ts +2 -2
- package/types/src/components/Cuttable/Cuttable.d.ts +3 -3
- package/types/src/components/Dialog/Dialog.d.ts +3 -3
- package/types/src/components/DistractionFreeModeContext/DistractionFreeModeContext.d.ts +1 -1
- package/types/src/components/Drawer/Drawer.d.ts +1 -1
- package/types/src/components/Drawer/DrawerProgress.d.ts +4 -4
- package/types/src/components/Drawer/Header.d.ts +1 -1
- package/types/src/components/Dropdown/Dropdown.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/Figure/Figure.d.ts +1 -1
- package/types/src/components/Form/Form.d.ts +2 -2
- package/types/src/components/Form/types.d.ts +7 -7
- package/types/src/components/Form/utils.d.ts +3 -3
- package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.d.ts +1 -1
- package/types/src/components/FormFieldPassword/FormFieldPassword.d.ts +4 -4
- package/types/src/components/FormFieldPassword/PasswordMeter.d.ts +1 -1
- package/types/src/components/FormFieldPassword/estimatePassword.d.ts +2 -2
- package/types/src/components/FormFieldSelect/FormFieldSelect.d.ts +2 -2
- package/types/src/components/FormFieldText/FormFieldText.d.ts +4 -4
- package/types/src/components/Grid/Grid.d.ts +4 -4
- package/types/src/components/GridCol/GridCol.d.ts +2 -2
- package/types/src/components/Heading/Heading.d.ts +1 -1
- package/types/src/components/Hint/Hint.d.ts +1 -1
- package/types/src/components/Icon/Icon.d.ts +3 -3
- package/types/src/components/Icon/constants.d.ts +1 -1
- package/types/src/components/InPlaceEdit/InPlaceEdit.d.ts +2 -2
- package/types/src/components/Input/Input.d.ts +4 -3
- package/types/src/components/InputFile/InputFile.d.ts +1 -1
- package/types/src/components/Item/Item.d.ts +79 -0
- package/types/src/components/Item/index.d.ts +2 -0
- package/types/src/components/ItemLink/ItemLink.d.ts +1 -1
- package/types/src/components/ItemList/ItemList.d.ts +7 -7
- package/types/src/components/Label/Label.d.ts +3 -3
- package/types/src/components/Layer/Layer.d.ts +1 -1
- package/types/src/components/Layout/Layout.d.ts +9 -9
- package/types/src/components/Link/Link.d.ts +3 -3
- package/types/src/components/List/ListAction.d.ts +3 -3
- package/types/src/components/List/ListActions.d.ts +2 -2
- package/types/src/components/List/ListActionsDivider.d.ts +2 -2
- package/types/src/components/List/ListEmptyView.d.ts +1 -1
- package/types/src/components/List/ListOperation.d.ts +9 -5
- package/types/src/components/List/ListOperationContext.d.ts +1 -1
- package/types/src/components/LocaleProvider/LocaleProvider.d.ts +5 -5
- package/types/src/components/Markdown/Markdown.d.ts +2 -2
- package/types/src/components/Media/Media.d.ts +1 -1
- package/types/src/components/Media/MediaSection.d.ts +1 -1
- package/types/src/components/Menu/Menu.d.ts +1 -1
- package/types/src/components/Menu/MenuBaseItem.d.ts +3 -3
- package/types/src/components/Menu/MenuDivider.d.ts +1 -1
- package/types/src/components/Menu/MenuHeader.d.ts +1 -1
- package/types/src/components/Menu/MenuItem.d.ts +2 -2
- package/types/src/components/Menu/MenuSelectableItem.d.ts +2 -2
- package/types/src/components/Overlay/Overlay.d.ts +2 -2
- package/types/src/components/PageHeader/PageHeader.d.ts +1 -1
- package/types/src/components/Pagination/Pagination.d.ts +2 -2
- package/types/src/components/Panel/Panel.d.ts +3 -3
- package/types/src/components/Paragraph/Paragraph.d.ts +1 -1
- package/types/src/components/Plaintext/Plaintext.d.ts +1 -1
- package/types/src/components/Popover/Popover.d.ts +5 -3
- package/types/src/components/Popper/Popper.d.ts +2 -2
- package/types/src/components/Progress/Progress.d.ts +2 -2
- package/types/src/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/types/src/components/ProgressBar/ProgressIndicator.d.ts +1 -1
- package/types/src/components/ProgressDialog/ProgressDialog.d.ts +2 -2
- package/types/src/components/ProgressStep/ProgressStep.d.ts +2 -2
- package/types/src/components/Radio/Radio.d.ts +1 -1
- package/types/src/components/Rating/Rating.d.ts +1 -1
- package/types/src/components/Section/Section.d.ts +5 -5
- package/types/src/components/Section/SectionItem.d.ts +1 -1
- package/types/src/components/SegmentedControl/SegmentedControl.d.ts +16 -12
- package/types/src/components/Select/MultiValue.d.ts +1 -1
- package/types/src/components/Select/Select.d.ts +1 -1
- package/types/src/components/Select/SelectControl.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/structures.d.ts +3 -3
- package/types/src/components/Skeleton/Skeleton.d.ts +1 -1
- package/types/src/components/Spinner/Spinner.d.ts +1 -1
- package/types/src/components/SplitButton/SplitButton.d.ts +1 -1
- package/types/src/components/Spot/Spot.d.ts +1 -1
- package/types/src/components/Spot/SpotPopup.d.ts +5 -3
- package/types/src/components/Squeezer/Squeezer.d.ts +2 -2
- package/types/src/components/Status/Status.d.ts +3 -3
- package/types/src/components/StatusMessage/StatusMessage.d.ts +1 -1
- package/types/src/components/Subnav/Subnav.d.ts +1 -1
- package/types/src/components/Switch/Switch.d.ts +3 -2
- package/types/src/components/SwitchesPanel/SwitchesPanel.d.ts +1 -1
- package/types/src/components/SwitchesPanelItem/SwitchesPanelItem.d.ts +1 -1
- package/types/src/components/Tabs/SearchBar.d.ts +107 -0
- package/types/src/components/Tabs/Tab.d.ts +62 -0
- package/types/src/components/Tabs/Tabs.d.ts +111 -0
- package/types/src/components/Tabs/index.d.ts +6 -0
- package/types/src/components/Text/Text.d.ts +1 -1
- package/types/src/components/TextArea/TextArea.d.ts +4 -4
- package/types/src/components/Toast/Toast.d.ts +2 -2
- package/types/src/components/Toaster/Toaster.d.ts +4 -4
- package/types/src/components/Toolbar/RegistryContext.d.ts +2 -2
- package/types/src/components/Toolbar/Toolbar.d.ts +2 -2
- package/types/src/components/Toolbar/ToolbarExpander.d.ts +2 -2
- package/types/src/components/Toolbar/ToolbarGroup.d.ts +1 -1
- package/types/src/components/Toolbar/ToolbarItem.d.ts +1 -1
- package/types/src/components/Toolbar/ToolbarMenu.d.ts +1 -1
- package/types/src/components/Tooltip/Tooltip.d.ts +2 -2
- package/types/src/components/Tour/Tour.d.ts +2 -2
- package/types/src/components/Translate/Translate.d.ts +5 -3
- package/types/src/components/index.d.ts +3 -2
- package/types/src/components/utils.d.ts +5 -5
- package/types/src/utils/types/PolymorphicComponent.d.ts +5 -5
- package/styleguide/build/bundle.8a07b2dd.js +0 -2
|
@@ -73,6 +73,6 @@ declare class SwitchesPanelItem extends Component<SwitchesPanelItemProps> {
|
|
|
73
73
|
checked: boolean | undefined;
|
|
74
74
|
};
|
|
75
75
|
handleChange: (checked: boolean) => void;
|
|
76
|
-
render(): JSX.Element;
|
|
76
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
77
77
|
}
|
|
78
78
|
export default SwitchesPanelItem;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { InputProps } from '../Input';
|
|
3
|
+
import { MenuProps } from '../Menu';
|
|
4
|
+
import './SearchBar.less';
|
|
5
|
+
interface SearchBarBaseProps {
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
13
|
+
baseClassName?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Maximum width of SearchBar
|
|
16
|
+
* @since 0.1.0
|
|
17
|
+
*/
|
|
18
|
+
maxWidth?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Minimum width of SearchBar
|
|
21
|
+
* @since 0.1.0
|
|
22
|
+
*/
|
|
23
|
+
minWidth?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Should disable input and show spinner or not.
|
|
26
|
+
* @since 0.1.0
|
|
27
|
+
*/
|
|
28
|
+
loading?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Should collapse input or not. Used for control in independence of context.
|
|
31
|
+
* @since 0.1.0
|
|
32
|
+
*/
|
|
33
|
+
responsive?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Callback for pressing 'Enter' key or 'Search' button.
|
|
36
|
+
*
|
|
37
|
+
* arguments:
|
|
38
|
+
* * value - search value
|
|
39
|
+
* * clearHandler - function that clears input value
|
|
40
|
+
* @since 0.1.0
|
|
41
|
+
*/
|
|
42
|
+
onSearch?: (value: string, clearHandler: () => void) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Callback for pressing any key in input. Used for a live search.
|
|
45
|
+
*
|
|
46
|
+
* arguments:
|
|
47
|
+
* * value - search value
|
|
48
|
+
* * clearHandler - function that clears input value
|
|
49
|
+
* @since 0.1.0
|
|
50
|
+
*/
|
|
51
|
+
onTyping?: (value: string, clearHandler: () => void) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Callback for selecting menu item with mouse click or key pressing.
|
|
54
|
+
*
|
|
55
|
+
* arguments:
|
|
56
|
+
* * value - selected value
|
|
57
|
+
* * clearHandler - function that clears input value
|
|
58
|
+
* @since 0.1.0
|
|
59
|
+
*/
|
|
60
|
+
onItemSelect?: (value: string, clearHandler: () => void) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Should render toggle button or not.
|
|
63
|
+
* @since 2.2.0
|
|
64
|
+
*/
|
|
65
|
+
collapsable?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Callback for pressing toggle button (in normal mode).
|
|
68
|
+
* @since 2.2.0
|
|
69
|
+
*/
|
|
70
|
+
onCollapse?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* Callback for pressing toggle button (in collapsed mode).
|
|
73
|
+
* @since 2.2.0
|
|
74
|
+
*/
|
|
75
|
+
onExpand?: () => void;
|
|
76
|
+
/**
|
|
77
|
+
* Results to display.
|
|
78
|
+
* Could be specified by array of objects with "value" and "title" properties or by Menu component.
|
|
79
|
+
* If Menu component is used then key property of MenuItem will be treated as value.
|
|
80
|
+
* @since 0.1.0
|
|
81
|
+
*/
|
|
82
|
+
results?: ReactElement<MenuProps> | {
|
|
83
|
+
value: string;
|
|
84
|
+
title: string;
|
|
85
|
+
}[];
|
|
86
|
+
/**
|
|
87
|
+
* Props of underlying input element.
|
|
88
|
+
* @since 0.4.1
|
|
89
|
+
*/
|
|
90
|
+
inputProps?: Omit<InputProps, 'value'> & {
|
|
91
|
+
value?: string;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* @ignore
|
|
95
|
+
*/
|
|
96
|
+
autoFocus?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* @ignore
|
|
99
|
+
*/
|
|
100
|
+
key?: number | string;
|
|
101
|
+
}
|
|
102
|
+
declare const SearchBarWrapper: {
|
|
103
|
+
(props: SearchBarBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
104
|
+
displayName: string;
|
|
105
|
+
};
|
|
106
|
+
export default SearchBarWrapper;
|
|
107
|
+
export { SearchBarBaseProps as SearchBarProps };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { PolymorphicComponentProps } from '../../utils/types';
|
|
3
|
+
import { IconName, IconProps } from '../Icon';
|
|
4
|
+
interface TabBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
5
|
+
/**
|
|
6
|
+
* Tab title
|
|
7
|
+
* @since 0.0.35
|
|
8
|
+
*/
|
|
9
|
+
title: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Label in tab title
|
|
12
|
+
* @since 0.0.42
|
|
13
|
+
*/
|
|
14
|
+
label?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Name of icon or Icon component for tab
|
|
17
|
+
* @since 0.0.42
|
|
18
|
+
*/
|
|
19
|
+
icon?: IconName | IconProps | ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Activate callback.
|
|
22
|
+
* @since 0.0.43
|
|
23
|
+
*/
|
|
24
|
+
onActivate?: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Close callback
|
|
27
|
+
* @since 0.0.58
|
|
28
|
+
*/
|
|
29
|
+
onClose?: (e: MouseEvent) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Tab content
|
|
32
|
+
* @since 0.0.47
|
|
33
|
+
*/
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* @ignore
|
|
37
|
+
*/
|
|
38
|
+
tabIndex?: number;
|
|
39
|
+
/**
|
|
40
|
+
* @ignore
|
|
41
|
+
*/
|
|
42
|
+
onKeyDown?: (e: KeyboardEvent<HTMLElement>) => void;
|
|
43
|
+
}
|
|
44
|
+
export type TabProps<Component extends ElementType = 'div'> = {
|
|
45
|
+
/**
|
|
46
|
+
* Component to render as the root element.
|
|
47
|
+
* @since 2.5.1
|
|
48
|
+
* @type ElementType
|
|
49
|
+
* @default a
|
|
50
|
+
*/
|
|
51
|
+
component?: Component;
|
|
52
|
+
} & PolymorphicComponentProps<Component, TabBaseProps>;
|
|
53
|
+
/**
|
|
54
|
+
* `Tab` is an individual element of the [Tabs](#!/Tabs) component.
|
|
55
|
+
*
|
|
56
|
+
* Each `Tab` can display an icon near the tab name for easier identification.
|
|
57
|
+
* It can also display a [Label](#!/Label) next to the tab name for showing additional information about its content.
|
|
58
|
+
* You can make `Tabs` closeable, for example, if you are using them for opening and displaying files.
|
|
59
|
+
* @since 0.0.35
|
|
60
|
+
*/
|
|
61
|
+
declare const Tab: <T extends ElementType = "div">({ children }: TabProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export default Tab;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Component, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { BoundingRect, ContentRect } from 'react-measure';
|
|
3
|
+
import { TabProps } from './Tab';
|
|
4
|
+
import '../../helpers/base.less';
|
|
5
|
+
import { SearchBarProps } from './SearchBar';
|
|
6
|
+
import './Tabs.less';
|
|
7
|
+
export interface TabsProps {
|
|
8
|
+
/**
|
|
9
|
+
* Number of active tab
|
|
10
|
+
* @since 0.0.35
|
|
11
|
+
*/
|
|
12
|
+
active?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Addon for search bar, dropdown etc.
|
|
15
|
+
* @since 0.0.58
|
|
16
|
+
*/
|
|
17
|
+
addon?: ReactElement;
|
|
18
|
+
/**
|
|
19
|
+
* Placeholder for search bar, dropdown etc.
|
|
20
|
+
*
|
|
21
|
+
* @deprecated Do not use! Use `addon` instead!
|
|
22
|
+
* @since 0.0.42
|
|
23
|
+
*/
|
|
24
|
+
placeholder?: ReactElement;
|
|
25
|
+
/**
|
|
26
|
+
* Minimum add-on width in pixels
|
|
27
|
+
* @since 0.0.58
|
|
28
|
+
*/
|
|
29
|
+
addonMinWidth?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Monospaced version of tabs (all visible tabs as wide as widest of them)
|
|
32
|
+
* @since 0.0.58
|
|
33
|
+
*/
|
|
34
|
+
monospaced?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* [SearchBar](#!/SearchBar) element
|
|
37
|
+
* @since 0.0.58
|
|
38
|
+
*/
|
|
39
|
+
search?: ReactElement<SearchBarProps>;
|
|
40
|
+
/**
|
|
41
|
+
* [Tabs](#!/Tab)
|
|
42
|
+
* @since 0.0.47
|
|
43
|
+
*/
|
|
44
|
+
children: ReactElement<TabProps> | ReactElement<TabProps>[];
|
|
45
|
+
/**
|
|
46
|
+
* @ignore
|
|
47
|
+
*/
|
|
48
|
+
className?: string;
|
|
49
|
+
/**
|
|
50
|
+
* @ignore
|
|
51
|
+
*/
|
|
52
|
+
baseClassName?: string;
|
|
53
|
+
}
|
|
54
|
+
interface TabsState {
|
|
55
|
+
active: number;
|
|
56
|
+
prevActive?: number;
|
|
57
|
+
collapsedLength: number;
|
|
58
|
+
compact: boolean;
|
|
59
|
+
searching: boolean;
|
|
60
|
+
monospacedWidth: number;
|
|
61
|
+
}
|
|
62
|
+
interface Widths {
|
|
63
|
+
tabs: number[];
|
|
64
|
+
more: number;
|
|
65
|
+
container: number;
|
|
66
|
+
margin: number;
|
|
67
|
+
}
|
|
68
|
+
type TabMode = 'menu-item' | 'tab';
|
|
69
|
+
/**
|
|
70
|
+
* `Tabs` component is a content area with a group of individual [Tab](#!/Tab) elements, each displaying different content
|
|
71
|
+
* in the same screen area. `Tabs` are used when you have too much content to display in one place at the same time, so
|
|
72
|
+
* the content is broken into logical groups and each group is displayed under its own [Tab](#!/Tab) that serves both as a
|
|
73
|
+
* group name and a navigation button.
|
|
74
|
+
* @since 0.0.35
|
|
75
|
+
*/
|
|
76
|
+
declare class Tabs extends Component<TabsProps, TabsState> {
|
|
77
|
+
static defaultProps: {
|
|
78
|
+
baseClassName: string;
|
|
79
|
+
};
|
|
80
|
+
state: {
|
|
81
|
+
active: number;
|
|
82
|
+
collapsedLength: number;
|
|
83
|
+
compact: boolean;
|
|
84
|
+
searching: boolean;
|
|
85
|
+
monospacedWidth: number;
|
|
86
|
+
};
|
|
87
|
+
static getDerivedStateFromProps(props: TabsProps, state: TabsState): Partial<TabsState>;
|
|
88
|
+
componentDidUpdate(): void;
|
|
89
|
+
widths: Widths | undefined;
|
|
90
|
+
addon: BoundingRect | undefined;
|
|
91
|
+
tabsnavRef: HTMLElement | undefined;
|
|
92
|
+
moreTabsRef: HTMLElement | null;
|
|
93
|
+
checkAdaptive: () => void;
|
|
94
|
+
onClick(active: number): void;
|
|
95
|
+
handleStartSearching: () => void;
|
|
96
|
+
handleCancelSearching: () => void;
|
|
97
|
+
handleResize: () => void;
|
|
98
|
+
handleAddonResize: (contentRect: ContentRect) => void;
|
|
99
|
+
renderTabLabel(tabMode: TabMode, label: ReactNode): import("react/jsx-runtime").JSX.Element | null;
|
|
100
|
+
renderTabClose(tabMode: TabMode, onClose?: TabProps['onClose']): import("react/jsx-runtime").JSX.Element | null;
|
|
101
|
+
renderFakeTabs(): import("react/jsx-runtime").JSX.Element | null;
|
|
102
|
+
renderTabItem: (tab: ReactElement<TabProps>, index: number, tabMode: TabMode) => import("react/jsx-runtime").JSX.Element | null;
|
|
103
|
+
createTabItems(): {
|
|
104
|
+
visibleItems: ReactElement<any, string | import("react").JSXElementConstructor<any>>[];
|
|
105
|
+
hiddenItems: ReactElement<any, string | import("react").JSXElementConstructor<any>>[];
|
|
106
|
+
};
|
|
107
|
+
renderTabList(): import("react/jsx-runtime").JSX.Element | null;
|
|
108
|
+
renderSearchBar(searchProps: SearchBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
109
|
+
render(): import("react/jsx-runtime").JSX.Element | null;
|
|
110
|
+
}
|
|
111
|
+
export default Tabs;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Component, ComponentPropsWithoutRef, SyntheticEvent } from 'react';
|
|
2
2
|
import './TextArea.less';
|
|
3
|
-
|
|
3
|
+
type Rows = number | {
|
|
4
4
|
min: number;
|
|
5
5
|
max: number;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type TextAreaProps = {
|
|
8
8
|
/**
|
|
9
9
|
* @ignore
|
|
10
10
|
*/
|
|
@@ -33,7 +33,7 @@ export declare type TextAreaProps = {
|
|
|
33
33
|
*/
|
|
34
34
|
onChange?: (e: SyntheticEvent<HTMLTextAreaElement>) => void;
|
|
35
35
|
} & Omit<ComponentPropsWithoutRef<'textarea'>, 'rows'>;
|
|
36
|
-
|
|
36
|
+
type TextAreaState = {
|
|
37
37
|
textareaStyles: any;
|
|
38
38
|
minRows?: number;
|
|
39
39
|
maxRows?: number;
|
|
@@ -64,6 +64,6 @@ declare class TextArea extends Component<TextAreaProps, TextAreaState> {
|
|
|
64
64
|
rootRef: import("react").RefObject<HTMLTextAreaElement>;
|
|
65
65
|
handleChange: (e: SyntheticEvent<HTMLTextAreaElement>) => void;
|
|
66
66
|
adjustHeight(): void;
|
|
67
|
-
render(): JSX.Element;
|
|
67
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
68
68
|
}
|
|
69
69
|
export default TextArea;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component, ReactElement, RefObject } from 'react';
|
|
2
2
|
import { IconName, IconProps } from '../Icon';
|
|
3
3
|
import './Toast.less';
|
|
4
|
-
export
|
|
4
|
+
export type ToastProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Visual intent color to apply to component.
|
|
7
7
|
*/
|
|
@@ -45,5 +45,5 @@ export default class Toast extends Component<ToastProps> {
|
|
|
45
45
|
componentDidMount(): void;
|
|
46
46
|
componentWillUnmount(): void;
|
|
47
47
|
timer?: number;
|
|
48
|
-
render(): JSX.Element;
|
|
48
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
import { ToastProps } from '../Toast';
|
|
3
3
|
import './Toaster.less';
|
|
4
|
-
|
|
4
|
+
type ToastPropsWithKey = ToastProps & {
|
|
5
5
|
key: string;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type ToasterProps = {
|
|
8
8
|
/**
|
|
9
9
|
* Toaster position
|
|
10
10
|
* @since 0.0.42
|
|
@@ -33,7 +33,7 @@ export declare type ToasterProps = {
|
|
|
33
33
|
*/
|
|
34
34
|
onToastClose?: (key: string) => void;
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
type ToasterState = {
|
|
37
37
|
toasts: ToastPropsWithKey[];
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
@@ -90,6 +90,6 @@ export default class Toaster extends Component<ToasterProps, ToasterState> {
|
|
|
90
90
|
* @public
|
|
91
91
|
*/
|
|
92
92
|
clear(): void;
|
|
93
|
-
render(): JSX.Element;
|
|
93
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
94
94
|
}
|
|
95
95
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type RegistryItem = {
|
|
2
2
|
setCompact: (compact: boolean) => void;
|
|
3
3
|
isCompact: (one: boolean) => boolean;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type Registry = {
|
|
6
6
|
stack: RegistryItem[];
|
|
7
7
|
register: (item: RegistryItem) => void;
|
|
8
8
|
unregister: (item: RegistryItem) => void;
|
|
@@ -24,7 +24,7 @@ export interface ToolbarProps {
|
|
|
24
24
|
*/
|
|
25
25
|
baseClassName?: string;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
type ToolbarState = {
|
|
28
28
|
distractionFreeMode: DistractionFreeMode;
|
|
29
29
|
};
|
|
30
30
|
declare class Toolbar extends Component<ToolbarProps, ToolbarState> {
|
|
@@ -42,6 +42,6 @@ declare class Toolbar extends Component<ToolbarProps, ToolbarState> {
|
|
|
42
42
|
};
|
|
43
43
|
private readonly registry;
|
|
44
44
|
private measure;
|
|
45
|
-
render(): JSX.Element;
|
|
45
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
46
46
|
}
|
|
47
47
|
export default Toolbar;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
type ToolbarExpanderProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Content of the `ToolbarExpander`.
|
|
5
5
|
* @since 0.0.57
|
|
@@ -20,5 +20,5 @@ declare type ToolbarExpanderProps = {
|
|
|
20
20
|
* all controls before ToolbarExpander are aligned left, and all controls after ToolbarExpander are aligned right.
|
|
21
21
|
* @since 0.0.57
|
|
22
22
|
*/
|
|
23
|
-
declare const ToolbarExpander: ({ baseClassName, className, children, ...props }: ToolbarExpanderProps) => JSX.Element | null;
|
|
23
|
+
declare const ToolbarExpander: ({ baseClassName, className, children, ...props }: ToolbarExpanderProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
24
24
|
export default ToolbarExpander;
|
|
@@ -40,7 +40,7 @@ export interface ToolbarGroupProps {
|
|
|
40
40
|
distractionFreeMode: DistractionFreeMode;
|
|
41
41
|
}
|
|
42
42
|
declare const ToolbarGroupWrapper: {
|
|
43
|
-
({ groupable, baseClassName, ...props }: Omit<ToolbarGroupProps, 'registry' | 'distractionFreeMode'>): JSX.Element;
|
|
43
|
+
({ groupable, baseClassName, ...props }: Omit<ToolbarGroupProps, 'registry' | 'distractionFreeMode'>): import("react/jsx-runtime").JSX.Element;
|
|
44
44
|
displayName: string;
|
|
45
45
|
};
|
|
46
46
|
export default ToolbarGroupWrapper;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export declare const toToolbarItems: (children: ReactNode) =>
|
|
2
|
+
export declare const toToolbarItems: (children: ReactNode) => (string | number | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element)[] | null | undefined;
|
|
@@ -55,7 +55,7 @@ declare class Tooltip extends Component<TooltipProps> {
|
|
|
55
55
|
handleHide: () => void;
|
|
56
56
|
handleMouseEnter: () => void;
|
|
57
57
|
handleMouseMove: (e: MouseEvent) => void;
|
|
58
|
-
renderTooltip(): JSX.Element;
|
|
59
|
-
render(): JSX.Element;
|
|
58
|
+
renderTooltip(): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
60
60
|
}
|
|
61
61
|
export default Tooltip;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import Spot from '../Spot';
|
|
3
|
-
export
|
|
3
|
+
export type TourProps = {
|
|
4
4
|
/**
|
|
5
5
|
* A number of current spot.
|
|
6
6
|
* @since 2.7.0
|
|
@@ -23,5 +23,5 @@ export declare type TourProps = {
|
|
|
23
23
|
* or element you want to focus user attention on.
|
|
24
24
|
* @since 2.7.0
|
|
25
25
|
*/
|
|
26
|
-
declare const Tour: ({ current, children, onClose }: TourProps) => JSX.Element | null;
|
|
26
|
+
declare const Tour: ({ current, children, onClose }: TourProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
27
|
export default Tour;
|
|
@@ -28,7 +28,9 @@ interface BaseTranslateProps {
|
|
|
28
28
|
* @ignore
|
|
29
29
|
*/
|
|
30
30
|
translators?: {
|
|
31
|
-
[key: string]: ReactNode
|
|
31
|
+
[key: string]: ReactNode | ((params?: {
|
|
32
|
+
[key: string]: ReactNode;
|
|
33
|
+
}) => ReactNode);
|
|
32
34
|
};
|
|
33
35
|
/**
|
|
34
36
|
* @ignore
|
|
@@ -39,7 +41,7 @@ interface BaseTranslateProps {
|
|
|
39
41
|
*/
|
|
40
42
|
children?: string;
|
|
41
43
|
}
|
|
42
|
-
export
|
|
44
|
+
export type TranslateProps<Component extends ElementType = 'span'> = {
|
|
43
45
|
/**
|
|
44
46
|
* Component to render as the root element. Useful when rendering a `Translate` as `<option>`.
|
|
45
47
|
* @since 0.0.42
|
|
@@ -52,5 +54,5 @@ export declare type TranslateProps<Component extends ElementType = 'span'> = {
|
|
|
52
54
|
* `Translate` component.
|
|
53
55
|
* @since 0.0.42
|
|
54
56
|
*/
|
|
55
|
-
declare const Translate: <Component extends ElementType
|
|
57
|
+
declare const Translate: <Component extends ElementType = "span">({ component, content, children, params, unsafe, fallback, namespace, translators, ...props }: TranslateProps<Component>) => string | number | boolean | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
56
58
|
export default Translate;
|
|
@@ -66,6 +66,7 @@ export type { TextAreaProps } from './TextArea';
|
|
|
66
66
|
export { default as Select } from './Select';
|
|
67
67
|
export * from './Select';
|
|
68
68
|
export { default as Item } from './Item';
|
|
69
|
+
export type { ItemProps, ItemView } from './Item';
|
|
69
70
|
export { default as ItemLink } from './ItemLink';
|
|
70
71
|
export { default as ItemList } from './ItemList';
|
|
71
72
|
export { default as Label } from './Label';
|
|
@@ -118,8 +119,8 @@ export { default as SwitchesPanel } from './SwitchesPanel';
|
|
|
118
119
|
export type { SwitchesPanelProps } from './SwitchesPanel';
|
|
119
120
|
export { default as SwitchesPanelItem } from './SwitchesPanelItem';
|
|
120
121
|
export type { SwitchesPanelItemProps } from './SwitchesPanelItem';
|
|
121
|
-
export { default as Tabs } from './Tabs';
|
|
122
|
-
export
|
|
122
|
+
export { default as Tabs, Tab, SearchBar } from './Tabs';
|
|
123
|
+
export type { TabsProps, TabProps, SearchBarProps } from './Tabs';
|
|
123
124
|
export { default as Text } from './Text';
|
|
124
125
|
export { default as Toaster } from './Toaster';
|
|
125
126
|
export { default as Toolbar, ToolbarGroup, ToolbarExpander } from './Toolbar';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SyntheticEvent, FunctionComponent, Ref, RefObject } from 'react';
|
|
2
|
-
|
|
2
|
+
type SafeInvoke = <A extends any[]>(fn: ((...args: A) => void) | undefined, ...args: A) => void;
|
|
3
3
|
export declare const safeInvoke: SafeInvoke;
|
|
4
|
-
|
|
4
|
+
type WrapFunction = <A extends any[]>(fn: ((...args: A) => void) | undefined, wrapper: ((...args: A) => void) | undefined) => (...args: A) => void;
|
|
5
5
|
export declare const wrapFunction: WrapFunction;
|
|
6
6
|
export declare const isClickable: (e: SyntheticEvent<HTMLElement, MouseEvent>) => boolean;
|
|
7
|
-
export declare const createProxyProps: <P>(cb: FunctionComponent<P>) => JSX.Element;
|
|
7
|
+
export declare const createProxyProps: <P>(cb: FunctionComponent<P>) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export declare const scrollIntoView: <T extends Element, O>(target: T, options?: O | undefined) => void;
|
|
9
9
|
export declare class EventEmitter<H = (...args: any[]) => void> {
|
|
10
10
|
listeners: {
|
|
@@ -13,13 +13,13 @@ export declare class EventEmitter<H = (...args: any[]) => void> {
|
|
|
13
13
|
on(type: string, handler: H): void;
|
|
14
14
|
emit(type: string, ...args: any[]): void;
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export type FocusStrategy = {
|
|
17
17
|
getNext: (container: Element, element: Element | null) => Element | null | undefined;
|
|
18
18
|
getPrev: (container: Element, element: Element | null) => Element | null | undefined;
|
|
19
19
|
getFirst: (container: Element) => Element | null;
|
|
20
20
|
getLast: (container: Element) => Element | null;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
type ElementFitForFocusChecker = (node: Element) => boolean;
|
|
23
23
|
export declare const createFocusManager: (containerRef: RefObject<HTMLElement>, isFitForFocus?: ElementFitForFocusChecker, strategy?: FocusStrategy) => {
|
|
24
24
|
focusNext: (element?: Element | null, attempt?: number) => boolean;
|
|
25
25
|
focusPrev: (element?: Element | null, attempt?: number) => boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ElementType, ComponentPropsWithoutRef, ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
2
|
+
type ComponentProp<C extends ElementType> = {
|
|
3
3
|
component?: C;
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
export
|
|
5
|
+
type PropsToOmit<C extends ElementType, P> = keyof (ComponentProp<C> & P);
|
|
6
|
+
export type PolymorphicComponentProps<C extends ElementType, Props = {}> = Props & ComponentProp<C> & Omit<ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
7
|
+
type PolymorphicRef<C extends ElementType> = ComponentPropsWithRef<C>['ref'];
|
|
8
|
+
export type PolymorphicComponentPropsWithRef<C extends ElementType, Props = {}> = PolymorphicComponentProps<C, Props> & {
|
|
9
9
|
ref?: PolymorphicRef<C>;
|
|
10
10
|
};
|
|
11
11
|
export {};
|