@splunk/react-ui 4.41.0 → 4.42.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.
Files changed (41) hide show
  1. package/ButtonGroup.js +1 -3
  2. package/CHANGELOG.md +22 -0
  3. package/Dropdown.js +33 -32
  4. package/Layer.js +115 -97
  5. package/Link.js +19 -21
  6. package/Menu.js +9 -8
  7. package/MessageBar.js +54 -56
  8. package/Multiselect.js +1051 -1035
  9. package/Number.js +51 -48
  10. package/Popover.js +481 -479
  11. package/Resize.js +61 -61
  12. package/ResultsMenu.js +4 -4
  13. package/Scroll.js +482 -475
  14. package/Select.js +532 -513
  15. package/Table.js +1515 -1433
  16. package/Text.js +29 -17
  17. package/TextArea.js +37 -37
  18. package/Tooltip.js +300 -207
  19. package/package.json +4 -4
  20. package/types/src/ButtonGroup/ButtonGroup.d.ts +0 -4
  21. package/types/src/Dropdown/Dropdown.d.ts +2 -1
  22. package/types/src/Layer/Layer.d.ts +2 -1
  23. package/types/src/Link/Link.d.ts +0 -2
  24. package/types/src/Number/Number.d.ts +10 -2
  25. package/types/src/Popover/Popover.d.ts +1 -4
  26. package/types/src/Resize/Resize.d.ts +0 -11
  27. package/types/src/Scroll/Inner.d.ts +17 -19
  28. package/types/src/Select/SelectBase.d.ts +6 -4
  29. package/types/src/Table/ExpandButton.d.ts +8 -0
  30. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  31. package/types/src/Table/HeadInner.d.ts +5 -1
  32. package/types/src/Table/Row.d.ts +8 -2
  33. package/types/src/Tooltip/Tooltip.d.ts +38 -5
  34. package/types/src/Tooltip/docs/examples/CustomProps.d.ts +2 -0
  35. package/types/src/Tooltip/docs/examples/Toggletip.d.ts +2 -0
  36. package/types/src/useControlled/useControlled.d.ts +5 -4
  37. package/useControlled.js +37 -15
  38. package/usePrevious.js +62 -30
  39. package/useRovingFocus.js +5 -4
  40. package/types/src/Table/icons/ExpansionRow.d.ts +0 -6
  41. package/types/src/Tooltip/docs/examples/CustomContent.d.ts +0 -2
@@ -9,9 +9,9 @@ type RowActionSecondaryClickHandler = (event: React.MouseEvent, data?: any) => v
9
9
  /** @public */
10
10
  type RowClickHandler = (event: React.MouseEvent<HTMLTableRowElement> | React.KeyboardEvent<HTMLTableRowElement>, data?: any) => void;
11
11
  type RowRequestMoveRowHandler = TableRequestMoveRowHandler;
12
- type RowExpansionHandler = (event: React.MouseEvent<HTMLTableCellElement> | React.KeyboardEvent<HTMLTableCellElement>, data?: any) => void;
12
+ type RowExpansionHandler = (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>, data?: any) => void;
13
13
  /** @public */
14
- type RowRequestExpansionHandler = (event: React.MouseEvent<HTMLTableCellElement> | React.KeyboardEvent<HTMLTableCellElement>, data?: any) => void;
14
+ type RowRequestExpansionHandler = (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>, data?: any) => void;
15
15
  /** @public */
16
16
  type RowRequestToggleHandler = (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>, data?: any) => void;
17
17
  interface RowPropsBase {
@@ -49,6 +49,10 @@ interface RowPropsBase {
49
49
  * Allows row expansion to be controlled programmatically if the `rowExpansion` prop is set to `controlled` in `Table`.
50
50
  */
51
51
  expanded?: boolean;
52
+ /**
53
+ * @private. Identifies the unique id (or ids) for an expanded row (or rows). In expandable rows `ExpansionRowIcon` uses `expansionRowId` for accessibility aria attributes.
54
+ */
55
+ expansionRowIds?: string;
52
56
  /**
53
57
  * An optional row that is displayed when this row is expanded, or an array of rows.
54
58
  */
@@ -109,6 +113,8 @@ declare namespace RowBase {
109
113
  /** @private. */
110
114
  expandable: PropTypes.Requireable<boolean>;
111
115
  expanded: PropTypes.Requireable<boolean>;
116
+ /** @private. Identifies the unique id (or ids) for an expanded row (or rows). In expandable rows `ExpansionRowIcon` uses `expansionRowId` for accessibility aria attributes. */
117
+ expansionRowIds: PropTypes.Requireable<string>;
112
118
  expansionRow: PropTypes.Requireable<NonNullable<PropTypes.ReactElementLike | (PropTypes.ReactElementLike | null | undefined)[] | null | undefined>>;
113
119
  /** @private. Indicates whether the table has an actions column. */
114
120
  actions: PropTypes.Requireable<boolean>;
@@ -14,6 +14,17 @@ type TooltipRequestCloseHandler = (event: React.FocusEvent<HTMLSpanElement> | Re
14
14
  type TooltipRequestOpenHandler = (event: React.FocusEvent<HTMLSpanElement> | MouseEvent, data: {
15
15
  reason: openReasons;
16
16
  }) => void;
17
+ interface AnchorProps {
18
+ onFocus: React.FocusEventHandler<HTMLElement>;
19
+ onBlur: React.FocusEventHandler<HTMLElement>;
20
+ onClick: React.MouseEventHandler<HTMLElement>;
21
+ elementRef: React.Ref<never>;
22
+ ['data-test']: 'toggle';
23
+ describedBy?: string;
24
+ ['aria-describedby']?: string;
25
+ labelledBy?: string;
26
+ ['aria-labelledby']?: string;
27
+ }
17
28
  interface TooltipPropsBase {
18
29
  /** @private */
19
30
  appearance?: 'normal' | 'inverted' | 'none';
@@ -42,7 +53,7 @@ interface TooltipPropsBase {
42
53
  * By default, tooltips are a description for their control and use `aria-describedby`.
43
54
  * Set `contentRelationship` to `label` when the Tooltip's content is a primary label for the control.
44
55
  */
45
- contentRelationship?: 'label' | 'description';
56
+ contentRelationship?: 'description' | 'label';
46
57
  /**
47
58
  * Milliseconds to wait before the tooltip closes.
48
59
  */
@@ -59,7 +70,7 @@ interface TooltipPropsBase {
59
70
  /**
60
71
  * A React ref which is set to the DOM element when the component mounts and null when it unmounts.
61
72
  */
62
- elementRef?: React.Ref<HTMLSpanElement>;
73
+ elementRef?: React.Ref<HTMLElement>;
63
74
  /**
64
75
  * Set inline to `false` when adding a tooltip to a block element.
65
76
  */
@@ -85,11 +96,31 @@ interface TooltipPropsBase {
85
96
  * The onRequestClose and onRequestOpen callbacks are usually used.
86
97
  */
87
98
  open?: boolean;
99
+ /**
100
+ * A function for rendering the element that the tooltip is bound to. If both `renderAnchor` and
101
+ * `children` are passed, `children` will be ignored. The function gets as input props object
102
+ * for the anchor, which contains the necessary event listeners and aria attributes. By default
103
+ * or if `contentRelationship` is passed as `description`, the props object contains keys
104
+ * `aria-describedby` and `describedBy`, but if `contentRelationship` is passed as `label`,
105
+ * `aria-labelledby` and `labelledBy` will be passed instead.
106
+ *
107
+ * @param {object} props
108
+ * @param {function} props.onFocus
109
+ * @param {function} props.onBlur
110
+ * @param {function} props.onClick
111
+ * @param {string} props['aria-describedby']
112
+ * @param {string} props.describedBy
113
+ * @param {string} props['aria-labelledby']
114
+ * @param {string} props.labelledBy
115
+ * @param {"toggle"} props.['data-test']
116
+ * @param {function} props.elementRef
117
+ */
118
+ renderAnchor?: (props: AnchorProps) => React.ReactNode;
88
119
  /** @private */
89
120
  splunkTheme: AnyTheme;
90
121
  }
91
- declare const defaultProps: Required<Pick<TooltipPropsBase, 'closeDelay' | 'closeWhen' | 'contentRelationship' | 'defaultPlacement' | 'inline' | 'openDelay'>>;
92
122
  type TooltipProps = ClassComponentProps<TooltipPropsBase, typeof defaultProps, 'span'>;
123
+ declare const defaultProps: Required<Pick<TooltipPropsBase, 'closeDelay' | 'closeWhen' | 'defaultPlacement' | 'inline' | 'openDelay'>>;
93
124
  interface TooltipState {
94
125
  open: boolean;
95
126
  anchorEl: HTMLSpanElement | null;
@@ -107,7 +138,7 @@ declare class Tooltip extends Component<TooltipProps, TooltipState> {
107
138
  private popoverId;
108
139
  private timeout?;
109
140
  static propTypes: React.WeakValidationMap<TooltipProps>;
110
- static defaultProps: Required<Pick<TooltipPropsBase, "inline" | "defaultPlacement" | "closeDelay" | "closeWhen" | "contentRelationship" | "openDelay">>;
141
+ static defaultProps: Required<Pick<TooltipPropsBase, "inline" | "defaultPlacement" | "closeDelay" | "closeWhen" | "openDelay">>;
111
142
  constructor(props: Readonly<TooltipProps>);
112
143
  componentDidUpdate(): void;
113
144
  componentWillUnmount(): void;
@@ -131,9 +162,11 @@ declare class Tooltip extends Component<TooltipProps, TooltipState> {
131
162
  private handleRequestOpen;
132
163
  private isControlled;
133
164
  private isOpen;
165
+ private handleRenderPropAnchorMount;
166
+ private createAnchor;
134
167
  render(): JSX.Element;
135
168
  }
136
- 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-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-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" | "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" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "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-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-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" | "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" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "open" | "content" | "appearance" | "onRequestClose" | "splunkTheme" | "onRequestOpen"> & Partial<Pick<Pick<TooltipProps, "slot" | "style" | "title" | "onChange" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-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" | "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" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "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>, "inline" | "defaultPlacement" | "closeDelay" | "closeWhen" | "contentRelationship" | "openDelay">> & Partial<Pick<Required<Pick<TooltipPropsBase, "inline" | "defaultPlacement" | "closeDelay" | "closeWhen" | "contentRelationship" | "openDelay">>, never>> & {
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-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-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" | "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" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "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-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-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" | "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" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "open" | "content" | "appearance" | "onRequestClose" | "splunkTheme" | "onRequestOpen" | "contentRelationship" | "renderAnchor"> & Partial<Pick<Pick<TooltipProps, "slot" | "style" | "title" | "onChange" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-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" | "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" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "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>, "inline" | "defaultPlacement" | "closeDelay" | "closeWhen" | "openDelay">> & Partial<Pick<Required<Pick<TooltipPropsBase, "inline" | "defaultPlacement" | "closeDelay" | "closeWhen" | "openDelay">>, never>> & {
137
170
  ref?: React.Ref<Tooltip> | undefined;
138
171
  }, "splunkTheme">>;
139
172
  export default TooltipWithTheme;
@@ -0,0 +1,2 @@
1
+ declare function CustomProps(): JSX.Element;
2
+ export default CustomProps;
@@ -0,0 +1,2 @@
1
+ declare function Toggletip(): JSX.Element;
2
+ export default Toggletip;
@@ -1,7 +1,8 @@
1
1
  import { MutableRefObject } from 'react';
2
- interface DefaultValueProps<T> {
3
- defaultValue: T;
4
- value: T;
2
+ interface DefaultValueProps {
3
+ componentProps: {
4
+ [key: string]: any;
5
+ };
5
6
  componentName?: string;
6
7
  defaultValuePropName?: string;
7
8
  valuePropName?: string;
@@ -16,6 +17,6 @@ interface DefaultValueProps<T> {
16
17
  *
17
18
  * Return the controlled state of the component.
18
19
  */
19
- declare function useControlled<T>({ defaultValue, value, componentName, defaultValuePropName, valuePropName, }: DefaultValueProps<T>): MutableRefObject<boolean>['current'];
20
+ declare function useControlled({ componentProps, componentName, defaultValuePropName, valuePropName, }: DefaultValueProps): MutableRefObject<boolean>['current'];
20
21
  export default useControlled;
21
22
  export { DefaultValueProps };
package/useControlled.js CHANGED
@@ -2,6 +2,10 @@
2
2
  // webpackBootstrap
3
3
  /******/ "use strict";
4
4
  /******/ var e = {
5
+ /***/ 5919:
6
+ /***/ e => {
7
+ e.exports = require("lodash/has");
8
+ /***/ },
5
9
  /***/ 9497:
6
10
  /***/ e => {
7
11
  e.exports = require("react");
@@ -15,25 +19,40 @@
15
19
  /******/ // The require function
16
20
  /******/ function t(o) {
17
21
  /******/ // Check if module is in cache
18
- /******/ var u = r[o];
19
- /******/ if (u !== undefined) {
20
- /******/ return u.exports;
22
+ /******/ var a = r[o];
23
+ /******/ if (a !== undefined) {
24
+ /******/ return a.exports;
21
25
  /******/ }
22
26
  /******/ // Create a new module (and put it into the cache)
23
- /******/ var a = r[o] = {
27
+ /******/ var u = r[o] = {
24
28
  /******/ // no module.id needed
25
29
  /******/ // no module.loaded needed
26
30
  /******/ exports: {}
27
31
  /******/ };
28
32
  /******/
29
33
  /******/ // Execute the module function
30
- /******/ e[o](a, a.exports, t);
34
+ /******/ e[o](u, u.exports, t);
31
35
  /******/
32
36
  /******/ // Return the exports of the module
33
- /******/ return a.exports;
37
+ /******/ return u.exports;
34
38
  /******/ }
35
39
  /******/
36
40
  /************************************************************************/
41
+ /******/ /* webpack/runtime/compat get default export */
42
+ /******/ (() => {
43
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
44
+ /******/ t.n = e => {
45
+ /******/ var r = e && e.__esModule ?
46
+ /******/ () => e["default"]
47
+ /******/ : () => e
48
+ /******/;
49
+ t.d(r, {
50
+ a: r
51
+ });
52
+ /******/ return r;
53
+ /******/ };
54
+ /******/ })();
55
+ /******/
37
56
  /******/ /* webpack/runtime/define property getters */
38
57
  /******/ (() => {
39
58
  /******/ // define getter functions for harmony exports
@@ -77,10 +96,13 @@
77
96
  t.r(o);
78
97
  // EXPORTS
79
98
  t.d(o, {
80
- default: () => /* reexport */ u
99
+ default: () => /* reexport */ n
81
100
  });
82
101
  // EXTERNAL MODULE: external "react"
83
102
  var e = t(9497);
103
+ // EXTERNAL MODULE: external "lodash/has"
104
+ var r = t(5919);
105
+ var a = t.n(r);
84
106
  // CONCATENATED MODULE: ./src/useControlled/useControlled.tsx
85
107
  /**
86
108
  * This is a private component not intended for use outside @splunk/react-ui
@@ -92,20 +114,20 @@
92
114
  *
93
115
  * Return the controlled state of the component.
94
116
  */
95
- function r(r) {
96
- var t = r.defaultValue, o = r.value, u = r.componentName, a = u === void 0 ? "this component" : u, f = r.defaultValuePropName, n = f === void 0 ? "defaultValue" : f, l = r.valuePropName, i = l === void 0 ? "value" : l;
97
- var d = (0, e.useRef)(o != null);
98
- var s = (0, e.useRef)(t);
117
+ function u(r) {
118
+ var t = r.componentProps, o = r.componentName, u = o === void 0 ? "this component" : o, n = r.defaultValuePropName, f = n === void 0 ? "defaultValue" : n, i = r.valuePropName, l = i === void 0 ? "value" : i;
119
+ var s = (0, e.useRef)(a()(t, l));
120
+ var d = (0, e.useRef)(t[f]);
99
121
  (0, e.useEffect)((function() {
100
122
  if (false) {}
101
- }), [ a, t, n, i ]);
123
+ }), [ u, t, f, l ]);
102
124
  (0, e.useEffect)((function() {
103
125
  if (false) {}
104
126
  if (false) {}
105
- }), [ a, t, n, o, i ]);
106
- return d.current;
127
+ }), [ u, t, f, l ]);
128
+ return s.current;
107
129
  }
108
- /* harmony default export */ const u = r;
130
+ /* harmony default export */ const n = u;
109
131
  }) // CONCATENATED MODULE: ./src/useControlled/index.ts
110
132
  ();
111
133
  module.exports = o;
package/usePrevious.js CHANGED
@@ -1,19 +1,48 @@
1
1
  /******/ (() => {
2
2
  // webpackBootstrap
3
3
  /******/ "use strict";
4
- /******/ // The require scope
5
- /******/ var e = {};
4
+ /******/ var e = {
5
+ /***/ 9497:
6
+ /***/ e => {
7
+ e.exports = require("react");
8
+ /***/
9
+ /******/ }
10
+ };
11
+ /************************************************************************/
12
+ /******/ // The module cache
13
+ /******/ var r = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function t(o) {
17
+ /******/ // Check if module is in cache
18
+ /******/ var n = r[o];
19
+ /******/ if (n !== undefined) {
20
+ /******/ return n.exports;
21
+ /******/ }
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var u = r[o] = {
24
+ /******/ // no module.id needed
25
+ /******/ // no module.loaded needed
26
+ /******/ exports: {}
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ e[o](u, u.exports, t);
31
+ /******/
32
+ /******/ // Return the exports of the module
33
+ /******/ return u.exports;
34
+ /******/ }
6
35
  /******/
7
36
  /************************************************************************/
8
37
  /******/ /* webpack/runtime/define property getters */
9
38
  /******/ (() => {
10
39
  /******/ // define getter functions for harmony exports
11
- /******/ e.d = (r, t) => {
12
- /******/ for (var o in t) {
13
- /******/ if (e.o(t, o) && !e.o(r, o)) {
14
- /******/ Object.defineProperty(r, o, {
40
+ /******/ t.d = (e, r) => {
41
+ /******/ for (var o in r) {
42
+ /******/ if (t.o(r, o) && !t.o(e, o)) {
43
+ /******/ Object.defineProperty(e, o, {
15
44
  enumerable: true,
16
- get: t[o]
45
+ get: r[o]
17
46
  });
18
47
  /******/ }
19
48
  /******/ }
@@ -22,14 +51,14 @@
22
51
  /******/
23
52
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
24
53
  /******/ (() => {
25
- /******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
54
+ /******/ t.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
26
55
  /******/;
27
56
  })();
28
57
  /******/
29
58
  /******/ /* webpack/runtime/make namespace object */
30
59
  /******/ (() => {
31
60
  /******/ // define __esModule on exports
32
- /******/ e.r = e => {
61
+ /******/ t.r = e => {
33
62
  /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
34
63
  /******/ Object.defineProperty(e, Symbol.toStringTag, {
35
64
  value: "Module"
@@ -41,17 +70,19 @@
41
70
  /******/ };
42
71
  /******/ })();
43
72
  /******/
44
- /************************************************************************/ var r = {};
45
- // ESM COMPAT FLAG
46
- e.r(r);
47
- // EXPORTS
48
- e.d(r, {
49
- default: () => /* reexport */ n
50
- });
51
- // CONCATENATED MODULE: external "react"
52
- const t = require("react");
53
- // CONCATENATED MODULE: ./src/usePrevious/usePrevious.tsx
54
- /**
73
+ /************************************************************************/ var o = {};
74
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
75
+ (() => {
76
+ // ESM COMPAT FLAG
77
+ t.r(o);
78
+ // EXPORTS
79
+ t.d(o, {
80
+ default: () => /* reexport */ n
81
+ });
82
+ // EXTERNAL MODULE: external "react"
83
+ var e = t(9497);
84
+ // CONCATENATED MODULE: ./src/usePrevious/usePrevious.tsx
85
+ /**
55
86
  * This is a private component not intended for use outside @splunk/react-ui
56
87
  *
57
88
  * Keeps the previous version of a value. Useful for emulating the "prevState"
@@ -60,14 +91,15 @@
60
91
  *
61
92
  * @param value - The value to store
62
93
  */
63
- function o(e) {
64
- var r = (0, t.useRef)();
65
- (0, t.useEffect)((function() {
66
- r.current = e;
67
- }), [ e ]);
68
- return r.current;
69
- }
70
- /* harmony default export */ const n = o;
71
- // CONCATENATED MODULE: ./src/usePrevious/index.ts
72
- module.exports = r;
94
+ function r(r) {
95
+ var t = (0, e.useRef)();
96
+ (0, e.useEffect)((function() {
97
+ t.current = r;
98
+ }), [ r ]);
99
+ return t.current;
100
+ }
101
+ /* harmony default export */ const n = r;
102
+ }) // CONCATENATED MODULE: ./src/usePrevious/index.ts
103
+ ();
104
+ module.exports = o;
73
105
  /******/})();
package/useRovingFocus.js CHANGED
@@ -108,10 +108,11 @@
108
108
  }
109
109
  };
110
110
  var f = function e(r) {
111
- if (r.nativeEvent.target instanceof HTMLElement) {
112
- var u = t.current.indexOf(r.nativeEvent.target);
113
- var i = (0, a.keycode)(r.nativeEvent);
114
- (0, n.handleFocus)(i, t.current, u, o);
111
+ var u = t.current.includes(r.nativeEvent.target);
112
+ /* Only apply focus if we are among the navigable items in this container */ if (r.nativeEvent.target instanceof HTMLElement && u) {
113
+ var i = t.current.indexOf(r.nativeEvent.target);
114
+ var c = (0, a.keycode)(r.nativeEvent);
115
+ (0, n.handleFocus)(c, t.current, i, o);
115
116
  }
116
117
  };
117
118
  return {
@@ -1,6 +0,0 @@
1
- interface ExpansionRowIconProps {
2
- className?: string;
3
- expanded?: boolean;
4
- }
5
- declare const StyledExpansionRowIcon: import("styled-components").StyledComponent<({ className, expanded }: ExpansionRowIconProps) => JSX.Element, any, {}, never>;
6
- export default StyledExpansionRowIcon;
@@ -1,2 +0,0 @@
1
- declare function CustomContent(): JSX.Element;
2
- export default CustomContent;