@splunk/react-ui 5.0.0-beta.2 → 5.0.0-beta.4

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.
Files changed (187) hide show
  1. package/Accordion.js +185 -243
  2. package/Animation.js +2 -2
  3. package/Button.js +4 -4
  4. package/ButtonGroup.js +10 -11
  5. package/ButtonSimple.js +48 -42
  6. package/CHANGELOG.md +26 -0
  7. package/CHANGELOG.v5.mdx +81 -0
  8. package/Calendar.js +352 -469
  9. package/Card.js +178 -321
  10. package/Chip.js +154 -296
  11. package/Clickable.js +30 -30
  12. package/Code.js +64 -49
  13. package/Color.js +546 -462
  14. package/ComboBox.js +575 -767
  15. package/Date.js +144 -136
  16. package/Divider.js +29 -26
  17. package/DualListbox.js +441 -444
  18. package/File.js +707 -981
  19. package/FormRows.js +260 -286
  20. package/Image.js +124 -251
  21. package/JSONTree.js +129 -129
  22. package/Layout.d.ts +2 -0
  23. package/Link.js +12 -12
  24. package/MIGRATION.mdx +22 -1
  25. package/MIGRATION.v5.mdx +12 -1
  26. package/Menu.js +76 -76
  27. package/Message.js +77 -100
  28. package/MessageBar.js +141 -251
  29. package/Modal.js +42 -40
  30. package/ModalLayer.js +12 -12
  31. package/Multiselect.js +1989 -2362
  32. package/NonInteractiveCheckbox.js +30 -118
  33. package/Number.js +75 -73
  34. package/Popover.js +348 -350
  35. package/Progress.js +1 -1
  36. package/RadioBar.js +136 -136
  37. package/Resize.js +62 -65
  38. package/Scroll.js +2 -2
  39. package/Select.js +281 -283
  40. package/SidePanel.js +53 -55
  41. package/Slider.js +370 -364
  42. package/SlidingPanels.js +100 -102
  43. package/SplitButton.js +170 -343
  44. package/StaticContent.js +15 -13
  45. package/StepBar.js +61 -60
  46. package/Switch.js +150 -164
  47. package/TabBar.js +544 -417
  48. package/Table.js +1711 -1540
  49. package/Text.js +28 -26
  50. package/TextArea.js +26 -26
  51. package/Tooltip.js +416 -562
  52. package/TransitionOpen.js +179 -158
  53. package/Tree.d.ts +2 -0
  54. package/WaitSpinner.js +1 -1
  55. package/package.json +7 -9
  56. package/types/src/Accordion/Accordion.d.ts +14 -21
  57. package/types/src/Accordion/AccordionContext.d.ts +0 -1
  58. package/types/src/Animation/Animation.d.ts +2 -3
  59. package/types/src/AnimationToggle/docs/examples/Provider.d.ts +2 -2
  60. package/types/src/AnimationToggle/docs/examples/ToggleComponent.d.ts +2 -2
  61. package/types/src/AnimationToggle/useAnimationToggle.d.ts +1 -1
  62. package/types/src/Button/Button.d.ts +2 -2
  63. package/types/src/ButtonGroup/ButtonGroupContext.d.ts +0 -1
  64. package/types/src/ButtonSimple/ButtonSimple.d.ts +1 -3
  65. package/types/src/ButtonSimple/mixin.d.ts +1 -1
  66. package/types/src/Calendar/Calendar.d.ts +2 -2
  67. package/types/src/Calendar/{DateTable.d.ts → DateGrid.d.ts} +9 -9
  68. package/types/src/Calendar/Day.d.ts +8 -4
  69. package/types/src/Card/Card.d.ts +27 -14
  70. package/types/src/CardLayout/CardLayoutContext.d.ts +0 -1
  71. package/types/src/CardLayout/docs/examples/Interactive.d.ts +2 -2
  72. package/types/src/Clickable/Clickable.d.ts +1 -1
  73. package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +0 -1
  74. package/types/src/Color/Color.d.ts +3 -3
  75. package/types/src/Color/ColorInput.d.ts +27 -0
  76. package/types/src/Color/Palette.d.ts +11 -18
  77. package/types/src/Color/Swatch.d.ts +3 -1
  78. package/types/src/ComboBox/ComboBox.d.ts +46 -50
  79. package/types/src/ComboBox/Option.d.ts +34 -18
  80. package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +2 -2
  81. package/types/src/Date/Date.d.ts +3 -2
  82. package/types/src/Date/docs/examples/Controlled.d.ts +2 -2
  83. package/types/src/Date/docs/examples/HighlightToday.d.ts +2 -2
  84. package/types/src/DefinitionList/DefinitionListContext.d.ts +0 -1
  85. package/types/src/Divider/Divider.d.ts +14 -6
  86. package/types/src/Divider/docs/examples/Appearance.d.ts +3 -0
  87. package/types/src/DualListbox/DualListbox.d.ts +5 -1
  88. package/types/src/File/File.d.ts +6 -6
  89. package/types/src/File/FileContext.d.ts +0 -1
  90. package/types/src/File/Item.d.ts +11 -3
  91. package/types/src/File/ItemIcon.d.ts +7 -0
  92. package/types/src/File/docs/examples/Disabled.d.ts +2 -2
  93. package/types/src/File/docs/examples/DropAnywhere.d.ts +2 -2
  94. package/types/src/File/docs/examples/Multi.d.ts +2 -2
  95. package/types/src/File/docs/examples/Single.d.ts +2 -2
  96. package/types/src/FormRows/FormRows.d.ts +8 -8
  97. package/types/src/FormRows/FormRowsContext.d.ts +1 -2
  98. package/types/src/FormRows/Row.d.ts +2 -2
  99. package/types/src/FormRows/RowInternal.d.ts +1 -1
  100. package/types/src/FormRows/SortableRow.d.ts +3 -3
  101. package/types/src/FormRows/docs/examples/Basic.d.ts +2 -2
  102. package/types/src/FormRows/docs/examples/Header.d.ts +2 -2
  103. package/types/src/FormRows/docs/examples/Menu.d.ts +2 -2
  104. package/types/src/FormRows/docs/examples/ReorderOnly.d.ts +2 -2
  105. package/types/src/Image/Image.d.ts +1 -4
  106. package/types/src/JSONTree/docs/examples/Events.d.ts +2 -2
  107. package/types/src/Layout/Layout.d.ts +1 -0
  108. package/types/src/Link/icons/External.d.ts +1 -2
  109. package/types/src/Menu/Divider.d.ts +1 -1
  110. package/types/src/Menu/MenuContext.d.ts +0 -1
  111. package/types/src/MessageBar/MessageBar.d.ts +5 -1
  112. package/types/src/Modal/ModalContext.d.ts +0 -1
  113. package/types/src/Multiselect/Compact.d.ts +49 -21
  114. package/types/src/Multiselect/Multiselect.d.ts +73 -30
  115. package/types/src/Multiselect/Normal.d.ts +46 -57
  116. package/types/src/Multiselect/Option.d.ts +42 -18
  117. package/types/src/Multiselect/docs/examples/Children.d.ts +2 -2
  118. package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -2
  119. package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -2
  120. package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -2
  121. package/types/src/Multiselect/docs/examples/Error.d.ts +2 -2
  122. package/types/src/Multiselect/docs/examples/Fetching.d.ts +2 -2
  123. package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -2
  124. package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -2
  125. package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -2
  126. package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +9 -8
  127. package/types/src/Number/Number.d.ts +1 -0
  128. package/types/src/Number/docs/examples/Basic.d.ts +2 -2
  129. package/types/src/Number/docs/examples/Limits.d.ts +2 -2
  130. package/types/src/Number/docs/examples/Locale.d.ts +2 -2
  131. package/types/src/Popover/Popover.d.ts +1 -1
  132. package/types/src/Popover/PopoverMenuContext.d.ts +0 -1
  133. package/types/src/RadioBar/RadioBar.d.ts +1 -1
  134. package/types/src/RadioBar/RadioBarContext.d.ts +0 -1
  135. package/types/src/RadioList/RadioListContext.d.ts +0 -1
  136. package/types/src/Scroll/Inner.d.ts +1 -1
  137. package/types/src/Scroll/docs/examples/Controlled.d.ts +2 -2
  138. package/types/src/Search/Search.d.ts +2 -2
  139. package/types/src/Select/SelectBase.d.ts +2 -2
  140. package/types/src/SidePanel/SidePanel.d.ts +8 -3
  141. package/types/src/Slider/Slider.d.ts +1 -1
  142. package/types/src/Slider/docs/examples/Controlled.d.ts +2 -2
  143. package/types/src/Slider/docs/examples/CustomLabels.d.ts +2 -2
  144. package/types/src/Slider/getStepMarksBackground.d.ts +8 -0
  145. package/types/src/SlidingPanels/Panel.d.ts +2 -2
  146. package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -2
  147. package/types/src/SlidingPanels/docs/examples/Basic.d.ts +2 -2
  148. package/types/src/SlidingPanels/docs/examples/Dropdown.d.ts +2 -2
  149. package/types/src/SplitButton/Item.d.ts +34 -20
  150. package/types/src/SplitButton/SplitButton.d.ts +4 -1
  151. package/types/src/StaticContent/StaticContent.d.ts +3 -1
  152. package/types/src/StepBar/Step.d.ts +1 -1
  153. package/types/src/StepBar/StepBar.d.ts +1 -1
  154. package/types/src/StepBar/StepBarContext.d.ts +0 -1
  155. package/types/src/Switch/Switch.d.ts +1 -9
  156. package/types/src/Switch/docs/examples/Basic.d.ts +2 -2
  157. package/types/src/Switch/docs/examples/Disabled.d.ts +2 -2
  158. package/types/src/TabBar/Tab.d.ts +12 -5
  159. package/types/src/TabBar/TabBar.d.ts +4 -3
  160. package/types/src/TabBar/TabBarContext.d.ts +7 -2
  161. package/types/src/Table/Head.d.ts +4 -15
  162. package/types/src/Table/HeadCell.d.ts +23 -25
  163. package/types/src/Table/HeadDropdownCell.d.ts +23 -26
  164. package/types/src/Table/HeadInner.d.ts +4 -10
  165. package/types/src/Table/Row.d.ts +6 -6
  166. package/types/src/Table/Table.d.ts +3 -8
  167. package/types/src/Table/TableContext.d.ts +0 -1
  168. package/types/src/Table/Toggle.d.ts +1 -1
  169. package/types/src/Text/Text.d.ts +5 -1
  170. package/types/src/Tooltip/Tooltip.d.ts +26 -58
  171. package/types/src/Tooltip/docs/examples/Controlled.d.ts +2 -2
  172. package/types/src/TransitionOpen/TransitionOpen.d.ts +6 -1
  173. package/types/src/Tree/TreeContext.d.ts +0 -1
  174. package/types/src/useForceUpdate/useForceUpdate.d.ts +0 -1
  175. package/types/src/useResizeObserver/useResizeObserver.d.ts +2 -1
  176. package/types/src/utils/types.d.ts +2 -3
  177. package/useResizeObserver.js +26 -19
  178. package/types/src/File/Icon.d.ts +0 -3
  179. package/types/src/File/IconCloud.d.ts +0 -3
  180. package/types/src/File/PaperClip.d.ts +0 -3
  181. package/types/src/File/Retry.d.ts +0 -2
  182. package/types/src/File/Trash.d.ts +0 -3
  183. package/types/src/FormRows/icons/FormRowsPlusIcon.d.ts +0 -3
  184. package/types/src/Image/icons/Cross.d.ts +0 -3
  185. package/types/src/Multiselect/docs/examples/CompactSelectAll.d.ts +0 -3
  186. package/types/src/Table/docs/examples/prisma/DockedHeaderScrollbar.d.ts +0 -3
  187. package/types/src/Tooltip/InfoIcon.d.ts +0 -4
@@ -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 HeadCellDragStartHandler = (index: number | undefined, columnId: any) => void;
7
- type HeadCellKeyDownHandler = (event: React.KeyboardEvent<HTMLTableCellElement>, data: {
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
- type HeadCellSortHandler = (event: React.MouseEvent<HTMLTableCellElement> | React.KeyboardEvent<HTMLTableCellElement>, data: {
15
- columnId: any;
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 `id` that is returned in the draggable, sort, and resize events.
30
+ * An id that is passed to the `onSort` callback and as `Table`'s `onRequestResizeColumn` callback.
30
31
  */
31
- columnId?: any;
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, onDragStart, onKeyDown, onRequestMoveColumn, onRequestResize, onSort, resizable, showGuideline, sortDir, sortKey, style, truncate: truncateProp, variant, visible, width, zIndex, ...otherProps }: HeadCellProps): React.JSX.Element;
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<any>;
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 { HeadCellDragStartHandler, HeadCellKeyDownHandler, HeadCellRequestMoveColumnHandler, HeadCellSortDir, HeadCellSortHandler, };
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 { HeadCellDragStartHandler, HeadCellKeyDownHandler } from './HeadCell';
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<HTMLTableHeaderCellElement | HTMLDivElement> | React.KeyboardEvent<HTMLTableHeaderCellElement> | MouseEvent | KeyboardEvent | TouchEvent | undefined, data: {
13
- columnId: any;
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<HTMLTableHeaderCellElement> | React.KeyboardEvent<HTMLTableHeaderCellElement>, data: {
20
- columnId: any;
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 will be returned in the draggable, open, close and resize events.
43
+ * An id that is passed to the `onSort` callback and as `Table`'s `onRequestResizeColumn` callback.
44
44
  */
45
- columnId?: any;
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, buttonRef, label, onAutosizeColumn, onDragStart, onKeyDown, onRequestClose, onRequestMoveColumn, onRequestOpen, onRequestResize, open, repositionMode, resizable, retainFocus, showGuideline, style, takeFocus, truncate, variant, visible, width, zIndex, ...otherProps }: HeadDropdownCellProps): React.JSX.Element;
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<any>;
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 { HeadDropdownCellDragStartHandler, HeadDropdownCellPossibleCloseReason, HeadDropdownCellRequestCloseHandler, HeadDropdownCellRequestMoveColumnHandler, HeadDropdownCellRequestOpenHandler, };
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?: any;
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, 'span'>;
29
- declare function HeadInner({ index, clickable, columnId, elementRef, focusWithin, id, width: widthProp, onDragEnd, onAutosizeColumn, align, label, isMenu, onDragStart, onRequestResize, resizable, sortDir, truncate, variant, ...otherProps }: HeadInnerProps): React.JSX.Element;
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<any>;
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 };
@@ -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
- draggable?: boolean;
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
- draggable: PropTypes.Requireable<boolean>;
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: any;
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 mulitple rows to be expanded at the same time.
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 `dataId`, `fromIndex` and `toIndex`.
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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface TableContext {
3
2
  headType?: 'docked' | 'fixed' | 'inline';
4
3
  resizableFillLayout?: boolean;
@@ -7,7 +7,7 @@ interface TogglePropsBase {
7
7
  selected?: boolean | 'some';
8
8
  }
9
9
  type ToggleProps = ComponentProps<TogglePropsBase, 'button'>;
10
- declare function Toggle({ disabled, onClick, selected, ...otherProps }: ToggleProps): React.JSX.Element;
10
+ declare function Toggle({ disabled: disabledProp, onClick, selected, ...otherProps }: ToggleProps): React.JSX.Element;
11
11
  declare namespace Toggle {
12
12
  var propTypes: {
13
13
  disabled: PropTypes.Requireable<boolean>;
@@ -107,6 +107,8 @@ interface TextPropsBase {
107
107
  onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
108
108
  /** A callback for when the text selection or cursor position changes. */
109
109
  onSelect?: React.ReactEventHandler<HTMLInputElement>;
110
+ /** @private. */
111
+ placeholder?: string;
110
112
  /** Prepend removes rounded borders from the left side. */
111
113
  prepend?: boolean;
112
114
  /** @private. */
@@ -172,6 +174,8 @@ declare namespace Text {
172
174
  onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
173
175
  onSelect: PropTypes.Requireable<(...args: any[]) => any>;
174
176
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
177
+ /** @private. */
178
+ placeholder: PropTypes.Requireable<string>;
175
179
  prepend: PropTypes.Requireable<boolean>;
176
180
  /** @private. */
177
181
  required: PropTypes.Requireable<boolean>;
@@ -188,4 +192,4 @@ declare namespace Text {
188
192
  }
189
193
  export default Text;
190
194
  export { TextBlurHandler, TextChangeHandler, TextFocusHandler };
191
- export type { TextPropsBase, TextPropsBaseControlled, TextPropsBaseUncontrolled };
195
+ export type { TextProps, TextPropsBase, TextPropsBaseControlled, TextPropsBaseUncontrolled };
@@ -1,7 +1,7 @@
1
- import React, { Component } from 'react';
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { AnyTheme } from '@splunk/themes';
4
- import { ClassComponentProps } from '../utils/types';
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 class Tooltip extends Component<TooltipProps, TooltipState> {
136
- private ariaId;
137
- private controlledExternally;
138
- private popoverId;
139
- private timeout?;
140
- static propTypes: React.WeakValidationMap<TooltipProps>;
141
- static defaultProps: Required<Pick<TooltipPropsBase, "inline" | "defaultPlacement" | "closeDelay" | "closeWhen" | "openDelay">>;
142
- constructor(props: Readonly<TooltipProps>);
143
- componentDidUpdate(): void;
144
- componentWillUnmount(): void;
145
- private handleMount;
146
- private handlePopoverMount;
147
- private handlePopoverOuterMount;
148
- private handleHitAreaMount;
149
- private handleMouseEnter;
150
- private handleMouseEnterPopover;
151
- private handleMouseEnterHitArea;
152
- private handleMouseLeave;
153
- private handleMouseLeavePopover;
154
- private handleMouseLeaveHitArea;
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
- declare const TooltipWithTheme: React.ForwardRefExoticComponent<Omit<Pick<Pick<TooltipProps, "slot" | "style" | "title" | "onChange" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "nonce" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | keyof TooltipPropsBase> & Pick<PropTypes.InferProps<React.WeakValidationMap<TooltipProps>>, "inlist"> & Pick<TooltipProps, never>, "slot" | "style" | "title" | "children" | "elementRef" | "onChange" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "nonce" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "open" | "appearance" | "onRequestClose" | "onRequestOpen" | "splunkTheme" | "contentRelationship" | "renderAnchor"> & {
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;
@@ -7,6 +7,10 @@ interface TransitionOpenPropsBase {
7
7
  children?: React.ReactNode;
8
8
  /** @private */
9
9
  className?: string;
10
+ /**
11
+ * A React ref which is set to the DOM element when the component mounts and null when it unmounts.
12
+ */
13
+ elementRef?: React.Ref<HTMLDivElement>;
10
14
  /** The `id` of the inner container. */
11
15
  id?: string;
12
16
  /** An additional className to inner container. */
@@ -34,12 +38,13 @@ interface TransitionOpenPropsBase {
34
38
  takeFocus?: boolean;
35
39
  }
36
40
  type TransitionOpenProps = ComponentProps<TransitionOpenPropsBase, 'div'>;
37
- declare function TransitionOpen({ animation, animateOnMount, children, className, id, innerClassName, innerStyle, onAnimationEnd, open, outerClassName, outerId, outerStyle, renderChildrenWhenCollapsed, retainFocus, takeFocus: takeFocusProp, ...otherProps }: TransitionOpenProps): React.JSX.Element;
41
+ declare function TransitionOpen({ animation, animateOnMount, children, className, elementRef, id, innerClassName, innerStyle, onAnimationEnd, open, outerClassName, outerId, outerStyle, renderChildrenWhenCollapsed, retainFocus, takeFocus: takeFocusProp, ...otherProps }: TransitionOpenProps): React.JSX.Element;
38
42
  declare namespace TransitionOpen {
39
43
  var propTypes: {
40
44
  animation: PropTypes.Requireable<string>;
41
45
  animateOnMount: PropTypes.Requireable<boolean>;
42
46
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
47
+ elementRef: PropTypes.Requireable<object>;
43
48
  className: PropTypes.Requireable<string>;
44
49
  id: PropTypes.Requireable<string>;
45
50
  innerClassName: PropTypes.Requireable<string>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { RemoveNodeHandler, SetNodeHandler } from './Tree';
3
2
  import { TreeItemClickHandler, TreeItemKeyDownHandler } from './TreeItem';
4
3
  export interface TreeContext {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * This is a private component not intended for use outside @splunk/react-ui
4
3
  *
@@ -3,10 +3,11 @@ type Dimensions = {
3
3
  width: number;
4
4
  height: number;
5
5
  };
6
+ type ResizeHandler = (data: Dimensions) => void;
6
7
  /**
7
8
  * Watches a React ref element for changes in size.
8
9
  *
9
10
  * @param ref - The React ref to observe size changes on
10
11
  */
11
- declare const useResizeObserver: (ref: React.MutableRefObject<HTMLElement | null>) => Dimensions;
12
+ declare const useResizeObserver: (ref: React.MutableRefObject<HTMLElement | null>, onResize?: ResizeHandler) => Dimensions;
12
13
  export default useResizeObserver;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
- type ClassComponentProps<P extends {}, D extends {}, I extends keyof JSX.IntrinsicElements, B extends keyof P | keyof JSX.IntrinsicElements[I] = never> = P & D & Omit<JSX.IntrinsicElements[I], keyof P | B | 'ref' | 'css'>;
3
- type ComponentProps<P extends {}, I extends keyof JSX.IntrinsicElements, B extends keyof P | keyof JSX.IntrinsicElements[I] = never> = P & Omit<JSX.IntrinsicElements[I], keyof P | B | 'ref' | 'css'>;
1
+ type ClassComponentProps<P extends object, D extends object, I extends keyof JSX.IntrinsicElements, B extends keyof P | keyof JSX.IntrinsicElements[I] = never> = P & D & Omit<JSX.IntrinsicElements[I], keyof P | B | 'ref' | 'css'>;
2
+ type ComponentProps<P extends object, I extends keyof JSX.IntrinsicElements, B extends keyof P | keyof JSX.IntrinsicElements[I] = never> = P & Omit<JSX.IntrinsicElements[I], keyof P | B | 'ref' | 'css'>;
4
3
  type ObjKeys = <T>(o: T) => Extract<keyof T, string>[];
5
4
  type Writable<T> = {
6
5
  -readonly [P in keyof T]: T[P];