diff --git a/.pnp.cjs b/.pnp.cjs index e06311e6..dbb0fd87 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -29,6 +29,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./",\ "packageDependencies": [\ ["@chromatic-com/storybook", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:1.6.1"],\ + ["@dnd-kit/core", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:6.1.0"],\ ["@radix-ui/react-dialog", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:1.1.1"],\ ["@radix-ui/react-dropdown-menu", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:2.1.1"],\ ["@radix-ui/react-popover", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:1.1.1"],\ @@ -2876,6 +2877,81 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["@dnd-kit/accessibility", [\ + ["npm:3.1.0", {\ + "packageLocation": "./.yarn/cache/@dnd-kit-accessibility-npm-3.1.0-c746ff31d6-fcb88c961e.zip/node_modules/@dnd-kit/accessibility/",\ + "packageDependencies": [\ + ["@dnd-kit/accessibility", "npm:3.1.0"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:c56d1254a2b254d10804c16afd3fd0503381dc2cb0b930038ba9faa2fec3a2651d9db43268b68ffa04f0d62b88d201d4de1f7ff943ecb3481f607a48f94d517e#npm:3.1.0", {\ + "packageLocation": "./.yarn/__virtual__/@dnd-kit-accessibility-virtual-2af1b278e8/0/cache/@dnd-kit-accessibility-npm-3.1.0-c746ff31d6-fcb88c961e.zip/node_modules/@dnd-kit/accessibility/",\ + "packageDependencies": [\ + ["@dnd-kit/accessibility", "virtual:c56d1254a2b254d10804c16afd3fd0503381dc2cb0b930038ba9faa2fec3a2651d9db43268b68ffa04f0d62b88d201d4de1f7ff943ecb3481f607a48f94d517e#npm:3.1.0"],\ + ["@types/react", "npm:18.3.3"],\ + ["react", "npm:18.3.1"],\ + ["tslib", "npm:2.6.3"]\ + ],\ + "packagePeers": [\ + "@types/react",\ + "react"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@dnd-kit/core", [\ + ["npm:6.1.0", {\ + "packageLocation": "./.yarn/cache/@dnd-kit-core-npm-6.1.0-13c1618df7-3b8f46d2f4.zip/node_modules/@dnd-kit/core/",\ + "packageDependencies": [\ + ["@dnd-kit/core", "npm:6.1.0"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:6.1.0", {\ + "packageLocation": "./.yarn/__virtual__/@dnd-kit-core-virtual-c56d1254a2/0/cache/@dnd-kit-core-npm-6.1.0-13c1618df7-3b8f46d2f4.zip/node_modules/@dnd-kit/core/",\ + "packageDependencies": [\ + ["@dnd-kit/core", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:6.1.0"],\ + ["@dnd-kit/accessibility", "virtual:c56d1254a2b254d10804c16afd3fd0503381dc2cb0b930038ba9faa2fec3a2651d9db43268b68ffa04f0d62b88d201d4de1f7ff943ecb3481f607a48f94d517e#npm:3.1.0"],\ + ["@dnd-kit/utilities", "virtual:c56d1254a2b254d10804c16afd3fd0503381dc2cb0b930038ba9faa2fec3a2651d9db43268b68ffa04f0d62b88d201d4de1f7ff943ecb3481f607a48f94d517e#npm:3.2.2"],\ + ["@types/react", "npm:18.3.3"],\ + ["@types/react-dom", "npm:18.3.0"],\ + ["react", "npm:18.3.1"],\ + ["react-dom", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:18.3.1"],\ + ["tslib", "npm:2.6.3"]\ + ],\ + "packagePeers": [\ + "@types/react-dom",\ + "@types/react",\ + "react-dom",\ + "react"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@dnd-kit/utilities", [\ + ["npm:3.2.2", {\ + "packageLocation": "./.yarn/cache/@dnd-kit-utilities-npm-3.2.2-3fe8307947-8a5015c2fa.zip/node_modules/@dnd-kit/utilities/",\ + "packageDependencies": [\ + ["@dnd-kit/utilities", "npm:3.2.2"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:c56d1254a2b254d10804c16afd3fd0503381dc2cb0b930038ba9faa2fec3a2651d9db43268b68ffa04f0d62b88d201d4de1f7ff943ecb3481f607a48f94d517e#npm:3.2.2", {\ + "packageLocation": "./.yarn/__virtual__/@dnd-kit-utilities-virtual-a5cef4a422/0/cache/@dnd-kit-utilities-npm-3.2.2-3fe8307947-8a5015c2fa.zip/node_modules/@dnd-kit/utilities/",\ + "packageDependencies": [\ + ["@dnd-kit/utilities", "virtual:c56d1254a2b254d10804c16afd3fd0503381dc2cb0b930038ba9faa2fec3a2651d9db43268b68ffa04f0d62b88d201d4de1f7ff943ecb3481f607a48f94d517e#npm:3.2.2"],\ + ["@types/react", "npm:18.3.3"],\ + ["react", "npm:18.3.1"],\ + ["tslib", "npm:2.6.3"]\ + ],\ + "packagePeers": [\ + "@types/react",\ + "react"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@emnapi/runtime", [\ ["npm:1.2.0", {\ "packageLocation": "./.yarn/cache/@emnapi-runtime-npm-1.2.0-36d2203035-c9f5814f65.zip/node_modules/@emnapi/runtime/",\ @@ -8894,6 +8970,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [\ ["bbo-gak", "workspace:."],\ ["@chromatic-com/storybook", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:1.6.1"],\ + ["@dnd-kit/core", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:6.1.0"],\ ["@radix-ui/react-dialog", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:1.1.1"],\ ["@radix-ui/react-dropdown-menu", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:2.1.1"],\ ["@radix-ui/react-popover", "virtual:d9cd1cf96fc105240ce4126e416dd90faeefaf08cea474f2ffdd0a21bc6194bc993779567e0c0bf19c40cbbd585d546a065d8582fcc0925f8826e5fbca78aa72#npm:1.1.1"],\ diff --git a/.yarn/cache/@dnd-kit-accessibility-npm-3.1.0-c746ff31d6-fcb88c961e.zip b/.yarn/cache/@dnd-kit-accessibility-npm-3.1.0-c746ff31d6-fcb88c961e.zip new file mode 100644 index 00000000..84f3dc29 Binary files /dev/null and b/.yarn/cache/@dnd-kit-accessibility-npm-3.1.0-c746ff31d6-fcb88c961e.zip differ diff --git a/.yarn/cache/@dnd-kit-core-npm-6.1.0-13c1618df7-3b8f46d2f4.zip b/.yarn/cache/@dnd-kit-core-npm-6.1.0-13c1618df7-3b8f46d2f4.zip new file mode 100644 index 00000000..36c19589 Binary files /dev/null and b/.yarn/cache/@dnd-kit-core-npm-6.1.0-13c1618df7-3b8f46d2f4.zip differ diff --git a/.yarn/cache/@dnd-kit-utilities-npm-3.2.2-3fe8307947-8a5015c2fa.zip b/.yarn/cache/@dnd-kit-utilities-npm-3.2.2-3fe8307947-8a5015c2fa.zip new file mode 100644 index 00000000..dda40fd6 Binary files /dev/null and b/.yarn/cache/@dnd-kit-utilities-npm-3.2.2-3fe8307947-8a5015c2fa.zip differ diff --git a/package.json b/package.json index 63d00f0d..02b2fac2 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "node": "20.2.0" }, "dependencies": { + "@dnd-kit/core": "^6.1.0", "@radix-ui/react-dialog": "^1.1.1", "@radix-ui/react-dropdown-menu": "^2.1.1", "@radix-ui/react-popover": "^1.1.1", diff --git a/src/app/(sidebar)/(my-info)/components/InfoCardList.tsx b/src/app/(sidebar)/(my-info)/components/InfoCardList.tsx index 6267ef92..dcbf0c31 100644 --- a/src/app/(sidebar)/(my-info)/components/InfoCardList.tsx +++ b/src/app/(sidebar)/(my-info)/components/InfoCardList.tsx @@ -4,7 +4,7 @@ import { useState } from 'react'; import { mockInfoCount, mockInfoList } from '../mock'; import { cn } from '@/utils/tailwind-util'; import { Icon } from '@/system/components'; -import { InfoCardItem } from './InfoCardItem'; +import { InfoCard } from '@/components/InfoCard'; const INFO_OPTIONS = ['경험 정리', '자기소개서', '면접 질문'] as const; @@ -46,11 +46,13 @@ export function InfoCardList() { -
+
+ ); } diff --git a/src/app/(sidebar)/(my-info)/mock.ts b/src/app/(sidebar)/(my-info)/mock.ts index b5273dcd..8e507ce2 100644 --- a/src/app/(sidebar)/(my-info)/mock.ts +++ b/src/app/(sidebar)/(my-info)/mock.ts @@ -1,4 +1,4 @@ -import { InfoCard } from '@/types/info'; +import { InfoCardType } from '@/types/info'; export const mockInfoCount = { '경험 정리': 1, @@ -6,7 +6,7 @@ export const mockInfoCount = { '면접 질문': 2, }; -export const mockInfoList: InfoCard[] = [ +export const mockInfoList: InfoCardType[] = [ { id: 1, title: '제목', diff --git a/src/app/(sidebar)/my-recruit/components/NewRecruitDialogContent/InputField.tsx b/src/app/(sidebar)/my-recruit/components/NewRecruitDialogContent/InputField.tsx index 274ceb2f..841e0d43 100644 --- a/src/app/(sidebar)/my-recruit/components/NewRecruitDialogContent/InputField.tsx +++ b/src/app/(sidebar)/my-recruit/components/NewRecruitDialogContent/InputField.tsx @@ -1,4 +1,4 @@ -import { If } from '@/components/If'; +import { If } from '@/system/utils/If'; import { ComponentProps, ReactNode } from 'react'; interface Props extends ComponentProps<'input'> { diff --git a/src/app/(sidebar)/my-recruit/components/NewRecruitDialogContent/NewRecruitDialogContent.tsx b/src/app/(sidebar)/my-recruit/components/NewRecruitDialogContent/NewRecruitDialogContent.tsx index f45ca13b..a0f08d35 100644 --- a/src/app/(sidebar)/my-recruit/components/NewRecruitDialogContent/NewRecruitDialogContent.tsx +++ b/src/app/(sidebar)/my-recruit/components/NewRecruitDialogContent/NewRecruitDialogContent.tsx @@ -1,4 +1,4 @@ -import { Spacing } from '@/components/Spacing'; +import { Spacing } from '@/system/utils/Spacing'; import { TouchButton } from '@/components/TouchButton'; import { Dialog } from '@/system/components/Dialog/ShadcnDialog'; import { color } from '@/system/token/color'; @@ -17,7 +17,7 @@ import { motion } from 'framer-motion'; import { Popover, PopoverContent, PopoverTrigger } from '@/system/components/Popover/Popover'; import { Calendar } from '@/system/components/Calendar/Calendar'; import { format } from 'date-fns/format'; -import { If } from '@/components/If'; +import { If } from '@/system/utils/If'; interface Props { onSubmit: () => void; diff --git a/src/app/(sidebar)/my-recruit/containers/AllRecruitment.tsx b/src/app/(sidebar)/my-recruit/containers/AllRecruitment.tsx index e6959e93..34927397 100644 --- a/src/app/(sidebar)/my-recruit/containers/AllRecruitment.tsx +++ b/src/app/(sidebar)/my-recruit/containers/AllRecruitment.tsx @@ -2,7 +2,7 @@ import { Icon } from '@/system/components'; import { RocketIcon } from './components/RocketIcon'; -import { Spacing } from '@/components/Spacing'; +import { Spacing } from '@/system/utils/Spacing'; import { DropdownMenu, DropdownMenuContent, @@ -14,8 +14,11 @@ import { color } from '@/system/token/color'; import { Dialog } from '@/system/components/Dialog/ShadcnDialog'; import { cardList } from '../mock'; import { RowCard } from './components/Card/RowCard'; +import { Droppable, useDndContext } from '@/lib/dnd-kit/dnd-kit'; export function AllRecruitment() { + const { over } = useDndContext(); + return ( <> @@ -48,7 +51,9 @@ export function AllRecruitment() {
{cardList.map((cardInfo) => ( - + + + ))}
diff --git a/src/app/(sidebar)/my-recruit/containers/ProgressingRecruitment.tsx b/src/app/(sidebar)/my-recruit/containers/ProgressingRecruitment.tsx index 3d31fd3d..2c4f05ba 100644 --- a/src/app/(sidebar)/my-recruit/containers/ProgressingRecruitment.tsx +++ b/src/app/(sidebar)/my-recruit/containers/ProgressingRecruitment.tsx @@ -1,4 +1,4 @@ -import { Spacing } from '@/components/Spacing'; +import { Spacing } from '@/system/utils/Spacing'; import { ShoeIcon } from './components/ShoeIcon'; import { Dialog } from '@/system/components/Dialog/ShadcnDialog'; import { motion } from 'framer-motion'; diff --git a/src/app/(sidebar)/my-recruit/containers/RightSidebar.tsx b/src/app/(sidebar)/my-recruit/containers/RightSidebar.tsx new file mode 100644 index 00000000..40c962d5 --- /dev/null +++ b/src/app/(sidebar)/my-recruit/containers/RightSidebar.tsx @@ -0,0 +1,71 @@ +import { Spacing } from '@/system/utils/Spacing'; +import { TouchButton } from '@/components/TouchButton'; +import { Icon } from '@/system/components'; +import { color } from '@/system/token/color'; +import { mockInfoList } from '../mock'; +import { InfoCard } from '@/components/InfoCard'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from '@/system/components/DropdownMenu/DropdownMenu'; +import { Draggable } from '@/lib/dnd-kit/dnd-kit'; +import { motion } from 'framer-motion'; + +interface Props { + onCloseButtonClick: () => void; +} + +const infoCategoryList = ['경험 정리', '자기소개서', '면접 질문']; + +export function RightSidebar({ onCloseButtonClick }: Props) { + return ( + + + + + + +
+ 내 정보 가져오기 + + +
+ 경험 정리 + +
+
+ + {infoCategoryList.map((item) => ( + {item} + ))} + +
+
+ + 카드를 공고 폴더로 드래그해보세요 + +
    + {mockInfoList.map((info) => ( +
  • + + + +
  • + ))} +
+
+
+ ); +} diff --git a/src/app/(sidebar)/my-recruit/containers/components/Card/BoxCard.tsx b/src/app/(sidebar)/my-recruit/containers/components/Card/BoxCard.tsx index b3924ead..6c69fd76 100644 --- a/src/app/(sidebar)/my-recruit/containers/components/Card/BoxCard.tsx +++ b/src/app/(sidebar)/my-recruit/containers/components/Card/BoxCard.tsx @@ -1,4 +1,4 @@ -import { Spacing } from '@/components/Spacing'; +import { Spacing } from '@/system/utils/Spacing'; import { Icon } from '@/system/components'; import { color } from '@/system/token/color'; import { dday } from '@/utils/date'; @@ -8,6 +8,7 @@ import { Dialog } from '@/system/components/Dialog/ShadcnDialog'; import { DueDateDialog } from '../DueDateDialog'; export type ProgressingCardType = { + id: number; type: '서류 마감' | '1차 면접' | '2차 면접'; status: '지원 완료' | '서류 통과' | '서류 탈락'; dueDate: Date | null; @@ -52,17 +53,3 @@ export function BoxCard({ type, title, status, dueDate, period }: ProgressingCar ); } - -const statusList = [ - { variant: 'text', text: '지원 준비' }, - { variant: 'text', text: '지원 완료' }, - { variant: 'border' }, - { variant: 'text', text: '서류 통과' }, - { variant: 'text', text: '서류 탈락' }, - { variant: 'border' }, - { variant: 'text', text: '면접 통과' }, - { variant: 'text', text: '면접 탈락' }, - { variant: 'border' }, - { variant: 'text', text: '최종 합격' }, - { variant: 'text', text: '최종 탈락' }, -] as const; diff --git a/src/app/(sidebar)/my-recruit/containers/components/Card/RowCard.tsx b/src/app/(sidebar)/my-recruit/containers/components/Card/RowCard.tsx index 1e9cc852..28742e06 100644 --- a/src/app/(sidebar)/my-recruit/containers/components/Card/RowCard.tsx +++ b/src/app/(sidebar)/my-recruit/containers/components/Card/RowCard.tsx @@ -1,24 +1,31 @@ -import { If } from '@/components/If'; -import { Spacing } from '@/components/Spacing'; +import { If } from '@/system/utils/If'; +import { Spacing } from '@/system/utils/Spacing'; import { Icon } from '@/system/components'; import { color } from '@/system/token/color'; import { dday } from '@/utils/date'; import { MoreButton } from '@/app/(sidebar)/my-recruit/containers/components/Card/common/MoreButton'; import { StatusButton } from './common/StatusButton'; +import { cn } from '@/utils'; interface RowCardProps { + id: number; type: '서류 마감' | '1차 면접' | '2차 면접'; status: '지원 완료' | '서류 통과' | '서류 탈락'; dueDate: Date | null; period: string; title: string; + highlighted?: boolean; } -export function RowCard({ type, title, status, dueDate, period }: RowCardProps) { +export function RowCard({ type, title, status, dueDate, period, highlighted = false }: RowCardProps) { return (
-
-
+
+
{period} diff --git a/src/app/(sidebar)/my-recruit/containers/components/Card/common/StatusButton.tsx b/src/app/(sidebar)/my-recruit/containers/components/Card/common/StatusButton.tsx index e643f4cd..45e2f89d 100644 --- a/src/app/(sidebar)/my-recruit/containers/components/Card/common/StatusButton.tsx +++ b/src/app/(sidebar)/my-recruit/containers/components/Card/common/StatusButton.tsx @@ -1,4 +1,4 @@ -import { SwitchCase } from '@/components/SwitchCase'; +import { SwitchCase } from '@/system/utils/SwitchCase'; import { Icon } from '@/system/components'; import { DropdownMenu, @@ -24,8 +24,9 @@ export function StatusButton({ currentStatus }: Props) {
- {statusList.map((item) => ( + {statusList.map((item, index) => ( -
-
-

내 공고 뽀각

-
- - - 내 정보 가져오기 - - -
- - - 새 공고 + + +
+
+
+

내 공고 뽀각

+
+ setSidebarOpened(!sidebarOpened)}> + + 내 정보 가져오기 + +
+ + + 새 공고 + +
+
- +
+ + + +
+ + {sidebarOpened ? setSidebarOpened(false)} /> : null} +
- - - - -
- - - - + + + + + ); } diff --git a/src/app/(sidebar)/write/[id]/components/TagSelector/TagSelector.tsx b/src/app/(sidebar)/write/[id]/components/TagSelector/TagSelector.tsx index 3cf90407..00f2a785 100644 --- a/src/app/(sidebar)/write/[id]/components/TagSelector/TagSelector.tsx +++ b/src/app/(sidebar)/write/[id]/components/TagSelector/TagSelector.tsx @@ -5,7 +5,7 @@ import { generateContext } from '@/lib'; import { cn } from '@/utils'; import { Remove } from '@/system/components/Icon/SVG/Remove'; import { SVGProps } from 'react'; -import { If } from '@/components/If'; +import { If } from '@/system/utils/If'; const [TagSelectorProvider, useTagSelectorContext] = generateContext< Omit diff --git a/src/app/(sidebar)/write/components/MemoContainer/Memo/Memo.tsx b/src/app/(sidebar)/write/components/MemoContainer/Memo/Memo.tsx new file mode 100644 index 00000000..67b86f0d --- /dev/null +++ b/src/app/(sidebar)/write/components/MemoContainer/Memo/Memo.tsx @@ -0,0 +1,64 @@ +'use client'; + +import { useState, useRef, useEffect, useCallback } from 'react'; +import { Textarea } from '@/system/components/Textarea/Textarea'; +import { RemoveMemo } from '@/system/components/Icon/SVG/RemoveMemo'; +import { AnimatePresence } from 'framer-motion'; +import { motion } from 'framer-motion'; + +export default function Memo() { + const [text, setText] = useState('새로운 메모입니다'); + const [showCloseButton, setShowCloseButton] = useState(false); + const textareaRef = useRef(null); + + const adjustTextareaHeight = useCallback(() => { + const textarea = textareaRef.current; + + if (textarea) { + textarea.style.height = 'auto'; + textarea.style.height = `${textarea.scrollHeight}px`; + } + }, []); + + useEffect(() => { + adjustTextareaHeight(); + }, [text]); + + return ( +
setShowCloseButton(true)} + onMouseLeave={() => setShowCloseButton(false)}> +
+ +
+