@splunk/react-ui 4.13.0 → 4.15.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 (144) hide show
  1. package/.dockerignore +2 -0
  2. package/Accordion.js +41 -16
  3. package/Anchor.js +9 -9
  4. package/Animation.js +6 -6
  5. package/AnimationToggle.js +2 -2
  6. package/Box.js +9 -9
  7. package/Button.js +47 -46
  8. package/ButtonGroup.js +9 -9
  9. package/ButtonSimple.js +14 -14
  10. package/CHANGELOG.md +46 -1
  11. package/Calendar.js +460 -147
  12. package/Card.js +85 -83
  13. package/CardLayout.js +9 -9
  14. package/Chip.js +23 -23
  15. package/Clickable.js +39 -15
  16. package/CloseButton.js +23 -23
  17. package/Code.js +484 -436
  18. package/CollapsiblePanel.js +64 -35
  19. package/Color.js +298 -188
  20. package/ColumnLayout.js +18 -17
  21. package/ComboBox.js +81 -32
  22. package/Concertina.js +89 -28
  23. package/ControlGroup.js +85 -27
  24. package/Date.js +134 -58
  25. package/DefinitionList.js +14 -8
  26. package/Divider.d.ts +2 -0
  27. package/Divider.js +194 -0
  28. package/Dockerfile.enterprise.storybook +7 -0
  29. package/Dockerfile.prisma.storybook +7 -0
  30. package/Dockerfile.visual +10 -0
  31. package/Dropdown.js +79 -19
  32. package/EventListener.js +17 -17
  33. package/File.js +96 -43
  34. package/FormRows.js +40 -39
  35. package/Heading.js +83 -55
  36. package/Image.js +67 -42
  37. package/JSONTree.js +106 -21
  38. package/Layer.js +130 -28
  39. package/Link.js +17 -17
  40. package/List.js +3 -3
  41. package/Markdown.js +71 -65
  42. package/Menu.js +155 -121
  43. package/Message.js +135 -135
  44. package/MessageBar.js +136 -136
  45. package/Modal.js +99 -48
  46. package/ModalLayer.js +15 -15
  47. package/Monogram.js +18 -17
  48. package/Multiselect.js +2788 -2310
  49. package/Number.js +76 -37
  50. package/Paginator.js +99 -86
  51. package/Paragraph.js +10 -10
  52. package/Popover.js +343 -48
  53. package/Progress.js +23 -22
  54. package/RadioBar.js +32 -14
  55. package/RadioList.js +17 -11
  56. package/Resize.js +34 -21
  57. package/ResultsMenu.js +44 -31
  58. package/ScreenReaderContent.js +9 -9
  59. package/Scroll.js +52 -27
  60. package/ScrollContainerContext.js +157 -6
  61. package/Search.js +71 -34
  62. package/Select.js +347 -69
  63. package/SidePanel.js +37 -24
  64. package/Slider.js +50 -20
  65. package/SlidingPanels.js +56 -18
  66. package/SplitButton.js +27 -26
  67. package/StaticContent.js +9 -9
  68. package/StepBar.js +22 -22
  69. package/Switch.js +18 -13
  70. package/TabBar.js +28 -28
  71. package/TabLayout.js +43 -18
  72. package/Table.js +549 -158
  73. package/Text.js +93 -50
  74. package/TextArea.d.ts +2 -0
  75. package/TextArea.js +134 -56
  76. package/Tooltip.js +246 -63
  77. package/TransitionOpen.js +63 -26
  78. package/Typography.d.ts +2 -0
  79. package/Typography.js +17 -16
  80. package/WaitSpinner.js +15 -81
  81. package/docker-compose.yml +42 -0
  82. package/package.json +20 -20
  83. package/test-runner-jest.config.js +23 -5
  84. package/types/src/Accordion/AccordionContext.d.ts +1 -0
  85. package/types/src/Button/docs/examples/Selected.d.ts +2 -2
  86. package/types/src/ButtonGroup/ButtonGroupContext.d.ts +1 -0
  87. package/types/src/Calendar/Calendar.d.ts +17 -2
  88. package/types/src/Calendar/DateTable.d.ts +7 -3
  89. package/types/src/Calendar/Day.d.ts +14 -5
  90. package/types/src/CardLayout/CardLayoutContext.d.ts +1 -0
  91. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +7 -3
  92. package/types/src/Concertina/ConcertinaContext.d.ts +1 -0
  93. package/types/src/ControlGroup/ControlGroup.d.ts +15 -8
  94. package/types/src/ControlGroup/docs/examples/HelpWithErrorText.d.ts +2 -0
  95. package/types/src/ControlGroup/docs/examples/Required.d.ts +2 -0
  96. package/types/src/Date/Date.d.ts +17 -8
  97. package/types/src/Date/docs/examples/CustomDate.d.ts +2 -2
  98. package/types/src/Date/docs/examples/Disabled.d.ts +2 -2
  99. package/types/src/Date/docs/examples/prisma/WithoutCalendar.d.ts +2 -0
  100. package/types/src/Divider/Divider.d.ts +20 -0
  101. package/types/src/Divider/docs/examples/AriaHidden.d.ts +2 -0
  102. package/types/src/Divider/docs/examples/Basic.d.ts +2 -0
  103. package/types/src/Divider/docs/examples/CustomStyle.d.ts +2 -0
  104. package/types/src/Divider/docs/examples/Vertical.d.ts +2 -0
  105. package/types/src/Divider/index.d.ts +1 -0
  106. package/types/src/File/File.d.ts +4 -2
  107. package/types/src/File/FileContext.d.ts +1 -0
  108. package/types/src/FormRows/FormRowsContext.d.ts +1 -0
  109. package/types/src/Markdown/renderers/MarkdownLink.d.ts +1 -1
  110. package/types/src/Menu/MenuContext.d.ts +1 -0
  111. package/types/src/Modal/Modal.d.ts +7 -3
  112. package/types/src/Modal/ModalContext.d.ts +2 -0
  113. package/types/src/Multiselect/Compact.d.ts +10 -1
  114. package/types/src/Multiselect/Multiselect.d.ts +12 -1
  115. package/types/src/Multiselect/Normal.d.ts +2 -0
  116. package/types/src/Number/Number.d.ts +5 -1
  117. package/types/src/Popover/Popover.d.ts +25 -5
  118. package/types/src/Popover/PopoverContext.d.ts +1 -0
  119. package/types/src/RadioBar/RadioBar.d.ts +5 -3
  120. package/types/src/RadioBar/RadioBarContext.d.ts +1 -0
  121. package/types/src/RadioList/RadioList.d.ts +5 -1
  122. package/types/src/RadioList/RadioListContext.d.ts +1 -0
  123. package/types/src/Select/SelectBase.d.ts +2 -0
  124. package/types/src/Slider/Slider.d.ts +5 -3
  125. package/types/src/SplitButton/docs/examples/Disabled.d.ts +1 -1
  126. package/types/src/SplitButton/docs/examples/prisma/Disabled.d.ts +1 -1
  127. package/types/src/StepBar/StepBarContext.d.ts +1 -0
  128. package/types/src/Switch/Switch.d.ts +2 -0
  129. package/types/src/TabBar/TabBarContext.d.ts +1 -0
  130. package/types/src/Table/Head.d.ts +2 -0
  131. package/types/src/Table/TableContext.d.ts +1 -0
  132. package/types/src/Table/docs/examples/FilterColumnValues.d.ts +14 -0
  133. package/types/src/Text/Text.d.ts +5 -3
  134. package/types/src/TextArea/TextArea.d.ts +5 -3
  135. package/types/src/Tooltip/Tooltip.d.ts +26 -9
  136. package/types/src/TransitionOpen/TransitionOpen.d.ts +7 -3
  137. package/types/src/WaitSpinner/WaitSpinner.d.ts +1 -1
  138. package/types/src/useForceUpdate/useForceUpdate.d.ts +1 -0
  139. package/types/src/useKeyPress/index.d.ts +37 -0
  140. package/useForceUpdate.js +9 -9
  141. package/{useIsSsr.js → useKeyPress.js} +56 -49
  142. package/usePrevious.js +9 -9
  143. package/types/src/useIsSsr/index.d.ts +0 -2
  144. package/types/src/useIsSsr/useIsSsr.d.ts +0 -8
@@ -1 +1 @@
1
- export default function Basic(): JSX.Element;
1
+ export default function Disabled(): JSX.Element;
@@ -1 +1 @@
1
- export default function Basic(): JSX.Element;
1
+ export default function Disabled(): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface StepBarContext {
2
3
  activeStepId: number;
3
4
  idCounter?: string;
@@ -41,6 +41,8 @@ interface SwitchPropsBase {
41
41
  */
42
42
  labelledBy?: string;
43
43
  onClick?: SwitchClickHandler | SwitchCheckboxWithSomeClickHandler;
44
+ /** @private. */
45
+ required?: boolean;
44
46
  /**
45
47
  * 'some' is only valid when appearance is 'checkbox'. The current value of `selected` is
46
48
  * passed to the onClick handler.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TabClickHandler, TabFocusHandler } from './Tab';
2
3
  export interface TabBarContext {
3
4
  active?: string;
@@ -1,5 +1,6 @@
1
1
  import React, { Component } from 'react';
2
2
  import { TableRequestMoveColumnHandler } from './Table';
3
+ import TableContext from './TableContext';
3
4
  import { ClassComponentProps } from '../utils/types';
4
5
  declare type HeadAutosizeColumnHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
5
6
  columnId: any;
@@ -59,6 +60,7 @@ interface HeadState {
59
60
  declare class Head extends Component<HeadProps, HeadState> {
60
61
  private cells?;
61
62
  private el;
63
+ static contextType: React.Context<TableContext>;
62
64
  static splunkUiType: string;
63
65
  static propTypes: React.WeakValidationMap<ClassComponentProps<HeadPropsBase, Required<Pick<HeadPropsBase, "actions">>, "thead", never>>;
64
66
  static defaultProps: Required<Pick<HeadPropsBase, "actions">>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface TableContext {
2
3
  headType?: 'docked' | 'fixed' | 'inline';
3
4
  }
@@ -0,0 +1,14 @@
1
+ import React, { Component } from 'react';
2
+ declare const kindValues: readonly ["Amazon S3", "Index", "Indexer", "Lookup", "View"];
3
+ declare type Kind = typeof kindValues[number];
4
+ interface ExampleState {
5
+ filter?: Kind[];
6
+ }
7
+ declare class FilterableTable extends Component<{}, ExampleState> {
8
+ constructor(props: {});
9
+ toggleFilterValue: (e: React.MouseEvent, { filterValue }: {
10
+ filterValue: Kind;
11
+ }) => void;
12
+ render(): JSX.Element;
13
+ }
14
+ export default FilterableTable;