Batch 3: FilterPanel molecule + integration across 3 steps (D-C, D-F)

New molecule:
- FilterPanel: Popover-based reusable filter trigger with active
  count badge, Clear all, Done actions. D-C: Popover for MVP.

Step integrations:
- ProvidersStep: inline Chip filter bar → FilterPanel Popover,
  search bar + filter button side-by-side in sticky header
- VenueStep: same pattern, filter chips moved into Popover
- CoffinsStep (D-F): grid-sidebar layout → wide-form (full-width
  4-col grid), category + price selects moved into FilterPanel

WizardLayout:
- Added wide-form variant (maxWidth lg, single column) for
  card grids that benefit from full width
- wide-form included in STEPPER_VARIANTS for progress bar

Storybook:
- FilterPanel stories: Default, WithActiveFilters, SelectFilters,
  CustomLabel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 22:24:54 +11:00
parent 1c3cdbc101
commit c5581c6e9f
8 changed files with 576 additions and 252 deletions

View File

@@ -9,9 +9,10 @@ import { Typography } from '../../atoms/Typography';
// ─── Types ───────────────────────────────────────────────────────────────────
/** Layout variant matching the 5 wizard page templates */
/** Layout variant matching the wizard page templates */
export type WizardLayoutVariant =
| 'centered-form'
| 'wide-form'
| 'list-map'
| 'list-detail'
| 'grid-sidebar'
@@ -142,6 +143,20 @@ const CenteredFormLayout: React.FC<{ children: React.ReactNode }> = ({ children
</Container>
);
/** Wide Form: single column maxWidth "lg", for card grids (coffins, etc.) */
const WideFormLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => (
<Container
maxWidth="lg"
sx={{
py: { xs: 4, md: 6 },
px: { xs: 2, md: 3 },
flex: 1,
}}
>
{children}
</Container>
);
/** List + Map: 420px fixed scrollable list (left) / flex map (right) — D-B */
const ListMapLayout: React.FC<{
children: React.ReactNode;
@@ -256,6 +271,7 @@ const LAYOUT_MAP: Record<
}>
> = {
'centered-form': CenteredFormLayout,
'wide-form': WideFormLayout,
'list-map': ListMapLayout,
'list-detail': ListDetailLayout,
'grid-sidebar': GridSidebarLayout,
@@ -263,7 +279,7 @@ const LAYOUT_MAP: Record<
};
/** Variants that show the stepper/total bar */
const STEPPER_VARIANTS: WizardLayoutVariant[] = ['grid-sidebar', 'detail-toggles'];
const STEPPER_VARIANTS: WizardLayoutVariant[] = ['wide-form', 'grid-sidebar', 'detail-toggles'];
// ─── Component ───────────────────────────────────────────────────────────────