Normalize organisms, PaymentStep feedback, cross-page spacing fix
- Organism normalize pass: fix FuneralFinderV3 transition timing (200ms → 150ms ease-in-out), add autodocs tag to V3 stories - Navigation: fix logo a11y — div with role="link" → proper <a> tag - ToggleButtonGroup: add align (start/center) and direction (row/column) props, bump description text from text.secondary to text.primary - PaymentStep: divider under subheading, lock icon alignment, centre- aligned payment options, vertical payment method stack, checkbox align - SummaryStep: save button → text variant (matches other pages), centred - All wizard pages: heading mb: 1 → mb: 2 for better breathing room - Style Dictionary: auto-generate tokens.d.ts, fix TS unused imports - tokens.d.ts: generated type declarations for 398 token exports Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,10 @@ export interface ToggleButtonGroupProps extends Omit<
|
||||
error?: boolean;
|
||||
/** Whether a selection is required */
|
||||
required?: boolean;
|
||||
/** Text alignment inside each option button */
|
||||
align?: 'start' | 'center';
|
||||
/** Layout direction for the button group */
|
||||
direction?: 'row' | 'column';
|
||||
/** MUI sx prop for the root FormControl */
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
@@ -84,6 +88,8 @@ export const ToggleButtonGroup = React.forwardRef<HTMLFieldSetElement, ToggleBut
|
||||
helperText,
|
||||
error = false,
|
||||
required = false,
|
||||
align = 'start',
|
||||
direction = 'row',
|
||||
fullWidth,
|
||||
size = 'large',
|
||||
sx,
|
||||
@@ -132,6 +138,7 @@ export const ToggleButtonGroup = React.forwardRef<HTMLFieldSetElement, ToggleBut
|
||||
aria-label={label}
|
||||
sx={{
|
||||
gap: 2,
|
||||
...(direction === 'column' && { flexDirection: 'column' }),
|
||||
// Remove MUI's connected-button styling (grouped borders)
|
||||
'& .MuiToggleButtonGroup-grouped': {
|
||||
border: '2px solid',
|
||||
@@ -141,6 +148,7 @@ export const ToggleButtonGroup = React.forwardRef<HTMLFieldSetElement, ToggleBut
|
||||
borderLeft: '2px solid',
|
||||
borderColor: 'var(--fa-color-neutral-200)',
|
||||
marginLeft: 0,
|
||||
...(direction === 'column' && { marginTop: 0 }),
|
||||
},
|
||||
'&.Mui-selected': {
|
||||
borderColor: 'primary.main',
|
||||
@@ -155,10 +163,10 @@ export const ToggleButtonGroup = React.forwardRef<HTMLFieldSetElement, ToggleBut
|
||||
value={option.value}
|
||||
disabled={option.disabled}
|
||||
sx={{
|
||||
flex: 1,
|
||||
flex: direction === 'row' ? 1 : undefined,
|
||||
textTransform: 'none',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'flex-start',
|
||||
alignItems: align === 'center' ? 'center' : 'flex-start',
|
||||
justifyContent: 'flex-start',
|
||||
gap: 0.5,
|
||||
py: option.description ? 2 : 1.5,
|
||||
@@ -213,7 +221,7 @@ export const ToggleButtonGroup = React.forwardRef<HTMLFieldSetElement, ToggleBut
|
||||
{option.description && (
|
||||
<Typography
|
||||
variant="body2"
|
||||
color="text.secondary"
|
||||
color="text.primary"
|
||||
component="span"
|
||||
sx={{ fontWeight: 400, lineHeight: 1.4 }}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user