@splunk/react-ui 4.14.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 (126) 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 +35 -34
  8. package/ButtonGroup.js +9 -9
  9. package/ButtonSimple.js +14 -14
  10. package/CHANGELOG.md +30 -0
  11. package/Calendar.js +124 -106
  12. package/Card.js +68 -68
  13. package/CardLayout.js +9 -9
  14. package/Chip.js +23 -23
  15. package/Clickable.js +38 -14
  16. package/CloseButton.js +23 -23
  17. package/Code.js +484 -436
  18. package/CollapsiblePanel.js +59 -34
  19. package/Color.js +297 -187
  20. package/ColumnLayout.js +18 -17
  21. package/ComboBox.js +81 -32
  22. package/Concertina.js +88 -27
  23. package/ControlGroup.js +81 -24
  24. package/Date.js +44 -31
  25. package/DefinitionList.js +14 -8
  26. package/Divider.d.ts +2 -0
  27. package/Divider.js +9 -9
  28. package/Dockerfile.enterprise.storybook +7 -0
  29. package/Dockerfile.prisma.storybook +7 -0
  30. package/Dockerfile.visual +10 -0
  31. package/Dropdown.js +78 -18
  32. package/EventListener.js +17 -17
  33. package/File.js +96 -43
  34. package/FormRows.js +38 -37
  35. package/Heading.js +83 -55
  36. package/Image.js +67 -42
  37. package/JSONTree.js +106 -21
  38. package/Layer.js +59 -34
  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 +129 -129
  44. package/MessageBar.js +136 -136
  45. package/Modal.js +57 -32
  46. package/ModalLayer.js +15 -15
  47. package/Monogram.js +18 -17
  48. package/Multiselect.js +2793 -2315
  49. package/Number.js +74 -37
  50. package/Paginator.js +99 -86
  51. package/Paragraph.js +10 -10
  52. package/Popover.js +191 -54
  53. package/Progress.js +23 -22
  54. package/RadioBar.js +32 -14
  55. package/RadioList.js +17 -11
  56. package/Resize.js +33 -20
  57. package/ResultsMenu.js +36 -23
  58. package/ScreenReaderContent.js +9 -9
  59. package/Scroll.js +50 -25
  60. package/ScrollContainerContext.js +48 -48
  61. package/Search.js +68 -31
  62. package/Select.js +347 -69
  63. package/SidePanel.js +37 -24
  64. package/Slider.js +54 -24
  65. package/SlidingPanels.js +52 -14
  66. package/SplitButton.js +23 -22
  67. package/StaticContent.js +9 -9
  68. package/StepBar.js +22 -22
  69. package/Switch.js +18 -13
  70. package/TabBar.js +22 -22
  71. package/TabLayout.js +43 -18
  72. package/Table.js +371 -162
  73. package/Text.js +91 -49
  74. package/TextArea.d.ts +2 -0
  75. package/TextArea.js +127 -49
  76. package/Tooltip.js +236 -59
  77. package/TransitionOpen.js +39 -26
  78. package/Typography.d.ts +2 -0
  79. package/Typography.js +17 -16
  80. package/WaitSpinner.js +15 -15
  81. package/docker-compose.yml +42 -0
  82. package/package.json +12 -10
  83. package/test-runner-jest.config.js +11 -6
  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 +2 -0
  88. package/types/src/CardLayout/CardLayoutContext.d.ts +1 -0
  89. package/types/src/Concertina/ConcertinaContext.d.ts +1 -0
  90. package/types/src/ControlGroup/ControlGroup.d.ts +15 -8
  91. package/types/src/ControlGroup/docs/examples/HelpWithErrorText.d.ts +2 -0
  92. package/types/src/ControlGroup/docs/examples/Required.d.ts +2 -0
  93. package/types/src/File/File.d.ts +4 -2
  94. package/types/src/File/FileContext.d.ts +1 -0
  95. package/types/src/FormRows/FormRowsContext.d.ts +1 -0
  96. package/types/src/Markdown/renderers/MarkdownLink.d.ts +1 -1
  97. package/types/src/Menu/MenuContext.d.ts +1 -0
  98. package/types/src/Modal/ModalContext.d.ts +1 -0
  99. package/types/src/Multiselect/Compact.d.ts +10 -1
  100. package/types/src/Multiselect/Multiselect.d.ts +12 -1
  101. package/types/src/Multiselect/Normal.d.ts +2 -0
  102. package/types/src/Popover/Popover.d.ts +25 -5
  103. package/types/src/Popover/PopoverContext.d.ts +1 -0
  104. package/types/src/RadioBar/RadioBar.d.ts +5 -3
  105. package/types/src/RadioBar/RadioBarContext.d.ts +1 -0
  106. package/types/src/RadioList/RadioList.d.ts +5 -1
  107. package/types/src/RadioList/RadioListContext.d.ts +1 -0
  108. package/types/src/Select/SelectBase.d.ts +2 -0
  109. package/types/src/Slider/Slider.d.ts +5 -3
  110. package/types/src/StepBar/StepBarContext.d.ts +1 -0
  111. package/types/src/Switch/Switch.d.ts +2 -0
  112. package/types/src/TabBar/TabBarContext.d.ts +1 -0
  113. package/types/src/Table/Head.d.ts +2 -0
  114. package/types/src/Table/TableContext.d.ts +1 -0
  115. package/types/src/Text/Text.d.ts +5 -3
  116. package/types/src/TextArea/TextArea.d.ts +5 -3
  117. package/types/src/Tooltip/Tooltip.d.ts +16 -4
  118. package/types/src/useForceUpdate/useForceUpdate.d.ts +1 -0
  119. package/useForceUpdate.js +9 -9
  120. package/useKeyPress.js +2 -2
  121. package/usePrevious.js +9 -9
  122. package/.storybook-visual/config/snapshotResolver.js +0 -29
  123. package/.storybook-visual/main.js +0 -22
  124. package/.storybook-visual/preview.jsx +0 -31
  125. package/.storybook-visual/scripts/test.sh +0 -108
  126. package/.storybook-visual/test-runner.js +0 -108
@@ -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
  }