@splunk/react-ui 4.29.0 → 4.31.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.
- package/Accordion.js +1 -0
- package/CHANGELOG.md +39 -3
- package/Card.js +17 -17
- package/Chip.js +5 -5
- package/Clickable.js +107 -87
- package/Code.js +10 -22
- package/CollapsiblePanel.js +8 -8
- package/ComboBox.js +43 -38
- package/Date.js +6 -6
- package/Divider.js +96 -45
- package/DualListbox.js +1 -1
- package/Link.js +77 -75
- package/MIGRATION.mdx +51 -1
- package/Markdown.js +10 -9
- package/Menu.js +5 -5
- package/Message.js +160 -149
- package/ModalLayer.js +2 -1
- package/Multiselect.js +9 -6
- package/Number.js +19 -18
- package/Paginator.js +239 -223
- package/RadioBar.js +43 -39
- package/ResultsMenu.js +14 -11
- package/Search.js +227 -220
- package/Select.js +77 -72
- package/SidePanel.js +1 -1
- package/StepBar.js +1 -1
- package/Table.js +2082 -1594
- package/Text.js +1 -0
- package/TextArea.d.ts +1 -1
- package/cypress/support/component.ts +2 -2
- package/package.json +21 -20
- package/test-runner-jest.config.js +1 -0
- package/types/src/Accordion/Accordion.d.ts +3 -7
- package/types/src/Accordion/Panel.d.ts +2 -2
- package/types/src/Anchor/Anchor.d.ts +1 -1
- package/types/src/AnimationToggle/AnimationToggle.d.ts +3 -3
- package/types/src/Box/Box.d.ts +1 -1
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +4 -4
- package/types/src/Breadcrumbs/Item.d.ts +1 -1
- package/types/src/Button/Button.d.ts +5 -5
- package/types/src/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +10 -10
- package/types/src/Calendar/Calendar.d.ts +3 -3
- package/types/src/Calendar/DateTable.d.ts +2 -2
- package/types/src/Calendar/Day.d.ts +3 -3
- package/types/src/Calendar/MonthHeader.d.ts +6 -6
- package/types/src/Card/Body.d.ts +1 -1
- package/types/src/Card/Card.d.ts +6 -6
- package/types/src/Card/Footer.d.ts +1 -1
- package/types/src/Card/Header.d.ts +1 -1
- package/types/src/CardLayout/CardLayout.d.ts +4 -4
- package/types/src/Chip/Chip.d.ts +5 -5
- package/types/src/Clickable/Clickable.d.ts +12 -4
- package/types/src/Clickable/NavigationProvider.d.ts +26 -5
- package/types/src/CloseButton/CloseButton.d.ts +1 -1
- package/types/src/Code/Code.d.ts +2 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +9 -5
- package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +2 -2
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupInset.d.ts +2 -0
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -1
- package/types/src/Color/Color.d.ts +8 -8
- package/types/src/Color/Swatch.d.ts +2 -2
- package/types/src/ColumnLayout/Column.d.ts +1 -1
- package/types/src/ColumnLayout/ColumnLayout.d.ts +1 -1
- package/types/src/ColumnLayout/Row.d.ts +1 -1
- package/types/src/ComboBox/ComboBox.d.ts +7 -6
- package/types/src/ComboBox/Option.d.ts +3 -3
- package/types/src/Concertina/Concertina.d.ts +2 -2
- package/types/src/Concertina/Heading.d.ts +3 -3
- package/types/src/Concertina/Panel.d.ts +4 -4
- package/types/src/Concertina/types.d.ts +1 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +5 -5
- package/types/src/Date/Date.d.ts +10 -10
- package/types/src/DefinitionList/DefinitionList.d.ts +2 -2
- package/types/src/DefinitionList/Description.d.ts +1 -1
- package/types/src/DefinitionList/Term.d.ts +1 -1
- package/types/src/Divider/Divider.d.ts +7 -2
- package/types/src/Divider/docs/examples/Decorative.d.ts +2 -0
- package/types/src/Dropdown/Dropdown.d.ts +10 -10
- package/types/src/DualListbox/DualListbox.d.ts +4 -4
- package/types/src/DualListbox/DualListboxContext.d.ts +7 -7
- package/types/src/DualListbox/Label.d.ts +2 -2
- package/types/src/DualListbox/Listbox.d.ts +4 -4
- package/types/src/DualListbox/ListboxContext.d.ts +3 -3
- package/types/src/DualListbox/Option.d.ts +2 -2
- package/types/src/DualListbox/ToolbarButton.d.ts +3 -3
- package/types/src/DualListbox/ToolbarContext.d.ts +3 -3
- package/types/src/EventListener/EventListener.d.ts +1 -1
- package/types/src/File/File.d.ts +8 -8
- package/types/src/File/Item.d.ts +2 -2
- package/types/src/FormRows/FormRows.d.ts +6 -6
- package/types/src/FormRows/Row.d.ts +2 -2
- package/types/src/FormRows/RowInternal.d.ts +1 -1
- package/types/src/FormRows/SortableList.d.ts +1 -1
- package/types/src/FormRows/SortableRow.d.ts +3 -3
- package/types/src/Heading/Heading.d.ts +2 -2
- package/types/src/Image/Image.d.ts +2 -2
- package/types/src/JSONTree/JSONTree.d.ts +6 -6
- package/types/src/JSONTree/JSONTreeItem.d.ts +3 -3
- package/types/src/JSONTree/renderTreeItems.d.ts +1 -1
- package/types/src/Layer/Layer.d.ts +3 -3
- package/types/src/Link/Link.d.ts +4 -4
- package/types/src/List/Item.d.ts +1 -1
- package/types/src/List/List.d.ts +3 -3
- package/types/src/Markdown/Markdown.d.ts +18 -12
- package/types/src/Markdown/renderers/MarkdownAnchorHeading.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownCode.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownImage.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownItem.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownLink.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownList.d.ts +3 -3
- package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -1
- package/types/src/Menu/Divider.d.ts +1 -1
- package/types/src/Menu/Heading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +10 -10
- package/types/src/Menu/Menu.d.ts +9 -9
- package/types/src/Message/Link.d.ts +3 -3
- package/types/src/Message/Message.d.ts +1 -1
- package/types/src/MessageBar/MessageBar.d.ts +2 -2
- package/types/src/Modal/Body.d.ts +1 -1
- package/types/src/Modal/Footer.d.ts +1 -1
- package/types/src/Modal/Header.d.ts +1 -1
- package/types/src/Modal/Modal.d.ts +4 -4
- package/types/src/ModalLayer/ModalLayer.d.ts +3 -3
- package/types/src/Monogram/Monogram.d.ts +5 -5
- package/types/src/Multiselect/Compact.d.ts +2 -2
- package/types/src/Multiselect/Multiselect.d.ts +7 -7
- package/types/src/Multiselect/Normal.d.ts +2 -2
- package/types/src/Multiselect/Option.d.ts +3 -3
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +1 -1
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +1 -1
- package/types/src/Number/Number.d.ts +22 -22
- package/types/src/Paginator/Button.d.ts +3 -3
- package/types/src/Paginator/Compact.d.ts +4 -4
- package/types/src/Paginator/PageControl.d.ts +2 -2
- package/types/src/Paginator/PageSelect.d.ts +2 -2
- package/types/src/Paginator/Paginator.d.ts +2 -2
- package/types/src/Paragraph/Paragraph.d.ts +1 -1
- package/types/src/Popover/Popover.d.ts +11 -11
- package/types/src/Popover/PopoverHitArea.d.ts +1 -1
- package/types/src/Progress/Progress.d.ts +1 -1
- package/types/src/RadioBar/Option.d.ts +8 -4
- package/types/src/RadioBar/RadioBar.d.ts +8 -8
- package/types/src/RadioList/Option.d.ts +1 -1
- package/types/src/RadioList/RadioList.d.ts +3 -3
- package/types/src/Resize/Resize.d.ts +4 -4
- package/types/src/Resize/docs/examples/Basic.d.ts +2 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +7 -5
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedItem.d.ts +1 -1
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ResultsMenu/VirtualizedResultsMenu/injectVirtualizedItem.d.ts +2 -2
- package/types/src/ScreenReaderContent/ScreenReaderContent.d.ts +2 -2
- package/types/src/Scroll/Inner.d.ts +3 -3
- package/types/src/Scroll/Scroll.d.ts +2 -2
- package/types/src/Search/Option.d.ts +8 -8
- package/types/src/Search/Search.d.ts +4 -4
- package/types/src/Select/Option.d.ts +2 -2
- package/types/src/Select/OptionBase.d.ts +8 -8
- package/types/src/Select/Select.d.ts +5 -5
- package/types/src/Select/SelectAllOption.d.ts +1 -1
- package/types/src/Select/SelectBase.d.ts +9 -8
- package/types/src/SidePanel/SidePanel.d.ts +3 -3
- package/types/src/Slider/Slider.d.ts +8 -8
- package/types/src/SlidingPanels/Panel.d.ts +2 -2
- package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -2
- package/types/src/SplitButton/Item.d.ts +2 -2
- package/types/src/SplitButton/SplitButton.d.ts +1 -1
- package/types/src/StaticContent/StaticContent.d.ts +1 -1
- package/types/src/StepBar/Step.d.ts +1 -1
- package/types/src/StepBar/StepBar.d.ts +1 -1
- package/types/src/Switch/Switch.d.ts +4 -8
- package/types/src/TabBar/Tab.d.ts +7 -8
- package/types/src/TabBar/TabBar.d.ts +5 -5
- package/types/src/TabLayout/Panel.d.ts +2 -2
- package/types/src/TabLayout/TabLayout.d.ts +3 -3
- package/types/src/Table/Body.d.ts +4 -8
- package/types/src/Table/Caption.d.ts +2 -2
- package/types/src/Table/Cell.d.ts +3 -3
- package/types/src/Table/DragHandle.d.ts +1 -1
- package/types/src/Table/Head.d.ts +6 -6
- package/types/src/Table/HeadCell.d.ts +9 -9
- package/types/src/Table/HeadDropdownCell.d.ts +11 -11
- package/types/src/Table/HeadInner.d.ts +5 -5
- package/types/src/Table/HeadTable.d.ts +2 -2
- package/types/src/Table/KeyboardSensor.d.ts +79 -0
- package/types/src/Table/Row.d.ts +12 -14
- package/types/src/Table/RowDragCell.d.ts +9 -40
- package/types/src/Table/Table.d.ts +12 -10
- package/types/src/Table/Toggle.d.ts +1 -1
- package/types/src/Table/docs/examples/FilterColumnValues.d.ts +1 -1
- package/types/src/Text/Text.d.ts +13 -11
- package/types/src/TextArea/TextArea.d.ts +10 -10
- package/types/src/Tooltip/Tooltip.d.ts +9 -9
- package/types/src/TransitionOpen/TransitionOpen.d.ts +2 -2
- package/types/src/Tree/Tree.d.ts +3 -3
- package/types/src/Tree/TreeItem.d.ts +4 -4
- package/types/src/Typography/Typography.d.ts +5 -5
- package/types/src/WaitSpinner/WaitSpinner.d.ts +1 -1
- package/types/src/fixtures/FetchOptions.d.ts +2 -2
- package/types/src/useKeyPress/index.d.ts +2 -2
- package/types/src/utils/types.d.ts +4 -4
- package/types/src/Divider/docs/examples/AriaHidden.d.ts +0 -2
- package/types/src/Resize/docs/examples/Typical.d.ts +0 -2
|
@@ -14,13 +14,13 @@ interface DefinitionListPropsBase {
|
|
|
14
14
|
*/
|
|
15
15
|
termWidth?: number | string;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
type DefinitionListProps = ComponentProps<DefinitionListPropsBase, 'dl'>;
|
|
18
18
|
declare function DefinitionList({ children, elementRef, termWidth, ...otherProps }: DefinitionListProps): JSX.Element;
|
|
19
19
|
declare namespace DefinitionList {
|
|
20
20
|
var propTypes: {
|
|
21
21
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
22
22
|
elementRef: PropTypes.Requireable<object>;
|
|
23
|
-
termWidth: PropTypes.Requireable<
|
|
23
|
+
termWidth: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
24
24
|
};
|
|
25
25
|
var Description: typeof import("./Description").default;
|
|
26
26
|
var Term: typeof import("./Term").default;
|
|
@@ -8,7 +8,7 @@ interface DescriptionPropsBase {
|
|
|
8
8
|
*/
|
|
9
9
|
elementRef?: React.Ref<HTMLElement>;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
type DescriptionProps = ComponentProps<DescriptionPropsBase, 'dd'>;
|
|
12
12
|
/**
|
|
13
13
|
* Container component for a `DefinitionList` description.
|
|
14
14
|
*/
|
|
@@ -8,12 +8,17 @@ interface DividerPropsBase {
|
|
|
8
8
|
elementRef?: React.Ref<HTMLHRElement>;
|
|
9
9
|
/** Sets the orientation of this `Divider`. */
|
|
10
10
|
orientation?: 'horizontal' | 'vertical';
|
|
11
|
+
/**
|
|
12
|
+
* Remove semantics of the divider.
|
|
13
|
+
*/
|
|
14
|
+
decorative?: boolean;
|
|
11
15
|
}
|
|
12
|
-
|
|
13
|
-
declare function Divider({ elementRef, orientation, ...otherProps }: DividerProps): JSX.Element;
|
|
16
|
+
type DividerProps = ComponentProps<DividerPropsBase, 'hr' | 'div'>;
|
|
17
|
+
declare function Divider({ elementRef, decorative, orientation, ...otherProps }: DividerProps): JSX.Element;
|
|
14
18
|
declare namespace Divider {
|
|
15
19
|
var propTypes: {
|
|
16
20
|
elementRef: PropTypes.Requireable<object>;
|
|
21
|
+
decorative: PropTypes.Requireable<boolean>;
|
|
17
22
|
orientation: PropTypes.Requireable<string>;
|
|
18
23
|
};
|
|
19
24
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
/** @public */
|
|
3
|
-
|
|
3
|
+
type ComponentWithFocus = React.Component & Pick<HTMLOrSVGElement, 'focus'>;
|
|
4
4
|
/** @public */
|
|
5
|
-
|
|
5
|
+
type DropdownChildrenRenderer = (data: {
|
|
6
6
|
anchorHeight: number | null;
|
|
7
7
|
anchorWidth: number | null;
|
|
8
8
|
maxHeight: number | null;
|
|
@@ -10,22 +10,22 @@ declare type DropdownChildrenRenderer = (data: {
|
|
|
10
10
|
placement: DropdownPlacementStatus | null;
|
|
11
11
|
}) => React.ReactNode;
|
|
12
12
|
/** @public */
|
|
13
|
-
|
|
13
|
+
type DropdownPlacement = 'above' | 'below' | 'left' | 'right' | 'vertical' | 'horizontal';
|
|
14
14
|
/** @public */
|
|
15
|
-
|
|
15
|
+
type DropdownPlacementStatus = 'above' | 'below' | 'left' | 'right' | 'misaligned';
|
|
16
16
|
/** @public */
|
|
17
|
-
|
|
17
|
+
type DropdownPossibleCloseReason = 'clickAway' | 'contentClick' | 'escapeKey' | 'offScreen' | 'tabKey' | 'toggleClick';
|
|
18
18
|
/** @public */
|
|
19
|
-
|
|
19
|
+
type DropdownRequestCloseHandler = (data: {
|
|
20
20
|
event?: React.MouseEvent<HTMLElement> | MouseEvent | KeyboardEvent | TouchEvent;
|
|
21
21
|
reason: DropdownPossibleCloseReason;
|
|
22
22
|
}) => void;
|
|
23
23
|
/** @public */
|
|
24
|
-
|
|
24
|
+
type DropdownRequestOpenHandler = (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, data: {
|
|
25
25
|
reason: 'toggleClick' | 'toggleKeydown';
|
|
26
26
|
}) => void;
|
|
27
27
|
/** @public */
|
|
28
|
-
|
|
28
|
+
type DropdownToggleElement = React.ReactElement<React.HTMLAttributes<HTMLElement> & {
|
|
29
29
|
'data-test-popover-id'?: string;
|
|
30
30
|
'data-test'?: string;
|
|
31
31
|
ref?: React.Ref<ComponentWithFocus | HTMLElement | null>;
|
|
@@ -127,7 +127,7 @@ interface DropdownPropsBaseControlled extends DropdownPropsBase {
|
|
|
127
127
|
interface DropdownPropsBaseUncontrolled extends DropdownPropsBase {
|
|
128
128
|
open?: never;
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
type DropdownProps = (DropdownPropsBaseControlled | DropdownPropsBaseUncontrolled) & typeof defaultProps;
|
|
131
131
|
interface DropdownState {
|
|
132
132
|
anchor: HTMLElement | null;
|
|
133
133
|
open: boolean;
|
|
@@ -144,7 +144,7 @@ declare class Dropdown extends Component<DropdownProps, DropdownState> {
|
|
|
144
144
|
* docs extraction.
|
|
145
145
|
*/
|
|
146
146
|
static possibleCloseReasons: DropdownPossibleCloseReason[];
|
|
147
|
-
static propTypes: React.WeakValidationMap<
|
|
147
|
+
static propTypes: React.WeakValidationMap<DropdownProps>;
|
|
148
148
|
static defaultProps: Required<Pick<DropdownPropsBase, "align" | "retainFocus" | "takeFocus" | "closeReasons" | "canCoverAnchor" | "defaultPlacement" | "repositionMode" | "focusToggleReasons" | "openWithArrowKeys">>;
|
|
149
149
|
constructor(props: Readonly<DropdownProps>);
|
|
150
150
|
componentDidUpdate(): void;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Option from './Option';
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
|
4
4
|
/** @public */
|
|
5
|
-
|
|
5
|
+
type DualListboxSelectHandler = (event: React.MouseEvent<HTMLButtonElement> | React.MouseEvent<HTMLLIElement> | React.KeyboardEvent<HTMLUListElement>, data: {
|
|
6
6
|
/**
|
|
7
7
|
* The list `name` associated to the batch action.
|
|
8
8
|
*/
|
|
@@ -13,7 +13,7 @@ declare type DualListboxSelectHandler = (event: React.MouseEvent<HTMLButtonEleme
|
|
|
13
13
|
values: string[];
|
|
14
14
|
}) => void;
|
|
15
15
|
/** @public */
|
|
16
|
-
|
|
16
|
+
type DualListboxChangeHandler = (event: React.MouseEvent<HTMLButtonElement> | React.MouseEvent<HTMLLIElement> | React.KeyboardEvent<HTMLUListElement>, data: {
|
|
17
17
|
/**
|
|
18
18
|
* The values being changed.
|
|
19
19
|
*/
|
|
@@ -40,7 +40,7 @@ declare type DualListboxChangeHandler = (event: React.MouseEvent<HTMLButtonEleme
|
|
|
40
40
|
*/
|
|
41
41
|
targetValues: string[];
|
|
42
42
|
}) => void;
|
|
43
|
-
|
|
43
|
+
type ListboxConfig = {
|
|
44
44
|
name: string;
|
|
45
45
|
label: string;
|
|
46
46
|
};
|
|
@@ -77,7 +77,7 @@ interface DualListboxPropsBase {
|
|
|
77
77
|
*/
|
|
78
78
|
onSelect?: DualListboxSelectHandler;
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
type DualListboxProps = ComponentProps<DualListboxPropsBase, 'div'>;
|
|
81
81
|
declare function DualListbox({ children, controlled, fill, inline, onChange, onSelect, lists, ...otherProps }: DualListboxProps): JSX.Element;
|
|
82
82
|
declare namespace DualListbox {
|
|
83
83
|
var propTypes: React.WeakValidationMap<DualListboxPropsBase>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
2
|
+
export type UpdateCallbackHandler = (callback?: React.DispatchWithoutAction) => void;
|
|
3
|
+
export type UpdateNameCallbackHandler = (name: string, callback?: React.DispatchWithoutAction) => void;
|
|
4
|
+
export type UpdateValueCallbackHandler = (value: string, callback?: React.DispatchWithoutAction) => void;
|
|
5
|
+
export type GetActiveValueHandler = (name: string) => string | undefined;
|
|
6
|
+
export type GetCountHandler = (name: string) => number;
|
|
7
|
+
export type GetScreenReaderMessageHandler = () => string | undefined;
|
|
8
|
+
export type GetSelectedStateHandler = (value: string) => boolean;
|
|
9
9
|
export interface DualListboxContextValue {
|
|
10
10
|
controlled?: boolean;
|
|
11
11
|
getActiveValue?: GetActiveValueHandler;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SwitchCheckboxWithSomeClickHandler } from '@splunk/react-ui/Switch';
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
|
4
|
-
|
|
4
|
+
type ListboxLabelSwitchClickHandler = SwitchCheckboxWithSomeClickHandler;
|
|
5
5
|
interface ListboxLabelPropsBase {
|
|
6
6
|
/**
|
|
7
7
|
* ID for the label. Used to label the switch and associated listbox.
|
|
@@ -28,7 +28,7 @@ interface ListboxLabelPropsBase {
|
|
|
28
28
|
*/
|
|
29
29
|
value: string;
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
type ListboxLabelProps = ComponentProps<ListboxLabelPropsBase, 'div'>;
|
|
32
32
|
declare function ListboxLabel({ id, index, listId, name, onSwitchClick, value }: ListboxLabelProps): JSX.Element | null;
|
|
33
33
|
declare namespace ListboxLabel {
|
|
34
34
|
var propTypes: React.WeakValidationMap<ListboxLabelPropsBase>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentProps } from '../utils/types';
|
|
3
|
-
|
|
3
|
+
type ListboxClickHandler = (event: React.MouseEvent<HTMLLIElement> | React.KeyboardEvent<HTMLUListElement>, data: {
|
|
4
4
|
name: string;
|
|
5
5
|
value: string;
|
|
6
6
|
}) => void;
|
|
7
|
-
|
|
7
|
+
type ListboxKeyDownHandler = (event: React.KeyboardEvent<HTMLUListElement>, data: {
|
|
8
8
|
name: string;
|
|
9
9
|
}) => void;
|
|
10
|
-
|
|
10
|
+
type ListboxSelectAllClickHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
|
|
11
11
|
name: string;
|
|
12
12
|
selected: true | false | 'some';
|
|
13
13
|
}) => void;
|
|
@@ -45,7 +45,7 @@ interface ListboxPropsBase {
|
|
|
45
45
|
*/
|
|
46
46
|
onSelectAllClick?: ListboxSelectAllClickHandler;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
type ListboxProps = ComponentProps<ListboxPropsBase, 'ul'>;
|
|
49
49
|
declare function Listbox({ children, elementRef, index, label, name, onClick, onKeyDown, onSelectAllClick, ...otherProps }: ListboxProps): JSX.Element;
|
|
50
50
|
declare namespace Listbox {
|
|
51
51
|
var propTypes: React.WeakValidationMap<ListboxPropsBase>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UpdateNameCallbackHandler, UpdateValueCallbackHandler } from './DualListboxContext';
|
|
3
|
-
export
|
|
3
|
+
export type OptionClickHandler = (event: React.MouseEvent<HTMLLIElement>, data: {
|
|
4
4
|
value: string;
|
|
5
5
|
name?: string;
|
|
6
6
|
}) => void;
|
|
7
|
-
export
|
|
7
|
+
export type GetOptionStateHandler = (value: string) => {
|
|
8
8
|
active: boolean;
|
|
9
9
|
selected: boolean;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type GetLabelStateHandler = () => {
|
|
12
12
|
disabled: boolean;
|
|
13
13
|
selected: boolean | 'some';
|
|
14
14
|
selectedValueCount: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentProps } from '../utils/types';
|
|
3
|
-
|
|
3
|
+
type OptionClickHandler = (event: React.MouseEvent<HTMLLIElement>, data: {
|
|
4
4
|
value: string;
|
|
5
5
|
}) => void;
|
|
6
6
|
interface OptionPropsBase {
|
|
@@ -26,7 +26,7 @@ interface OptionPropsBase {
|
|
|
26
26
|
*/
|
|
27
27
|
value: string;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
type OptionProps = ComponentProps<OptionPropsBase, 'li'>;
|
|
30
30
|
declare function Option({ id, label, selected: selectedProp, value, ...otherProps }: OptionProps): JSX.Element | null;
|
|
31
31
|
declare namespace Option {
|
|
32
32
|
var propTypes: React.WeakValidationMap<OptionPropsBase>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentProps } from '../utils/types';
|
|
3
|
-
|
|
3
|
+
type ButtonClickHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
|
|
4
4
|
name: string;
|
|
5
5
|
}) => void;
|
|
6
6
|
interface ToolbarButtonPropsBase {
|
|
@@ -29,10 +29,10 @@ interface ToolbarButtonPropsBase {
|
|
|
29
29
|
*/
|
|
30
30
|
tooltipPlacement: 'above' | 'below' | 'left' | 'right';
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
type ToolbarButtonProps = ComponentProps<ToolbarButtonPropsBase, 'button'>;
|
|
33
33
|
declare function ToolbarButton({ ariaLabel, ariaKeyShortcuts, icon, name, tooltipLabel, tooltipPlacement, ...otherProps }: ToolbarButtonProps): JSX.Element | null;
|
|
34
34
|
declare namespace ToolbarButton {
|
|
35
|
-
var propsTypes: React.WeakValidationMap<
|
|
35
|
+
var propsTypes: React.WeakValidationMap<ToolbarButtonProps>;
|
|
36
36
|
}
|
|
37
37
|
export default ToolbarButton;
|
|
38
38
|
export { ButtonClickHandler };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type ButtonClickHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
|
|
3
3
|
name: string;
|
|
4
4
|
}) => void;
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type UpdateCallbackHandler = (name: string, callback?: React.DispatchWithoutAction) => void;
|
|
6
|
+
export type GetButtonStateHandler = (value: string) => {
|
|
7
7
|
disabled: boolean;
|
|
8
8
|
};
|
|
9
9
|
export interface ToolbarContextValue {
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
* This is a private component.
|
|
4
4
|
* Please see the Readme file for more information.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
type CustomEvent = string | keyof DocumentEventMap | keyof HTMLElementEventMap | keyof WindowEventMap | Event;
|
|
7
7
|
interface EventListenerProp {
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
target: Document | HTMLElement | Window | null | undefined;
|
package/types/src/File/File.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ import { AnyTheme } from '@splunk/themes';
|
|
|
4
4
|
import Item from './Item';
|
|
5
5
|
import { ClassComponentProps } from '../utils/types';
|
|
6
6
|
/** @public */
|
|
7
|
-
|
|
7
|
+
type FileRequestAddHandler = (files: globalThis.File[], data: {
|
|
8
8
|
name?: string;
|
|
9
9
|
}) => void;
|
|
10
10
|
/** @public */
|
|
11
|
-
|
|
11
|
+
type FileRequestRemoveHandler = (data: {
|
|
12
12
|
event: {
|
|
13
13
|
itemId?: any;
|
|
14
14
|
name: string;
|
|
@@ -18,7 +18,7 @@ declare type FileRequestRemoveHandler = (data: {
|
|
|
18
18
|
itemId?: any;
|
|
19
19
|
name?: string;
|
|
20
20
|
}) => void;
|
|
21
|
-
|
|
21
|
+
type FileRequestRetryHandler = (data: {
|
|
22
22
|
event: {
|
|
23
23
|
itemId?: any;
|
|
24
24
|
name: string;
|
|
@@ -73,7 +73,7 @@ interface FilePropsBase {
|
|
|
73
73
|
splunkTheme: AnyTheme;
|
|
74
74
|
}
|
|
75
75
|
declare const defaultProps: Required<Pick<FilePropsBase, 'allowMultiple' | 'disabled' | 'dropAnywhere' | 'error'>>;
|
|
76
|
-
|
|
76
|
+
type FileProps = ClassComponentProps<FilePropsBase, typeof defaultProps, 'div'>;
|
|
77
77
|
interface FileState {
|
|
78
78
|
dragOver: boolean;
|
|
79
79
|
focusedInput: boolean;
|
|
@@ -86,7 +86,7 @@ interface FileState {
|
|
|
86
86
|
declare class File extends Component<FileProps, FileState> {
|
|
87
87
|
private inputId;
|
|
88
88
|
private inputCount;
|
|
89
|
-
static propTypes: React.WeakValidationMap<
|
|
89
|
+
static propTypes: React.WeakValidationMap<FileProps>;
|
|
90
90
|
static defaultProps: Required<Pick<FilePropsBase, "disabled" | "error" | "allowMultiple" | "dropAnywhere">>;
|
|
91
91
|
static Item: typeof Item;
|
|
92
92
|
constructor(props: Readonly<FileProps>);
|
|
@@ -99,9 +99,9 @@ declare class File extends Component<FileProps, FileState> {
|
|
|
99
99
|
private addFiles;
|
|
100
100
|
render(): JSX.Element;
|
|
101
101
|
}
|
|
102
|
-
declare const HoistedFileWithTheme: React.ForwardRefExoticComponent<Pick<Pick<Pick<ClassComponentProps<FilePropsBase, Required<Pick<FilePropsBase, "disabled" | "error" | "allowMultiple" | "dropAnywhere">>, "div", never>, "slot" | "style" | "title" | "children" | "onChange" | "onPause" | "name" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "disabled" | "accept" | "required" | "help" | "elementRef" | "error" | "splunkTheme" | "onRequestRemove" | "fullscreen" | "onRequestRetry" | "allowMultiple" | "dropAnywhere" | "onRequestAdd" | "supportsMessage"> & Pick<PropTypes.InferProps<React.WeakValidationMap<ClassComponentProps<FilePropsBase, Required<Pick<FilePropsBase, "disabled" | "error" | "allowMultiple" | "dropAnywhere">>, "div", never>>>, "inlist"> & Pick<ClassComponentProps<FilePropsBase, Required<Pick<FilePropsBase, "disabled" | "error" | "allowMultiple" | "dropAnywhere">>, "div", never>, never>, "slot" | "style" | "title" | "children" | "onChange" | "onPause" | "name" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "accept" | "required" | "help" | "elementRef" | "splunkTheme" | "onRequestRemove" | "fullscreen" | "onRequestRetry" | "onRequestAdd" | "supportsMessage"> & Partial<Pick<Pick<ClassComponentProps<FilePropsBase, Required<Pick<FilePropsBase, "disabled" | "error" | "allowMultiple" | "dropAnywhere">>, "div", never>, "slot" | "style" | "title" | "children" | "onChange" | "onPause" | "name" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "disabled" | "accept" | "required" | "help" | "elementRef" | "error" | "splunkTheme" | "onRequestRemove" | "fullscreen" | "onRequestRetry" | "allowMultiple" | "dropAnywhere" | "onRequestAdd" | "supportsMessage"> & Pick<PropTypes.InferProps<React.WeakValidationMap<ClassComponentProps<FilePropsBase, Required<Pick<FilePropsBase, "disabled" | "error" | "allowMultiple" | "dropAnywhere">>, "div", never>>>, "inlist"> & Pick<ClassComponentProps<FilePropsBase, Required<Pick<FilePropsBase, "disabled" | "error" | "allowMultiple" | "dropAnywhere">>, "div", never>, never>, "disabled" | "error" | "allowMultiple" | "dropAnywhere">> & Partial<Pick<Required<Pick<FilePropsBase, "disabled" | "error" | "allowMultiple" | "dropAnywhere">>, never>> & {
|
|
103
|
-
ref?:
|
|
104
|
-
}, "
|
|
102
|
+
declare const HoistedFileWithTheme: React.ForwardRefExoticComponent<Omit<Pick<Pick<FileProps, "slot" | "style" | "title" | "onChange" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | keyof FilePropsBase> & Pick<PropTypes.InferProps<React.WeakValidationMap<FileProps>>, "inlist"> & Pick<FileProps, never>, "slot" | "style" | "title" | "children" | "onChange" | "onPause" | "name" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "accept" | "required" | "help" | "elementRef" | "splunkTheme" | "onRequestRemove" | "fullscreen" | "onRequestRetry" | "onRequestAdd" | "supportsMessage"> & Partial<Pick<Pick<FileProps, "slot" | "style" | "title" | "onChange" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | keyof FilePropsBase> & Pick<PropTypes.InferProps<React.WeakValidationMap<FileProps>>, "inlist"> & Pick<FileProps, never>, "disabled" | "error" | "allowMultiple" | "dropAnywhere">> & Partial<Pick<Required<Pick<FilePropsBase, "disabled" | "error" | "allowMultiple" | "dropAnywhere">>, never>> & {
|
|
103
|
+
ref?: React.Ref<File> | undefined;
|
|
104
|
+
}, "splunkTheme">> & {
|
|
105
105
|
Item: typeof Item;
|
|
106
106
|
};
|
|
107
107
|
export default HoistedFileWithTheme;
|
package/types/src/File/Item.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
|
4
|
-
|
|
4
|
+
type ItemClickHandler = (data: {
|
|
5
5
|
itemId?: any;
|
|
6
6
|
name: string;
|
|
7
7
|
index: number;
|
|
@@ -24,7 +24,7 @@ interface ItemPropsBase {
|
|
|
24
24
|
* not applicable, uploadPercentage must be undefined. */
|
|
25
25
|
uploadPercentage?: number;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
type ItemProps = ComponentProps<ItemPropsBase, 'div'>;
|
|
28
28
|
declare function Item({ disabled, error, itemId, name, index, uploadPercentage, ...otherProps }: ItemProps): JSX.Element;
|
|
29
29
|
declare namespace Item {
|
|
30
30
|
var propTypes: {
|
|
@@ -3,7 +3,7 @@ import Row from './Row';
|
|
|
3
3
|
import type { RowRequestRemoveHandler, RowWithoutSortable } from './Row';
|
|
4
4
|
import { ClassComponentProps } from '../utils/types';
|
|
5
5
|
/** @public */
|
|
6
|
-
|
|
6
|
+
type FormRowsRequestMoveHandler = (data: {
|
|
7
7
|
fromIndex: number;
|
|
8
8
|
toIndex: number;
|
|
9
9
|
}) => void;
|
|
@@ -28,9 +28,9 @@ interface FormRowsPropsBase {
|
|
|
28
28
|
onRequestMove?: FormRowsRequestMoveHandler;
|
|
29
29
|
}
|
|
30
30
|
declare const defaultProps: Required<Pick<FormRowsPropsBase, 'addLabel' | 'disabled' | 'header'>>;
|
|
31
|
-
|
|
31
|
+
type FormRowsProps = ClassComponentProps<FormRowsPropsBase, typeof defaultProps, 'div'>;
|
|
32
32
|
declare class FormRows extends Component<FormRowsProps, {}> {
|
|
33
|
-
static propTypes: React.WeakValidationMap<
|
|
33
|
+
static propTypes: React.WeakValidationMap<FormRowsProps>;
|
|
34
34
|
static defaultProps: Required<Pick<FormRowsPropsBase, "header" | "disabled" | "addLabel">>;
|
|
35
35
|
static Row: typeof Row;
|
|
36
36
|
/**
|
|
@@ -57,7 +57,7 @@ declare class FormRows extends Component<FormRowsProps, {}> {
|
|
|
57
57
|
* @param items Array of current FormRows to add to.
|
|
58
58
|
* @return New array of FormRows with new Row added.
|
|
59
59
|
*/
|
|
60
|
-
static addRow(element: React.ReactElement, items: React.ReactElement[]): React.ReactElement<any, string |
|
|
60
|
+
static addRow(element: React.ReactElement, items: React.ReactElement[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
61
61
|
/**
|
|
62
62
|
* Static function for moving a row.
|
|
63
63
|
*
|
|
@@ -74,7 +74,7 @@ declare class FormRows extends Component<FormRowsProps, {}> {
|
|
|
74
74
|
* @param items Array of current FormRows.
|
|
75
75
|
* @return New array of FormRows arranged in new order.
|
|
76
76
|
*/
|
|
77
|
-
static moveRow(fromIndex: number, toIndex: number, items: React.ReactElement[]): React.ReactElement<any, string |
|
|
77
|
+
static moveRow(fromIndex: number, toIndex: number, items: React.ReactElement[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
78
78
|
/**
|
|
79
79
|
* Static function for removing a row.
|
|
80
80
|
*
|
|
@@ -90,7 +90,7 @@ declare class FormRows extends Component<FormRowsProps, {}> {
|
|
|
90
90
|
* @param items Array of current FormRows.
|
|
91
91
|
* @return New array of FormRows with Row of given index deleted.
|
|
92
92
|
*/
|
|
93
|
-
static removeRow(index: number, items: React.ReactElement[]): React.ReactElement<any, string |
|
|
93
|
+
static removeRow(index: number, items: React.ReactElement[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
94
94
|
private handleKeyDown;
|
|
95
95
|
private handleSortEnd;
|
|
96
96
|
render(): JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import FormRowsContext from './FormRowsContext';
|
|
3
|
-
|
|
3
|
+
type RowKeyDownHandler = (event: React.KeyboardEvent<HTMLDivElement>, data: {
|
|
4
4
|
index: number;
|
|
5
5
|
}) => void;
|
|
6
6
|
/** @public */
|
|
7
|
-
|
|
7
|
+
type RowRequestRemoveHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
|
|
8
8
|
index: number;
|
|
9
9
|
}) => void;
|
|
10
10
|
interface RowPropsBase {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/** @public */
|
|
3
|
-
|
|
3
|
+
type RowRequestRemoveHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
|
|
4
4
|
index: number;
|
|
5
5
|
}) => void;
|
|
6
6
|
interface RowInternalPropsBase {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type RowKeyDownHandler = (event: React.KeyboardEvent<HTMLDivElement>, data: {
|
|
3
3
|
index: number;
|
|
4
4
|
}) => void;
|
|
5
5
|
/** @public */
|
|
6
|
-
|
|
6
|
+
type RowRequestRemoveHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
|
|
7
7
|
index: number;
|
|
8
8
|
}) => void;
|
|
9
9
|
interface RowPropsBase {
|
|
@@ -17,4 +17,4 @@ interface RowPropsBase {
|
|
|
17
17
|
}
|
|
18
18
|
declare const Row: React.ForwardRefExoticComponent<RowPropsBase & React.RefAttributes<HTMLDivElement>>;
|
|
19
19
|
export default Row;
|
|
20
|
-
export type {
|
|
20
|
+
export type { RowKeyDownHandler, RowPropsBase, RowRequestRemoveHandler };
|
|
@@ -23,7 +23,7 @@ interface HeadingPropsBase {
|
|
|
23
23
|
*/
|
|
24
24
|
variant?: TypographyTitleVariant;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
type HeadingProps = ComponentProps<HeadingPropsBase, 'h1'>;
|
|
27
27
|
declare const levelToElement: {
|
|
28
28
|
readonly '1': "h1";
|
|
29
29
|
readonly '2': "h2";
|
|
@@ -39,7 +39,7 @@ declare namespace Heading {
|
|
|
39
39
|
var propTypes: {
|
|
40
40
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
41
41
|
elementRef: PropTypes.Requireable<object>;
|
|
42
|
-
level: PropTypes.Requireable<
|
|
42
|
+
level: PropTypes.Requireable<string | number>;
|
|
43
43
|
variant: PropTypes.Requireable<string>;
|
|
44
44
|
};
|
|
45
45
|
}
|