SPB Git

Repository Public License

DESIGN_SYSTEM.md 2.8 KB 62 lines markdown

1<!--2ORIX Alarm3File: docs/DESIGN_SYSTEM.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# Design system89The identity is a night sky turning into a sunrise. Dark only.1011## Palette (`App/Design/Theme.swift`)1213| Role | Token | sRGB |14|---|---|---|15| Night background | `midnight` | 7, 9, 22 |16| | `deepIndigo` | 18, 16, 50 |17| | `indigo` | 46, 41, 115 |18| Atmosphere | `violet` | 122, 92, 250 |19| | `azure` | 84, 143, 255 |20| Sunrise | `ember` | 250, 92, 74 |21| | `sunrise` (accent) | 255, 143, 66 |22| | `gold` | 255, 201, 107 |23| | `peach` | 255, 222, 194 |24| Semantic | `success` | 92, 224, 163 |25| | `danger` | 255, 102, 115 |2627`Theme.sky(progress)` blends night to day and drives the mission runner background and the Nightstand sunrise. `sunriseGradient` (ember → sunrise → gold) marks the primary action; `nightGradient` (violet → azure) marks secondary emphasis.2829## Typography3031SF Rounded throughout. Clock digits use `Font.clock(size)`: rounded, light, monospaced digits. Titles are semibold rounded; captions medium; section labels are small uppercase with tracking (`Overline`).3233## Components3435| Component | Use |36|---|---|37| `AuroraBackground(warmth:)` | animated sky behind every screen; paused with Reduce Motion |38| `.glassCard()` | layered translucent surface with a light edge |39| `.orixScreen()` | standard screen chrome |40| `PrimaryButtonStyle`, `SecondaryButtonStyle` | 54 pt capsule buttons |41| `Chip` | selectable capsule (weekdays, options) |42| `ClockFaceView(style:date:nextAlarm:)` | analog, digital, hybrid, minimal, chronograph |43| `TimeDial` | circular hour and minute selector with haptic ticks and ± buttons |44| `ScenarioTimelineView` | the morning as a timeline, shared by the editor and Studio |45| `MissionScaffold` | instruction line, round counter, content |46| `AlarmStatusBadge` | verified system status with colour, symbol and text |4748## Rules4950- A status is never carried by colour alone: every badge has a symbol and a label; mission panels have shapes; "on" wires are thicker.51- Touch targets are at least 44 pt, larger in missions.52- Custom controls expose VoiceOver labels, values and adjustable actions; gesture-only interactions have a tap alternative.53- An alarm that is not confirmed by the system never looks scheduled.5455## Sound5657Eighteen files, all synthesised by `Scripts/make-sounds.py` (additive and FM synthesis, filtered noise, envelopes): nine alarm loops (`.caf`, 8 to 20 s, for AlarmKit), five soundscapes (`.m4a`, 72 s seamless loops), four interface effects. No third-party sample. The app only changes its own gain; the device volume sets the ceiling.5859## Haptics6061Core Haptics patterns per event (tick, selection, success, failure, warning, mission complete, wake confirmation, alarm set) behind `Haptics.play(_:)`, with UIKit feedback as a fallback and a global setting.62
Files main
Menu

Theme