@j3m-quantum/ui 0.9.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
25
25
  import * as ProgressPrimitive from '@radix-ui/react-progress';
26
26
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
27
27
  import { ToasterProps } from 'sonner';
28
- import { LucideProps } from 'lucide-react';
28
+ import { LucideProps, LucideIcon } from 'lucide-react';
29
29
  import { Command as Command$1 } from 'cmdk';
30
30
  import * as DialogPrimitive from '@radix-ui/react-dialog';
31
31
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -38,6 +38,7 @@ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
38
38
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
39
39
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
40
40
  import * as ResizablePrimitive from 'react-resizable-panels';
41
+ export { areIntervalsOverlapping, format, getDay, isSameDay, isSameMonth, isToday, parseISO } from 'date-fns';
41
42
 
42
43
  declare function useIsMobile(): boolean;
43
44
 
@@ -223,6 +224,27 @@ declare function Avatar({ className, ...props }: React$1.ComponentProps<typeof A
223
224
  declare function AvatarImage({ className, ...props }: React$1.ComponentProps<typeof AvatarPrimitive.Image>): react_jsx_runtime.JSX.Element;
224
225
  declare function AvatarFallback({ className, ...props }: React$1.ComponentProps<typeof AvatarPrimitive.Fallback>): react_jsx_runtime.JSX.Element;
225
226
 
227
+ /**
228
+ * User Avatars Dropdown Component
229
+ *
230
+ * A reusable component that displays stacked user avatars with a dropdown
231
+ * for selection. Shows first N avatars with "+X" overflow indicator.
232
+ */
233
+ interface UserAvatarItem {
234
+ id: string;
235
+ name: string;
236
+ image?: string;
237
+ }
238
+ interface UserAvatarsDropdownProps {
239
+ users: UserAvatarItem[];
240
+ selectedUserId: string | null;
241
+ onSelect: (userId: string | null) => void;
242
+ maxVisible?: number;
243
+ label?: string;
244
+ className?: string;
245
+ }
246
+ declare function UserAvatarsDropdown({ users, selectedUserId, onSelect, maxVisible, label, className, }: UserAvatarsDropdownProps): react_jsx_runtime.JSX.Element;
247
+
226
248
  declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
227
249
 
228
250
  declare function Accordion({ ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Root>): react_jsx_runtime.JSX.Element;
@@ -353,7 +375,7 @@ declare function Tooltip({ ...props }: React$1.ComponentProps<typeof TooltipPrim
353
375
  declare function TooltipTrigger({ ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
354
376
  declare function TooltipContent({ className, sideOffset, children, ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime.JSX.Element;
355
377
 
356
- declare const Toaster: ({ ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
378
+ declare const Toaster: ({ theme: themeProp, ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
357
379
 
358
380
  declare function Spinner({ className, ...props }: LucideProps): react_jsx_runtime.JSX.Element;
359
381
 
@@ -406,6 +428,24 @@ declare function CommandSeparator({ className, ...props }: React$1.ComponentProp
406
428
  declare function CommandItem({ className, ...props }: React$1.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
407
429
  declare function CommandShortcut({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
408
430
 
431
+ interface SearchTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
432
+ /** Placeholder text shown in the search button */
433
+ placeholder?: string;
434
+ /** Whether to show the keyboard shortcut hint */
435
+ showShortcut?: boolean;
436
+ /** Custom keyboard shortcut to display (defaults to ⌘K) */
437
+ shortcutKey?: string;
438
+ /** Whether to use the command modifier symbol (⌘ on Mac, Ctrl on others) */
439
+ shortcutModifier?: string;
440
+ }
441
+ declare const SearchTrigger: React$1.ForwardRefExoticComponent<SearchTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
442
+ /**
443
+ * A hook that sets up keyboard shortcut handling for the search trigger.
444
+ * @param onOpen - Callback fired when the shortcut is pressed
445
+ * @param key - The key to listen for (default: "k")
446
+ */
447
+ declare function useSearchShortcut(onOpen: () => void, key?: string): void;
448
+
409
449
  declare function DropdownMenu({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
410
450
  declare function DropdownMenuPortal({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
411
451
  declare function DropdownMenuTrigger({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
@@ -615,4 +655,615 @@ declare const SectionDescription: React$1.ForwardRefExoticComponent<React$1.HTML
615
655
  declare const SectionContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
616
656
  declare const SectionFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
617
657
 
618
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PlayerCanvas, PlayerCanvasActionButton, PlayerCanvasControls, PlayerCanvasDivider, PlayerCanvasInfo, PlayerCanvasLabel, PlayerCanvasPlayButton, PlayerCanvasProgress, PlayerCanvasSkipButton, PlayerCanvasTitle, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Section, SectionContent, SectionDescription, SectionFooter, SectionHeader, type SectionProps, SectionTitle, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToolBarCanvas, ToolBarCanvasButton, ToolBarCanvasDivider, ToolBarCanvasGroup, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonGroupVariants, buttonVariants, cardVariants, navigationMenuTriggerStyle, playerCanvasPlayButtonVariants, playerCanvasSkipButtonVariants, sectionVariants, toggleVariants, toolBarCanvasButtonVariants, useFormField, useIsMobile, useSidebar };
658
+ interface BreadcrumbItemType {
659
+ label: string;
660
+ href?: string;
661
+ }
662
+ interface SiteHeaderProps {
663
+ /** Slot for sidebar trigger - use <SidebarTrigger /> from @j3m-quantum/ui */
664
+ trigger?: React$1.ReactNode;
665
+ breadcrumbs?: BreadcrumbItemType[];
666
+ showSearch?: boolean;
667
+ className?: string;
668
+ children?: React$1.ReactNode;
669
+ }
670
+ declare function SiteHeader({ trigger, breadcrumbs, showSearch, className, children }: SiteHeaderProps): react_jsx_runtime.JSX.Element;
671
+
672
+ interface NavItem {
673
+ title: string;
674
+ url: string;
675
+ icon?: LucideIcon;
676
+ isActive?: boolean;
677
+ items?: {
678
+ title: string;
679
+ url: string;
680
+ }[];
681
+ }
682
+ interface NavMainProps {
683
+ items: NavItem[];
684
+ label?: string;
685
+ }
686
+ declare function NavMain({ items, label }: NavMainProps): react_jsx_runtime.JSX.Element;
687
+
688
+ interface NavProject {
689
+ name: string;
690
+ url: string;
691
+ icon: LucideIcon;
692
+ }
693
+ interface NavProjectsProps {
694
+ projects: NavProject[];
695
+ label?: string;
696
+ }
697
+ declare function NavProjects({ projects, label }: NavProjectsProps): react_jsx_runtime.JSX.Element;
698
+
699
+ interface NavSecondaryItem {
700
+ title: string;
701
+ url: string;
702
+ icon: LucideIcon;
703
+ }
704
+ interface NavSecondaryProps extends React$1.ComponentProps<typeof SidebarGroup> {
705
+ items: NavSecondaryItem[];
706
+ }
707
+ declare function NavSecondary({ items, ...props }: NavSecondaryProps): react_jsx_runtime.JSX.Element;
708
+
709
+ interface NavUserProps {
710
+ user: {
711
+ name: string;
712
+ email: string;
713
+ avatar: string;
714
+ };
715
+ }
716
+ declare function NavUser({ user }: NavUserProps): react_jsx_runtime.JSX.Element;
717
+
718
+ declare function SearchForm({ ...props }: React$1.ComponentProps<"form">): react_jsx_runtime.JSX.Element;
719
+
720
+ /**
721
+ * Event Calendar Types
722
+ * Based on big-calendar by Leonardo Ramos (MIT License)
723
+ * https://github.com/lramos33/big-calendar
724
+ *
725
+ * Adapted for J3M UI with Tailwind v4 and design token integration.
726
+ */
727
+ type TEventColor = "blue" | "green" | "red" | "yellow" | "purple" | "orange";
728
+ type TBadgeVariant = "dot" | "colored" | "mixed";
729
+ type TCalendarView = "month" | "week" | "day" | "year" | "agenda";
730
+ interface IUser {
731
+ id: string;
732
+ name: string;
733
+ picturePath?: string;
734
+ }
735
+ interface IEvent {
736
+ id: string;
737
+ title: string;
738
+ description?: string;
739
+ startDate: string;
740
+ endDate: string;
741
+ color: TEventColor;
742
+ user: IUser;
743
+ }
744
+ interface ICalendarState {
745
+ selectedDate: Date;
746
+ selectedUserId: string | null;
747
+ events: IEvent[];
748
+ users: IUser[];
749
+ badgeVariant: TBadgeVariant;
750
+ view: TCalendarView;
751
+ }
752
+ interface ICalendarActions {
753
+ setSelectedDate: (date: Date) => void;
754
+ setSelectedUserId: (userId: string | null) => void;
755
+ setEvents: (events: IEvent[]) => void;
756
+ addEvent: (event: IEvent) => void;
757
+ updateEvent: (event: IEvent) => void;
758
+ deleteEvent: (eventId: string) => void;
759
+ setBadgeVariant: (variant: TBadgeVariant) => void;
760
+ setView: (view: TCalendarView) => void;
761
+ goToToday: () => void;
762
+ goToPrevious: () => void;
763
+ goToNext: () => void;
764
+ }
765
+ interface ICalendarContext extends ICalendarState, ICalendarActions {
766
+ }
767
+ interface IEventDialogProps {
768
+ mode: "add" | "edit";
769
+ event?: IEvent;
770
+ defaultDate?: Date;
771
+ onSubmit: (event: Omit<IEvent, "id"> | IEvent) => void;
772
+ onClose: () => void;
773
+ }
774
+ interface IViewProps {
775
+ events: IEvent[];
776
+ selectedDate: Date;
777
+ onEventClick?: (event: IEvent) => void;
778
+ onDateClick?: (date: Date) => void;
779
+ onEventDrop?: (event: IEvent, newStart: Date, newEnd: Date) => void;
780
+ }
781
+ interface ICalendarHeaderProps {
782
+ showViewSwitcher?: boolean;
783
+ showUserFilter?: boolean;
784
+ showBadgeVariant?: boolean;
785
+ showToday?: boolean;
786
+ }
787
+ interface IDayCellProps {
788
+ date: Date;
789
+ events: IEvent[];
790
+ isCurrentMonth: boolean;
791
+ isToday: boolean;
792
+ isSelected: boolean;
793
+ onDateClick?: (date: Date) => void;
794
+ onEventClick?: (event: IEvent) => void;
795
+ onEventDrop?: (event: IEvent, newDate: Date) => void;
796
+ }
797
+ interface ITimeSlotProps {
798
+ date: Date;
799
+ hour: number;
800
+ events: IEvent[];
801
+ onTimeClick?: (date: Date, hour: number) => void;
802
+ onEventClick?: (event: IEvent) => void;
803
+ onEventDrop?: (event: IEvent, newStart: Date) => void;
804
+ }
805
+ interface IEventBadgeProps {
806
+ event: IEvent;
807
+ variant: TBadgeVariant;
808
+ onClick?: (event: IEvent) => void;
809
+ isDragging?: boolean;
810
+ }
811
+ interface IDragContext {
812
+ draggedEvent: IEvent | null;
813
+ setDraggedEvent: (event: IEvent | null) => void;
814
+ isDragging: boolean;
815
+ }
816
+ type TWorkingHours = {
817
+ [key: number]: {
818
+ from: number;
819
+ to: number;
820
+ };
821
+ };
822
+ type TVisibleHours = {
823
+ from: number;
824
+ to: number;
825
+ };
826
+ interface IWorkingHours {
827
+ start: number;
828
+ end: number;
829
+ }
830
+ declare const DEFAULT_WORKING_HOURS: TWorkingHours;
831
+ declare const DEFAULT_VISIBLE_HOURS: TVisibleHours;
832
+ interface ICalendarCell {
833
+ day: number;
834
+ currentMonth: boolean;
835
+ date: Date;
836
+ }
837
+ interface ICalendarConfig {
838
+ workingHours?: TWorkingHours;
839
+ visibleHours?: TVisibleHours;
840
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
841
+ locale?: string;
842
+ timeFormat?: "12h" | "24h";
843
+ }
844
+ interface IEventPosition {
845
+ top: number;
846
+ left: number;
847
+ width: number;
848
+ height: number;
849
+ }
850
+ declare const EVENT_COLORS: Record<TEventColor, {
851
+ bg: string;
852
+ text: string;
853
+ border: string;
854
+ }>;
855
+ declare const VIEW_LABELS: Record<TCalendarView, string>;
856
+ declare const BADGE_VARIANT_LABELS: Record<TBadgeVariant, string>;
857
+
858
+ interface IExtendedCalendarContext {
859
+ selectedDate: Date;
860
+ selectedUserId: string | null;
861
+ events: IEvent[];
862
+ users: IUser[];
863
+ badgeVariant: TBadgeVariant;
864
+ view: TCalendarView;
865
+ workingHours: TWorkingHours;
866
+ visibleHours: TVisibleHours;
867
+ setSelectedDate: (date: Date) => void;
868
+ setSelectedUserId: (userId: string | null) => void;
869
+ setEvents: (events: IEvent[]) => void;
870
+ addEvent: (event: IEvent) => void;
871
+ updateEvent: (event: IEvent) => void;
872
+ deleteEvent: (eventId: string) => void;
873
+ setBadgeVariant: (variant: TBadgeVariant) => void;
874
+ setView: (view: TCalendarView) => void;
875
+ setWorkingHours: (hours: TWorkingHours) => void;
876
+ setVisibleHours: (hours: TVisibleHours) => void;
877
+ goToToday: () => void;
878
+ goToPrevious: () => void;
879
+ goToNext: () => void;
880
+ }
881
+ declare const CalendarContext: React$1.Context<IExtendedCalendarContext | null>;
882
+ interface EventCalendarProviderProps {
883
+ children: React$1.ReactNode;
884
+ events?: IEvent[];
885
+ users?: IUser[];
886
+ defaultDate?: Date;
887
+ defaultView?: TCalendarView;
888
+ defaultBadgeVariant?: TBadgeVariant;
889
+ defaultUserId?: string | null;
890
+ defaultWorkingHours?: TWorkingHours;
891
+ defaultVisibleHours?: TVisibleHours;
892
+ onEventAdd?: (event: IEvent) => void;
893
+ onEventUpdate?: (event: IEvent) => void;
894
+ onEventDelete?: (eventId: string) => void;
895
+ }
896
+ declare function EventCalendarProvider({ children, events: initialEvents, users: initialUsers, defaultDate, defaultView, defaultBadgeVariant, defaultUserId, defaultWorkingHours, defaultVisibleHours, onEventAdd, onEventUpdate, onEventDelete, }: EventCalendarProviderProps): react_jsx_runtime.JSX.Element;
897
+ declare function useEventCalendar(): IExtendedCalendarContext;
898
+ declare function useFilteredEvents(): IEvent[];
899
+ declare function useEventsInRange(startDate: Date, endDate: Date): IEvent[];
900
+
901
+ /**
902
+ * Get range text for header navigation
903
+ */
904
+ declare function rangeText(view: TCalendarView, date: Date): string;
905
+ /**
906
+ * Navigate date based on view
907
+ */
908
+ declare function navigateDate(date: Date, view: TCalendarView, direction: "previous" | "next"): Date;
909
+ /**
910
+ * Get events count for a date based on view
911
+ */
912
+ declare function getEventsCount(events: IEvent[], date: Date, view: TCalendarView): number;
913
+ /**
914
+ * Get current events (happening now)
915
+ */
916
+ declare function getCurrentEvents(events: IEvent[]): IEvent[];
917
+ /**
918
+ * Group events by time slots to handle overlapping
919
+ */
920
+ declare function groupEvents(dayEvents: IEvent[]): IEvent[][];
921
+ /**
922
+ * Get event block style for week/day view
923
+ * Returns pixel-based positioning for 96px/hour grid
924
+ */
925
+ declare function getEventBlockStyle(event: IEvent, day: Date, groupIndex: number, groupSize: number, visibleHoursRange?: {
926
+ from: number;
927
+ to: number;
928
+ }, hourHeight?: number): {
929
+ top: string;
930
+ height: string;
931
+ width: string;
932
+ left: string;
933
+ };
934
+ /**
935
+ * Check if hour is working hour (per-day configuration)
936
+ */
937
+ declare function isWorkingHour(day: Date, hour: number, workingHours: TWorkingHours): boolean;
938
+ /**
939
+ * Get visible hours with adjustment for events
940
+ */
941
+ declare function getVisibleHours(visibleHours: TVisibleHours, singleDayEvents: IEvent[]): {
942
+ hours: number[];
943
+ earliestEventHour: number;
944
+ latestEventHour: number;
945
+ };
946
+ /**
947
+ * Get calendar cells for month view
948
+ */
949
+ declare function getCalendarCells(selectedDate: Date): ICalendarCell[];
950
+ /**
951
+ * Calculate event positions for month view (handles multi-day events)
952
+ */
953
+ declare function calculateMonthEventPositions(multiDayEvents: IEvent[], singleDayEvents: IEvent[], selectedDate: Date): {
954
+ [key: string]: number;
955
+ };
956
+ /**
957
+ * Get events for a specific month cell with positions
958
+ */
959
+ declare function getMonthCellEvents(date: Date, events: IEvent[], eventPositions: Record<string, number>): {
960
+ position: number;
961
+ isMultiDay: boolean;
962
+ id: string;
963
+ title: string;
964
+ description?: string;
965
+ startDate: string;
966
+ endDate: string;
967
+ color: TEventColor;
968
+ user: IUser;
969
+ }[];
970
+ /**
971
+ * Get the days of the month grid (including days from prev/next months)
972
+ */
973
+ declare function getMonthDays(date: Date, weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6): Date[];
974
+ /**
975
+ * Get the days of a week
976
+ */
977
+ declare function getWeekDays(date: Date, weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6): Date[];
978
+ /**
979
+ * Get hours of a day
980
+ */
981
+ declare function getDayHours(date: Date, start?: number, end?: number): Date[];
982
+ /**
983
+ * Get months of a year
984
+ */
985
+ declare function getYearMonths(date: Date): Date[];
986
+ /**
987
+ * Filter events for a specific date
988
+ */
989
+ declare function getEventsForDate(events: IEvent[], date: Date): IEvent[];
990
+ /**
991
+ * Filter events for a date range
992
+ */
993
+ declare function getEventsInRange(events: IEvent[], start: Date, end: Date): IEvent[];
994
+ /**
995
+ * Split events into single-day and multi-day
996
+ */
997
+ declare function splitEventsByDuration(events: IEvent[]): {
998
+ singleDayEvents: IEvent[];
999
+ multiDayEvents: IEvent[];
1000
+ };
1001
+ /**
1002
+ * Check if an event spans multiple days
1003
+ */
1004
+ declare function isMultiDayEvent(event: IEvent): boolean;
1005
+ /**
1006
+ * Get the number of days an event spans
1007
+ */
1008
+ declare function getEventDuration(event: IEvent): number;
1009
+ /**
1010
+ * Get the duration of an event in minutes
1011
+ */
1012
+ declare function getEventDurationMinutes(event: IEvent): number;
1013
+ /**
1014
+ * Sort events by start date, then by duration (longer first)
1015
+ */
1016
+ declare function sortEvents(events: IEvent[]): IEvent[];
1017
+ /**
1018
+ * Get the top position percentage for an event in time view
1019
+ */
1020
+ declare function getTimePosition(event: IEvent, visibleHoursRange?: {
1021
+ from: number;
1022
+ to: number;
1023
+ }): number;
1024
+ /**
1025
+ * Get the height percentage for an event in time view
1026
+ */
1027
+ declare function getTimeHeight(event: IEvent, visibleHoursRange?: {
1028
+ from: number;
1029
+ to: number;
1030
+ }): number;
1031
+ /**
1032
+ * Format time based on 12h or 24h format
1033
+ */
1034
+ declare function formatTime(date: Date, use24h?: boolean): string;
1035
+ /**
1036
+ * Get the week day names
1037
+ */
1038
+ declare function getWeekDayNames(weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6, shortNames?: boolean): string[];
1039
+ /**
1040
+ * Get display label for calendar header
1041
+ */
1042
+ declare function getHeaderLabel(date: Date, view: string): string;
1043
+ /**
1044
+ * Get the date range for the current view
1045
+ */
1046
+ declare function getViewDateRange(date: Date, view: string): {
1047
+ start: Date;
1048
+ end: Date;
1049
+ };
1050
+ /**
1051
+ * Format date range for display
1052
+ */
1053
+ declare function formatDateRange(start: Date, end: Date): string;
1054
+
1055
+ /**
1056
+ * Create a new event with default values
1057
+ */
1058
+ declare function createDefaultEvent(startDate: Date, duration?: number): Omit<IEvent, "id">;
1059
+ /**
1060
+ * Generate a unique ID for an event
1061
+ */
1062
+ declare function generateEventId(): string;
1063
+ /**
1064
+ * Calculate new event dates after drag and drop
1065
+ */
1066
+ declare function calculateDropDates(event: IEvent, newStartDate: Date): {
1067
+ startDate: string;
1068
+ endDate: string;
1069
+ };
1070
+ /**
1071
+ * Snap a date to the nearest time interval
1072
+ */
1073
+ declare function snapToInterval(date: Date, intervalMinutes?: number): Date;
1074
+
1075
+ interface EventBadgeProps extends Omit<IEventBadgeProps, "onClick"> {
1076
+ className?: string;
1077
+ showTime?: boolean;
1078
+ compact?: boolean;
1079
+ onClick?: (event: IEvent, e: React$1.MouseEvent) => void;
1080
+ }
1081
+ declare function EventBadge({ event, variant, className, showTime, compact, isDragging, onClick, }: EventBadgeProps): react_jsx_runtime.JSX.Element;
1082
+ interface MoreEventsProps {
1083
+ count: number;
1084
+ onClick?: () => void;
1085
+ className?: string;
1086
+ }
1087
+ declare function MoreEvents({ count, onClick, className }: MoreEventsProps): react_jsx_runtime.JSX.Element;
1088
+ interface TimeIndicatorProps {
1089
+ className?: string;
1090
+ }
1091
+ declare function TimeIndicator({ className }: TimeIndicatorProps): react_jsx_runtime.JSX.Element;
1092
+
1093
+ /**
1094
+ * Date Badge Component
1095
+ * Based on big-calendar by Leonardo Ramos (MIT License)
1096
+ * https://github.com/lramos33/big-calendar
1097
+ *
1098
+ * Adapted for J3M UI with Tailwind v4 and design token integration.
1099
+ */
1100
+ interface DateBadgeProps {
1101
+ date: Date;
1102
+ className?: string;
1103
+ }
1104
+ declare function DateBadge({ date, className }: DateBadgeProps): react_jsx_runtime.JSX.Element;
1105
+
1106
+ interface MonthViewProps extends Partial<IViewProps> {
1107
+ className?: string;
1108
+ maxEventsPerDay?: number;
1109
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
1110
+ onMoreClick?: (date: Date, events: IEvent[]) => void;
1111
+ }
1112
+ declare function MonthView({ className, maxEventsPerDay, weekStartsOn, onEventClick, onDateClick, onMoreClick, }: MonthViewProps): react_jsx_runtime.JSX.Element;
1113
+
1114
+ interface WeekViewProps extends Partial<IViewProps> {
1115
+ className?: string;
1116
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
1117
+ onTimeClick?: (date: Date, hour: number, minute: number) => void;
1118
+ }
1119
+ declare function WeekView({ className, weekStartsOn, onEventClick, onDateClick, onTimeClick, }: WeekViewProps): react_jsx_runtime.JSX.Element;
1120
+
1121
+ interface DayViewProps extends Partial<IViewProps> {
1122
+ className?: string;
1123
+ showSidebar?: boolean;
1124
+ onTimeClick?: (date: Date, hour: number, minute: number) => void;
1125
+ }
1126
+ declare function DayView({ className, showSidebar, onEventClick, onTimeClick, }: DayViewProps): react_jsx_runtime.JSX.Element;
1127
+
1128
+ interface YearViewProps extends Partial<IViewProps> {
1129
+ className?: string;
1130
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
1131
+ onMonthClick?: (date: Date) => void;
1132
+ }
1133
+ declare function YearView({ className, weekStartsOn, onMonthClick, onDateClick, }: YearViewProps): react_jsx_runtime.JSX.Element;
1134
+
1135
+ interface AgendaViewProps extends Partial<IViewProps> {
1136
+ className?: string;
1137
+ emptyMessage?: string;
1138
+ }
1139
+ declare function AgendaView({ className, emptyMessage, onEventClick, onDateClick, }: AgendaViewProps): react_jsx_runtime.JSX.Element;
1140
+
1141
+ interface CalendarHeaderProps extends ICalendarHeaderProps {
1142
+ className?: string;
1143
+ showAddButton?: boolean;
1144
+ onAddClick?: () => void;
1145
+ }
1146
+ declare function CalendarHeader({ className, showViewSwitcher, showUserFilter, showBadgeVariant, // Hidden by default, controlled via settings
1147
+ showToday, showAddButton, onAddClick, }: CalendarHeaderProps): react_jsx_runtime.JSX.Element;
1148
+ interface CalendarHeaderCompactProps {
1149
+ className?: string;
1150
+ showAddButton?: boolean;
1151
+ onAddClick?: () => void;
1152
+ }
1153
+ declare function CalendarHeaderCompact({ className, showAddButton, onAddClick, }: CalendarHeaderCompactProps): react_jsx_runtime.JSX.Element;
1154
+
1155
+ interface EventDialogProps {
1156
+ open: boolean;
1157
+ onOpenChange: (open: boolean) => void;
1158
+ mode?: "add" | "edit";
1159
+ event?: IEvent | null;
1160
+ defaultDate?: Date;
1161
+ defaultUserId?: string;
1162
+ }
1163
+ declare function EventDialog({ open, onOpenChange, mode, event, defaultDate, defaultUserId, }: EventDialogProps): react_jsx_runtime.JSX.Element;
1164
+ interface QuickAddEventProps {
1165
+ date: Date;
1166
+ onAdd: (event: Omit<IEvent, "id">) => void;
1167
+ onOpenDialog: () => void;
1168
+ onClose: () => void;
1169
+ }
1170
+ declare function QuickAddEvent({ date, onAdd, onOpenDialog, onClose, }: QuickAddEventProps): react_jsx_runtime.JSX.Element;
1171
+
1172
+ declare const DragContext: React$1.Context<IDragContext | null>;
1173
+ interface DragProviderProps {
1174
+ children: React$1.ReactNode;
1175
+ snapMinutes?: number;
1176
+ onDragStart?: (event: IEvent) => void;
1177
+ onDragEnd?: (event: IEvent, newStart: Date, newEnd: Date) => void;
1178
+ }
1179
+ declare function DragProvider({ children, snapMinutes, onDragStart, onDragEnd, }: DragProviderProps): react_jsx_runtime.JSX.Element;
1180
+ declare function useDrag(): IDragContext;
1181
+ interface DraggableEventProps {
1182
+ event: IEvent;
1183
+ children: React$1.ReactNode;
1184
+ disabled?: boolean;
1185
+ }
1186
+ declare function DraggableEvent({ event, children, disabled, }: DraggableEventProps): react_jsx_runtime.JSX.Element;
1187
+ interface DroppableZoneProps {
1188
+ date: Date;
1189
+ children: React$1.ReactNode;
1190
+ onDrop?: (event: IEvent, date: Date) => void;
1191
+ className?: string;
1192
+ }
1193
+ declare function DroppableZone({ date, children, onDrop, className, }: DroppableZoneProps): react_jsx_runtime.JSX.Element;
1194
+ interface UseDroppableOptions {
1195
+ date: Date;
1196
+ hour?: number;
1197
+ minute?: number;
1198
+ onDrop?: (event: IEvent, newDate: Date) => void;
1199
+ }
1200
+ declare function useDroppable({ date, hour, minute, onDrop }: UseDroppableOptions): {
1201
+ isOver: boolean;
1202
+ dropProps: {
1203
+ onDragOver: (e: React$1.DragEvent) => void;
1204
+ onDragLeave: () => void;
1205
+ onDrop: (e: React$1.DragEvent) => void;
1206
+ "data-drag-over": boolean;
1207
+ };
1208
+ };
1209
+ declare function useDraggable(event: IEvent, disabled?: boolean): {
1210
+ isDragged: boolean;
1211
+ dragProps: {
1212
+ draggable: boolean;
1213
+ onDragStart: (e: React$1.DragEvent) => void;
1214
+ onDragEnd: () => void;
1215
+ style: {
1216
+ cursor: string;
1217
+ };
1218
+ };
1219
+ };
1220
+
1221
+ /**
1222
+ * Calendar Settings Panel
1223
+ * Based on big-calendar by Leonardo Ramos (MIT License)
1224
+ * https://github.com/lramos33/big-calendar
1225
+ */
1226
+ interface CalendarSettingsPanelProps {
1227
+ className?: string;
1228
+ showBadgeVariant?: boolean;
1229
+ showVisibleHours?: boolean;
1230
+ showWorkingHours?: boolean;
1231
+ }
1232
+ declare function CalendarSettingsPanel({ className, showBadgeVariant, showVisibleHours, showWorkingHours, }: CalendarSettingsPanelProps): react_jsx_runtime.JSX.Element;
1233
+
1234
+ /**
1235
+ * Badge Variant Input
1236
+ * Based on big-calendar by Leonardo Ramos (MIT License)
1237
+ * https://github.com/lramos33/big-calendar
1238
+ */
1239
+ declare function ChangeBadgeVariantInput(): react_jsx_runtime.JSX.Element;
1240
+
1241
+ /**
1242
+ * Visible Hours Input
1243
+ * Based on big-calendar by Leonardo Ramos (MIT License)
1244
+ * https://github.com/lramos33/big-calendar
1245
+ */
1246
+ declare function ChangeVisibleHoursInput(): react_jsx_runtime.JSX.Element;
1247
+
1248
+ /**
1249
+ * Working Hours Input
1250
+ * Based on big-calendar by Leonardo Ramos (MIT License)
1251
+ * https://github.com/lramos33/big-calendar
1252
+ */
1253
+ declare function ChangeWorkingHoursInput(): react_jsx_runtime.JSX.Element;
1254
+
1255
+ interface BigCalendarProps extends Omit<EventCalendarProviderProps, "children"> {
1256
+ className?: string;
1257
+ compact?: boolean | "auto";
1258
+ bordered?: boolean;
1259
+ showHeader?: boolean;
1260
+ showAddButton?: boolean;
1261
+ showSettings?: boolean;
1262
+ enableDragDrop?: boolean;
1263
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
1264
+ maxEventsPerDay?: number;
1265
+ config?: ICalendarConfig;
1266
+ }
1267
+ declare function BigCalendar({ className, compact, bordered, showHeader, showAddButton, showSettings, enableDragDrop, weekStartsOn, maxEventsPerDay, config, ...providerProps }: BigCalendarProps): react_jsx_runtime.JSX.Element;
1268
+
1269
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AgendaView, type AgendaViewProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, BADGE_VARIANT_LABELS, Badge, BigCalendar, type BigCalendarProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, Calendar, CalendarContext, CalendarDayButton, CalendarHeader, CalendarHeaderCompact, type CalendarHeaderCompactProps, type CalendarHeaderProps, CalendarSettingsPanel, type CalendarSettingsPanelProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChangeBadgeVariantInput, ChangeVisibleHoursInput, ChangeWorkingHoursInput, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DEFAULT_VISIBLE_HOURS, DEFAULT_WORKING_HOURS, DateBadge, type DateBadgeProps, DayView, type DayViewProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DragContext, DragProvider, type DragProviderProps, DraggableEvent, type DraggableEventProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DroppableZone, type DroppableZoneProps, EVENT_COLORS, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EventBadge, type EventBadgeProps, EventCalendarProvider, type EventCalendarProviderProps, EventDialog, type EventDialogProps, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, type ICalendarActions, type ICalendarCell, type ICalendarConfig, type ICalendarContext, type ICalendarHeaderProps, type ICalendarState, type IDayCellProps, type IDragContext, type IEvent, type IEventBadgeProps, type IEventDialogProps, type IEventPosition, type ITimeSlotProps, type IUser, type IViewProps, type IWorkingHours, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MonthView, type MonthViewProps, MoreEvents, type MoreEventsProps, NativeSelect, NativeSelectOptGroup, NativeSelectOption, type NavItem, NavMain, type NavProject, NavProjects, NavSecondary, NavUser, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PlayerCanvas, PlayerCanvasActionButton, PlayerCanvasControls, PlayerCanvasDivider, PlayerCanvasInfo, PlayerCanvasLabel, PlayerCanvasPlayButton, PlayerCanvasProgress, PlayerCanvasSkipButton, PlayerCanvasTitle, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, QuickAddEvent, type QuickAddEventProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchForm, SearchTrigger, type SearchTriggerProps, Section, SectionContent, SectionDescription, SectionFooter, SectionHeader, type SectionProps, SectionTitle, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SiteHeader, Skeleton, Slider, Spinner, Switch, type TBadgeVariant, type TCalendarView, type TEventColor, type TVisibleHours, type TWorkingHours, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TimeIndicator, type TimeIndicatorProps, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToolBarCanvas, ToolBarCanvasButton, ToolBarCanvasDivider, ToolBarCanvasGroup, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseDroppableOptions, type UserAvatarItem, UserAvatarsDropdown, type UserAvatarsDropdownProps, VIEW_LABELS, WeekView, type WeekViewProps, YearView, type YearViewProps, badgeVariants, buttonGroupVariants, buttonVariants, calculateDropDates, calculateMonthEventPositions, cardVariants, createDefaultEvent, formatDateRange, formatTime, generateEventId, getCalendarCells, getCurrentEvents, getDayHours, getEventBlockStyle, getEventDuration, getEventDurationMinutes, getEventsCount, getEventsForDate, getEventsInRange, getHeaderLabel, getMonthCellEvents, getMonthDays, getTimeHeight, getTimePosition, getViewDateRange, getVisibleHours, getWeekDayNames, getWeekDays, getYearMonths, groupEvents, isMultiDayEvent, isWorkingHour, navigateDate, navigationMenuTriggerStyle, playerCanvasPlayButtonVariants, playerCanvasSkipButtonVariants, rangeText, sectionVariants, snapToInterval, sortEvents, splitEventsByDuration, toggleVariants, toolBarCanvasButtonVariants, useDrag, useDraggable, useDroppable, useEventCalendar, useEventsInRange, useFilteredEvents, useFormField, useIsMobile, useSearchShortcut, useSidebar };