@carbon/react 1.31.2 → 1.32.0-rc.0
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/README.md +1 -1
- package/es/components/Accordion/Accordion.Skeleton.d.ts +64 -0
- package/es/components/Accordion/Accordion.Skeleton.js +3 -3
- package/es/components/Accordion/Accordion.d.ts +65 -0
- package/es/components/Accordion/Accordion.js +5 -6
- package/es/components/Accordion/AccordionItem.d.ts +105 -0
- package/es/components/Accordion/AccordionItem.js +12 -9
- package/es/components/Accordion/AccordionProvider.d.ts +20 -0
- package/es/components/Accordion/AccordionProvider.js +25 -0
- package/es/components/Accordion/index.d.ts +11 -0
- package/es/components/Button/Button.Skeleton.d.ts +28 -0
- package/es/components/Button/Button.Skeleton.js +5 -3
- package/es/components/Button/Button.d.ts +72 -0
- package/es/components/Button/Button.js +13 -10
- package/es/components/Button/index.d.ts +11 -0
- package/es/components/Button/index.js +2 -1
- package/es/components/ButtonSet/ButtonSet.d.ts +17 -0
- package/es/components/ButtonSet/ButtonSet.js +1 -2
- package/es/components/ButtonSet/index.d.ts +9 -0
- package/es/components/CodeSnippet/CodeSnippet.js +1 -0
- package/es/components/ComboButton/index.js +1 -0
- package/es/components/ComposedModal/ComposedModal.d.ts +70 -0
- package/es/components/ComposedModal/ComposedModal.js +58 -67
- package/es/components/ComposedModal/ModalFooter.d.ts +71 -0
- package/es/components/ComposedModal/ModalFooter.js +22 -19
- package/es/components/ComposedModal/ModalHeader.d.ts +58 -0
- package/es/components/ComposedModal/ModalHeader.js +8 -25
- package/es/components/ComposedModal/index.d.ts +9 -0
- package/es/components/ContainedList/ContainedList.js +12 -1
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +109 -0
- package/es/components/ContentSwitcher/ContentSwitcher.js +14 -6
- package/es/components/DangerButton/DangerButton.d.ts +9 -0
- package/es/components/DangerButton/DangerButton.js +2 -2
- package/es/components/DangerButton/index.d.ts +9 -0
- package/es/components/DataTable/TableBatchAction.js +1 -0
- package/es/components/DataTable/TableBatchActions.js +1 -0
- package/es/components/DataTable/TableBody.d.ts +29 -0
- package/es/components/DataTable/TableBody.js +2 -3
- package/es/components/DataTable/TableContainer.d.ts +51 -0
- package/es/components/DataTable/TableContainer.js +3 -4
- package/es/components/DataTable/TableExpandHeader.d.ts +86 -0
- package/es/components/DataTable/TableExpandHeader.js +4 -5
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +12 -16
- package/es/components/Dropdown/Dropdown.js +1 -0
- package/es/components/FluidTextInput/FluidTextInput.js +1 -0
- package/es/components/FormGroup/FormGroup.d.ts +80 -0
- package/es/components/IconButton/index.js +3 -2
- package/es/components/Layout/index.d.ts +74 -0
- package/es/components/Layout/index.js +14 -5
- package/es/components/Link/Link.d.ts +2 -2
- package/es/components/Link/Link.js +2 -1
- package/es/components/MenuButton/index.js +1 -0
- package/es/components/Modal/Modal.js +1 -0
- package/es/components/ModalWrapper/ModalWrapper.js +1 -0
- package/es/components/Notification/Notification.d.ts +531 -0
- package/es/components/Notification/Notification.js +40 -6
- package/es/components/Notification/index.d.ts +7 -0
- package/es/components/PrimaryButton/PrimaryButton.js +1 -0
- package/es/components/SecondaryButton/SecondaryButton.js +1 -0
- package/es/components/Select/Select.d.ts +1 -1
- package/es/components/SkeletonText/SkeletonText.d.ts +61 -0
- package/es/components/SkeletonText/SkeletonText.js +15 -17
- package/es/components/SkeletonText/index.d.ts +9 -0
- package/es/components/Switch/Switch.d.ts +56 -0
- package/es/components/Switch/Switch.js +4 -4
- package/es/components/Tab/index.d.ts +9 -0
- package/es/components/TabContent/TabContent.d.ts +40 -0
- package/es/components/TabContent/TabContent.js +6 -12
- package/es/components/TabContent/index.d.ts +10 -0
- package/es/components/Tabs/Tabs.Skeleton.d.ts +33 -0
- package/es/components/Tabs/Tabs.Skeleton.js +2 -2
- package/es/components/Tabs/Tabs.d.ts +303 -0
- package/es/components/Tabs/Tabs.js +136 -95
- package/es/components/Tabs/index.d.ts +10 -0
- package/es/components/Tabs/usePressable.js +11 -0
- package/es/components/TextInput/ControlledPasswordInput.d.ts +90 -0
- package/es/components/TextInput/ControlledPasswordInput.js +5 -6
- package/es/components/Tile/Tile.d.ts +153 -0
- package/es/components/Tile/Tile.js +62 -74
- package/es/components/Tile/index.d.ts +7 -0
- package/es/components/Toggle/Toggle.Skeleton.d.ts +3 -47
- package/es/components/Toggle/Toggle.Skeleton.js +24 -64
- package/es/components/Toggle/Toggle.js +1 -1
- package/es/components/UIShell/HeaderGlobalAction.js +1 -0
- package/es/components/UIShell/SideNav.d.ts +1 -1
- package/es/index.js +16 -16
- package/es/internal/keyboard/match.js +2 -2
- package/es/internal/useControllableState.js +2 -2
- package/es/internal/wrapFocus.js +6 -6
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +1 -1
- package/es/prop-types/types.js +3 -0
- package/lib/components/Accordion/Accordion.Skeleton.d.ts +64 -0
- package/lib/components/Accordion/Accordion.Skeleton.js +3 -3
- package/lib/components/Accordion/Accordion.d.ts +65 -0
- package/lib/components/Accordion/Accordion.js +5 -6
- package/lib/components/Accordion/AccordionItem.d.ts +105 -0
- package/lib/components/Accordion/AccordionItem.js +11 -8
- package/lib/components/Accordion/AccordionProvider.d.ts +20 -0
- package/lib/components/Accordion/AccordionProvider.js +34 -0
- package/lib/components/Accordion/index.d.ts +11 -0
- package/lib/components/Button/Button.Skeleton.d.ts +28 -0
- package/lib/components/Button/Button.Skeleton.js +5 -3
- package/lib/components/Button/Button.d.ts +72 -0
- package/lib/components/Button/Button.js +18 -11
- package/lib/components/Button/index.d.ts +11 -0
- package/lib/components/Button/index.js +6 -0
- package/lib/components/ButtonSet/ButtonSet.d.ts +17 -0
- package/lib/components/ButtonSet/ButtonSet.js +1 -2
- package/lib/components/ButtonSet/index.d.ts +9 -0
- package/lib/components/CodeSnippet/CodeSnippet.js +1 -0
- package/lib/components/ComboButton/index.js +1 -0
- package/lib/components/ComposedModal/ComposedModal.d.ts +70 -0
- package/lib/components/ComposedModal/ComposedModal.js +58 -67
- package/lib/components/ComposedModal/ModalFooter.d.ts +71 -0
- package/lib/components/ComposedModal/ModalFooter.js +22 -19
- package/lib/components/ComposedModal/ModalHeader.d.ts +58 -0
- package/lib/components/ComposedModal/ModalHeader.js +8 -25
- package/lib/components/ComposedModal/index.d.ts +9 -0
- package/lib/components/ContainedList/ContainedList.js +12 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +109 -0
- package/lib/components/ContentSwitcher/ContentSwitcher.js +14 -6
- package/lib/components/DangerButton/DangerButton.d.ts +9 -0
- package/lib/components/DangerButton/DangerButton.js +2 -2
- package/lib/components/DangerButton/index.d.ts +9 -0
- package/lib/components/DataTable/TableBatchAction.js +1 -0
- package/lib/components/DataTable/TableBatchActions.js +1 -0
- package/lib/components/DataTable/TableBody.d.ts +29 -0
- package/lib/components/DataTable/TableBody.js +3 -4
- package/lib/components/DataTable/TableContainer.d.ts +51 -0
- package/lib/components/DataTable/TableContainer.js +3 -4
- package/lib/components/DataTable/TableExpandHeader.d.ts +86 -0
- package/lib/components/DataTable/TableExpandHeader.js +4 -5
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +12 -16
- package/lib/components/Dropdown/Dropdown.js +1 -0
- package/lib/components/FluidTextInput/FluidTextInput.js +1 -0
- package/lib/components/FormGroup/FormGroup.d.ts +80 -0
- package/lib/components/IconButton/index.js +3 -2
- package/lib/components/Layout/index.d.ts +74 -0
- package/lib/components/Layout/index.js +14 -5
- package/lib/components/Link/Link.d.ts +2 -2
- package/lib/components/Link/Link.js +2 -1
- package/lib/components/MenuButton/index.js +1 -0
- package/lib/components/Modal/Modal.js +1 -0
- package/lib/components/ModalWrapper/ModalWrapper.js +1 -0
- package/lib/components/Notification/Notification.d.ts +531 -0
- package/lib/components/Notification/Notification.js +40 -6
- package/lib/components/Notification/index.d.ts +7 -0
- package/lib/components/PrimaryButton/PrimaryButton.js +1 -0
- package/lib/components/SecondaryButton/SecondaryButton.js +1 -0
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/SkeletonText/SkeletonText.d.ts +61 -0
- package/lib/components/SkeletonText/SkeletonText.js +15 -17
- package/lib/components/SkeletonText/index.d.ts +9 -0
- package/lib/components/Switch/Switch.d.ts +56 -0
- package/lib/components/Switch/Switch.js +4 -4
- package/lib/components/Tab/index.d.ts +9 -0
- package/lib/components/TabContent/TabContent.d.ts +40 -0
- package/lib/components/TabContent/TabContent.js +6 -12
- package/lib/components/TabContent/index.d.ts +10 -0
- package/lib/components/Tabs/Tabs.Skeleton.d.ts +33 -0
- package/lib/components/Tabs/Tabs.Skeleton.js +2 -2
- package/lib/components/Tabs/Tabs.d.ts +303 -0
- package/lib/components/Tabs/Tabs.js +135 -94
- package/lib/components/Tabs/index.d.ts +10 -0
- package/lib/components/Tabs/usePressable.js +11 -0
- package/lib/components/TextInput/ControlledPasswordInput.d.ts +90 -0
- package/lib/components/TextInput/ControlledPasswordInput.js +5 -6
- package/lib/components/Tile/Tile.d.ts +153 -0
- package/lib/components/Tile/Tile.js +62 -74
- package/lib/components/Tile/index.d.ts +7 -0
- package/lib/components/Toggle/Toggle.Skeleton.d.ts +3 -47
- package/lib/components/Toggle/Toggle.Skeleton.js +22 -62
- package/lib/components/Toggle/Toggle.js +1 -1
- package/lib/components/UIShell/HeaderGlobalAction.js +1 -0
- package/lib/components/UIShell/SideNav.d.ts +1 -1
- package/lib/index.js +51 -47
- package/lib/internal/keyboard/match.js +2 -2
- package/lib/internal/useControllableState.js +2 -2
- package/lib/internal/wrapFocus.js +6 -6
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -1
- package/lib/prop-types/types.js +3 -0
- package/package.json +4 -3
- package/scss/components/contained-list/_contained-list.scss +9 -0
- package/scss/components/contained-list/_index.scss +9 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import React, { type ReactNode, type MouseEvent, type KeyboardEvent, type HTMLAttributes, type ComponentType, type ReactHTML } from 'react';
|
|
9
|
+
type DivAttributes = HTMLAttributes<HTMLDivElement>;
|
|
10
|
+
/**
|
|
11
|
+
* Tabs
|
|
12
|
+
*/
|
|
13
|
+
export interface TabsProps {
|
|
14
|
+
/**
|
|
15
|
+
* Provide child elements to be rendered inside the `Tabs`.
|
|
16
|
+
* These elements should render either `TabsList` or `TabsPanels`
|
|
17
|
+
*/
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Specify which content tab should be initially selected when the component
|
|
21
|
+
* is first rendered
|
|
22
|
+
*/
|
|
23
|
+
defaultSelectedIndex?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the rendered Tab children should be dismissable.
|
|
26
|
+
*/
|
|
27
|
+
dismissable?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Provide an optional function which is called
|
|
30
|
+
* whenever the state of the `Tabs` changes
|
|
31
|
+
*/
|
|
32
|
+
onChange?(state: {
|
|
33
|
+
selectedIndex: number;
|
|
34
|
+
}): void;
|
|
35
|
+
/**
|
|
36
|
+
* If specifying the `onTabCloseRequest` prop, provide a callback function
|
|
37
|
+
* responsible for removing the tab when close button is pressed on one of the Tab elements
|
|
38
|
+
*/
|
|
39
|
+
onTabCloseRequest?(tabIndex: number): void;
|
|
40
|
+
/**
|
|
41
|
+
* Control which content panel is currently selected. This puts the component
|
|
42
|
+
* in a controlled mode and should be used along with `onChange`
|
|
43
|
+
*/
|
|
44
|
+
selectedIndex?: number;
|
|
45
|
+
}
|
|
46
|
+
declare function Tabs({ children, defaultSelectedIndex, onChange, selectedIndex: controlledSelectedIndex, dismissable, onTabCloseRequest, }: TabsProps): JSX.Element;
|
|
47
|
+
declare namespace Tabs {
|
|
48
|
+
var propTypes: {
|
|
49
|
+
/**
|
|
50
|
+
* Provide child elements to be rendered inside the `Tabs`.
|
|
51
|
+
* These elements should render either `TabsList` or `TabsPanels`
|
|
52
|
+
*/
|
|
53
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
54
|
+
/**
|
|
55
|
+
* Specify which content tab should be initially selected when the component
|
|
56
|
+
* is first rendered
|
|
57
|
+
*/
|
|
58
|
+
defaultSelectedIndex: PropTypes.Requireable<number>;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the render Tab children should be dismissable.
|
|
61
|
+
*/
|
|
62
|
+
dismissable: PropTypes.Requireable<boolean>;
|
|
63
|
+
/**
|
|
64
|
+
* Provide an optional function which is called whenever the state of the
|
|
65
|
+
* `Tabs` changes
|
|
66
|
+
*/
|
|
67
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
68
|
+
/**
|
|
69
|
+
* If specifying the `onTabCloseRequest` prop, provide a callback function
|
|
70
|
+
* responsible for removing the tab when close button is pressed on one of the Tab elements
|
|
71
|
+
*/
|
|
72
|
+
onTabCloseRequest: (props: any) => Error | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Control which content panel is currently selected. This puts the component
|
|
75
|
+
* in a controlled mode and should be used along with `onChange`
|
|
76
|
+
*/
|
|
77
|
+
selectedIndex: PropTypes.Requireable<number>;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* TabList
|
|
82
|
+
*/
|
|
83
|
+
export interface TabListProps extends DivAttributes {
|
|
84
|
+
/**
|
|
85
|
+
* Specify whether the content tab should be activated automatically or
|
|
86
|
+
* manually
|
|
87
|
+
*/
|
|
88
|
+
activation?: 'automatic' | 'manual';
|
|
89
|
+
/**
|
|
90
|
+
* Provide an accessible label to be read when a user interacts with this
|
|
91
|
+
* component
|
|
92
|
+
*/
|
|
93
|
+
'aria-label': string;
|
|
94
|
+
/**
|
|
95
|
+
* Provide child elements to be rendered inside `ContentTabs`.
|
|
96
|
+
* These elements should render a `ContentTab`
|
|
97
|
+
*/
|
|
98
|
+
children?: ReactNode;
|
|
99
|
+
/**
|
|
100
|
+
* Specify an optional className to be added to the container node
|
|
101
|
+
*/
|
|
102
|
+
className?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Specify whether component is contained type
|
|
105
|
+
*/
|
|
106
|
+
contained?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* If using `IconTab`, specify the size of the icon being used.
|
|
109
|
+
*/
|
|
110
|
+
iconSize?: 'default' | 'lg';
|
|
111
|
+
/**
|
|
112
|
+
* Provide the props that describe the left overflow button
|
|
113
|
+
*/
|
|
114
|
+
leftOverflowButtonProps: HTMLAttributes<HTMLButtonElement>;
|
|
115
|
+
/**
|
|
116
|
+
* Specify whether to use the light component variant
|
|
117
|
+
*/
|
|
118
|
+
light?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Provide the props that describe the right overflow button
|
|
121
|
+
*/
|
|
122
|
+
rightOverflowButtonProps: HTMLAttributes<HTMLButtonElement>;
|
|
123
|
+
/**
|
|
124
|
+
* Optionally provide a delay (in milliseconds) passed to the lodash
|
|
125
|
+
* debounce of the onScroll handler. This will impact the responsiveness
|
|
126
|
+
* of scroll arrow buttons rendering when scrolling to the first or last tab.
|
|
127
|
+
*/
|
|
128
|
+
scrollDebounceWait?: number;
|
|
129
|
+
/**
|
|
130
|
+
* Choose whether to automatically scroll to newly selected tabs
|
|
131
|
+
* on component rerender
|
|
132
|
+
*/
|
|
133
|
+
scrollIntoView?: boolean;
|
|
134
|
+
}
|
|
135
|
+
declare function TabList({ activation, 'aria-label': label, children, className: customClassName, contained, iconSize, leftOverflowButtonProps, light, rightOverflowButtonProps, scrollDebounceWait, scrollIntoView, ...rest }: TabListProps): JSX.Element;
|
|
136
|
+
declare namespace TabList {
|
|
137
|
+
var propTypes: {
|
|
138
|
+
/**
|
|
139
|
+
* Specify whether the content tab should be activated automatically or
|
|
140
|
+
* manually
|
|
141
|
+
*/
|
|
142
|
+
activation: PropTypes.Requireable<string>;
|
|
143
|
+
/**
|
|
144
|
+
* Provide an accessible label to be read when a user interacts with this
|
|
145
|
+
* component
|
|
146
|
+
*/
|
|
147
|
+
'aria-label': PropTypes.Validator<string>;
|
|
148
|
+
/**
|
|
149
|
+
* Provide child elements to be rendered inside `ContentTabs`.
|
|
150
|
+
* These elements should render a `ContentTab`
|
|
151
|
+
*/
|
|
152
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
153
|
+
/**
|
|
154
|
+
* Specify an optional className to be added to the container node
|
|
155
|
+
*/
|
|
156
|
+
className: PropTypes.Requireable<string>;
|
|
157
|
+
/**
|
|
158
|
+
* Specify whether component is contained type
|
|
159
|
+
*/
|
|
160
|
+
contained: PropTypes.Requireable<boolean>;
|
|
161
|
+
/**
|
|
162
|
+
* If using `IconTab`, specify the size of the icon being used.
|
|
163
|
+
*/
|
|
164
|
+
iconSize: PropTypes.Requireable<string>;
|
|
165
|
+
/**
|
|
166
|
+
* Provide the props that describe the left overflow button
|
|
167
|
+
*/
|
|
168
|
+
leftOverflowButtonProps: PropTypes.Requireable<object>;
|
|
169
|
+
/**
|
|
170
|
+
* Specify whether to use the light component variant
|
|
171
|
+
*/
|
|
172
|
+
light: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
173
|
+
/**
|
|
174
|
+
* Provide the props that describe the right overflow button
|
|
175
|
+
*/
|
|
176
|
+
rightOverflowButtonProps: PropTypes.Requireable<object>;
|
|
177
|
+
/**
|
|
178
|
+
* Optionally provide a delay (in milliseconds) passed to the lodash
|
|
179
|
+
* debounce of the onScroll handler. This will impact the responsiveness
|
|
180
|
+
* of scroll arrow buttons rendering when scrolling to the first or last tab.
|
|
181
|
+
*/
|
|
182
|
+
scrollDebounceWait: PropTypes.Requireable<number>;
|
|
183
|
+
/**
|
|
184
|
+
* Choose whether to automatically scroll
|
|
185
|
+
* to newly selected tabs on component rerender
|
|
186
|
+
*/
|
|
187
|
+
scrollIntoView: PropTypes.Requireable<boolean>;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Tab
|
|
192
|
+
*/
|
|
193
|
+
export interface TabProps extends HTMLAttributes<HTMLElement> {
|
|
194
|
+
/**
|
|
195
|
+
* Provide a custom element to render instead of the default button
|
|
196
|
+
*/
|
|
197
|
+
as?: keyof ReactHTML | ComponentType;
|
|
198
|
+
/**
|
|
199
|
+
* Provide child elements to be rendered inside `Tab`.
|
|
200
|
+
*/
|
|
201
|
+
children?: ReactNode;
|
|
202
|
+
/**
|
|
203
|
+
* Specify an optional className to be added to your Tab
|
|
204
|
+
*/
|
|
205
|
+
className?: string;
|
|
206
|
+
/**
|
|
207
|
+
* Whether your Tab is disabled.
|
|
208
|
+
*/
|
|
209
|
+
disabled?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Provide a handler that is invoked when a user clicks on the control
|
|
212
|
+
*/
|
|
213
|
+
onClick?(event: MouseEvent): void;
|
|
214
|
+
/**
|
|
215
|
+
* Provide a handler that is invoked on the key down event for the control
|
|
216
|
+
*/
|
|
217
|
+
onKeyDown?(event: KeyboardEvent): void;
|
|
218
|
+
/**
|
|
219
|
+
* An optional parameter to allow overriding the anchor rendering.
|
|
220
|
+
* Useful for using Tab along with react-router or other client
|
|
221
|
+
* side router libraries.
|
|
222
|
+
*/
|
|
223
|
+
renderButton?(): ReactNode;
|
|
224
|
+
/**
|
|
225
|
+
* Optional prop to render an icon next to the label.
|
|
226
|
+
* Can be a React component class
|
|
227
|
+
*/
|
|
228
|
+
renderIcon?: ComponentType<{
|
|
229
|
+
size: number;
|
|
230
|
+
}>;
|
|
231
|
+
/**
|
|
232
|
+
* An optional label to render under the primary tab label.
|
|
233
|
+
* Only useful for conained tabs.
|
|
234
|
+
*/
|
|
235
|
+
secondaryLabel?: string;
|
|
236
|
+
}
|
|
237
|
+
declare const Tab: React.ForwardRefExoticComponent<TabProps & React.RefAttributes<HTMLElement>>;
|
|
238
|
+
/**
|
|
239
|
+
* IconTab
|
|
240
|
+
*/
|
|
241
|
+
export interface IconTabProps extends DivAttributes {
|
|
242
|
+
/**
|
|
243
|
+
* Provide an icon to be rendered inside `IconTab` as the visual label for Tab.
|
|
244
|
+
*/
|
|
245
|
+
children?: ReactNode;
|
|
246
|
+
/**
|
|
247
|
+
* Specify an optional className to be added to your Tab
|
|
248
|
+
*/
|
|
249
|
+
className?: string;
|
|
250
|
+
/**
|
|
251
|
+
* Specify whether the tooltip for the icon should be open when it first renders
|
|
252
|
+
*/
|
|
253
|
+
defaultOpen?: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* Specify the duration in milliseconds to delay before displaying the tooltip for the icon.
|
|
256
|
+
*/
|
|
257
|
+
enterDelayMs?: number;
|
|
258
|
+
/**
|
|
259
|
+
* Provide the label to be rendered inside the Tooltip. The label will use
|
|
260
|
+
* `aria-labelledby` and will fully describe the child node that is provided.
|
|
261
|
+
* This means that if you have text in the child node it will not be
|
|
262
|
+
* announced to the screen reader.
|
|
263
|
+
*/
|
|
264
|
+
label: ReactNode;
|
|
265
|
+
/**
|
|
266
|
+
* Specify the duration in milliseconds to delay before hiding the tooltip
|
|
267
|
+
*/
|
|
268
|
+
leaveDelayMs?: number;
|
|
269
|
+
}
|
|
270
|
+
declare const IconTab: React.ForwardRefExoticComponent<IconTabProps & React.RefAttributes<HTMLDivElement>>;
|
|
271
|
+
/**
|
|
272
|
+
* TabPanel
|
|
273
|
+
*/
|
|
274
|
+
export interface TabPanelProps extends DivAttributes {
|
|
275
|
+
/**
|
|
276
|
+
* Provide child elements to be rendered inside `TabPanel`.
|
|
277
|
+
*/
|
|
278
|
+
children?: ReactNode;
|
|
279
|
+
/**
|
|
280
|
+
* Specify an optional className to be added to TabPanel.
|
|
281
|
+
*/
|
|
282
|
+
className?: string;
|
|
283
|
+
}
|
|
284
|
+
declare const TabPanel: React.ForwardRefExoticComponent<TabPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
285
|
+
/**
|
|
286
|
+
* TabPanels
|
|
287
|
+
*/
|
|
288
|
+
export interface TabPanelsProps {
|
|
289
|
+
/**
|
|
290
|
+
* Provide child elements to be rendered inside `TabPanels`.
|
|
291
|
+
*/
|
|
292
|
+
children?: ReactNode;
|
|
293
|
+
}
|
|
294
|
+
declare function TabPanels({ children }: TabPanelsProps): JSX.Element[] | null | undefined;
|
|
295
|
+
declare namespace TabPanels {
|
|
296
|
+
var propTypes: {
|
|
297
|
+
/**
|
|
298
|
+
* Provide child elements to be rendered inside `TabPanels`.
|
|
299
|
+
*/
|
|
300
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
export { Tabs, Tab, IconTab, TabPanel, TabPanels, TabList };
|