@splunk/react-ui 5.0.0-beta.4 → 5.0.0-beta.5
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/Button.js +3 -1
- package/CHANGELOG.md +4 -1
- package/CHANGELOG.v5.mdx +35 -0
- package/Card.js +163 -162
- package/Chip.js +171 -225
- package/Clickable.js +79 -76
- package/ComboBox.js +1 -1
- package/Date.js +160 -184
- package/DualListbox.js +439 -504
- package/File.js +449 -324
- package/FormRows.js +143 -142
- package/JSONTree.js +496 -521
- package/Layer.js +162 -97
- package/Link.js +20 -13
- package/MIGRATION.v5.mdx +47 -0
- package/Markdown.js +1 -1
- package/Message.js +119 -141
- package/MessageBar.js +109 -168
- package/Multiselect.js +595 -602
- package/Popover.js +194 -190
- package/Progress.js +68 -54
- package/RadioBar.js +4 -1
- package/RadioList.js +67 -65
- package/Resize.js +377 -265
- package/ResultsMenu.js +573 -661
- package/ScrollContainerContext.js +13 -9
- package/Search.js +1 -1
- package/Select.js +206 -199
- package/Slider.js +455 -329
- package/StepBar.js +2 -2
- package/Switch.js +88 -87
- package/TabBar.js +322 -317
- package/TabLayout.js +34 -34
- package/Table.js +548 -525
- package/Text.js +20 -19
- package/TextArea.js +278 -152
- package/Tooltip.js +173 -177
- package/Tree.js +2 -2
- package/Typography.js +30 -28
- package/WaitSpinner.js +6 -11
- package/cypress/support/commands.ts +14 -4
- package/cypress/support/index.d.ts +1 -1
- package/package.json +5 -5
- package/stubs-splunkui.d.ts +0 -4
- package/types/src/Card/Card.d.ts +3 -1
- package/types/src/Card/Header.d.ts +2 -0
- package/types/src/Card/docs/examples/HeadingTitle.d.ts +3 -0
- package/types/src/Clickable/Clickable.d.ts +11 -3
- package/types/src/Link/Link.d.ts +4 -0
- package/types/src/Message/Message.d.ts +1 -1
- package/types/src/MessageBar/MessageBar.d.ts +1 -1
- package/types/src/Multiselect/Multiselect.d.ts +1 -8
- package/types/src/Multiselect/Normal.d.ts +1 -7
- package/types/src/Multiselect/docs/examples/Children.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Error.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +2 -22
- package/types/src/Multiselect/docs/examples/Headings.d.ts +2 -1
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -25
- package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -9
- package/types/src/ResultsMenu/ResultsMenu.d.ts +23 -34
- package/types/src/Select/SelectBase.d.ts +2 -2
- package/types/src/TabBar/TabBar.d.ts +8 -5
- package/types/src/TabBar/TabBarContext.d.ts +1 -1
- package/types/src/TabLayout/TabLayout.d.ts +8 -5
- package/types/src/Typography/Typography.d.ts +27 -22
- package/types/src/Date/Icon.d.ts +0 -3
- package/types/src/TabBar/docs/examples/IconsAbove.d.ts +0 -3
- package/types/src/TabBar/docs/examples/VerticalIconsAbove.d.ts +0 -3
- /package/types/src/TabBar/docs/examples/{IconsLeft.d.ts → Icons.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{VerticalIconsLeft.d.ts → VerticalIcons.d.ts} +0 -0
|
@@ -218,8 +218,8 @@ interface ControlsProps extends Pick<SelectBaseProps, 'inputId' | 'inputRef' | '
|
|
|
218
218
|
filterKeyword: string;
|
|
219
219
|
hasChildren: boolean;
|
|
220
220
|
menuListboxId: string;
|
|
221
|
-
onClearAll: React.MouseEventHandler<HTMLButtonElement
|
|
222
|
-
onSelectAll: React.MouseEventHandler<HTMLButtonElement
|
|
221
|
+
onClearAll: React.MouseEventHandler<HTMLButtonElement>;
|
|
222
|
+
onSelectAll: React.MouseEventHandler<HTMLButtonElement>;
|
|
223
223
|
onTextBlur: TextBlurHandler;
|
|
224
224
|
onTextChange: TextChangeHandler;
|
|
225
225
|
onTextFocus: TextFocusHandler;
|
|
@@ -21,17 +21,20 @@ interface TabBarPropsBase {
|
|
|
21
21
|
* A React ref which is set to the DOM element when the component mounts and null when it unmounts.
|
|
22
22
|
*/
|
|
23
23
|
elementRef?: React.Ref<HTMLDivElement>;
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Position of icon in `TabBar.Tab` if it has an icon. Defaults to "left".
|
|
26
|
+
* @deprecated This prop is deprecated and will be removed in the next major version.
|
|
27
|
+
*/
|
|
25
28
|
iconPosition?: 'above' | 'left';
|
|
26
29
|
/** The layout of tabs. */
|
|
27
30
|
layout?: 'horizontal' | 'vertical';
|
|
31
|
+
/** Max width of each `TabBar.Tab` in pixels. Leave blank for auto max width. */
|
|
32
|
+
maxTabWidth?: number;
|
|
28
33
|
/** A callback that receives the event and data (`selectedTabId`). */
|
|
29
34
|
onChange?: TabBarChangeHandler;
|
|
30
|
-
/** Width of each `TabBar.Tab` in pixels. Must be greater than 50 pixels. Leave blank for auto width. */
|
|
31
|
-
tabWidth?: number;
|
|
32
35
|
}
|
|
33
36
|
type TabBarProps = ComponentProps<TabBarPropsBase, 'div'>;
|
|
34
|
-
declare function TabBar({ activeTabId, autoActivate, children, disabled, elementRef, iconPosition, layout,
|
|
37
|
+
declare function TabBar({ activeTabId, autoActivate, children, disabled, elementRef, iconPosition, layout, maxTabWidth, onChange, ...otherProps }: TabBarProps): React.JSX.Element;
|
|
35
38
|
declare namespace TabBar {
|
|
36
39
|
var propTypes: {
|
|
37
40
|
autoActivate: PropTypes.Requireable<boolean>;
|
|
@@ -42,8 +45,8 @@ declare namespace TabBar {
|
|
|
42
45
|
elementRef: PropTypes.Requireable<object>;
|
|
43
46
|
iconPosition: PropTypes.Requireable<string>;
|
|
44
47
|
layout: PropTypes.Requireable<string>;
|
|
48
|
+
maxTabWidth: PropTypes.Requireable<number>;
|
|
45
49
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
46
|
-
tabWidth: PropTypes.Requireable<number>;
|
|
47
50
|
};
|
|
48
51
|
var Tab: {
|
|
49
52
|
({ ariaControls, count, disabled, elementRef, icon, label, maxCount, tabId: tabIdProp, to, tooltip, menu, index, ...otherProps }: import("./Tab").TabPropsBase & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "css" | keyof import("./Tab").TabPropsBase>): React.JSX.Element;
|
|
@@ -6,9 +6,9 @@ export interface TabBarContext {
|
|
|
6
6
|
focusedTabId?: string;
|
|
7
7
|
iconPosition?: 'above' | 'left';
|
|
8
8
|
layout?: 'horizontal' | 'vertical';
|
|
9
|
+
maxTabWidth?: number | null;
|
|
9
10
|
onClick?: TabClickHandler;
|
|
10
11
|
onFocus?: TabFocusHandler;
|
|
11
|
-
width?: number | null;
|
|
12
12
|
onMenuOpen: (menusTabId: string) => void;
|
|
13
13
|
onMenuClose: DropdownRequestCloseHandler;
|
|
14
14
|
isMenuOpen: boolean;
|
|
@@ -23,14 +23,17 @@ interface TabLayoutPropsBase {
|
|
|
23
23
|
* A React ref which is set to the DOM element when the component mounts and null when it unmounts.
|
|
24
24
|
*/
|
|
25
25
|
elementRef?: React.Ref<HTMLDivElement>;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Position of icon in `TabBar.Tab` if it has an icon. Defaults to "left".
|
|
28
|
+
* @deprecated This prop is deprecated and will be removed in the next major version.
|
|
29
|
+
*/
|
|
27
30
|
iconPosition?: 'above' | 'left';
|
|
28
31
|
/**
|
|
29
32
|
* The layout direction for tabs.
|
|
30
33
|
*/
|
|
31
34
|
layout?: 'horizontal' | 'vertical';
|
|
32
|
-
/**
|
|
33
|
-
|
|
35
|
+
/** Max width of each `TabBar.Tab` in pixels. Leave blank for auto max width. */
|
|
36
|
+
maxTabWidth?: number;
|
|
34
37
|
/**
|
|
35
38
|
* A callback that receives the event and data (`selectedPanelId`). If activePanelId is set,
|
|
36
39
|
* this callback is required.
|
|
@@ -55,7 +58,7 @@ type TabLayoutProps = ComponentProps<TabLayoutPropsBaseControlled | TabLayoutPro
|
|
|
55
58
|
* The `TabLayout` is a group of managed `Panels`. Only one panel can be open at a time.
|
|
56
59
|
* `TabLayout` supports both the controlled and uncontrolled patterns.
|
|
57
60
|
*/
|
|
58
|
-
declare function TabLayout({ autoActivate, activePanelId: activePanelIdProp, children, defaultActivePanelId, elementRef, iconPosition, layout,
|
|
61
|
+
declare function TabLayout({ autoActivate, activePanelId: activePanelIdProp, children, defaultActivePanelId, elementRef, iconPosition, layout, maxTabWidth, onChange, ...otherProps }: TabLayoutProps): React.JSX.Element;
|
|
59
62
|
declare namespace TabLayout {
|
|
60
63
|
var Panel: typeof import("./Panel").default;
|
|
61
64
|
var propTypes: {
|
|
@@ -66,8 +69,8 @@ declare namespace TabLayout {
|
|
|
66
69
|
elementRef: PropTypes.Requireable<object>;
|
|
67
70
|
iconPosition: PropTypes.Requireable<string>;
|
|
68
71
|
layout: PropTypes.Requireable<string>;
|
|
72
|
+
maxTabWidth: PropTypes.Requireable<number>;
|
|
69
73
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
70
|
-
tabWidth: PropTypes.Requireable<number>;
|
|
71
74
|
};
|
|
72
75
|
}
|
|
73
76
|
export default TabLayout;
|
|
@@ -4,14 +4,6 @@ import { TypographyVariant, TypographyParams } from '@splunk/themes/mixins';
|
|
|
4
4
|
import { ComponentProps } from '../utils/types';
|
|
5
5
|
type TypographyElementTypes = 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'blockquote' | 'dd' | 'dl' | 'dt' | 'figcaption' | 'figure' | 'li' | 'ol' | 'ul' | 'pre' | 'abbr' | 'cite' | 'code' | 'data' | 'dfn' | 'em' | 'u' | 'time' | 'sup' | 'sub' | 'strong' | 'small' | 'samp' | 's' | 'var' | 'ruby' | 'rt' | 'rp';
|
|
6
6
|
interface TypographyPropsBase extends TypographyParams {
|
|
7
|
-
/**
|
|
8
|
-
* Text and inline icons
|
|
9
|
-
* */
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
/**
|
|
12
|
-
* A React ref which is set to the DOM element when the component mounts, and null when it unmounts.
|
|
13
|
-
*/
|
|
14
|
-
elementRef?: React.Ref<HTMLElement>;
|
|
15
7
|
/**
|
|
16
8
|
* Tag for the element to render children content into.
|
|
17
9
|
* Use the most semantically appropriate tag.
|
|
@@ -19,26 +11,34 @@ interface TypographyPropsBase extends TypographyParams {
|
|
|
19
11
|
*/
|
|
20
12
|
as: TypographyElementTypes;
|
|
21
13
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
14
|
+
* Text and inline icons
|
|
15
|
+
* */
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Set the color to a system-standard color: e.g. `active` for `@splunk/themes/variables.contentColorActive`.
|
|
24
19
|
*/
|
|
25
|
-
|
|
20
|
+
color?: 'active' | 'default' | 'disabled' | 'inverted' | 'muted' | 'inherit';
|
|
26
21
|
/**
|
|
27
|
-
*
|
|
22
|
+
* A React ref which is set to the DOM element when the component mounts, and null when it unmounts.
|
|
28
23
|
*/
|
|
29
|
-
|
|
24
|
+
elementRef?: React.Ref<HTMLElement>;
|
|
30
25
|
/**
|
|
31
|
-
* Set the
|
|
26
|
+
* Set the font-family to sans-serif or monospace based on current theme.
|
|
32
27
|
*/
|
|
33
|
-
|
|
28
|
+
family?: 'sansSerif' | 'monospace' | 'title';
|
|
34
29
|
/**
|
|
35
30
|
* Set the line-height to a system-standard size.
|
|
36
31
|
*/
|
|
37
32
|
lineHeight?: 'single' | 'tight' | 'snug' | 'comfortable' | 'relaxed' | 'spacious' | 'normal';
|
|
38
33
|
/**
|
|
39
|
-
* Set the
|
|
34
|
+
* Set the size to a system-standard size.
|
|
40
35
|
*/
|
|
41
|
-
|
|
36
|
+
size?: 24 | 20 | 18 | 16 | 14 | 12;
|
|
37
|
+
/**
|
|
38
|
+
* A variant from the Splunk Design System's Type: 'body', 'title1', 'title2', 'title3',
|
|
39
|
+
* 'title4', 'title5', 'title6', 'largeBody', 'smallBody', 'monoBody', or 'monoSmallBody'.
|
|
40
|
+
*/
|
|
41
|
+
variant?: TypographyVariant;
|
|
42
42
|
/**
|
|
43
43
|
* Set the font-weight to a system-standard value.
|
|
44
44
|
*
|
|
@@ -46,23 +46,28 @@ interface TypographyPropsBase extends TypographyParams {
|
|
|
46
46
|
* See: [font-weight | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#common_weight_name_mapping)
|
|
47
47
|
*/
|
|
48
48
|
weight?: 'light' | 'normal' | 'semiBold' | 'bold' | 'extraBold' | 'heavy';
|
|
49
|
+
/**
|
|
50
|
+
* Remove all browser-default styles and apply theme-specific defaults.
|
|
51
|
+
*/
|
|
52
|
+
withReset?: boolean;
|
|
49
53
|
}
|
|
50
54
|
type TypographyProps = ComponentProps<TypographyPropsBase, TypographyElementTypes>;
|
|
51
55
|
/**
|
|
52
56
|
* Typography renders text content with styling based on the Splunk Design System.
|
|
53
57
|
*/
|
|
54
|
-
export declare function Typography({ children,
|
|
58
|
+
export declare function Typography({ as, children, color, elementRef, family, lineHeight, size, variant, weight, withReset, ...otherProps }: TypographyProps): React.JSX.Element;
|
|
55
59
|
export declare namespace Typography {
|
|
56
60
|
var propTypes: {
|
|
57
|
-
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
58
61
|
as: PropTypes.Validator<string>;
|
|
62
|
+
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
63
|
+
color: PropTypes.Requireable<string>;
|
|
59
64
|
elementRef: PropTypes.Requireable<object>;
|
|
60
65
|
family: PropTypes.Requireable<string>;
|
|
61
|
-
variant: PropTypes.Requireable<"body" | "title1" | "title2" | "title3" | "title4" | "title5" | "title6" | "largeBody" | "smallBody" | "monoBody" | "monoSmallBody">;
|
|
62
|
-
size: PropTypes.Requireable<number>;
|
|
63
66
|
lineHeight: PropTypes.Requireable<string>;
|
|
64
|
-
|
|
67
|
+
size: PropTypes.Requireable<number>;
|
|
68
|
+
variant: PropTypes.Requireable<"body" | "title1" | "title2" | "title3" | "title4" | "title5" | "title6" | "largeBody" | "smallBody" | "monoBody" | "monoSmallBody">;
|
|
65
69
|
weight: PropTypes.Requireable<string>;
|
|
70
|
+
withReset: PropTypes.Requireable<boolean>;
|
|
66
71
|
};
|
|
67
72
|
}
|
|
68
73
|
export default Typography;
|
package/types/src/Date/Icon.d.ts
DELETED
|
File without changes
|
|
File without changes
|