@splunk/react-ui 4.26.0 → 4.27.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 (32) hide show
  1. package/Accordion.js +195 -212
  2. package/CHANGELOG.md +26 -3
  3. package/CollapsiblePanel.js +554 -325
  4. package/Color.js +3 -1
  5. package/ControlGroup.js +1 -0
  6. package/MIGRATION.mdx +30 -0
  7. package/Modal.js +15 -6
  8. package/Table.js +898 -866
  9. package/Text.js +30 -40
  10. package/TextArea.js +152 -236
  11. package/package.json +4 -2
  12. package/types/src/Accordion/Accordion.d.ts +2 -2
  13. package/types/src/Accordion/AccordionContext.d.ts +2 -3
  14. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +49 -15
  15. package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +62 -0
  16. package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +9 -0
  17. package/types/src/CollapsiblePanel/docs/examples/MultiControlled.d.ts +2 -2
  18. package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupControlled.d.ts +2 -0
  19. package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupUncontrolled.d.ts +2 -0
  20. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +7 -5
  21. package/types/src/Table/Cell.d.ts +3 -1
  22. package/types/src/Table/Head.d.ts +2 -2
  23. package/types/src/Table/HeadCell.d.ts +2 -0
  24. package/types/src/Table/Row.d.ts +4 -2
  25. package/types/src/Table/Table.d.ts +1 -1
  26. package/types/src/Table/Toggle.d.ts +4 -4
  27. package/types/src/fixtures/text.d.ts +1 -0
  28. package/types/src/CollapsiblePanel/docs/examples/prisma/BasicControlled.d.ts +0 -2
  29. package/types/src/CollapsiblePanel/docs/examples/prisma/BasicUncontrolled.d.ts +0 -2
  30. package/types/src/CollapsiblePanel/docs/examples/prisma/Content.d.ts +0 -1
  31. package/types/src/CollapsiblePanel/docs/examples/prisma/MultiControlled.d.ts +0 -2
  32. package/types/src/CollapsiblePanel/docs/examples/prisma/MultiUncontrolled.d.ts +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splunk/react-ui",
3
- "version": "4.26.0",
3
+ "version": "4.27.0",
4
4
  "description": "Library of React components that implement the Splunk design language",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Splunk Inc.",
@@ -62,7 +62,7 @@
62
62
  "@splunk/babel-preset": "^4.0.0",
63
63
  "@splunk/docs-gen": "1.0.0-beta.8",
64
64
  "@splunk/eslint-config": "^4.0.0",
65
- "@splunk/react-docs": "1.0.0-beta.11",
65
+ "@splunk/react-docs": "1.0.0-beta.12",
66
66
  "@splunk/stylelint-config": "^4.0.0",
67
67
  "@splunk/test-runner-utils": "^0.4.1",
68
68
  "@splunk/webpack-configs": "^7.0.2",
@@ -112,10 +112,12 @@
112
112
  "eslint-import-resolver-webpack": "^0.13.4",
113
113
  "eslint-plugin-cypress": "^2.12.1",
114
114
  "eslint-plugin-import": "^2.22.1",
115
+ "eslint-plugin-jest-dom": "^5.1.0",
115
116
  "eslint-plugin-jsx-a11y": "^6.4.1",
116
117
  "eslint-plugin-react": "^7.21.5",
117
118
  "eslint-plugin-react-hooks": "^4.2.0",
118
119
  "eslint-plugin-react-perf": "^3.3.1",
120
+ "eslint-plugin-testing-library": "6.2.0",
119
121
  "fs-extra": "^9.0.1",
120
122
  "fs-readdir-recursive": "^1.0.0",
121
123
  "glob": "^7.1.6",
@@ -67,8 +67,8 @@ declare class Accordion extends Component<AccordionProps, AccordionState> {
67
67
  static Panel: typeof Panel;
68
68
  constructor(props: Readonly<AccordionProps>);
69
69
  componentDidUpdate(prevProps: Readonly<AccordionProps>): void;
70
- private handleRequestOpen;
71
- private handleRequestClose;
70
+ private getCurrentOpenPanel;
71
+ private handleChange;
72
72
  private isControlled;
73
73
  render(): JSX.Element;
74
74
  }
@@ -1,8 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { CollapsiblePanelRequestCloseHandler, CollapsiblePanelRequestOpenHandler } from '@splunk/react-ui/CollapsiblePanel';
2
+ import { CollapsiblePanelChangeHandler } from '@splunk/react-ui/CollapsiblePanel';
3
3
  export interface AccordionContext {
4
- onRequestClose?: CollapsiblePanelRequestCloseHandler;
5
- onRequestOpen?: CollapsiblePanelRequestOpenHandler;
4
+ onChange?: CollapsiblePanelChangeHandler;
6
5
  openPanelId?: string | number;
7
6
  inset?: boolean;
8
7
  }
@@ -1,26 +1,34 @@
1
1
  import React, { Component } from 'react';
2
+ import SingleOpenPanelGroup, { SingleOpenPanelGroupChangeHandler } from './SingleOpenPanelGroup';
3
+ import SingleOpenPanelGroupContext from './SingleOpenPanelGroupContext';
2
4
  import { ClassComponentProps } from '../utils/types';
3
- /** @public */
5
+ /** @public @deprecated Use `CollapsiblePanelChangeHandler` */
4
6
  declare type CollapsiblePanelRequestCloseHandler = (data: {
5
7
  event: React.MouseEvent<HTMLButtonElement>;
6
8
  panelId?: string | number;
7
9
  reason: 'toggleClick';
8
10
  }) => void;
9
- /** @public */
11
+ /** @public @deprecated Use `CollapsiblePanelChangeHandler` */
10
12
  declare type CollapsiblePanelRequestOpenHandler = (data: {
11
13
  event: React.MouseEvent<HTMLButtonElement>;
12
14
  panelId?: string | number;
13
15
  reason: 'toggleClick';
14
16
  }) => void;
17
+ /** @public */
18
+ declare type CollapsiblePanelChangeHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
19
+ panelId?: string | number;
20
+ reason: 'toggleClick';
21
+ }) => void;
15
22
  interface CollapsiblePanelPropsBase {
16
23
  /**
17
- * Style object applied to TransitionOpen inner styles.
24
+ * Style object applied to `TransitionOpen` inner styles.
18
25
  */
19
26
  innerBodyStyles?: React.CSSProperties;
20
27
  children?: React.ReactNode;
21
28
  /**
22
29
  * Sets the initial state of a panel to expanded. Incompatible with
23
- `open`. Use 'open' or 'defaultOpen', not both.
30
+ * `open`. Use `open` or `defaultOpen`, not both. Incompatible with `SingleOpenPanelGroup`
31
+ * and will be ignored for any children in `SingleOpenPanelGroup`.
24
32
  */
25
33
  defaultOpen?: boolean;
26
34
  /** Displays right-aligned text in the title bar of the `panel`. */
@@ -38,31 +46,42 @@ interface CollapsiblePanelPropsBase {
38
46
  * If set, the heading element contains `role="heading"`.
39
47
  */
40
48
  headingLevel?: number;
49
+ /**
50
+ * If set to true, adds padding to panel content.
51
+ */
52
+ inset?: boolean;
41
53
  /**
42
54
  * Identifies a specific panel. Splunk UI uses `panelId` for callbacks
43
55
  and managing expanded and collapsed states.
44
56
  */
45
57
  panelId?: string | number;
46
58
  /**
47
- * Invokes a callback when the user requests to collapse the panel. Passes
48
- an object containing the `panelId`.
59
+ * @deprecated `onRequestClose` option has been marked for deprecation and will be removed in the next major version.
60
+ * Use the `onChange` prop instead.
49
61
  */
50
62
  onRequestClose?: CollapsiblePanelRequestCloseHandler;
51
63
  /**
52
- * Invokes a callback when user requests to expand the panel. Passes an
53
- object containing the `panelId`.
64
+ * @deprecated `onRequestOpen` option has been marked for deprecation and will be removed in the next major version.
65
+ * Use the `onChange` prop instead.
54
66
  */
55
67
  onRequestOpen?: CollapsiblePanelRequestOpenHandler;
68
+ /**
69
+ * Invoked on a change of the open panel. Callback is passed data, such as
70
+ * the `panelId` of the `CollapsiblePanel` that originated the expand request.
71
+ * `panelId` is `undefined` when the open panel is collapsed.
72
+ */
73
+ onChange?: CollapsiblePanelChangeHandler;
56
74
  /**
57
75
  * Controls the expanded state of a panel. Incompatible with
58
- `defaultOpen`. Use 'open' or 'defaultOpen', not both.
76
+ * `defaultOpen`. Use `open` or `defaultOpen`, not both. Incompatible with `SingleOpenPanelGroup`
77
+ * and will be ignored for any children in `SingleOpenPanelGroup`.
59
78
  */
60
79
  open?: boolean;
61
80
  /**
62
81
  * Controls how panel overflow is handled. Default is `auto`, allowing
63
82
  * fixed-height Accordions to scroll their content if the panel is too
64
83
  * high to fit properly. Any value allowed by the CSS `overflow` property
65
- * is permitted, as is `null` (which will use the CSS default of "visible")
84
+ * is permitted, as is `null` (which will use the CSS default of "visible").
66
85
  */
67
86
  overflow?: string;
68
87
  /**
@@ -79,16 +98,26 @@ interface CollapsiblePanelPropsBase {
79
98
  */
80
99
  titleWithActions?: boolean;
81
100
  }
101
+ interface CollapsiblePanelDeprecatedControlledProps extends CollapsiblePanelPropsBase {
102
+ defaultOpen?: never;
103
+ onRequestOpen?: CollapsiblePanelRequestOpenHandler;
104
+ onRequestClose?: CollapsiblePanelRequestCloseHandler;
105
+ onChange: never;
106
+ open?: boolean;
107
+ }
82
108
  interface CollapsiblePanelControlledProps extends CollapsiblePanelPropsBase {
83
109
  defaultOpen?: never;
110
+ onRequestOpen?: never;
111
+ onRequestClose?: never;
112
+ onChange: CollapsiblePanelChangeHandler;
84
113
  open?: boolean;
85
114
  }
86
115
  interface CollapsiblePanelUncontrolledProps extends CollapsiblePanelPropsBase {
87
116
  defaultOpen?: boolean;
88
117
  open?: never;
89
118
  }
90
- declare const defaultProps: Required<Pick<CollapsiblePanelPropsBase, 'disabled' | 'overflow' | 'renderChildrenWhenCollapsed' | 'titleWithActions'>>;
91
- declare type CollapsiblePanelProps = ClassComponentProps<CollapsiblePanelControlledProps | CollapsiblePanelUncontrolledProps, typeof defaultProps, 'div'>;
119
+ declare const defaultProps: Required<Pick<CollapsiblePanelPropsBase, 'disabled' | 'inset' | 'overflow' | 'renderChildrenWhenCollapsed' | 'titleWithActions'>>;
120
+ declare type CollapsiblePanelProps = ClassComponentProps<CollapsiblePanelDeprecatedControlledProps | CollapsiblePanelUncontrolledProps | CollapsiblePanelControlledProps, typeof defaultProps, 'div'>;
92
121
  interface CollapsiblePanelState {
93
122
  animating: boolean;
94
123
  open?: boolean;
@@ -97,15 +126,20 @@ declare class CollapsiblePanel extends Component<CollapsiblePanelProps, Collapsi
97
126
  private controlledExternally;
98
127
  private containerId;
99
128
  private toggleId;
100
- static propTypes: React.WeakValidationMap<CollapsiblePanelControlledProps & Required<Pick<CollapsiblePanelPropsBase, "overflow" | "disabled" | "renderChildrenWhenCollapsed" | "titleWithActions">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "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">> | React.WeakValidationMap<CollapsiblePanelUncontrolledProps & Required<Pick<CollapsiblePanelPropsBase, "overflow" | "disabled" | "renderChildrenWhenCollapsed" | "titleWithActions">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "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">>;
101
- static defaultProps: Required<Pick<CollapsiblePanelPropsBase, "overflow" | "disabled" | "renderChildrenWhenCollapsed" | "titleWithActions">>;
129
+ static propTypes: React.WeakValidationMap<CollapsiblePanelDeprecatedControlledProps & Required<Pick<CollapsiblePanelPropsBase, "overflow" | "disabled" | "inset" | "renderChildrenWhenCollapsed" | "titleWithActions">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "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">> | React.WeakValidationMap<CollapsiblePanelControlledProps & Required<Pick<CollapsiblePanelPropsBase, "overflow" | "disabled" | "inset" | "renderChildrenWhenCollapsed" | "titleWithActions">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "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">> | React.WeakValidationMap<CollapsiblePanelUncontrolledProps & Required<Pick<CollapsiblePanelPropsBase, "overflow" | "disabled" | "inset" | "renderChildrenWhenCollapsed" | "titleWithActions">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "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">>;
130
+ static defaultProps: Required<Pick<CollapsiblePanelPropsBase, "overflow" | "disabled" | "inset" | "renderChildrenWhenCollapsed" | "titleWithActions">>;
131
+ context: React.ContextType<typeof SingleOpenPanelGroupContext>;
132
+ static contextType: React.Context<SingleOpenPanelGroupContext>;
102
133
  constructor(props: Readonly<CollapsiblePanelProps>);
134
+ componentDidMount(): void;
103
135
  componentDidUpdate(prevProps: Readonly<CollapsiblePanelProps>): void;
104
136
  private handleRequestClose;
105
137
  private handleRequestOpen;
138
+ private handleChange;
106
139
  private handleAnimationEnd;
107
140
  private isControlled;
108
141
  render(): JSX.Element;
109
142
  }
110
143
  export default CollapsiblePanel;
111
- export { CollapsiblePanelRequestCloseHandler, CollapsiblePanelRequestOpenHandler };
144
+ export { SingleOpenPanelGroup };
145
+ export type { CollapsiblePanelRequestCloseHandler, CollapsiblePanelRequestOpenHandler, CollapsiblePanelChangeHandler, SingleOpenPanelGroupChangeHandler, };
@@ -0,0 +1,62 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { ComponentProps } from '../utils/types';
4
+ /** @public */
5
+ declare type SingleOpenPanelGroupChangeHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
6
+ openPanelId?: string | number | null;
7
+ reason: 'toggleClick';
8
+ }) => void;
9
+ interface SingleOpenPanelGroupPropsBase {
10
+ /**
11
+ * Must be `CollapsiblePanel`.
12
+ */
13
+ children?: React.ReactNode;
14
+ /**
15
+ * Sets the panel to expand on the initial render. Use only when using
16
+ * `SingleOpenPanelGroup` as an uncontrolled component. Must match the `panelId` of
17
+ * one of the `CollapsiblePanel` children.
18
+ */
19
+ defaultOpenPanelId?: string | number;
20
+ /**
21
+ * A React ref which is set to the DOM element when the component mounts and null when it unmounts.
22
+ */
23
+ elementRef?: React.Ref<HTMLDivElement>;
24
+ /**
25
+ * If set to true, adds padding to panel content.
26
+ */
27
+ inset?: boolean;
28
+ /**
29
+ * Invoked on a change of the open panel. Callback is passed data, such as
30
+ * the `panelId` of the `CollapsiblePanel` that originated the expand request.
31
+ * `panelId` is `undefined` when the open panel is collapsed.
32
+ */
33
+ onChange?: SingleOpenPanelGroupChangeHandler;
34
+ /**
35
+ * Indicates the `panelId` of the currently expanded `CollapsiblePanel`.
36
+ * Use only when using `SingleOpenPanelGroup` as a controlled component.
37
+ */
38
+ openPanelId?: string | number | null;
39
+ }
40
+ interface SingleOpenPanelGroupControlledProps extends SingleOpenPanelGroupPropsBase {
41
+ defaultOpenPanelId?: never;
42
+ onChange: SingleOpenPanelGroupChangeHandler;
43
+ openPanelId?: string | number | null;
44
+ }
45
+ interface SingleOpenPanelGroupUncontrolledProps extends SingleOpenPanelGroupPropsBase {
46
+ defaultOpenPanelId?: string | number;
47
+ openPanelId?: never;
48
+ }
49
+ declare type SingleOpenPanelGroupProps = ComponentProps<SingleOpenPanelGroupControlledProps | SingleOpenPanelGroupUncontrolledProps, 'div'>;
50
+ declare function SingleOpenPanelGroup(props: SingleOpenPanelGroupProps): JSX.Element;
51
+ declare namespace SingleOpenPanelGroup {
52
+ var propTypes: {
53
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
54
+ defaultOpenPanelId: PropTypes.Requireable<any>;
55
+ elementRef: PropTypes.Requireable<object>;
56
+ inset: PropTypes.Requireable<boolean>;
57
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
58
+ openPanelId: PropTypes.Requireable<any>;
59
+ };
60
+ }
61
+ export default SingleOpenPanelGroup;
62
+ export { SingleOpenPanelGroupChangeHandler };
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { CollapsiblePanelChangeHandler } from '@splunk/react-ui/CollapsiblePanel';
3
+ export interface SingleOpenPanelGroupContext {
4
+ onChange?: CollapsiblePanelChangeHandler;
5
+ openPanelId?: string | number | null;
6
+ inset?: boolean;
7
+ }
8
+ export declare const SingleOpenPanelGroupContext: import("react").Context<SingleOpenPanelGroupContext>;
9
+ export default SingleOpenPanelGroupContext;
@@ -1,2 +1,2 @@
1
- declare function BasicControlled(): JSX.Element;
2
- export default BasicControlled;
1
+ declare function MultiControlled(): JSX.Element;
2
+ export default MultiControlled;
@@ -0,0 +1,2 @@
1
+ declare function SingleOpenPanelGroupControlled(): JSX.Element;
2
+ export default SingleOpenPanelGroupControlled;
@@ -0,0 +1,2 @@
1
+ declare function SingleOpenPanelGroupUncontrolled(): JSX.Element;
2
+ export default SingleOpenPanelGroupUncontrolled;
@@ -1,11 +1,13 @@
1
1
  import PropTypes from 'prop-types';
2
- interface ChevronRightIconProps {
2
+ declare type ExpandPanelIconProps = {
3
+ className?: string;
3
4
  open?: boolean;
4
- }
5
- declare const ChevronRight: {
6
- ({ open }: ChevronRightIconProps): JSX.Element;
5
+ };
6
+ declare const ExpandPanelIcon: {
7
+ ({ className, open }: ExpandPanelIconProps): JSX.Element;
7
8
  propTypes: {
9
+ className: PropTypes.Requireable<string>;
8
10
  open: PropTypes.Requireable<boolean>;
9
11
  };
10
12
  };
11
- export default ChevronRight;
13
+ export default ExpandPanelIcon;
@@ -17,6 +17,8 @@ interface CellPropsBase {
17
17
  * - The text is white and the background color of the row is lighter on row hover in `prisma` theme.
18
18
  * @private */
19
19
  appearance?: 'data' | 'link' | 'rowLink';
20
+ /** @private Used to set the $clickable appearance without an onClick */
21
+ appearClickable?: boolean;
20
22
  children?: React.ReactNode;
21
23
  /** This data is returned with the onClick events as the second argument. */
22
24
  data?: any;
@@ -50,4 +52,4 @@ declare class Cell extends Component<CellProps, {}> {
50
52
  render(): JSX.Element;
51
53
  }
52
54
  export default Cell;
53
- export { CellClickHandler };
55
+ export { CellClickHandler, CellProps };
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
2
2
  import { TableRequestMoveColumnHandler } from './Table';
3
3
  import TableContext from './TableContext';
4
4
  import { ClassComponentProps } from '../utils/types';
5
- declare type HeadAutosizeColumnHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
5
+ declare type HeadAutosizeColumnHandler = (event: React.MouseEvent<HTMLHRElement>, data: {
6
6
  columnId: any;
7
7
  index: number;
8
8
  }) => void;
@@ -10,7 +10,7 @@ declare type HeadDragStartHandler = (data: {
10
10
  dragIndex?: number;
11
11
  }) => void;
12
12
  declare type HeadRequestMoveColumnHandler = TableRequestMoveColumnHandler;
13
- declare type HeadRequestResizeColumnHandler = (event: React.KeyboardEvent<HTMLButtonElement> | MouseEvent, data: {
13
+ declare type HeadRequestResizeColumnHandler = (event: React.KeyboardEvent<HTMLHRElement> | MouseEvent, data: {
14
14
  columnId: any;
15
15
  id?: string;
16
16
  index: number;
@@ -22,6 +22,8 @@ declare type HeadCellRequestResizeHandler = HeadRequestResizeColumnHandler;
22
22
  interface HeadCellPropsBase {
23
23
  /** Align the text in the label. */
24
24
  align?: 'left' | 'center' | 'right';
25
+ /** @private Used to set the $clickable appearance without an onClick */
26
+ appearClickable?: boolean;
25
27
  children?: React.ReactNode;
26
28
  /**
27
29
  * An `id` that is returned in the draggable, sort, and resize events.
@@ -13,7 +13,9 @@ declare type RowDragStartHandler = (event: DragStartEvent) => void;
13
13
  declare type RowRequestMoveRowHandler = TableRequestMoveRowHandler;
14
14
  declare type RowExpansionHandler = (event: React.MouseEvent<HTMLTableCellElement> | React.KeyboardEvent<HTMLTableCellElement>, data?: any) => void;
15
15
  /** @public */
16
- declare type RowRequestToggleHandler = (event: React.MouseEvent<HTMLTableCellElement> | React.KeyboardEvent<HTMLTableCellElement>, data?: any) => void;
16
+ declare type RowRequestExpansionHandler = (event: React.MouseEvent<HTMLTableCellElement> | React.KeyboardEvent<HTMLTableCellElement>, data?: any) => void;
17
+ /** @public */
18
+ declare type RowRequestToggleHandler = (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>, data?: any) => void;
17
19
  interface RowPropsBase {
18
20
  /** @private. Generally passed by Table rather than added directly. */
19
21
  activeElementId?: string;
@@ -141,4 +143,4 @@ declare class Row extends Component<RowProps, {}> {
141
143
  }
142
144
  export default Row;
143
145
  export { RowActionPrimaryClickHandler, RowActionSecondaryClickHandler, RowBase, // exporting the base component for testing purpose
144
- RowClickHandler, RowDragStartHandler, RowRequestMoveRowHandler, RowRequestToggleHandler, RowExpansionHandler, };
146
+ RowClickHandler, RowDragStartHandler, RowRequestExpansionHandler, RowRequestMoveRowHandler, RowRequestToggleHandler, RowExpansionHandler, };
@@ -21,7 +21,7 @@ declare type TableRequestMoveRowHandler = (data: {
21
21
  toIndex: number;
22
22
  }) => void;
23
23
  /** @public */
24
- declare type TableRequestResizeColumnHandler = (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> | MouseEvent, data: {
24
+ declare type TableRequestResizeColumnHandler = (event: React.MouseEvent<HTMLHRElement> | React.KeyboardEvent<HTMLHRElement> | MouseEvent, data: {
25
25
  columnId: any;
26
26
  id?: string;
27
27
  index: number;
@@ -1,14 +1,14 @@
1
+ import React from 'react';
1
2
  import PropTypes from 'prop-types';
2
- import { SwitchCheckboxWithSomeClickHandler } from '@splunk/react-ui/Switch';
3
3
  import { ComponentProps } from '../utils/types';
4
4
  interface TogglePropsBase {
5
5
  allRows?: boolean;
6
6
  disabled?: boolean;
7
- onClick?: SwitchCheckboxWithSomeClickHandler;
7
+ onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
8
8
  selected?: boolean | 'some';
9
9
  }
10
- declare type ToggleProps = ComponentProps<TogglePropsBase, 'div'>;
11
- declare function Toggle({ allRows, disabled, selected, ...otherProps }: ToggleProps): JSX.Element;
10
+ declare type ToggleProps = ComponentProps<TogglePropsBase, 'button'>;
11
+ declare function Toggle({ allRows, disabled, onClick, selected, ...otherProps }: ToggleProps): JSX.Element;
12
12
  declare namespace Toggle {
13
13
  var propTypes: {
14
14
  allRows: PropTypes.Requireable<boolean>;
@@ -1 +1,2 @@
1
1
  export declare const lorem = "\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vestibulum\n commodo diam, eu consectetur nulla tincidunt a. Maecenas eget fermentum\n tellus. Nulla suscipit a tellus vel varius. Vestibulum eu elit a metus\n varius venenatis eget ut risus. Duis suscipit in arcu volutpat facilisis.\n Quisque eu dictum metus. Aenean commodo cursus sollicitudin. Etiam at\n posuere ligula. Sed sapien massa, laoreet a cursus at, malesuada vel mi.\n Duis maximus orci est, facilisis blandit urna at.\n";
2
+ export declare const loremShort = " \n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vestibulum\n commodo diam, eu consectetur nulla tincidunt a.\n";
@@ -1,2 +0,0 @@
1
- declare function BasicControlled(): JSX.Element;
2
- export default BasicControlled;
@@ -1,2 +0,0 @@
1
- declare function BasicUncontrolled(): JSX.Element;
2
- export default BasicUncontrolled;
@@ -1 +0,0 @@
1
- export default function Content(): JSX.Element;
@@ -1,2 +0,0 @@
1
- declare function BasicControlled(): JSX.Element;
2
- export default BasicControlled;
@@ -1,2 +0,0 @@
1
- declare function MultiUncontrolled(): JSX.Element;
2
- export default MultiUncontrolled;