From a30c2bbb32f2d7c5f7ae3b103bb6ee19387ad889 Mon Sep 17 00:00:00 2001 From: geonhee-min Date: Tue, 9 Dec 2025 17:09:31 +0900 Subject: [PATCH] =?UTF-8?q?issue=20#60=20-=20=EC=8B=9C=EC=9E=91/=EC=A2=85?= =?UTF-8?q?=EB=A3=8C=20=EC=8B=9C=EA=B0=84=20=EC=84=A4=EC=A0=95=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=EB=B0=8F=20=EB=A1=9C=EC=A7=81=20=EA=B5=AC=ED=98=84?= =?UTF-8?q?=20-=20=EC=9D=BC=EC=A0=95=20=EC=83=81=EC=84=B8=20=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=ED=99=94=EB=A9=B4=20=EB=B0=8F=20=EB=A1=9C=EC=A7=81?= =?UTF-8?q?=20=EA=B5=AC=ED=98=84=20-=20=EC=B0=B8=EC=97=AC=EC=9E=90=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=ED=99=94=EB=A9=B4=20=EA=B5=AC=ED=98=84=20?= =?UTF-8?q?=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.json | 3 +- package-lock.json | 67 +++++ package.json | 1 + src/components/ui/mention.tsx | 91 +++++++ src/components/ui/textarea.tsx | 2 +- src/data/form/createSchedule.schema.ts | 3 + src/data/form/login.schema.ts | 2 +- src/data/form/signup.schema.ts | 8 +- src/hooks/use-time.ts | 21 ++ .../popover/schedule/DatePickPopover.tsx | 12 +- .../popover/schedule/ParticipantPopover.tsx | 101 +++++++ .../popover/schedule/SchedulePopover.tsx | 231 +--------------- .../popover/schedule/TimePickPopover.tsx | 162 +++++++++++- .../popover/schedule/content/ContentProps.ts | 13 + .../content/ScheduleCreateContent.tsx | 246 ++++++++++++++++++ .../content/ScheduleDetailContent.tsx | 0 .../schedule/content/ScheduleListContent.tsx | 0 .../content/ScheduleUpdateContent.tsx | 0 18 files changed, 722 insertions(+), 241 deletions(-) create mode 100644 src/components/ui/mention.tsx create mode 100644 src/hooks/use-time.ts create mode 100644 src/ui/component/popover/schedule/ParticipantPopover.tsx create mode 100644 src/ui/component/popover/schedule/content/ContentProps.ts create mode 100644 src/ui/component/popover/schedule/content/ScheduleCreateContent.tsx create mode 100644 src/ui/component/popover/schedule/content/ScheduleDetailContent.tsx create mode 100644 src/ui/component/popover/schedule/content/ScheduleListContent.tsx create mode 100644 src/ui/component/popover/schedule/content/ScheduleUpdateContent.tsx diff --git a/components.json b/components.json index f892854..ac1fc34 100644 --- a/components.json +++ b/components.json @@ -19,6 +19,7 @@ "hooks": "@/hooks" }, "registries": { - "@reui": "https://reui.io/r/{name}.json" + "@reui": "https://reui.io/r/{name}.json", + "@diceui": "https://diceui.com/r/{name}.json" } } diff --git a/package-lock.json b/package-lock.json index 0d54129..6704809 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "scheduler", "version": "0.0.0", "dependencies": { + "@diceui/mention": "^0.8.0", "@hookform/resolvers": "^5.2.2", "@radix-ui/react-accordion": "^1.2.12", "@radix-ui/react-alert-dialog": "^1.1.15", @@ -376,6 +377,50 @@ "integrity": "sha512-P5LUNhtbj6YfI3iJjw5EL9eUAG6OitD0W3fWQcpQjDRc/QIsL0tRNuO1PcDvPccWL1fSTXXdE1ds+l95DV/OFA==", "license": "MIT" }, + "node_modules/@diceui/mention": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@diceui/mention/-/mention-0.8.0.tgz", + "integrity": "sha512-BHTYLG4qJA+9TJ/n5otlIHoJuLz5v13xAayYsRL7lnCnp4ik37uYrLpA+25y+uQmJ5i1W3kv2MfD2ZasvDzDDw==", + "license": "MIT", + "dependencies": { + "@diceui/shared": "0.12.0", + "@floating-ui/react": "^0.27.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@diceui/shared": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@diceui/shared/-/shared-0.12.0.tgz", + "integrity": "sha512-aJ+gxHTleFD8b9DgXOb7G0sHymW8nMK4C3KXDMca4+PPl1NsfRG/Lnb2dN8vq44XOb/W7Wjn3gmgakXAOzgrJA==", + "peerDependencies": { + "@floating-ui/react": "^0.27.4", + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.11", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.11.tgz", @@ -968,6 +1013,22 @@ "@floating-ui/utils": "^0.2.10" } }, + "node_modules/@floating-ui/react": { + "version": "0.27.16", + "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.27.16.tgz", + "integrity": "sha512-9O8N4SeG2z++TSM8QA/KTeKFBVCNEz/AGS7gWPJf6KFRzmRWixFRnCnkPHRDwSVZW6QPDO6uT0P2SpWNKCc9/g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@floating-ui/react-dom": "^2.1.6", + "@floating-ui/utils": "^0.2.10", + "tabbable": "^6.0.0" + }, + "peerDependencies": { + "react": ">=17.0.0", + "react-dom": ">=17.0.0" + } + }, "node_modules/@floating-ui/react-dom": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.6.tgz", @@ -6375,6 +6436,12 @@ "node": ">=8" } }, + "node_modules/tabbable": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.3.0.tgz", + "integrity": "sha512-EIHvdY5bPLuWForiR/AN2Bxngzpuwn1is4asboytXtpTgsArc+WmSJKVLlhdh71u7jFcryDqB2A8lQvj78MkyQ==", + "license": "MIT" + }, "node_modules/tailwind-merge": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.4.0.tgz", diff --git a/package.json b/package.json index 0254749..9b90fab 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "preview": "vite preview" }, "dependencies": { + "@diceui/mention": "^0.8.0", "@hookform/resolvers": "^5.2.2", "@radix-ui/react-accordion": "^1.2.12", "@radix-ui/react-alert-dialog": "^1.1.15", diff --git a/src/components/ui/mention.tsx b/src/components/ui/mention.tsx new file mode 100644 index 0000000..fefdf0d --- /dev/null +++ b/src/components/ui/mention.tsx @@ -0,0 +1,91 @@ +import * as MentionPrimitive from "@diceui/mention"; +import type * as React from "react"; + +import { cn } from "@/lib/utils"; + +function Mention({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function MentionLabel({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function MentionInput({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function MentionContent({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + + {children} + + + ); +} + +function MentionItem({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + {children} + + ); +} + +export { Mention, MentionContent, MentionInput, MentionItem, MentionLabel }; diff --git a/src/components/ui/textarea.tsx b/src/components/ui/textarea.tsx index 7f21b5e..798e032 100644 --- a/src/components/ui/textarea.tsx +++ b/src/components/ui/textarea.tsx @@ -7,7 +7,7 @@ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {