@fullcalendar/mui 7.0.0-beta.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.
- package/LICENSE.md +22 -0
- package/README.md +79 -0
- package/breezy/theme.css +987 -0
- package/cjs/breezy/EventCalendar.cjs +62 -0
- package/cjs/breezy/EventCalendarContainer.cjs +35 -0
- package/cjs/breezy/EventCalendarToolbar.cjs +65 -0
- package/cjs/breezy/EventCalendarViews.cjs +283 -0
- package/cjs/breezy/ResourceTimeGrid.cjs +57 -0
- package/cjs/breezy/ResourceTimeline.cjs +54 -0
- package/cjs/breezy/SchedulerViews.cjs +70 -0
- package/cjs/breezy/icons.cjs +37 -0
- package/cjs/classic/EventCalendar.cjs +62 -0
- package/cjs/classic/EventCalendarContainer.cjs +22 -0
- package/cjs/classic/EventCalendarToolbar.cjs +62 -0
- package/cjs/classic/EventCalendarViews.cjs +230 -0
- package/cjs/classic/ResourceTimeGrid.cjs +57 -0
- package/cjs/classic/ResourceTimeline.cjs +54 -0
- package/cjs/classic/SchedulerViews.cjs +74 -0
- package/cjs/classic/icons.cjs +37 -0
- package/cjs/forma/EventCalendar.cjs +62 -0
- package/cjs/forma/EventCalendarContainer.cjs +35 -0
- package/cjs/forma/EventCalendarToolbar.cjs +64 -0
- package/cjs/forma/EventCalendarViews.cjs +251 -0
- package/cjs/forma/ResourceTimeGrid.cjs +57 -0
- package/cjs/forma/ResourceTimeline.cjs +54 -0
- package/cjs/forma/SchedulerViews.cjs +62 -0
- package/cjs/forma/icons.cjs +37 -0
- package/cjs/monarch/EventCalendar.cjs +62 -0
- package/cjs/monarch/EventCalendarContainer.cjs +35 -0
- package/cjs/monarch/EventCalendarToolbar.cjs +62 -0
- package/cjs/monarch/EventCalendarViews.cjs +252 -0
- package/cjs/monarch/ResourceTimeGrid.cjs +57 -0
- package/cjs/monarch/ResourceTimeline.cjs +54 -0
- package/cjs/monarch/SchedulerViews.cjs +83 -0
- package/cjs/monarch/icons.cjs +37 -0
- package/cjs/pulse/EventCalendar.cjs +62 -0
- package/cjs/pulse/EventCalendarContainer.cjs +22 -0
- package/cjs/pulse/EventCalendarToolbar.cjs +62 -0
- package/cjs/pulse/EventCalendarViews.cjs +268 -0
- package/cjs/pulse/ResourceTimeGrid.cjs +57 -0
- package/cjs/pulse/ResourceTimeline.cjs +54 -0
- package/cjs/pulse/SchedulerViews.cjs +58 -0
- package/cjs/pulse/icons.cjs +37 -0
- package/classic/theme.css +811 -0
- package/esm/breezy/EventCalendar.d.ts +15 -0
- package/esm/breezy/EventCalendar.js +49 -0
- package/esm/breezy/EventCalendarContainer.d.ts +15 -0
- package/esm/breezy/EventCalendarContainer.js +26 -0
- package/esm/breezy/EventCalendarToolbar.d.ts +16 -0
- package/esm/breezy/EventCalendarToolbar.js +51 -0
- package/esm/breezy/EventCalendarViews.d.ts +33 -0
- package/esm/breezy/EventCalendarViews.js +250 -0
- package/esm/breezy/ResourceTimeGrid.d.ts +15 -0
- package/esm/breezy/ResourceTimeGrid.js +45 -0
- package/esm/breezy/ResourceTimeline.d.ts +15 -0
- package/esm/breezy/ResourceTimeline.js +43 -0
- package/esm/breezy/SchedulerViews.d.ts +8 -0
- package/esm/breezy/SchedulerViews.js +62 -0
- package/esm/breezy/icons.d.ts +11 -0
- package/esm/breezy/icons.js +22 -0
- package/esm/classic/EventCalendar.d.ts +15 -0
- package/esm/classic/EventCalendar.js +49 -0
- package/esm/classic/EventCalendarContainer.d.ts +11 -0
- package/esm/classic/EventCalendarContainer.js +13 -0
- package/esm/classic/EventCalendarToolbar.d.ts +17 -0
- package/esm/classic/EventCalendarToolbar.js +48 -0
- package/esm/classic/EventCalendarViews.d.ts +31 -0
- package/esm/classic/EventCalendarViews.js +205 -0
- package/esm/classic/ResourceTimeGrid.d.ts +15 -0
- package/esm/classic/ResourceTimeGrid.js +45 -0
- package/esm/classic/ResourceTimeline.d.ts +15 -0
- package/esm/classic/ResourceTimeline.js +43 -0
- package/esm/classic/SchedulerViews.d.ts +8 -0
- package/esm/classic/SchedulerViews.js +66 -0
- package/esm/classic/icons.d.ts +11 -0
- package/esm/classic/icons.js +22 -0
- package/esm/forma/EventCalendar.d.ts +15 -0
- package/esm/forma/EventCalendar.js +49 -0
- package/esm/forma/EventCalendarContainer.d.ts +15 -0
- package/esm/forma/EventCalendarContainer.js +26 -0
- package/esm/forma/EventCalendarToolbar.d.ts +16 -0
- package/esm/forma/EventCalendarToolbar.js +50 -0
- package/esm/forma/EventCalendarViews.d.ts +30 -0
- package/esm/forma/EventCalendarViews.js +221 -0
- package/esm/forma/ResourceTimeGrid.d.ts +15 -0
- package/esm/forma/ResourceTimeGrid.js +45 -0
- package/esm/forma/ResourceTimeline.d.ts +15 -0
- package/esm/forma/ResourceTimeline.js +43 -0
- package/esm/forma/SchedulerViews.d.ts +8 -0
- package/esm/forma/SchedulerViews.js +54 -0
- package/esm/forma/icons.d.ts +11 -0
- package/esm/forma/icons.js +22 -0
- package/esm/monarch/EventCalendar.d.ts +15 -0
- package/esm/monarch/EventCalendar.js +49 -0
- package/esm/monarch/EventCalendarContainer.d.ts +15 -0
- package/esm/monarch/EventCalendarContainer.js +26 -0
- package/esm/monarch/EventCalendarToolbar.d.ts +16 -0
- package/esm/monarch/EventCalendarToolbar.js +48 -0
- package/esm/monarch/EventCalendarViews.d.ts +27 -0
- package/esm/monarch/EventCalendarViews.js +225 -0
- package/esm/monarch/ResourceTimeGrid.d.ts +15 -0
- package/esm/monarch/ResourceTimeGrid.js +45 -0
- package/esm/monarch/ResourceTimeline.d.ts +15 -0
- package/esm/monarch/ResourceTimeline.js +43 -0
- package/esm/monarch/SchedulerViews.d.ts +8 -0
- package/esm/monarch/SchedulerViews.js +75 -0
- package/esm/monarch/icons.d.ts +11 -0
- package/esm/monarch/icons.js +22 -0
- package/esm/pulse/EventCalendar.d.ts +15 -0
- package/esm/pulse/EventCalendar.js +49 -0
- package/esm/pulse/EventCalendarContainer.d.ts +11 -0
- package/esm/pulse/EventCalendarContainer.js +13 -0
- package/esm/pulse/EventCalendarToolbar.d.ts +17 -0
- package/esm/pulse/EventCalendarToolbar.js +48 -0
- package/esm/pulse/EventCalendarViews.d.ts +29 -0
- package/esm/pulse/EventCalendarViews.js +239 -0
- package/esm/pulse/ResourceTimeGrid.d.ts +15 -0
- package/esm/pulse/ResourceTimeGrid.js +45 -0
- package/esm/pulse/ResourceTimeline.d.ts +15 -0
- package/esm/pulse/ResourceTimeline.js +43 -0
- package/esm/pulse/SchedulerViews.d.ts +8 -0
- package/esm/pulse/SchedulerViews.js +50 -0
- package/esm/pulse/icons.d.ts +11 -0
- package/esm/pulse/icons.js +22 -0
- package/forma/theme.css +936 -0
- package/monarch/theme.css +1014 -0
- package/package.json +371 -0
- package/pulse/theme.css +913 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCalendarController } from '@fullcalendar/react';
|
|
3
|
+
import adaptivePlugin from '@fullcalendar/adaptive';
|
|
4
|
+
import interactionPlugin from '@fullcalendar/interaction';
|
|
5
|
+
import scrollGridPlugin from '@fullcalendar/scrollgrid';
|
|
6
|
+
import resourceTimeGridPlugin from '@fullcalendar/resource-timegrid';
|
|
7
|
+
import EventCalendarToolbar from './EventCalendarToolbar.js';
|
|
8
|
+
import SchedulerViews from './SchedulerViews.js';
|
|
9
|
+
import EventCalendarContainer from './EventCalendarContainer.js';
|
|
10
|
+
import '@mui/material/Box';
|
|
11
|
+
import '@mui/material/Button';
|
|
12
|
+
import '@mui/material/IconButton';
|
|
13
|
+
import '@mui/material/Typography';
|
|
14
|
+
import '@mui/material/ToggleButtonGroup';
|
|
15
|
+
import '@mui/material/ToggleButton';
|
|
16
|
+
import './icons.js';
|
|
17
|
+
import '@fullcalendar/core';
|
|
18
|
+
import '@mui/icons-material/ChevronLeft';
|
|
19
|
+
import '@mui/icons-material/ChevronRight';
|
|
20
|
+
import '@mui/icons-material/Close';
|
|
21
|
+
import '@mui/icons-material/ExpandMore';
|
|
22
|
+
import './EventCalendarViews.js';
|
|
23
|
+
import '@mui/material';
|
|
24
|
+
|
|
25
|
+
const plugins = [
|
|
26
|
+
adaptivePlugin,
|
|
27
|
+
interactionPlugin,
|
|
28
|
+
scrollGridPlugin,
|
|
29
|
+
resourceTimeGridPlugin,
|
|
30
|
+
];
|
|
31
|
+
const defaultAvailableViews = [
|
|
32
|
+
'resourceTimeGridDay',
|
|
33
|
+
'resourceTimeGridWeek',
|
|
34
|
+
];
|
|
35
|
+
const navLinkDayClick = 'resourceTimeGridDay';
|
|
36
|
+
const navLinkWeekClick = 'resourceTimeGridWeek';
|
|
37
|
+
function ResourceTimeGrid({ availableViews = defaultAvailableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins = [], ...restOptions }) {
|
|
38
|
+
const controller = useCalendarController();
|
|
39
|
+
const autoHeight = height === 'auto' || contentHeight === 'auto';
|
|
40
|
+
return (React.createElement(EventCalendarContainer, { direction: direction, className: className, height: height, borderless: restOptions.borderless, borderlessX: restOptions.borderlessX, borderlessTop: restOptions.borderlessTop, borderlessBottom: restOptions.borderlessBottom },
|
|
41
|
+
React.createElement(EventCalendarToolbar, { controller: controller, availableViews: availableViews, addButton: addButton }),
|
|
42
|
+
React.createElement(SchedulerViews, { liquidHeight: !autoHeight && height !== undefined, height: autoHeight ? 'auto' : contentHeight, initialView: availableViews[0], navLinkDayClick: navLinkDayClick, navLinkWeekClick: navLinkWeekClick, borderless: true, controller: controller, plugins: [...plugins, ...userPlugins], ...restOptions })));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { ResourceTimeGrid as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CalendarOptions } from '@fullcalendar/core';
|
|
3
|
+
|
|
4
|
+
interface ResourceTimelineProps extends Omit<CalendarOptions, 'class'> {
|
|
5
|
+
availableViews?: string[];
|
|
6
|
+
addButton?: {
|
|
7
|
+
isPrimary?: boolean;
|
|
8
|
+
text?: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
click?: (ev: MouseEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare function ResourceTimeline({ availableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins, ...restOptions }: ResourceTimelineProps): React.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { ResourceTimelineProps, ResourceTimeline as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCalendarController } from '@fullcalendar/react';
|
|
3
|
+
import adaptivePlugin from '@fullcalendar/adaptive';
|
|
4
|
+
import resourceTimelinePlugin from '@fullcalendar/resource-timeline';
|
|
5
|
+
import interactionPlugin from '@fullcalendar/interaction';
|
|
6
|
+
import EventCalendarToolbar from './EventCalendarToolbar.js';
|
|
7
|
+
import SchedulerViews from './SchedulerViews.js';
|
|
8
|
+
import EventCalendarContainer from './EventCalendarContainer.js';
|
|
9
|
+
import '@mui/material/Box';
|
|
10
|
+
import '@mui/material/Button';
|
|
11
|
+
import '@mui/material/IconButton';
|
|
12
|
+
import '@mui/material/Typography';
|
|
13
|
+
import '@mui/material/ToggleButtonGroup';
|
|
14
|
+
import '@mui/material/ToggleButton';
|
|
15
|
+
import './icons.js';
|
|
16
|
+
import '@fullcalendar/core';
|
|
17
|
+
import '@mui/icons-material/ChevronLeft';
|
|
18
|
+
import '@mui/icons-material/ChevronRight';
|
|
19
|
+
import '@mui/icons-material/Close';
|
|
20
|
+
import '@mui/icons-material/ExpandMore';
|
|
21
|
+
import './EventCalendarViews.js';
|
|
22
|
+
import '@mui/material';
|
|
23
|
+
|
|
24
|
+
const plugins = [
|
|
25
|
+
adaptivePlugin,
|
|
26
|
+
interactionPlugin,
|
|
27
|
+
resourceTimelinePlugin,
|
|
28
|
+
];
|
|
29
|
+
const defaultAvailableViews = [
|
|
30
|
+
'resourceTimelineDay',
|
|
31
|
+
'resourceTimelineWeek',
|
|
32
|
+
];
|
|
33
|
+
const navLinkDayClick = 'resourceTimelineDay';
|
|
34
|
+
const navLinkWeekClick = 'resourceTimelineWeek';
|
|
35
|
+
function ResourceTimeline({ availableViews = defaultAvailableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins = [], ...restOptions }) {
|
|
36
|
+
const controller = useCalendarController();
|
|
37
|
+
const autoHeight = height === 'auto' || contentHeight === 'auto';
|
|
38
|
+
return (React.createElement(EventCalendarContainer, { direction: direction, className: className, height: height, borderless: restOptions.borderless, borderlessX: restOptions.borderlessX, borderlessTop: restOptions.borderlessTop, borderlessBottom: restOptions.borderlessBottom },
|
|
39
|
+
React.createElement(EventCalendarToolbar, { controller: controller, availableViews: availableViews, addButton: addButton }),
|
|
40
|
+
React.createElement(SchedulerViews, { liquidHeight: !autoHeight && height !== undefined, height: autoHeight ? 'auto' : contentHeight, initialView: availableViews[0], navLinkDayClick: navLinkDayClick, navLinkWeekClick: navLinkWeekClick, borderless: true, controller: controller, plugins: [...plugins, ...userPlugins], ...restOptions })));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { ResourceTimeline as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EventCalendarViewsProps } from './EventCalendarViews.js';
|
|
3
|
+
|
|
4
|
+
interface SchedulerViewsProps extends EventCalendarViewsProps {
|
|
5
|
+
}
|
|
6
|
+
declare function SchedulerViews({ views: userViews, ...restOptions }: SchedulerViewsProps): React.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { SchedulerViewsProps, SchedulerViews as default };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { joinClassNames } from '@fullcalendar/core';
|
|
3
|
+
import EventCalendarViews, { faintBgClass, mutedHoverPressableClass, outlineWidthFocusClass, tertiaryOutlineColorClass, strongSolidPressableClass, secondaryPressableClass, secondaryClass } from './EventCalendarViews.js';
|
|
4
|
+
import { EventCalendarExpanderIcon } from './icons.js';
|
|
5
|
+
import '@fullcalendar/react';
|
|
6
|
+
import '@mui/material';
|
|
7
|
+
import '@mui/icons-material/ChevronLeft';
|
|
8
|
+
import '@mui/icons-material/ChevronRight';
|
|
9
|
+
import '@mui/icons-material/Close';
|
|
10
|
+
import '@mui/icons-material/ExpandMore';
|
|
11
|
+
|
|
12
|
+
const resourceDayHeaderClasses = {
|
|
13
|
+
dayHeaderInnerClass: "fc-monarch-Sb2",
|
|
14
|
+
dayHeaderDividerClass: `fc-monarch-QTT fc-monarch-G56`,
|
|
15
|
+
};
|
|
16
|
+
function SchedulerViews({ views: userViews, ...restOptions }) {
|
|
17
|
+
return (React.createElement(EventCalendarViews
|
|
18
|
+
/* Resource Day Header
|
|
19
|
+
------------------------------------------------------------------------------------------- */
|
|
20
|
+
, {
|
|
21
|
+
/* Resource Day Header
|
|
22
|
+
------------------------------------------------------------------------------------------- */
|
|
23
|
+
resourceDayHeaderAlign: "center", resourceDayHeaderClass: (data) => joinClassNames("fc-monarch-UZp", data.isMajor
|
|
24
|
+
? "fc-monarch-I55"
|
|
25
|
+
: "fc-monarch-G56"), resourceDayHeaderInnerClass: (data) => joinClassNames("fc-monarch-aS8 fc-monarch-Hhr fc-monarch-bXY", data.isNarrow ? "fc-monarch-17F" : "fc-monarch-gEy"),
|
|
26
|
+
/* Resource Data Grid
|
|
27
|
+
------------------------------------------------------------------------------------------- */
|
|
28
|
+
resourceColumnHeaderClass: "fc-monarch-UZp fc-monarch-G56 fc-monarch-a65", resourceColumnHeaderInnerClass: "fc-monarch-aS8 fc-monarch-gEy", resourceColumnResizerClass: "fc-monarch-YA2 fc-monarch-8ZZ fc-monarch-Ahl fc-monarch-W3O", resourceGroupHeaderClass: `fc-monarch-UZp fc-monarch-G56 ${faintBgClass}`, resourceGroupHeaderInnerClass: "fc-monarch-aS8 fc-monarch-gEy", resourceCellClass: "fc-monarch-UZp fc-monarch-G56", resourceCellInnerClass: "fc-monarch-aS8 fc-monarch-gEy", resourceIndentClass: "fc-monarch-fpO fc-monarch-aCj fc-monarch-a65", resourceExpanderClass: `fc-monarch-ytQ fc-monarch-xbC fc-monarch-IdG ${mutedHoverPressableClass} ${outlineWidthFocusClass} ${tertiaryOutlineColorClass}`, resourceExpanderContent: (data) => (React.createElement(EventCalendarExpanderIcon, { isExpanded: data.isExpanded })), resourceHeaderRowClass: "fc-monarch-UZp fc-monarch-G56", resourceRowClass: "fc-monarch-UZp fc-monarch-G56", resourceColumnDividerClass: "fc-monarch-EWl fc-monarch-I55",
|
|
29
|
+
/* Timeline Lane
|
|
30
|
+
------------------------------------------------------------------------------------------- */
|
|
31
|
+
resourceGroupLaneClass: `fc-monarch-UZp fc-monarch-G56 ${faintBgClass}`, resourceLaneClass: "fc-monarch-UZp fc-monarch-G56", resourceLaneBottomClass: (data) => joinClassNames(data.options.eventOverlap && "fc-monarch-433"), timelineBottomClass: "fc-monarch-433",
|
|
32
|
+
/* View-Specific Options
|
|
33
|
+
------------------------------------------------------------------------------------------- */
|
|
34
|
+
views: {
|
|
35
|
+
...userViews,
|
|
36
|
+
resourceTimeGrid: {
|
|
37
|
+
...resourceDayHeaderClasses,
|
|
38
|
+
...userViews?.resourceTimeGrid,
|
|
39
|
+
},
|
|
40
|
+
resourceDayGrid: {
|
|
41
|
+
...resourceDayHeaderClasses,
|
|
42
|
+
...userViews?.resourceDayGrid,
|
|
43
|
+
},
|
|
44
|
+
timeline: {
|
|
45
|
+
/* Timeline > Row Event
|
|
46
|
+
--------------------------------------------------------------------------------------- */
|
|
47
|
+
rowEventClass: (data) => joinClassNames(data.isEnd && "fc-monarch-bpq"),
|
|
48
|
+
rowEventInnerClass: (data) => data.options.eventOverlap ? "fc-monarch-ztx" : "fc-monarch-KyB",
|
|
49
|
+
/* Timeline > More-Link
|
|
50
|
+
--------------------------------------------------------------------------------------- */
|
|
51
|
+
rowMoreLinkClass: `fc-monarch-bpq fc-monarch-mwm fc-monarch-dpa fc-monarch-UZp fc-monarch-lqW fc-monarch-ePV ${strongSolidPressableClass} fc-monarch-82y`,
|
|
52
|
+
rowMoreLinkInnerClass: "fc-monarch-xbC fc-monarch-17F",
|
|
53
|
+
/* Timeline > Slot Header
|
|
54
|
+
--------------------------------------------------------------------------------------- */
|
|
55
|
+
slotHeaderSticky: "0.5rem",
|
|
56
|
+
slotHeaderAlign: (data) => (data.level || data.isTime) ? "start" : "center",
|
|
57
|
+
slotHeaderClass: (data) => joinClassNames("fc-monarch-UZp", data.level
|
|
58
|
+
? "fc-monarch-lqW fc-monarch-mMs"
|
|
59
|
+
: joinClassNames("fc-monarch-G56", data.isTime
|
|
60
|
+
? "fc-monarch-433 fc-monarch-Knn fc-monarch-RhI"
|
|
61
|
+
: "fc-monarch-a65")),
|
|
62
|
+
slotHeaderInnerClass: (data) => joinClassNames("fc-monarch-gEy", data.level
|
|
63
|
+
? joinClassNames("fc-monarch-kOE fc-monarch-ybQ fc-monarch-ztx fc-monarch-IdG", data.hasNavLink
|
|
64
|
+
? secondaryPressableClass
|
|
65
|
+
: secondaryClass)
|
|
66
|
+
: joinClassNames("fc-monarch-ybQ", data.isTime
|
|
67
|
+
? joinClassNames("fc-monarch-tg1 fc-monarch-vPs fc-monarch-WvE", data.isFirst && "fc-monarch-C9h")
|
|
68
|
+
: "fc-monarch-KyB", data.hasNavLink && "fc-monarch-jaW")),
|
|
69
|
+
slotHeaderDividerClass: `fc-monarch-QTT fc-monarch-G56`,
|
|
70
|
+
...userViews?.timeline,
|
|
71
|
+
},
|
|
72
|
+
}, ...restOptions }));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { SchedulerViews as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
declare function EventCalendarPrevIcon(): React.JSX.Element;
|
|
4
|
+
declare function EventCalendarNextIcon(): React.JSX.Element;
|
|
5
|
+
declare function EventCalendarCloseIcon(): React.JSX.Element;
|
|
6
|
+
interface EventCalendarExpanderIconProps {
|
|
7
|
+
isExpanded: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function EventCalendarExpanderIcon({ isExpanded }: EventCalendarExpanderIconProps): React.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { EventCalendarCloseIcon, EventCalendarExpanderIcon, EventCalendarExpanderIconProps, EventCalendarNextIcon, EventCalendarPrevIcon };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { joinClassNames } from '@fullcalendar/core';
|
|
3
|
+
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
|
|
4
|
+
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
|
5
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
6
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
7
|
+
|
|
8
|
+
const pressableIconClass = "fc-monarch-5Kh fc-monarch-HHp fc-monarch-La2";
|
|
9
|
+
function EventCalendarPrevIcon() {
|
|
10
|
+
return React.createElement(ChevronLeftIcon, { className: "fc-monarch-AAt" });
|
|
11
|
+
}
|
|
12
|
+
function EventCalendarNextIcon() {
|
|
13
|
+
return React.createElement(ChevronRightIcon, { className: "fc-monarch-AAt" });
|
|
14
|
+
}
|
|
15
|
+
function EventCalendarCloseIcon() {
|
|
16
|
+
return (React.createElement(CloseIcon, { sx: { fontSize: 18, margin: "1px" }, className: pressableIconClass }));
|
|
17
|
+
}
|
|
18
|
+
function EventCalendarExpanderIcon({ isExpanded }) {
|
|
19
|
+
return (React.createElement(ExpandMoreIcon, { sx: { fontSize: 18, margin: "1px" }, className: joinClassNames(pressableIconClass, !isExpanded && "fc-monarch-doO fc-monarch-Bzb") }));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { EventCalendarCloseIcon, EventCalendarExpanderIcon, EventCalendarNextIcon, EventCalendarPrevIcon };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CalendarOptions } from '@fullcalendar/core';
|
|
3
|
+
|
|
4
|
+
interface EventCalendarProps extends Omit<CalendarOptions, 'class'> {
|
|
5
|
+
availableViews?: string[];
|
|
6
|
+
addButton?: {
|
|
7
|
+
isPrimary?: boolean;
|
|
8
|
+
text?: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
click?: (ev: MouseEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare function EventCalendar({ availableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins, ...restOptions }: EventCalendarProps): React.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { EventCalendarProps, EventCalendar as default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCalendarController } from '@fullcalendar/react';
|
|
3
|
+
import dayGridPlugin from '@fullcalendar/daygrid';
|
|
4
|
+
import timeGridPlugin from '@fullcalendar/timegrid';
|
|
5
|
+
import listPlugin from '@fullcalendar/list';
|
|
6
|
+
import interactionPlugin from '@fullcalendar/interaction';
|
|
7
|
+
import multiMonthPlugin from '@fullcalendar/multimonth';
|
|
8
|
+
import EventCalendarToolbar from './EventCalendarToolbar.js';
|
|
9
|
+
import EventCalendarViews from './EventCalendarViews.js';
|
|
10
|
+
import EventCalendarContainer from './EventCalendarContainer.js';
|
|
11
|
+
import '@mui/material/Box';
|
|
12
|
+
import '@mui/material/Button';
|
|
13
|
+
import '@mui/material/IconButton';
|
|
14
|
+
import '@mui/material/Typography';
|
|
15
|
+
import '@mui/material/ToggleButtonGroup';
|
|
16
|
+
import '@mui/material/ToggleButton';
|
|
17
|
+
import './icons.js';
|
|
18
|
+
import '@fullcalendar/core';
|
|
19
|
+
import '@mui/icons-material/ChevronLeft';
|
|
20
|
+
import '@mui/icons-material/ChevronRight';
|
|
21
|
+
import '@mui/icons-material/Close';
|
|
22
|
+
import '@mui/icons-material/ExpandMore';
|
|
23
|
+
import '@mui/material';
|
|
24
|
+
|
|
25
|
+
const plugins = [
|
|
26
|
+
dayGridPlugin,
|
|
27
|
+
timeGridPlugin,
|
|
28
|
+
listPlugin,
|
|
29
|
+
interactionPlugin,
|
|
30
|
+
multiMonthPlugin,
|
|
31
|
+
];
|
|
32
|
+
const defaultAvailableViews = [
|
|
33
|
+
'dayGridMonth',
|
|
34
|
+
'timeGridWeek',
|
|
35
|
+
'timeGridDay',
|
|
36
|
+
'listWeek',
|
|
37
|
+
'multiMonthYear',
|
|
38
|
+
];
|
|
39
|
+
const navLinkDayClick = 'timeGridDay';
|
|
40
|
+
const navLinkWeekClick = 'timeGridWeek';
|
|
41
|
+
function EventCalendar({ availableViews = defaultAvailableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins = [], ...restOptions }) {
|
|
42
|
+
const controller = useCalendarController();
|
|
43
|
+
const autoHeight = height === 'auto' || contentHeight === 'auto';
|
|
44
|
+
return (React.createElement(EventCalendarContainer, { direction: direction, className: className, height: height },
|
|
45
|
+
React.createElement(EventCalendarToolbar, { controller: controller, availableViews: availableViews, addButton: addButton, borderlessX: restOptions.borderlessX ?? restOptions.borderless }),
|
|
46
|
+
React.createElement(EventCalendarViews, { liquidHeight: !autoHeight && height !== undefined, height: autoHeight ? 'auto' : contentHeight, initialView: availableViews[0], navLinkDayClick: navLinkDayClick, navLinkWeekClick: navLinkWeekClick, controller: controller, plugins: [...plugins, ...userPlugins], ...restOptions })));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { EventCalendar as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface EventCalendarContainerProps {
|
|
4
|
+
direction: 'ltr' | 'rtl' | undefined;
|
|
5
|
+
className: string | undefined;
|
|
6
|
+
height: string | number | undefined;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function EventCalendarContainer(props: EventCalendarContainerProps): React.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { EventCalendarContainerProps, EventCalendarContainer as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
|
|
4
|
+
function EventCalendarContainer(props) {
|
|
5
|
+
return (React.createElement(Box, { dir: props.direction === 'rtl' ? 'rtl' : undefined, className: props.className, sx: {
|
|
6
|
+
display: 'flex',
|
|
7
|
+
flexDirection: 'column',
|
|
8
|
+
gap: 3,
|
|
9
|
+
height: props.height,
|
|
10
|
+
} }, props.children));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { EventCalendarContainer as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CalendarController } from '@fullcalendar/core';
|
|
3
|
+
|
|
4
|
+
interface EventCalendarToolbarProps {
|
|
5
|
+
controller: CalendarController;
|
|
6
|
+
availableViews: string[];
|
|
7
|
+
addButton?: {
|
|
8
|
+
isPrimary?: boolean;
|
|
9
|
+
text?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
click?: (ev: MouseEvent) => void;
|
|
12
|
+
};
|
|
13
|
+
borderlessX?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare function EventCalendarToolbar({ controller, availableViews, addButton, borderlessX, }: EventCalendarToolbarProps): React.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { EventCalendarToolbarProps, EventCalendarToolbar as default };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import Button from '@mui/material/Button';
|
|
4
|
+
import IconButton from '@mui/material/IconButton';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
6
|
+
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
7
|
+
import ToggleButton from '@mui/material/ToggleButton';
|
|
8
|
+
import { EventCalendarPrevIcon, EventCalendarNextIcon } from './icons.js';
|
|
9
|
+
import '@fullcalendar/core';
|
|
10
|
+
import '@mui/icons-material/ChevronLeft';
|
|
11
|
+
import '@mui/icons-material/ChevronRight';
|
|
12
|
+
import '@mui/icons-material/Close';
|
|
13
|
+
import '@mui/icons-material/ExpandMore';
|
|
14
|
+
|
|
15
|
+
function EventCalendarToolbar({ controller, availableViews, addButton, borderlessX, }) {
|
|
16
|
+
const buttons = controller.getButtonState();
|
|
17
|
+
return (React.createElement(Box, { sx: {
|
|
18
|
+
display: 'flex',
|
|
19
|
+
flexWrap: 'wrap',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'space-between',
|
|
22
|
+
gap: 1,
|
|
23
|
+
px: borderlessX ? 1.5 : undefined,
|
|
24
|
+
} },
|
|
25
|
+
React.createElement(Box, { sx: {
|
|
26
|
+
display: 'flex',
|
|
27
|
+
flexShrink: 0,
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
gap: 1,
|
|
30
|
+
} },
|
|
31
|
+
addButton && (React.createElement(Button, { onClick: addButton.click, "aria-label": addButton.hint, variant: addButton.isPrimary === false ? 'outlined' : 'contained' }, addButton.text)),
|
|
32
|
+
React.createElement(Button, { onClick: () => controller.today(), "aria-label": buttons.today.hint, variant: "outlined" }, buttons.today.text),
|
|
33
|
+
React.createElement(Box, { sx: {
|
|
34
|
+
display: 'flex',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
} },
|
|
37
|
+
React.createElement(IconButton, { onClick: () => controller.prev(), disabled: buttons.prev.isDisabled, "aria-label": buttons.prev.hint },
|
|
38
|
+
React.createElement(EventCalendarPrevIcon, null)),
|
|
39
|
+
React.createElement(IconButton, { onClick: () => controller.next(), disabled: buttons.next.isDisabled, "aria-label": buttons.next.hint },
|
|
40
|
+
React.createElement(EventCalendarNextIcon, null))),
|
|
41
|
+
React.createElement(Typography, { variant: "h5" }, controller.view?.title)),
|
|
42
|
+
React.createElement(ToggleButtonGroup, { size: "small", exclusive: true, value: controller.view?.type, onChange: (_ev, val) => {
|
|
43
|
+
controller.changeView(val);
|
|
44
|
+
} }, availableViews.map((availableView) => (React.createElement(ToggleButton, { key: availableView, value: availableView, "aria-label": buttons[availableView]?.hint, color: "primary" },
|
|
45
|
+
React.createElement(Box, { sx: { px: 1 } }, buttons[availableView]?.text)))))));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { EventCalendarToolbar as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DayCellData, CalendarOptions } from '@fullcalendar/core';
|
|
3
|
+
|
|
4
|
+
declare const outlineWidthClass = "outline-3";
|
|
5
|
+
declare const outlineWidthFocusClass = "focus-visible:outline-3";
|
|
6
|
+
declare const outlineWidthGroupFocusClass = "group-focus-visible:outline-3";
|
|
7
|
+
declare const outlineOffsetClass = "outline-offset-1";
|
|
8
|
+
declare const outlineInsetClass = "-outline-offset-3";
|
|
9
|
+
declare const tertiaryOutlineColorClass = "outline-[rgba(var(--mui-palette-secondary-mainChannel)_/_0.5)]";
|
|
10
|
+
declare const strongSolidPressableClass: string;
|
|
11
|
+
declare const mutedBgClass = "bg-[rgba(var(--mui-palette-text-primaryChannel)_/_0.08)]";
|
|
12
|
+
declare const mutedHoverPressableClass: string;
|
|
13
|
+
declare const faintBgClass = "bg-[rgba(var(--mui-palette-text-primaryChannel)_/_0.04)]";
|
|
14
|
+
declare const faintHoverPressableClass: string;
|
|
15
|
+
declare const faintSolidBgClass = "[background:linear-gradient(rgba(var(--mui-palette-text-primaryChannel)_/_0.04),rgba(var(--mui-palette-text-primaryChannel)_/_0.04))_var(--mui-palette-background-paper)]";
|
|
16
|
+
declare const tertiaryClass = "bg-(--mui-palette-secondary-main) text-(--mui-palette-secondary-contrastText)";
|
|
17
|
+
declare const tertiaryPressableClass: string;
|
|
18
|
+
declare const tertiaryPressableGroupClass: string;
|
|
19
|
+
declare const rowPointerResizerClass: string;
|
|
20
|
+
declare const rowTouchResizerClass: string;
|
|
21
|
+
declare const tallDayCellBottomClass = "min-h-3";
|
|
22
|
+
declare const getShortDayCellBottomClass: (data: DayCellData) => string;
|
|
23
|
+
declare const dayRowCommonClasses: CalendarOptions;
|
|
24
|
+
interface EventCalendarViewsProps extends CalendarOptions {
|
|
25
|
+
liquidHeight?: boolean;
|
|
26
|
+
}
|
|
27
|
+
declare function EventCalendarViews({ className, liquidHeight, height, views: userViews, ...restOptions }: EventCalendarViewsProps): React.JSX.Element;
|
|
28
|
+
|
|
29
|
+
export { EventCalendarViewsProps, dayRowCommonClasses, EventCalendarViews as default, faintBgClass, faintHoverPressableClass, faintSolidBgClass, getShortDayCellBottomClass, mutedBgClass, mutedHoverPressableClass, outlineInsetClass, outlineOffsetClass, outlineWidthClass, outlineWidthFocusClass, outlineWidthGroupFocusClass, rowPointerResizerClass, rowTouchResizerClass, strongSolidPressableClass, tallDayCellBottomClass, tertiaryClass, tertiaryOutlineColorClass, tertiaryPressableClass, tertiaryPressableGroupClass };
|