diff --git a/src/components/molecules/FilterPanel/FilterPanel.tsx b/src/components/molecules/FilterPanel/FilterPanel.tsx
index 9c18cae..704cf2a 100644
--- a/src/components/molecules/FilterPanel/FilterPanel.tsx
+++ b/src/components/molecules/FilterPanel/FilterPanel.tsx
@@ -39,128 +39,146 @@ export interface FilterPanelProps {
* D-C: Popover for desktop MVP. Mobile Drawer variant planned for later.
*
* Used in ProvidersStep, VenueStep, and CoffinsStep.
- *
- * Usage:
- * ```tsx
- *
- *
- *
- *
- * ```
*/
-export const FilterPanel: React.FC = ({
- label = 'Filters',
- activeCount = 0,
- children,
- onClear,
- minWidth = 280,
- sx,
-}) => {
- const [anchorEl, setAnchorEl] = React.useState(null);
- const open = Boolean(anchorEl);
- const popoverId = open ? 'filter-panel-popover' : undefined;
+export const FilterPanel = React.forwardRef(
+ ({ label = 'Filters', activeCount = 0, children, onClear, minWidth = 280, sx }, ref) => {
+ const [anchorEl, setAnchorEl] = React.useState(null);
+ const open = Boolean(anchorEl);
+ const uniqueId = React.useId();
+ const popoverId = `filter-panel-${uniqueId}`;
+ const headingId = `filter-panel-heading-${uniqueId}`;
- const handleOpen = (event: React.MouseEvent) => {
- setAnchorEl(event.currentTarget);
- };
+ const handleOpen = (event: React.MouseEvent) => {
+ setAnchorEl(event.currentTarget);
+ };
- const handleClose = () => {
- setAnchorEl(null);
- };
+ const handleClose = () => {
+ setAnchorEl(null);
+ };
- return (
- <>
- {/* Trigger button */}
-
- }
- onClick={handleOpen}
- aria-describedby={popoverId}
- aria-expanded={open}
- aria-haspopup="dialog"
- >
- {label}
- {activeCount > 0 && (
-
- {activeCount}
-
- )}
-
-
-
- {/* Popover panel */}
-
- {/* Header */}
-
- Filters
- {onClear && activeCount > 0 && (
- {
- onClear();
- }}
- underline="hover"
- sx={{ fontSize: '0.8125rem' }}
- >
- Clear all
-
- )}
-
-
-
-
- {/* Filter controls */}
-
- {children}
-
-
-
-
- {/* Footer — done button */}
-
-
-
- >
- );
-};
+
+ {/* Popover panel */}
+
+ {/* Header */}
+
+
+ {label}
+
+ {onClear && activeCount > 0 && (
+ {
+ onClear();
+ }}
+ underline="hover"
+ sx={{ fontSize: (theme: Theme) => theme.typography.caption.fontSize }}
+ >
+ Clear all
+
+ )}
+
+
+
+
+ {/* Filter controls */}
+
+ {children}
+
+
+
+
+ {/* Footer — done button */}
+
+
+ Done
+
+
+
+ >
+ );
+ },
+);
FilterPanel.displayName = 'FilterPanel';
export default FilterPanel;
diff --git a/src/components/organisms/ArrangementDialog/ArrangementDialog.tsx b/src/components/organisms/ArrangementDialog/ArrangementDialog.tsx
index e23cc91..de1eb42 100644
--- a/src/components/organisms/ArrangementDialog/ArrangementDialog.tsx
+++ b/src/components/organisms/ArrangementDialog/ArrangementDialog.tsx
@@ -157,385 +157,412 @@ function getAuthCTALabel(subStep: AuthSubStep): string {
*
* Pure presentation component — props in, callbacks out.
*/
-export const ArrangementDialog: React.FC = ({
- open,
- onClose,
- step,
- onStepChange,
- provider,
- selectedPackage,
- nextSteps = DEFAULT_NEXT_STEPS,
- isPrePlanning = false,
- onExplore,
- authValues,
- onAuthChange,
- authErrors,
- onGoogleSSO,
- onMicrosoftSSO,
- onContinue,
- loading = false,
- sx,
-}) => {
- const isEmailOnly = authValues.contactPreference === 'email_only';
+export const ArrangementDialog = React.forwardRef(
+ (
+ {
+ open,
+ onClose,
+ step,
+ onStepChange,
+ provider,
+ selectedPackage,
+ nextSteps = DEFAULT_NEXT_STEPS,
+ isPrePlanning = false,
+ onExplore,
+ authValues,
+ onAuthChange,
+ authErrors,
+ onGoogleSSO,
+ onMicrosoftSSO,
+ onContinue,
+ loading = false,
+ sx,
+ },
+ ref,
+ ) => {
+ const isEmailOnly = authValues.contactPreference === 'email_only';
+ const titleRef = React.useRef(null);
- const handleAuthField = (field: keyof AuthValues, value: string) => {
- onAuthChange({ ...authValues, [field]: value });
- };
+ // Focus the dialog title when step changes
+ React.useEffect(() => {
+ if (open && titleRef.current) {
+ titleRef.current.focus();
+ }
+ }, [step, open]);
- return (
-
+ );
+ },
+);
ArrangementDialog.displayName = 'ArrangementDialog';
export default ArrangementDialog;
diff --git a/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx b/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx
index e292445..68b0ac7 100644
--- a/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx
+++ b/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx
@@ -161,6 +161,13 @@ export const CoffinDetailsStep: React.FC = ({
{/* CTAs */}
{
+ e.preventDefault();
+ if (!loading) onContinue();
+ }}
sx={{
display: 'flex',
justifyContent: 'space-between',
@@ -170,13 +177,13 @@ export const CoffinDetailsStep: React.FC = ({
}}
>
{onSaveAndExit ? (
-
+
Save and continue later
) : (
)}
-
+
Continue
diff --git a/src/components/pages/ProvidersStep/ProvidersStep.tsx b/src/components/pages/ProvidersStep/ProvidersStep.tsx
index 8811446..860b6d6 100644
--- a/src/components/pages/ProvidersStep/ProvidersStep.tsx
+++ b/src/components/pages/ProvidersStep/ProvidersStep.tsx
@@ -145,8 +145,8 @@ export const ProvidersStep: React.FC = ({
zIndex: 1,
bgcolor: 'background.default',
pb: 1,
- mx: -3,
- px: 3,
+ mx: { xs: -2, md: -3 },
+ px: { xs: 2, md: 3 },
}}
>
diff --git a/src/components/pages/VenueStep/VenueStep.tsx b/src/components/pages/VenueStep/VenueStep.tsx
index 35f621c..83dc703 100644
--- a/src/components/pages/VenueStep/VenueStep.tsx
+++ b/src/components/pages/VenueStep/VenueStep.tsx
@@ -214,8 +214,8 @@ export const VenueStep: React.FC = ({
zIndex: 1,
bgcolor: 'background.default',
pb: 1,
- mx: -3,
- px: 3,
+ mx: { xs: -2, md: -3 },
+ px: { xs: 2, md: 3 },
}}
>