Component changelog

Drawer changelog

Component-specific release notes collected from the full changelog. This page filters the published entries that mention Drawer.

Release

v1.2.0

npm
Minor Changes
  • befc825: New Drawer.Provider, Drawer.Indent and Drawer.IndentBackground: the page eases back while any drawer is open.

  • 07e6783: Popover, Dialog and AlertDialog onOpenChange handlers that take a second argument receive details: the reason (trigger-press, outside-press, escape-key, focus-out, close-press and more), the DOM event, and cancel() to keep the current state, for example an "unsaved changes" guard. Handlers that take one argument are called exactly as before. This matches Drawer, which already worked this way.

Patch Changes
  • cc18a8aFix modals used from inside a Drawer. A Dialog or AlertDialog opened from a drawer now stacks on top of it: screen readers can read it, clicks in it no longer close the drawer, Escape closes only the top one, and focus returns into the drawer. A portalled Select (or menu) inside a drawer can be picked with the mouse again; the drawer no longer treats a press on it as the start of a swipe.

Release

v1.1.0

npm
Patch Changes
  • 0af1268: fix: Drawer focus management and stable Toast manager functions

    • Drawer: focus now moves into the drawer when it opens, and Tab stays trapped inside. The focus manager used to engage as soon as data-state flipped to open, but the themes keep the popup visibility: hidden until the entrance transition starts. Initial focus found nothing focusable and silently failed, so keyboard and screen-reader users were left on the page behind the modal. It now waits until the popup is actually visible (capped at about 0.5s).
    • Toast: the functions from useToastManager() (add, close, update, promise, dismiss, dismissAll and the variant helpers) are stable for a given manager, as in Base UI. They used to be recreated on every render. An effect keyed on one of them, such as an unmount cleanup calling dismissAll, then re-ran on every render and dismissed each toast as soon as it was added.

Release

v1.0.0

npm
Patch Changes
  • 87604b7: Document Drawer keyboard interactions and ARIA references.

  • 7d338d9: docs(drawer): add the component documentation page and align the internal context type

  • 1ec9c6d: fix(drawer): resolve peekStyle temporal dead zone in DrawerContent

    DrawerContent referenced peekStyle inside the getFloatingProps call before the variable was declared further down the component body. The const declarations sat below an early return, so the reference landed in the temporal dead zone. The file failed to type-check, which broke four Drawer test suites at compile time.

    Hoisting the peekOffset/peekStyle pair above the getFloatingProps call fixes the ordering. getFloatingProps is also cast to its user-props signature, matching the convention already used by Dialog, Combobox and Menu.

  • 0ccabb4: fix(scrollarea): hide the scrollbar while a document overlay is open

    An overlay (Dialog, Menu, Popover, Combobox, Drawer) covers the page and locks body scroll, but a ScrollArea with type="always" still painted its scrollbar and thumb on top of it.

    Adds a document-level overlay registry and suppresses the scrollbar and thumb while any overlay is open:

    const isVisible =
      !overlaySuppressesScrollbar &&
      (type === "always" ||
        (type === "auto" && isOverflowing) ||
        (isOverflowing &&
          (type === "scroll" || type === "hover") &&
          scrollbarVisible));

    The registry is ref-counted and mirrors its state onto data-rad-ui-overlay-open on <html>, so overlays stack correctly (two open overlays decrement back to zero rather than clearing early). ScrollArea picks the state up via useDocumentOverlayOpenState, which also observes the attribute and body's inline style, so overlays from other libraries that only lock body scroll are covered too.

    resetDocumentOverlayOpenForTests is wired into the global afterEach in setupTests.ts so the registry cannot leak between suites.

Release

v0.5.0

npm
Minor Changes
  • fd2bd8bdrawer preview added