@campxdev/react-blueprint 2.2.3 → 2.2.5

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.
Files changed (26) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/types/src/components/Navigation/Calendar/Calendar.d.ts +3 -0
  3. package/dist/cjs/types/src/components/Navigation/Calendar/index.d.ts +3 -0
  4. package/dist/cjs/types/src/components/Navigation/Calendar/styles.d.ts +9 -0
  5. package/dist/cjs/types/src/components/Navigation/Calendar/types.d.ts +90 -0
  6. package/dist/cjs/types/src/components/Navigation/Calendar/utils.d.ts +55 -0
  7. package/dist/cjs/types/src/components/Navigation/export.d.ts +1 -0
  8. package/dist/cjs/types/src/stories/Navigation/Calendar.stories.d.ts +10 -0
  9. package/dist/esm/index.js +2 -2
  10. package/dist/esm/types/src/components/Navigation/Calendar/Calendar.d.ts +3 -0
  11. package/dist/esm/types/src/components/Navigation/Calendar/index.d.ts +3 -0
  12. package/dist/esm/types/src/components/Navigation/Calendar/styles.d.ts +9 -0
  13. package/dist/esm/types/src/components/Navigation/Calendar/types.d.ts +90 -0
  14. package/dist/esm/types/src/components/Navigation/Calendar/utils.d.ts +55 -0
  15. package/dist/esm/types/src/components/Navigation/export.d.ts +1 -0
  16. package/dist/esm/types/src/stories/Navigation/Calendar.stories.d.ts +10 -0
  17. package/dist/index.d.ts +151 -4
  18. package/package.json +6 -1
  19. package/src/components/Navigation/Calendar/Calendar.tsx +243 -0
  20. package/src/components/Navigation/Calendar/README.md +308 -0
  21. package/src/components/Navigation/Calendar/index.ts +3 -0
  22. package/src/components/Navigation/Calendar/styles.tsx +222 -0
  23. package/src/components/Navigation/Calendar/types.ts +120 -0
  24. package/src/components/Navigation/Calendar/utils.ts +265 -0
  25. package/src/components/Navigation/export.ts +1 -0
  26. package/src/stories/Navigation/Calendar.stories.tsx +475 -0
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { CalendarProps } from './types';
3
+ export declare const Calendar: React.FC<CalendarProps>;
@@ -0,0 +1,3 @@
1
+ export * from './Calendar';
2
+ export * from './types';
3
+ export * from './utils';
@@ -0,0 +1,9 @@
1
+ export declare const StyledCalendarContainer: import("@mui/styled-engine").StyledComponent<import("@mui/material").StackOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@types/react").DetailedHTMLProps<import("@types/react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
+ ref?: import("@types/react").Ref<HTMLDivElement>;
3
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/material").StackOwnProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
4
+ height?: string | number;
5
+ aspectRatio?: number;
6
+ }, {}, {}>;
7
+ export declare const StyledCalendarWrapper: import("@mui/styled-engine").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("@types/react").DetailedHTMLProps<import("@types/react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
+ ref?: import("@types/react").Ref<HTMLDivElement>;
9
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,90 @@
1
+ import { EventApi } from '@fullcalendar/core';
2
+ import { StackProps } from '@mui/material';
3
+ export interface CalendarEvent {
4
+ id: string | number;
5
+ title: string;
6
+ start: Date | string;
7
+ end?: Date | string;
8
+ allDay?: boolean;
9
+ backgroundColor?: string;
10
+ borderColor?: string;
11
+ textColor?: string;
12
+ extendedProps?: {
13
+ [key: string]: any;
14
+ };
15
+ }
16
+ export interface CalendarEventClickInfo {
17
+ event: EventApi;
18
+ jsEvent: MouseEvent;
19
+ view: any;
20
+ }
21
+ export interface CalendarDateSelectInfo {
22
+ start: Date;
23
+ end: Date;
24
+ allDay: boolean;
25
+ jsEvent: MouseEvent;
26
+ view: any;
27
+ }
28
+ export interface CalendarEventDropInfo {
29
+ event: EventApi;
30
+ delta: any;
31
+ revert: () => void;
32
+ jsEvent: Event;
33
+ view: any;
34
+ }
35
+ export interface CalendarEventResizeInfo {
36
+ event: EventApi;
37
+ startDelta: any;
38
+ endDelta: any;
39
+ revert: () => void;
40
+ jsEvent: Event;
41
+ view: any;
42
+ }
43
+ export interface CalendarDateClickInfo {
44
+ date: Date;
45
+ dateStr: string;
46
+ allDay: boolean;
47
+ dayEl: HTMLElement;
48
+ jsEvent: MouseEvent;
49
+ view: any;
50
+ }
51
+ export type CalendarView = 'dayGridMonth' | 'timeGridWeek' | 'timeGridDay' | 'listWeek';
52
+ export interface CalendarHeaderToolbar {
53
+ left?: string;
54
+ center?: string;
55
+ right?: string;
56
+ }
57
+ export interface CalendarProps {
58
+ events?: CalendarEvent[];
59
+ onEventClick?: (eventInfo: CalendarEventClickInfo) => void;
60
+ onEventDrop?: (eventInfo: CalendarEventDropInfo) => void;
61
+ onEventResize?: (eventInfo: CalendarEventResizeInfo) => void;
62
+ onDateClick?: (dateInfo: CalendarDateClickInfo) => void;
63
+ onDateSelect?: (selectInfo: CalendarDateSelectInfo) => void;
64
+ onEventsSet?: (events: EventApi[]) => void;
65
+ initialView?: CalendarView;
66
+ views?: CalendarView[];
67
+ headerToolbar?: CalendarHeaderToolbar | boolean;
68
+ editable?: boolean;
69
+ selectable?: boolean;
70
+ selectMirror?: boolean;
71
+ eventResizable?: boolean;
72
+ eventDraggable?: boolean;
73
+ dayMaxEvents?: boolean | number;
74
+ height?: string | number;
75
+ aspectRatio?: number;
76
+ containerProps?: StackProps;
77
+ locale?: string;
78
+ timezone?: string;
79
+ firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
80
+ eventContent?: (eventInfo: any) => React.ReactNode;
81
+ dayCellContent?: (dayInfo: any) => React.ReactNode;
82
+ showNavigationButtons?: boolean;
83
+ showViewSwitcher?: boolean;
84
+ showToday?: boolean;
85
+ calendarRef?: React.RefObject<any>;
86
+ weekends?: boolean;
87
+ businessHours?: any;
88
+ eventConstraint?: any;
89
+ selectConstraint?: any;
90
+ }
@@ -0,0 +1,55 @@
1
+ import { CalendarEvent } from './types';
2
+ /**
3
+ * Generate recurring events based on a pattern
4
+ */
5
+ export interface RecurringEventConfig {
6
+ title: string;
7
+ startTime: string;
8
+ endTime: string;
9
+ startDate: Date;
10
+ endDate?: Date;
11
+ daysOfWeek?: number[];
12
+ interval?: number;
13
+ backgroundColor?: string;
14
+ extendedProps?: {
15
+ [key: string]: any;
16
+ };
17
+ }
18
+ export declare const generateRecurringEvents: (config: RecurringEventConfig, maxEvents?: number) => CalendarEvent[];
19
+ /**
20
+ * Generate sample business events for demonstration
21
+ */
22
+ export declare const generateBusinessEvents: (startDate?: Date) => CalendarEvent[];
23
+ /**
24
+ * Filter events by date range
25
+ */
26
+ export declare const filterEventsByDateRange: (events: CalendarEvent[], startDate: Date, endDate: Date) => CalendarEvent[];
27
+ /**
28
+ * Group events by date
29
+ */
30
+ export declare const groupEventsByDate: (events: CalendarEvent[]) => {
31
+ [date: string]: CalendarEvent[];
32
+ };
33
+ /**
34
+ * Calculate event statistics
35
+ */
36
+ export interface EventStats {
37
+ totalEvents: number;
38
+ eventsThisWeek: number;
39
+ eventsThisMonth: number;
40
+ averageEventsPerDay: number;
41
+ mostBusyDay: string;
42
+ leastBusyDay: string;
43
+ }
44
+ export declare const calculateEventStats: (events: CalendarEvent[]) => EventStats;
45
+ /**
46
+ * Convert events to different formats
47
+ */
48
+ export declare const exportEventsToCSV: (events: CalendarEvent[]) => string;
49
+ /**
50
+ * Validate event data
51
+ */
52
+ export declare const validateEvent: (event: Partial<CalendarEvent>) => {
53
+ isValid: boolean;
54
+ errors: string[];
55
+ };
@@ -1,5 +1,6 @@
1
1
  export * from '../Layout/PageHeader/components/TableColumnsSelector/TableColumnsSelector';
2
2
  export * from './Breadcrumbs/Breadcrumbs';
3
+ export * from './Calendar';
3
4
  export * from './ConfirmDialog/ConfirmDialog';
4
5
  export * from './Dialog/Dialog';
5
6
  export * from './DialogButton/DialogButton';
@@ -0,0 +1,10 @@
1
+ import { Meta, StoryObj } from '@storybook/react/*';
2
+ import { Calendar } from '../../components/Navigation/Calendar/Calendar';
3
+ declare const meta: Meta<typeof Calendar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Calendar>;
6
+ export declare const Default: Story;
7
+ export declare const MonthView: Story;
8
+ export declare const WeekView: Story;
9
+ export declare const DayView: Story;
10
+ export declare const StudentCalendar: Story;