UI: light Things-3 design system — tokens, task rows, chips, home

Replaces the dark navy palette with a light grouped-background system:
- theme.ts: full token set (space/radius/type/shadow) + light+dark palettes
- ui.tsx: Screen/Title/SectionHeader/Card/Separator/Pill/Empty primitives
- TaskRow: rounded-square checkbox carrying priority colour, inset separators
- TaskListScreen: rows grouped into a card, drag lift, refined deferred footer
- Icon.tsx: dependency-free geometric icon set (emoji don't take a tint)
- home: large title, Next-up card, "needs attention" rows, icon tab bar
- Priority/Estimate/Date chips unified on the accent-soft active state

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-09-01 22:36:26 +10:00
parent 65efb632db
commit 1af86cd27c
11 changed files with 863 additions and 217 deletions

View File

@@ -1,8 +1,9 @@
import { Pressable, StyleSheet, Text, View } from "react-native";
import { haptic } from "../lib/haptics";
import { PRIORITIES, PRIORITY_COLOR, PRIORITY_LABEL } from "../lib/priority";
import { C } from "../lib/theme";
import { PRIORITIES, PRIORITY_COLOR, PRIORITY_LABEL, PRIORITY_TINT } from "../lib/priority";
import { C, radius, space, type } from "../lib/theme";
import type { Task } from "../lib/types";
import { SectionHeader } from "./ui";
export default function PriorityChips({
value,
@@ -12,8 +13,8 @@ export default function PriorityChips({
onChange: (p: Task["priority"]) => void;
}) {
return (
<View style={{ marginBottom: 14 }}>
<Text style={s.label}>Priority</Text>
<View style={s.wrap}>
<SectionHeader>Priority</SectionHeader>
<View style={s.rowWrap}>
{PRIORITIES.map((p) => {
const active = value === p;
@@ -21,14 +22,20 @@ export default function PriorityChips({
return (
<Pressable
key={p}
style={[s.chip, active && { borderColor: color, backgroundColor: `${color}22` }]}
style={({ pressed }) => [
s.chip,
active && { borderColor: color, backgroundColor: PRIORITY_TINT[p] },
pressed && !active && { backgroundColor: C.surface2 },
]}
onPress={() => {
haptic.select();
onChange(p);
}}
>
<View style={[s.flag, { backgroundColor: color }]} />
<Text style={[s.text, active && { color: C.text }]}>{PRIORITY_LABEL[p]}</Text>
<Text style={[s.text, active && { color, fontWeight: "600" }]}>
{PRIORITY_LABEL[p]}
</Text>
</Pressable>
);
})}
@@ -38,19 +45,19 @@ export default function PriorityChips({
}
const s = StyleSheet.create({
label: { color: C.muted, fontSize: 13, marginBottom: 6, textTransform: "uppercase", letterSpacing: 0.5 },
rowWrap: { flexDirection: "row", flexWrap: "wrap", gap: 8 },
wrap: { marginBottom: space.lg },
rowWrap: { flexDirection: "row", flexWrap: "wrap", gap: space.sm },
chip: {
flexDirection: "row",
alignItems: "center",
gap: 7,
paddingVertical: 8,
paddingHorizontal: 13,
borderRadius: 20,
paddingVertical: 9,
paddingHorizontal: 14,
borderRadius: radius.pill,
backgroundColor: C.surface,
borderWidth: 1,
borderColor: C.border,
},
flag: { width: 10, height: 10, borderRadius: 5 },
text: { color: C.muted, fontSize: 14 },
flag: { width: 9, height: 9, borderRadius: 999 },
text: { ...type.chip, color: C.textSecondary },
});