@splunk/react-ui 4.27.0 → 4.28.1

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 (55) hide show
  1. package/Box.js +45 -44
  2. package/Button.js +1 -2
  3. package/ButtonSimple.js +145 -147
  4. package/CHANGELOG.md +36 -2
  5. package/CollapsiblePanel.js +60 -73
  6. package/JSONTree.js +1311 -629
  7. package/Markdown.js +521 -222
  8. package/Modal.js +11 -4
  9. package/Multiselect.js +844 -804
  10. package/Paginator.js +593 -271
  11. package/TabBar.js +487 -312
  12. package/Table.js +5 -3
  13. package/TextArea.js +368 -344
  14. package/Tree.js +607 -519
  15. package/package.json +2 -2
  16. package/types/src/Box/Box.d.ts +3 -2
  17. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -4
  18. package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +4 -4
  19. package/types/src/File/docs/examples/FullScreen.d.ts +1 -14
  20. package/types/src/JSONTree/JSONTreeItem.d.ts +45 -0
  21. package/types/src/JSONTree/renderTreeItems.d.ts +17 -0
  22. package/types/src/Markdown/renderers/MarkdownAnchorHeading.d.ts +1 -1
  23. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
  24. package/types/src/Markdown/renderers/MarkdownCode.d.ts +1 -1
  25. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
  26. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
  27. package/types/src/Markdown/renderers/MarkdownImage.d.ts +1 -1
  28. package/types/src/Markdown/renderers/MarkdownItem.d.ts +1 -1
  29. package/types/src/Markdown/renderers/MarkdownList.d.ts +1 -1
  30. package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -1
  31. package/types/src/Modal/Modal.d.ts +4 -5
  32. package/types/src/Multiselect/Normal.d.ts +1 -0
  33. package/types/src/Paginator/Button.d.ts +8 -3
  34. package/types/src/Paginator/Compact.d.ts +50 -0
  35. package/types/src/Paginator/PageControl.d.ts +37 -0
  36. package/types/src/Paginator/PageSelect.d.ts +32 -0
  37. package/types/src/Paginator/Paginator.d.ts +9 -4
  38. package/types/src/Paginator/docs/examples/Compact.d.ts +2 -0
  39. package/types/src/Paginator/docs/examples/CompactCustomLabel.d.ts +2 -0
  40. package/types/src/Paginator/docs/examples/CompactWithLabel.d.ts +2 -0
  41. package/types/src/Paginator/docs/examples/Labelled.d.ts +2 -0
  42. package/types/src/Paginator/docs/examples/PageControl.d.ts +2 -0
  43. package/types/src/Paginator/icons/ChevronLeft.d.ts +5 -0
  44. package/types/src/Paginator/icons/ChevronRight.d.ts +5 -0
  45. package/types/src/SlidingPanels/docs/examples/Modal.d.ts +1 -13
  46. package/types/src/TabBar/Tab.d.ts +12 -2
  47. package/types/src/TabBar/TabBar.d.ts +4 -3
  48. package/types/src/TabBar/TabBarContext.d.ts +6 -1
  49. package/types/src/TextArea/TextArea.d.ts +3 -2
  50. package/types/src/TextArea/icons/ClearButton.d.ts +3 -0
  51. package/types/src/TextArea/icons/SearchIcon.d.ts +1 -0
  52. package/types/src/Tree/TreeContext.d.ts +2 -1
  53. package/types/src/Tree/TreeItem.d.ts +18 -5
  54. package/types/src/JSONTree/JSONTreeContext.d.ts +0 -7
  55. package/types/src/JSONTree/TreeNode.d.ts +0 -44
package/Modal.js CHANGED
@@ -768,10 +768,17 @@
768
768
  * We return focus to the invoking element here instead of in `handleRequestClose` because users can
769
769
  * close the modal by updating the value of the `open` prop without calling `onRequestClose`
770
770
  */
771
- l()((function() {
772
- var e, t, r;
773
- (e = i.props.returnFocus) === null || e === void 0 ? void 0 : (t = e.current) === null || t === void 0 ? void 0 : (r = t.focus) === null || r === void 0 ? void 0 : r.call(t);
774
- }));
771
+ var o = i.props.returnFocus;
772
+ if (o != null) {
773
+ if (typeof o === "function") {
774
+ o();
775
+ } else {
776
+ l()((function() {
777
+ var e, t;
778
+ (e = o.current) === null || e === void 0 ? void 0 : (t = e.focus) === null || t === void 0 ? void 0 : t.call(e);
779
+ }));
780
+ }
781
+ }
775
782
  }
776
783
  }
777
784
  }));