Skip to content

Commit e9656d8

Browse files
committed
Merge main into uikit/c21-wheel-values
# Conflicts: # packages/core/src/motion/README.md
2 parents e5bb4b6 + ef6d25b commit e9656d8

211 files changed

Lines changed: 31306 additions & 2492 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/animated-layout.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[chore] Internal: the one module for size-change glides (`spec:AST-105`, `architecture:react-component-runtime` INV12). After a reported size change, the content after it inside a container glides to its new place on one shared internal motion role, and the changed element enters or exits on the same motion. Not exported; no component uses it yet. The public `useAnimatedLayout` hook and Collapsible's and TreeList's `animatedLayout` prop arrive together in a later release.
6+
7+
@cixzhang
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[fix] `useAnnounce` now delivers a message by where its caller is. Inside an open Astryx modal — a Dialog, a modal BottomSheet (standalone or a switcher step), a modal Drawer, a Lightbox, MobileNav, or CommandPalette's dialog — the message reaches a persistent live region inside that dialog, which assistive technology hears while the modal is open, instead of the page-body region the modal hides; outside a modal nothing changes. Component and app code rendered inside a modal that calls `useAnnounce` is heard without any change to it. Delivery follows exposure, in top-layer order: a message sent as a switcher step hands over reaches the entering step, forward or back; a message sent as a modal BottomSheet closes, or just before an open Dialog is unmounted, waits while the leaving modal still covers the page and is delivered at its real close to whatever is exposed then — the Dialog it was opened over, or the page body — instead of being lost; a message a modal receives while a later modal covers it is not written and its region is clear before it is on top again. Busy controls inside a modal announce their busy start through the same region, including inside a native modal an app renders without Astryx; messages written to one region before the first is exposed are joined, and an identical repeat in the same frame is said once. The region's internal marker is `data-astryx-modal-live-region="polite"` or `"assertive"` (the busy region's former `data-astryx-modal-busy-region` is gone). Not in this change: CommandPalette's own result-count messages, Lightbox's own position and zoom messages, and Selector's and MultiSelector's selection and result-count messages in their `bottom-sheet` presentation are sent from the component that renders each dialog, above it, and still use the page-body channel while that dialog is open; each component's own change follows. This meets the in-modal delivery requirement in spec:AST-086 (FR14).
6+
7+
@imdreamrunner

‎.changeset/announce-same-frame-join.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
'@astryxdesign/core': patch
33
---
44

5-
[fix] useAnnounce: messages announced in the same frame are now joined, in order, into one announcement instead of the last one replacing the others, and an identical repeat is spoken once, so a screen reader no longer misses an earlier status such as a result count announced alongside a confirmation. An empty message still clears the region, including joined messages not yet spoken. This meets the shared-channel requirement in spec:AST-086 (FR9).
5+
[fix] useAnnounce: messages announced in the same frame are now joined, in order, into one announcement instead of the last one replacing the others, and an identical repeat is spoken once, so a screen reader no longer misses an earlier status such as a result count announced alongside a confirmation. An empty message still clears the region, including joined messages not yet spoken. This meets the shared-channel requirement in spec:AST-086 (FR9). Introduced in [#8244](https://github.com/facebook/astryx/pull/8244); final-state evidence: [#8294](https://github.com/facebook/astryx/pull/8294).
66

77
@cixzhang
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[feat] `BottomSheet` stacks by open order. A modal sheet opened while another modal sheet is open now stacks on top of it instead of presenting as a second, unrelated dialog: the covered sheet stays mounted with its state, recedes behind the top sheet (0.96 / −8px at depth 1, 0.92 / −16px from depth 2), and is blocked from pointer, keyboard, and assistive technology; only the bottom sheet's backdrop dims the page, so a stack no longer darkens per level; and Escape, a scrim tap, a swipe, and a platform close request pop only the top sheet, through that sheet's own `onOpenChange` and honouring its `purpose`. The top sheet is the most recently opened one still open, wherever the sheets are written — siblings, separate components, inside another sheet's content, or inside a `BottomSheetSwitcher` step; a whole switcher is one level, and switching its step keeps its place. When several sheets open in one update (a deep link), tree order decides and the first painted frame is already right: a sheet nested in another sheet's content no longer opens beneath its parent. Closing the top sheet returns focus into the sheet it reveals; closing every sheet of a stack in one update returns focus once, to the bottom sheet's `finalFocusRef` or opener, after the last dialog has closed (each sheet's own return used to be refused while the others were still modal). A sheet rendered inside a closing sheet's content now leaves with it instead of staying open invisibly, and comes back with the host if its own `isOpen` is still true (its state is never written for it); sheets above it that are not in its content stay open. Sheets with `hasScrim={false}` never stack and are never stacked on. No prop, type, or export changes; a modal sheet on its own behaves exactly as before (apart from the reduced-motion fix released alongside).
6+
7+
@imdreamrunner
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[fix] BottomSheet follows the reduced-motion design rule. With `prefers-reduced-motion: reduce`, a sheet's entrance, exit, recede and replace handoff — a `BottomSheetSwitcher` step's too — no longer travel or scale: on a touch screen (`pointer: coarse`) the entering sheet fades in at its resting place and the leaving or retained sheet fades out where it is, opacity only, within 200 ms; with a mouse, trackpad or keyboard the change is immediate, except that a swipe dismissal — a transition a touch drag's release started — fades out in place on every pointer. Before, the motions ran shortened transforms on every pointer and nothing cross-faded.
6+
7+
@imdreamrunner
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[feat] `BottomSheet` replaces a sheet that closes in the same update another opens. When the top sheet of a stack closes and exactly one other sheet opens in the same update (one state value naming the open step does this), the new sheet replaces it instead of stacking on it: it rises above the replaced sheet, a taller replaced sheet moves down to meet its top edge at the same time, the replaced sheet fades only after both motions finish and is inert and hidden from assistive technology from the start, the scrim holds steady with no dip, focus moves into the new sheet, and closing the flow later returns focus to the element that opened its first sheet. This is the handoff `BottomSheetSwitcher` runs between its steps, now available to standalone sheets; a multi-step flow can be written as one `BottomSheet` per step with no switcher. A covered sheet closing while a sheet opens, several sheets changing at once, or a close and an open in different updates keep the ordinary push and pop motion, and existing stacking behaviour is unchanged. A replace is recognised only when the move was made from inside the closing sheet: the control last pressed (or, with no recent press, the focused element) was in it, as a step's own Continue or Back button is; a close and an open driven from a control outside it, by two unrelated owners, stay a pop and a push with their own focus return. Non-modal sheets (`hasScrim={false}`) replace each other the same way: they are now hosted in the browser top layer as manual popovers, with no scrim, focus trap or scroll lock as before, so a non-modal step orders above the one it replaces, and the toast viewport re-enters the top layer above a non-modal sheet as it does above a modal. The non-modal sheet's page-level `z-index` is gone with the move (AST-027); below the Popover API support floor the sheet falls back to `show()` in page stacking order, usable but with no promise over later page content (the reduced fallback AST-003 describes). They still never stack. A non-modal sheet now also returns focus to its opener when it closes while the person is still in it (a modal sheet always did); focus the person took elsewhere on the live page stays there. The private stack registry now keeps one state per page shared by every copy of the package on it that speaks the same stack protocol version (a copy on another version keeps its own stack), and one stack per document. No prop, type, or export changes; a modal sheet on its own behaves exactly as before (apart from the reduced-motion fix released alongside). A non-modal sheet on its own changes in three ways with its new host: it is in the top layer (a manual popover) instead of page stacking order, its page-level `z-index` is gone, and it returns focus to its opener on close while focus is still inside it; its scrim-less, scroll-free, page-interactive contract is unchanged.
6+
7+
@imdreamrunner
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[feat] `BottomSheetSwitcher` and the `sheetId` prop of `BottomSheet` are deprecated. The replacement is already in this release: write each step of a multi-step flow as its own standalone `BottomSheet` with `isOpen`, driven by one state value that names the open step; closing the top sheet and opening the next in the same update runs the same replace handoff the switcher ran (entering step above, a taller retained step aligns down and fades after both motions, one steady scrim, focus into the new step and back to the flow's opener on close). Migration, per flow: (1) replace the `activeSheet` / `onActiveSheetChange` pair with one `step` state value; (2) give each step `isOpen={step === 'id'}` and `onOpenChange={isOpen => !isOpen && setStep(current => (current === 'id' ? null : current))}` in place of `sheetId="id"` (the guard keeps a step that is being replaced from clearing the step the person just chose); (3) remove the `BottomSheetSwitcher` wrapper, moving its `hasScrim` onto every step; (4) keep the step buttons as they were (`setStep('next')`). The handoff runs when the move is made from inside the open step (a step's own Continue or Back, or code while focus is in it); a step changed from a control outside the flow's sheets — a page control beside a `hasScrim={false}` flow, or code after focus has left the step — closes and opens with the sheets' own push and pop motion, where the switcher handed off on any `activeSheet` change. The switcher's other props map as follows: `onCancel` becomes a guarded `onOpenChange` on each step (one that ignores `false` while the flow must stay open), which keeps the step's dialog role — a standalone sheet reports Escape, the platform close, the scrim tap and the swipe all as `onOpenChange(false)` with no reason, so the guard holds the step open against all of them while it applies, where `onCancel` vetoed only the cancel request; a veto of Escape alone has no equivalent, and the only per-path lever is `purpose` (`form` keeps Escape and blocks the scrim tap and the swipe; `required` blocks all three and exposes the step as an `alertdialog`). A consumer `aria-label` / `aria-labelledby` becomes each step's `label`, which names its dialog. `ref`, `id`, `data-testid`, `className`, `style`, `xstyle` and the other dialog props have no dialog-level equivalent — a standalone sheet's `ref` and base props reach its panel `<div>` and its dialog is implementation — so a test or an anchor that needs the dialog queries the panel's `closest('dialog')`, and dialog-level styling is dropped. Flows that keep using the switcher keep working: a switcher flow used on its own behaves as released — with two fixes released alongside: a toast raised from a step now renders above the flow and can be pressed, and under reduced motion its steps' entrance, exit and handoff follow the reduced-motion rule (no travel; a cross-fade on touch, immediate otherwise) — and when it is stacked with other sheets the stacking behaviour of this release applies to it as one level (it recedes and is blocked when covered, shares the one scrim, stands down from dismissal while covered, and returns focus by the stacking rules). Its declarations and docs are marked `@deprecated` and its docs, templates and stories show only the replacement, until a future minor release removes it. Non-modal flows (`hasScrim={false}`) migrate the same way: non-modal sheets replace each other too.
6+
7+
@imdreamrunner
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[fix] Toasts raised from a `BottomSheetSwitcher` step stay visible and clickable above the flow. A modal switcher flow now supplies its active step's dialog as the toast viewport's host, as a standalone scrim `BottomSheet` and a `Dialog` do; the host follows each handoff to the entering step, and the flow hands the viewport back when it closes. Before, the viewport stayed behind the flow's dialogs, so a toast raised from a step was covered by the step and a press on it landed on the step. A `hasScrim={false}` flow is not modal and leaves the viewport in place.
6+
7+
@imdreamrunner
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/cli': patch
3+
---
4+
5+
[feat] The two Bottom Sheet flow block templates (`BottomSheetSwitcherShowcase`, `BottomSheetSwitcherReviewFlow`) now teach the replacement for the deprecated `BottomSheetSwitcher`: each step is a standalone `BottomSheet` driven by one state value, and moving on replaces the open step in place. Both stay examples of `BottomSheetSwitcher` (the showcase remains that page's hero) and are now also listed under `BottomSheet`. Template ids, files and their published registry identities keep their names, so `template <name>`, the released JSON ids and the ShadCN routes are unchanged.
6+
7+
@imdreamrunner
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/cli': patch
3+
---
4+
5+
[fix] `detectStylingSystem` recognizes `@stylexjs/unplugin` as a StyleX compiler, so projects compiling StyleX through the standard Vite path are detected as `stylex` instead of falling through to the `css` guidance.
6+
7+
@nbozidarevic

0 commit comments

Comments
 (0)