diff --git a/package-lock.json b/package-lock.json index e9f84a0e..70df68cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "@hookform/resolvers": "^3.9.0", "@tailwindcss/typography": "^0.5.15", "@tanstack/react-query": "^5.51.23", + "@tippyjs/react": "^4.2.6", "apexcharts": "^4.1.0", "axios": "^1.7.7", "date-fns": "^4.1.0", @@ -34,6 +35,7 @@ "react-icons": "^5.3.0", "react-router-dom": "^6.26.1", "swiper": "^11.1.14", + "tippy.js": "^6.3.7", "zod": "^3.23.8" }, "devDependencies": { @@ -1966,6 +1968,15 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@remix-run/router": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.2.tgz", @@ -2580,6 +2591,18 @@ "url": "https://github.com/sponsors/tannerlinsley" } }, + "node_modules/@tippyjs/react": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@tippyjs/react/-/react-4.2.6.tgz", + "integrity": "sha512-91RicDR+H7oDSyPycI13q3b7o4O60wa2oRbjlz2fyRLmHImc4vyDwuUP8NtZaN0VARJY5hybvDYrFzhY9+Lbyw==", + "dependencies": { + "tippy.js": "^6.3.1" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/@trivago/prettier-plugin-sort-imports": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", @@ -8805,6 +8828,14 @@ "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==", "dev": true }, + "node_modules/tippy.js": { + "version": "6.3.7", + "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.7.tgz", + "integrity": "sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==", + "dependencies": { + "@popperjs/core": "^2.9.0" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", diff --git a/package.json b/package.json index 40e578bb..3ff91c6c 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "@hookform/resolvers": "^3.9.0", "@tailwindcss/typography": "^0.5.15", "@tanstack/react-query": "^5.51.23", + "@tippyjs/react": "^4.2.6", "apexcharts": "^4.1.0", "axios": "^1.7.7", "date-fns": "^4.1.0", @@ -47,6 +48,7 @@ "react-icons": "^5.3.0", "react-router-dom": "^6.26.1", "swiper": "^11.1.14", + "tippy.js": "^6.3.7", "zod": "^3.23.8" }, "devDependencies": { diff --git a/src/components/calendar/Calendar.tsx b/src/components/calendar/Calendar.tsx index 5b5b15e8..6d6a4232 100644 --- a/src/components/calendar/Calendar.tsx +++ b/src/components/calendar/Calendar.tsx @@ -10,6 +10,8 @@ import koLocale from '@fullcalendar/core/locales/ko'; import dayGridPlugin from '@fullcalendar/daygrid'; import FullCalendar from '@fullcalendar/react'; import rrulePlugin from '@fullcalendar/rrule'; +import tippy from 'tippy.js'; +import 'tippy.js/dist/tippy.css'; import SmallCalendarBottomEvent from '@/components/calendar/SmallCalendarBottomEvent'; import LoopLoading from '@/components/common/LoopLoading'; @@ -89,6 +91,12 @@ export default function Calendar({ dayCellContent={({ dayNumberText }) => `${dayNumberText.slice(0, -1)}` } + eventMouseEnter={({ el, event }) => { + tippy(el, { + content: event.title, + placement: 'top', + }); + }} eventClick={event => { event.jsEvent.preventDefault(); navigate(event.event.url); @@ -119,14 +127,16 @@ export default function Calendar({ ((sideViewEvents as FullCalendarEvent[]).length !== 0 ? (