@splunk/react-ui 4.4.0 → 4.5.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/Accordion.js +37 -21
- package/Anchor.js +2 -2
- package/AnimationToggle.js +2 -2
- package/Box.js +2 -2
- package/Button.js +36 -12
- package/ButtonGroup.js +27 -6
- package/ButtonSimple.js +6 -6
- package/CHANGELOG.md +54 -1
- package/Calendar.js +14 -14
- package/Card.js +49 -23
- package/CardLayout.js +31 -10
- package/Chip.js +77 -53
- package/Clickable.js +2 -2
- package/CloseButton.js +6 -6
- package/Code.js +4 -4
- package/CollapsiblePanel.js +6 -6
- package/Color.js +103 -56
- package/ColumnLayout.js +4 -4
- package/ComboBox.js +22 -17
- package/Concertina.js +73 -68
- package/ControlGroup.js +72 -24
- package/Date.js +9 -9
- package/DefinitionList.js +6 -6
- package/Dropdown.js +12 -12
- package/EventListener.js +168 -0
- package/FetchOptions.js +8 -8
- package/File.js +93 -82
- package/FormRows.js +66 -58
- package/Image.js +14 -14
- package/JSONTree.js +5 -5
- package/Layer.js +32 -20
- package/Link.js +6 -6
- package/List.js +2 -2
- package/Markdown.js +250 -88
- package/Menu.js +70 -64
- package/Message.js +18 -18
- package/Modal.js +68 -14
- package/ModalLayer.js +4 -4
- package/Monogram.js +12 -11
- package/Multiselect.js +122 -78
- package/Number.js +19 -16
- package/Paginator.js +10 -10
- package/Paragraph.js +2 -2
- package/Popover.js +52 -38
- package/Progress.js +6 -6
- package/RadioBar.js +56 -69
- package/RadioList.js +2 -2
- package/Resize.js +19 -15
- package/ResultsMenu.js +8 -8
- package/ScreenReaderContent.js +2 -2
- package/Scroll.js +16 -14
- package/ScrollContainerContext.js +5 -5
- package/Search.d.ts +2 -0
- package/Search.js +797 -0
- package/Select.js +83 -43
- package/SidePanel.js +6 -6
- package/Slider.js +29 -25
- package/SlidingPanels.js +4 -4
- package/StaticContent.js +2 -2
- package/StepBar.js +56 -52
- package/Switch.js +8 -8
- package/TabBar.js +126 -85
- package/TabLayout.js +4 -5
- package/Table.js +188 -138
- package/Text.js +69 -63
- package/Tooltip.js +11 -11
- package/TransitionOpen.js +9 -9
- package/WaitSpinner.js +3 -4
- package/package.json +4 -5
- package/types/src/Accordion/AccordionContext.d.ts +10 -0
- package/types/src/Accordion/Panel.d.ts +0 -9
- package/types/src/Button/Button.d.ts +4 -2
- package/types/src/ButtonGroup/ButtonGroupContext.d.ts +7 -0
- package/types/src/ButtonSimple/ButtonSimple.d.ts +5 -5
- package/types/src/Card/Card.d.ts +2 -0
- package/types/src/CardLayout/CardLayoutContext.d.ts +8 -0
- package/types/src/Color/Color.d.ts +2 -2
- package/types/src/ComboBox/ComboBox.d.ts +4 -3
- package/types/src/Concertina/ConcertinaContext.d.ts +8 -0
- package/types/src/Concertina/Panel.d.ts +2 -4
- package/types/src/ControlGroup/ControlGroup.d.ts +6 -1
- package/types/src/Date/Date.d.ts +3 -3
- package/types/src/EventListener/EventListener.d.ts +18 -0
- package/types/src/EventListener/index.d.ts +2 -0
- package/types/src/File/File.d.ts +6 -4
- package/types/src/File/FileContext.d.ts +3 -0
- package/types/src/File/Item.d.ts +5 -8
- package/types/src/FormRows/FormRows.d.ts +2 -2
- package/types/src/FormRows/FormRowsContext.d.ts +10 -0
- package/types/src/FormRows/Row.d.ts +5 -16
- package/types/src/Markdown/Markdown.d.ts +2 -0
- package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +14 -0
- package/types/src/Markdown/renderers/MarkdownCode.d.ts +15 -0
- package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +16 -0
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +15 -0
- package/types/src/Markdown/renderers/MarkdownImage.d.ts +18 -0
- package/types/src/Markdown/renderers/MarkdownItem.d.ts +14 -0
- package/types/src/Markdown/renderers/MarkdownLink.d.ts +18 -0
- package/types/src/Markdown/renderers/MarkdownList.d.ts +26 -0
- package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +14 -0
- package/types/src/Markdown/renderers/index.d.ts +10 -0
- package/types/src/Modal/Modal.d.ts +15 -3
- package/types/src/Monogram/Monogram.d.ts +5 -1
- package/types/src/Multiselect/Compact.d.ts +12 -4
- package/types/src/Multiselect/Multiselect.d.ts +14 -4
- package/types/src/Multiselect/Normal.d.ts +7 -2
- package/types/src/Number/Number.d.ts +11 -7
- package/types/src/Popover/Popover.d.ts +2 -2
- package/types/src/RadioBar/Option.d.ts +4 -14
- package/types/src/RadioBar/RadioBar.d.ts +2 -2
- package/types/src/RadioBar/RadioBarContext.d.ts +9 -0
- package/types/src/Scroll/Inner.d.ts +1 -1
- package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +4 -4
- package/types/src/Search/Option.d.ts +60 -0
- package/types/src/Search/Search.d.ts +97 -0
- package/types/src/Search/index.d.ts +2 -0
- package/types/src/Select/Select.d.ts +6 -2
- package/types/src/Select/SelectBase.d.ts +12 -5
- package/types/src/Slider/Slider.d.ts +2 -2
- package/types/src/StepBar/Step.d.ts +1 -13
- package/types/src/StepBar/StepBarContext.d.ts +8 -0
- package/types/src/TabBar/Tab.d.ts +5 -13
- package/types/src/TabBar/TabBarContext.d.ts +14 -0
- package/types/src/Table/Body.d.ts +1 -1
- package/types/src/Table/Head.d.ts +1 -1
- package/types/src/Table/Row.d.ts +10 -3
- package/types/src/Table/Table.d.ts +3 -2
- package/types/src/Text/Text.d.ts +11 -7
- package/types/src/icons/Sort.d.ts +3 -0
- package/types/src/usePrevious/index.d.ts +2 -0
- package/types/src/usePrevious/usePrevious.d.ts +12 -0
- package/usePrevious.js +137 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { AnyTheme } from '@splunk/themes
|
|
3
|
+
import { AnyTheme } from '@splunk/themes';
|
|
4
4
|
import { ClassComponentProps } from '../utils/types';
|
|
5
5
|
/** @public */
|
|
6
6
|
declare type PopoverChildrenRenderer = (data: {
|
|
@@ -156,7 +156,7 @@ declare class Popover extends Component<PopoverProps, PopoverState> {
|
|
|
156
156
|
private windowSizeMeasurementEl;
|
|
157
157
|
private handleScroll;
|
|
158
158
|
private handleWindowScroll;
|
|
159
|
-
static contextType: React.Context<
|
|
159
|
+
static contextType: React.Context<Window | Document | HTMLElement | null | undefined>;
|
|
160
160
|
static defaultProps: Required<Pick<PopoverPropsBase, "open" | "align" | "appearance" | "animation" | "retainFocus" | "takeFocus" | "closeReasons" | "canCoverAnchor" | "defaultPlacement" | "repositionMode" | "autoCloseWhenOffScreen">>;
|
|
161
161
|
static propTypes: React.WeakValidationMap<ClassComponentProps<PopoverPropsBase, Required<Pick<PopoverPropsBase, "open" | "align" | "appearance" | "animation" | "retainFocus" | "takeFocus" | "closeReasons" | "canCoverAnchor" | "defaultPlacement" | "repositionMode" | "autoCloseWhenOffScreen">>, "div", never>>;
|
|
162
162
|
private static getArrowStyle;
|
|
@@ -6,8 +6,8 @@ declare type OptionClickHandler = (event: React.MouseEvent<HTMLAnchorElement | H
|
|
|
6
6
|
value: any;
|
|
7
7
|
}) => void;
|
|
8
8
|
interface OptionPropsBase {
|
|
9
|
-
/** @private */
|
|
10
|
-
|
|
9
|
+
/** @private Set by `RadioBar`. */
|
|
10
|
+
append?: boolean;
|
|
11
11
|
/** Add a disabled attribute and prevent clicking. */
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
/** Applies an icon to the button. See @splunk/react-icons documentation for
|
|
@@ -16,33 +16,23 @@ interface OptionPropsBase {
|
|
|
16
16
|
/** The text shown on the button. */
|
|
17
17
|
label?: string;
|
|
18
18
|
/** @private Set by `RadioBar`. */
|
|
19
|
-
|
|
19
|
+
prepend?: boolean;
|
|
20
20
|
/** @private Set by `RadioBar`. */
|
|
21
21
|
selected?: boolean;
|
|
22
|
-
/** @private Set by `RadioBar`. */
|
|
23
|
-
size?: 'small' | 'medium' | 'large';
|
|
24
22
|
/** The value of the `Option`. */
|
|
25
23
|
value: any;
|
|
26
|
-
/** @private Set by `RadioBar`. */
|
|
27
|
-
error?: boolean;
|
|
28
24
|
}
|
|
29
25
|
declare type OptionProps = ComponentProps<OptionPropsBase, 'button'>;
|
|
30
|
-
declare function Option({
|
|
26
|
+
declare function Option({ disabled, label, icon, selected, value, ...otherProps }: OptionProps): JSX.Element;
|
|
31
27
|
declare namespace Option {
|
|
32
28
|
var propTypes: {
|
|
33
|
-
/** @private */
|
|
34
|
-
appearance: PropTypes.Requireable<string>;
|
|
35
29
|
disabled: PropTypes.Requireable<boolean>;
|
|
36
30
|
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
37
31
|
label: PropTypes.Requireable<string>;
|
|
38
32
|
/** @private Set by `RadioBar`. */
|
|
39
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
-
/** @private Set by `RadioBar`. */
|
|
41
33
|
selected: PropTypes.Requireable<boolean>;
|
|
42
34
|
/** The value of the `Option`. */
|
|
43
35
|
value: PropTypes.Validator<any>;
|
|
44
|
-
/** @private Set by `RadioBar`. */
|
|
45
|
-
error: PropTypes.Requireable<boolean>;
|
|
46
36
|
};
|
|
47
37
|
}
|
|
48
38
|
export default Option;
|