diff --git a/src/components/Modal/domain/AddTodoList.module.css b/src/components/Modal/domain/AddTodoList.module.css new file mode 100644 index 0000000..5d1d989 --- /dev/null +++ b/src/components/Modal/domain/AddTodoList.module.css @@ -0,0 +1,113 @@ +.container { + --dialog-max-width-mobile: 375px; + --dialog-padding: 16px 16px 32px; + --dialog-gap: 10px; + --control-height: 48px; + --close-button-size: 24px; + --input-max-width: 288px; + --button-max-width: 280px; + + display: flex; + padding: var(--dialog-padding); + flex-direction: column; + gap: var(--dialog-gap); + align-items: stretch; + box-sizing: border-box; +} + +.header { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; +} + +.title { + color: var(--Text-Primary, #1e293b); + font-family: Pretendard; + font-size: 16px; + font-style: normal; + font-weight: 500; + line-height: 19px; + margin: 0; +} + +.form { + display: flex; + flex-direction: column; + gap: 24px; +} + +.input.input { + padding: 14px 16px; + width: 100%; + max-width: var(--input-max-width); + height: var(--control-height); + box-sizing: border-box; + align-self: center; + text-align: center; +} + +.input.input::placeholder { + color: var(--Text-Default, #64748b); + font-family: Pretendard; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 19px; +} + +.footer { + display: flex; + justify-content: center; +} + +.button { + display: flex; + width: 100%; + max-width: var(--button-max-width); + height: var(--control-height); + justify-content: center; + align-items: center; + gap: 10px; + flex-shrink: 0; + border-radius: 12px; + background: var(--Color-Brand-Primary, #5189fa); + border: none; + color: var(--color-text-inverse, #ffffff); + text-align: center; + font-family: Pretendard; + font-size: 16px; + font-style: normal; + font-weight: 600; + line-height: 19px; +} + +.closeButton { + width: var(--close-button-size); + height: var(--close-button-size); + padding: 0; + border: none; + background: transparent; + display: inline-flex; + align-items: center; + justify-content: center; + cursor: pointer; +} + +.modalContent.modalContent { + --dialog-radius-desktop: 24px; + --dialog-radius-mobile: 24px 24px 0 0; + border-radius: var(--dialog-radius-desktop); +} + +@media (max-width: 480px) { + .container { + width: 100%; + max-width: var(--dialog-max-width-mobile); + } + + .modalContent.modalContent { + border-radius: var(--dialog-radius-mobile); + } +} diff --git a/src/components/Modal/domain/AddTodoList.tsx b/src/components/Modal/domain/AddTodoList.tsx new file mode 100644 index 0000000..99ed38a --- /dev/null +++ b/src/components/Modal/domain/AddTodoList.tsx @@ -0,0 +1,52 @@ +'use client'; + +import Image from 'next/image'; +import type { FormEvent } from 'react'; +import { Input } from '@/components/input'; +import Modal from '../Modal'; +import styles from './AddTodoList.module.css'; +import xMarkBig from '@/assets/icons/xMark/xMarkBig.svg'; + +const TITLE_ID = 'add-todo-list-title'; + +export interface AddTodoListProps { + isOpen: boolean; + onClose: () => void; + onCreate: () => void; +} + +export default function AddTodoList({ isOpen, onClose, onCreate }: AddTodoListProps) { + const handleSubmit = (e: FormEvent) => { + e.preventDefault(); + onCreate(); + }; + + return ( + +
+
+

+ 할 일 목록 +

+ +
+ +
+ +
+ +
+
+
+
+ ); +} diff --git a/src/components/Modal/domain/MemberInvite.module.css b/src/components/Modal/domain/MemberInvite.module.css new file mode 100644 index 0000000..a196476 --- /dev/null +++ b/src/components/Modal/domain/MemberInvite.module.css @@ -0,0 +1,90 @@ +@import '@shared/styles/color.css'; + +.container { + position: relative; + width: 384px; + height: 211px; + padding: 40px 24px 32px; + display: flex; + flex-direction: column; + align-items: center; + gap: 12px; + text-align: center; +} + +.modalContent { + border-radius: 24px; +} + +.closeButton { + position: absolute; + top: 16px; + right: 16px; + width: 24px; + height: 24px; + padding: 0; + display: inline-flex; + align-items: center; + justify-content: center; + border: none; + background: transparent; + cursor: pointer; +} + +.title { + margin: 8px 0 0; + color: var(--Text-Primary, #1e293b); + font-family: Pretendard, sans-serif; + font-size: 16px; + font-weight: 500; + line-height: 19px; +} + +.description { + margin: 4px 0 16px; + color: var(--Text-Secondary, #334155); + font-family: Pretendard, sans-serif; + font-size: 14px; + font-weight: 500; + line-height: 17px; +} + +.copyButton { + display: flex; + width: 280px; + height: 48px; + padding: 14px 24px; + justify-content: center; + align-items: center; + gap: 10px; + border-radius: 16px; + border: none; + background: var(--color-brand-primary); + color: var(--Text-inverse, #fff); + font-family: Pretendard, sans-serif; + font-size: 16px; + font-weight: 600; + line-height: 19px; + cursor: pointer; +} + +.copyButton:disabled { + background: var(--color-interaction-inactive); + cursor: not-allowed; +} + +@media (max-width: 480px) { + .modalContent { + border-radius: 24px 24px 0 0; + } + + .container { + width: 100%; + max-width: 375px; + height: 195px; + flex-shrink: 0; + border-radius: 24px 24px 0 0; + background: var(--Background-Primary, #fff); + box-sizing: border-box; + } +} diff --git a/src/components/Modal/domain/MemberInvite.tsx b/src/components/Modal/domain/MemberInvite.tsx new file mode 100644 index 0000000..82f3e66 --- /dev/null +++ b/src/components/Modal/domain/MemberInvite.tsx @@ -0,0 +1,48 @@ +'use client'; + +import Image from 'next/image'; +import Modal from '../Modal'; +import styles from './MemberInvite.module.css'; +import xMarkBig from '@/assets/icons/xMark/xMarkBig.svg'; + +export type MemberInviteProps = { + isOpen: boolean; + onClose: () => void; + inviteLink: string; + onCopy?: (link: string) => void; +}; + +export default function MemberInvite({ isOpen, onClose, inviteLink, onCopy }: MemberInviteProps) { + const handleCopy = async () => { + try { + await navigator.clipboard.writeText(inviteLink); + } finally { + onCopy?.(inviteLink); + } + }; + + return ( + +
+ +

+ 멤버 초대 +

+

+ 그룹에 참여할 수 있는 링크를 복사합니다. +

+ +
+
+ ); +} diff --git a/src/components/Modal/domain/ResetPassword.module.css b/src/components/Modal/domain/ResetPassword.module.css new file mode 100644 index 0000000..8416fd3 --- /dev/null +++ b/src/components/Modal/domain/ResetPassword.module.css @@ -0,0 +1,117 @@ +.modalContent.modalContent { + display: inline-flex; + padding: 16px 16px 32px 16px; + flex-direction: column; + align-items: stretch; + gap: 10px; + border-radius: 24px; + background: var(--Background-Primary, #fff); + box-sizing: border-box; + width: 384px; + height: 260px; +} + +.container { + display: flex; + flex-direction: column; + gap: 16px; + width: 100%; + height: 100%; + box-sizing: border-box; + margin-top: 24px; +} + +.header { + display: flex; + flex-direction: column; + gap: 6px; + align-items: center; +} + +.title { + margin: 0; + color: var(--Text-Primary, #1e293b); + font-family: Pretendard; + font-size: 16px; + font-style: normal; + font-weight: 500; + line-height: 19px; + text-align: center; +} + +.description { + margin: 0; + color: var(--Text-Default, #64748b); + font-family: Pretendard; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 17px; + text-align: center; +} + +.form { + display: flex; + flex-direction: column; + gap: 16px; + flex: 1; +} + +.input.input { + display: flex; + width: 280px; + height: 48px; + padding: 16px; + align-items: center; + gap: 10px; + border-radius: 12px; + border: 1px solid var(--Border-Primary, #e2e8f0); + background: var(--Background-Primary, #fff); + box-sizing: border-box; + margin: 0 auto; +} + +.actions { + display: flex; + width: 280px; + gap: 8px; + margin: auto auto 0; +} + +.closeButton { + display: flex; + width: 136px; + height: 48px; + justify-content: center; + align-items: center; + gap: 10px; + border-radius: 12px; + border: 1px solid var(--Color-Brand-Primary, #5189fa); + background: transparent; + color: var(--Color-Brand-Primary, #5189fa); + font-family: Pretendard; + font-size: 16px; + font-style: normal; + font-weight: 600; + line-height: 19px; + cursor: pointer; +} + +.sendButton { + display: flex; + width: 136px; + height: 48px; + justify-content: center; + align-items: center; + gap: 10px; + border-radius: 12px; + border: none; + background: var(--Color-Brand-Primary, #5189fa); + color: #fff; + font-family: Pretendard; + font-size: 16px; + font-style: normal; + font-weight: 600; + line-height: 19px; + cursor: pointer; +} diff --git a/src/components/Modal/domain/ResetPassword.tsx b/src/components/Modal/domain/ResetPassword.tsx new file mode 100644 index 0000000..94f8afa --- /dev/null +++ b/src/components/Modal/domain/ResetPassword.tsx @@ -0,0 +1,79 @@ +'use client'; + +import type { FormEvent } from 'react'; + +import Modal from '../Modal'; +import { Input } from '@/components/input'; +import type { InputProps } from '@/components/input/types/types'; +import styles from './ResetPassword.module.css'; + +const TITLE_ID = 'reset-password-title'; +const DESCRIPTION_ID = 'reset-password-description'; + +export interface ResetPasswordProps { + isOpen: boolean; + onClose: () => void; + onSendLink: () => void; + emailInputProps?: Omit; +} + +/** + * 비밀번호 재설정 링크를 보내기 위한 모달 UI 컴포넌트. + * + * @param props.isOpen 모달을 열지 여부 + * @param props.onClose 모달을 닫을 때 호출 (오버레이 클릭/Escape 포함) + * @param props.onSendLink "링크 보내기" 제출 시 호출되는 콜백 + * @param props.emailInputProps 이메일 Input에 그대로 전달할 props (예: `value`, `onChange`, `isError`, `errorMessage`) + */ +export default function ResetPassword({ + isOpen, + onClose, + onSendLink, + emailInputProps, +}: ResetPasswordProps) { + const handleSubmit = (e: FormEvent) => { + e.preventDefault(); + onSendLink(); + }; + + return ( + +
+
+

+ 비밀번호 재설정 +

+

+ 비밀번호 재설정 링크를 보내드립니다. +

+
+ +
+ + + +
+
+
+ ); +} diff --git a/src/components/Modal/types/types.ts b/src/components/Modal/types/types.ts index 6c53d07..98b4c1c 100644 --- a/src/components/Modal/types/types.ts +++ b/src/components/Modal/types/types.ts @@ -6,6 +6,7 @@ interface BaseModalProps { children?: ReactNode; ariaDescribedby?: string; className?: string; + contentClassName?: string; closeOnOverlayClick?: boolean; closeOnEscape?: boolean; }