@splunk/react-ui 4.17.1 → 4.19.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.
Files changed (122) hide show
  1. package/Accordion.js +6 -6
  2. package/Anchor.js +2 -2
  3. package/Animation.js +2 -2
  4. package/AnimationToggle.js +5 -5
  5. package/Box.js +2 -2
  6. package/Button.js +4 -4
  7. package/ButtonGroup.js +2 -2
  8. package/ButtonSimple.js +2 -2
  9. package/CHANGELOG.md +28 -2
  10. package/Calendar.js +8 -8
  11. package/Card.js +8 -8
  12. package/CardLayout.js +2 -2
  13. package/Chip.js +23 -16
  14. package/Clickable.js +11 -11
  15. package/CloseButton.js +2 -2
  16. package/Code.js +12 -12
  17. package/CollapsiblePanel.js +4 -4
  18. package/Color.js +209 -182
  19. package/ColumnLayout.js +6 -6
  20. package/ComboBox.js +14 -14
  21. package/Concertina.js +10 -10
  22. package/ControlGroup.js +2 -2
  23. package/Date.js +13 -13
  24. package/DefinitionList.js +2 -2
  25. package/Divider.js +2 -2
  26. package/Dropdown.js +13 -13
  27. package/DualListbox.js +9 -6
  28. package/EventListener.js +4 -4
  29. package/File.js +13 -13
  30. package/FormRows.js +264 -103
  31. package/Heading.js +50 -50
  32. package/Image.js +15 -15
  33. package/JSONTree.js +38 -36
  34. package/Layer.js +10 -10
  35. package/Link.js +2 -2
  36. package/List.js +9 -6
  37. package/MIGRATION.mdx +295 -0
  38. package/Markdown.js +24 -19
  39. package/Menu.js +12 -12
  40. package/Message.js +4 -4
  41. package/MessageBar.js +2 -2
  42. package/Modal.js +4 -4
  43. package/ModalLayer.js +4 -4
  44. package/Monogram.js +3 -3
  45. package/Multiselect.js +33 -33
  46. package/Number.js +7 -6
  47. package/Paginator.js +6 -6
  48. package/Paragraph.js +2 -2
  49. package/Popover.js +31 -27
  50. package/Progress.js +4 -4
  51. package/RadioBar.js +4 -4
  52. package/RadioList.js +2 -2
  53. package/Resize.js +6 -6
  54. package/ResultsMenu.js +8 -8
  55. package/ScreenReaderContent.js +2 -2
  56. package/Scroll.js +6 -6
  57. package/ScrollContainerContext.js +2 -2
  58. package/Search.js +14 -14
  59. package/Select.js +12 -12
  60. package/SidePanel.js +2 -2
  61. package/Slider.js +10 -10
  62. package/SlidingPanels.js +8 -8
  63. package/SplitButton.js +4 -4
  64. package/StaticContent.js +2 -2
  65. package/StepBar.js +2 -2
  66. package/Switch.js +2 -2
  67. package/TabBar.js +68 -51
  68. package/TabLayout.js +6 -6
  69. package/Table.js +51 -50
  70. package/Text.js +25 -23
  71. package/TextArea.js +24 -22
  72. package/Tooltip.js +11 -11
  73. package/TransitionOpen.js +2 -2
  74. package/Typography.js +4 -4
  75. package/WaitSpinner.js +2 -2
  76. package/cypress/support/component-index.html +12 -0
  77. package/cypress/support/component.ts +27 -0
  78. package/cypress.config.ts +19 -0
  79. package/package.json +14 -19
  80. package/stubs-dependencies.d.ts +0 -9
  81. package/types/src/Button/Button.d.ts +5 -3
  82. package/types/src/Clickable/Clickable.d.ts +2 -1
  83. package/types/src/Clickable/docs/examples/Basic.d.ts +2 -2
  84. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -0
  85. package/types/src/Color/Color.d.ts +6 -6
  86. package/types/src/Color/Palette.d.ts +46 -0
  87. package/types/src/Concertina/Panel.d.ts +1 -0
  88. package/types/src/FormRows/FormRows.d.ts +1 -2
  89. package/types/src/FormRows/Row.d.ts +3 -12
  90. package/types/src/FormRows/RowInternal.d.ts +19 -0
  91. package/types/src/FormRows/SortableList.d.ts +8 -2
  92. package/types/src/FormRows/SortableRow.d.ts +20 -0
  93. package/types/src/Heading/Heading.d.ts +8 -3
  94. package/types/src/JSONTree/JSONTree.d.ts +2 -1
  95. package/types/src/Layer/Layer.d.ts +2 -0
  96. package/types/src/List/List.d.ts +9 -1
  97. package/types/src/List/docs/examples/CustomizedList.d.ts +2 -0
  98. package/types/src/List/docs/examples/OrderedList.d.ts +2 -0
  99. package/types/src/List/docs/examples/UnorderedList.d.ts +2 -0
  100. package/types/src/Markdown/Markdown.d.ts +1 -0
  101. package/types/src/Markdown/renderers/MarkdownList.d.ts +2 -0
  102. package/types/src/Number/Number.d.ts +9 -4
  103. package/types/src/Popover/Popover.d.ts +2 -0
  104. package/types/src/TabBar/Tab.d.ts +2 -0
  105. package/types/src/Table/Head.d.ts +1 -0
  106. package/types/src/Table/HeadCell.d.ts +1 -0
  107. package/types/src/Table/HeadDropdownCell.d.ts +1 -0
  108. package/types/src/Table/Table.d.ts +3 -1
  109. package/types/src/Text/Text.d.ts +3 -1
  110. package/types/src/TextArea/TextArea.d.ts +2 -0
  111. package/useForceUpdate.js +2 -2
  112. package/useKeyPress.js +2 -2
  113. package/usePrevious.js +2 -2
  114. package/useRovingFocus.js +2 -2
  115. package/MIGRATION.md +0 -49
  116. package/cypress/plugins/index.ts +0 -15
  117. package/cypress/support/index.ts +0 -10
  118. package/cypress.json +0 -13
  119. package/types/src/List/docs/examples/Decimal.d.ts +0 -2
  120. package/types/src/List/docs/examples/Disc.d.ts +0 -2
  121. package/types/src/List/docs/examples/LowerAlpha.d.ts +0 -2
  122. 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>>;
@@ -57,8 +57,10 @@ interface TabState {
57
57
  }
58
58
  declare class Tab extends Component<TabProps, TabState> {
59
59
  private popoverId;
60
+ private ariaId;
60
61
  static propTypes: React.WeakValidationMap<ClassComponentProps<TabPropsBase, Required<Pick<TabPropsBase, "active">>, "div", never>>;
61
62
  static defaultProps: Required<Pick<TabPropsBase, "active">>;
63
+ context: React.ContextType<typeof TabBarContext>;
62
64
  static contextType: React.Context<TabBarContext>;
63
65
  constructor(props: Readonly<TabProps>);
64
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 scoll event occurs on the inner scrolling container.
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;
@@ -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 */
@@ -162,6 +163,7 @@ declare class TextArea extends Component<TextAreaProps, TextAreaState> {
162
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">>;
163
164
  static defaultProps: Required<Pick<TextAreaPropsBase, "tabIndex" | "placeholder" | "autoFocus" | "disabled" | "appearance" | "inline" | "error" | "append" | "prepend" | "rowsMax" | "rowsMin" | "canClear">>;
164
165
  static componentType: string;
166
+ context: React.ContextType<typeof ControlGroupContext>;
165
167
  static contextType: React.Context<import("../ControlGroup/ControlGroupContext").ControlGroupContextValue>;
166
168
  static validateRows({ rowsMin, rowsMax }: TextAreaProps): void;
167
169
  constructor(props: Readonly<TextAreaProps>);
package/useForceUpdate.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 241);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 242);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -94,7 +94,7 @@ module.exports = require("react");
94
94
 
95
95
  /***/ }),
96
96
 
97
- /***/ 241:
97
+ /***/ 242:
98
98
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
99
 
100
100
  "use strict";
package/useKeyPress.js CHANGED
@@ -82,12 +82,12 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 167);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 168);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 167:
90
+ /***/ 168:
91
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
92
 
93
93
  "use strict";
package/usePrevious.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 242);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 243);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -94,7 +94,7 @@ module.exports = require("react");
94
94
 
95
95
  /***/ }),
96
96
 
97
- /***/ 242:
97
+ /***/ 243:
98
98
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
99
 
100
100
  "use strict";
package/useRovingFocus.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 243);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 244);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -94,7 +94,7 @@ module.exports = require("react");
94
94
 
95
95
  /***/ }),
96
96
 
97
- /***/ 243:
97
+ /***/ 244:
98
98
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
99
 
100
100
  "use strict";
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.
@@ -1,15 +0,0 @@
1
- /* eslint-env node */
2
-
3
- import { startDevServer } from '@cypress/webpack-dev-server';
4
- import webpackConfig from '../../webpack.test.config';
5
-
6
- /**
7
- * @type {Cypress.PluginConfig}
8
- */
9
- module.exports = (on, config) => {
10
- if (config.testingType === 'component') {
11
- on('dev-server:start', (options) => startDevServer({ options, webpackConfig }));
12
- }
13
-
14
- return config;
15
- };
@@ -1,10 +0,0 @@
1
- import { setGlobalConfig } from '@storybook/testing-react';
2
- import { configure } from '@testing-library/cypress';
3
- import 'cypress-real-events/support';
4
-
5
- import './commands';
6
- import * as sbPreview from '../../.storybook/preview';
7
-
8
- configure({ testIdAttribute: 'data-test' });
9
-
10
- setGlobalConfig(sbPreview);
package/cypress.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "baseUrl": "http://localhost:8080",
3
- "env": {},
4
- "defaultCommandTimeout": 1000,
5
- "fixturesFolder": false,
6
- "video": false,
7
- "videoUploadOnPasses": false,
8
- "chromeWebSecurity": false,
9
- "component": {
10
- "componentFolder": "src",
11
- "testFiles": "**/**/tests/*.spec.tsx"
12
- }
13
- }
@@ -1,2 +0,0 @@
1
- declare function Decimal(): JSX.Element;
2
- export default Decimal;
@@ -1,2 +0,0 @@
1
- declare function Disc(): JSX.Element;
2
- export default Disc;
@@ -1,2 +0,0 @@
1
- declare function LowerAlpha(): JSX.Element;
2
- export default LowerAlpha;
@@ -1,2 +0,0 @@
1
- declare function UpperAlpha(): JSX.Element;
2
- export default UpperAlpha;