Skip to content

Commit 85ca8ac

Browse files
authored
Merge pull request #270 from CSE-Shaco/feat/design-system-showcase-split
Feat/design system showcase split
2 parents acebb38 + ef05e38 commit 85ca8ac

174 files changed

Lines changed: 6732 additions & 3827 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

Lines changed: 684 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"@types/node": "22.15.21",
4343
"@types/react": "^18.2.0",
4444
"eslint": "^8",
45-
"eslint-config-prettier": "^9.1.0",
4645
"eslint-config-next": "15.5.9",
46+
"eslint-config-prettier": "^9.1.0",
4747
"eslint-plugin-react": "^7.37.5",
4848
"postcss": "^8",
4949
"prettier": "^3.5.1",

src/app/api/auth/refresh/route.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const TIMEOUT = 5000;
66

77
interface RefreshResponse {
88
accessToken?: string;
9-
refreshToken?: string;
9+
user?: Record<string, unknown>;
1010
message?: string;
1111
}
1212

@@ -20,11 +20,10 @@ export async function POST(req: NextRequest): Promise<NextResponse<RefreshRespon
2020

2121
try {
2222
const cookies = req.headers.get('cookie') || '';
23-
const body = await req.json();
2423

2524
const response: AxiosResponse<RefreshResponse> = await axios.post(
2625
refreshUrl,
27-
body,
26+
{},
2827
{
2928
headers: {
3029
'Content-Type': 'application/json',
@@ -69,4 +68,4 @@ export async function POST(req: NextRequest): Promise<NextResponse<RefreshRespon
6968
console.error('[AUTH PROXY ERROR] /refresh', axiosError.message);
7069
return NextResponse.json({ error: errorMessage }, { status });
7170
}
72-
}
71+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import MenuHeader from "@/components/ui/common/MenuHeader";
2-
import ApiCodeGuard from "@/components/auth/ApiCodeGuard.jsx";
2+
import ApiCodeGuard from "@/components/auth/ApiCodeGuard";
33

44
export const metadata = {
55
title: "Core Attendance", description: "GDGoC INHA Core Attendance Management",
@@ -12,4 +12,4 @@ export default function CoreAttendanceLayout({children}) {
1212
{children}
1313
</>
1414
</ApiCodeGuard>);
15-
}
15+
}
Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
'use client';
22

33
import {useEffect, useMemo, useRef, useState} from 'react';
4-
import {Button, Card, CardBody, Checkbox, Divider, Input, Select, SelectItem} from '@nextui-org/react';
4+
import {Button, Card, CardBody, Checkbox, Divider, Select, SelectItem} from '@nextui-org/react';
5+
import { GdgInput } from '@/components/ui/input/GdgInput';
56
import {useAuthenticatedApi} from '@/hooks/useAuthenticatedApi';
67

78
/** ===== 유틸 ===== */
89
const ymd = (d = new Date()) => new Intl.DateTimeFormat('en-CA', {timeZone: 'Asia/Seoul'}).format(d);
9-
const getQS = (k) => (typeof window !== 'undefined' ? new URL(window.location.href).searchParams.get(k) || '' : '');
10-
const setQS = (entries) => {
10+
const getQS = (k: string) => (typeof window !== 'undefined' ? new URL(window.location.href).searchParams.get(k) || '' : '');
11+
const setQS = (entries: Record<string, string>) => {
1112
if (typeof window === 'undefined') return;
1213
const u = new URL(window.location.href);
1314
Object.entries(entries).forEach(([k, v]) => (v ? u.searchParams.set(k, v) : u.searchParams.delete(k)));
@@ -297,14 +298,10 @@ export default function AttendancePage() {
297298
</div>
298299
</div>
299300

300-
<Input
301+
<GdgInput
301302
type="date"
302303
value={date}
303304
onChange={(e) => setDate(e.target.value)}
304-
classNames={{
305-
input: 'bg-transparent text-black/90 dark:text-white/90',
306-
inputWrapper: 'shadow-xl bg-default-200/50 dark:bg-default/60 hover:bg-default-200/70 dark:hover:bg-default/70',
307-
}}
308305
/>
309306

310307
<Divider/>
@@ -356,35 +353,28 @@ export default function AttendancePage() {
356353
listbox: "text-white",
357354
selectorIcon: "text-zinc-400"
358355
}}
359-
// 항목 스타일(전역)
360-
itemClasses={{
361-
base: ["rounded-md", "data-[hover=true]:bg-zinc-800", "data-[focus=true]:bg-zinc-800", "data-[selectable=true]:focus:bg-zinc-800"].join(" "),
362-
title: "text-white",
363-
description: "text-zinc-400",
364-
selectedIcon: "text-primary"
365-
}}
366356
>
367-
{showAllOption && (<SelectItem key="__ALL__" value="__ALL__" className="text-white">
368-
전체
369-
</SelectItem>)}
370-
{teamOptions.map((name) => (<SelectItem key={name} value={name} className="text-white">
371-
{name}
372-
</SelectItem>))}
357+
<>
358+
{showAllOption && (
359+
<SelectItem key="__ALL__" value="__ALL__" className="text-white">
360+
전체
361+
</SelectItem>
362+
)}
363+
{teamOptions.map((name) => (
364+
<SelectItem key={name} value={name} className="text-white">
365+
{name}
366+
</SelectItem>
367+
))}
368+
</>
373369
</Select>
374370

375371
{/* 이름 검색 */}
376-
<Input
372+
<GdgInput
377373
placeholder="이름 검색"
378374
value={filter}
379375
onValueChange={setFilter}
380376
size="sm"
381377
isClearable
382-
classNames={{
383-
label: 'text-black/50 dark:text-white/90',
384-
input: ['bg-transparent', 'text-black/90 dark:text-white/90', 'placeholder:text-default-700/50 dark:placeholder:text-white/60',],
385-
innerWrapper: 'bg-transparent',
386-
inputWrapper: ['shadow-xl', 'bg-default-200/50', 'dark:bg-default/60', 'backdrop-blur-xl', 'backdrop-saturate-200', 'hover:bg-default-200/70', 'dark:hover:bg-default/70', 'group-data-[focus=true]:bg-default-200/50', 'dark:group-data-[focus=true]:bg-default/60', '!cursor-text',].join(' '),
387-
}}
388378
onClear={() => setFilter('')}
389379
/>
390380

@@ -474,4 +464,4 @@ export default function AttendancePage() {
474464
</CardBody>
475465
</Card>
476466
</div>);
477-
}
467+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import MenuHeader from '@/components/ui/common/MenuHeader';
2-
import ApiCodeGuard from '@/components/auth/ApiCodeGuard.jsx';
2+
import ApiCodeGuard from '@/components/auth/ApiCodeGuard';
33

44
export const metadata = {
55
title: 'CoreAdmin', description: 'Core member application management',
@@ -12,4 +12,4 @@ export default function CoreAdminLayout({children}) {
1212
{children}
1313
</>
1414
</ApiCodeGuard>);
15-
}
15+
}
Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import UserDetailsModal from '@/components/admin/UserDetailsModal';
77
import AdminTableTopContent from '@/components/admin/AdminTableTopContent';
88
import AdminTableBottomContent from '@/components/admin/AdminTableBottomContent';
99
import { useAuthenticatedApi } from '@/hooks/useAuthenticatedApi';
10+
import { getTeamLabel } from '@/constant/team';
11+
import { cn } from '@/utils/cn';
1012

1113
const columns = [
1214
{ name: 'NAME', uid: 'name' },
@@ -75,24 +77,21 @@ export default function CoreAdminPage() {
7577
</div>
7678
);
7779
case 'team': {
78-
const teamLabel = user?.team ?? '';
79-
const teamColorMap = {
80-
HR: '#EA4335',
81-
BD: '#34A853',
82-
TECH: '#4285F4',
83-
'PR/DESIGN': '#F9AB00',
80+
const teamName = user?.team ?? '';
81+
const teamClassMap = {
82+
HR: 'border-red text-red',
83+
BD: 'border-green text-green',
84+
TECH: 'border-blue text-blue',
85+
PR_DESIGN: 'border-yellow text-yellow',
8486
};
85-
const color = teamColorMap[teamLabel] || '#9CA3AF';
87+
const colorClass = teamClassMap[teamName] || 'border-gray-700 text-gray-700';
8688
return (
8789
<Chip
8890
size='sm'
8991
variant='bordered'
90-
style={{
91-
borderColor: color,
92-
color,
93-
}}
92+
className={cn('border text-xs font-semibold', colorClass)}
9493
>
95-
{teamLabel}
94+
{getTeamLabel(teamName)}
9695
</Chip>
9796
);
9897
}
@@ -174,7 +173,7 @@ export default function CoreAdminPage() {
174173
</TableHeader>
175174
<TableBody items={currentUsers} isLoading={loading} emptyContent={loading ? '불러오는 중...' : '데이터가 없습니다.'}>
176175
{(item) => (
177-
<TableRow className='hover:bg-[#35353b99] cursor-pointer text-white' key={item.id} onClick={() => handleRowClick(item)}>
176+
<TableRow className='hover:bg-white/10 cursor-pointer text-white' key={item.id} onClick={() => handleRowClick(item)}>
178177
{(columnKey) => (
179178
<TableCell>
180179
{renderCell(item, columnKey)}
@@ -190,5 +189,3 @@ export default function CoreAdminPage() {
190189
</div>
191190
);
192191
}
193-
194-
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
'use client'
2+
3+
import { Listbox, ListboxItem, ListboxSection } from '@nextui-org/react'
4+
5+
import { majorOptions } from '@/constant/majorOptions'
6+
7+
export default function MajorDropdownPreviewPage() {
8+
return (
9+
<div className="flex min-h-screen flex-col items-center gap-10 bg-black py-10 text-white">
10+
<div className="gdg-dropdown-popover w-full max-w-xl">
11+
<Listbox
12+
aria-label="학과 목록"
13+
selectionMode="single"
14+
selectedKeys={['컴퓨터공학과']}
15+
classNames={{
16+
base: 'gdg-dropdown-popover',
17+
list: 'gdg-dropdown-list'
18+
}}
19+
>
20+
{majorOptions.map((group) => (
21+
<ListboxSection
22+
key={group.title}
23+
title={group.title}
24+
showDivider
25+
classNames={{
26+
base: 'gdg-dropdown-section',
27+
heading: 'gdg-dropdown-heading',
28+
group: 'gdg-dropdown-group',
29+
divider: 'gdg-dropdown-divider'
30+
}}
31+
>
32+
{group.items.map((item) => (
33+
<ListboxItem key={item.value} className="gdg-dropdown-item">
34+
{item.value}
35+
</ListboxItem>
36+
))}
37+
</ListboxSection>
38+
))}
39+
</Listbox>
40+
</div>
41+
42+
<div className="gdg-dropdown-popover w-full max-w-sm">
43+
<Listbox
44+
aria-label="학과 목록"
45+
selectionMode="single"
46+
selectedKeys={['컴퓨터공학과']}
47+
classNames={{
48+
base: 'gdg-dropdown-popover',
49+
list: 'gdg-dropdown-list'
50+
}}
51+
>
52+
{majorOptions.map((group) => (
53+
<ListboxSection
54+
key={group.title}
55+
title={group.title}
56+
showDivider
57+
classNames={{
58+
base: 'gdg-dropdown-section',
59+
heading: 'gdg-dropdown-heading',
60+
group: 'gdg-dropdown-group',
61+
divider: 'gdg-dropdown-divider'
62+
}}
63+
>
64+
{group.items.map((item) => (
65+
<ListboxItem key={item.value} className="gdg-dropdown-item">
66+
{item.value}
67+
</ListboxItem>
68+
))}
69+
</ListboxSection>
70+
))}
71+
</Listbox>
72+
</div>
73+
</div>
74+
)
75+
}
File renamed without changes.

0 commit comments

Comments
 (0)