Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
### Bug Fixes

- `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)).
- `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)).
- `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)).
- 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).
- `CollapsibleCard`: Fix missing keyboard focus ring on the header chevron icon when rendered inside wp-admin ([#77468](https://github.com/WordPress/gutenberg/pull/77468)).
- `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)).

Expand All @@ -25,6 +26,7 @@

### Internal

- 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)).
- Extract shared `useScheduleValidation` hook; refactor `Dialog`, `Popover`, and `Tabs` validation contexts to use it ([#77165](https://github.com/WordPress/gutenberg/pull/77165)).
- `Tabs`: Wrap two validation timeout waits in `act(...)` to avoid intermittent test warnings ([#77319](https://github.com/WordPress/gutenberg/pull/77319)).

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@base-ui/react": "^1.4.0",
"@base-ui/react": "^1.4.1",
"@wordpress/a11y": "file:../a11y",
"@wordpress/compose": "file:../compose",
"@wordpress/element": "file:../element",
Expand Down
12 changes: 0 additions & 12 deletions packages/ui/src/dialog/style.module.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;

/*
* Temporary workaround for a Base UI tabbability regression with
* checkVisibility() and display: contents.
* See: https://github.com/mui/base-ui/issues/4622
*
* This must stay outside the CSS layers to override ThemeProvider's
* unlayered display: contents.
*/
[data-wpds-theme-provider-id]:has(> .popup) {
display: block;
}

@layer wp-ui-components {
.backdrop {
position: fixed;
Expand Down
5 changes: 1 addition & 4 deletions packages/ui/src/popover/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ const Popup = forwardRef< HTMLDivElement, PopupProps >( function PopoverPopup(
ref={ mergedPopupRef }
initialFocus={ resolvedInitialFocus }
finalFocus={ finalFocus }
className={ clsx(
styles.popup,
variant !== 'unstyled' && styles.default
) }
className={ clsx( variant !== 'unstyled' && styles.popup ) }
{ ...props }
>
<PopoverValidationProvider>
Expand Down
24 changes: 1 addition & 23 deletions packages/ui/src/popover/style.module.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;

/*
* Temporary workaround for a Base UI tabbability regression with
* checkVisibility() and display: contents.
* See: https://github.com/mui/base-ui/issues/4622
*
* This must stay outside the CSS layers to override ThemeProvider's
* unlayered display: contents.
*/
[data-wpds-theme-provider-id]:has(> .popup) {
display: block;
}

@layer wp-ui-components {
.positioner {
z-index: var(--wp-ui-popover-z-index, initial);
}

/*
* Structural marker; no visual styles. Always applied to the popup so
* the ThemeProvider display workaround above matches regardless of
* `variant`. Visuals live in `.default`.
*/
/* stylelint-disable-next-line block-no-empty -- structural marker for the
* ThemeProvider display workaround above; kept class-based (not a data
* attribute) so it is defined alongside the other component classes. */
.popup {}

.default {
.popup {
background-color: var(--wpds-color-bg-surface-neutral-strong);
padding: var(--wpds-dimension-padding-lg);
border-radius: var(--wpds-border-radius-md);
Expand Down
12 changes: 0 additions & 12 deletions packages/ui/src/tooltip/style.module.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;

/*
* Temporary workaround for a Base UI tabbability regression with
* checkVisibility() and display: contents.
* See: https://github.com/mui/base-ui/issues/4622
*
* This must stay outside the CSS layers to override ThemeProvider's
* unlayered display: contents.
*/
[data-wpds-theme-provider-id]:has(> .popup) {
display: block;
}

@layer wp-ui-components {
.positioner {
z-index: var(--wp-ui-tooltip-z-index, initial);
Expand Down
12 changes: 0 additions & 12 deletions packages/ui/src/utils/css/item-popup.module.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;

/*
* Temporary workaround for a Base UI tabbability regression with
* checkVisibility() and display: contents.
* See: https://github.com/mui/base-ui/issues/4622
*
* This must stay outside the CSS layers to override ThemeProvider's
* unlayered display: contents.
*/
[data-wpds-theme-provider-id]:has(> .popup) {
display: block;
}

@layer wp-ui-utilities {
.popup {
composes: dropdown-motion from "./dropdown-motion.module.css";
Expand Down
Loading