-
Notifications
You must be signed in to change notification settings - Fork 1
🎨 refactor: Input / Textarea / Tag を Figma 準拠の新トークンへ移行(beta / #298 フェーズ2-3) #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,95 +35,98 @@ const tagVariants = cva( | |
| { | ||
| variant: "solid", | ||
| status: "neutral", | ||
| className: "bg-neutral-500 text-white", | ||
| className: "bg-object-neutral-middle text-text-inverse", | ||
| }, | ||
| // info + solid | ||
| { | ||
| variant: "solid", | ||
| status: "info", | ||
| className: "bg-primary-500 text-white", | ||
| className: "bg-object-info text-text-inverse", | ||
| }, | ||
| // success + solid | ||
| { | ||
| variant: "solid", | ||
| status: "success", | ||
| className: "bg-success-500 text-white", | ||
| className: "bg-object-success text-text-inverse", | ||
| }, | ||
| // warning + solid | ||
| { | ||
| variant: "solid", | ||
| status: "warning", | ||
| className: "bg-warning-500 text-white", | ||
| className: "bg-object-warning text-text-inverse", | ||
| }, | ||
| // negative + solid | ||
| { | ||
| variant: "solid", | ||
| status: "negative", | ||
| className: "bg-negative-500 text-white", | ||
| className: "bg-object-negative-enabled text-text-inverse", | ||
| }, | ||
|
|
||
| // === OUTLINE バリアント === | ||
| // neutral + outline | ||
| { | ||
| variant: "outline", | ||
| status: "neutral", | ||
| className: "border-neutral-500 text-neutral-500 bg-surface-base-0", | ||
| className: | ||
| "border-object-neutral-middle text-text-neutral-middle bg-surface-base-0", | ||
| }, | ||
| // info + outline | ||
| { | ||
| variant: "outline", | ||
| status: "info", | ||
| className: "border-primary-500 text-primary-500 bg-surface-base-0", | ||
| className: "border-object-info text-text-info bg-surface-base-0", | ||
| }, | ||
| // success + outline | ||
| { | ||
| variant: "outline", | ||
| status: "success", | ||
| className: "border-success-500 text-success-500 bg-surface-base-0", | ||
| className: "border-object-success text-text-success bg-surface-base-0", | ||
| }, | ||
| // warning + outline | ||
| { | ||
| variant: "outline", | ||
| status: "warning", | ||
| className: "border-warning-500 text-warning-500 bg-surface-base-0", | ||
| className: "border-object-warning text-text-warning bg-surface-base-0", | ||
| }, | ||
| // negative + outline | ||
| { | ||
| variant: "outline", | ||
| status: "negative", | ||
| className: "border-negative-500 text-negative-500 bg-surface-base-0", | ||
| className: | ||
| "border-object-negative-enabled text-text-negative-enabled bg-surface-base-0", | ||
| }, | ||
|
Comment on lines
65
to
97
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n -- '--color-(border|object)-(neutral-middle|info|success|warning|negative)' \
src/app/sparkle-design.css
rg -n 'border-(object|border)-(neutral-middle|info|success|warning|negative)' \
src/components/ui/tag/index.tsx \
src/components/ui/tag/index.test.tsxRepository: goodpatch/sparkle-design Length of output: 3101 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- tag component ---'
sed -n '1,150p' src/components/ui/tag/index.tsx
printf '%s\n' '--- tag tests around variant expectations ---'
sed -n '90,155p' src/components/ui/tag/index.test.tsx
printf '%s\n' '--- token definitions ---'
sed -n '400,455p' src/app/sparkle-design.css
sed -n '1095,1135p' src/app/sparkle-design.css
printf '%s\n' '--- Tailwind/CSS configuration references ---'
rg -n --glob '!src/app/sparkle-design.css' 'sparkle-design|`@theme`|border-border|border-object|color-border' . | head -200Repository: goodpatch/sparkle-design Length of output: 34832 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
sed -n '1,40p' src/app/globals.css
printf '%s\n' '--- existing border-token usage ---'
sed -n '1,35p' src/components/ui/divider/index.tsx
sed -n '235,275p' src/components/ui/input-password/index.test.tsx
printf '%s\n' '--- full Tag render path ---'
sed -n '145,230p' src/components/ui/tag/index.tsxRepository: goodpatch/sparkle-design Length of output: 5226 Outline の枠線に
🤖 Prompt for AI Agents |
||
|
|
||
| // === SUBTLE バリアント === | ||
| // neutral + subtle | ||
| { | ||
| variant: "subtle", | ||
| status: "neutral", | ||
| className: "bg-neutral-100 text-neutral-600", | ||
| className: "bg-surface-neutral-middle-enabled text-text-neutral-middle", | ||
| }, | ||
| // info + subtle | ||
| { | ||
| variant: "subtle", | ||
| status: "info", | ||
| className: "bg-primary-100 text-primary-600", | ||
| className: "bg-surface-info-low text-text-info", | ||
| }, | ||
| // success + subtle | ||
| { | ||
| variant: "subtle", | ||
| status: "success", | ||
| className: "bg-success-100 text-success-600", | ||
| className: "bg-surface-success-low text-text-success", | ||
| }, | ||
| // warning + subtle | ||
| { | ||
| variant: "subtle", | ||
| status: "warning", | ||
| className: "bg-warning-100 text-warning-600", | ||
| className: "bg-surface-warning-low text-text-warning", | ||
| }, | ||
| // negative + subtle | ||
| { | ||
| variant: "subtle", | ||
| status: "negative", | ||
| className: "bg-negative-100 text-negative-600", | ||
| className: | ||
| "bg-surface-negative-middle-enabled text-text-negative-enabled", | ||
| }, | ||
| ], | ||
| defaultVariants: { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
CSSクラス検証を
StyleHelpersに統一してください。変更したクラス検証では、プロジェクト規約に従い
classNameの直接参照ではなくStyleHelpers.hasClass/hasClassesまたは同等の共有APIを使用してください。対象箇所:
src/components/ui/input/index.test.tsx#L258-L260src/components/ui/input/index.test.tsx#L269-L271src/components/ui/textarea/index.test.tsx#L85-L87src/components/ui/tag/index.test.tsx#L61-L66src/components/ui/tag/index.test.tsx#L100-L104src/components/ui/tag/index.test.tsx#L131-L131src/components/ui/input-password/index.test.tsx#L249-L251src/components/ui/input-password/index.test.tsx#L264-L266📍 Affects 2 files
src/components/ui/input/index.test.tsx#L258-L260(this comment)src/components/ui/tag/index.test.tsx#L61-L66🤖 Prompt for AI Agents
Source: Coding guidelines