@splunk/react-ui 5.0.0-rc.2 → 5.1.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 (104) hide show
  1. package/Accordion.js +59 -59
  2. package/Avatar.js +20 -20
  3. package/Breadcrumbs.js +46 -46
  4. package/Button.js +24 -24
  5. package/CHANGELOG.md +380 -0
  6. package/Calendar.js +69 -69
  7. package/Card.js +68 -68
  8. package/Chip.js +16 -16
  9. package/Clickable.js +29 -29
  10. package/Code.js +654 -519
  11. package/CollapsiblePanel.js +112 -112
  12. package/Color.js +107 -107
  13. package/ColumnLayout.js +35 -35
  14. package/ComboBox.js +190 -206
  15. package/ControlGroup.js +129 -121
  16. package/Date.js +148 -146
  17. package/DefinitionList.js +26 -26
  18. package/Dropdown.js +9 -9
  19. package/DualListbox.js +701 -717
  20. package/File.js +403 -403
  21. package/FormRows.js +66 -63
  22. package/Image.js +15 -15
  23. package/JSONTree.js +458 -357
  24. package/Layer.js +60 -72
  25. package/MIGRATION.md +550 -1
  26. package/Markdown.js +66 -66
  27. package/Menu.js +44 -44
  28. package/Message.js +47 -43
  29. package/Modal.js +49 -49
  30. package/ModalLayer.js +21 -17
  31. package/Monogram.js +16 -16
  32. package/Multiselect.js +673 -669
  33. package/Number.js +100 -100
  34. package/Paginator.js +7 -7
  35. package/Popover.js +473 -424
  36. package/Progress.js +12 -12
  37. package/Prose.js +6 -6
  38. package/README.md +6 -6
  39. package/RadioBar.js +180 -166
  40. package/RadioList.js +80 -79
  41. package/ResultsMenu.js +129 -128
  42. package/Scroll.js +50 -50
  43. package/Search.js +148 -164
  44. package/Select.js +674 -674
  45. package/Slider.js +30 -30
  46. package/SlidingPanels.js +24 -24
  47. package/SplitButton.js +50 -50
  48. package/StepBar.js +100 -100
  49. package/Switch.js +45 -45
  50. package/TabBar.js +196 -196
  51. package/TabLayout.js +16 -16
  52. package/Table.js +1207 -1193
  53. package/Text.js +65 -65
  54. package/TextArea.js +108 -93
  55. package/Tooltip.js +203 -197
  56. package/TransitionOpen.js +4 -1
  57. package/Tree.js +464 -366
  58. package/package.json +11 -11
  59. package/stubs-dependencies.d.ts +0 -70
  60. package/stubs-splunkui.d.ts +4 -0
  61. package/types/src/Code/Code.d.ts +17 -1
  62. package/types/src/Code/LineHighlights.d.ts +11 -0
  63. package/types/src/Code/LineNumbers.d.ts +6 -0
  64. package/types/src/Code/docs/examples/LineHighlights.d.ts +3 -0
  65. package/types/src/Code/docs/examples/LineNumbers.d.ts +3 -0
  66. package/types/src/Code/docs/examples/LineNumbersCustomStart.d.ts +3 -0
  67. package/types/src/Date/Date.d.ts +6 -1
  68. package/types/src/DefinitionList/DefinitionList.d.ts +6 -6
  69. package/types/src/Dropdown/Dropdown.d.ts +1 -0
  70. package/types/src/FormRows/FormRows.d.ts +1 -1
  71. package/types/src/JSONTree/JSONTreeItem.d.ts +5 -2
  72. package/types/src/Markdown/Markdown.d.ts +1 -1
  73. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
  74. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
  75. package/types/src/Markdown/renderers/index.d.ts +1 -1
  76. package/types/src/Popover/Popover.d.ts +8 -2
  77. package/types/src/RadioBar/Option.d.ts +1 -1
  78. package/types/src/RadioBar/RadioBar.d.ts +13 -6
  79. package/types/src/RadioBar/RadioBarContext.d.ts +4 -2
  80. package/types/src/RadioList/RadioList.d.ts +2 -1
  81. package/types/src/ResultsMenu/ResultsMenu.d.ts +2 -1
  82. package/types/src/ScreenReaderContent/docs/examples/SkipLink.d.ts +3 -0
  83. package/types/src/Scroll/Inner.d.ts +1 -1
  84. package/types/src/Select/Option.d.ts +1 -1
  85. package/types/src/Select/Select.d.ts +1 -1
  86. package/types/src/Slider/docs/examples/Controlled.d.ts +1 -1
  87. package/types/src/TabLayout/Panel.d.ts +0 -1
  88. package/types/src/Table/Head.d.ts +1 -0
  89. package/types/src/Table/HeadCell.d.ts +2 -3
  90. package/types/src/Table/HeadDropdownCell.d.ts +2 -2
  91. package/types/src/Table/HeadInner.d.ts +4 -4
  92. package/types/src/Table/KeyboardSensor.d.ts +1 -1
  93. package/types/src/Table/RowDragCell.d.ts +1 -1
  94. package/types/src/Tooltip/Tooltip.d.ts +10 -5
  95. package/types/src/Tree/Item.d.ts +63 -0
  96. package/types/src/Tree/Tree.d.ts +13 -6
  97. package/types/src/Tree/TreeContext.d.ts +1 -1
  98. package/types/src/Tree/index.d.ts +1 -1
  99. package/types/src/useControlled/useControlled.d.ts +3 -1
  100. package/useControlled.js +29 -13
  101. package/CHANGELOG.v5.md +0 -354
  102. package/MIGRATION.v5.md +0 -552
  103. package/types/src/Button/docs/examples/Truncated.d.ts +0 -3
  104. package/types/src/Tree/TreeItem.d.ts +0 -44
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splunk/react-ui",
3
- "version": "5.0.0-rc.2",
3
+ "version": "5.1.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.",
@@ -26,7 +26,6 @@
26
26
  "storybook:build": "yarn sb build",
27
27
  "stylelint": "stylelint \"src/**/*.{ts,tsx,js,jsx}\" --config stylelint.config.js",
28
28
  "test": "jest",
29
- "test:ci": "JEST_JUNIT_OUTPUT_DIR=./test-reports JEST_JUNIT_OUTPUT_NAME=unit-results.xml JEST_JUNIT_CLASSNAME=unit yarn run test --ci --reporters=default jest-junit --coverage --coverageDirectory=coverage_report/coverage_maps_unit --coverageReporters=cobertura",
30
29
  "test:watch": "jest --watch",
31
30
  "test:cypress": "yarn cypress open --component",
32
31
  "test:cypress:ci": "yarn cypress run --component",
@@ -45,9 +44,9 @@
45
44
  "@dnd-kit/sortable": "^8.0.0",
46
45
  "@dnd-kit/utilities": "^3.2.2",
47
46
  "@react-spring/web": "^9.7.5",
48
- "@splunk/react-icons": "5.0.0-rc.2",
49
- "@splunk/themes": "1.0.0-rc.2",
50
- "@splunk/ui-utils": "^1.8.0",
47
+ "@splunk/react-icons": "^5.1.0",
48
+ "@splunk/themes": "^1.1.0",
49
+ "@splunk/ui-utils": "^1.10.0",
51
50
  "decimal.js-light": "^2.2.3",
52
51
  "lodash": "^4.17.14",
53
52
  "moment": "^2.29.4",
@@ -61,9 +60,9 @@
61
60
  "@babel/core": "^7.2.0",
62
61
  "@babel/plugin-transform-runtime": "^7.18.6",
63
62
  "@splunk/babel-preset": "^4.0.0",
64
- "@splunk/docs-gen": "1.0.0-rc.2",
63
+ "@splunk/docs-gen": "^1.0.0",
65
64
  "@splunk/eslint-config": "^5.0.0",
66
- "@splunk/react-docs": "1.0.0-rc.2",
65
+ "@splunk/react-docs": "^1.1.0",
67
66
  "@splunk/stylelint-config": "^5.0.0",
68
67
  "@splunk/test-runner-utils": "^0.4.1",
69
68
  "@splunk/webpack-configs": "^7.0.2",
@@ -80,9 +79,9 @@
80
79
  "@testing-library/react": "^16.3.0",
81
80
  "@testing-library/react-hooks": "^8.0.1",
82
81
  "@testing-library/user-event": "^14.6.1",
83
- "@types/jest": "^26.0.0",
82
+ "@types/jest": "^29.5.14",
84
83
  "@types/lodash": "^4.14.156",
85
- "@types/node": "^10.17.26",
84
+ "@types/node": "^18.16.0",
86
85
  "@types/prismjs": "^1.26.3",
87
86
  "@types/react": "^18.2.0",
88
87
  "@types/react-dom": "^18.2.0",
@@ -102,7 +101,7 @@
102
101
  "babel-plugin-transform-require-context": "^0.1.1",
103
102
  "core-js": "^3.6.4",
104
103
  "cross-env": "^6.0.3",
105
- "cypress": "^12.17.1",
104
+ "cypress": "^13.17.0",
106
105
  "cypress-real-events": "^1.9.1",
107
106
  "eslint": "^8.57.1",
108
107
  "eslint-config-airbnb": "^19.0.4",
@@ -121,7 +120,8 @@
121
120
  "fs-readdir-recursive": "^1.0.0",
122
121
  "glob": "^7.1.6",
123
122
  "http-server": "^14.1.1",
124
- "jest": "^26.6.3",
123
+ "jest": "^29.7.0",
124
+ "jest-environment-jsdom": "^29.7.0",
125
125
  "jest-image-snapshot": "^5.1.0",
126
126
  "jest-junit": "^10.0.0",
127
127
  "jest-stare": "^2.4.1",
@@ -1,70 +0,0 @@
1
- // https://github.com/storybookjs/storybook/issues/7677
2
- // https://github.com/ComponentDriven/csf/blob/next/src/story.test.ts
3
- declare module '@storybook/react' {
4
- type Context = {
5
- id: StoryId;
6
- kind: StoryKind;
7
- name: StoryName;
8
- };
9
-
10
- type StoryId = string;
11
- type StoryKind = string;
12
- type StoryName = string;
13
-
14
- type StoryFnType<Context, ReturnType> = (context?: Context) => ReturnType;
15
-
16
- type DecoratorFunctionBase<Context, StoryFn extends StoryFnType<Context, any>> = (
17
- fn: StoryFn,
18
- context: Context
19
- ) => ReturnType<StoryFn>;
20
-
21
- type DefaultParameters = { [name: string]: any };
22
-
23
- type ParametersType<T extends { [P: string]: any } = DefaultParameters> = {
24
- [P in keyof T]: T[P];
25
- };
26
-
27
- interface KindMetaBase<
28
- Decorator extends DecoratorFunctionBase<any, any>,
29
- Parameters extends ParametersType,
30
- Component = unknown
31
- > {
32
- id?: StoryId;
33
- title: StoryKind;
34
- component?: Component;
35
- subcomponents?: Record<string, Component>;
36
- decorators?: Decorator[];
37
- parameters?: Parameters;
38
- }
39
-
40
- interface StoryMetaBase<
41
- Context,
42
- StoryFn extends StoryFnType<Context, any>,
43
- Decorator extends DecoratorFunctionBase<Context, StoryFn>,
44
- Parameters extends ParametersType
45
- > {
46
- (context?: Context): ReturnType<StoryFn>;
47
- storyName?: StoryName;
48
- decorators?: Decorator[];
49
- parameters?: Parameters;
50
- }
51
-
52
- export type StoryFn = (c?: Context) => JSXElementConstructor<Record<string, unknown>>;
53
-
54
- export type DecoratorFunction = DecoratorFunctionBase<Context, StoryFn>;
55
-
56
- export type KindMetaWithParams<Parameters, Component = unknown> = KindMetaBase<
57
- DecoratorFunction,
58
- Parameters,
59
- Component
60
- >;
61
-
62
- export type KindMeta<Component = unknown> = KindMetaWithParams<DefaultParameters, Component>;
63
-
64
- export type StoryMeta<Parameters = DefaultParameters> = StoryMetaBase<
65
- Context,
66
- StoryFn,
67
- DecoratorFunction,
68
- Parameters
69
- >;
70
- }
@@ -85,6 +85,10 @@ declare module '@splunk/ui-utils/promise' {
85
85
  function makeCancelable<T>(arg: Promise<T>): CancelablePromise<T>;
86
86
  }
87
87
 
88
+ declare module '@splunk/ui-utils/scroll' {
89
+ export function scrollIntoViewIfNeeded(el?: HTMLElement | null): void;
90
+ }
91
+
88
92
  declare module '@splunk/ui-utils/style' {
89
93
  type ClassNameArg = ClassNameArg | Record<string, unknown> | string | undefined | null;
90
94
  function toClassName(...args: ClassNameArg[]): string;
@@ -20,24 +20,40 @@ interface CodePropsBase {
20
20
  * In cases where `language` is not valid `Code` will use this value as the fallback for `language`.
21
21
  */
22
22
  languageFallback?: CodeSupportedLanguages;
23
+ /**
24
+ * Accepts a comma separated list of line numbers or line number ranges to highlight.
25
+ * example: `2,4-5` will highlight lines 2, 4 and 5.
26
+ */
27
+ lineHighlights?: string;
28
+ /**
29
+ * Optional start number when showLineNumbers is true.
30
+ */
31
+ lineNumberStart?: number;
23
32
  /**
24
33
  * Displays the indent guideline.
25
34
  */
26
35
  showIndentGuide?: boolean;
36
+ /**
37
+ * Displays line numbers.
38
+ */
39
+ showLineNumbers?: boolean;
27
40
  /**
28
41
  * Inserts code content into the code block.
29
42
  */
30
43
  value?: string;
31
44
  }
32
45
  type CodeProps = ComponentProps<CodePropsBase, 'pre'>;
33
- declare function Code({ elementRef, indentChars, language, languageFallback, showIndentGuide, value, ...otherProps }: CodeProps): React.JSX.Element;
46
+ declare function Code({ elementRef, indentChars, language, languageFallback, lineHighlights, lineNumberStart, showIndentGuide, showLineNumbers, value, ...otherProps }: CodeProps): React.JSX.Element;
34
47
  declare namespace Code {
35
48
  var propTypes: {
36
49
  elementRef: PropTypes.Requireable<object>;
37
50
  indentChars: PropTypes.Requireable<number>;
38
51
  language: PropTypes.Requireable<string>;
39
52
  languageFallback: PropTypes.Requireable<string>;
53
+ lineHighlights: PropTypes.Requireable<string>;
54
+ lineNumberStart: PropTypes.Requireable<number>;
40
55
  showIndentGuide: PropTypes.Requireable<boolean>;
56
+ showLineNumbers: PropTypes.Requireable<boolean>;
41
57
  value: PropTypes.Requireable<string>;
42
58
  };
43
59
  }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface LineHighlightProps {
3
+ highlight: string;
4
+ width: number;
5
+ }
6
+ type Ranges = [number, number][];
7
+ declare const parseHighlightLines: (highlight: string) => Ranges;
8
+ declare const getLineNumbersArray: (ranges: Ranges) => number[];
9
+ declare const LineHighlights: React.FC<LineHighlightProps>;
10
+ export default LineHighlights;
11
+ export { parseHighlightLines, getLineNumbersArray };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface LineNumbersProps {
3
+ value?: string;
4
+ }
5
+ declare function LineNumbers({ value }: LineNumbersProps): React.JSX.Element;
6
+ export default LineNumbers;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare function LineHighlights(): React.JSX.Element;
3
+ export default LineHighlights;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare function LineNumbers(): React.JSX.Element;
3
+ export default LineNumbers;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare function LineNumbersCustomStart(): React.JSX.Element;
3
+ export default LineNumbersCustomStart;
@@ -17,6 +17,10 @@ type DateFocusHandler = (event: React.FocusEvent<HTMLInputElement>, data: {
17
17
  value: string;
18
18
  }) => void;
19
19
  interface DatePropsBase {
20
+ /**
21
+ * Include an "X" button to clear the value.
22
+ */
23
+ canClear?: boolean;
20
24
  /** Default date to display. Set this instead of value to make the Date uncontrolled. */
21
25
  defaultValue?: string;
22
26
  /**
@@ -89,9 +93,10 @@ interface DatePropsBaseUncontrolled extends DatePropsBase {
89
93
  }
90
94
  type DateProps = ComponentProps<DatePropsBaseControlled | DatePropsBaseUncontrolled, 'div'>;
91
95
  declare const validateValue: (value: string | undefined) => void;
92
- declare function Date({ defaultValue, disabled, elementRef, highlightToday, inline, inputOnly, locale, name, onChange, onClick, onFocus, onKeyDown, value: valueProp, ...otherProps }: DateProps): React.JSX.Element;
96
+ declare function Date({ canClear, defaultValue, disabled, elementRef, highlightToday, inline, inputOnly, locale, name, onChange, onClick, onFocus, onKeyDown, value: valueProp, ...otherProps }: DateProps): React.JSX.Element;
93
97
  declare namespace Date {
94
98
  var propTypes: {
99
+ canClear: PropTypes.Requireable<boolean>;
95
100
  defaultValue: PropTypes.Requireable<string>;
96
101
  describedBy: PropTypes.Requireable<string>;
97
102
  disabled: PropTypes.Requireable<boolean>;
@@ -9,23 +9,23 @@ interface DefinitionListPropsBase {
9
9
  * A React ref which is set to the DOM element when the component mounts and null when it unmounts.
10
10
  */
11
11
  elementRef?: React.Ref<HTMLDListElement>;
12
- /**
13
- * Defines the width of an item on the list.
14
- */
15
- termWidth?: string;
16
12
  /**
17
13
  * Sets the character used to separate key-value pair.
18
14
  */
19
15
  separatorCharacter?: '.' | string;
16
+ /**
17
+ * Defines the width of the key (term).
18
+ */
19
+ termWidth?: string;
20
20
  }
21
21
  type DefinitionListProps = ComponentProps<DefinitionListPropsBase, 'dl'>;
22
- declare function DefinitionList({ children, elementRef, termWidth, separatorCharacter, ...otherProps }: DefinitionListProps): React.JSX.Element;
22
+ declare function DefinitionList({ children, elementRef, separatorCharacter, termWidth, ...otherProps }: DefinitionListProps): React.JSX.Element;
23
23
  declare namespace DefinitionList {
24
24
  var propTypes: {
25
25
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
26
26
  elementRef: PropTypes.Requireable<object>;
27
- termWidth: PropTypes.Requireable<string>;
28
27
  separatorCharacter: PropTypes.Requireable<string | PropTypes.Requireable<string>>;
28
+ termWidth: PropTypes.Requireable<string>;
29
29
  };
30
30
  var Description: typeof import("./Description").default;
31
31
  var Term: typeof import("./Term").default;
@@ -8,6 +8,7 @@ type DropdownChildrenRenderer = (data: {
8
8
  maxHeight: number | null;
9
9
  maxWidth: number | null;
10
10
  placement: DropdownPlacementStatus | null;
11
+ toggleId?: string;
11
12
  }) => React.ReactNode;
12
13
  /** @public */
13
14
  type DropdownPlacement = 'above' | 'below' | 'left' | 'right' | 'vertical' | 'horizontal';
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Row from './Row';
4
- import type { RowRequestRemoveHandler } from './Row';
5
4
  import { ComponentProps } from '../utils/types';
5
+ import type { RowRequestRemoveHandler } from './Row';
6
6
  /** @public */
7
7
  type FormRowsRequestMoveHandler = (data: {
8
8
  fromIndex: number;
@@ -3,7 +3,10 @@ import PropTypes from 'prop-types';
3
3
  import { JSONElement } from './JSONTree';
4
4
  import { TreeItemPropsBase } from '../Tree';
5
5
  import { ComponentProps } from '../utils/types';
6
- export type ExpandLinkHandler = (data: {
6
+ export type ExpandLinkRenderer = (params: {
7
+ onToggleExpansion: (event: React.KeyboardEvent<HTMLLIElement> | React.MouseEvent<HTMLSpanElement>, data?: {
8
+ treeItemId?: string;
9
+ }) => void;
7
10
  open: boolean;
8
11
  withTooltip: boolean;
9
12
  expandLinkRef: React.RefObject<HTMLButtonElement>;
@@ -20,7 +23,7 @@ interface JSONTreeItemPropsBase extends TreeItemPropsBase {
20
23
  properties?: string[];
21
24
  propertyDataPath: string;
22
25
  propertyElement?: JSX.Element | undefined;
23
- renderExpandLink?: ExpandLinkHandler;
26
+ renderExpandLink?: ExpandLinkRenderer;
24
27
  representation?: JSX.Element | JSX.Element[];
25
28
  value?: JSONElement;
26
29
  }
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Options } from 'react-markdown';
4
- import { ComponentProps } from '../utils/types';
5
4
  import { MarkdownAnchorHeading, MarkdownBlockquote, MarkdownCodeBlock, MarkdownCode, MarkdownHeading, MarkdownImage, MarkdownItem, MarkdownLink, MarkdownList, MarkdownParagraph } from './renderers';
5
+ import { ComponentProps } from '../utils/types';
6
6
  /** @public */
7
7
  type RemarkReturn = React.ReactElement<any, any> | null;
8
8
  /** @public */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { StyledHint } from '../MarkdownStyles';
3
2
  import { ComponentProps } from '../../utils/types';
3
+ import { StyledHint } from '../MarkdownStyles';
4
4
  interface MarkdownBlockquotePropsBase {
5
5
  children: React.ReactNode[];
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { StyledCodeBlock } from '../MarkdownStyles';
3
2
  import { ComponentProps } from '../../utils/types';
3
+ import { StyledCodeBlock } from '../MarkdownStyles';
4
4
  interface MarkdownCodeBlockPropsBase {
5
5
  children: React.ReactNode[];
6
6
  language?: string;
@@ -4,9 +4,9 @@ import MarkdownCode from './MarkdownCode';
4
4
  import MarkdownCodeBlock, { StyledCodeBlock } from './MarkdownCodeBlock';
5
5
  import MarkdownHeading from './MarkdownHeading';
6
6
  import MarkdownImage from './MarkdownImage';
7
+ import MarkdownItem from './MarkdownItem';
7
8
  import MarkdownLink from './MarkdownLink';
8
9
  import MarkdownList from './MarkdownList';
9
- import MarkdownItem from './MarkdownItem';
10
10
  import MarkdownParagraph from './MarkdownParagraph';
11
11
  import { MarkdownTable, MarkdownTableHeadCell, MarkdownTableCell, MarkdownTableRow, MarkdownTableBody, MarkdownTableHead } from './MarkdownTable';
12
12
  export { MarkdownAnchorHeading, MarkdownBlockquote, MarkdownCodeBlock, MarkdownCode, MarkdownHeading, MarkdownImage, MarkdownItem, MarkdownLink, MarkdownList, MarkdownParagraph, MarkdownTable, MarkdownTableBody, MarkdownTableCell, MarkdownTableHead, MarkdownTableHeadCell, MarkdownTableRow, StyledCodeBlock, StyledHint, };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import { SpringConfig } from '@react-spring/web';
3
+ import PropTypes from 'prop-types';
4
4
  import { ComponentProps } from '../utils/types';
5
5
  /** @public */
6
6
  type PopoverChildrenRenderer = (data: {
@@ -9,6 +9,7 @@ type PopoverChildrenRenderer = (data: {
9
9
  maxHeight: number | null;
10
10
  maxWidth: number | null;
11
11
  placement: PopoverPlacementStatus | null;
12
+ toggleId?: string;
12
13
  }) => React.ReactNode;
13
14
  /** @public */
14
15
  type PopoverPlacement = 'above' | 'below' | 'left' | 'right' | 'vertical' | 'horizontal';
@@ -143,6 +144,11 @@ interface PopoverPropsBase {
143
144
  * Disable this for a `Popover` that has shows on hover, such as a tooltip.
144
145
  */
145
146
  takeFocus?: boolean;
147
+ /**
148
+ * Id of the toggle is added to aria-labelledby attribute of inner results menu
149
+ * @private
150
+ */
151
+ toggleId?: string;
146
152
  }
147
153
  type PopoverProps = ComponentProps<PopoverPropsBase, 'div'>;
148
154
  /**
@@ -150,7 +156,7 @@ type PopoverProps = ComponentProps<PopoverPropsBase, 'div'>;
150
156
  * this only when the other components don't provide sufficient functionality or control. A controlled
151
157
  * `Dropdown` covers use cases where you might consider using `Popover` directly.
152
158
  */
153
- declare function Popover({ align, anchor, animation, animationConfig, appearance, autoCloseWhenOffScreen, canCoverAnchor, children, closeReasons, defaultPlacement, elementRef, hideArrow, hitAreaRef, id, onRequestClose, open, outerRef, pointTo, repositionMode, retainFocus, takeFocus, ...otherProps }: PopoverProps): React.JSX.Element;
159
+ declare function Popover({ align, anchor, animation, animationConfig, appearance, autoCloseWhenOffScreen, canCoverAnchor, children, closeReasons, defaultPlacement, elementRef, hideArrow, hitAreaRef, id, onRequestClose, open, outerRef, pointTo, repositionMode, retainFocus, takeFocus, toggleId, ...otherProps }: PopoverProps): React.JSX.Element;
154
160
  declare namespace Popover {
155
161
  var propTypes: {
156
162
  align: PropTypes.Requireable<string>;
@@ -29,7 +29,7 @@ interface OptionPropsBase {
29
29
  value: any;
30
30
  }
31
31
  type OptionProps = ComponentProps<OptionPropsBase, 'button'>;
32
- declare function Option({ disabled, label, selected, startAdornment, endAdornment, value, role, ...otherProps }: OptionProps): React.JSX.Element;
32
+ declare function Option({ disabled: disabledProp, label, selected, startAdornment, endAdornment, value, role, ...otherProps }: OptionProps): React.JSX.Element;
33
33
  declare namespace Option {
34
34
  var propTypes: {
35
35
  disabled: PropTypes.Requireable<boolean>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { ComponentProps } from '../utils/types';
4
3
  import Option from './Option';
4
+ import { ComponentProps } from '../utils/types';
5
5
  /** @public */
6
6
  type RadioBarChangeHandler = (e: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement> | React.KeyboardEvent<HTMLElement>, data: {
7
7
  label?: string;
@@ -17,7 +17,7 @@ interface RadioBarPropsBase {
17
17
  * The default value. Only applicable if this is an uncontrolled component. Otherwise, use
18
18
  * the value prop.
19
19
  */
20
- defaultValue?: any;
20
+ defaultValue?: string | number | boolean;
21
21
  /**
22
22
  * The id of the description. When placed in a ControlGroup, this is automatically set to the
23
23
  * ControlGroup's help component.
@@ -27,6 +27,11 @@ interface RadioBarPropsBase {
27
27
  * A React ref which is set to the DOM element when the component mounts, and null when it unmounts.
28
28
  */
29
29
  elementRef?: React.Ref<HTMLDivElement>;
30
+ /**
31
+ * Disable all options in the RadioBar.
32
+ * This will override the disabled prop on any individual Option.
33
+ */
34
+ disabled?: boolean;
30
35
  /**
31
36
  * Highlight the field as having an error. The buttons will turn red.
32
37
  */
@@ -49,7 +54,7 @@ interface RadioBarPropsBase {
49
54
  /**
50
55
  * The currently selected value. Only applicable if this is a controlled component.
51
56
  */
52
- value?: any;
57
+ value?: string | number | boolean;
53
58
  }
54
59
  interface RadioBarPropsBaseControlled extends RadioBarPropsBase {
55
60
  defaultValue?: never;
@@ -64,13 +69,14 @@ type RadioBarProps = ComponentProps<RadioBarPropsBaseControlled | RadioBarPropsB
64
69
  /**
65
70
  * RadioBar is a form control that provides the ability to select one option out of a group.
66
71
  */
67
- declare function RadioBar({ children, defaultValue: defaultValueProp, describedBy, elementRef, error, labelledBy, name, onChange, required, role, value: valueProp, ...otherProps }: RadioBarProps): React.JSX.Element;
72
+ declare function RadioBar({ children, defaultValue: defaultValueProp, describedBy, disabled: disabledProp, elementRef, error, labelledBy, name: nameProp, onChange, required, role, value: valueProp, ...otherProps }: RadioBarProps): React.JSX.Element;
68
73
  declare namespace RadioBar {
69
74
  var Option: typeof import("./Option").default;
70
75
  var propTypes: {
71
76
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
72
- defaultValue: PropTypes.Requireable<any>;
77
+ defaultValue: PropTypes.Requireable<NonNullable<string | number | boolean | null | undefined>>;
73
78
  describedBy: PropTypes.Requireable<string>;
79
+ disabled: PropTypes.Requireable<boolean>;
74
80
  elementRef: PropTypes.Requireable<object>;
75
81
  error: PropTypes.Requireable<boolean>;
76
82
  inline: PropTypes.Requireable<boolean>;
@@ -80,8 +86,9 @@ declare namespace RadioBar {
80
86
  /** @private. */
81
87
  required: PropTypes.Requireable<boolean>;
82
88
  role: PropTypes.Requireable<string>;
83
- value: PropTypes.Requireable<any>;
89
+ value: PropTypes.Requireable<NonNullable<string | number | boolean | null | undefined>>;
84
90
  };
91
+ var componentType: string;
85
92
  }
86
93
  export default RadioBar;
87
94
  export { Option, RadioBarChangeHandler };
@@ -1,9 +1,11 @@
1
1
  import { OptionClickHandler, OnKeyDownHandler } from './Option';
2
2
  export interface RadioBarContext {
3
- onClick?: OptionClickHandler;
3
+ disabled?: boolean;
4
4
  error?: boolean;
5
- onKeyDown?: OnKeyDownHandler;
6
5
  firstValue?: any;
6
+ name?: string;
7
+ onClick?: OptionClickHandler;
8
+ onKeyDown?: OnKeyDownHandler;
7
9
  selectedValue?: any;
8
10
  }
9
11
  export declare const RadioBarContext: import("react").Context<RadioBarContext>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { ComponentProps } from '../utils/types';
4
3
  import Option from './Option';
4
+ import { ComponentProps } from '../utils/types';
5
5
  type RadioListValueTypes = number | string | boolean | Record<string, unknown> | symbol;
6
6
  /** @public */
7
7
  type RadioListChangeHandler = (event: React.ChangeEvent<HTMLInputElement>, data: {
@@ -87,6 +87,7 @@ declare namespace RadioList {
87
87
  value: PropTypes.Requireable<any>;
88
88
  };
89
89
  var Option: typeof import("./Option").default;
90
+ var componentType: string;
90
91
  }
91
92
  export default RadioList;
92
93
  export { Option, RadioListValueTypes, RadioListChangeHandler };
@@ -36,6 +36,7 @@ interface ResultsMenuPropsBase {
36
36
  * children, so therefore it may be necessary to scroll to see the animation.
37
37
  */
38
38
  isLoading?: boolean;
39
+ labelledBy?: string;
39
40
  loadingMessage?: React.ReactNode;
40
41
  menuId?: string;
41
42
  noOptionsMessage?: React.ReactNode;
@@ -66,7 +67,7 @@ declare const propTypes: {
66
67
  placement: PropTypes.Requireable<string>;
67
68
  };
68
69
  type ResultsMenuProps = ComponentProps<ResultsMenuPropsBase, 'div'>;
69
- declare function ResultsMenu({ animateLoading, 'aria-multiselectable': ariaMultiselectable, children, childrenStart, elementRef, focusMode, footerMessage, isLoading, loadingMessage, menuId, noOptionsMessage, onScroll, onScrollBottom, placement, style, tabIndex, ...otherProps }: ResultsMenuProps): React.JSX.Element;
70
+ declare function ResultsMenu({ animateLoading, 'aria-multiselectable': ariaMultiselectable, children, childrenStart, elementRef, focusMode, footerMessage, isLoading, labelledBy, loadingMessage, menuId, noOptionsMessage, onScroll, onScrollBottom, placement, style, tabIndex, ...otherProps }: ResultsMenuProps): React.JSX.Element;
70
71
  declare namespace ResultsMenu {
71
72
  var propTypes: {
72
73
  animateLoading: PropTypes.Requireable<boolean>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare function SkipLink(): React.JSX.Element;
3
+ export default SkipLink;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import { SpringValue } from '@react-spring/web';
3
+ import PropTypes from 'prop-types';
4
4
  import { ComponentProps } from '../utils/types';
5
5
  interface InnerPropsBase {
6
6
  children?: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { OptionClickHandler } from './OptionBase';
3
2
  import { ComponentProps } from '../utils/types';
3
+ import type { OptionClickHandler } from './OptionBase';
4
4
  interface OptionPropsBase {
5
5
  /** @private */
6
6
  active?: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { Divider as BaseDivider, Heading as BaseHeading, SelectBaseProps } from './SelectBase';
4
3
  import Option from './Option';
4
+ import { Divider as BaseDivider, Heading as BaseHeading, SelectBaseProps } from './SelectBase';
5
5
  import { ComponentProps } from '../utils/types';
6
6
  /** @public */
7
7
  type SelectChangeHandler = (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLInputElement>, data: {
@@ -1,6 +1,6 @@
1
1
  import React, { Component } from 'react';
2
- import { SliderChangeHandler } from '@splunk/react-ui/Slider';
3
2
  import { NumberChangeHandler } from '@splunk/react-ui/Number';
3
+ import { SliderChangeHandler } from '@splunk/react-ui/Slider';
4
4
  declare class Controlled extends Component<object, {
5
5
  value?: number;
6
6
  }> {
@@ -10,7 +10,6 @@ interface PanelPropsBase {
10
10
  */
11
11
  elementRef?: React.Ref<HTMLDivElement>;
12
12
  /** See Icon documentation for more information.
13
- * @excludeTheme prisma
14
13
  */
15
14
  icon?: React.ReactNode;
16
15
  /**
@@ -4,6 +4,7 @@ import { TableRequestMoveColumnHandler } from './Table';
4
4
  import { ComponentProps } from '../utils/types';
5
5
  type HeadAutosizeColumnHandler = (event: React.MouseEvent<HTMLHRElement>, data: {
6
6
  columnId?: string;
7
+ id?: string;
7
8
  index: number;
8
9
  }) => void;
9
10
  type HeadRequestMoveColumnHandler = TableRequestMoveColumnHandler;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import { UniqueIdentifier } from '@dnd-kit/core';
3
+ import PropTypes from 'prop-types';
4
4
  import { HeadAutosizeColumnHandler, HeadRequestMoveColumnHandler, HeadRequestResizeColumnHandler } from './Head';
5
5
  import { ComponentProps } from '../utils/types';
6
6
  type HeadCellAutosizeColumnHandler = HeadAutosizeColumnHandler;
@@ -80,8 +80,7 @@ interface HeadCellPropsBase {
80
80
  */
81
81
  tooltip?: React.ReactNode;
82
82
  /**
83
- * Truncate the text in the label. `truncate=false` is not compatible with `Table`'s
84
- * `onRequestResize`.
83
+ * Truncate the text in the label.
85
84
  */
86
85
  truncate?: boolean;
87
86
  /**
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import { UniqueIdentifier } from '@dnd-kit/core';
3
+ import PropTypes from 'prop-types';
4
4
  import { HeadAutosizeColumnHandler, HeadRequestMoveColumnHandler, HeadRequestResizeColumnHandler } from './Head';
5
5
  import { HeadCellKeyDownHandler } from './HeadCell';
6
6
  import { ComponentProps } from '../utils/types';
@@ -40,7 +40,7 @@ interface HeadDropdownCellPropsBase {
40
40
  */
41
41
  closeReasons?: HeadDropdownCellPossibleCloseReason[];
42
42
  /**
43
- * An id that is passed to the `onSort` callback and as `Table`'s `onRequestResizeColumn` callback.
43
+ * An id that is passed to the `onRequestOpen`, `onRequestClose` callback and as `Table`'s `onRequestResizeColumn` callback.
44
44
  */
45
45
  columnId?: string;
46
46
  /** @private. */