Skip to content

Commit df20307

Browse files
authored
Merge pull request #540 from solid-connection/feat/magic-color-tokens
refactor: magic 색상 토큰 정리
2 parents b9d7489 + ab71e25 commit df20307

27 files changed

Lines changed: 193 additions & 72 deletions

File tree

apps/admin/src/components/features/bruno/BrunoApiPageContent.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ const getEndpointKey = (endpoint: EndpointItem) => `${endpoint.domain}:${endpoin
147147
const getMethodClassName = (method: DefinitionMethod) =>
148148
cn(
149149
"rounded px-1.5 py-0.5 typo-regular-4",
150-
method === "GET" && "bg-[#E8F3FF] text-[#1D4ED8]",
151-
method === "POST" && "bg-[#ECFDF3] text-[#047857]",
152-
method === "PUT" && "bg-[#FFF7ED] text-[#C2410C]",
153-
method === "PATCH" && "bg-[#FEF3C7] text-[#B45309]",
154-
method === "DELETE" && "bg-[#FEE2E2] text-[#B91C1C]",
150+
method === "GET" && "bg-magic-http-get-surface text-magic-http-get-text",
151+
method === "POST" && "bg-magic-http-post-surface text-magic-http-post-text",
152+
method === "PUT" && "bg-magic-http-put-surface text-magic-http-put-text",
153+
method === "PATCH" && "bg-magic-http-patch-surface text-magic-http-patch-text",
154+
method === "DELETE" && "bg-magic-http-delete-surface text-magic-http-delete-text",
155155
(method === "HEAD" || method === "OPTIONS") && "bg-k-100 text-k-700",
156156
);
157157

@@ -385,7 +385,7 @@ export function BrunoApiPageContent() {
385385

386386
<div className="space-y-4">
387387
{showRemoteWarning ? (
388-
<div className="flex items-start gap-2 rounded-md border border-[#FACC15] bg-[#FEFCE8] px-4 py-3 text-[#854D0E]">
388+
<div className="flex items-start gap-2 rounded-md border border-magic-warning-border bg-magic-warning-surface px-4 py-3 text-magic-warning">
389389
<AlertTriangle className="mt-0.5 h-4 w-4 shrink-0" />
390390
<div className="min-w-0">
391391
<p className="typo-sb-11">원격 API 서버에 연결되어 있습니다.</p>
@@ -437,7 +437,7 @@ export function BrunoApiPageContent() {
437437
</div>
438438
) : null}
439439
{editorError ? (
440-
<div className="rounded-md border border-[#FCA5A5] bg-[#FEF2F2] px-3 py-2 typo-regular-4 text-[#B91C1C]">
440+
<div className="rounded-md border border-magic-error-border bg-magic-error-surface px-3 py-2 typo-regular-4 text-magic-error">
441441
{editorError}
442442
</div>
443443
) : null}
@@ -501,8 +501,8 @@ export function BrunoApiPageContent() {
501501
className={cn(
502502
"rounded px-2 py-1",
503503
requestResult.status >= 200 && requestResult.status < 300
504-
? "bg-[#ECFDF3] text-[#047857]"
505-
: "bg-[#FEF2F2] text-[#B91C1C]",
504+
? "bg-magic-api-success-surface text-magic-api-success-text"
505+
: "bg-magic-error-surface text-magic-error",
506506
)}
507507
>
508508
HTTP {requestResult.status}

apps/admin/src/components/features/mentor-applications/MentorApplicationsPageContent.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ const STATUS_OPTIONS: { value: MentorApplicationStatus; label: string }[] = [
2828

2929
const statusStyles: Record<MentorApplicationStatus, string> = {
3030
PENDING: "bg-primary-100 text-primary",
31-
APPROVED: "bg-[#E9F7EC] text-[#15A861]",
32-
REJECTED: "bg-[#FFD9D9] text-[#E22A2D]",
31+
APPROVED: "bg-magic-success-surface text-magic-success",
32+
REJECTED: "bg-magic-danger-surface text-magic-danger",
3333
};
3434

3535
const statusLabels: Record<MentorApplicationStatus, string> = {
@@ -254,7 +254,7 @@ function MentorApplicationHistoryRow({ colSpan, siteUserId }: { colSpan: number;
254254
<span className="ml-2 typo-regular-4 text-k-500">이력을 불러오는 중...</span>
255255
</div>
256256
) : isError ? (
257-
<p className="py-4 text-center typo-regular-4 text-[#E22A2D]">신청 이력을 불러오지 못했습니다.</p>
257+
<p className="py-4 text-center typo-regular-4 text-magic-danger">신청 이력을 불러오지 못했습니다.</p>
258258
) : historyItems.length === 0 ? (
259259
<p className="py-4 text-center typo-regular-4 text-k-500">신청 이력이 없습니다.</p>
260260
) : (
@@ -595,7 +595,7 @@ export function MentorApplicationsPageContent() {
595595
</TableRow>
596596
) : isError ? (
597597
<TableRow>
598-
<TableCell colSpan={9} className="text-center typo-regular-4 text-[#E22A2D]">
598+
<TableCell colSpan={9} className="text-center typo-regular-4 text-magic-danger">
599599
멘토 승격 요청을 불러오지 못했습니다.
600600
</TableCell>
601601
</TableRow>

apps/admin/src/components/features/regions-countries/RegionsCountriesPageContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export function RegionsCountriesPageContent() {
300300
</TableRow>
301301
) : regionsQuery.isError ? (
302302
<TableRow>
303-
<TableCell colSpan={3} className="text-center typo-regular-4 text-[#E22A2D]">
303+
<TableCell colSpan={3} className="text-center typo-regular-4 text-magic-danger">
304304
권역을 불러오지 못했습니다.
305305
</TableCell>
306306
</TableRow>
@@ -431,7 +431,7 @@ export function RegionsCountriesPageContent() {
431431
</TableRow>
432432
) : countriesQuery.isError ? (
433433
<TableRow>
434-
<TableCell colSpan={4} className="text-center typo-regular-4 text-[#E22A2D]">
434+
<TableCell colSpan={4} className="text-center typo-regular-4 text-magic-danger">
435435
지역을 불러오지 못했습니다.
436436
</TableCell>
437437
</TableRow>

apps/admin/src/components/features/scores/ScoreVerifyButton.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function ScoreVerifyButton({ currentStatus, onVerifyChange }: Props) {
3333
<button
3434
type="button"
3535
onClick={handleApprove}
36-
className="rounded bg-[#15A861] px-3 py-1 typo-sb-11 text-k-0 hover:bg-[#10814A]"
36+
className="rounded bg-magic-success px-3 py-1 typo-sb-11 text-k-0 hover:bg-magic-success-hover"
3737
>
3838
승인
3939
</button>
@@ -50,7 +50,7 @@ export function ScoreVerifyButton({ currentStatus, onVerifyChange }: Props) {
5050
<button
5151
type="button"
5252
onClick={handleReject}
53-
className="rounded bg-[#E22A2D] px-3 py-1 typo-sb-11 text-k-0 hover:bg-[#BA1E21]"
53+
className="rounded bg-magic-danger px-3 py-1 typo-sb-11 text-k-0 hover:bg-magic-danger-hover"
5454
>
5555
확인
5656
</button>
@@ -59,7 +59,7 @@ export function ScoreVerifyButton({ currentStatus, onVerifyChange }: Props) {
5959
<button
6060
type="button"
6161
onClick={handleReject}
62-
className="rounded bg-[#E22A2D] px-3 py-1 typo-sb-11 text-k-0 hover:bg-[#BA1E21]"
62+
className="rounded bg-magic-danger px-3 py-1 typo-sb-11 text-k-0 hover:bg-magic-danger-hover"
6363
>
6464
거절
6565
</button>

apps/admin/src/components/features/scores/StatusBadge.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { VerifyStatus } from "@/types/scores";
22

33
const statusStyles = {
44
PENDING: "bg-primary-100 text-primary",
5-
APPROVED: "bg-[#E9F7EC] text-[#15A861]",
6-
REJECTED: "bg-[#FFD9D9] text-[#E22A2D]",
5+
APPROVED: "bg-magic-success-surface text-magic-success",
6+
REJECTED: "bg-magic-danger-surface text-magic-danger",
77
};
88

99
const statusLabels = {

apps/admin/src/components/layout/AdminLayout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ export function AdminLayout({ children, activeMenu, title, description }: AdminL
3838
};
3939

4040
return (
41-
<div className="min-h-screen bg-[radial-gradient(circle_at_top,_#eef2ff_0%,_#fafafa_48%,_#f5f5f5_100%)] text-k-800">
41+
<div className="min-h-screen bg-magic-admin-shell text-k-800">
4242
<div className="mx-auto flex min-h-screen w-full max-w-[1440px] flex-col px-3 py-4 sm:px-4 sm:py-6 lg:px-8">
43-
<header className="mb-4 flex items-center justify-between rounded-2xl border border-k-100 bg-k-0 px-4 py-3 shadow-[0_10px_30px_-24px_rgba(26,31,39,0.45)]">
43+
<header className="mb-4 flex items-center justify-between rounded-2xl border border-k-100 bg-k-0 px-4 py-3 shadow-magic-admin-header">
4444
<div className="flex items-center gap-3">
4545
<div className="flex h-9 w-9 items-center justify-center rounded-full bg-primary-100 text-primary typo-sb-9">
4646
SC
@@ -67,7 +67,7 @@ export function AdminLayout({ children, activeMenu, title, description }: AdminL
6767
<div className="flex min-h-[calc(100vh-96px)] overflow-hidden rounded-[24px] border border-k-100 bg-k-0 shadow-sdw-a">
6868
<AdminSidebar activeMenu={activeMenu} />
6969
<section className="flex-1 bg-bg-50 p-4 sm:p-6 lg:p-7">
70-
<div className="h-full rounded-2xl border border-k-100 bg-k-0 p-4 shadow-[0_8px_24px_-22px_rgba(26,31,39,0.45)] sm:p-6">
70+
<div className="h-full rounded-2xl border border-k-100 bg-k-0 p-4 shadow-magic-admin-panel sm:p-6">
7171
<h1 className="typo-bold-1 text-k-900">{title}</h1>
7272
{description ? <p className="mt-1 typo-regular-4 text-k-500">{description}</p> : null}
7373
{children}

apps/admin/src/styles.css

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
11
@import "tailwindcss";
22
@source "../../../packages/ui/src";
33

4+
@theme {
5+
--color-magic-success: #15a861;
6+
--color-magic-success-hover: #10814a;
7+
--color-magic-success-surface: #e9f7ec;
8+
--color-magic-danger: #e22a2d;
9+
--color-magic-danger-hover: #ba1e21;
10+
--color-magic-danger-surface: #ffd9d9;
11+
--color-magic-error: #b91c1c;
12+
--color-magic-error-border: #fca5a5;
13+
--color-magic-error-surface: #fef2f2;
14+
--color-magic-warning: #854d0e;
15+
--color-magic-warning-border: #facc15;
16+
--color-magic-warning-surface: #fefce8;
17+
--color-magic-api-success-surface: #ecfdf3;
18+
--color-magic-api-success-text: #047857;
19+
--color-magic-http-get-surface: #e8f3ff;
20+
--color-magic-http-get-text: #1d4ed8;
21+
--color-magic-http-post-surface: #ecfdf3;
22+
--color-magic-http-post-text: #047857;
23+
--color-magic-http-put-surface: #fff7ed;
24+
--color-magic-http-put-text: #c2410c;
25+
--color-magic-http-patch-surface: #fef3c7;
26+
--color-magic-http-patch-text: #b45309;
27+
--color-magic-http-delete-surface: #fee2e2;
28+
--color-magic-http-delete-text: #b91c1c;
29+
--color-magic-admin-shell-spotlight: #eef2ff;
30+
--color-magic-admin-shell-mid: #fafafa;
31+
--color-magic-admin-shell-base: #f5f5f5;
32+
--color-magic-admin-panel-shadow: rgba(26, 31, 39, 0.45);
33+
}
34+
435
body {
536
@apply m-0;
637
font-family: "Pretendard", system-ui, -apple-system, sans-serif;
@@ -101,6 +132,23 @@ code {
101132
box-shadow: 0 4px 40px 0 rgba(26, 31, 39, 0.12);
102133
}
103134

135+
.bg-magic-admin-shell {
136+
background-image: radial-gradient(
137+
circle at top,
138+
var(--color-magic-admin-shell-spotlight) 0%,
139+
var(--color-magic-admin-shell-mid) 48%,
140+
var(--color-magic-admin-shell-base) 100%
141+
);
142+
}
143+
144+
.shadow-magic-admin-header {
145+
box-shadow: 0 10px 30px -24px var(--color-magic-admin-panel-shadow);
146+
}
147+
148+
.shadow-magic-admin-panel {
149+
box-shadow: 0 8px 24px -22px var(--color-magic-admin-panel-shadow);
150+
}
151+
104152
.typo-bold-1 {
105153
font-size: 24px;
106154
line-height: 140%;

apps/web/src/app/community/[boardCode]/PostWriteButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const PostWriteButton = ({ onClick }: PostWriteButtonProps) => {
3232
className={`fixed bottom-16 flex w-full max-w-app flex-col items-center transition-transform duration-300 ease-in-out ${isVisible ? "translate-y-0" : "translate-y-[calc(100%+66px)]"} `}
3333
>
3434
<button
35-
className="relative flex h-14 w-14 cursor-pointer items-center justify-center rounded-full bg-primary shadow-[0px_4px_30px_rgba(0,0,0,0.15)]"
35+
className="relative flex h-14 w-14 cursor-pointer items-center justify-center rounded-full bg-primary shadow-magic-floating-action"
3636
onClick={onClick}
3737
type="button"
3838
aria-label="글쓰기"

apps/web/src/app/community/[boardCode]/[postId]/CommentSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const Comment = ({
7878
<div
7979
className={clsx(
8080
"flex border-b border-gray-c-100 px-5 py-[18px]",
81-
comment.parentId !== null ? "bg-line-1" : "bg-[#fafafa]",
81+
comment.parentId !== null ? "bg-line-1" : "bg-magic-comment-reply-bg",
8282
)}
8383
key={comment.id}
8484
role="button"

apps/web/src/app/mentor/chat/_ui/ChatPageClient/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const ChatPageClient = () => {
2929
</p>
3030
<Link
3131
href={"/mentor"}
32-
className="mt-5 flex h-[52px] w-60 items-center justify-center gap-[10px] rounded-[30px] bg-[linear-gradient(270deg,_var(--Primary-Color,_#5950F6)_0%,_var(--SubA-Color,_#388CE8)_100%)] px-[10px] text-white typo-sb-9"
32+
className="mt-5 flex h-[52px] w-60 items-center justify-center gap-[10px] rounded-[30px] bg-gradient-to-l from-primary to-sub-a px-[10px] text-white typo-sb-9"
3333
>
3434
멘토 찾으러 가볼까요?
3535
</Link>

0 commit comments

Comments
 (0)