ui phase 6

This commit is contained in:
hamid
2026-07-19 09:49:25 +03:30
parent 4c70d8e424
commit a438edeeaa
54 changed files with 1766 additions and 475 deletions
@@ -36,4 +36,9 @@ describe('<Money/>', () => {
);
expect(container.querySelector('[data-money][data-deduction="true"]')).toBeInTheDocument();
});
it('renders the xl size as an h4 for the checkout/confirmation prominent-total hero', () => {
wrap(<Money amountIrr="45000000" size="xl" />);
expect(screen.getByText(/4,500,000/).closest('.MuiTypography-h4')).not.toBeNull();
});
});
+4 -1
View File
@@ -5,13 +5,16 @@ import Box from '@mui/material/Box';
import Typography, { TypographyProps } from '@mui/material/Typography';
import { formatIrrToToman } from '@/utils';
export type MoneySize = 'sm' | 'md' | 'lg';
export type MoneySize = 'sm' | 'md' | 'lg' | 'xl';
export type MoneyTone = 'default' | 'emphasis' | 'muted' | 'error';
const SIZE_VARIANT: Record<MoneySize, TypographyProps['variant']> = {
sm: 'body2',
md: 'body1',
lg: 'h6',
// The C6/confirmation "prominent total" hero figure — the single most important number on a payment
// screen gets its own weight class, above the existing card/row emphasis.
xl: 'h4',
};
// House weight system has no 600 face (see typography.ts) — 700 for the strong tones, 500/400 otherwise.