@splunk/react-ui 5.0.0-beta.4 → 5.0.0-rc.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/Button.js +3 -1
- package/ButtonSimple.js +92 -168
- package/CHANGELOG.md +4 -1
- package/CHANGELOG.v5.mdx +59 -0
- package/Card.js +29 -28
- package/Chip.js +171 -225
- package/Clickable.js +79 -76
- package/CollapsiblePanel.js +172 -164
- package/Color.js +584 -506
- package/ComboBox.js +1 -1
- package/ControlGroup.js +132 -127
- package/Date.js +163 -198
- package/Dropdown.js +97 -99
- package/DualListbox.js +439 -504
- package/File.js +449 -324
- package/FormRows.js +177 -175
- package/JSONTree.js +586 -617
- package/Layer.js +162 -97
- package/Link.js +20 -13
- package/MIGRATION.v5.mdx +98 -0
- package/Markdown.js +1 -1
- package/Menu.js +194 -195
- package/Message.js +119 -141
- package/MessageBar.js +109 -168
- package/ModalLayer.js +171 -217
- package/Multiselect.js +595 -602
- package/Number.js +103 -102
- package/Popover.js +195 -190
- package/Progress.js +68 -54
- package/RadioBar.js +146 -145
- package/RadioList.js +67 -65
- package/Resize.js +377 -265
- package/ResultsMenu.js +573 -663
- package/ScrollContainerContext.js +13 -9
- package/Search.js +50 -50
- package/Select.js +206 -199
- package/Slider.js +454 -329
- package/StepBar.js +2 -2
- package/Switch.js +220 -146
- package/TabBar.js +411 -409
- package/TabLayout.js +34 -34
- package/Table.js +1163 -1156
- package/Text.js +58 -58
- package/TextArea.js +278 -152
- package/Tooltip.js +173 -177
- package/Tree.js +177 -188
- 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/Color/Color.d.ts +2 -2
- package/types/src/Layer/Layer.d.ts +2 -1
- package/types/src/Layer/index.d.ts +1 -0
- 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/ModalLayer/ModalLayer.d.ts +16 -21
- 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/Popover/Popover.d.ts +4 -2
- 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/useRovingFocus.js +20 -23
- 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
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import React
|
|
2
|
-
|
|
3
|
-
declare class TabInput extends Component<object, {
|
|
4
|
-
values: (string | number | boolean)[];
|
|
5
|
-
}> {
|
|
6
|
-
constructor(props: object);
|
|
7
|
-
handleChange: MultiselectChangeHandler;
|
|
8
|
-
render(): React.JSX.Element;
|
|
9
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare function TabInput(): React.JSX.Element;
|
|
10
3
|
export default TabInput;
|
|
@@ -66,8 +66,10 @@ interface PopoverPropsBase {
|
|
|
66
66
|
*/
|
|
67
67
|
animationConfig?: SpringConfig;
|
|
68
68
|
/**
|
|
69
|
-
* `'normal'` is the default appearance
|
|
70
|
-
*
|
|
69
|
+
* `'normal'` is the default appearance.`'none'` is a transparent box.
|
|
70
|
+
*
|
|
71
|
+
* @deprecatedValue 'inverted'
|
|
72
|
+
* The 'inverted' value is deprecated and will be removed in a future major version.
|
|
71
73
|
*/
|
|
72
74
|
appearance?: 'normal' | 'inverted' | 'none';
|
|
73
75
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentProps } from '../utils/types';
|
|
4
4
|
type ResultsMenuScrollBottomHandler = (event: React.UIEvent<HTMLDivElement> | null) => void;
|
|
5
5
|
interface ResultsMenuPropsBase {
|
|
6
6
|
/**
|
|
@@ -29,6 +29,7 @@ interface ResultsMenuPropsBase {
|
|
|
29
29
|
* - `roving`: Does not retain focus inside the menu. One tab stop. Uses up/down arrow keys to navigate and loop inside the menu.
|
|
30
30
|
*/
|
|
31
31
|
focusMode?: 'roving' | 'normal' | 'never';
|
|
32
|
+
footerMessage?: React.ReactNode;
|
|
32
33
|
/**
|
|
33
34
|
* Whether or not to show the loading message and/or wait spinner. It's not recommended to
|
|
34
35
|
* pass old children when loading new children. The loading animation will show below any
|
|
@@ -36,6 +37,7 @@ interface ResultsMenuPropsBase {
|
|
|
36
37
|
*/
|
|
37
38
|
isLoading?: boolean;
|
|
38
39
|
loadingMessage?: React.ReactNode;
|
|
40
|
+
menuId?: string;
|
|
39
41
|
noOptionsMessage?: React.ReactNode;
|
|
40
42
|
onScroll?: React.UIEventHandler<Element>;
|
|
41
43
|
/**
|
|
@@ -47,8 +49,6 @@ interface ResultsMenuPropsBase {
|
|
|
47
49
|
*/
|
|
48
50
|
onScrollBottom?: ResultsMenuScrollBottomHandler;
|
|
49
51
|
placement?: string;
|
|
50
|
-
footerMessage?: React.ReactNode;
|
|
51
|
-
menuId?: string;
|
|
52
52
|
}
|
|
53
53
|
declare const propTypes: {
|
|
54
54
|
animateLoading: PropTypes.Requireable<boolean>;
|
|
@@ -59,41 +59,30 @@ declare const propTypes: {
|
|
|
59
59
|
footerMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
60
60
|
isLoading: PropTypes.Requireable<boolean>;
|
|
61
61
|
loadingMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
62
|
+
menuId: PropTypes.Requireable<string>;
|
|
62
63
|
noOptionsMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
63
64
|
onScroll: PropTypes.Requireable<(...args: any[]) => any>;
|
|
64
65
|
onScrollBottom: PropTypes.Requireable<(...args: any[]) => any>;
|
|
65
66
|
placement: PropTypes.Requireable<string>;
|
|
66
|
-
menuId: PropTypes.Requireable<string>;
|
|
67
67
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
private handleMount;
|
|
87
|
-
private handleMouseEnter;
|
|
88
|
-
private handleMouseLeave;
|
|
89
|
-
private handleScroll;
|
|
90
|
-
private handleWheelMenu;
|
|
91
|
-
private handleScrollBottomOnFullMenu;
|
|
92
|
-
private handleScrollBottom;
|
|
93
|
-
private checkFullHeight;
|
|
94
|
-
private renderFooterMessage;
|
|
95
|
-
private createMenuContextValue;
|
|
96
|
-
render(): React.JSX.Element;
|
|
68
|
+
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 namespace ResultsMenu {
|
|
71
|
+
var propTypes: {
|
|
72
|
+
animateLoading: PropTypes.Requireable<boolean>;
|
|
73
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
74
|
+
childrenStart: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
75
|
+
elementRef: PropTypes.Requireable<object>;
|
|
76
|
+
focusMode: PropTypes.Requireable<string>;
|
|
77
|
+
footerMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
78
|
+
isLoading: PropTypes.Requireable<boolean>;
|
|
79
|
+
loadingMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
80
|
+
menuId: PropTypes.Requireable<string>;
|
|
81
|
+
noOptionsMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
82
|
+
onScroll: PropTypes.Requireable<(...args: any[]) => any>;
|
|
83
|
+
onScrollBottom: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
|
+
placement: PropTypes.Requireable<string>;
|
|
85
|
+
};
|
|
97
86
|
}
|
|
98
87
|
export default ResultsMenu;
|
|
99
88
|
export { propTypes };
|
|
@@ -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/useRovingFocus.js
CHANGED
|
@@ -46,16 +46,14 @@
|
|
|
46
46
|
e.r(t);
|
|
47
47
|
// EXPORTS
|
|
48
48
|
e.d(t, {
|
|
49
|
-
default: () => /* reexport */
|
|
49
|
+
default: () => /* reexport */ u
|
|
50
50
|
});
|
|
51
51
|
// CONCATENATED MODULE: external "react"
|
|
52
52
|
const r = require("react");
|
|
53
53
|
// CONCATENATED MODULE: external "@splunk/ui-utils/focus"
|
|
54
54
|
const n = require("@splunk/ui-utils/focus");
|
|
55
|
-
// CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
|
|
56
|
-
const a = require("@splunk/ui-utils/keyboard");
|
|
57
55
|
// CONCATENATED MODULE: ./src/useRovingFocus/useRovingFocus.tsx
|
|
58
|
-
var
|
|
56
|
+
var a = {
|
|
59
57
|
enableLoop: false,
|
|
60
58
|
orientation: "horizontal",
|
|
61
59
|
enableTab: false,
|
|
@@ -80,49 +78,48 @@
|
|
|
80
78
|
* <button type="button">second</button>
|
|
81
79
|
* </div>
|
|
82
80
|
* ```
|
|
83
|
-
*/ function
|
|
81
|
+
*/ function o() {
|
|
84
82
|
var e = (0, r.useRef)(0);
|
|
85
83
|
var t = (0, r.useRef)([]);
|
|
86
|
-
var
|
|
84
|
+
var o = function r(n) {
|
|
87
85
|
e.current = n;
|
|
88
86
|
t.current.forEach((function(t, r) {
|
|
89
87
|
return r === e.current ? t.removeAttribute("tabindex") : t.setAttribute("tabindex", "-1");
|
|
90
88
|
}));
|
|
91
89
|
};
|
|
92
|
-
var
|
|
90
|
+
var u = function r(a) {
|
|
93
91
|
t.current = a != null ? (0, n.getSortedTabbableElements)(a, {
|
|
94
92
|
ignoreTabIndex: true
|
|
95
93
|
}) : [];
|
|
96
|
-
|
|
94
|
+
o(e.current);
|
|
97
95
|
};
|
|
98
|
-
var
|
|
96
|
+
var i = function e(r) {
|
|
99
97
|
var n = r.relatedTarget instanceof Element && t.current.includes(r.relatedTarget);
|
|
100
98
|
if (!n) {
|
|
101
|
-
|
|
99
|
+
o(0);
|
|
102
100
|
}
|
|
103
101
|
};
|
|
104
|
-
var
|
|
102
|
+
var c = function e(r) {
|
|
105
103
|
var n = r.target instanceof Element ? t.current.indexOf(r.target) : -1;
|
|
106
104
|
if (n >= 0) {
|
|
107
|
-
|
|
105
|
+
o(n);
|
|
108
106
|
}
|
|
109
107
|
};
|
|
110
|
-
var
|
|
111
|
-
var
|
|
112
|
-
/* Only apply focus if we are among the navigable items in this container */ if (r.nativeEvent.target instanceof HTMLElement &&
|
|
113
|
-
var
|
|
114
|
-
|
|
115
|
-
(0, n.handleFocus)(c, t.current, i, o);
|
|
108
|
+
var l = function e(r) {
|
|
109
|
+
var o = t.current.includes(r.nativeEvent.target);
|
|
110
|
+
/* Only apply focus if we are among the navigable items in this container */ if (r.nativeEvent.target instanceof HTMLElement && o) {
|
|
111
|
+
var u = t.current.indexOf(r.nativeEvent.target);
|
|
112
|
+
(0, n.handleFocus)(r.key, t.current, u, a);
|
|
116
113
|
}
|
|
117
114
|
};
|
|
118
115
|
return {
|
|
119
|
-
ref:
|
|
120
|
-
onBlur:
|
|
121
|
-
onFocus:
|
|
122
|
-
onKeyDown:
|
|
116
|
+
ref: u,
|
|
117
|
+
onBlur: i,
|
|
118
|
+
onFocus: c,
|
|
119
|
+
onKeyDown: l
|
|
123
120
|
};
|
|
124
121
|
}
|
|
125
|
-
/* harmony default export */ const
|
|
122
|
+
/* harmony default export */ const u = o;
|
|
126
123
|
// CONCATENATED MODULE: ./src/useRovingFocus/index.ts
|
|
127
124
|
module.exports = t;
|
|
128
125
|
/******/})();
|
package/types/src/Date/Icon.d.ts
DELETED
|
File without changes
|
|
File without changes
|