Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- `AlertDialog`, `Dialog`, `Drawer`, `Popover`, and `Tooltip`: Derive Trigger props from the corresponding Base UI components. ([#81824](https://github.com/WordPress/gutenberg/pull/81824))
- `Autocomplete.Status`, `Combobox.Status`: Add a `Status` subcomponent that announces async list status to screen readers. Item popups give Status its own collapsing grid row so a visible result count sits above the list without overlaying items ([#82195](https://github.com/WordPress/gutenberg/pull/82195)).
- `Autocomplete.Popup`, `Combobox.Popup`, `SearchableChipSelect`, `SearchableChipSelectControl`, `Select.Popup`, and `SelectControl`: Add `width` on Popups and `popupWidth` on composites, with preset width constraints (`anchor`, `content`, `sm`, `md`, `lg`, and `available`) for the item popup. `SelectControl` defaults to `content` to preserve prior popup sizing ([#82087](https://github.com/WordPress/gutenberg/pull/82087), [#82193](https://github.com/WordPress/gutenberg/pull/82193)).
- `Menu`: Use the external icon instead of an arrow glyph for links that open in a new tab. ([#82345](https://github.com/WordPress/gutenberg/pull/82345))
- `Menu`: Support multiple item descriptions. ([#81825](https://github.com/WordPress/gutenberg/pull/81825))
- `Menu`: Use `Text` for item labels and descriptions to share typography and apply `text-wrap: pretty`. ([#82237](https://github.com/WordPress/gutenberg/pull/82237))
- `Text`: Apply `text-wrap: pretty` by default to improve line wrapping. ([#82133](https://github.com/WordPress/gutenberg/pull/82133))
Expand Down
6 changes: 5 additions & 1 deletion packages/ui/src/menu/link-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Menu as _Menu } from '@base-ui/react/menu';
import clsx from 'clsx';
import { forwardRef } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { external } from '@wordpress/icons';
import { Icon } from '../icon';
import defenseStyles from '../utils/css/global-css-defense.module.css';
import resetStyles from '../utils/css/resets.module.css';
import styles from './style.module.css';
Expand Down Expand Up @@ -37,7 +39,9 @@ const LinkItem = forwardRef< Element, LinkItemProps >( function MenuLinkItem(
/* translators: accessibility text appended to link text */
__( '(opens in a new tab)' )
}
/>
>
<Icon icon={ external } size={ 16 } aria-hidden="true" />
</span>
) : null;
const {
contentChildren,
Expand Down
14 changes: 3 additions & 11 deletions packages/ui/src/menu/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -300,19 +300,11 @@
}

.external-link-indicator {
display: inline-block;
line-height: 1;
display: inline-flex;
align-items: center;
margin-inline-start: var(--wpds-dimension-gap-xs);
font-weight: var(--wpds-typography-font-weight-default);
text-decoration: none;
}

.external-link-indicator::after {
content: "\2197";
}

.external-link-indicator:dir(rtl)::after {
content: "\2196";
vertical-align: middle;
}

.item[data-highlighted]:not([aria-disabled="true"]) .item-prefix,
Expand Down
Loading