@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.
- package/Accordion.js +195 -212
- package/Box.js +45 -44
- package/Button.js +1 -2
- package/ButtonSimple.js +145 -147
- package/CHANGELOG.md +52 -3
- package/CollapsiblePanel.js +555 -325
- package/Color.js +3 -1
- package/ControlGroup.js +1 -0
- package/JSONTree.js +1311 -629
- package/MIGRATION.mdx +30 -0
- package/Markdown.js +521 -222
- package/Modal.js +26 -10
- package/Multiselect.js +844 -804
- package/Paginator.js +593 -271
- package/TabBar.js +487 -312
- package/Table.js +903 -869
- package/Text.js +30 -40
- package/TextArea.js +372 -432
- package/Tree.js +607 -519
- package/package.json +4 -2
- package/types/src/Accordion/Accordion.d.ts +2 -2
- package/types/src/Accordion/AccordionContext.d.ts +2 -3
- package/types/src/Box/Box.d.ts +3 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +49 -15
- package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +62 -0
- package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +9 -0
- package/types/src/CollapsiblePanel/docs/examples/MultiControlled.d.ts +2 -2
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupControlled.d.ts +2 -0
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupUncontrolled.d.ts +2 -0
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +7 -5
- package/types/src/File/docs/examples/FullScreen.d.ts +1 -14
- package/types/src/JSONTree/JSONTreeItem.d.ts +45 -0
- package/types/src/JSONTree/renderTreeItems.d.ts +17 -0
- package/types/src/Markdown/renderers/MarkdownAnchorHeading.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownCode.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownImage.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownItem.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownList.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -1
- package/types/src/Modal/Modal.d.ts +4 -5
- package/types/src/Multiselect/Normal.d.ts +1 -0
- package/types/src/Paginator/Button.d.ts +8 -3
- package/types/src/Paginator/Compact.d.ts +50 -0
- package/types/src/Paginator/PageControl.d.ts +37 -0
- package/types/src/Paginator/PageSelect.d.ts +32 -0
- package/types/src/Paginator/Paginator.d.ts +9 -4
- package/types/src/Paginator/docs/examples/Compact.d.ts +2 -0
- package/types/src/Paginator/docs/examples/CompactCustomLabel.d.ts +2 -0
- package/types/src/Paginator/docs/examples/CompactWithLabel.d.ts +2 -0
- package/types/src/Paginator/docs/examples/Labelled.d.ts +2 -0
- package/types/src/Paginator/docs/examples/PageControl.d.ts +2 -0
- package/types/src/Paginator/icons/ChevronLeft.d.ts +5 -0
- package/types/src/Paginator/icons/ChevronRight.d.ts +5 -0
- package/types/src/SlidingPanels/docs/examples/Modal.d.ts +1 -13
- package/types/src/TabBar/Tab.d.ts +12 -2
- package/types/src/TabBar/TabBar.d.ts +4 -3
- package/types/src/TabBar/TabBarContext.d.ts +6 -1
- package/types/src/Table/Cell.d.ts +3 -1
- package/types/src/Table/Head.d.ts +2 -2
- package/types/src/Table/HeadCell.d.ts +2 -0
- package/types/src/Table/Row.d.ts +4 -2
- package/types/src/Table/Table.d.ts +1 -1
- package/types/src/Table/Toggle.d.ts +4 -4
- package/types/src/TextArea/TextArea.d.ts +3 -2
- package/types/src/TextArea/icons/ClearButton.d.ts +3 -0
- package/types/src/TextArea/icons/SearchIcon.d.ts +1 -0
- package/types/src/Tree/TreeContext.d.ts +2 -1
- package/types/src/Tree/TreeItem.d.ts +18 -5
- package/types/src/fixtures/text.d.ts +1 -0
- package/types/src/CollapsiblePanel/docs/examples/prisma/BasicControlled.d.ts +0 -2
- package/types/src/CollapsiblePanel/docs/examples/prisma/BasicUncontrolled.d.ts +0 -2
- package/types/src/CollapsiblePanel/docs/examples/prisma/Content.d.ts +0 -1
- package/types/src/CollapsiblePanel/docs/examples/prisma/MultiControlled.d.ts +0 -2
- package/types/src/CollapsiblePanel/docs/examples/prisma/MultiUncontrolled.d.ts +0 -2
- package/types/src/JSONTree/JSONTreeContext.d.ts +0 -7
- 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`
|