@splunk/react-ui 4.26.0 → 4.27.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 (32) hide show
  1. package/Accordion.js +195 -212
  2. package/CHANGELOG.md +26 -3
  3. package/CollapsiblePanel.js +554 -325
  4. package/Color.js +3 -1
  5. package/ControlGroup.js +1 -0
  6. package/MIGRATION.mdx +30 -0
  7. package/Modal.js +15 -6
  8. package/Table.js +898 -866
  9. package/Text.js +30 -40
  10. package/TextArea.js +152 -236
  11. package/package.json +4 -2
  12. package/types/src/Accordion/Accordion.d.ts +2 -2
  13. package/types/src/Accordion/AccordionContext.d.ts +2 -3
  14. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +49 -15
  15. package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +62 -0
  16. package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +9 -0
  17. package/types/src/CollapsiblePanel/docs/examples/MultiControlled.d.ts +2 -2
  18. package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupControlled.d.ts +2 -0
  19. package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupUncontrolled.d.ts +2 -0
  20. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +7 -5
  21. package/types/src/Table/Cell.d.ts +3 -1
  22. package/types/src/Table/Head.d.ts +2 -2
  23. package/types/src/Table/HeadCell.d.ts +2 -0
  24. package/types/src/Table/Row.d.ts +4 -2
  25. package/types/src/Table/Table.d.ts +1 -1
  26. package/types/src/Table/Toggle.d.ts +4 -4
  27. package/types/src/fixtures/text.d.ts +1 -0
  28. package/types/src/CollapsiblePanel/docs/examples/prisma/BasicControlled.d.ts +0 -2
  29. package/types/src/CollapsiblePanel/docs/examples/prisma/BasicUncontrolled.d.ts +0 -2
  30. package/types/src/CollapsiblePanel/docs/examples/prisma/Content.d.ts +0 -1
  31. package/types/src/CollapsiblePanel/docs/examples/prisma/MultiControlled.d.ts +0 -2
  32. package/types/src/CollapsiblePanel/docs/examples/prisma/MultiUncontrolled.d.ts +0 -2
package/Color.js CHANGED
@@ -331,7 +331,9 @@
331
331
  var le = j().ul.withConfig({
332
332
  displayName: "PaletteStyles__StyledSwatches",
333
333
  componentId: "qgv9v9-1"
334
- })([ "", ";margin-bottom:", ";" ], P.mixins.reset("block"), P.variables.spacingQuarter);
334
+ })([ "", ";", "" ], P.mixins.reset("block"), (0, P.pick)({
335
+ enterprise: (0, I.css)([ "margin-bottom:", ";" ], P.variables.spacingQuarter)
336
+ }));
335
337
  var ie = j().li.withConfig({
336
338
  displayName: "PaletteStyles__StyledSwatch",
337
339
  componentId: "qgv9v9-2"
package/ControlGroup.js CHANGED
@@ -677,6 +677,7 @@
677
677
 
678
678
  return n().createElement(O, E({
679
679
  "data-test": "control-group",
680
+ "data-test-required": m,
680
681
  $error: Q
681
682
  }, B), n().createElement(T.Provider, {
682
683
  value: this.getContextValue()
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`
package/Modal.js CHANGED
@@ -105,8 +105,7 @@
105
105
  var j = x()(S()).withConfig({
106
106
  displayName: "BodyStyles__StyledBox",
107
107
  componentId: "lv54z7-0"
108
- })([ "background-color:", ";", " flex:0 1 auto;overflow:auto;@media all and (-ms-high-contrast:none){*::-ms-backdrop,&{max-height:calc(100vh - 180px);}}" ], (0,
109
- w.pick)({
108
+ })([ "background-color:", ";", " flex:0 1 auto;overflow:auto;" ], (0, w.pick)({
110
109
  enterprise: w.variables.backgroundColor,
111
110
  prisma: w.variables.backgroundColorDialog
112
111
  }), (0, w.pick)({
@@ -364,15 +363,25 @@
364
363
  var Z = x().div.withConfig({
365
364
  displayName: "HeaderStyles__StyledTitle",
366
365
  componentId: "sc-1y722ut-3"
367
- })([ "", ";font-size:20px;margin:0;overflow-wrap:break-word;font-weight:", ";color:", ";", "" ], w.mixins.reset("block"), w.variables.fontWeightSemiBold, w.variables.contentColorActive, (0,
366
+ })([ "", ";", " margin:0;overflow-wrap:break-word;" ], w.mixins.reset("block"), (0,
368
367
  w.pick)({
369
- enterprise: (0, g.css)([ "line-height:22px;" ]),
370
- prisma: (0, g.css)([ "line-height:24px;" ])
368
+ enterprise: (0, g.css)([ "", "" ], w.mixins.typography({
369
+ size: 20,
370
+ weight: "semiBold",
371
+ color: "active",
372
+ lineHeight: 22
373
+ })),
374
+ prisma: (0, g.css)([ "", "" ], w.mixins.typography({
375
+ size: 20,
376
+ weight: "semiBold",
377
+ color: "active",
378
+ lineHeight: 24
379
+ }))
371
380
  }));
372
381
  var ee = x().div.withConfig({
373
382
  displayName: "HeaderStyles__StyledSubtitle",
374
383
  componentId: "sc-1y722ut-4"
375
- })([ "", ";font-size:14px;overflow-wrap:break-word;line-height:", ";" ], w.mixins.reset("block"), w.variables.lineHeight);
384
+ })([ "", ";overflow-wrap:break-word;" ], w.mixins.reset("block"));
376
385
  var te = x().div.withConfig({
377
386
  displayName: "HeaderStyles__StyledButtonsWrapper",
378
387
  componentId: "sc-1y722ut-5"