Redesign the setup flow and consolidate the CSS into one primitives layer

Onboarding asks explicitly for one or two parents and shows one card per
parent for balances; the balance form is per parent with inline
validation; the partner can be filled from the FK deduction or added
from it. Settings and Dashboard reuse the same form.

CSS: bare buttons carry no colour any more; buttons, cards, choice
cards, fields, alerts, badges, eyebrow and modal chrome are defined once
in primitives.css. Media queries live only in responsive.css. A style
guard test blocks hex, !important and stray media queries. Bilingual
fixes: calendar selects size by content, header no longer wraps. Vitest
is capped at four workers.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-19 12:27:29 +02:00
parent e4719cb9ae
commit ae6db7e16f
105 changed files with 5683 additions and 3690 deletions
+22 -23
View File
@@ -14,24 +14,27 @@ export const settings = {
'dayOverridesInput.offStatus': 'I\'m off this day',
'dayOverridesInput.statusLegend': 'Status',
'dayOverridesInput.workingStatus': 'I\'m working this day',
'manualFetchModal.cancelButton': 'Cancel',
'manualFetchModal.closeAria': 'Close',
'manualFetchModal.daysRemaining': 'Days remaining:',
'manualFetchModal.daysUsedLabel': 'Days used',
'manualFetchModal.description': 'Enter your parental leave information from Försäkringskassan manually if automatic fetching is unavailable.',
'manualFetchModal.dubbeldagarLabel': 'Dubbeldagar left (0-60)',
'manualFetchModal.lagstaUsedLabel': 'Lägstanivå (minimum-rate, 90-day tier) used',
'manualFetchModal.remainingBreakdownTitle': 'Remaining Days Breakdown',
'manualFetchModal.reservedDaysLabel': 'Reserved days left',
'manualFetchModal.saveButton': 'Save',
'manualFetchModal.saveError': 'Failed to save manual data',
'manualFetchModal.savingButton': 'Saving…',
'manualFetchModal.sjukpenningUsedLabel': 'Sjukpenningnivå (income-based, 390-day tier) used',
'manualFetchModal.tierBreakdownTitle': 'Tier Breakdown',
'manualFetchModal.title': 'Enter Parental Leave Data',
'manualFetchModal.totalDaysLabel': 'Total days (0-480)',
'manualFetchModal.totalDaysSectionTitle': 'Total Days',
'manualFetchModal.transferableDaysLabel': 'Transferable days left',
'parentBalance.advancedToggle': 'Advanced',
'parentBalance.cancelButton': 'Cancel',
'parentBalance.closeAria': 'Close',
'parentBalance.description': 'The figures are on Mina sidor at Försäkringskassan, under Föräldrapenning.',
'parentBalance.dubbeldagarHelper': 'Shared by both parents together, during the first 15 months.',
'parentBalance.dubbeldagarLeftLabel': 'Dubbeldagar left (0-60)',
'parentBalance.invalid': 'The total (sjukpenningnivå + lägstanivå) can\'t exceed {total} days.',
'parentBalance.lagstaLeftLabel': 'Lägstanivå (minimum-rate tier) left (0-90)',
'parentBalance.loadingBalance': 'Loading balance…',
'parentBalance.presetButton': 'No days taken yet',
'parentBalance.rangeError': 'Enter a number between {min} and {max}.',
'parentBalance.reservedExceedsError': 'Reserved days can\'t exceed the sjukpenningnivå + lägstanivå days left.',
'parentBalance.reservedLeftHelper': 'Leave empty and we\'ll calculate it.',
'parentBalance.reservedLeftLabel': 'Reserved days left (0-90)',
'parentBalance.saveButton': 'Save',
'parentBalance.saveError': 'Failed to save the remaining days',
'parentBalance.savingButton': 'Saving…',
'parentBalance.sjukpenningLeftLabel': 'Sjukpenningnivå (income-based tier) left (0-390)',
'parentBalance.summary': '= {left} of {total} days left',
'parentBalance.title': '{name}\'s days left',
'parentBalance.titleSelf': 'Your days left',
'parentProfileInput.employed': 'Employed',
'parentProfileInput.employmentStatusLabel': 'Employment status',
'parentProfileInput.hourly': 'Hourly wage',
@@ -57,6 +60,7 @@ export const settings = {
'settings.addPartnerError': 'Could not add partner',
'settings.addPartnerSuccess': 'Partner added!',
'settings.addingPartner': 'Adding...',
'settings.balanceButton': 'Days left',
'settings.calendarSectionTitle': 'Calendar',
'settings.cancelButton': 'Cancel',
'settings.childBirthDateLabel': 'Child\'s birth date',
@@ -78,8 +82,6 @@ export const settings = {
'settings.partnerNamePlaceholder': 'Partner\'s name',
'settings.partnerNameRequired': 'Enter a name for the partner',
'settings.partnerSectionTitle': 'Partner',
'settings.planningHelp': 'Your planning goal, and whether you plan alone or together with a partner, control how the planner suggests distributing days.',
'settings.planningSectionTitle': 'Planning',
'settings.preschoolHelp': 'Preschools usually close for about 6 days a year for planning. Enter how many days your preschool has, so they are reserved in the plan.',
'settings.preschoolPlanningDaysLabel': 'Preschool planning days per year',
'settings.profileHelp': 'Your salary type and employment status are used to estimate your SGI and plan your leave.',
@@ -102,9 +104,6 @@ export const settings = {
'settings.saveChildButton': 'Save child\'s details',
'settings.saveChildError': 'Could not save the child\'s details',
'settings.saveChildSuccess': 'Child\'s details saved!',
'settings.savePlanningButton': 'Save planning',
'settings.savePlanningError': 'Could not save planning settings',
'settings.savePlanningSuccess': 'Planning settings saved!',
'settings.saveProfileButton': 'Save your profile',
'settings.saveProfileError': 'Could not save your profile',
'settings.saveProfileSuccess': 'Your profile was saved!',