|
1 | 1 | # Change log |
2 | 2 |
|
| 3 | +## 8.0.0-next.4 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +📝 [#4085](https://github.com/adobe/spectrum-css/pull/4085) [`082862e`](https://github.com/adobe/spectrum-css/commit/082862eb80c6e0ac1c801b1d538e4d2f2bb919b4) Thanks [@castastrophe](https://github.com/castastrophe)! |
| 8 | + |
| 9 | +### Action menu component (now with custom styles!) |
| 10 | + |
| 11 | +Introduces `@spectrum-css/actionmenu`, a composition of `ActionButton`, `Popover`, and `Menu` to present action lists from a trigger. Now with custom styles! |
| 12 | + |
| 13 | +- Adds wrapper classes: `spectrum-ActionMenu`, `spectrum-ActionMenu-trigger`, `spectrum-ActionMenu-popover`, and `spectrum-ActionMenu-menu`. |
| 14 | +- Supports long press triggers and four placements (start/end, top/bottom) via the underlying popover API. |
| 15 | +- Design reference: [Figma S2 token specs](https://www.figma.com/design/eoZHKJH9a3LJkHYCGt60Vb/S2-token-specs?node-id=20959-21513&node-type=frame&t=jbePQKK1yLdrHG2M-11). |
| 16 | + |
| 17 | +#### Migration notes |
| 18 | + |
| 19 | +- If you previously composed an action menu manually (action button + popover + menu), you can adopt the new wrapper classes without changing the underlying markup semantics. Ensure the trigger has `aria-haspopup="menu"` and manages `aria-expanded` according to your application logic. |
| 20 | +- For spacing customizations previously done with ad‑hoc margins, switch to the new `--spectrum-actionmenu-button-to-menu-gap` custom property. |
| 21 | + |
| 22 | +Example markup: |
| 23 | + |
| 24 | +```html |
| 25 | +<div class="spectrum-ActionMenu"> |
| 26 | + <button |
| 27 | + class="spectrum-ActionMenu-trigger spectrum-ActionButton" |
| 28 | + aria-haspopup="menu" |
| 29 | + aria-expanded="false" |
| 30 | + > |
| 31 | + <!-- icon/label --> |
| 32 | + </button> |
| 33 | + <div class="spectrum-ActionMenu-popover spectrum-Popover"> |
| 34 | + <ul class="spectrum-ActionMenu-menu spectrum-Menu"> |
| 35 | + <!-- menu items --> |
| 36 | + </ul> |
| 37 | + </div> |
| 38 | + <!-- popover positioning/visibility is owned by your implementation --> |
| 39 | + <!-- use long-press behavior when appropriate to your UX --> |
| 40 | + <!-- use Popover placement options: bottom-start, bottom-end, start-top, end-top --> |
| 41 | +</div> |
| 42 | +``` |
| 43 | + |
| 44 | +### Menu refinements |
| 45 | + |
| 46 | +Updates `@spectrum-css/menu` styles to align with latest Spectrum 2 design specifications and improve accessibility. |
| 47 | + |
| 48 | +- Updated `.is-selectableMultiple .spectrum-Menu-itemCheckbox` to `.is-selectableMultiple:not(:has(.is-selectable)) .spectrum-Menu-itemCheckbox` to prevent clash with the `.is-selectable` placement. |
| 49 | +- Non-breaking; no class or DOM changes required. |
| 50 | + |
| 51 | +### Action button refinements |
| 52 | + |
| 53 | +- Selection styling now applies when components use ARIA pressed/expanded semantics, not just `.is-selected`. |
| 54 | +- Implemented with `:where()` to keep selector specificity low and prevent downstream specificity battles. |
| 55 | +- Non-breaking; no class changes required. |
| 56 | + |
| 57 | +### Action group refinements |
| 58 | + |
| 59 | +Aligns selection behavior of grouped items with action button updates. |
| 60 | + |
| 61 | +- Adds `:where([aria-pressed="true"], [aria-expanded="true"])` alongside `.is-selected` on items to cover more accessibility use-cases while keeping specificity low. |
| 62 | +- Non-breaking; no class changes required. |
| 63 | + |
3 | 64 | ## 8.0.0-next.3 |
4 | 65 |
|
5 | 66 | ### Major Changes |
|
0 commit comments