From 40a05df4b3f8797e2004c83fe36370f343d3dc40 Mon Sep 17 00:00:00 2001 From: kurihada Date: Fri, 20 Mar 2026 11:28:35 +0800 Subject: [PATCH] Extract pilot skin-aware component recipes --- docs/rfcs/multi-style-architecture.md | 11 +- packages/ui/src/components/button.tsx | 12 +- packages/ui/src/components/button.variants.ts | 13 +- packages/ui/src/components/card.variants.ts | 13 +- packages/ui/src/components/dialog.tsx | 2 +- packages/ui/src/components/dialog.variants.ts | 5 +- packages/ui/src/components/input.variants.ts | 9 +- packages/ui/src/components/skeleton.tsx | 15 +- packages/ui/src/components/switch.variants.ts | 7 +- packages/ui/src/skins.css | 304 ++++++++++++++++++ 10 files changed, 350 insertions(+), 41 deletions(-) diff --git a/docs/rfcs/multi-style-architecture.md b/docs/rfcs/multi-style-architecture.md index abdc062..5889084 100644 --- a/docs/rfcs/multi-style-architecture.md +++ b/docs/rfcs/multi-style-architecture.md @@ -494,7 +494,7 @@ Deliverables: Status: -- not started +- completed ### Phase 3: Docs Validation Surface @@ -603,8 +603,9 @@ As of 2026-03-20, the project is at this point: - `@ai-ui/ui/skins.css` export added - Storybook globals now switch `skin` - docs switching surface added in `Foundation/Style Contract` -- no component extraction started -- no broad skin-aware component recipes implemented yet +- pilot recipe extraction completed for `Button`, `Card`, `Input`, `Dialog`, `Switch`, + and `Skeleton` +- broader component-library rollout still pending -The next implementation task should be Phase 2: pilot skin extraction for -`Button`, `Card`, `Input`, `Dialog`, `Switch`, and `Skeleton`. +The next implementation task should be Phase 3: add a dedicated comparison-oriented docs +validation surface for skins and motion modes. diff --git a/packages/ui/src/components/button.tsx b/packages/ui/src/components/button.tsx index cf39cad..7d2f071 100644 --- a/packages/ui/src/components/button.tsx +++ b/packages/ui/src/components/button.tsx @@ -20,7 +20,7 @@ function Spinner() { {...createSlot("icon")} aria-hidden="true" animate={{ opacity: 1, rotate: 0, scale: 1 }} - className="size-4 rounded-full border-2 border-current border-r-transparent animate-spin" + className="size-4 rounded-[var(--ui-spinner-radius)] [border-width:var(--ui-spinner-border-width)] border-current border-r-transparent animate-spin" exit={{ opacity: 0, rotate: 90, scale: 0.7 }} initial={{ opacity: 0, rotate: -90, scale: 0.7 }} transition={{ @@ -74,14 +74,14 @@ export const Button = forwardRef(function Button