@splunk/react-ui 5.8.0 → 5.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Anchor.js +2 -1
- package/ButtonSimple.js +1 -1
- package/CHANGELOG.md +38 -0
- package/Calendar.js +134 -134
- package/Clickable.js +131 -94
- package/Code.js +177 -170
- package/CollapsiblePanel.js +173 -135
- package/ColumnLayout.js +69 -45
- package/ComboBox.js +1 -0
- package/Dropdown.js +87 -72
- package/File.js +35 -35
- package/LICENSE +1 -1
- package/MIGRATION.md +40 -0
- package/Markdown.js +331 -306
- package/Menu.js +259 -215
- package/Modal.js +174 -181
- package/Monogram.js +2 -2
- package/Multiselect.js +414 -334
- package/Number.js +237 -242
- package/Search.js +15 -14
- package/SelectBase.js +777 -719
- package/SimpleTable.d.ts +2 -0
- package/SimpleTable.js +433 -0
- package/SlidingPanels.js +224 -153
- package/SpotLight.d.ts +2 -0
- package/SpotLight.js +687 -0
- package/Table.js +1232 -1238
- package/Text.js +26 -26
- package/docker-compose.yml +12 -18
- package/docs-llm/Avatar.md +2 -8
- package/docs-llm/Collapsible Panel.md +11 -57
- package/docs-llm/Column Layout.md +2 -2
- package/docs-llm/Divider.md +33 -0
- package/docs-llm/Message Bar.md +4 -1
- package/docs-llm/Multiselect.md +185 -162
- package/docs-llm/Notifications.md +46 -0
- package/docs-llm/Table.md +7 -7
- package/docs-llm/Tree.md +7 -2
- package/docs-llm/Typography.md +1 -1
- package/docs-llm/llms.txt +7 -3
- package/package.json +9 -11
- package/test-runner-jest.config.js +4 -53
- package/types/src/CollapsiblePanel/docs/examples/Actions.d.ts +1 -1
- package/types/src/ColumnLayout/ColumnLayout.d.ts +2 -2
- package/types/src/Divider/docs/examples/VerticalWithAlignItems.d.ts +8 -0
- package/types/src/Markdown/Markdown.d.ts +14 -2
- package/types/src/Markdown/renderers/MarkdownTable.d.ts +2 -22
- package/types/src/Markdown/renderers/MarkdownWrapper.d.ts +11 -0
- package/types/src/Markdown/renderers/index.d.ts +3 -1
- package/types/src/Multiselect/Compact.d.ts +12 -3
- package/types/src/Multiselect/Multiselect.d.ts +12 -3
- package/types/src/Multiselect/Normal.d.ts +8 -3
- package/types/src/Multiselect/Option.d.ts +6 -3
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +1 -0
- package/types/src/Multiselect/docs/examples/LoadMoreWithSelectAll.d.ts +9 -0
- package/types/src/SelectBase/SelectBase.d.ts +5 -1
- package/types/src/SimpleTable/Body.d.ts +25 -0
- package/types/src/SimpleTable/Cell.d.ts +20 -0
- package/types/src/SimpleTable/Head.d.ts +20 -0
- package/types/src/SimpleTable/HeadCell.d.ts +20 -0
- package/types/src/SimpleTable/Row.d.ts +20 -0
- package/types/src/SimpleTable/SimpleTable.d.ts +37 -0
- package/types/src/SimpleTable/index.d.ts +3 -0
- package/types/src/SpotLight/SpotLight.d.ts +88 -0
- package/types/src/SpotLight/index.d.ts +2 -0
- package/types/src/Table/Row.d.ts +1 -1
- package/types/src/Table/Table.d.ts +1 -1
- package/types/src/Typography/Typography.d.ts +1 -1
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +0 -7
|
@@ -1,58 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
3
|
-
const { getJestConfig } = require('@storybook/test-runner');
|
|
1
|
+
import { getJestConfig } from '@storybook/test-runner';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
const testMatch = process.env.STORYBOOK_TEST_COMPONENT
|
|
7
|
-
? [
|
|
8
|
-
`**/${process.env.STORYBOOK_TEST_COMPONENT}.stories.[jt]s?(x)`,
|
|
9
|
-
`**/${process.env.STORYBOOK_TEST_COMPONENT}.examples.[jt]s?(x)`,
|
|
10
|
-
]
|
|
11
|
-
: ['**/*.stories.[jt]s?(x)', '**/*.examples.[jt]s?(x)'];
|
|
3
|
+
import sharedJestConfig from '../../infra/visual-tests/test-runner-jest.config.js';
|
|
12
4
|
|
|
13
|
-
|
|
5
|
+
export default {
|
|
14
6
|
// The default configuration comes from @storybook/test-runner
|
|
15
7
|
...getJestConfig(),
|
|
16
|
-
|
|
17
|
-
testMatch,
|
|
18
|
-
transform: {
|
|
19
|
-
'^.+\\.stories\\.[jt]sx?$': '@storybook/test-runner/playwright/transform',
|
|
20
|
-
'^.+\\.examples\\.[jt]sx?$': '@storybook/test-runner/playwright/transform',
|
|
21
|
-
'^.+\\.tsx?$': 'babel-jest',
|
|
22
|
-
},
|
|
23
|
-
// used for a11y DOM snapshots, currently disabled
|
|
24
|
-
// snapshotResolver: '<rootDir>/.storybook-visual/config/snapshotResolver.js',
|
|
25
|
-
reporters: [
|
|
26
|
-
'default',
|
|
27
|
-
'jest-junit',
|
|
28
|
-
[
|
|
29
|
-
'jest-stare',
|
|
30
|
-
{
|
|
31
|
-
resultDir: `./test-reports/${
|
|
32
|
-
process.env.STORYBOOK_TEST_A11Y === 'false' ? 'visual' : 'a11y'
|
|
33
|
-
}/${process.env.STORYBOOK_THEME_FAMILY}${
|
|
34
|
-
process.env.JOB_BROWSER ? `-${process.env.JOB_BROWSER}` : ''
|
|
35
|
-
}`,
|
|
36
|
-
reportTitle: `${
|
|
37
|
-
process.env.STORYBOOK_TEST_A11Y === 'false' ? 'Visual' : 'A11y'
|
|
38
|
-
} Test Report - ${process.env.STORYBOOK_THEME_FAMILY}${
|
|
39
|
-
process.env.JOB_BROWSER ? `-${process.env.JOB_BROWSER}` : ''
|
|
40
|
-
}`,
|
|
41
|
-
reportHeadline: `${
|
|
42
|
-
process.env.STORYBOOK_TEST_A11Y === 'false' ? 'Visual' : 'A11y'
|
|
43
|
-
} Test Report - ${process.env.STORYBOOK_THEME_FAMILY}${
|
|
44
|
-
process.env.JOB_BROWSER ? `-${process.env.JOB_BROWSER}` : ''
|
|
45
|
-
}`,
|
|
46
|
-
hidePending: true,
|
|
47
|
-
resultHtml:
|
|
48
|
-
process.env.STORYBOOK_TEST_A11Y === 'false'
|
|
49
|
-
? 'visual-report.html'
|
|
50
|
-
: 'a11y-report.html',
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
'../../infra/visual-tests/orphaned-snapshot-check-reporter.js',
|
|
54
|
-
],
|
|
55
|
-
globals: {
|
|
56
|
-
__DEV__: true,
|
|
57
|
-
},
|
|
8
|
+
...sharedJestConfig,
|
|
58
9
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* @name Actions
|
|
4
|
-
* @description Adding clickable items in the header.
|
|
4
|
+
* @description Adding clickable items in the header. Within a set of panels, keep headers consistent by either including `actions` on all panels or on none.
|
|
5
5
|
*/
|
|
6
6
|
declare function Actions(): React.JSX.Element;
|
|
7
7
|
export default Actions;
|
|
@@ -17,8 +17,8 @@ interface ColumnLayoutPropsBase {
|
|
|
17
17
|
}
|
|
18
18
|
type ColumnLayoutProps = ComponentProps<ColumnLayoutPropsBase, 'div'>;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* @deprecated
|
|
21
|
+
* ColumnLayout has been deprecated and will be removed in a future major version. Use CSS `grid` or `flex` instead.
|
|
22
22
|
*/
|
|
23
23
|
declare function ColumnLayout({ children, divider, elementRef, gutter, ...otherProps }: ColumnLayoutProps): React.JSX.Element;
|
|
24
24
|
declare namespace ColumnLayout {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @name VerticalWithAlignItems
|
|
4
|
+
* @description When a flex container uses `align-items`, the vertical divider collapses
|
|
5
|
+
* to zero height. Apply `align-self: stretch` to the divider to restore it height.
|
|
6
|
+
*/
|
|
7
|
+
declare function VerticalWithAlignItems(): React.JSX.Element;
|
|
8
|
+
export default VerticalWithAlignItems;
|
|
@@ -54,6 +54,10 @@ type ListRenderer = (props: {
|
|
|
54
54
|
type ParagraphRenderer = (props: {
|
|
55
55
|
children: React.ReactNode[];
|
|
56
56
|
}) => RemarkReturn;
|
|
57
|
+
type WrapperRenderer = (props: {
|
|
58
|
+
children?: React.ReactNode;
|
|
59
|
+
elementRef?: React.Ref<HTMLElement>;
|
|
60
|
+
}) => JSX.Element;
|
|
57
61
|
interface MarkdownPropsBase {
|
|
58
62
|
/**
|
|
59
63
|
* A custom blockquote renderer. The function is passed an object containing `children`.
|
|
@@ -109,6 +113,12 @@ interface MarkdownPropsBase {
|
|
|
109
113
|
* prop is superseded by `Markdown`'s `text` prop.
|
|
110
114
|
*/
|
|
111
115
|
rendererOptions?: Omit<Options, 'children'>;
|
|
116
|
+
/**
|
|
117
|
+
* @private
|
|
118
|
+
* Replaces the default Prose wrapper.
|
|
119
|
+
* Can be set to null to render markdown without a wrapper.
|
|
120
|
+
*/
|
|
121
|
+
wrapper?: WrapperRenderer | null;
|
|
112
122
|
}
|
|
113
123
|
type MarkdownProps = ComponentProps<MarkdownPropsBase, 'section'>;
|
|
114
124
|
/**
|
|
@@ -116,7 +126,7 @@ type MarkdownProps = ComponentProps<MarkdownPropsBase, 'section'>;
|
|
|
116
126
|
* The component prefers @splunk/react-ui components over plain HTML components. For example
|
|
117
127
|
* links are rendered as the `@splunk/react-ui/Link` component instead of plain `<a>` tag.
|
|
118
128
|
*/
|
|
119
|
-
declare function Markdown({ blockquoteRenderer, codeBlockRenderer, codeRenderer, elementRef, headingRenderer, imageRenderer, itemRenderer, linkRenderer, listRenderer, paragraphRenderer, text, rendererOptions, ...otherProps }: MarkdownProps): React.JSX.Element;
|
|
129
|
+
declare function Markdown({ blockquoteRenderer, codeBlockRenderer, codeRenderer, elementRef, headingRenderer, imageRenderer, itemRenderer, linkRenderer, listRenderer, paragraphRenderer, text, rendererOptions, wrapper, ...otherProps }: MarkdownProps): React.JSX.Element;
|
|
120
130
|
declare namespace Markdown {
|
|
121
131
|
var propTypes: {
|
|
122
132
|
blockquoteRenderer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -131,7 +141,9 @@ declare namespace Markdown {
|
|
|
131
141
|
paragraphRenderer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
132
142
|
text: PropTypes.Validator<string>;
|
|
133
143
|
rendererOptions: PropTypes.Requireable<object>;
|
|
144
|
+
/** @private */
|
|
145
|
+
wrapper: PropTypes.Requireable<(...args: any[]) => any>;
|
|
134
146
|
};
|
|
135
147
|
}
|
|
136
148
|
export default Markdown;
|
|
137
|
-
export { MarkdownAnchorHeading, MarkdownBlockquote, MarkdownCodeBlock, MarkdownCode, MarkdownHeading, MarkdownImage, MarkdownItem, MarkdownLink, MarkdownList, MarkdownParagraph, BlockquoteRenderer, CodeBlockRenderer, CodeRenderer, HeadingRenderer, ImageRenderer, ItemRenderer, LinkRenderer, ListRenderer, ParagraphRenderer, };
|
|
149
|
+
export { MarkdownAnchorHeading, MarkdownBlockquote, MarkdownCodeBlock, MarkdownCode, MarkdownHeading, MarkdownImage, MarkdownItem, MarkdownLink, MarkdownList, MarkdownParagraph, BlockquoteRenderer, CodeBlockRenderer, CodeRenderer, HeadingRenderer, ImageRenderer, ItemRenderer, LinkRenderer, ListRenderer, ParagraphRenderer, WrapperRenderer, };
|
|
@@ -2,39 +2,19 @@ import React from 'react';
|
|
|
2
2
|
declare function MarkdownTable({ children, ...otherProps }: {
|
|
3
3
|
children: React.ReactNode[];
|
|
4
4
|
}): React.JSX.Element;
|
|
5
|
-
declare namespace MarkdownTable {
|
|
6
|
-
var splunkUiType: string;
|
|
7
|
-
}
|
|
8
5
|
declare function MarkdownTableBody({ children, ...otherProps }: {
|
|
9
6
|
children: React.ReactNode[];
|
|
10
7
|
}): React.JSX.Element;
|
|
11
|
-
declare
|
|
12
|
-
var splunkUiType: string;
|
|
13
|
-
}
|
|
14
|
-
declare function MarkdownTableCell({ children, style, ...otherProps }: {
|
|
8
|
+
declare function MarkdownTableCell({ children, ...otherProps }: {
|
|
15
9
|
children: React.ReactNode[];
|
|
16
|
-
style?: React.CSSProperties & Record<string, unknown>;
|
|
17
10
|
}): React.JSX.Element;
|
|
18
|
-
declare namespace MarkdownTableCell {
|
|
19
|
-
var splunkUiType: string;
|
|
20
|
-
}
|
|
21
11
|
declare function MarkdownTableHead({ children, ...otherProps }: {
|
|
22
12
|
children: React.ReactNode[];
|
|
23
13
|
}): React.JSX.Element;
|
|
24
|
-
declare
|
|
25
|
-
var splunkUiType: string;
|
|
26
|
-
}
|
|
27
|
-
declare function MarkdownTableHeadCell({ children, style, ...otherProps }: {
|
|
14
|
+
declare function MarkdownTableHeadCell({ children, ...otherProps }: {
|
|
28
15
|
children: React.ReactNode[];
|
|
29
|
-
style?: React.CSSProperties & Record<string, unknown>;
|
|
30
16
|
}): React.JSX.Element;
|
|
31
|
-
declare namespace MarkdownTableHeadCell {
|
|
32
|
-
var splunkUiType: string;
|
|
33
|
-
}
|
|
34
17
|
declare function MarkdownTableRow({ children, ...otherProps }: {
|
|
35
18
|
children: React.ReactNode[];
|
|
36
19
|
}): React.JSX.Element;
|
|
37
|
-
declare namespace MarkdownTableRow {
|
|
38
|
-
var splunkUiType: string;
|
|
39
|
-
}
|
|
40
20
|
export { MarkdownTable, MarkdownTableBody, MarkdownTableCell, MarkdownTableHead, MarkdownTableHeadCell, MarkdownTableRow, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentProps } from '../../utils/types';
|
|
3
|
+
type MarkdownWrapperPropsBase = {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
elementRef?: React.Ref<HTMLElement>;
|
|
6
|
+
frontmatter?: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
type MarkdownWrapperProps = ComponentProps<MarkdownWrapperPropsBase, 'section'>;
|
|
9
|
+
declare function MarkdownWrapper({ children, elementRef, ...otherProps }: MarkdownWrapperProps): React.JSX.Element;
|
|
10
|
+
export default MarkdownWrapper;
|
|
11
|
+
export type { MarkdownWrapperProps };
|
|
@@ -9,4 +9,6 @@ import MarkdownLink from './MarkdownLink';
|
|
|
9
9
|
import MarkdownList from './MarkdownList';
|
|
10
10
|
import MarkdownParagraph from './MarkdownParagraph';
|
|
11
11
|
import { MarkdownTable, MarkdownTableHeadCell, MarkdownTableCell, MarkdownTableRow, MarkdownTableBody, MarkdownTableHead } from './MarkdownTable';
|
|
12
|
-
|
|
12
|
+
import MarkdownWrapper from './MarkdownWrapper';
|
|
13
|
+
export { MarkdownAnchorHeading, MarkdownBlockquote, MarkdownCodeBlock, MarkdownCode, MarkdownHeading, MarkdownImage, MarkdownItem, MarkdownLink, MarkdownList, MarkdownParagraph, MarkdownTable, MarkdownTableBody, MarkdownTableCell, MarkdownTableHead, MarkdownTableHeadCell, MarkdownTableRow, MarkdownWrapper, StyledCodeBlock, StyledHint, };
|
|
14
|
+
export type { MarkdownWrapperProps } from './MarkdownWrapper';
|
|
@@ -36,8 +36,13 @@ interface CompactPropsBase {
|
|
|
36
36
|
* ControlGroup's help component.
|
|
37
37
|
*/
|
|
38
38
|
describedBy?: string;
|
|
39
|
-
/**
|
|
40
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Prevents user interaction and adds disabled styling.
|
|
41
|
+
*
|
|
42
|
+
* If set to `dimmed`, the component is able to receive focus.
|
|
43
|
+
* If set to `disabled`, the component is unable to receive focus.
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean | 'dimmed' | 'disabled';
|
|
41
46
|
/**
|
|
42
47
|
* A React ref which is set to the DOM element when the component mounts and null when it unmounts.
|
|
43
48
|
*/
|
|
@@ -94,6 +99,7 @@ interface CompactPropsBase {
|
|
|
94
99
|
/**
|
|
95
100
|
* A callback to receive the change events. If values is set, this callback is required.
|
|
96
101
|
* This must set the values prop to retain the change.
|
|
102
|
+
* Supports custom selection behavior.
|
|
97
103
|
*/
|
|
98
104
|
onChange?: MultiselectChangeHandler;
|
|
99
105
|
/**
|
|
@@ -135,6 +141,9 @@ interface CompactPropsBase {
|
|
|
135
141
|
/**
|
|
136
142
|
* Determines how to display Select all/Clear all.
|
|
137
143
|
*
|
|
144
|
+
* By default, selection applies only to currently loaded options.
|
|
145
|
+
* Use `onChange` for custom selection behavior.
|
|
146
|
+
*
|
|
138
147
|
* @deprecatedValue 'buttongroup'
|
|
139
148
|
* The 'buttongroup' value is deprecated and will be removed in a future major version.
|
|
140
149
|
*/
|
|
@@ -171,7 +180,7 @@ declare namespace Compact {
|
|
|
171
180
|
defaultPlacement: PropTypes.Requireable<string>;
|
|
172
181
|
defaultValues: PropTypes.Requireable<any[]>;
|
|
173
182
|
describedBy: PropTypes.Requireable<string>;
|
|
174
|
-
disabled: PropTypes.Requireable<boolean
|
|
183
|
+
disabled: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
175
184
|
elementRef: PropTypes.Requireable<object>;
|
|
176
185
|
error: PropTypes.Requireable<boolean>;
|
|
177
186
|
filter: PropTypes.Requireable<string | boolean>;
|
|
@@ -55,8 +55,13 @@ interface MultiselectPropsBase {
|
|
|
55
55
|
* ControlGroup's help component.
|
|
56
56
|
*/
|
|
57
57
|
describedBy?: string;
|
|
58
|
-
/**
|
|
59
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Prevents user interaction and adds disabled styling.
|
|
60
|
+
*
|
|
61
|
+
* If set to `dimmed`, the component is able to receive focus.
|
|
62
|
+
* If set to `disabled`, the component is unable to receive focus.
|
|
63
|
+
*/
|
|
64
|
+
disabled?: boolean | 'dimmed' | 'disabled';
|
|
60
65
|
/**
|
|
61
66
|
* A React ref which is set to the DOM element when the component mounts, and null when it unmounts.
|
|
62
67
|
*/
|
|
@@ -118,6 +123,7 @@ interface MultiselectPropsBase {
|
|
|
118
123
|
/**
|
|
119
124
|
* A callback to receive the change events. If values is set, this callback is required.
|
|
120
125
|
* This must set the values prop to retain the change.
|
|
126
|
+
* Supports custom selection behavior.
|
|
121
127
|
*/
|
|
122
128
|
onChange?: MultiselectChangeHandler;
|
|
123
129
|
/**
|
|
@@ -160,6 +166,9 @@ interface MultiselectPropsBase {
|
|
|
160
166
|
* Determines how to display Select all/Clear all.
|
|
161
167
|
* Only supported when `compact=true`.
|
|
162
168
|
*
|
|
169
|
+
* By default, selection applies only to currently loaded options.
|
|
170
|
+
* Use `onChange` for custom selection behavior.
|
|
171
|
+
*
|
|
163
172
|
* @deprecatedValue 'buttongroup'
|
|
164
173
|
* The 'buttongroup' value is deprecated and will be removed in a future major version.
|
|
165
174
|
*/
|
|
@@ -223,7 +232,7 @@ declare namespace Multiselect {
|
|
|
223
232
|
defaultPlacement: PropTypes.Requireable<string>;
|
|
224
233
|
defaultValues: PropTypes.Requireable<any[]>;
|
|
225
234
|
describedBy: PropTypes.Requireable<string>;
|
|
226
|
-
disabled: PropTypes.Requireable<boolean
|
|
235
|
+
disabled: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
227
236
|
elementRef: PropTypes.Requireable<object>;
|
|
228
237
|
error: PropTypes.Requireable<boolean>;
|
|
229
238
|
filter: PropTypes.Requireable<string | boolean>;
|
|
@@ -32,8 +32,13 @@ interface NormalPropsBase {
|
|
|
32
32
|
* ControlGroup's help component.
|
|
33
33
|
*/
|
|
34
34
|
describedBy?: string;
|
|
35
|
-
/**
|
|
36
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Prevents user interaction and adds disabled styling.
|
|
37
|
+
*
|
|
38
|
+
* If set to `dimmed`, the component is able to receive focus.
|
|
39
|
+
* If set to `disabled`, the component is unable to receive focus.
|
|
40
|
+
*/
|
|
41
|
+
disabled?: boolean | 'dimmed' | 'disabled';
|
|
37
42
|
/**
|
|
38
43
|
* A React ref which is set to the DOM element when the component mounts and null when it unmounts.
|
|
39
44
|
*/
|
|
@@ -138,7 +143,7 @@ declare namespace Normal {
|
|
|
138
143
|
defaultPlacement: PropTypes.Requireable<string>;
|
|
139
144
|
defaultValues: PropTypes.Requireable<any[]>;
|
|
140
145
|
describedBy: PropTypes.Requireable<string>;
|
|
141
|
-
disabled: PropTypes.Requireable<boolean
|
|
146
|
+
disabled: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
142
147
|
elementRef: PropTypes.Requireable<object>;
|
|
143
148
|
error: PropTypes.Requireable<boolean>;
|
|
144
149
|
footerMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -26,9 +26,12 @@ interface OptionPropsBase {
|
|
|
26
26
|
*/
|
|
27
27
|
descriptionPosition?: 'right' | 'bottom';
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Prevents user interaction and adds disabled styling.
|
|
30
|
+
*
|
|
31
|
+
* If set to `dimmed`, the component is able to receive focus.
|
|
32
|
+
* If set to `disabled`, the component is unable to receive focus.
|
|
30
33
|
*/
|
|
31
|
-
disabled?: boolean;
|
|
34
|
+
disabled?: boolean | 'dimmed' | 'disabled';
|
|
32
35
|
/**
|
|
33
36
|
* @private Undocumented due to limitations in supporting in compact `Multiselect` (see SUI-8286 notes for more info).
|
|
34
37
|
* A React ref which is set to the DOM element when the component mounts, and null when it unmounts.
|
|
@@ -99,7 +102,7 @@ declare namespace Option {
|
|
|
99
102
|
compact: PropTypes.Requireable<boolean>;
|
|
100
103
|
description: PropTypes.Requireable<string>;
|
|
101
104
|
descriptionPosition: PropTypes.Requireable<string>;
|
|
102
|
-
disabled: PropTypes.Requireable<boolean
|
|
105
|
+
disabled: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
103
106
|
/**
|
|
104
107
|
* @private Undocumented due to limitations in supporting in compact `Multiselect` (see SUI-8286 notes for more info).
|
|
105
108
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* @name Disabled
|
|
4
|
+
* @description If you absolutely need to disable a `Multiselect` use `"disabled="dimmed"`. This ensures the `Multiselect` does not respond to events, but can still receive focus to so that users can navigate to the `Multiselect` when using assistive technologies.
|
|
4
5
|
*/
|
|
5
6
|
declare function Disabled(): React.JSX.Element;
|
|
6
7
|
export default Disabled;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @name Load more on scroll bottom with select all
|
|
4
|
+
* @description Demonstrates incremental loading when the list is scrolled to the bottom.
|
|
5
|
+
* The `onScrollBottom` callback appends additional options to the existing list.
|
|
6
|
+
* A custom `onChange` handler applies "Select all" to the full dataset, so options loaded later remain selected as they appear.
|
|
7
|
+
*/
|
|
8
|
+
declare function LoadMoreWithSelectAll(): React.JSX.Element;
|
|
9
|
+
export default LoadMoreWithSelectAll;
|
|
@@ -58,7 +58,7 @@ interface SelectBasePropsBase {
|
|
|
58
58
|
* Prevents user interaction and adds disabled styling.
|
|
59
59
|
*
|
|
60
60
|
* If set to `dimmed`, the component is able to receive focus.
|
|
61
|
-
* If set to `disabled`, the component is unable to receive focus
|
|
61
|
+
* If set to `disabled`, the component is unable to receive focus.
|
|
62
62
|
*/
|
|
63
63
|
disabled?: boolean | 'dimmed' | 'disabled';
|
|
64
64
|
/**
|
|
@@ -127,6 +127,7 @@ interface SelectBasePropsBase {
|
|
|
127
127
|
/**
|
|
128
128
|
* A callback to receive the change events. If values is set, this callback is required.
|
|
129
129
|
* This must set the values prop to retain the change.
|
|
130
|
+
* Supports custom selection behavior.
|
|
130
131
|
*/
|
|
131
132
|
onChange?: SelectBaseChangeHandler;
|
|
132
133
|
/**
|
|
@@ -175,6 +176,9 @@ interface SelectBasePropsBase {
|
|
|
175
176
|
repositionMode?: 'none' | 'flip';
|
|
176
177
|
/**
|
|
177
178
|
* Determines how to display Select all/Clear all.
|
|
179
|
+
*
|
|
180
|
+
* By default, selection applies only to currently loaded options.
|
|
181
|
+
* Use `onChange` for custom selection behavior.
|
|
178
182
|
*/
|
|
179
183
|
selectAllAppearance?: 'buttongroup' | 'checkbox' | 'none';
|
|
180
184
|
showSelectedValuesFirst?: 'nextOpen' | 'immediately' | 'never';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { ComponentProps } from '../utils/types';
|
|
4
|
+
interface BodyPropsBase {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* A React ref which is set to the section DOM element when the component mounts and null when it unmounts.
|
|
8
|
+
*/
|
|
9
|
+
elementRef?: React.Ref<HTMLTableSectionElement>;
|
|
10
|
+
/**
|
|
11
|
+
* Alternate rows are given a darker background to improve readability.
|
|
12
|
+
*/
|
|
13
|
+
stripeRows?: boolean;
|
|
14
|
+
}
|
|
15
|
+
type BodyProps = ComponentProps<BodyPropsBase, 'tbody'>;
|
|
16
|
+
declare function Body({ children, elementRef, stripeRows, ...otherProps }: BodyProps): React.JSX.Element;
|
|
17
|
+
declare namespace Body {
|
|
18
|
+
var propTypes: {
|
|
19
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
20
|
+
elementRef: PropTypes.Requireable<object>;
|
|
21
|
+
stripeRows: PropTypes.Requireable<boolean>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export default Body;
|
|
25
|
+
export type { BodyPropsBase };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { ComponentProps } from '../utils/types';
|
|
4
|
+
interface CellPropsBase {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* A React ref which is set to the cell DOM element when the component mounts and null when it unmounts.
|
|
8
|
+
*/
|
|
9
|
+
elementRef?: React.Ref<HTMLTableCellElement>;
|
|
10
|
+
}
|
|
11
|
+
type CellProps = ComponentProps<CellPropsBase, 'td'>;
|
|
12
|
+
declare function Cell({ children, elementRef, ...otherProps }: CellProps): React.JSX.Element;
|
|
13
|
+
declare namespace Cell {
|
|
14
|
+
var propTypes: {
|
|
15
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
16
|
+
elementRef: PropTypes.Requireable<object>;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export default Cell;
|
|
20
|
+
export type { CellPropsBase };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { ComponentProps } from '../utils/types';
|
|
4
|
+
interface HeadPropsBase {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* A React ref which is set to the section DOM element when the component mounts and null when it unmounts.
|
|
8
|
+
*/
|
|
9
|
+
elementRef?: React.Ref<HTMLTableSectionElement>;
|
|
10
|
+
}
|
|
11
|
+
type HeadProps = ComponentProps<HeadPropsBase, 'thead'>;
|
|
12
|
+
declare function Head({ children, elementRef, ...otherProps }: HeadProps): React.JSX.Element;
|
|
13
|
+
declare namespace Head {
|
|
14
|
+
var propTypes: {
|
|
15
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
16
|
+
elementRef: PropTypes.Requireable<object>;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export default Head;
|
|
20
|
+
export type { HeadPropsBase };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { ComponentProps } from '../utils/types';
|
|
4
|
+
interface HeadCellPropsBase {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* A React ref which is set to the cell DOM element when the component mounts and null when it unmounts.
|
|
8
|
+
*/
|
|
9
|
+
elementRef?: React.Ref<HTMLTableCellElement>;
|
|
10
|
+
}
|
|
11
|
+
type HeadCellProps = ComponentProps<HeadCellPropsBase, 'th'>;
|
|
12
|
+
declare function HeadCell({ children, elementRef, ...otherProps }: HeadCellProps): React.JSX.Element;
|
|
13
|
+
declare namespace HeadCell {
|
|
14
|
+
var propTypes: {
|
|
15
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
16
|
+
elementRef: PropTypes.Requireable<object>;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export default HeadCell;
|
|
20
|
+
export type { HeadCellPropsBase };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { ComponentProps } from '../utils/types';
|
|
4
|
+
interface RowPropsBase {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* A React ref which is set to the row DOM element when the component mounts and null when it unmounts.
|
|
8
|
+
*/
|
|
9
|
+
elementRef?: React.Ref<HTMLTableRowElement>;
|
|
10
|
+
}
|
|
11
|
+
type RowProps = ComponentProps<RowPropsBase, 'tr'>;
|
|
12
|
+
declare function Row({ children, elementRef, ...otherProps }: RowProps): React.JSX.Element;
|
|
13
|
+
declare namespace Row {
|
|
14
|
+
var propTypes: {
|
|
15
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
16
|
+
elementRef: PropTypes.Requireable<object>;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export default Row;
|
|
20
|
+
export type { RowPropsBase };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Body from './Body';
|
|
4
|
+
import Cell from './Cell';
|
|
5
|
+
import Head from './Head';
|
|
6
|
+
import HeadCell from './HeadCell';
|
|
7
|
+
import Row from './Row';
|
|
8
|
+
import { ComponentProps } from '../utils/types';
|
|
9
|
+
interface SimpleTablePropsBase {
|
|
10
|
+
/**
|
|
11
|
+
* Must be `SimpleTable.Head` and `SimpleTable.Body`.
|
|
12
|
+
*/
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* A React ref which is set to the table element when the component mounts and null when it unmounts.
|
|
16
|
+
*/
|
|
17
|
+
elementRef?: React.Ref<HTMLTableElement>;
|
|
18
|
+
}
|
|
19
|
+
type SimpleTableProps = ComponentProps<SimpleTablePropsBase, 'table'>;
|
|
20
|
+
/**
|
|
21
|
+
* A lightweight table for static content. It preserves native table semantics and basic Splunk table styling
|
|
22
|
+
* without the interactive runtime used by `Table`.
|
|
23
|
+
*/
|
|
24
|
+
declare function SimpleTable({ children, elementRef, ...otherProps }: SimpleTableProps): React.JSX.Element;
|
|
25
|
+
declare namespace SimpleTable {
|
|
26
|
+
var propTypes: {
|
|
27
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
28
|
+
elementRef: PropTypes.Requireable<object>;
|
|
29
|
+
};
|
|
30
|
+
var Body: typeof import("./Body").default;
|
|
31
|
+
var Cell: typeof import("./Cell").default;
|
|
32
|
+
var Head: typeof import("./Head").default;
|
|
33
|
+
var HeadCell: typeof import("./HeadCell").default;
|
|
34
|
+
var Row: typeof import("./Row").default;
|
|
35
|
+
}
|
|
36
|
+
export default SimpleTable;
|
|
37
|
+
export { Body, Cell, Head, HeadCell, Row };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnyTheme, Interpolation, OptionalThemedProps } from '@splunk/themes';
|
|
3
|
+
import { ComponentProps } from '../utils/types';
|
|
4
|
+
type Color = React.CSSProperties['color'] | Interpolation<AnyTheme, OptionalThemedProps<AnyTheme>>;
|
|
5
|
+
type SpotLightAnchorElement = HTMLElement | null;
|
|
6
|
+
type SpotLightAnchorEdge = 'top' | 'right' | 'bottom' | 'left';
|
|
7
|
+
interface SpotLightColorStop {
|
|
8
|
+
/**
|
|
9
|
+
* Position of the stop within the radial gradient.
|
|
10
|
+
*/
|
|
11
|
+
at?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The color used at this gradient stop.
|
|
14
|
+
*/
|
|
15
|
+
color: Color;
|
|
16
|
+
/**
|
|
17
|
+
* The amount of color mixed into the stop, expressed as a CSS percentage.
|
|
18
|
+
*/
|
|
19
|
+
opacity?: string;
|
|
20
|
+
}
|
|
21
|
+
interface SpotLightAnchor {
|
|
22
|
+
/**
|
|
23
|
+
* The edge whose center should be used as the spotlight origin.
|
|
24
|
+
*/
|
|
25
|
+
edge: SpotLightAnchorEdge;
|
|
26
|
+
/**
|
|
27
|
+
* The element used to position the spotlight. Falls back to the spotlight host when omitted.
|
|
28
|
+
*/
|
|
29
|
+
element?: SpotLightAnchorElement;
|
|
30
|
+
/**
|
|
31
|
+
* Distance applied perpendicular to the chosen edge.
|
|
32
|
+
*/
|
|
33
|
+
inset?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Offset applied along the chosen edge axis.
|
|
36
|
+
*/
|
|
37
|
+
offset?: string;
|
|
38
|
+
}
|
|
39
|
+
interface SpotLightLayer {
|
|
40
|
+
/**
|
|
41
|
+
* Positions the spotlight relative to an element instead of explicit coordinates.
|
|
42
|
+
*/
|
|
43
|
+
anchor?: SpotLightAnchor;
|
|
44
|
+
/**
|
|
45
|
+
* The radial gradient height. When paired with `width`, this creates an elliptical spotlight.
|
|
46
|
+
*/
|
|
47
|
+
height: string;
|
|
48
|
+
/**
|
|
49
|
+
* Explicit gradient stops for multicolor spotlights.
|
|
50
|
+
*/
|
|
51
|
+
stops: SpotLightColorStop[];
|
|
52
|
+
/**
|
|
53
|
+
* The radial gradient width. When paired with `height`, this creates an elliptical spotlight.
|
|
54
|
+
*/
|
|
55
|
+
width: string;
|
|
56
|
+
/**
|
|
57
|
+
* Horizontal position for the spotlight center when `anchor` is not provided.
|
|
58
|
+
*/
|
|
59
|
+
x?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Vertical position for the spotlight center when `anchor` is not provided.
|
|
62
|
+
*/
|
|
63
|
+
y?: string;
|
|
64
|
+
}
|
|
65
|
+
interface SpotLightPropsBase {
|
|
66
|
+
/**
|
|
67
|
+
* Applies a blur filter to the combined spotlight surface.
|
|
68
|
+
*/
|
|
69
|
+
blur?: string;
|
|
70
|
+
/**
|
|
71
|
+
* A React ref which is set to the DOM element when the component mounts, and null when it unmounts.
|
|
72
|
+
*/
|
|
73
|
+
elementRef?: React.Ref<HTMLDivElement>;
|
|
74
|
+
/**
|
|
75
|
+
* Decorative radial gradient layers to render behind the content.
|
|
76
|
+
*/
|
|
77
|
+
layers: SpotLightLayer[];
|
|
78
|
+
}
|
|
79
|
+
type SpotLightProps = ComponentProps<SpotLightPropsBase, 'div'>;
|
|
80
|
+
/**
|
|
81
|
+
* SpotLight renders decorative radial gradients as a positioned sibling layer.
|
|
82
|
+
*/
|
|
83
|
+
export declare function SpotLight({ blur, elementRef, layers, ...otherProps }: SpotLightProps): React.JSX.Element;
|
|
84
|
+
export declare namespace SpotLight {
|
|
85
|
+
var propTypes: React.WeakValidationMap<SpotLightPropsBase>;
|
|
86
|
+
}
|
|
87
|
+
export default SpotLight;
|
|
88
|
+
export type { Color, SpotLightColorStop, SpotLightAnchor, SpotLightAnchorEdge, SpotLightAnchorElement, SpotLightLayer, SpotLightProps, SpotLightPropsBase, };
|
package/types/src/Table/Row.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ interface RowPropsBase {
|
|
|
96
96
|
stripe?: 'odd' | 'even' | 'none';
|
|
97
97
|
}
|
|
98
98
|
type RowProps = ComponentProps<RowPropsBase, 'tr'>;
|
|
99
|
-
declare function Row(
|
|
99
|
+
declare function Row({ actions, actionPrimary, actionsSecondary, children, data, dragId, disabled, pinnedColumns, isDraggable, elementRef, expandable, expanded, expansionRowIds, expansionRow, index, movableColumns, onClick, onExpansion, onKeyDown, onRequestToggle, primaryColumnIndex, rowScreenReaderText, selected, stripe, style, ...otherProps }: RowProps): React.JSX.Element;
|
|
100
100
|
declare namespace Row {
|
|
101
101
|
var propTypes: {
|
|
102
102
|
/** @private. Generally passed by Table rather than added directly. */
|