Passer au contenu principal

SearchSheet

Implemented

Bottom sheet for the public events search (HV2 / R5, ADR-058). What / Where / When fields plus optional date presets, submitted as a plain GET so it works without hydration. Each field can be replaced by a consumer slot — whatField / whereField (ADR-074) / whenField — the slot's input carries name into the same form, and whenView (ADR-075) swaps the panel to a full-height sub-view inside the same dialog. Modal semantics come from useOverlayDialog (Escape, scrim, focus trap, scroll lock, focus return). Default field names are the /events contract (q, city, when). ADR-071: each underline row's input paints the single field-level ring with ring-offset-ep-bg — rows never stack a wrapper ring.

Categoryorganisms
Sourcecomponents/organisms/SearchSheet/SearchSheet.tsx
AI HintField slots (whatField / whereField / whenField, ADR-074) replace one input each while the sheet keeps the label, the focus contract and the GET fallback — the slot's input must carry name into the same form; whenField drops the built-in presets. whenView (ADR-075) is a swap inside the SAME dialog — never a nested role=dialog aria-modal; the form stays mounted hidden so Quoi/Où values survive; the first Escape closes the view, the second closes the sheet; Apply never navigates — the sheet's submit stays the only navigation.

Catalog fallback

Live MDX preview not available for SearchSheet. Showing component catalog metadata instead.

Props

Preview

SearchSheet

Prop
Type
Required
Default
Description
open
boolean
Required
—

Visibility; nothing renders when false.

onClose
() => void
Required
—

Close request from Escape, the scrim or the close button.

action
string
Required
—

GET target, already locale-aware (e.g. /fr/events).

labels
SearchSheetLabels
Required
—

what / where / when / submit / close — the component authors no copy (DS i18n rule).

placeholders
SearchSheetPlaceholders
Required
—

what / where / when placeholders.

fieldNames
Partial<SearchSheetFieldNames>
Optional
{ q, city, when }

Query-param names, overriding the /events contract.

presets
SearchSheetPreset[]
Optional
—

Date presets rendered as aria-pressed chips that write into the When field (O7).

presetsLabel
string
Optional
labels.when

Accessible name of the preset group.

triggerRef
RefObject<HTMLElement | null>
Optional
—

Element that receives focus back on close.

className
string
Optional
—

Additional CSS classes on the overlay root.

themeScope
'dark' | 'inherit'
Optional
'inherit'

Scoped theming of the portal root (ADR-063): 'dark' carries data-theme="dark" — the scoped-dark brand band of ADR-062 (e.g. the v2 home) — while 'inherit' leaves the attribute off so the sheet resolves the surrounding/global theme.

whatField
ReactNode
Optional
—

Replaces the « Quoi » input with consumer-owned content (a combobox, DS SearchInput with renderForm={false}). The sheet keeps the field label, the focus contract and the GET fallback: the slot's input carries name into the same form.

whereField
ReactNode
Optional
—

ADR-074. Replaces the « Où » input — same contract as whatField: the sheet keeps the visible field label and the slot's input carries name into the same form.

whenField
ReactNode
Optional
—

Replaces the « Quand » input — same contract as whatField. When set, the built-in presets row is dropped: the slot owns the whole field.

whenView
ReactNode
Optional
—

ADR-075. Full-screen sub-view rendered above the form while set: the panel stretches to the viewport (h-[100dvh] … p-0) and the handle/close row is not rendered — the view owns its own header. The form stays MOUNTED but hidden, so the Quoi/Où inputs keep their DOM values.

whenViewLabel
string
Optional
—

Accessible name of the dialog while whenView is open.

onWhenViewClose
() => void
Optional
—

Escape pressed while whenView is open (first rung of the useOverlayDialog ladder); a second consecutive claimed Escape still closes the sheet.

Quick use:<SearchSheet />

Accessibility

ARIA roledialog

ARIA

1 rule

WCAG 2.1.2 / 4.1.2

role=dialog + aria-modal with the submit label as accessible name; focus trapped and returned

behavior

2 rules

ADR-056 relaxed lane, S1 when contract

Plain GET submit; presets only set the When field (no hidden state)

ADR-074 / ADR-075

whenView is a swap inside the SAME dialog — never a nested role=dialog aria-modal; the form stays mounted hidden so Quoi/Où values survive; the first Escape closes the view, the second closes the sheet; Apply never navigates — the sheet's submit stays the only navigation

Design System v4.1.0 | ePassLive