@splunk/react-ui 5.0.0-beta.5 → 5.0.0-rc.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.
package/MIGRATION.v5.mdx CHANGED
@@ -483,4 +483,55 @@ we have deprecated the `anchor` prop.
483
483
  Replace all usage of the `anchor` prop with passing in the `Anchor` component to the `title` prop:
484
484
  ```jsx
485
485
  <Card.Header title={<Anchor name="Title">Title</Anchor>} />
486
- ```
486
+ ```
487
+
488
+ ## Deprecated `Popover`'s `"inverted"` value of the `appearance` prop
489
+
490
+ ### Change
491
+
492
+ `Popover`'s `"inverted"` value of the `appearance` prop has been deprecated and will be removed in the next major version.
493
+
494
+ ### Context
495
+
496
+ The inverted appearance was deprecated to ensure the Popover background aligns with the color scheme, i.e. Popover should be light in light mode and dark in dark mode.
497
+
498
+ ### Migration steps
499
+ Replace all usage of Popover's `appearance="inverted"` with `appearance="normal"` (default).
500
+ If teams need to keep inverted Popovers they can use `backgroundColorFloating` and `contentColorInverted`. Otherwise Popover uses `backgroundColorPopup`.
501
+ ```jsx
502
+ const StyledContent = styled.div`
503
+ background-color: ${variables.backgroundColorFloating};
504
+ color: ${variables.contentColorInverted};
505
+ `;
506
+
507
+ return (
508
+ <Popover>
509
+ <StyledContent>Popover content</StyledContent>
510
+ </Popover>
511
+ )
512
+ ```
513
+
514
+ ## `Button`'s `label` prop no longer sets `label` attribute
515
+
516
+ ### Change
517
+ `Button`'s `label` prop no longer sets HTML attribute `label` on the underlying button element.
518
+
519
+ ### Context
520
+ In previous versions, the `label` prop, which sets the text on the Button, was also passed as a `label` HTML attribute which is invalid HTML for a `<button>`. This has been removed.
521
+
522
+ ### Migration steps
523
+ Replace usages of `label` selector in tests with a different suitable query e.g. replace `querySelector('[label="Save"]')` with `getByText('Save')`.
524
+
525
+ ## `Color`'s test hook `[data-test="color"]` moved to root and `[data-test="toggle-swatch"]` added to toggle swatch
526
+
527
+ ### Change
528
+
529
+ `Color`'s test hook `[data-test="color"]` has been moved to the root `div` element and a new test hook `[data-test="toggle-swatch"]` has been added to the toggle swatch.
530
+
531
+ ### Context
532
+
533
+ `Color`'s test hook `[data-test="color"]` was incorrectly documented as the root of the component but was actually set on the toggle swatch.
534
+
535
+ ### Migration steps
536
+ If the test hook needs to be on the root element of `Color`, use `[data-test="color"]`.
537
+ If the test hook was being used to interact with the toggle swatch, replace usage of `[data-test="color"]` with `[data-test="toggle-swatch"]`.