@splunk/react-ui 5.0.0-beta.3 → 5.0.0-beta.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/Accordion.js +185 -243
- package/Animation.js +2 -2
- package/Button.js +4 -2
- package/ButtonSimple.js +47 -41
- package/CHANGELOG.md +15 -2
- package/CHANGELOG.v5.mdx +73 -0
- package/Calendar.js +352 -469
- package/Card.js +163 -162
- package/Chip.js +171 -356
- package/Clickable.js +79 -76
- package/Code.js +19 -12
- package/Color.js +32 -32
- package/ComboBox.js +9 -7
- package/Date.js +160 -184
- package/DualListbox.js +549 -612
- package/File.js +546 -408
- package/FormRows.js +170 -157
- package/Image.js +124 -251
- package/JSONTree.js +496 -521
- package/Layer.js +162 -97
- package/Layout.d.ts +2 -0
- package/Link.js +20 -13
- package/MIGRATION.v5.mdx +48 -1
- package/Markdown.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +132 -177
- package/MessageBar.js +121 -290
- package/Modal.js +2 -2
- package/ModalLayer.js +12 -12
- package/Multiselect.js +1982 -2334
- package/NonInteractiveCheckbox.js +29 -117
- package/Number.js +114 -114
- package/Popover.js +328 -326
- package/Progress.js +68 -54
- package/RadioBar.js +139 -136
- package/RadioList.js +67 -65
- package/Resize.js +377 -265
- package/ResultsMenu.js +573 -661
- package/Scroll.js +2 -2
- package/ScrollContainerContext.js +13 -9
- package/Search.js +1 -1
- package/Select.js +364 -361
- package/SidePanel.js +17 -21
- package/Slider.js +494 -372
- package/SlidingPanels.js +100 -102
- package/SplitButton.js +39 -25
- package/StepBar.js +3 -3
- package/Switch.js +136 -129
- package/TabBar.js +598 -466
- package/TabLayout.js +34 -34
- package/Table.js +1648 -1479
- package/Text.js +51 -50
- package/TextArea.js +280 -154
- package/Tooltip.js +413 -563
- package/TransitionOpen.js +2 -2
- package/Tree.js +2 -2
- package/Typography.js +30 -28
- package/WaitSpinner.js +6 -11
- package/cypress/support/commands.ts +14 -4
- package/cypress/support/index.d.ts +1 -1
- package/package.json +9 -11
- package/stubs-splunkui.d.ts +0 -4
- package/types/src/Accordion/Accordion.d.ts +14 -21
- package/types/src/Accordion/AccordionContext.d.ts +0 -1
- package/types/src/Animation/Animation.d.ts +2 -3
- package/types/src/AnimationToggle/docs/examples/Provider.d.ts +2 -2
- package/types/src/AnimationToggle/docs/examples/ToggleComponent.d.ts +2 -2
- package/types/src/AnimationToggle/useAnimationToggle.d.ts +1 -1
- package/types/src/Button/Button.d.ts +1 -1
- package/types/src/ButtonGroup/ButtonGroupContext.d.ts +0 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +1 -3
- package/types/src/ButtonSimple/mixin.d.ts +1 -1
- package/types/src/Calendar/Calendar.d.ts +2 -2
- package/types/src/Calendar/{DateTable.d.ts → DateGrid.d.ts} +9 -9
- package/types/src/Calendar/Day.d.ts +8 -4
- package/types/src/Card/Card.d.ts +3 -1
- package/types/src/Card/Header.d.ts +2 -0
- package/types/src/Card/docs/examples/HeadingTitle.d.ts +3 -0
- package/types/src/CardLayout/CardLayoutContext.d.ts +0 -1
- package/types/src/CardLayout/docs/examples/Interactive.d.ts +2 -2
- package/types/src/Clickable/Clickable.d.ts +12 -4
- package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +0 -1
- package/types/src/ComboBox/ComboBox.d.ts +3 -3
- package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +2 -2
- package/types/src/Date/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Date/docs/examples/HighlightToday.d.ts +2 -2
- package/types/src/DefinitionList/DefinitionListContext.d.ts +0 -1
- package/types/src/DualListbox/DualListbox.d.ts +5 -1
- package/types/src/File/File.d.ts +4 -4
- package/types/src/File/FileContext.d.ts +0 -1
- package/types/src/File/Item.d.ts +11 -3
- package/types/src/File/ItemIcon.d.ts +2 -1
- package/types/src/File/docs/examples/Disabled.d.ts +2 -2
- package/types/src/File/docs/examples/DropAnywhere.d.ts +2 -2
- package/types/src/File/docs/examples/Multi.d.ts +2 -2
- package/types/src/File/docs/examples/Single.d.ts +2 -2
- package/types/src/FormRows/FormRows.d.ts +4 -4
- package/types/src/FormRows/FormRowsContext.d.ts +1 -2
- package/types/src/FormRows/SortableRow.d.ts +1 -1
- package/types/src/FormRows/docs/examples/Basic.d.ts +2 -2
- package/types/src/FormRows/docs/examples/Header.d.ts +2 -2
- package/types/src/FormRows/docs/examples/Menu.d.ts +2 -2
- package/types/src/FormRows/docs/examples/ReorderOnly.d.ts +2 -2
- package/types/src/Image/Image.d.ts +1 -4
- package/types/src/JSONTree/docs/examples/Events.d.ts +2 -2
- package/types/src/Layout/Layout.d.ts +1 -0
- package/types/src/Link/Link.d.ts +4 -0
- package/types/src/Link/icons/External.d.ts +1 -2
- package/types/src/Menu/Divider.d.ts +1 -1
- package/types/src/Menu/MenuContext.d.ts +0 -1
- package/types/src/Message/Message.d.ts +1 -1
- package/types/src/MessageBar/MessageBar.d.ts +6 -2
- package/types/src/Modal/ModalContext.d.ts +0 -1
- package/types/src/Multiselect/Compact.d.ts +46 -21
- package/types/src/Multiselect/Multiselect.d.ts +69 -36
- package/types/src/Multiselect/Normal.d.ts +45 -62
- package/types/src/Multiselect/Option.d.ts +42 -18
- package/types/src/Multiselect/docs/examples/Children.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Error.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +2 -22
- package/types/src/Multiselect/docs/examples/Headings.d.ts +2 -1
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -25
- package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -9
- package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +8 -7
- package/types/src/Number/docs/examples/Basic.d.ts +2 -2
- package/types/src/Number/docs/examples/Limits.d.ts +2 -2
- package/types/src/Number/docs/examples/Locale.d.ts +2 -2
- package/types/src/Popover/Popover.d.ts +1 -1
- package/types/src/Popover/PopoverMenuContext.d.ts +0 -1
- package/types/src/RadioBar/RadioBar.d.ts +1 -1
- package/types/src/RadioBar/RadioBarContext.d.ts +0 -1
- package/types/src/RadioList/RadioListContext.d.ts +0 -1
- package/types/src/ResultsMenu/ResultsMenu.d.ts +23 -34
- package/types/src/Scroll/Inner.d.ts +1 -1
- package/types/src/Scroll/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Search/Search.d.ts +2 -2
- package/types/src/Select/SelectBase.d.ts +4 -4
- package/types/src/Slider/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Slider/docs/examples/CustomLabels.d.ts +2 -2
- package/types/src/Slider/getStepMarksBackground.d.ts +8 -0
- package/types/src/SlidingPanels/Panel.d.ts +2 -2
- package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -2
- package/types/src/SlidingPanels/docs/examples/Basic.d.ts +2 -2
- package/types/src/SlidingPanels/docs/examples/Dropdown.d.ts +2 -2
- package/types/src/SplitButton/Item.d.ts +15 -2
- package/types/src/StepBar/Step.d.ts +1 -1
- package/types/src/StepBar/StepBar.d.ts +1 -1
- package/types/src/StepBar/StepBarContext.d.ts +0 -1
- package/types/src/Switch/docs/examples/Basic.d.ts +2 -2
- package/types/src/Switch/docs/examples/Disabled.d.ts +2 -2
- package/types/src/TabBar/Tab.d.ts +12 -5
- package/types/src/TabBar/TabBar.d.ts +11 -7
- package/types/src/TabBar/TabBarContext.d.ts +8 -3
- package/types/src/TabLayout/TabLayout.d.ts +8 -5
- package/types/src/Table/Head.d.ts +4 -15
- package/types/src/Table/HeadCell.d.ts +23 -25
- package/types/src/Table/HeadDropdownCell.d.ts +23 -26
- package/types/src/Table/HeadInner.d.ts +4 -10
- package/types/src/Table/Row.d.ts +6 -6
- package/types/src/Table/Table.d.ts +3 -8
- package/types/src/Table/TableContext.d.ts +0 -1
- package/types/src/Tooltip/Tooltip.d.ts +26 -58
- package/types/src/Tooltip/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Tree/TreeContext.d.ts +0 -1
- package/types/src/Typography/Typography.d.ts +27 -22
- package/types/src/useForceUpdate/useForceUpdate.d.ts +0 -1
- package/types/src/useResizeObserver/useResizeObserver.d.ts +2 -1
- package/types/src/utils/types.d.ts +2 -3
- package/useResizeObserver.js +26 -19
- package/types/src/Date/Icon.d.ts +0 -3
- package/types/src/Image/icons/Cross.d.ts +0 -3
- package/types/src/TabBar/docs/examples/IconsAbove.d.ts +0 -3
- package/types/src/TabBar/docs/examples/VerticalIconsAbove.d.ts +0 -3
- package/types/src/Table/docs/examples/prisma/DockedHeaderScrollbar.d.ts +0 -3
- package/types/src/Tooltip/InfoIcon.d.ts +0 -4
- /package/types/src/TabBar/docs/examples/{IconsLeft.d.ts → Icons.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{VerticalIconsLeft.d.ts → VerticalIcons.d.ts} +0 -0
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { UniqueIdentifier } from '@dnd-kit/core';
|
|
3
4
|
import { HeadAutosizeColumnHandler, HeadRequestMoveColumnHandler, HeadRequestResizeColumnHandler } from './Head';
|
|
4
5
|
import { ComponentProps } from '../utils/types';
|
|
5
6
|
type HeadCellAutosizeColumnHandler = HeadAutosizeColumnHandler;
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
columnId: any;
|
|
7
|
+
type HeadCellKeyDownHandler = (event: React.KeyboardEvent<HTMLButtonElement | HTMLDivElement>, data: {
|
|
8
|
+
columnId?: string;
|
|
9
9
|
index: number;
|
|
10
10
|
}) => void;
|
|
11
11
|
type HeadCellRequestMoveColumnHandler = HeadRequestMoveColumnHandler;
|
|
12
12
|
/** @public */
|
|
13
13
|
type HeadCellSortDir = 'asc' | 'desc' | 'none';
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/** @public */
|
|
15
|
+
type HeadCellSortHandler = (event: React.MouseEvent<HTMLButtonElement | HTMLDivElement> | React.KeyboardEvent<HTMLButtonElement | HTMLDivElement>, data: {
|
|
16
|
+
columnId?: string;
|
|
16
17
|
id?: string;
|
|
17
18
|
index: number;
|
|
18
19
|
sortDir: HeadCellSortDir;
|
|
@@ -26,13 +27,22 @@ interface HeadCellPropsBase {
|
|
|
26
27
|
appearClickable?: boolean;
|
|
27
28
|
children?: React.ReactNode;
|
|
28
29
|
/**
|
|
29
|
-
* An
|
|
30
|
+
* An id that is passed to the `onSort` callback and as `Table`'s `onRequestResizeColumn` callback.
|
|
30
31
|
*/
|
|
31
|
-
columnId?:
|
|
32
|
+
columnId?: string;
|
|
33
|
+
/** @private. */
|
|
34
|
+
dragId?: UniqueIdentifier;
|
|
32
35
|
/**
|
|
33
36
|
* A React ref which is set to the DOM element when the component mounts and null when it unmounts.
|
|
34
37
|
*/
|
|
35
38
|
elementRef?: React.Ref<HTMLTableCellElement>;
|
|
39
|
+
/**
|
|
40
|
+
* A string used to generate the `aria-label` for the head cell during column reordering.
|
|
41
|
+
*
|
|
42
|
+
* When the `children` prop is not a string, providing `headCellScreenReaderText` is recommended
|
|
43
|
+
* to improve the screen reader announcements during the reordering interaction.
|
|
44
|
+
*/
|
|
45
|
+
headCellScreenReaderText?: string;
|
|
36
46
|
/** @private The index of the cell, skipping the info column. */
|
|
37
47
|
index?: number;
|
|
38
48
|
/** @private. */
|
|
@@ -42,8 +52,6 @@ interface HeadCellPropsBase {
|
|
|
42
52
|
* sortable and renders the appropriate user interface.
|
|
43
53
|
*/
|
|
44
54
|
onSort?: HeadCellSortHandler;
|
|
45
|
-
/** @private. */
|
|
46
|
-
onDragStart?: HeadCellDragStartHandler;
|
|
47
55
|
/**
|
|
48
56
|
* @private. Passed through and works as expected.
|
|
49
57
|
*/
|
|
@@ -59,8 +67,6 @@ interface HeadCellPropsBase {
|
|
|
59
67
|
* resizable to `false` to prevent some columns for resizing.
|
|
60
68
|
*/
|
|
61
69
|
resizable?: boolean;
|
|
62
|
-
/** @private. */
|
|
63
|
-
showGuideline?: 'none' | 'before' | 'after';
|
|
64
70
|
/**
|
|
65
71
|
* The current sort direction of this column.
|
|
66
72
|
*/
|
|
@@ -86,30 +92,26 @@ interface HeadCellPropsBase {
|
|
|
86
92
|
width?: number | 'auto';
|
|
87
93
|
/** @private. */
|
|
88
94
|
variant?: 'toggleAll' | 'info' | 'actions';
|
|
89
|
-
/**
|
|
90
|
-
* @private
|
|
91
|
-
* Used internally to manage overlapping head cell elements, i.e. drag handle
|
|
92
|
-
*/
|
|
93
|
-
zIndex?: number;
|
|
94
95
|
}
|
|
95
96
|
type HeadCellProps = ComponentProps<HeadCellPropsBase, 'th'>;
|
|
96
|
-
declare function HeadCell({ align, appearClickable, children, columnId, elementRef, id, index, onAutosizeColumn, onClick,
|
|
97
|
+
declare function HeadCell({ align, appearClickable, children, columnId, elementRef, dragId, headCellScreenReaderText, id, index, onAutosizeColumn, onClick, onKeyDown, onRequestMoveColumn, onRequestResize, onSort, resizable, sortDir, sortKey, style, truncate: truncateProp, variant, visible, width, ...otherProps }: HeadCellProps): React.JSX.Element;
|
|
97
98
|
declare namespace HeadCell {
|
|
98
99
|
var propTypes: {
|
|
99
100
|
align: PropTypes.Requireable<string>;
|
|
100
101
|
/** @private Used to set the $clickable appearance without an onClick */
|
|
101
102
|
appearClickable: PropTypes.Requireable<boolean>;
|
|
102
103
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
103
|
-
columnId: PropTypes.Requireable<
|
|
104
|
+
columnId: PropTypes.Requireable<string>;
|
|
105
|
+
/** @private. */
|
|
106
|
+
dragId: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
104
107
|
elementRef: PropTypes.Requireable<object>;
|
|
108
|
+
headCellScreenReaderText: PropTypes.Requireable<string>;
|
|
105
109
|
/** @private The index of the cell, skipping the info column. */
|
|
106
110
|
index: PropTypes.Requireable<number>;
|
|
107
111
|
/** @private. */
|
|
108
112
|
onAutosizeColumn: PropTypes.Requireable<(...args: any[]) => any>;
|
|
109
113
|
/** @private. */
|
|
110
114
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
111
|
-
/** @private. */
|
|
112
|
-
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
113
115
|
/**
|
|
114
116
|
* @private. Passed through and works as expected.
|
|
115
117
|
*/
|
|
@@ -120,8 +122,6 @@ declare namespace HeadCell {
|
|
|
120
122
|
onRequestResize: PropTypes.Requireable<(...args: any[]) => any>;
|
|
121
123
|
onSort: PropTypes.Requireable<(...args: any[]) => any>;
|
|
122
124
|
resizable: PropTypes.Requireable<boolean>;
|
|
123
|
-
/** @private. */
|
|
124
|
-
showGuideline: PropTypes.Requireable<string>;
|
|
125
125
|
sortDir: PropTypes.Requireable<string>;
|
|
126
126
|
sortKey: PropTypes.Requireable<string>;
|
|
127
127
|
truncate: PropTypes.Requireable<boolean>;
|
|
@@ -134,10 +134,8 @@ declare namespace HeadCell {
|
|
|
134
134
|
*/
|
|
135
135
|
visible: PropTypes.Requireable<boolean>;
|
|
136
136
|
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
137
|
-
/** @private. */
|
|
138
|
-
zIndex: PropTypes.Requireable<number>;
|
|
139
137
|
};
|
|
140
138
|
var splunkUiType: string;
|
|
141
139
|
}
|
|
142
140
|
export default HeadCell;
|
|
143
|
-
export {
|
|
141
|
+
export { HeadCellKeyDownHandler, HeadCellRequestMoveColumnHandler, HeadCellSortDir, HeadCellSortHandler, };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { UniqueIdentifier } from '@dnd-kit/core';
|
|
3
4
|
import { HeadAutosizeColumnHandler, HeadRequestMoveColumnHandler, HeadRequestResizeColumnHandler } from './Head';
|
|
4
|
-
import {
|
|
5
|
+
import { HeadCellKeyDownHandler } from './HeadCell';
|
|
5
6
|
import { ComponentProps } from '../utils/types';
|
|
6
7
|
/** @public */
|
|
7
8
|
type HeadDropdownCellPossibleCloseReason = 'clickAway' | 'contentClick' | 'escapeKey' | 'offScreen' | 'tabKey' | 'toggleClick';
|
|
8
9
|
type HeadDropdownCellAutosizeColumnHandler = HeadAutosizeColumnHandler;
|
|
9
|
-
type HeadDropdownCellDragStartHandler = HeadCellDragStartHandler;
|
|
10
10
|
type HeadDropdownCellKeyDownHandler = HeadCellKeyDownHandler;
|
|
11
11
|
/** @public */
|
|
12
|
-
type HeadDropdownCellRequestCloseHandler = (event: React.MouseEvent<
|
|
13
|
-
columnId
|
|
12
|
+
type HeadDropdownCellRequestCloseHandler = (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement> | React.KeyboardEvent<HTMLDivElement | HTMLButtonElement> | MouseEvent | KeyboardEvent | TouchEvent | undefined, data: {
|
|
13
|
+
columnId?: string;
|
|
14
14
|
index: number;
|
|
15
15
|
reason: HeadDropdownCellPossibleCloseReason;
|
|
16
16
|
}) => void;
|
|
17
17
|
type HeadDropdownCellRequestMoveColumnHandler = HeadRequestMoveColumnHandler;
|
|
18
18
|
/** @public */
|
|
19
|
-
type HeadDropdownCellRequestOpenHandler = (event: React.MouseEvent<
|
|
20
|
-
columnId
|
|
19
|
+
type HeadDropdownCellRequestOpenHandler = (event: React.MouseEvent<HTMLButtonElement | HTMLDivElement> | React.KeyboardEvent<HTMLButtonElement | HTMLDivElement>, data: {
|
|
20
|
+
columnId?: string;
|
|
21
21
|
index: number;
|
|
22
22
|
reason: 'toggleClick';
|
|
23
23
|
}) => void;
|
|
@@ -40,13 +40,22 @@ interface HeadDropdownCellPropsBase {
|
|
|
40
40
|
*/
|
|
41
41
|
closeReasons?: HeadDropdownCellPossibleCloseReason[];
|
|
42
42
|
/**
|
|
43
|
-
* An id that
|
|
43
|
+
* An id that is passed to the `onSort` callback and as `Table`'s `onRequestResizeColumn` callback.
|
|
44
44
|
*/
|
|
45
|
-
columnId?:
|
|
45
|
+
columnId?: string;
|
|
46
|
+
/** @private. */
|
|
47
|
+
dragId?: UniqueIdentifier;
|
|
46
48
|
/**
|
|
47
49
|
* A React ref which is set to the DOM element when the component mounts and null when it unmounts.
|
|
48
50
|
*/
|
|
49
51
|
elementRef?: React.Ref<HTMLTableCellElement>;
|
|
52
|
+
/**
|
|
53
|
+
* A string used to generate the `aria-label` for the head cell during column reordering.
|
|
54
|
+
*
|
|
55
|
+
* When the `label` prop is not a string, providing `headCellScreenReaderText` is recommended
|
|
56
|
+
* to improve the screen reader announcements during the reordering interaction.
|
|
57
|
+
*/
|
|
58
|
+
headCellScreenReaderText?: string;
|
|
50
59
|
/**
|
|
51
60
|
* An array of reasons for which to set focus on the toggle. Only subset of `closeReasons`
|
|
52
61
|
* will be honored. When Menu.Items open a Modal or other dialog, it may be necessary to
|
|
@@ -62,8 +71,6 @@ interface HeadDropdownCellPropsBase {
|
|
|
62
71
|
label?: React.ReactNode;
|
|
63
72
|
/** @private. */
|
|
64
73
|
onAutosizeColumn?: HeadDropdownCellAutosizeColumnHandler;
|
|
65
|
-
/** @private. */
|
|
66
|
-
onDragStart?: HeadDropdownCellDragStartHandler;
|
|
67
74
|
/**
|
|
68
75
|
* @private. This will be passed through, and will work as expected.
|
|
69
76
|
*/
|
|
@@ -103,8 +110,6 @@ interface HeadDropdownCellPropsBase {
|
|
|
103
110
|
* so this is only necessary when the popover contains other types of content.
|
|
104
111
|
*/
|
|
105
112
|
retainFocus?: boolean;
|
|
106
|
-
/** @private. */
|
|
107
|
-
showGuideline?: 'none' | 'before' | 'after';
|
|
108
113
|
/**
|
|
109
114
|
* When true, the Popover will automatically take focus when 'open' changes to true.
|
|
110
115
|
* Disable this for a Popover that has shows on hover, such as a tooltip.
|
|
@@ -127,14 +132,9 @@ interface HeadDropdownCellPropsBase {
|
|
|
127
132
|
* The width of the column in pixels.
|
|
128
133
|
*/
|
|
129
134
|
width?: number;
|
|
130
|
-
/**
|
|
131
|
-
* @private
|
|
132
|
-
* Used internally to manage overlapping head cell elements, i.e. drag handle
|
|
133
|
-
*/
|
|
134
|
-
zIndex?: number;
|
|
135
135
|
}
|
|
136
136
|
type HeadDropdownCellProps = ComponentProps<HeadDropdownCellPropsBase, 'th'>;
|
|
137
|
-
declare function HeadDropdownCell({ align, canCoverHead, children, closeReasons, columnId, elementRef, focusToggleReasons, id, index,
|
|
137
|
+
declare function HeadDropdownCell({ align, buttonRef, canCoverHead, children, closeReasons, columnId, dragId, elementRef, headCellScreenReaderText, focusToggleReasons, id, index, label, onAutosizeColumn, onKeyDown, onRequestClose, onRequestMoveColumn, onRequestOpen, onRequestResize, open, repositionMode, resizable, retainFocus, style, takeFocus, truncate, variant, visible, width, ...otherProps }: HeadDropdownCellProps): React.JSX.Element;
|
|
138
138
|
declare namespace HeadDropdownCell {
|
|
139
139
|
var propTypes: {
|
|
140
140
|
align: PropTypes.Requireable<string>;
|
|
@@ -142,16 +142,17 @@ declare namespace HeadDropdownCell {
|
|
|
142
142
|
canCoverHead: PropTypes.Requireable<boolean>;
|
|
143
143
|
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
144
144
|
closeReasons: PropTypes.Requireable<(HeadDropdownCellPossibleCloseReason | null | undefined)[]>;
|
|
145
|
-
columnId: PropTypes.Requireable<
|
|
145
|
+
columnId: PropTypes.Requireable<string>;
|
|
146
|
+
/** @private. */
|
|
147
|
+
dragId: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
146
148
|
elementRef: PropTypes.Requireable<object>;
|
|
149
|
+
headCellScreenReaderText: PropTypes.Requireable<string>;
|
|
147
150
|
focusToggleReasons: PropTypes.Requireable<(HeadDropdownCellPossibleCloseReason | null | undefined)[]>;
|
|
148
151
|
/** @private The index of the cell, skipping the info column. */
|
|
149
152
|
index: PropTypes.Requireable<number>;
|
|
150
153
|
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
151
154
|
/** @private. */
|
|
152
155
|
onAutosizeColumn: PropTypes.Requireable<(...args: any[]) => any>;
|
|
153
|
-
/** @private. */
|
|
154
|
-
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
155
156
|
/**
|
|
156
157
|
* @private. This will be passed through, and will work as expected.
|
|
157
158
|
*/
|
|
@@ -166,8 +167,6 @@ declare namespace HeadDropdownCell {
|
|
|
166
167
|
repositionMode: PropTypes.Requireable<string>;
|
|
167
168
|
resizable: PropTypes.Requireable<boolean>;
|
|
168
169
|
retainFocus: PropTypes.Requireable<boolean>;
|
|
169
|
-
/** @private. */
|
|
170
|
-
showGuideline: PropTypes.Requireable<string>;
|
|
171
170
|
takeFocus: PropTypes.Requireable<boolean>;
|
|
172
171
|
truncate: PropTypes.Requireable<boolean>;
|
|
173
172
|
/**
|
|
@@ -179,11 +178,9 @@ declare namespace HeadDropdownCell {
|
|
|
179
178
|
width: PropTypes.Requireable<number>;
|
|
180
179
|
/** @private. */
|
|
181
180
|
variant: PropTypes.Requireable<string>;
|
|
182
|
-
/** @private. */
|
|
183
|
-
zIndex: PropTypes.Requireable<number>;
|
|
184
181
|
};
|
|
185
182
|
var splunkUiType: string;
|
|
186
183
|
var possibleCloseReasons: HeadDropdownCellPossibleCloseReason[];
|
|
187
184
|
}
|
|
188
185
|
export default HeadDropdownCell;
|
|
189
|
-
export {
|
|
186
|
+
export { HeadDropdownCellPossibleCloseReason, HeadDropdownCellRequestCloseHandler, HeadDropdownCellRequestMoveColumnHandler, HeadDropdownCellRequestOpenHandler, };
|
|
@@ -3,12 +3,11 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
|
4
4
|
import { HeadAutosizeColumnHandler, HeadRequestResizeColumnHandler } from './Head';
|
|
5
5
|
type HeadInnerAutosizeColumnHandler = HeadAutosizeColumnHandler;
|
|
6
|
-
type HeadInnerDragStartHandler = (index: number | undefined, columnId: any) => void;
|
|
7
6
|
type HeadInnerRequestResizeHandler = HeadRequestResizeColumnHandler;
|
|
8
7
|
interface HeadInnerPropsBase {
|
|
9
8
|
align?: 'left' | 'center' | 'right';
|
|
10
9
|
clickable?: boolean;
|
|
11
|
-
columnId?:
|
|
10
|
+
columnId?: string;
|
|
12
11
|
elementRef?: React.Ref<HTMLButtonElement | HTMLDivElement>;
|
|
13
12
|
focusWithin?: boolean;
|
|
14
13
|
id?: string;
|
|
@@ -16,8 +15,6 @@ interface HeadInnerPropsBase {
|
|
|
16
15
|
isMenu?: boolean;
|
|
17
16
|
label?: React.ReactNode;
|
|
18
17
|
onAutosizeColumn?: HeadInnerAutosizeColumnHandler;
|
|
19
|
-
onDragEnd?: () => void;
|
|
20
|
-
onDragStart?: HeadInnerDragStartHandler;
|
|
21
18
|
onRequestResize?: HeadInnerRequestResizeHandler;
|
|
22
19
|
resizable?: boolean;
|
|
23
20
|
sortDir?: 'none' | 'asc' | 'desc';
|
|
@@ -25,13 +22,13 @@ interface HeadInnerPropsBase {
|
|
|
25
22
|
width?: number | 'auto';
|
|
26
23
|
variant?: 'toggleAll' | 'info' | 'actions';
|
|
27
24
|
}
|
|
28
|
-
type HeadInnerProps = ComponentProps<HeadInnerPropsBase, '
|
|
29
|
-
declare function HeadInner({
|
|
25
|
+
type HeadInnerProps = ComponentProps<HeadInnerPropsBase, 'div'>;
|
|
26
|
+
declare function HeadInner({ align, clickable, columnId, elementRef, focusWithin, id, index, isMenu, label, onAutosizeColumn, onRequestResize, resizable, sortDir, truncate, variant, width: widthProp, ...otherProps }: HeadInnerProps): React.JSX.Element;
|
|
30
27
|
declare namespace HeadInner {
|
|
31
28
|
var propTypes: {
|
|
32
29
|
align: PropTypes.Requireable<string>;
|
|
33
30
|
clickable: PropTypes.Requireable<boolean>;
|
|
34
|
-
columnId: PropTypes.Requireable<
|
|
31
|
+
columnId: PropTypes.Requireable<string>;
|
|
35
32
|
elementRef: PropTypes.Requireable<object>;
|
|
36
33
|
focusWithin: PropTypes.Requireable<boolean>;
|
|
37
34
|
id: PropTypes.Requireable<string>;
|
|
@@ -39,8 +36,6 @@ declare namespace HeadInner {
|
|
|
39
36
|
isMenu: PropTypes.Requireable<boolean>;
|
|
40
37
|
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
41
38
|
onAutosizeColumn: PropTypes.Requireable<(...args: any[]) => any>;
|
|
42
|
-
onDragEnd: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
-
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
44
39
|
onRequestResize: PropTypes.Requireable<(...args: any[]) => any>;
|
|
45
40
|
resizable: PropTypes.Requireable<boolean>;
|
|
46
41
|
sortDir: PropTypes.Requireable<string>;
|
|
@@ -50,4 +45,3 @@ declare namespace HeadInner {
|
|
|
50
45
|
};
|
|
51
46
|
}
|
|
52
47
|
export default HeadInner;
|
|
53
|
-
export { HeadInnerDragStartHandler };
|
package/types/src/Table/Row.d.ts
CHANGED
|
@@ -33,12 +33,12 @@ interface RowPropsBase {
|
|
|
33
33
|
children?: React.ReactNode;
|
|
34
34
|
/** This data is returned with the onClick and toggle events as the second argument. */
|
|
35
35
|
data?: any;
|
|
36
|
-
/** @private. Generally passed by Table rather than added directly. */
|
|
37
|
-
dataId?: string | number;
|
|
38
36
|
/** Indicates whether the row selection is disabled. */
|
|
39
37
|
disabled?: boolean;
|
|
40
38
|
/** @private. Generally passed by Table rather than added directly. */
|
|
41
|
-
|
|
39
|
+
isDraggable?: boolean;
|
|
40
|
+
/** @private. Generally passed by Table rather than added directly. */
|
|
41
|
+
dragId?: string | number;
|
|
42
42
|
/**
|
|
43
43
|
* A React ref which is set to the DOM element when the component mounts and null when it unmounts.
|
|
44
44
|
*/
|
|
@@ -103,11 +103,11 @@ declare namespace Row {
|
|
|
103
103
|
actionsSecondary: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
104
104
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
105
105
|
data: PropTypes.Requireable<any>;
|
|
106
|
-
/** @private. Generally passed by Table rather than added directly. */
|
|
107
|
-
dataId: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
108
106
|
disabled: PropTypes.Requireable<boolean>;
|
|
109
107
|
/** @private. Generally passed by Table rather than added directly. */
|
|
110
|
-
|
|
108
|
+
isDraggable: PropTypes.Requireable<boolean>;
|
|
109
|
+
/** @private. Generally passed by Table rather than added directly. */
|
|
110
|
+
dragId: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
111
111
|
elementRef: PropTypes.Requireable<object>;
|
|
112
112
|
/** @private. */
|
|
113
113
|
expandable: PropTypes.Requireable<boolean>;
|
|
@@ -10,19 +10,17 @@ import Row, { RowActionPrimaryClickHandler, RowActionSecondaryClickHandler, RowC
|
|
|
10
10
|
import { ComponentProps } from '../utils/types';
|
|
11
11
|
/** @public */
|
|
12
12
|
type TableRequestMoveColumnHandler = (data: {
|
|
13
|
-
columnId: any;
|
|
14
13
|
fromIndex: number;
|
|
15
14
|
toIndex: number;
|
|
16
15
|
}) => void;
|
|
17
16
|
/** @public */
|
|
18
17
|
type TableRequestMoveRowHandler = (data: {
|
|
19
|
-
dataId?: string | number;
|
|
20
18
|
fromIndex: number;
|
|
21
19
|
toIndex: number;
|
|
22
20
|
}) => void;
|
|
23
21
|
/** @public */
|
|
24
22
|
type TableRequestResizeColumnHandler = (event: React.MouseEvent<HTMLHRElement> | React.KeyboardEvent<HTMLHRElement> | MouseEvent, data: {
|
|
25
|
-
columnId
|
|
23
|
+
columnId?: string;
|
|
26
24
|
id?: string;
|
|
27
25
|
index: number;
|
|
28
26
|
width: number;
|
|
@@ -87,7 +85,7 @@ interface TablePropsBase {
|
|
|
87
85
|
*
|
|
88
86
|
* * `single`: Only one row can be expanded at a time. If another expansion button is
|
|
89
87
|
* clicked, the currently expanded row closes and the new one opens.
|
|
90
|
-
* * `multi`: Allows
|
|
88
|
+
* * `multi`: Allows multiple rows to be expanded at the same time.
|
|
91
89
|
* * `controlled`: Allows the expanded state to be externally managed by `expanded` prop of `Row`.
|
|
92
90
|
* * `none`: The default with no row expansion.
|
|
93
91
|
*/
|
|
@@ -115,10 +113,7 @@ interface TablePropsBase {
|
|
|
115
113
|
onRequestMoveColumn?: TableRequestMoveColumnHandler;
|
|
116
114
|
/**
|
|
117
115
|
* An event handler to handle the reorder rows action of Table. The function is passed an
|
|
118
|
-
* options object with `
|
|
119
|
-
*
|
|
120
|
-
* This property requires a unique `key` to be passed to `Table.Row`.
|
|
121
|
-
* Using the row index as the `key` will lead to issues with animations and focus restoration.
|
|
116
|
+
* options object with `fromIndex` and `toIndex`.
|
|
122
117
|
*/
|
|
123
118
|
onRequestMoveRow?: TableRequestMoveRowHandler;
|
|
124
119
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { PopoverPossibleCloseReason } from '@splunk/react-ui/Popover';
|
|
4
|
+
import { ComponentProps } from '../utils/types';
|
|
5
5
|
/** @public */
|
|
6
6
|
type openReasons = 'focusToggle' | 'mouseEnterPopover' | 'mouseEnterToggle' | 'mouseEnterHitArea';
|
|
7
7
|
/** @public */
|
|
@@ -116,66 +116,34 @@ interface TooltipPropsBase {
|
|
|
116
116
|
* @param {function} props.elementRef
|
|
117
117
|
*/
|
|
118
118
|
renderAnchor?: (props: AnchorProps) => React.ReactNode;
|
|
119
|
-
/** @private */
|
|
120
|
-
splunkTheme: AnyTheme;
|
|
121
|
-
}
|
|
122
|
-
type TooltipProps = ClassComponentProps<TooltipPropsBase, typeof defaultProps, 'span'>;
|
|
123
|
-
declare const defaultProps: Required<Pick<TooltipPropsBase, 'closeDelay' | 'closeWhen' | 'defaultPlacement' | 'inline' | 'openDelay'>>;
|
|
124
|
-
interface TooltipState {
|
|
125
|
-
open: boolean;
|
|
126
|
-
anchorEl: HTMLSpanElement | null;
|
|
127
|
-
hitAreaEl: SVGElement | null;
|
|
128
|
-
popoverEl: HTMLDivElement | null;
|
|
129
|
-
popoverOuterEl: HTMLDivElement | null;
|
|
130
119
|
}
|
|
120
|
+
declare const closeReasons: PopoverPossibleCloseReason[];
|
|
121
|
+
type TooltipProps = ComponentProps<TooltipPropsBase, 'span'>;
|
|
131
122
|
/**
|
|
132
123
|
* The Tooltip component wraps arbitrary content to be displayed when the target element is hovered
|
|
133
124
|
* or focused.
|
|
134
125
|
*/
|
|
135
|
-
declare
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
private handleMouseMoveHitAreaImpl;
|
|
156
|
-
private handleMouseMoveHitArea;
|
|
157
|
-
private handleClick;
|
|
158
|
-
private handleFocus;
|
|
159
|
-
private handleBlur;
|
|
160
|
-
private handlePopoverOnRequestClose;
|
|
161
|
-
private handleRequestClose;
|
|
162
|
-
private handleRequestOpen;
|
|
163
|
-
private isControlled;
|
|
164
|
-
private isOpen;
|
|
165
|
-
private handleRenderPropAnchorMount;
|
|
166
|
-
private createAnchor;
|
|
167
|
-
render(): React.JSX.Element;
|
|
126
|
+
declare function Tooltip({ appearance, children, closeDelay, closeWhen, content, contentRelationship, defaultPlacement, elementRef, inline, onRequestClose, onRequestOpen, open: openProp, openDelay, renderAnchor, ...otherProps }: TooltipProps): React.JSX.Element;
|
|
127
|
+
declare namespace Tooltip {
|
|
128
|
+
var propTypes: {
|
|
129
|
+
/** @private */
|
|
130
|
+
appearance: PropTypes.Requireable<string>;
|
|
131
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
132
|
+
closeDelay: PropTypes.Requireable<number>;
|
|
133
|
+
/** @private */
|
|
134
|
+
closeWhen: PropTypes.Requireable<string>;
|
|
135
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
136
|
+
contentRelationship: PropTypes.Requireable<string>;
|
|
137
|
+
defaultPlacement: PropTypes.Requireable<string>;
|
|
138
|
+
elementRef: PropTypes.Requireable<object>;
|
|
139
|
+
inline: PropTypes.Requireable<boolean>;
|
|
140
|
+
onRequestClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
141
|
+
onRequestOpen: PropTypes.Requireable<(...args: any[]) => any>;
|
|
142
|
+
open: PropTypes.Requireable<boolean>;
|
|
143
|
+
openDelay: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
144
|
+
renderAnchor: PropTypes.Requireable<(...args: any[]) => any>;
|
|
145
|
+
};
|
|
168
146
|
}
|
|
169
|
-
|
|
170
|
-
inline?: boolean | undefined;
|
|
171
|
-
defaultPlacement?: "left" | "right" | "above" | "below" | undefined;
|
|
172
|
-
closeDelay?: number | undefined;
|
|
173
|
-
closeWhen?: "default" | "notOnClick" | undefined;
|
|
174
|
-
openDelay?: number | "primary" | "secondary" | undefined;
|
|
175
|
-
} & {} & {
|
|
176
|
-
ref?: React.Ref<Tooltip> | undefined;
|
|
177
|
-
}, "splunkTheme">>;
|
|
178
|
-
export default TooltipWithTheme;
|
|
179
|
-
export type { Tooltip as TooltipWithoutTheme };
|
|
147
|
+
export default Tooltip;
|
|
180
148
|
export { TooltipRequestCloseHandler, TooltipRequestOpenHandler };
|
|
181
149
|
export type { TooltipPropsBase };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { TooltipRequestCloseHandler, TooltipRequestOpenHandler } from '@splunk/react-ui/Tooltip';
|
|
3
|
-
declare class Controlled extends Component<
|
|
3
|
+
declare class Controlled extends Component<object, {
|
|
4
4
|
open: boolean;
|
|
5
5
|
reason: string;
|
|
6
6
|
}> {
|
|
7
|
-
constructor(props:
|
|
7
|
+
constructor(props: object);
|
|
8
8
|
handleRequestOpen: TooltipRequestOpenHandler;
|
|
9
9
|
handleRequestClose: TooltipRequestCloseHandler;
|
|
10
10
|
render(): React.JSX.Element;
|
|
@@ -4,14 +4,6 @@ import { TypographyVariant, TypographyParams } from '@splunk/themes/mixins';
|
|
|
4
4
|
import { ComponentProps } from '../utils/types';
|
|
5
5
|
type TypographyElementTypes = 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'blockquote' | 'dd' | 'dl' | 'dt' | 'figcaption' | 'figure' | 'li' | 'ol' | 'ul' | 'pre' | 'abbr' | 'cite' | 'code' | 'data' | 'dfn' | 'em' | 'u' | 'time' | 'sup' | 'sub' | 'strong' | 'small' | 'samp' | 's' | 'var' | 'ruby' | 'rt' | 'rp';
|
|
6
6
|
interface TypographyPropsBase extends TypographyParams {
|
|
7
|
-
/**
|
|
8
|
-
* Text and inline icons
|
|
9
|
-
* */
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
/**
|
|
12
|
-
* A React ref which is set to the DOM element when the component mounts, and null when it unmounts.
|
|
13
|
-
*/
|
|
14
|
-
elementRef?: React.Ref<HTMLElement>;
|
|
15
7
|
/**
|
|
16
8
|
* Tag for the element to render children content into.
|
|
17
9
|
* Use the most semantically appropriate tag.
|
|
@@ -19,26 +11,34 @@ interface TypographyPropsBase extends TypographyParams {
|
|
|
19
11
|
*/
|
|
20
12
|
as: TypographyElementTypes;
|
|
21
13
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
14
|
+
* Text and inline icons
|
|
15
|
+
* */
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Set the color to a system-standard color: e.g. `active` for `@splunk/themes/variables.contentColorActive`.
|
|
24
19
|
*/
|
|
25
|
-
|
|
20
|
+
color?: 'active' | 'default' | 'disabled' | 'inverted' | 'muted' | 'inherit';
|
|
26
21
|
/**
|
|
27
|
-
*
|
|
22
|
+
* A React ref which is set to the DOM element when the component mounts, and null when it unmounts.
|
|
28
23
|
*/
|
|
29
|
-
|
|
24
|
+
elementRef?: React.Ref<HTMLElement>;
|
|
30
25
|
/**
|
|
31
|
-
* Set the
|
|
26
|
+
* Set the font-family to sans-serif or monospace based on current theme.
|
|
32
27
|
*/
|
|
33
|
-
|
|
28
|
+
family?: 'sansSerif' | 'monospace' | 'title';
|
|
34
29
|
/**
|
|
35
30
|
* Set the line-height to a system-standard size.
|
|
36
31
|
*/
|
|
37
32
|
lineHeight?: 'single' | 'tight' | 'snug' | 'comfortable' | 'relaxed' | 'spacious' | 'normal';
|
|
38
33
|
/**
|
|
39
|
-
* Set the
|
|
34
|
+
* Set the size to a system-standard size.
|
|
40
35
|
*/
|
|
41
|
-
|
|
36
|
+
size?: 24 | 20 | 18 | 16 | 14 | 12;
|
|
37
|
+
/**
|
|
38
|
+
* A variant from the Splunk Design System's Type: 'body', 'title1', 'title2', 'title3',
|
|
39
|
+
* 'title4', 'title5', 'title6', 'largeBody', 'smallBody', 'monoBody', or 'monoSmallBody'.
|
|
40
|
+
*/
|
|
41
|
+
variant?: TypographyVariant;
|
|
42
42
|
/**
|
|
43
43
|
* Set the font-weight to a system-standard value.
|
|
44
44
|
*
|
|
@@ -46,23 +46,28 @@ interface TypographyPropsBase extends TypographyParams {
|
|
|
46
46
|
* See: [font-weight | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#common_weight_name_mapping)
|
|
47
47
|
*/
|
|
48
48
|
weight?: 'light' | 'normal' | 'semiBold' | 'bold' | 'extraBold' | 'heavy';
|
|
49
|
+
/**
|
|
50
|
+
* Remove all browser-default styles and apply theme-specific defaults.
|
|
51
|
+
*/
|
|
52
|
+
withReset?: boolean;
|
|
49
53
|
}
|
|
50
54
|
type TypographyProps = ComponentProps<TypographyPropsBase, TypographyElementTypes>;
|
|
51
55
|
/**
|
|
52
56
|
* Typography renders text content with styling based on the Splunk Design System.
|
|
53
57
|
*/
|
|
54
|
-
export declare function Typography({ children,
|
|
58
|
+
export declare function Typography({ as, children, color, elementRef, family, lineHeight, size, variant, weight, withReset, ...otherProps }: TypographyProps): React.JSX.Element;
|
|
55
59
|
export declare namespace Typography {
|
|
56
60
|
var propTypes: {
|
|
57
|
-
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
58
61
|
as: PropTypes.Validator<string>;
|
|
62
|
+
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
63
|
+
color: PropTypes.Requireable<string>;
|
|
59
64
|
elementRef: PropTypes.Requireable<object>;
|
|
60
65
|
family: PropTypes.Requireable<string>;
|
|
61
|
-
variant: PropTypes.Requireable<"body" | "title1" | "title2" | "title3" | "title4" | "title5" | "title6" | "largeBody" | "smallBody" | "monoBody" | "monoSmallBody">;
|
|
62
|
-
size: PropTypes.Requireable<number>;
|
|
63
66
|
lineHeight: PropTypes.Requireable<string>;
|
|
64
|
-
|
|
67
|
+
size: PropTypes.Requireable<number>;
|
|
68
|
+
variant: PropTypes.Requireable<"body" | "title1" | "title2" | "title3" | "title4" | "title5" | "title6" | "largeBody" | "smallBody" | "monoBody" | "monoSmallBody">;
|
|
65
69
|
weight: PropTypes.Requireable<string>;
|
|
70
|
+
withReset: PropTypes.Requireable<boolean>;
|
|
66
71
|
};
|
|
67
72
|
}
|
|
68
73
|
export default Typography;
|