From 90f85148a4583c4d051ee10fc59fbe71dbb50159 Mon Sep 17 00:00:00 2001 From: Wibus <62133302+wibus-wee@users.noreply.github.com> Date: Thu, 10 Sep 2026 03:34:31 +0000 Subject: [PATCH 1/6] feat(ui): add the @lody/ui choice controls The field family covered the controls a person types into, while every control a person picks with still rendered Radix with Tailwind classes the new token rules define no equivalent for. checkbox.tsx and radio-group.tsx reached for data-[state=checked]:bg-primary and switch.tsx for bg-switch-track, and primary is exactly the concept the redesigned system does not have: the rules replace it with an elevation rung plus ink. Their disabled treatments were 50% where the rules say 45%, and their focus rings were ring-offset haloes the rules ban and the desktop shell suppresses anyway. Migrating them one at a time across that gap would have let each control invent its own checked colour. Add Checkbox, Radio and Switch to the same field token group rather than opening one of their own, and settle the state the text controls never had to answer: a control that holds a value is ink, the label fill under a background mark with shadow.inkEdge on top, because the rules reserve accent for live state and never a fill. src/field/well.ts grows box, checked and checkedInvalid beside base and invalid, so the family still defines its resting, ring and disabled appearance in one file; the ring is restated for the ink edge because CSS cannot append to a box-shadow list, which is the same shape Button already uses per variant. Each renders a real
diff --git a/packages/components/src/components/mobile/mobile-general-settings.tsx b/packages/components/src/components/mobile/mobile-general-settings.tsx index 037f39da1..2f73e8c68 100644 --- a/packages/components/src/components/mobile/mobile-general-settings.tsx +++ b/packages/components/src/components/mobile/mobile-general-settings.tsx @@ -6,7 +6,7 @@ import type { } from '@lody/shared'; import { useAtom, useAtomValue } from 'jotai'; import { Loading } from '@/ui'; -import { Switch } from '@/ui/switch'; +import { Switch } from '@lody/ui/switch'; import { toast } from 'sonner'; import { autoArchiveOnPrClosedAtom, diff --git a/packages/components/src/components/mobile/mobile-integrations-settings.tsx b/packages/components/src/components/mobile/mobile-integrations-settings.tsx index de23478e8..24d8db3cf 100644 --- a/packages/components/src/components/mobile/mobile-integrations-settings.tsx +++ b/packages/components/src/components/mobile/mobile-integrations-settings.tsx @@ -8,7 +8,7 @@ import { currentWorkspaceSlugAtom } from '@/atoms'; import { cloudOperations } from '@/lib/cloud-api-operations'; import { cn } from '@/lib/utils'; import { useAppCapability } from '@/lib/app-platform'; -import { Switch } from '@/ui/switch'; +import { Switch } from '@lody/ui/switch'; import { Input } from '@lody/ui/input'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { toast } from 'sonner'; diff --git a/packages/components/src/components/mobile/mobile-local-project-settings.tsx b/packages/components/src/components/mobile/mobile-local-project-settings.tsx index 0202e61fc..9e698a9ea 100644 --- a/packages/components/src/components/mobile/mobile-local-project-settings.tsx +++ b/packages/components/src/components/mobile/mobile-local-project-settings.tsx @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'; import { useAtomValue } from 'jotai'; import { machineSupportsLocalProjectRemovalProtocol, type MachineId } from '@lody/shared'; import { ChevronRight, Loader2, Wrench } from 'lucide-react'; -import { Switch } from '@/ui/switch'; +import { Switch } from '@lody/ui/switch'; import { TooltipProvider } from '@/ui/tooltip'; import { currentWorkspaceIdAtom } from '@/atoms'; import { getMachineMetaMapAtom } from '@/atoms/machines'; diff --git a/packages/components/src/components/mobile/mobile-project-screen.tsx b/packages/components/src/components/mobile/mobile-project-screen.tsx index 9e5625288..a3b0f33e3 100644 --- a/packages/components/src/components/mobile/mobile-project-screen.tsx +++ b/packages/components/src/components/mobile/mobile-project-screen.tsx @@ -22,7 +22,7 @@ import { isNativeAppShell } from '@/lib/native-platform'; import { consumeMobileBackNavigation } from '@/lib/mobile-back-navigation'; import { cn } from '@/lib/utils'; import { useLongPress } from '@/hooks/use-long-press'; -import { Checkbox } from '@/ui/checkbox'; +import { Checkbox } from '@lody/ui/checkbox'; import { CachedAvatarImg } from '@/components/cached-avatar-img'; import { WorktreeIcon } from '@/components/icons/worktree-icon'; import { @@ -563,7 +563,7 @@ export function ConversationRow({