@marigold/components@17.7.0
Minor Changes
-
f4608c6: feat(DSTSUP-262): add
largesize to Dialog for wider layoutsDialog(andConfirmationDialog, which inherits the prop) now acceptssize="large", which sets the dialog width to1024px— matching the Tailwindlgbreakpoint. Use it for content that doesn't fit the previousmediumcap of768px, e.g. multi-month calendars or wider forms. The existingmin()width formula keeps the dialog viewport-safe on smaller screens. -
e0d5c7b: feat(DST-1500): default auto-dismiss timeout for toasts
addToastnow applies a defaulttimeoutbased onvariantwhen none is given:success,infoand the default variant auto-dismiss after 5000ms, whilewarninganderrorstay until dismissed. Pass an explicittimeoutto override it (values are clamped up to a 5000ms minimum), ortimeout: 0to keep a toast on screen until it is manually dismissed.Behavior change:
success,infoand default toasts that previously stayed until dismissed now auto-dismiss after 5 seconds. Passtimeout: 0to restore the old behavior.
Patch Changes
-
a6a1cb3: fix(DSTSUP-260):
Paginationfollows the controlledpageprop after mountPreviously the
pageprop only seeded internal state, so external updates (e.g. resetting to page 1 on a filter change) were ignored — the page indicator and the accessible<nav>label kept showing the stale page.Paginationnow usesuseControlledStatefrom react-stately: whenpageis set, it is the single source of truth andonChangereports requested page changes;defaultPageremains the uncontrolled initial value. As part of this,onChangeno longer fires when the active page is selected again, and the reset-to-page-1 behavior onpageSizechanges only triggers whenpageSizeactually changed. -
4242aa1: fix(DST-1505): re-export
I18nProviderfromreact-aria-componentsto prevent locale context splitsI18nProviderwas re-exported from@react-aria/i18n, which resolvesreact-ariavia a caret range whilereact-aria-componentspins it exactly. A consumer's lockfile can therefore install tworeact-ariacopies, splitting theI18nContext: the locale set through Marigold'sI18nProviderlanded in one copy's context while the react-aria-components rendering Marigold's UI read the other — silently falling back to the default locale for aria labels, date/number formatting, and RTL detection.Re-exporting
I18nProviderfromreact-aria-componentsmakes provider and consumers share one context by construction, regardless of how the lockfile resolvesreact-aria. Same failure class as the mobileSelecttray bug (DSTSUP-261). -
da46e58: fix(DSTSUP-261): make
Trayimmune to a split react-ariaHiddenContext(mobileSelecttray selecting nothing)On a touch/mobile viewport,
Select(and other components that fall back to aTray) could open an empty bottom sheet next to the real one: tapping an option selected nothing, the trigger kept showing the placeholder, and the page was leftinertuntil reload.Root cause was a dependency-resolution split, not component logic.
Trayguards the collection hidden pass withuseIsHidden()from@react-aria/collections(which depends onreact-ariavia a caret range), whilereact-aria-componentspinsreact-ariaexactly and itsSelect(acreateHideableComponent) sets theHiddenContextfrom its own copy. Both read that context fromreact-aria/private/collections/Hidden, so they only agree whenreact-ariaresolves to a single version. When a consumer's lockfile resolves the two edges to differentreact-ariagenerations, the guard reads a context the collection renderer never sets: it never fires, a duplicate (empty) tray modal leaks into the DOM, and the two modalsinerteach other so options are no longer hit-testable.Traynow verifies the hidden pass through the DOM as well: react-aria renders the hidden pass into a<template>element, whose content lives in a detachedDocumentFragment. A hidden probe element rendered alongside the modal is therefore never connected to the document during the hidden pass, and the tray skips mounting its modal whenever the probe is detached. This holds no matter how the consumer's lockfile resolvesreact-aria— including future react-aria releases that would re-arm the split (@react-aria/collections' caret range resolves to the newestreact-aria, whilereact-aria-componentsstays pinned) — so no dependency pins are needed.The durable upstream fix is for react-aria-components'
Modalto skip the collection hidden pass like itsPopoveralready does (which is why the desktopPopoverpath was never affected), or for it to exportuseIsHidden. Once either lands, the guard inTraycan be reduced again.- @marigold/system@17.7.0