├── .eslintrc.json ├── .prettierignore ├── postcss.config.mjs ├── lib └── utils.ts ├── components ├── theme-provider.tsx ├── event-calendar │ ├── types.ts │ ├── constants.ts │ ├── index.ts │ ├── droppable-cell.tsx │ ├── hooks │ │ ├── use-current-time-indicator.ts │ │ └── use-event-visibility.ts │ ├── agenda-view.tsx │ ├── draggable-event.tsx │ ├── events-popup.tsx │ ├── utils.ts │ ├── event-item.tsx │ ├── month-view.tsx │ ├── day-view.tsx │ ├── calendar-dnd-context.tsx │ ├── event-calendar.tsx │ ├── week-view.tsx │ └── event-dialog.tsx ├── ui │ ├── label.tsx │ ├── sonner.tsx │ ├── textarea.tsx │ ├── input.tsx │ ├── radio-group.tsx │ ├── popover.tsx │ ├── button.tsx │ ├── checkbox.tsx │ ├── calendar.tsx │ ├── dialog.tsx │ ├── select.tsx │ └── dropdown-menu.tsx └── theme-toggle.tsx ├── components.json ├── public ├── placeholder-logo.png ├── placeholder.jpg ├── placeholder-user.jpg ├── placeholder-logo.svg └── placeholder.svg ├── hooks └── use-mobile.tsx ├── tsconfig.json ├── .gitignore ├── app ├── layout.tsx ├── page.tsx └── globals.css ├── next.config.mjs ├── LICENSE.md ├── package.json └── README.md /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "next/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | pnpm-lock.yaml 3 | 4 | # Build output 5 | .next 6 | build 7 | dist 8 | 9 | # Cache 10 | .cache 11 | -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | "@tailwindcss/postcss": {}, 5 | }, 6 | } 7 | 8 | export default config 9 | -------------------------------------------------------------------------------- /lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /components/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { 4 | ThemeProvider as NextThemesProvider, 5 | type ThemeProviderProps, 6 | } from "next-themes" 7 | 8 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 9 | return {children} 10 | } 11 | -------------------------------------------------------------------------------- /components/event-calendar/types.ts: -------------------------------------------------------------------------------- 1 | export type CalendarView = "month" | "week" | "day" | "agenda" 2 | 3 | export interface CalendarEvent { 4 | id: string 5 | title: string 6 | description?: string 7 | start: Date 8 | end: Date 9 | allDay?: boolean 10 | color?: EventColor 11 | location?: string 12 | } 13 | 14 | export type EventColor = 15 | | "sky" 16 | | "amber" 17 | | "violet" 18 | | "rose" 19 | | "emerald" 20 | | "orange" 21 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "app/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } 22 | -------------------------------------------------------------------------------- /public/placeholder-logo.png: -------------------------------------------------------------------------------- 1 | �PNG 2 |  3 | IHDR�M��0PLTEZ? tRNS� �@��`P0p���w �IDATx��ؽJ3Q�7'��%�|?� ���E�l�7���(X�D������w`����[�*t����D���mD�}��4; ;�DDDDDDDDDDDD_�_İ��!�y�`�_�:�� ;Ļ�'|� ��;.I"����3*5����J�1�� �T��FI�� ��=��3܃�2~�b���0��U9\��]�4�#w0��Gt\&1 �?21,���o!e�m��ĻR�����5�� ؽAJ�9��R)�5�0.FFASaǃ�T�#|�K���I�������1� 4 | M������N"��$����G�V�T� ��T^^��A�$S��h(�������G]co"J׸^^�'�=���%� �W�6Ы�W��w�a�߇*�^^�YG�c���`'F����������������^5_�,�S�%IEND�B`� -------------------------------------------------------------------------------- /components/event-calendar/constants.ts: -------------------------------------------------------------------------------- 1 | export const EventHeight = 24 2 | 3 | // Vertical gap between events in pixels - controls spacing in month view 4 | export const EventGap = 4 5 | 6 | // Height of hour cells in week and day views - controls the scale of time display 7 | export const WeekCellsHeight = 72 8 | 9 | // Number of days to show in the agenda view 10 | export const AgendaDaysToShow = 30 11 | 12 | // Start and end hours for the week and day views 13 | export const StartHour = 0 14 | export const EndHour = 24 15 | 16 | // Default start and end times 17 | export const DefaultStartHour = 9 // 9 AM 18 | export const DefaultEndHour = 10 // 10 AM 19 | -------------------------------------------------------------------------------- /hooks/use-mobile.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | const MOBILE_BREAKPOINT = 768 4 | 5 | export function useIsMobile() { 6 | const [isMobile, setIsMobile] = React.useState(undefined) 7 | 8 | React.useEffect(() => { 9 | const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) 10 | const onChange = () => { 11 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 12 | } 13 | mql.addEventListener("change", onChange) 14 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 15 | return () => mql.removeEventListener("change", onChange) 16 | }, []) 17 | 18 | return !!isMobile 19 | } 20 | -------------------------------------------------------------------------------- /components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as LabelPrimitive from "@radix-ui/react-label" 5 | 6 | import { cn } from "@/lib/utils" 7 | 8 | function Label({ 9 | className, 10 | ...props 11 | }: React.ComponentProps) { 12 | return ( 13 | 21 | ) 22 | } 23 | 24 | export { Label } 25 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "target": "ES6", 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /components/ui/sonner.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { useTheme } from "next-themes" 4 | import { Toaster as Sonner, ToasterProps } from "sonner" 5 | 6 | const Toaster = ({ ...props }: ToasterProps) => { 7 | const { theme = "system" } = useTheme() 8 | 9 | return ( 10 | 27 | ) 28 | } 29 | 30 | export { Toaster } 31 | -------------------------------------------------------------------------------- /components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { 6 | return ( 7 |