From 3f64baec8c3a44cf3c2d6292455c0c332f52bccb Mon Sep 17 00:00:00 2001 From: Clawy Date: Sat, 7 Mar 2026 04:56:36 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20address=20storybook=20review=20=E2=80=94?= =?UTF-8?q?=20visual/a11y=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Critical fixes: - Fix primary color CSS variable self-reference (base: #007bff inline) - DangerZone action button: secondary → danger variant - DangerZone: add red left-border + tinted background container - Table: add empty state row ('No data available') Accessibility fixes: - Border token darkened (#e0e0e0 → #b0b0b0) for WCAG 1.4.11 compliance (affects Input, Select, TextArea, Card, Checkbox borders) - Success color darkened (#28a745 → #1a7a35) for WCAG AA text contrast - Ghost button: add visible border (stroke color) 59 tests passing, typecheck clean. --- panda.config.ts | 8 ++++---- src/components/ui/Button.tsx | 1 + src/components/ui/DangerZone.tsx | 8 +++++--- src/components/ui/Table.tsx | 7 +++++++ 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/panda.config.ts b/panda.config.ts index 8085c77..c5d19e3 100644 --- a/panda.config.ts +++ b/panda.config.ts @@ -27,7 +27,7 @@ export default defineConfig({ colors: { background: { value: "#ffffff" }, surface: { value: "#f5f5f5" }, - border: { value: "#e0e0e0" }, + border: { value: "#b0b0b0" }, text: { DEFAULT: { value: "#1a1a1a" }, muted: { value: "#666666" }, @@ -37,7 +37,7 @@ export default defineConfig({ DEFAULT: { value: "#007bff" }, hover: { value: "#0056b3" }, }, - success: { value: "#28a745" }, + success: { value: "#1a7a35" }, warning: { value: "#ffc107" }, danger: { value: "#dc3545" }, }, @@ -125,14 +125,14 @@ export default defineConfig({ // Interactive / status colors — adjusted for dark backgrounds primary: { DEFAULT: { - value: { base: "{colors.primary}", _dark: "#3b9eff" }, + value: { base: "#007bff", _dark: "#3b9eff" }, }, hover: { value: { base: "#0056b3", _dark: "#66b3ff" }, }, }, success: { - value: { base: "#28a745", _dark: "#34d058" }, + value: { base: "#1a7a35", _dark: "#34d058" }, }, warning: { value: { base: "#ffc107", _dark: "#ffd33d" }, diff --git a/src/components/ui/Button.tsx b/src/components/ui/Button.tsx index 881675a..98725c7 100644 --- a/src/components/ui/Button.tsx +++ b/src/components/ui/Button.tsx @@ -50,6 +50,7 @@ const buttonRecipe = cva({ ghost: { bg: "transparent", color: "fg", + border: "1px solid token(colors.stroke)", _hover: { bg: "bg.surface", }, diff --git a/src/components/ui/DangerZone.tsx b/src/components/ui/DangerZone.tsx index 909e444..7cd9581 100644 --- a/src/components/ui/DangerZone.tsx +++ b/src/components/ui/DangerZone.tsx @@ -5,8 +5,10 @@ import { Button } from "./Button"; const containerStyles = css({ mt: "lg", - pt: "lg", - borderTop: "1px solid token(colors.border)", + p: "md", + borderLeft: "3px solid token(colors.danger)", + bg: "#fff5f5", + borderRadius: "sm", display: "flex", alignItems: "center", gap: "xl", @@ -115,7 +117,7 @@ export function DangerZone({ ) : (