@splunk/react-ui 4.17.0 → 4.18.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 +2 -2
- package/AnimationToggle.js +5 -5
- package/Button.js +7 -7
- package/ButtonSimple.js +2 -2
- package/CHANGELOG.md +40 -7
- package/Calendar.js +7 -5
- package/CloseButton.js +5 -5
- package/Code.js +7 -6
- package/Color.js +206 -179
- package/ColumnLayout.js +8 -8
- package/ComboBox.js +2 -0
- package/Concertina.js +10 -10
- package/DefinitionList.js +2 -2
- package/Dropdown.js +7 -7
- package/DualListbox.js +11 -8
- package/File.js +9 -9
- package/FormRows.js +4 -4
- package/Heading.js +8 -4
- package/JSONTree.js +30 -28
- package/Layer.js +10 -10
- package/Link.js +4 -4
- package/List.js +7 -4
- package/MIGRATION.mdx +295 -0
- package/Markdown.js +12 -7
- package/Menu.js +19 -19
- package/Message.js +25 -25
- package/MessageBar.js +21 -21
- package/Modal.js +7 -7
- package/Multiselect.js +46 -36
- package/Number.js +3 -2
- package/Paginator.js +6 -6
- package/Popover.js +17 -13
- package/Progress.js +2 -2
- package/RadioBar.js +2 -2
- package/RadioList.js +2 -2
- package/Resize.js +2 -2
- package/Scroll.js +2 -2
- package/Select.js +14 -13
- package/SidePanel.js +2 -2
- package/Slider.js +7 -7
- package/StepBar.js +8 -8
- package/Switch.js +2 -2
- package/TabBar.js +85 -54
- package/Table.js +13 -13
- package/Text.js +7 -7
- package/TextArea.js +8 -6
- package/Typography.js +2 -2
- package/package.json +10 -15
- package/stubs-dependencies.d.ts +0 -9
- package/stubs-splunkui.d.ts +0 -24
- package/types/src/Button/Button.d.ts +5 -3
- package/types/src/Clickable/Clickable.d.ts +2 -1
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -0
- package/types/src/Color/Color.d.ts +6 -6
- package/types/src/Color/Palette.d.ts +46 -0
- package/types/src/Concertina/Panel.d.ts +1 -0
- package/types/src/FormRows/Row.d.ts +1 -0
- package/types/src/Heading/Heading.d.ts +7 -2
- package/types/src/JSONTree/JSONTree.d.ts +2 -1
- package/types/src/Layer/Layer.d.ts +2 -0
- package/types/src/List/List.d.ts +9 -1
- package/types/src/List/docs/examples/CustomizedList.d.ts +2 -0
- package/types/src/List/docs/examples/OrderedList.d.ts +2 -0
- package/types/src/List/docs/examples/UnorderedList.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -0
- package/types/src/Markdown/renderers/MarkdownList.d.ts +2 -0
- package/types/src/Multiselect/Normal.d.ts +1 -1
- package/types/src/Number/Number.d.ts +9 -4
- package/types/src/Popover/Popover.d.ts +2 -0
- package/types/src/TabBar/Tab.d.ts +5 -1
- package/types/src/Table/Head.d.ts +1 -0
- package/types/src/Table/HeadCell.d.ts +1 -0
- package/types/src/Table/HeadDropdownCell.d.ts +1 -0
- package/types/src/Table/Table.d.ts +3 -1
- package/types/src/Text/Text.d.ts +3 -1
- package/types/src/TextArea/TextArea.d.ts +13 -4
- package/types/src/TextArea/docs/examples/ClearContent.d.ts +2 -0
- package/MIGRATION.md +0 -49
- package/types/src/List/docs/examples/Decimal.d.ts +0 -2
- package/types/src/List/docs/examples/Disc.d.ts +0 -2
- package/types/src/List/docs/examples/LowerAlpha.d.ts +0 -2
- package/types/src/List/docs/examples/UpperAlpha.d.ts +0 -2
|
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { SpringConfig } from 'react-spring';
|
|
4
4
|
import { AnyTheme } from '@splunk/themes';
|
|
5
|
+
import ScrollContainerContext from '@splunk/react-ui/ScrollContainerContext';
|
|
5
6
|
import { ClassComponentProps } from '../utils/types';
|
|
6
7
|
/** @public */
|
|
7
8
|
declare type PopoverChildrenRenderer = (data: {
|
|
@@ -177,6 +178,7 @@ declare class Popover extends Component<PopoverProps, PopoverState> {
|
|
|
177
178
|
private handleScroll;
|
|
178
179
|
private handleWindowScroll;
|
|
179
180
|
private allowAnimationUpdates;
|
|
181
|
+
context: React.ContextType<typeof ScrollContainerContext>;
|
|
180
182
|
static contextType: React.Context<Window | Document | HTMLElement | null | undefined>;
|
|
181
183
|
static defaultProps: Required<Pick<PopoverPropsBase, "open" | "align" | "appearance" | "animation" | "retainFocus" | "takeFocus" | "closeReasons" | "canCoverAnchor" | "defaultPlacement" | "repositionMode" | "animationConfig" | "autoCloseWhenOffScreen">>;
|
|
182
184
|
static propTypes: React.WeakValidationMap<ClassComponentProps<PopoverPropsBase, Required<Pick<PopoverPropsBase, "open" | "align" | "appearance" | "animation" | "retainFocus" | "takeFocus" | "closeReasons" | "canCoverAnchor" | "defaultPlacement" | "repositionMode" | "animationConfig" | "autoCloseWhenOffScreen">>, "div", never>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { ClassComponentProps } from '../utils/types';
|
|
3
2
|
import TabBarContext from './TabBarContext';
|
|
3
|
+
import { ClassComponentProps } from '../utils/types';
|
|
4
4
|
declare type TabClickHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
|
|
5
5
|
tabId?: string;
|
|
6
6
|
tabKey?: number;
|
|
@@ -34,6 +34,8 @@ interface TabPropsBase {
|
|
|
34
34
|
id?: string;
|
|
35
35
|
/** The text shown in the button. */
|
|
36
36
|
label?: React.ReactNode;
|
|
37
|
+
/** @private Maximum count number in tab label */
|
|
38
|
+
maxCount?: number;
|
|
37
39
|
ref?: React.Ref<Tab>;
|
|
38
40
|
/** A unique `id` for this tab and used by the `TabBar` to keep track of the open tab. */
|
|
39
41
|
tabId?: string;
|
|
@@ -55,8 +57,10 @@ interface TabState {
|
|
|
55
57
|
}
|
|
56
58
|
declare class Tab extends Component<TabProps, TabState> {
|
|
57
59
|
private popoverId;
|
|
60
|
+
private ariaId;
|
|
58
61
|
static propTypes: React.WeakValidationMap<ClassComponentProps<TabPropsBase, Required<Pick<TabPropsBase, "active">>, "div", never>>;
|
|
59
62
|
static defaultProps: Required<Pick<TabPropsBase, "active">>;
|
|
63
|
+
context: React.ContextType<typeof TabBarContext>;
|
|
60
64
|
static contextType: React.Context<TabBarContext>;
|
|
61
65
|
constructor(props: Readonly<TabProps>);
|
|
62
66
|
private handleMount;
|
|
@@ -60,6 +60,7 @@ interface HeadState {
|
|
|
60
60
|
declare class Head extends Component<HeadProps, HeadState> {
|
|
61
61
|
private cells?;
|
|
62
62
|
private el;
|
|
63
|
+
context: React.ContextType<typeof TableContext>;
|
|
63
64
|
static contextType: React.Context<TableContext>;
|
|
64
65
|
static splunkUiType: string;
|
|
65
66
|
static propTypes: React.WeakValidationMap<ClassComponentProps<HeadPropsBase, Required<Pick<HeadPropsBase, "actions">>, "thead", never>>;
|
|
@@ -101,6 +101,7 @@ declare class HeadCell extends Component<HeadCellProps, HeadCellState> {
|
|
|
101
101
|
static splunkUiType: string;
|
|
102
102
|
static propTypes: React.WeakValidationMap<ClassComponentProps<HeadCellPropsBase, Required<Pick<HeadCellPropsBase, "align" | "zIndex" | "visible" | "truncate" | "resizable" | "sortDir" | "showGuideline">>, "th", never>>;
|
|
103
103
|
static defaultProps: Required<Pick<HeadCellPropsBase, "align" | "zIndex" | "visible" | "truncate" | "resizable" | "sortDir" | "showGuideline">>;
|
|
104
|
+
context: React.ContextType<typeof TableContext>;
|
|
104
105
|
static contextType: React.Context<TableContext>;
|
|
105
106
|
constructor(props: Readonly<HeadCellProps>);
|
|
106
107
|
private handleClick;
|
|
@@ -155,6 +155,7 @@ declare class HeadDropdownCell extends Component<HeadDropdownCellProps, HeadDrop
|
|
|
155
155
|
static possibleCloseReasons: import("../Dropdown/Dropdown").DropdownPossibleCloseReason[];
|
|
156
156
|
static propTypes: React.WeakValidationMap<ClassComponentProps<HeadDropdownCellPropsBase, Required<Pick<HeadDropdownCellPropsBase, "align" | "zIndex" | "retainFocus" | "takeFocus" | "visible" | "closeReasons" | "defaultPlacement" | "repositionMode" | "focusToggleReasons" | "truncate" | "resizable" | "canCoverHead">>, "th", never>>;
|
|
157
157
|
static defaultProps: Required<Pick<HeadDropdownCellPropsBase, "align" | "zIndex" | "retainFocus" | "takeFocus" | "visible" | "closeReasons" | "defaultPlacement" | "repositionMode" | "focusToggleReasons" | "truncate" | "resizable" | "canCoverHead">>;
|
|
158
|
+
context: React.ContextType<typeof TableContext>;
|
|
158
159
|
static contextType: React.Context<TableContext>;
|
|
159
160
|
constructor(props: Readonly<HeadDropdownCellProps>);
|
|
160
161
|
componentDidUpdate(prevProps: Readonly<HeadDropdownCellProps>): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import { ScrollContainerContext } from '@splunk/react-ui/ScrollContainerContext';
|
|
2
3
|
import Body from './Body';
|
|
3
4
|
import Caption from './Caption';
|
|
4
5
|
import Cell, { CellClickHandler } from './Cell';
|
|
@@ -75,7 +76,7 @@ interface TablePropsBase {
|
|
|
75
76
|
*/
|
|
76
77
|
onRequestToggleAllRows?: () => void;
|
|
77
78
|
/**
|
|
78
|
-
* Callback invoked when a
|
|
79
|
+
* Callback invoked when a scroll event occurs on the inner scrolling container.
|
|
79
80
|
*/
|
|
80
81
|
onScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
81
82
|
/**
|
|
@@ -151,6 +152,7 @@ declare class Table extends Component<TableProps, TableState> {
|
|
|
151
152
|
private table;
|
|
152
153
|
private tableContainer;
|
|
153
154
|
static propTypes: React.WeakValidationMap<ClassComponentProps<TablePropsBase, Required<Pick<TablePropsBase, "actions" | "headType" | "rowSelection" | "resizableFillLayout" | "primaryColumnIndex" | "dockOffset" | "rowExpansion">>, "div", never>>;
|
|
155
|
+
context: React.ContextType<typeof ScrollContainerContext>;
|
|
154
156
|
static contextType: React.Context<Window | Document | HTMLElement | null | undefined>;
|
|
155
157
|
static defaultProps: Required<Pick<TablePropsBase, "actions" | "headType" | "rowSelection" | "resizableFillLayout" | "primaryColumnIndex" | "dockOffset" | "rowExpansion">>;
|
|
156
158
|
static Caption: typeof Caption;
|
package/types/src/Text/Text.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { ControlGroupContext } from '@splunk/react-ui/ControlGroup';
|
|
3
4
|
import { AnyTheme } from '@splunk/themes';
|
|
4
5
|
import { ClassComponentProps } from '../utils/types';
|
|
5
6
|
/** @public */
|
|
@@ -183,6 +184,7 @@ declare class Text extends Component<TextProps, TextState> {
|
|
|
183
184
|
static propTypes: React.WeakValidationMap<TextPropsBaseControlled & Required<Pick<TextPropsBase, "type" | "tabIndex" | "placeholder" | "autoFocus" | "disabled" | "appearance" | "inline" | "error" | "append" | "prepend" | "rowsMax" | "rowsMin" | "canClear" | "multiline" | "passwordVisibilityToggle">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is">> | React.WeakValidationMap<TextPropsBaseUncontrolled & Required<Pick<TextPropsBase, "type" | "tabIndex" | "placeholder" | "autoFocus" | "disabled" | "appearance" | "inline" | "error" | "append" | "prepend" | "rowsMax" | "rowsMin" | "canClear" | "multiline" | "passwordVisibilityToggle">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is">>;
|
|
184
185
|
static defaultProps: Required<Pick<TextPropsBase, "type" | "tabIndex" | "placeholder" | "autoFocus" | "disabled" | "appearance" | "inline" | "error" | "append" | "prepend" | "rowsMax" | "rowsMin" | "canClear" | "multiline" | "passwordVisibilityToggle">>;
|
|
185
186
|
static componentType: string;
|
|
187
|
+
context: React.ContextType<typeof ControlGroupContext>;
|
|
186
188
|
static contextType: React.Context<import("../ControlGroup/ControlGroupContext").ControlGroupContextValue>;
|
|
187
189
|
static validateRows({ rowsMin, rowsMax }: TextProps): void;
|
|
188
190
|
constructor(props: Readonly<TextProps>);
|
|
@@ -206,7 +208,7 @@ declare class Text extends Component<TextProps, TextState> {
|
|
|
206
208
|
/**
|
|
207
209
|
* Place focus on the input.
|
|
208
210
|
*/
|
|
209
|
-
focus(): void;
|
|
211
|
+
focus(options?: FocusOptions): void;
|
|
210
212
|
select(): void;
|
|
211
213
|
render(): JSX.Element;
|
|
212
214
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { ControlGroupContext } from '@splunk/react-ui/ControlGroup';
|
|
3
4
|
import { AnyTheme } from '@splunk/themes';
|
|
4
5
|
import { ClassComponentProps } from '../utils/types';
|
|
5
6
|
/** @public */
|
|
@@ -8,7 +9,12 @@ declare type TextAreaChangeHandler = (event: React.ChangeEvent<HTMLTextAreaEleme
|
|
|
8
9
|
value: string;
|
|
9
10
|
}) => void;
|
|
10
11
|
interface TextAreaPropsBase {
|
|
11
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated The `search` appearance has been marked for deprecation and will be removed in a future major version.
|
|
14
|
+
*
|
|
15
|
+
* Setting the appearance to search will create a rounded input.
|
|
16
|
+
* @private.
|
|
17
|
+
*/
|
|
12
18
|
appearance?: 'default' | 'search';
|
|
13
19
|
/** Append removes rounded borders and the border from the right side. */
|
|
14
20
|
append?: boolean;
|
|
@@ -28,9 +34,11 @@ interface TextAreaPropsBase {
|
|
|
28
34
|
autoCorrect?: string;
|
|
29
35
|
/** Specify that the input should request focus when mounted. */
|
|
30
36
|
autoFocus?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated This prop has been marked for deprecation and will be removed in a future major version.
|
|
39
|
+
*
|
|
40
|
+
* Include an "X" button to clear the value.
|
|
41
|
+
* */
|
|
34
42
|
canClear?: boolean;
|
|
35
43
|
children?: React.ReactNode;
|
|
36
44
|
/** @private. */
|
|
@@ -155,6 +163,7 @@ declare class TextArea extends Component<TextAreaProps, TextAreaState> {
|
|
|
155
163
|
static propTypes: React.WeakValidationMap<TextAreaPropsBaseControlled & Required<Pick<TextAreaPropsBase, "tabIndex" | "placeholder" | "autoFocus" | "disabled" | "appearance" | "inline" | "error" | "append" | "prepend" | "rowsMax" | "rowsMin" | "canClear">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is">> | React.WeakValidationMap<TextAreaPropsBaseUncontrolled & Required<Pick<TextAreaPropsBase, "tabIndex" | "placeholder" | "autoFocus" | "disabled" | "appearance" | "inline" | "error" | "append" | "prepend" | "rowsMax" | "rowsMin" | "canClear">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is">>;
|
|
156
164
|
static defaultProps: Required<Pick<TextAreaPropsBase, "tabIndex" | "placeholder" | "autoFocus" | "disabled" | "appearance" | "inline" | "error" | "append" | "prepend" | "rowsMax" | "rowsMin" | "canClear">>;
|
|
157
165
|
static componentType: string;
|
|
166
|
+
context: React.ContextType<typeof ControlGroupContext>;
|
|
158
167
|
static contextType: React.Context<import("../ControlGroup/ControlGroupContext").ControlGroupContextValue>;
|
|
159
168
|
static validateRows({ rowsMin, rowsMax }: TextAreaProps): void;
|
|
160
169
|
constructor(props: Readonly<TextAreaProps>);
|
package/MIGRATION.md
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Migration
|
|
2
|
-
|
|
3
|
-
This document lists migration guidance for new features and breaking changes.
|
|
4
|
-
|
|
5
|
-
## 4.17.0
|
|
6
|
-
|
|
7
|
-
### `Typography` `weight` prop
|
|
8
|
-
**Change:**
|
|
9
|
-
`Typography` no longer supports numerical values for `weight`.
|
|
10
|
-
|
|
11
|
-
**Context:**
|
|
12
|
-
Supporting both numerical and keyword values creates confusion on which is correct to use.
|
|
13
|
-
Themes has new variables in version 4.17.0 that support all of the weight values in the design system.
|
|
14
|
-
This aligns with the existing API for `variant` in this component.
|
|
15
|
-
|
|
16
|
-
**Migration steps:**
|
|
17
|
-
Convert any usage of a number to the keyword value using the following table based on (MDN)[https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#common_weight_name_mapping]:
|
|
18
|
-
|Number|Key-word |
|
|
19
|
-
|------|------------|
|
|
20
|
-
| 300 | 'light' |
|
|
21
|
-
| 400 | 'normal' |
|
|
22
|
-
| 500 | 'semiBold' |
|
|
23
|
-
| 600 | 'semiBold' |
|
|
24
|
-
| 700 | 'bold' |
|
|
25
|
-
| 800 | 'extraBold'|
|
|
26
|
-
| 900 | 'heavy' |
|
|
27
|
-
|
|
28
|
-
For example, convert:
|
|
29
|
-
`<Typography as="p" weight={700} />`
|
|
30
|
-
to:
|
|
31
|
-
`<Typography as="p" weight='bold' />`
|
|
32
|
-
|
|
33
|
-
## 4.12.0
|
|
34
|
-
|
|
35
|
-
### Multiline `Text` to `TextArea`
|
|
36
|
-
|
|
37
|
-
**Change:**
|
|
38
|
-
`Text`'s `multiline` and related props have been deprecated. A new `TextArea` component has been added.
|
|
39
|
-
|
|
40
|
-
**Context:**
|
|
41
|
-
`Text` supported two modes -- single or multiline. Each modes had exclusive props: e.g. `maxRows` was only valid with the `multiline` prop.
|
|
42
|
-
This could be confusing and lead to unexpected or unsupported API combinations. Additionally, code in `Text` would only operate in one mode at a time.
|
|
43
|
-
|
|
44
|
-
By separating these modes, we have made it simpler and clearer to decide which component and props to use.
|
|
45
|
-
`Text` should be used for inline text input. `TextArea` should be used for long-form text input.
|
|
46
|
-
This aligns the components with the HTML spec and the Splunk Design System.
|
|
47
|
-
|
|
48
|
-
**Migration steps:**
|
|
49
|
-
- Replace instances of `Text` that use the `multiline` prop with the new `TextArea` component.
|