Skip to content

Commit 2be694d

Browse files
ciampoaduthanomiex
authored
UI: Update @base-ui/react from 1.4.0 to 1.4.1 (#77520)
* UI: Update @base-ui/react from 1.4.0 to 1.4.1 This upstream release contains two fixes relevant to @wordpress/ui: - "Fix display: contents tabbability" (mui/base-ui#4642) fixes the focus-trap regression in overlay popups that was previously patched with a CSS workaround in #77381. That workaround is now removed from Dialog, AlertDialog, Popover, Tooltip, and Select styles. - "Mark date-fns peer dependencies as optional" (mui/base-ui#4639) addresses #77395 -- consumers of @wordpress/ui no longer need to install date-fns / @date-fns/tz to satisfy Base UI's peer deps. Made-with: Cursor * UI: Consolidate CHANGELOG into a single Internal entry Since PR #77381's workaround was Unreleased and is reverted by this PR, the net user-facing change between 0.11.0 and the next release is just the 1.4.0 -> 1.4.1 bump. Drop the standalone Bug Fix line and fold the focus-trap restoration into the existing Internal entry, matching the convention used for prior base-ui bumps (0.9.0, 0.11.0). Made-with: Cursor * UI: Split CHANGELOG into user-facing bug fixes + generic Internal bump Since 0.11.0 shipped with the Base UI 1.4.0 regressions, users do see two bug fixes between 0.11.0 and the next release. Document them explicitly: - Bug Fix: restore focus-trap tabbability (cites #77381 + this PR). - Bug Fix: remove transitive date-fns / @date-fns/tz peer dep (resolves #77395). - Internal: keep the @base-ui/react 1.4.0 -> 1.4.1 bump as a generic line. Made-with: Cursor --- Unlinked contributors: Joseph-Mutua. Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: aduth <aduth@git.wordpress.org> Co-authored-by: anomiex <bjorsch@git.wordpress.org>
1 parent 8c24ec9 commit 2be694d

8 files changed

Lines changed: 20 additions & 73 deletions

File tree

package-lock.json

Lines changed: 14 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ui/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
### Bug Fixes
1414

1515
- `Link`: Fix text decoration on the `unstyled` variant when `openInNewTab` is enabled, and simplify new-tab icon markup ([#77420](https://github.com/WordPress/gutenberg/pull/77420)).
16-
- `Dialog`, `AlertDialog`, `Popover`, `Tooltip`, `Select`: Fix broken focus-trap caused by ThemeProvider's `display: contents` and Base UI's `checkVisibility()` ([#77381](https://github.com/WordPress/gutenberg/pull/77381)).
16+
- `Dialog`, `AlertDialog`, `Popover`, `Tooltip`, `Select`: Restore focus-trap tabbability through `ThemeProvider`'s `display: contents` wrapper ([#77381](https://github.com/WordPress/gutenberg/pull/77381), [#77520](https://github.com/WordPress/gutenberg/pull/77520)).
17+
- Remove the transitive peer dependency on `date-fns` / `@date-fns/tz` ([#77520](https://github.com/WordPress/gutenberg/pull/77520)), resolving [#77395](https://github.com/WordPress/gutenberg/issues/77395).
1718
- `Text`: Apply both heading and paragraph CSS defenses regardless of variant, so the correct defense kicks in based on the rendered element rather than the typographic variant ([#77461](https://github.com/WordPress/gutenberg/pull/77461)).
1819
- `CollapsibleCard`: Fix missing keyboard focus ring on the header chevron icon when rendered inside wp-admin ([#77468](https://github.com/WordPress/gutenberg/pull/77468)).
1920
- `Tabs`: Fix missing keyboard focus ring on the panel in Windows High Contrast mode when rendered inside wp-admin ([#77469](https://github.com/WordPress/gutenberg/pull/77469)).
@@ -26,6 +27,7 @@
2627

2728
### Internal
2829

30+
- Update `@base-ui/react` from `1.4.0` to [`1.4.1`](https://github.com/mui/base-ui/releases/tag/v1.4.1) ([#77520](https://github.com/WordPress/gutenberg/pull/77520)).
2931
- Extract shared `useScheduleValidation` hook; refactor `Dialog`, `Popover`, and `Tabs` validation contexts to use it ([#77165](https://github.com/WordPress/gutenberg/pull/77165)).
3032
- `Tabs`: Wrap two validation timeout waits in `act(...)` to avoid intermittent test warnings ([#77319](https://github.com/WordPress/gutenberg/pull/77319)).
3133

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"types": "build-types",
4444
"sideEffects": false,
4545
"dependencies": {
46-
"@base-ui/react": "^1.4.0",
46+
"@base-ui/react": "^1.4.1",
4747
"@wordpress/a11y": "file:../a11y",
4848
"@wordpress/compose": "file:../compose",
4949
"@wordpress/element": "file:../element",

packages/ui/src/dialog/style.module.css

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
22

3-
/*
4-
* Temporary workaround for a Base UI tabbability regression with
5-
* checkVisibility() and display: contents.
6-
* See: https://github.com/mui/base-ui/issues/4622
7-
*
8-
* This must stay outside the CSS layers to override ThemeProvider's
9-
* unlayered display: contents.
10-
*/
11-
[data-wpds-theme-provider-id]:has(> .popup) {
12-
display: block;
13-
}
14-
153
@layer wp-ui-components {
164
.backdrop {
175
position: fixed;

packages/ui/src/popover/popup.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,7 @@ const Popup = forwardRef< HTMLDivElement, PopupProps >( function PopoverPopup(
8787
ref={ mergedPopupRef }
8888
initialFocus={ resolvedInitialFocus }
8989
finalFocus={ finalFocus }
90-
className={ clsx(
91-
styles.popup,
92-
variant !== 'unstyled' && styles.default
93-
) }
90+
className={ clsx( variant !== 'unstyled' && styles.popup ) }
9491
{ ...props }
9592
>
9693
<PopoverValidationProvider>

packages/ui/src/popover/style.module.css

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,11 @@
11
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
22

3-
/*
4-
* Temporary workaround for a Base UI tabbability regression with
5-
* checkVisibility() and display: contents.
6-
* See: https://github.com/mui/base-ui/issues/4622
7-
*
8-
* This must stay outside the CSS layers to override ThemeProvider's
9-
* unlayered display: contents.
10-
*/
11-
[data-wpds-theme-provider-id]:has(> .popup) {
12-
display: block;
13-
}
14-
153
@layer wp-ui-components {
164
.positioner {
175
z-index: var(--wp-ui-popover-z-index, initial);
186
}
197

20-
/*
21-
* Structural marker; no visual styles. Always applied to the popup so
22-
* the ThemeProvider display workaround above matches regardless of
23-
* `variant`. Visuals live in `.default`.
24-
*/
25-
/* stylelint-disable-next-line block-no-empty -- structural marker for the
26-
* ThemeProvider display workaround above; kept class-based (not a data
27-
* attribute) so it is defined alongside the other component classes. */
28-
.popup {}
29-
30-
.default {
8+
.popup {
319
background-color: var(--wpds-color-bg-surface-neutral-strong);
3210
padding: var(--wpds-dimension-padding-lg);
3311
border-radius: var(--wpds-border-radius-md);

packages/ui/src/tooltip/style.module.css

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
22

3-
/*
4-
* Temporary workaround for a Base UI tabbability regression with
5-
* checkVisibility() and display: contents.
6-
* See: https://github.com/mui/base-ui/issues/4622
7-
*
8-
* This must stay outside the CSS layers to override ThemeProvider's
9-
* unlayered display: contents.
10-
*/
11-
[data-wpds-theme-provider-id]:has(> .popup) {
12-
display: block;
13-
}
14-
153
@layer wp-ui-components {
164
.positioner {
175
z-index: var(--wp-ui-tooltip-z-index, initial);

packages/ui/src/utils/css/item-popup.module.css

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;
22

3-
/*
4-
* Temporary workaround for a Base UI tabbability regression with
5-
* checkVisibility() and display: contents.
6-
* See: https://github.com/mui/base-ui/issues/4622
7-
*
8-
* This must stay outside the CSS layers to override ThemeProvider's
9-
* unlayered display: contents.
10-
*/
11-
[data-wpds-theme-provider-id]:has(> .popup) {
12-
display: block;
13-
}
14-
153
@layer wp-ui-utilities {
164
.popup {
175
composes: dropdown-motion from "./dropdown-motion.module.css";

0 commit comments

Comments
 (0)