-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiff.txt
More file actions
3614 lines (3611 loc) · 113 KB
/
diff.txt
File metadata and controls
3614 lines (3611 loc) · 113 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 321a26b..51cdbdf 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,7 +1,7 @@
-import { AppProviders } from '@/presentation/providers';
+import { AppProviders } from '@/shared/providers';
import type { Metadata } from 'next';
-import { pretendard, suite } from '@/presentation/lib/font';
-import '@/presentation/styles/globals.css';
+import { pretendard, suite } from '@/shared/lib/font';
+import '@/shared/styles/globals.css';
export const metadata: Metadata = {
title: 'Create Next App',
diff --git a/src/app/main/page.tsx b/src/app/main/page.tsx
index 2bf7a83..bd0434c 100644
--- a/src/app/main/page.tsx
+++ b/src/app/main/page.tsx
@@ -1,11 +1,11 @@
-import { OdosPageTitle } from '@/presentation/components/odos-ui/page-title';
-import { OdosChallengeCard } from '@/presentation/components/odos-ui/challenge-card';
-import { OdosFooter } from '@/presentation/components/odos-ui/footer';
-import { OdosLabel } from '@/presentation/components/odos-ui/label';
-import { ScrollArea, ScrollBar } from '@/presentation/components/ui/scroll-area';
-import { OdosSpacing } from '@/presentation/components/odos-ui/spacing';
-import { OdosPageWatermark } from '@/presentation/components/odos-ui/page-watermark';
-import { OdosPageBackground } from '@/presentation/components/odos-ui/page-background';
+import { OdosPageTitle } from '@/shared/components/odos-ui/page-title';
+import { OdosChallengeCard } from '@/shared/components/odos-ui/challenge-card';
+import { OdosFooter } from '@/shared/components/odos-ui/footer';
+import { OdosLabel } from '@/shared/components/odos-ui/label';
+import { ScrollArea, ScrollBar } from '@/shared/components/ui/scroll-area';
+import { OdosSpacing } from '@/shared/components/odos-ui/spacing';
+import { OdosPageWatermark } from '@/shared/components/odos-ui/page-watermark';
+import { OdosPageBackground } from '@/shared/components/odos-ui/page-background';
function SectionHeader({
title,
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 08cbe40..a938f6a 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,6 +1,8 @@
+import 'reflect-metadata';
import Image from 'next/image';
import { ReactElement } from 'react';
+
export default function Home(): ReactElement {
return (
<div className="grid min-h-screen grid-rows-[20px_1fr_20px] items-center justify-items-center gap-16 p-8 pb-20 font-[family-name:var(--font-geist-sans)] sm:p-20">
diff --git a/src/data/repositories/UserRepository.ts b/src/data/repositories/UserRepository.ts
deleted file mode 100644
index 771e6c8..0000000
--- a/src/data/repositories/UserRepository.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-// src/data/repositories/UserRepositoryImpl.ts
-
-import { IUserRepository } from '@/domain/repositories/IUserRepository';
-
-/**
- * 예시 레포지토리입니다.
- * - IUserRepository를 구현합니다.
- */
-export class UserRepositoryImpl implements IUserRepository {
- /**
- * #1 id로 사용자 검색
- * @param id 사용자 ID
- * @returns 사용자 ID 또는 null
- */
- async findById(id: string): Promise<string | null> {
- return id;
- }
-
- /**
- * #2 email로 사용자 검색
- * @param email 사용자 Email
- * @returns 사용자 ID 또는 null
- */
- async findByEmail(email: string): Promise<string | null> {
- return email;
- }
-
- /**
- * #3 사용자 저장
- * @param id 사용자 ID
- */
- async save(id: string): Promise<void> {
- console.log(id);
- }
-
- /**
- * #4 사용자 삭제
- * @param id 사용자 ID
- */
- async delete(id: string): Promise<void> {
- console.log(id);
- }
-}
\ No newline at end of file
diff --git a/src/domain/entities/UserModel.ts b/src/domain/entities/UserModel.ts
deleted file mode 100644
index 3a8a268..0000000
--- a/src/domain/entities/UserModel.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-import { DomainError } from '@/domain/exceptions/DomainError';
-import { ErrorCode } from '@/domain/exceptions/ErrorCode';
-
-/** 예시 도메인 모델입니다.*/
-export class UserModel {
- private constructor(
- private readonly _id: string,
- private _email: string,
- private _name: string,
- private readonly _createdAt: Date,
- ) {}
-
- // Factory: 새 사용자 생성
- static create(params: {
- id: string;
- email: string;
- name: string;
- createdAt?: Date;
- }): UserModel {
- const { id, email, name, createdAt } = params;
- if (!id) {
- throw new DomainError(ErrorCode.USER_ID_REQUIRED, 'User ID는 필수 항목입니다.');
- }
- const emailVo = email;
- if (!name || name.trim().length === 0) {
- throw new DomainError(ErrorCode.USER_NAME_REQUIRED, '사용자 이름은 비어 있을 수 없습니다.');
- }
- return new UserModel(id, emailVo, name.trim(), createdAt ?? new Date());
- }
-
- // Persistence에서 로드할 때
- static fromPersistence(record: {
- id: string;
- email: string;
- name: string;
- createdAt: string | Date;
- }): UserModel {
- const emailVo = record.email;
- const created = record.createdAt instanceof Date
- ? record.createdAt
- : new Date(record.createdAt);
- return new UserModel(record.id, emailVo, record.name, created);
- }
-
- // 엔터티 ID
- get id(): string {
- return this._id;
- }
-
- // 이메일 조회
- get email(): string {
- return this._email;
- }
-
- // 이름 조회
- get name(): string {
- return this._name;
- }
-
- // 생성일 조회
- get createdAt(): Date {
- return this._createdAt;
- }
-
- // 이메일 변경 도메인 행위
- changeEmail(newEmail: string): void {
- const emailVo = newEmail;
- this._email = emailVo;
- }
-
- // 이름 변경 도메인 행위
- changeName(newName: string): void {
- if (!newName || newName.trim().length === 0) {
- throw new DomainError(ErrorCode.USER_NAME_REQUIRED, '사용자 이름은 비어 있을 수 없습니다.');
- }
- this._name = newName.trim();
- }
-
- // 엔터티 동등성: ID 비교
- equals(other: UserModel): boolean {
- return this._id === other._id;
- }
-
- // Persistence 변환
- toPersistence(): {
- id: string;
- email: string;
- name: string;
- createdAt: string;
- } {
- return {
- id: this._id,
- email: this._email,
- name: this._name,
- createdAt: this._createdAt.toISOString(),
- };
- }
-}
\ No newline at end of file
diff --git a/src/domain/exceptions/DomainError.ts b/src/domain/exceptions/DomainError.ts
deleted file mode 100644
index 4b1c551..0000000
--- a/src/domain/exceptions/DomainError.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { ErrorCode } from '@/domain/exceptions/ErrorCode';
-
-/**
- * 예시입니다.
- * DomainError
- * - 도메인 레이어에서 비즈니스 규칙 위반 시 사용되는 예외 클래스입니다.
- *
- * @param code 고유 오류 코드
- * @param message human-readable 메시지
- */
-export class DomainError extends Error {
- readonly code: ErrorCode;
-
- constructor(code: ErrorCode, message?: string) {
- super(message);
- this.name = 'DomainError';
- this.code = code;
-
- // V8 환경에서 stack trace 최적화
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, DomainError);
- }
- }
-
- toJSON() {
- return {
- name: this.name,
- code: this.code,
- message: this.message,
- stack: this.stack,
- };
- }
-}
diff --git a/src/domain/exceptions/ErrorCode.ts b/src/domain/exceptions/ErrorCode.ts
deleted file mode 100644
index 105a7c5..0000000
--- a/src/domain/exceptions/ErrorCode.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * 에러코드 예시입니다.
- * 이후 더 세분화 하여 사용합니다.
- */
-
-export enum ErrorCode {
- USER_ID_REQUIRED = 'USER_ID_REQUIRED',
- USER_NAME_REQUIRED = 'USER_NAME_REQUIRED',
- INVALID_EMAIL = 'INVALID_EMAIL',
-}
\ No newline at end of file
diff --git a/src/domain/repositories/IUserRepository.ts b/src/domain/repositories/IUserRepository.ts
deleted file mode 100644
index 32d6fb5..0000000
--- a/src/domain/repositories/IUserRepository.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { UserModel } from '../entities/UserModel';
-
-/**
- * 예시 레포지토리 인터페이스
- * - 레포지토리 인터페이스를 정의합니다.
- * - 이후 data/repositories/UserRepository.ts에서 구현합니다.
- * - 인터페이스 파일 앞에는 I를 붙입니다.
- * **아래의 API들은 모두 예시입니다.**
- */
-export interface IUserRepository {
- /**
- * #1 id로 사용자 검색
- * @param id 사용자 ID
- * @returns 사용자 ID 또는 null
- */
- findById(id: string): Promise<UserModel | null>;
-
- /**
- * #2 email로 사용자 검색
- * @param email 사용자 Email
- * @returns 사용자 ID 또는 null
- */
- findByEmail(email: string): Promise<UserModel | null>;
-
- /**
- * #3 사용자 저장
- * @param user 사용자 ID
- */
- save(user: string): Promise<void>;
-
- /**
- * #4 사용자 삭제
- * @param id 사용자 ID
- */
- delete(id: string): Promise<void>;
-}
\ No newline at end of file
diff --git a/src/domain/usecases/CreateUserUseCase.ts b/src/domain/usecases/CreateUserUseCase.ts
deleted file mode 100644
index 602d131..0000000
--- a/src/domain/usecases/CreateUserUseCase.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-// src/domain/usecases/user/CreateUserUseCase.ts
-
-import { IUserRepository } from '@/domain/repositories/IUserRepository';
-import { UserModel } from '@/domain/entities/UserModel';
-
-/**
- * CreateUserRequest
- * - 사용자 생성에 필요한 데이터 구조
- */
-export interface CreateUserRequest {
- /** 사용자 ID */
- id: string;
- /** 사용자 이메일 */
- email: string;
- /** 사용자 이름 */
- name: string;
-}
-
-/**
- * CreateUserResponse
- * - 사용자 생성 후 반환 데이터 구조
- */
-export interface CreateUserResponse {
- /** 생성된 사용자 ID */
- id: string;
- /** 생성된 이메일 */
- email: string;
- /** 생성된 이름 */
- name: string;
-}
-
-/**
- * CreateUserUseCase
- * - 사용자를 생성하는 유스케이스 구현체
- */
-export class CreateUserUseCase {
- constructor(private readonly userRepository: IUserRepository) {}
-
- /**
- * #1: 사용자 생성
- *
- * @param request CreateUserRequest
- * @returns CreateUserResponse
- */
- async execute(request: CreateUserRequest): Promise<CreateUserResponse> {
- const { id, email, name } = request;
-
- // User 엔티티 내부에서 값 객체 및 규칙 검증 수행
- const user = UserModel.create({ id, email, name });
-
- // 영속성 저장
- await this.userRepository.save(user.id);
-
- return {
- id: user.id,
- email: user.email,
- name: user.name,
- };
- }
-}
diff --git a/src/presentation/components/odos-ui/button.tsx b/src/presentation/components/odos-ui/button.tsx
deleted file mode 100644
index e1cba0d..0000000
--- a/src/presentation/components/odos-ui/button.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-import { cn } from '@/presentation/lib/utils';
-import { buttonVariants } from '@/components/ui/button';
-import { Slot } from '@radix-ui/react-slot';
-import { cva, type VariantProps } from 'class-variance-authority';
-import { OdosLabel } from './label';
-
-const allButtonVariants = 'h-auto px-6 border-none shadow-none px-6';
-const largeButtonVariants = 'rounded-odos-2 py-4';
-const smallButtonVariants = 'rounded-odos-1 py-1.5';
-
-const odosButtonVariants = cva('', {
- variants: {
- variant: {
- default: cn(
- buttonVariants({ variant: 'default', size: 'default' }),
- allButtonVariants,
- largeButtonVariants,
- 'bg-main-900 text-white hover:bg-main-800'
- ),
- disabled: cn(
- buttonVariants({ variant: 'default', size: 'default' }),
- allButtonVariants,
- largeButtonVariants,
- 'bg-gray-400 text-gray-600 hover:bg-gray-400'
- ),
- warning: cn(
- buttonVariants({ variant: 'destructive', size: 'default' }),
- allButtonVariants,
- largeButtonVariants,
- 'bg-warning text-white'
- ),
- loading: cn(
- buttonVariants({ variant: 'default', size: 'default' }),
- allButtonVariants,
- largeButtonVariants,
- 'bg-main-900 hover:bg-main-900'
- ),
- outline: cn(
- buttonVariants({ variant: 'outline', size: 'default' }),
- allButtonVariants,
- largeButtonVariants,
- 'text-gray-900 hover:bg-main-900 hover:text-white inset-ring-[1.5px] inset-ring-main-900'
- ),
- defaultSmall: cn(
- buttonVariants({ variant: 'default', size: 'sm' }),
- allButtonVariants,
- smallButtonVariants,
- 'bg-main-900 text-white hover:bg-main-800'
- ),
- disabledSmall: cn(
- buttonVariants({ variant: 'default', size: 'sm' }),
- allButtonVariants,
- smallButtonVariants,
- 'bg-gray-400 text-gray-600 hover:bg-gray-400'
- ),
- warningSmall: cn(
- buttonVariants({ variant: 'destructive', size: 'sm' }),
- allButtonVariants,
- smallButtonVariants,
- 'bg-warning text-white'
- ),
- loadingSmall: cn(
- buttonVariants({ variant: 'default', size: 'sm' }),
- allButtonVariants,
- smallButtonVariants,
- 'bg-main-900 hover:bg-main-900'
- ),
- outlineSmall: cn(
- buttonVariants({ variant: 'outline', size: 'sm' }),
- allButtonVariants,
- smallButtonVariants,
- 'text-gray-900 hover:bg-main-900 hover:text-white inset-ring-[1px] inset-ring-main-900'
- ),
- },
- },
- defaultVariants: {
- variant: 'default',
- },
-});
-
-/**
- * OdosButton
- * 커스텀 버튼 컴포넌트
- * @param variant 버튼스타일 :default, disabled, warning, loading, outline, defaultSmall, disabledSmall, warningSmall, loadingSmall, outlineSmall
- *
- * @example 기본 버튼
- * ```tsx
- * <OdosButton variant="default">Default OdosButton</OdosButton>
- * ```
- */
-export function OdosButton({
- className,
- variant,
- asChild = false,
- ...props
-}: React.ComponentProps<'button'> &
- VariantProps<typeof odosButtonVariants> & {
- asChild?: boolean;
- }): React.ReactElement {
- const Comp = asChild ? Slot : 'button';
- const isSmall = variant?.includes('Small');
- const isDisabled = variant?.includes('disalbed');
- return (
- <Comp data-slot="button" className={cn(odosButtonVariants({ variant, className }))} {...props}>
- <OdosLabel size={isSmall ? 'caption3' : 'body1'} weight={isDisabled ? 'regular' : 'bold'}>
- {props.children}
- </OdosLabel>
- </Comp>
- );
-}
diff --git a/src/presentation/components/odos-ui/challenge-card.tsx b/src/presentation/components/odos-ui/challenge-card.tsx
deleted file mode 100644
index e05e3d8..0000000
--- a/src/presentation/components/odos-ui/challenge-card.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-import { cn } from '@/presentation/lib/utils';
-import Image from 'next/image';
-import { OdosLabel } from './label';
-import { OdosTag } from './tag';
-import logo from '/public/images/logo.png';
-
-interface ChallengeProps {
- challengeTitle: string;
- challengeType: string;
- currentUserCount: number;
- maxUserCount: number;
- startDate: string;
- endDate: string;
- isOngoing: boolean;
- className?: string;
-}
-
-/**
- * OdosChallengeCard
- * 챌린지 카드 컴포넌트 - 제목, 유형, 참여자 수, 기간, 상태(진행중/모집중) 표시
- *
- * @param challengeTitle 챌린지 이름
- * @param challengeType 챌린지 유형
- * @param currentUserCount 현재 참여자 수
- * @param maxUserCount 최대 참여자 수
- * @param startDate 시작일 (YYYY-MM-DD)
- * @param endDate 종료일 (YYYY-MM-DD)
- * @param isOngoing 챌린지 진행 상태 (true: 진행중, false: 모집중)
- *
- * @example 기본 사용 예
- * ```tsx
- * <OdosChallengeCard
- * challengeTitle="챌린지 제목"
- * challengeType="고정목표형"
- * currentUserCount={12}
- * maxUserCount={20}
- * startDate="2023-10-01"
- * endDate="2023-10-31"
- * isOngoing={true}
- * />
- * ```
- */
-export function OdosChallengeCard({
- challengeTitle,
- challengeType,
- currentUserCount,
- maxUserCount,
- startDate,
- endDate,
- isOngoing = false,
- className,
-}: ChallengeProps): React.ReactElement {
- return (
- <div className="hover:rounded-odos-2 hover:shadow-odos-default w-min hover:bg-white hover:px-2 hover:py-4">
- <div className={cn('flex w-50 flex-wrap items-start justify-between gap-y-2', className)}>
- <OdosLabel size="body1" weight="bold" className="text-black">
- {challengeTitle}
- </OdosLabel>
- <div className="rounded-odos-1 bg-main-200 relative h-37.5 w-50">
- <div className="absolute flex flex-row gap-1.5 pt-1 pl-1">
- <OdosTag icon="💻">개발</OdosTag>
- {isOngoing && <OdosTag className="bg-mint-700">진행중</OdosTag>}
- {!isOngoing && <OdosTag className="bg-blue-500">모집중</OdosTag>}
- </div>
- <div className="absolute inset-0 flex items-center justify-center">
- <Image src={logo} alt="로고" width="48" />
- </div>
- </div>
- <OdosLabel size="caption3" weight="bold">
- {challengeType}
- </OdosLabel>
- <div className="flex flex-row gap-1">
- <Image src="/images/user.png" alt="유저" width="12" height="12" />
- <OdosLabel size="caption2" weight="medium">
- {currentUserCount} / {maxUserCount}
- </OdosLabel>
- </div>
- <OdosLabel size="caption3" weight="medium">
- {startDate} - {endDate}
- </OdosLabel>
- </div>
- </div>
- );
-}
diff --git a/src/presentation/components/odos-ui/footer.tsx b/src/presentation/components/odos-ui/footer.tsx
deleted file mode 100644
index aa1d7f1..0000000
--- a/src/presentation/components/odos-ui/footer.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import Image from 'next/image';
-import { OdosLabel } from './label';
-
-/**
- * OdosFooter
- * 공통 하단 정보 영역 컴포넌트
- * - 로고 및 서비스명 표시
- * - 고객문의 이메일 제공
- * - 이용약관 / 개인정보처리방침 / 운영정책 링크 항목 포함
- */
-export function OdosFooter(): React.ReactElement {
- return (
- <footer className="flex w-screen items-center justify-center bg-gray-900 pt-14 pb-21.5">
- <div className="flex w-250 flex-col gap-7.5 px-7.5">
- <div className="flex flex-row items-center gap-5">
- <Image src="/images/logo-white.png" alt="로고" width={30} height={50} />
- <OdosLabel size="heading1" weight="bold" className="text-white">
- 1D1S
- </OdosLabel>
- </div>
- <div className="flex flex-row gap-2.5">
- <OdosLabel size="body2" weight="medium" className="text-white">
- 고객문의
- </OdosLabel>
- <OdosLabel size="body2" weight="regular" className="text-white">
- 1d1s@gmail.com
- </OdosLabel>
- </div>
- <div className="flex flex-row gap-12.5">
- <OdosLabel size="body2" weight="medium" className="text-white">
- 서비스 이용약관
- </OdosLabel>
- <OdosLabel size="body2" weight="medium" className="text-white">
- 개인정보 처리방침
- </OdosLabel>
- <OdosLabel size="body2" weight="medium" className="text-white">
- 운영정책
- </OdosLabel>
- </div>
- </div>
- </footer>
- );
-}
diff --git a/src/presentation/components/odos-ui/label.tsx b/src/presentation/components/odos-ui/label.tsx
deleted file mode 100644
index 469ed69..0000000
--- a/src/presentation/components/odos-ui/label.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import { cn } from '@/presentation/lib/utils';
-import { cva, type VariantProps } from 'class-variance-authority';
-
-const odosLabelVariants = cva('', {
- variants: {
- size: {
- heading1: 'text-3xl',
- heading2: 'text-2xl',
- body1: 'text-xl',
- body2: 'text-lg',
- caption1: 'text-base',
- caption2: 'text-sm',
- caption3: 'text-xs',
- pageTitle: 'text-3xl',
- },
- weight: {
- bold: 'font-bold',
- medium: 'font-medium',
- regular: 'font-regular',
- light: 'font-light',
- },
- },
- defaultVariants: {
- size: 'body2',
- weight: 'medium',
- },
-});
-
-/**
- * OdosLabel
- * 텍스트에 사이즈 및 굵기를 적용하는 커스텀 라벨 컴포넌트
- *
- * @param size 텍스트 크기 : heading1, heading2, body1, body2, caption1, caption2, caption3, pageTitle
- * @default size body2
- * @param weight 텍스트 굵기 : bold, medium, regular, light
- * @param as HTML 태그 또는 커스텀 컴포넌트로 렌더링 (기본값: span)
- *
- * @example 기본 사용
- * ```tsx
- * <OdosLabel size="body1" weight="bold">텍스트</OdosLabel>
- * ```
- *
- * @example HTML 태그 변경
- * ```tsx
- * <OdosLabel as="p" size="caption1" weight="regular">단락 텍스트</OdosLabel>
- * ```
- */
-export function OdosLabel({
- className,
- size,
- weight,
- as: Tag = 'span',
- ...props
-}: { as?: React.ElementType } & React.ComponentPropsWithoutRef<'span'> &
- VariantProps<typeof odosLabelVariants>): React.ReactElement {
- return <Tag className={cn(odosLabelVariants({ size, weight, className }))} {...props} />;
-}
diff --git a/src/presentation/components/odos-ui/page-background.tsx b/src/presentation/components/odos-ui/page-background.tsx
deleted file mode 100644
index a4086e2..0000000
--- a/src/presentation/components/odos-ui/page-background.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import { cn } from '@/presentation/lib/utils';
-
-/**
- * OdosPageBackground
- * 페이지 또는 카드의 기본 배경 영역을 구성하는 컨테이너 컴포넌트
- *
- * @example
- * ```tsx
- * <OdosPageBackground className="min-w-250">
- * <SomeSection />
- * </OdosPageBackground>
- * ```
- */
-export function OdosPageBackground({
- children,
- className,
-}: {
- children: React.ReactNode;
- className?: string;
-}): React.ReactElement {
- return (
- <div
- className={cn(
- 'shadow-odos-default flex h-full min-w-200 flex-col items-center bg-white',
- className
- )}
- >
- {children}
- </div>
- );
-}
diff --git a/src/presentation/components/odos-ui/page-title.tsx b/src/presentation/components/odos-ui/page-title.tsx
deleted file mode 100644
index c8f6e27..0000000
--- a/src/presentation/components/odos-ui/page-title.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import { cn } from '@/presentation/lib/utils';
-import { OdosLabel } from './label';
-import Image from 'next/image';
-import { cva, VariantProps } from 'class-variance-authority';
-
-const pageTitleVariants = cva('flex flex-col items-center', {
- variants: {
- variant: {
- withSubtitle: 'pb-2 pt-6 gap-2',
- noSubtitle: 'py-5',
- },
- },
- defaultVariants: {
- variant: 'noSubtitle',
- },
-});
-
-type PageTitleProps = {
- title: string;
- subtitle?: string;
- className?: string;
-} & VariantProps<typeof pageTitleVariants>;
-
-/**
- * OdosPageTitle
- * 페이지 상단 타이틀 및 부제목 컴포넌트
- *
- * @param title 페이지 제목 텍스트
- * @param subtitle 선택적 부제목 텍스트 (variant가 'withSubtitle'일 때 표시)
- * @param variant 타이틀 스타일 종류 ('noSubtitle' | 'withSubtitle')
- *
- * @example 기본 사용
- * ```tsx
- * <OdosPageTitle title="오늘의 챌린지" />
- * ```
- *
- * @example 부제목 포함
- * ```tsx
- * <OdosPageTitle title="챌린지 소개" subtitle="매일 7시에 기상하기" variant="withSubtitle" />
- * ```
- */
-export function OdosPageTitle({
- title,
- subtitle,
- variant = 'noSubtitle',
- className,
-}: PageTitleProps): React.ReactElement {
- return (
- <div className={cn('flex items-end gap-6', className)}>
- <Image src="/images/logo.png" alt="로고" width={48} height={80} />
- <div className={pageTitleVariants({ variant })}>
- <OdosLabel size="pageTitle" weight="bold" className="text-black">
- {title}
- </OdosLabel>
- {variant === 'withSubtitle' && subtitle && (
- <OdosLabel size="caption1" weight="medium" className="text-black">
- {subtitle}
- </OdosLabel>
- )}
- </div>
- </div>
- );
-}
diff --git a/src/presentation/components/odos-ui/page-watermark.tsx b/src/presentation/components/odos-ui/page-watermark.tsx
deleted file mode 100644
index cf1e245..0000000
--- a/src/presentation/components/odos-ui/page-watermark.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import { OdosLabel } from './label';
-import Image from 'next/image';
-
-export function OdosPageWatermark(): React.ReactElement {
- return (
- <div className="flex items-end gap-2">
- <Image src="/images/logo-gray.png" alt="로고" width={24} height={40} />
- <OdosLabel size="body1" weight="bold" className="my-2.5 text-gray-300">
- 1D1S
- </OdosLabel>
- </div>
- );
-}
diff --git a/src/presentation/components/odos-ui/spacing.tsx b/src/presentation/components/odos-ui/spacing.tsx
deleted file mode 100644
index b418544..0000000
--- a/src/presentation/components/odos-ui/spacing.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * OdosSpacing
- * 레이아웃 내 간격을 위해 사용되는 유틸리티 컴포넌트
- *
- * @param className Tailwind 유틸리티 클래스로 간격 크기 지정
- *
- * @example 기본 사용
- * ```tsx
- * <OdosSpacing className="h-4" />
- * ```
- */
-export function OdosSpacing({
- className,
-}: React.ComponentPropsWithoutRef<'div'>): React.ReactElement {
- return <div className={className} />;
-}
diff --git a/src/presentation/components/odos-ui/tag.tsx b/src/presentation/components/odos-ui/tag.tsx
deleted file mode 100644
index b9c4ecb..0000000
--- a/src/presentation/components/odos-ui/tag.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import { cn } from '@/presentation/lib/utils';
-import { cva, type VariantProps } from 'class-variance-authority';
-import { OdosLabel } from './label';
-
-const tagVariants = cva(
- 'inline-flex items-center rounded-odos-1 px-1.5 py-1 bg-main-900 text-white',
- {
- variants: {
- hasIcon: {
- true: 'gap-1',
- false: '',
- },
- },
- defaultVariants: {
- hasIcon: false,
- },
- }
-);
-
-type TagProps = {
- icon?: string;
- children: React.ReactNode;
- className?: string;
- weight?: 'bold' | 'medium' | 'regular' | 'light';
-} & VariantProps<typeof tagVariants>;
-
-/**
- * OdosTag
- * 간단한 태그 스타일을 위한 컴포넌트 (텍스트 + 아이콘 구성)
- *
- * @param icon 선택적 아이콘 이모지 텍스트
- * @param weight 텍스트 굵기 (기본값: bold) : bold, medium, regular, light
- *
- * @example 기본 사용
- * ```tsx
- * <OdosTag icon="🔥">인기</OdosTag>
- * ```
- */
-export function OdosTag({
- icon,
- children,
- weight = 'bold',
- className,
-}: TagProps): React.ReactElement {
- return (
- <span className={cn(tagVariants({ hasIcon: Boolean(icon) }), className)}>
- {icon && (
- <OdosLabel size="caption3" weight="medium">
- {icon}
- </OdosLabel>
- )}
- <OdosLabel size="caption3" weight={weight}>
- {children}
- </OdosLabel>
- </span>
- );
-}
diff --git a/src/presentation/components/ui/alert-dialog.tsx b/src/presentation/components/ui/alert-dialog.tsx
deleted file mode 100644
index 902a035..0000000
--- a/src/presentation/components/ui/alert-dialog.tsx
+++ /dev/null
@@ -1,145 +0,0 @@
-'use client';
-
-import * as React from 'react';
-import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
-
-import { cn } from '@/presentation/lib/utils';
-import { buttonVariants } from '@/components/ui/button';
-
-function AlertDialog({
- ...props
-}: React.ComponentProps<typeof AlertDialogPrimitive.Root>): React.ReactElement {
- return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
-}
-
-function AlertDialogTrigger({
- ...props
-}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): React.ReactElement {
- return <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />;
-}
-
-function AlertDialogPortal({
- ...props
-}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): React.ReactElement {
- return <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />;
-}
-
-function AlertDialogOverlay({
- className,
- ...props
-}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): React.ReactElement {
- return (
- <AlertDialogPrimitive.Overlay
- data-slot="alert-dialog-overlay"
- className={cn(
- 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',
- className
- )}
- {...props}
- />
- );
-}
-
-function AlertDialogContent({
- className,
- ...props
-}: React.ComponentProps<typeof AlertDialogPrimitive.Content>): React.ReactElement {
- return (
- <AlertDialogPortal>
- <AlertDialogOverlay />
- <AlertDialogPrimitive.Content
- data-slot="alert-dialog-content"
- className={cn(
- 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',
- className
- )}
- {...props}
- />
- </AlertDialogPortal>
- );
-}
-
-function AlertDialogHeader({
- className,
- ...props
-}: React.ComponentProps<'div'>): React.ReactElement {
- return (
- <div
- data-slot="alert-dialog-header"
- className={cn('flex flex-col gap-2 text-center sm:text-left', className)}
- {...props}
- />
- );
-}
-
-function AlertDialogFooter({
- className,
- ...props
-}: React.ComponentProps<'div'>): React.ReactElement {
- return (
- <div
- data-slot="alert-dialog-footer"
- className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}
- {...props}
- />
- );
-}
-
-function AlertDialogTitle({
- className,
- ...props
-}: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.ReactElement {
- return (
- <AlertDialogPrimitive.Title
- data-slot="alert-dialog-title"