@splunk/react-ui 4.26.0 → 4.28.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 (79) hide show
  1. package/Accordion.js +195 -212
  2. package/Box.js +45 -44
  3. package/Button.js +1 -2
  4. package/ButtonSimple.js +145 -147
  5. package/CHANGELOG.md +52 -3
  6. package/CollapsiblePanel.js +555 -325
  7. package/Color.js +3 -1
  8. package/ControlGroup.js +1 -0
  9. package/JSONTree.js +1311 -629
  10. package/MIGRATION.mdx +30 -0
  11. package/Markdown.js +521 -222
  12. package/Modal.js +26 -10
  13. package/Multiselect.js +844 -804
  14. package/Paginator.js +593 -271
  15. package/TabBar.js +487 -312
  16. package/Table.js +903 -869
  17. package/Text.js +30 -40
  18. package/TextArea.js +372 -432
  19. package/Tree.js +607 -519
  20. package/package.json +4 -2
  21. package/types/src/Accordion/Accordion.d.ts +2 -2
  22. package/types/src/Accordion/AccordionContext.d.ts +2 -3
  23. package/types/src/Box/Box.d.ts +3 -2
  24. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +49 -15
  25. package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +62 -0
  26. package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +9 -0
  27. package/types/src/CollapsiblePanel/docs/examples/MultiControlled.d.ts +2 -2
  28. package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupControlled.d.ts +2 -0
  29. package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupUncontrolled.d.ts +2 -0
  30. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +7 -5
  31. package/types/src/File/docs/examples/FullScreen.d.ts +1 -14
  32. package/types/src/JSONTree/JSONTreeItem.d.ts +45 -0
  33. package/types/src/JSONTree/renderTreeItems.d.ts +17 -0
  34. package/types/src/Markdown/renderers/MarkdownAnchorHeading.d.ts +1 -1
  35. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
  36. package/types/src/Markdown/renderers/MarkdownCode.d.ts +1 -1
  37. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
  38. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
  39. package/types/src/Markdown/renderers/MarkdownImage.d.ts +1 -1
  40. package/types/src/Markdown/renderers/MarkdownItem.d.ts +1 -1
  41. package/types/src/Markdown/renderers/MarkdownList.d.ts +1 -1
  42. package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -1
  43. package/types/src/Modal/Modal.d.ts +4 -5
  44. package/types/src/Multiselect/Normal.d.ts +1 -0
  45. package/types/src/Paginator/Button.d.ts +8 -3
  46. package/types/src/Paginator/Compact.d.ts +50 -0
  47. package/types/src/Paginator/PageControl.d.ts +37 -0
  48. package/types/src/Paginator/PageSelect.d.ts +32 -0
  49. package/types/src/Paginator/Paginator.d.ts +9 -4
  50. package/types/src/Paginator/docs/examples/Compact.d.ts +2 -0
  51. package/types/src/Paginator/docs/examples/CompactCustomLabel.d.ts +2 -0
  52. package/types/src/Paginator/docs/examples/CompactWithLabel.d.ts +2 -0
  53. package/types/src/Paginator/docs/examples/Labelled.d.ts +2 -0
  54. package/types/src/Paginator/docs/examples/PageControl.d.ts +2 -0
  55. package/types/src/Paginator/icons/ChevronLeft.d.ts +5 -0
  56. package/types/src/Paginator/icons/ChevronRight.d.ts +5 -0
  57. package/types/src/SlidingPanels/docs/examples/Modal.d.ts +1 -13
  58. package/types/src/TabBar/Tab.d.ts +12 -2
  59. package/types/src/TabBar/TabBar.d.ts +4 -3
  60. package/types/src/TabBar/TabBarContext.d.ts +6 -1
  61. package/types/src/Table/Cell.d.ts +3 -1
  62. package/types/src/Table/Head.d.ts +2 -2
  63. package/types/src/Table/HeadCell.d.ts +2 -0
  64. package/types/src/Table/Row.d.ts +4 -2
  65. package/types/src/Table/Table.d.ts +1 -1
  66. package/types/src/Table/Toggle.d.ts +4 -4
  67. package/types/src/TextArea/TextArea.d.ts +3 -2
  68. package/types/src/TextArea/icons/ClearButton.d.ts +3 -0
  69. package/types/src/TextArea/icons/SearchIcon.d.ts +1 -0
  70. package/types/src/Tree/TreeContext.d.ts +2 -1
  71. package/types/src/Tree/TreeItem.d.ts +18 -5
  72. package/types/src/fixtures/text.d.ts +1 -0
  73. package/types/src/CollapsiblePanel/docs/examples/prisma/BasicControlled.d.ts +0 -2
  74. package/types/src/CollapsiblePanel/docs/examples/prisma/BasicUncontrolled.d.ts +0 -2
  75. package/types/src/CollapsiblePanel/docs/examples/prisma/Content.d.ts +0 -1
  76. package/types/src/CollapsiblePanel/docs/examples/prisma/MultiControlled.d.ts +0 -2
  77. package/types/src/CollapsiblePanel/docs/examples/prisma/MultiUncontrolled.d.ts +0 -2
  78. package/types/src/JSONTree/JSONTreeContext.d.ts +0 -7
  79. package/types/src/JSONTree/TreeNode.d.ts +0 -44
package/MIGRATION.mdx CHANGED
@@ -5,6 +5,36 @@ import Table from '@splunk/react-ui/Table';
5
5
 
6
6
  This document lists migration guidance for new features and breaking changes.
7
7
 
8
+ ## 4.27.0
9
+
10
+ ### New `SingleOpenPanelGroup` API for `CollapsiblePanel`
11
+
12
+ #### Change
13
+ A new API, `SingleOpenPanelGroup`, has been added to `CollapsiblePanel`.
14
+
15
+ #### Context
16
+ `Accordion` and `CollapsiblePanel` have similar style and behavior. Their only behavioral difference was that `Accordion` would only allow one panel to be open at a time, whereas `CollapsiblePanel` would allow multiple panels to be open at a time.
17
+
18
+ Although they looked and behaved similarly, the APIs of `Accordion` and `CollapsiblePanel` were inconsistent. `inset` was supported in `Accordion` but not `CollapsiblePanel`; while actions were supported in `CollapsiblePanel` but not `Accordion`. Lastly, the components had different numbers of event handlers with different signatures.
19
+
20
+ These differences could lead to confusion on which component to use. It could also lead to using one component for a certain feature and then adding custom code to duplicate the functionality from the other component.
21
+
22
+ Given these behavioral and technical differences, `Accordion` will be deprecated in the next major version and `CollapsiblePanel` will support all the features of `Accordion` through its `SingleOpenPanelGroup` API. You will still be able to use `Accordion` in the next major version, but we recommend following the migration steps below at your earliest convenience.
23
+
24
+ #### Migration steps
25
+ Replace usage of `Accordion` with the `SingleOpenPanelGroup` component exported from `CollapsiblePanel`. See the `SingleOpenPanelGroup` examples in `CollapsiblePanel`'s documentation.
26
+
27
+ ### Deprecated `onRequestClose` and `onRequestOpen` callbacks and added new `onChange` callback for `CollapsiblePanel`
28
+
29
+ #### Change
30
+ `CollapsiblePanel`'s `onRequestClose` and `onRequestOpen` callbacks have been deprecated and will be removed in the next major version. A new callback `onChange` has been added to `CollapsiblePanel`.
31
+
32
+ #### Context
33
+ An `onChange` callback is more consistent with other components in `@splunk/react-ui`.
34
+
35
+ #### Migration steps
36
+ Replace `onRequestClose` and `onRequestOpen` callbacks with the new `onChange` callback when using a controlled `CollapsiblePanel`. See the Controlled example in `CollapsiblePanel`'s documentation.
37
+
8
38
  ## 4.26.0
9
39
 
10
40
  ### New `returnFocus` prop for `Modal`