@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.
Files changed (128) hide show
  1. package/LICENSE.md +22 -0
  2. package/README.md +79 -0
  3. package/breezy/theme.css +987 -0
  4. package/cjs/breezy/EventCalendar.cjs +62 -0
  5. package/cjs/breezy/EventCalendarContainer.cjs +35 -0
  6. package/cjs/breezy/EventCalendarToolbar.cjs +65 -0
  7. package/cjs/breezy/EventCalendarViews.cjs +283 -0
  8. package/cjs/breezy/ResourceTimeGrid.cjs +57 -0
  9. package/cjs/breezy/ResourceTimeline.cjs +54 -0
  10. package/cjs/breezy/SchedulerViews.cjs +70 -0
  11. package/cjs/breezy/icons.cjs +37 -0
  12. package/cjs/classic/EventCalendar.cjs +62 -0
  13. package/cjs/classic/EventCalendarContainer.cjs +22 -0
  14. package/cjs/classic/EventCalendarToolbar.cjs +62 -0
  15. package/cjs/classic/EventCalendarViews.cjs +230 -0
  16. package/cjs/classic/ResourceTimeGrid.cjs +57 -0
  17. package/cjs/classic/ResourceTimeline.cjs +54 -0
  18. package/cjs/classic/SchedulerViews.cjs +74 -0
  19. package/cjs/classic/icons.cjs +37 -0
  20. package/cjs/forma/EventCalendar.cjs +62 -0
  21. package/cjs/forma/EventCalendarContainer.cjs +35 -0
  22. package/cjs/forma/EventCalendarToolbar.cjs +64 -0
  23. package/cjs/forma/EventCalendarViews.cjs +251 -0
  24. package/cjs/forma/ResourceTimeGrid.cjs +57 -0
  25. package/cjs/forma/ResourceTimeline.cjs +54 -0
  26. package/cjs/forma/SchedulerViews.cjs +62 -0
  27. package/cjs/forma/icons.cjs +37 -0
  28. package/cjs/monarch/EventCalendar.cjs +62 -0
  29. package/cjs/monarch/EventCalendarContainer.cjs +35 -0
  30. package/cjs/monarch/EventCalendarToolbar.cjs +62 -0
  31. package/cjs/monarch/EventCalendarViews.cjs +252 -0
  32. package/cjs/monarch/ResourceTimeGrid.cjs +57 -0
  33. package/cjs/monarch/ResourceTimeline.cjs +54 -0
  34. package/cjs/monarch/SchedulerViews.cjs +83 -0
  35. package/cjs/monarch/icons.cjs +37 -0
  36. package/cjs/pulse/EventCalendar.cjs +62 -0
  37. package/cjs/pulse/EventCalendarContainer.cjs +22 -0
  38. package/cjs/pulse/EventCalendarToolbar.cjs +62 -0
  39. package/cjs/pulse/EventCalendarViews.cjs +268 -0
  40. package/cjs/pulse/ResourceTimeGrid.cjs +57 -0
  41. package/cjs/pulse/ResourceTimeline.cjs +54 -0
  42. package/cjs/pulse/SchedulerViews.cjs +58 -0
  43. package/cjs/pulse/icons.cjs +37 -0
  44. package/classic/theme.css +811 -0
  45. package/esm/breezy/EventCalendar.d.ts +15 -0
  46. package/esm/breezy/EventCalendar.js +49 -0
  47. package/esm/breezy/EventCalendarContainer.d.ts +15 -0
  48. package/esm/breezy/EventCalendarContainer.js +26 -0
  49. package/esm/breezy/EventCalendarToolbar.d.ts +16 -0
  50. package/esm/breezy/EventCalendarToolbar.js +51 -0
  51. package/esm/breezy/EventCalendarViews.d.ts +33 -0
  52. package/esm/breezy/EventCalendarViews.js +250 -0
  53. package/esm/breezy/ResourceTimeGrid.d.ts +15 -0
  54. package/esm/breezy/ResourceTimeGrid.js +45 -0
  55. package/esm/breezy/ResourceTimeline.d.ts +15 -0
  56. package/esm/breezy/ResourceTimeline.js +43 -0
  57. package/esm/breezy/SchedulerViews.d.ts +8 -0
  58. package/esm/breezy/SchedulerViews.js +62 -0
  59. package/esm/breezy/icons.d.ts +11 -0
  60. package/esm/breezy/icons.js +22 -0
  61. package/esm/classic/EventCalendar.d.ts +15 -0
  62. package/esm/classic/EventCalendar.js +49 -0
  63. package/esm/classic/EventCalendarContainer.d.ts +11 -0
  64. package/esm/classic/EventCalendarContainer.js +13 -0
  65. package/esm/classic/EventCalendarToolbar.d.ts +17 -0
  66. package/esm/classic/EventCalendarToolbar.js +48 -0
  67. package/esm/classic/EventCalendarViews.d.ts +31 -0
  68. package/esm/classic/EventCalendarViews.js +205 -0
  69. package/esm/classic/ResourceTimeGrid.d.ts +15 -0
  70. package/esm/classic/ResourceTimeGrid.js +45 -0
  71. package/esm/classic/ResourceTimeline.d.ts +15 -0
  72. package/esm/classic/ResourceTimeline.js +43 -0
  73. package/esm/classic/SchedulerViews.d.ts +8 -0
  74. package/esm/classic/SchedulerViews.js +66 -0
  75. package/esm/classic/icons.d.ts +11 -0
  76. package/esm/classic/icons.js +22 -0
  77. package/esm/forma/EventCalendar.d.ts +15 -0
  78. package/esm/forma/EventCalendar.js +49 -0
  79. package/esm/forma/EventCalendarContainer.d.ts +15 -0
  80. package/esm/forma/EventCalendarContainer.js +26 -0
  81. package/esm/forma/EventCalendarToolbar.d.ts +16 -0
  82. package/esm/forma/EventCalendarToolbar.js +50 -0
  83. package/esm/forma/EventCalendarViews.d.ts +30 -0
  84. package/esm/forma/EventCalendarViews.js +221 -0
  85. package/esm/forma/ResourceTimeGrid.d.ts +15 -0
  86. package/esm/forma/ResourceTimeGrid.js +45 -0
  87. package/esm/forma/ResourceTimeline.d.ts +15 -0
  88. package/esm/forma/ResourceTimeline.js +43 -0
  89. package/esm/forma/SchedulerViews.d.ts +8 -0
  90. package/esm/forma/SchedulerViews.js +54 -0
  91. package/esm/forma/icons.d.ts +11 -0
  92. package/esm/forma/icons.js +22 -0
  93. package/esm/monarch/EventCalendar.d.ts +15 -0
  94. package/esm/monarch/EventCalendar.js +49 -0
  95. package/esm/monarch/EventCalendarContainer.d.ts +15 -0
  96. package/esm/monarch/EventCalendarContainer.js +26 -0
  97. package/esm/monarch/EventCalendarToolbar.d.ts +16 -0
  98. package/esm/monarch/EventCalendarToolbar.js +48 -0
  99. package/esm/monarch/EventCalendarViews.d.ts +27 -0
  100. package/esm/monarch/EventCalendarViews.js +225 -0
  101. package/esm/monarch/ResourceTimeGrid.d.ts +15 -0
  102. package/esm/monarch/ResourceTimeGrid.js +45 -0
  103. package/esm/monarch/ResourceTimeline.d.ts +15 -0
  104. package/esm/monarch/ResourceTimeline.js +43 -0
  105. package/esm/monarch/SchedulerViews.d.ts +8 -0
  106. package/esm/monarch/SchedulerViews.js +75 -0
  107. package/esm/monarch/icons.d.ts +11 -0
  108. package/esm/monarch/icons.js +22 -0
  109. package/esm/pulse/EventCalendar.d.ts +15 -0
  110. package/esm/pulse/EventCalendar.js +49 -0
  111. package/esm/pulse/EventCalendarContainer.d.ts +11 -0
  112. package/esm/pulse/EventCalendarContainer.js +13 -0
  113. package/esm/pulse/EventCalendarToolbar.d.ts +17 -0
  114. package/esm/pulse/EventCalendarToolbar.js +48 -0
  115. package/esm/pulse/EventCalendarViews.d.ts +29 -0
  116. package/esm/pulse/EventCalendarViews.js +239 -0
  117. package/esm/pulse/ResourceTimeGrid.d.ts +15 -0
  118. package/esm/pulse/ResourceTimeGrid.js +45 -0
  119. package/esm/pulse/ResourceTimeline.d.ts +15 -0
  120. package/esm/pulse/ResourceTimeline.js +43 -0
  121. package/esm/pulse/SchedulerViews.d.ts +8 -0
  122. package/esm/pulse/SchedulerViews.js +50 -0
  123. package/esm/pulse/icons.d.ts +11 -0
  124. package/esm/pulse/icons.js +22 -0
  125. package/forma/theme.css +936 -0
  126. package/monarch/theme.css +1014 -0
  127. package/package.json +371 -0
  128. package/pulse/theme.css +913 -0
@@ -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, 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,54 @@
1
+ import React from 'react';
2
+ import { joinClassNames } from '@fullcalendar/core';
3
+ import EventCalendarViews, { mutedBgClass, mutedHoverPressableClass, outlineWidthFocusClass, primaryOutlineColorClass, strongSolidPressableClass } 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
+ function SchedulerViews({ views: userViews, ...restOptions }) {
13
+ return (React.createElement(EventCalendarViews
14
+ /* Resource Day Header
15
+ ------------------------------------------------------------------------------------------- */
16
+ , {
17
+ /* Resource Day Header
18
+ ------------------------------------------------------------------------------------------- */
19
+ resourceDayHeaderClass: (data) => joinClassNames("fc-forma-UZp", data.isMajor
20
+ ? "fc-forma-I55"
21
+ : "fc-forma-G56"), resourceDayHeaderInnerClass: (data) => joinClassNames("fc-forma-aS8 fc-forma-Hhr fc-forma-bXY", data.isNarrow ? "fc-forma-17F" : "fc-forma-gEy"),
22
+ /* Resource Data Grid
23
+ ------------------------------------------------------------------------------------------- */
24
+ resourceColumnHeaderClass: "fc-forma-UZp fc-forma-G56 fc-forma-a65", resourceColumnHeaderInnerClass: "fc-forma-aS8 fc-forma-gEy", resourceColumnResizerClass: "fc-forma-YA2 fc-forma-8ZZ fc-forma-Ahl fc-forma-W3O", resourceGroupHeaderClass: `fc-forma-UZp fc-forma-G56 ${mutedBgClass}`, resourceGroupHeaderInnerClass: "fc-forma-aS8 fc-forma-gEy", resourceCellClass: "fc-forma-UZp fc-forma-G56", resourceCellInnerClass: "fc-forma-aS8 fc-forma-gEy", resourceIndentClass: "fc-forma-fpO fc-forma-aCj fc-forma-a65", resourceExpanderClass: `fc-forma-ytQ fc-forma-KbZ fc-forma-dpa ${mutedHoverPressableClass} ${outlineWidthFocusClass} ${primaryOutlineColorClass}`, resourceExpanderContent: (data) => (React.createElement(EventCalendarExpanderIcon, { isExpanded: data.isExpanded })), resourceHeaderRowClass: "fc-forma-UZp fc-forma-G56", resourceRowClass: "fc-forma-UZp fc-forma-G56", resourceColumnDividerClass: `fc-forma-zDQ fc-forma-G56 fc-forma-qNU ${mutedBgClass}`,
25
+ /* Timeline Lane
26
+ ------------------------------------------------------------------------------------------- */
27
+ resourceGroupLaneClass: `fc-forma-UZp fc-forma-G56 ${mutedBgClass}`, resourceLaneClass: "fc-forma-UZp fc-forma-G56", resourceLaneBottomClass: (data) => joinClassNames(data.options.eventOverlap && "fc-forma-3fr"), timelineBottomClass: "fc-forma-3fr",
28
+ /* View-Specific Options
29
+ ------------------------------------------------------------------------------------------- */
30
+ views: {
31
+ ...userViews,
32
+ timeline: {
33
+ /* Timeline > Row Event
34
+ --------------------------------------------------------------------------------------- */
35
+ rowEventClass: (data) => joinClassNames(data.isEnd && "fc-forma-bpq"),
36
+ rowEventInnerClass: (data) => (data.options.eventOverlap
37
+ ? "fc-forma-CeL"
38
+ : "fc-forma-KyB"),
39
+ /* Timeline > More-Link
40
+ --------------------------------------------------------------------------------------- */
41
+ rowMoreLinkClass: `fc-forma-bpq fc-forma-mwm fc-forma-dpa fc-forma-UZp fc-forma-lqW fc-forma-ePV ${strongSolidPressableClass} fc-forma-82y`,
42
+ rowMoreLinkInnerClass: "fc-forma-qB7 fc-forma-CeL fc-forma-17F",
43
+ /* Timeline > Slot Header
44
+ --------------------------------------------------------------------------------------- */
45
+ slotHeaderAlign: (data) => data.isTime ? "start" : "center",
46
+ slotHeaderClass: "fc-forma-a65",
47
+ slotHeaderInnerClass: (data) => joinClassNames("fc-forma-aS8 fc-forma-gEy", data.hasNavLink && "fc-forma-jaW"),
48
+ slotHeaderDividerClass: `fc-forma-QTT fc-forma-G56`,
49
+ ...userViews?.timeline,
50
+ },
51
+ }, ...restOptions }));
52
+ }
53
+
54
+ 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-forma-5Kh fc-forma-HHp fc-forma-La2";
9
+ function EventCalendarPrevIcon() {
10
+ return React.createElement(ChevronLeftIcon, { className: "fc-forma-AAt" });
11
+ }
12
+ function EventCalendarNextIcon() {
13
+ return React.createElement(ChevronRightIcon, { className: "fc-forma-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-forma-doO fc-forma-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, borderless: restOptions.borderless, borderlessX: restOptions.borderlessX, borderlessTop: restOptions.borderlessTop, borderlessBottom: restOptions.borderlessBottom },
45
+ React.createElement(EventCalendarToolbar, { controller: controller, availableViews: availableViews, addButton: addButton }),
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,15 @@
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
+ borderless: boolean | undefined;
8
+ borderlessX: boolean | undefined;
9
+ borderlessTop: boolean | undefined;
10
+ borderlessBottom: boolean | undefined;
11
+ children: ReactNode;
12
+ }
13
+ declare function EventCalendarContainer(props: EventCalendarContainerProps): React.JSX.Element;
14
+
15
+ export { EventCalendarContainerProps, EventCalendarContainer as default };
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import Box from '@mui/material/Box';
3
+
4
+ function EventCalendarContainer(props) {
5
+ const borderlessX = props.borderlessX ?? props.borderless;
6
+ const borderlessTop = props.borderlessTop ?? props.borderless;
7
+ const borderlessBottom = props.borderlessBottom ?? props.borderless;
8
+ return (React.createElement(Box, { dir: props.direction === 'rtl' ? 'rtl' : undefined, className: props.className, sx: {
9
+ display: 'flex',
10
+ flexDirection: 'column',
11
+ height: props.height,
12
+ bgcolor: 'background.paper',
13
+ borderStyle: 'solid',
14
+ borderColor: 'divider',
15
+ borderLeftWidth: borderlessX ? 0 : 1,
16
+ borderRightWidth: borderlessX ? 0 : 1,
17
+ borderTopWidth: borderlessTop ? 0 : 1,
18
+ borderBottomWidth: borderlessBottom ? 0 : 1,
19
+ ...(borderlessX || borderlessTop || borderlessBottom ? {} : {
20
+ borderRadius: 1,
21
+ overflow: 'hidden',
22
+ })
23
+ } }, props.children));
24
+ }
25
+
26
+ export { EventCalendarContainer as default };
@@ -0,0 +1,16 @@
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
+ }
14
+ declare function EventCalendarToolbar({ controller, availableViews, addButton, }: EventCalendarToolbarProps): React.JSX.Element;
15
+
16
+ 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, }) {
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
+ padding: 2,
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,27 @@
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 tertiaryOutlineColorClass = "outline-[rgba(var(--mui-palette-secondary-mainChannel)_/_0.5)]";
8
+ declare const strongSolidPressableClass: string;
9
+ declare const mutedBgClass = "bg-[rgba(var(--mui-palette-text-primaryChannel)_/_0.08)]";
10
+ declare const mutedHoverPressableClass: string;
11
+ declare const faintBgClass = "bg-[rgba(var(--mui-palette-text-primaryChannel)_/_0.04)]";
12
+ declare const secondaryClass = "bg-[rgba(var(--mui-palette-primary-mainChannel)_/_0.15)] brightness-110";
13
+ declare const secondaryPressableClass: string;
14
+ declare const tertiaryClass = "bg-(--mui-palette-secondary-main) text-(--mui-palette-secondary-contrastText)";
15
+ declare const tertiaryPressableClass: string;
16
+ declare const tertiaryPressableGroupClass: string;
17
+ declare const rowPointerResizerClass: string;
18
+ declare const rowTouchResizerClass: string;
19
+ declare const tallDayCellBottomClass = "min-h-4";
20
+ declare const getShortDayCellBottomClass: (data: DayCellData) => string;
21
+ declare const dayRowCommonClasses: CalendarOptions;
22
+ interface EventCalendarViewsProps extends CalendarOptions {
23
+ liquidHeight?: boolean;
24
+ }
25
+ declare function EventCalendarViews({ className, liquidHeight, height, views: userViews, ...restOptions }: EventCalendarViewsProps): React.JSX.Element;
26
+
27
+ export { EventCalendarViewsProps, dayRowCommonClasses, EventCalendarViews as default, faintBgClass, getShortDayCellBottomClass, mutedBgClass, mutedHoverPressableClass, outlineWidthClass, outlineWidthFocusClass, outlineWidthGroupFocusClass, rowPointerResizerClass, rowTouchResizerClass, secondaryClass, secondaryPressableClass, strongSolidPressableClass, tallDayCellBottomClass, tertiaryClass, tertiaryOutlineColorClass, tertiaryPressableClass, tertiaryPressableGroupClass };
@@ -0,0 +1,225 @@
1
+ import React from 'react';
2
+ import FullCalendar from '@fullcalendar/react';
3
+ import { joinClassNames } from '@fullcalendar/core';
4
+ import { Box } from '@mui/material';
5
+ import { EventCalendarCloseIcon } from './icons.js';
6
+ import '@mui/icons-material/ChevronLeft';
7
+ import '@mui/icons-material/ChevronRight';
8
+ import '@mui/icons-material/Close';
9
+ import '@mui/icons-material/ExpandMore';
10
+
11
+ // outline
12
+ const outlineWidthClass = "fc-monarch-bAU";
13
+ const outlineWidthFocusClass = "fc-monarch-Tid";
14
+ const outlineWidthGroupFocusClass = "fc-monarch-14w";
15
+ const tertiaryOutlineColorClass = "fc-monarch-sVX";
16
+ // strongest (25%)
17
+ const strongestSolidBgActiveClass = "fc-monarch-lS3";
18
+ // stronger (20%)
19
+ const strongerSolidBgHoverClass = "fc-monarch-fEn";
20
+ // strong (16%)
21
+ const strongBgFocusClass = "fc-monarch-WPX";
22
+ const strongBgFocusGroupClass = "fc-monarch-S6B";
23
+ const strongBgActiveClass = "fc-monarch-kup";
24
+ const strongBgActiveGroupClass = "fc-monarch-8bm";
25
+ const strongSolidBgClass = "fc-monarch-5V9";
26
+ const strongSolidPressableClass = `${strongSolidBgClass} ${strongerSolidBgHoverClass} ${strongestSolidBgActiveClass}`;
27
+ // muted (8%)
28
+ const mutedBgClass = "fc-monarch-VxY";
29
+ const mutedBgHoverClass = "fc-monarch-znR";
30
+ const mutedBgHoverGroupClass = "fc-monarch-1Co";
31
+ const mutedHoverPressableClass = `${mutedBgHoverClass} ${strongBgFocusClass} ${strongBgActiveClass}`;
32
+ const mutedHoverPressableGroupClass = `${mutedBgHoverGroupClass} ${strongBgFocusGroupClass} ${strongBgActiveGroupClass}`;
33
+ // faint (4%)
34
+ const faintBgClass = "fc-monarch-IKt";
35
+ // secondary (less-contrasty version of primary)
36
+ const secondaryClass = "fc-monarch-x22 brightness-110";
37
+ const secondaryPressableClass = `${secondaryClass} fc-monarch-me9 fc-monarch-LYL`;
38
+ // tertiary (it's actually MUI's "secondary", like an accent color)
39
+ const tertiaryClass = "fc-monarch-s3B fc-monarch-BIe";
40
+ const tertiaryPressableClass = `${tertiaryClass} fc-monarch-Ry9 fc-monarch-ra6`;
41
+ const tertiaryPressableGroupClass = `${tertiaryClass} fc-monarch-BVo fc-monarch-3U0`;
42
+ // usually 11px font / 12px line-height
43
+ const xxsTextClass = "fc-monarch-HRt";
44
+ // transparent resizer for mouse
45
+ const blockPointerResizerClass = "fc-monarch-YA2 fc-monarch-C9h fc-monarch-ZkV";
46
+ const rowPointerResizerClass = `${blockPointerResizerClass} fc-monarch-8ZZ fc-monarch-1lj`;
47
+ const columnPointerResizerClass = `${blockPointerResizerClass} fc-monarch-xX5 fc-monarch-433`;
48
+ // circle resizer for touch
49
+ const blockTouchResizerClass = `fc-monarch-YA2 fc-monarch-tEU fc-monarch-UZp fc-monarch-qvz fc-monarch-Y27 fc-monarch-IdG`;
50
+ const rowTouchResizerClass = `${blockTouchResizerClass} fc-monarch-if4 fc-monarch-NN9`;
51
+ const columnTouchResizerClass = `${blockTouchResizerClass} fc-monarch-Z2g fc-monarch-RWU`;
52
+ const tallDayCellBottomClass = "fc-monarch-DLQ";
53
+ const getShortDayCellBottomClass = (data) => joinClassNames(!data.isNarrow && "fc-monarch-WoG");
54
+ const dayRowCommonClasses = {
55
+ /* Day Row > List-Item Event
56
+ ----------------------------------------------------------------------------------------------- */
57
+ listItemEventClass: (data) => joinClassNames("fc-monarch-mwm fc-monarch-df6 fc-monarch-dpa", data.isNarrow ? "fc-monarch-6gf" : "fc-monarch-qK4"),
58
+ listItemEventBeforeClass: (data) => joinClassNames("fc-monarch-PrA", data.isNarrow ? "fc-monarch-GSF" : "fc-monarch-fpO"),
59
+ listItemEventInnerClass: (data) => (data.isNarrow
60
+ ? `fc-monarch-h2r ${xxsTextClass}`
61
+ : "fc-monarch-vvo fc-monarch-17F"),
62
+ listItemEventTimeClass: (data) => joinClassNames(data.isNarrow ? "fc-monarch-qNU" : "fc-monarch-I6e", "fc-monarch-JTJ fc-monarch-O5O fc-monarch-qbn"),
63
+ listItemEventTitleClass: (data) => joinClassNames(data.isNarrow ? "fc-monarch-55Y" : "fc-monarch-qB7", "fc-monarch-Kw3 fc-monarch-JTJ fc-monarch-O5O fc-monarch-nGI"),
64
+ /* Day Row > Row Event
65
+ ----------------------------------------------------------------------------------------------- */
66
+ rowEventClass: (data) => joinClassNames(data.isStart && "fc-monarch-9ZR", data.isEnd && "fc-monarch-bpq"),
67
+ rowEventInnerClass: (data) => data.isNarrow ? "fc-monarch-h2r" : "fc-monarch-vvo",
68
+ /* Day Row > More-Link
69
+ ----------------------------------------------------------------------------------------------- */
70
+ rowMoreLinkClass: (data) => joinClassNames("fc-monarch-mwm fc-monarch-UZp fc-monarch-dpa", data.isNarrow
71
+ ? `fc-monarch-6gf fc-monarch-R95`
72
+ : "fc-monarch-qK4 fc-monarch-lqW", mutedHoverPressableClass),
73
+ rowMoreLinkInnerClass: (data) => (data.isNarrow
74
+ ? `fc-monarch-55Y fc-monarch-h2r ${xxsTextClass}`
75
+ : "fc-monarch-qB7 fc-monarch-vvo fc-monarch-17F"),
76
+ };
77
+ function EventCalendarViews({ className, liquidHeight, height, views: userViews, ...restOptions }) {
78
+ return (React.createElement(Box, { className: className, sx: liquidHeight ? { flexGrow: 1, minHeight: 0 } : {} },
79
+ React.createElement(FullCalendar, { className: "fc-monarch-ND7", height: liquidHeight ? "100%" : height,
80
+ /* Abstract Event
81
+ ----------------------------------------------------------------------------------------- */
82
+ eventShortHeight: 50, eventColor: "var(--mui-palette-primary-main)", eventContrastColor: "var(--mui-palette-primary-contrastText)", eventClass: (data) => joinClassNames(data.isSelected
83
+ ? joinClassNames(outlineWidthClass, data.isDragging ? "fc-monarch-ACR" : "fc-monarch-iqH")
84
+ : outlineWidthFocusClass, tertiaryOutlineColorClass),
85
+ /* Background Event
86
+ ----------------------------------------------------------------------------------------- */
87
+ backgroundEventColor: "var(--mui-palette-secondary-main)", backgroundEventClass: "fc-monarch-Z7B", backgroundEventTitleClass: (data) => joinClassNames("fc-monarch-F6C fc-monarch-dra", data.isNarrow
88
+ ? `fc-monarch-qB7 fc-monarch-uBa ${xxsTextClass}`
89
+ : "fc-monarch-ybQ fc-monarch-H35 fc-monarch-17F"),
90
+ /* List-Item Event
91
+ ----------------------------------------------------------------------------------------- */
92
+ listItemEventClass: (data) => joinClassNames("fc-monarch-gfU", data.isSelected
93
+ ? mutedBgClass
94
+ : data.isInteractive
95
+ ? mutedHoverPressableClass
96
+ : mutedBgHoverClass), listItemEventBeforeClass: "fc-monarch-IdG fc-monarch-qvz", listItemEventInnerClass: "fc-monarch-Hhr fc-monarch-uEy fc-monarch-gfU",
97
+ /* Block Event
98
+ ----------------------------------------------------------------------------------------- */
99
+ blockEventClass: (data) => joinClassNames("fc-monarch-ytQ fc-monarch-vPs fc-monarch-lqW fc-monarch-iVS fc-monarch-n4P fc-monarch-NNx fc-monarch-82y", data.isInteractive && "fc-monarch-CdS", (!data.isSelected && data.isDragging) && "fc-monarch-0HG"), blockEventInnerClass: "fc-monarch-P9J fc-monarch-Nt8", blockEventTimeClass: "fc-monarch-JTJ fc-monarch-O5O", blockEventTitleClass: "fc-monarch-JTJ fc-monarch-O5O",
100
+ /* Row Event
101
+ ----------------------------------------------------------------------------------------- */
102
+ rowEventClass: (data) => joinClassNames("fc-monarch-mwm fc-monarch-3WQ", data.isStart ? "fc-monarch-riW fc-monarch-fdR" : (!data.isNarrow && "fc-monarch-twY"), data.isEnd ? "fc-monarch-EWl fc-monarch-Ea4" : (!data.isNarrow && "fc-monarch-nAc")), rowEventBeforeClass: (data) => joinClassNames(data.isStartResizable ? joinClassNames(data.isSelected ? rowTouchResizerClass : rowPointerResizerClass, "fc-monarch-BD7") : (!data.isStart && !data.isNarrow) && ("fc-monarch-YA2 fc-monarch-x0Q fc-monarch-1lj fc-monarch-2Eu fc-monarch-DkH")), rowEventBeforeContent: (data) => ((!data.isStart && !data.isNarrow) ? filledRightTriangle("fc-monarch-WTc fc-monarch-3O3 fc-monarch-UQh fc-monarch-XxY") : React.createElement(React.Fragment, null) // HACK for React vdom
103
+ ), rowEventAfterClass: (data) => joinClassNames(data.isEndResizable ? joinClassNames(data.isSelected ? rowTouchResizerClass : rowPointerResizerClass, "fc-monarch-8rg") : (!data.isEnd && !data.isNarrow) && ("fc-monarch-YA2 fc-monarch-pjB fc-monarch-1lj fc-monarch-2Eu fc-monarch-DkH")), rowEventAfterContent: (data) => ((!data.isEnd && !data.isNarrow) ? filledRightTriangle("fc-monarch-WTc fc-monarch-AAt fc-monarch-XxY") : React.createElement(React.Fragment, null) // HACK for React vdom
104
+ ), rowEventInnerClass: (data) => joinClassNames("fc-monarch-Hhr fc-monarch-uEy fc-monarch-gfU", data.isNarrow ? xxsTextClass : "fc-monarch-17F"), rowEventTimeClass: (data) => joinClassNames("fc-monarch-Kw3 fc-monarch-qbn", data.isNarrow ? "fc-monarch-qNU" : "fc-monarch-I6e"), rowEventTitleClass: (data) => joinClassNames("fc-monarch-nGI", data.isNarrow ? "fc-monarch-55Y" : "fc-monarch-qB7"),
105
+ /* Column Event
106
+ ----------------------------------------------------------------------------------------- */
107
+ columnEventTitleSticky: false, columnEventClass: (data) => joinClassNames("fc-monarch-zDQ fc-monarch-z3l fc-monarch-bLM", data.isStart && "fc-monarch-srs fc-monarch-ugX", data.isEnd && "fc-monarch-mwm fc-monarch-QTT fc-monarch-7zG"), columnEventBeforeClass: (data) => joinClassNames(data.isStartResizable && joinClassNames(data.isSelected ? columnTouchResizerClass : columnPointerResizerClass, "fc-monarch-f4s")), columnEventAfterClass: (data) => joinClassNames(data.isEndResizable && joinClassNames(data.isSelected ? columnTouchResizerClass : columnPointerResizerClass, "fc-monarch-I8n")), columnEventInnerClass: (data) => joinClassNames("fc-monarch-Hhr", data.isShort
108
+ ? "fc-monarch-uEy fc-monarch-gfU fc-monarch-xbC fc-monarch-RVT"
109
+ : joinClassNames("fc-monarch-bXY", data.isNarrow ? "fc-monarch-qB7 fc-monarch-vvo" : "fc-monarch-ybQ fc-monarch-ztx"), (data.isShort || data.isNarrow) ? xxsTextClass : "fc-monarch-17F"), columnEventTimeClass: (data) => joinClassNames("fc-monarch-V3u fc-monarch-nGI", !data.isShort && (data.isNarrow ? "fc-monarch-yJv" : "fc-monarch-5SQ")), columnEventTitleClass: (data) => joinClassNames("fc-monarch-qbn", !data.isShort && (data.isNarrow ? "fc-monarch-vvo" : "fc-monarch-ztx")),
110
+ /* More-Link
111
+ ----------------------------------------------------------------------------------------- */
112
+ moreLinkClass: `${outlineWidthFocusClass} ${tertiaryOutlineColorClass}`, moreLinkInnerClass: "fc-monarch-JTJ fc-monarch-O5O", columnMoreLinkClass: `fc-monarch-mwm fc-monarch-UZp fc-monarch-lqW fc-monarch-ePV fc-monarch-dpa ${strongSolidPressableClass} fc-monarch-82y fc-monarch-z3l fc-monarch-bLM`, columnMoreLinkInnerClass: (data) => (data.isNarrow
113
+ ? `fc-monarch-KbZ ${xxsTextClass}`
114
+ : "fc-monarch-xbC fc-monarch-17F"),
115
+ /* Day Header
116
+ ----------------------------------------------------------------------------------------- */
117
+ dayHeaderAlign: "center", dayHeaderClass: (data) => joinClassNames("fc-monarch-a65", data.isMajor && "fc-monarch-UZp fc-monarch-I55", (data.isDisabled && !data.inPopover) && faintBgClass), dayHeaderInnerClass: "fc-monarch-ytQ fc-monarch-luY fc-monarch-NoV fc-monarch-Hhr fc-monarch-bXY fc-monarch-gfU fc-monarch-3jE", dayHeaderContent: (data) => (React.createElement(React.Fragment, null,
118
+ data.weekdayText && (React.createElement("div", { className: joinClassNames("fc-monarch-17F fc-monarch-KNZ", "fc-monarch-Znt") }, data.weekdayText)),
119
+ data.dayNumberText && (React.createElement("div", { className: joinClassNames("fc-monarch-ncn fc-monarch-IdG fc-monarch-Hhr fc-monarch-uEy fc-monarch-gfU fc-monarch-a65", data.isNarrow
120
+ ? "fc-monarch-GRI fc-monarch-4Bx"
121
+ : "fc-monarch-UvV fc-monarch-7Kt", data.isToday
122
+ ? (data.hasNavLink ? tertiaryPressableGroupClass : tertiaryClass)
123
+ : (data.hasNavLink && mutedHoverPressableGroupClass), data.hasNavLink && joinClassNames(outlineWidthGroupFocusClass, tertiaryOutlineColorClass)) }, data.dayNumberText)))),
124
+ /* Day Cell
125
+ ----------------------------------------------------------------------------------------- */
126
+ dayCellClass: (data) => joinClassNames("fc-monarch-UZp", data.isMajor ? "fc-monarch-I55" : "fc-monarch-G56", data.isDisabled && faintBgClass), dayCellTopClass: (data) => joinClassNames("fc-monarch-Hhr fc-monarch-uEy", data.isNarrow
127
+ ? "fc-monarch-RhI fc-monarch-WoG"
128
+ : "fc-monarch-a65 fc-monarch-s9U"), dayCellTopInnerClass: (data) => joinClassNames("fc-monarch-Hhr fc-monarch-uEy fc-monarch-gfU fc-monarch-a65 fc-monarch-JTJ fc-monarch-IdG", data.isNarrow
129
+ ? `fc-monarch-64j fc-monarch-cL9 ${xxsTextClass}`
130
+ : "fc-monarch-RQK fc-monarch-6U1 fc-monarch-gEy", data.text === data.dayNumberText
131
+ ? (data.isNarrow ? "fc-monarch-CSa" : "fc-monarch-IdL")
132
+ : (data.isNarrow ? "fc-monarch-qB7" : "fc-monarch-ybQ"), data.isToday
133
+ ? (data.hasNavLink ? tertiaryPressableClass : tertiaryClass)
134
+ : (data.hasNavLink && mutedHoverPressableClass), data.isOther && "fc-monarch-x07", data.monthText && "fc-monarch-Kw3"), dayCellInnerClass: (data) => joinClassNames(data.inPopover && "fc-monarch-aS8"),
135
+ /* Popover
136
+ ----------------------------------------------------------------------------------------- */
137
+ dayPopoverFormat: { day: "numeric", weekday: "short" }, popoverClass: "fc-monarch-HBk fc-monarch-Y27 fc-monarch-DC1 fc-monarch-8Kl fc-monarch-O5O fc-monarch-uPX fc-monarch-c0k fc-monarch-jse fc-monarch-ND7", popoverCloseClass: `fc-monarch-ytQ fc-monarch-YA2 fc-monarch-bEj fc-monarch-q2P fc-monarch-UvV fc-monarch-IdG fc-monarch-gfU fc-monarch-a65 ${mutedHoverPressableClass} ${outlineWidthFocusClass} ${tertiaryOutlineColorClass} fc-monarch-om0`, popoverCloseContent: () => React.createElement(EventCalendarCloseIcon, null), dayLaneClass: (data) => joinClassNames("fc-monarch-UZp", data.isMajor ? "fc-monarch-I55" : "fc-monarch-G56", data.isDisabled && faintBgClass), dayLaneInnerClass: (data) => (data.isStack
138
+ ? "fc-monarch-JQD"
139
+ : data.isNarrow ? "fc-monarch-6gf" : "fc-monarch-GSF fc-monarch-Dk5"), slotLaneClass: (data) => joinClassNames("fc-monarch-UZp fc-monarch-G56", data.isMinor && "fc-monarch-M5N"), listDayFormat: { day: "numeric" }, listDaySideFormat: { month: "short", weekday: "short", forceCommas: true }, listDayClass: "fc-monarch-2uq fc-monarch-G56 fc-monarch-Hhr fc-monarch-uEy fc-monarch-lUe", listDayHeaderClass: "fc-monarch-c0k fc-monarch-yvz fc-monarch-hhB fc-monarch-Aks fc-monarch-Lh0 fc-monarch-Hhr fc-monarch-uEy fc-monarch-gfU fc-monarch-ODb", listDayHeaderInnerClass: (data) => (!data.level
140
+ ? joinClassNames("fc-monarch-G97 fc-monarch-IdG fc-monarch-Hhr fc-monarch-uEy fc-monarch-gfU fc-monarch-7Kt", data.text === data.dayNumberText
141
+ ? "fc-monarch-3Ka fc-monarch-a65"
142
+ : "fc-monarch-U10", data.isToday
143
+ ? (data.hasNavLink ? tertiaryPressableClass : tertiaryClass)
144
+ : (data.hasNavLink && mutedHoverPressableClass))
145
+ : joinClassNames("fc-monarch-17F fc-monarch-KNZ", data.hasNavLink && "fc-monarch-jaW")), listDayEventsClass: "fc-monarch-oee fc-monarch-qbd fc-monarch-KyB fc-monarch-RVT",
146
+ /* Single Month (in Multi-Month)
147
+ ----------------------------------------------------------------------------------------- */
148
+ singleMonthClass: "fc-monarch-tZ3", singleMonthHeaderClass: (data) => joinClassNames(data.isSticky && "fc-monarch-QTT fc-monarch-G56 fc-monarch-Y27", data.colCount > 1 ? "fc-monarch-hw7" : "fc-monarch-ztx", "fc-monarch-gfU"), singleMonthHeaderInnerClass: (data) => joinClassNames("fc-monarch-U10 fc-monarch-ztx fc-monarch-IdG fc-monarch-PuF fc-monarch-Kw3", data.hasNavLink && mutedHoverPressableClass),
149
+ /* Misc Table
150
+ ----------------------------------------------------------------------------------------- */
151
+ tableHeaderClass: (data) => joinClassNames(data.isSticky && "fc-monarch-QTT fc-monarch-G56 fc-monarch-Y27"), fillerClass: (data) => joinClassNames("fc-monarch-F6C fc-monarch-UZp", data.isHeader ? "fc-monarch-lqW" : "fc-monarch-G56"), dayNarrowWidth: 100, dayHeaderRowClass: "fc-monarch-UZp fc-monarch-G56", dayRowClass: "fc-monarch-UZp fc-monarch-G56",
152
+ /* Misc Content
153
+ ----------------------------------------------------------------------------------------- */
154
+ navLinkClass: `${outlineWidthFocusClass} ${tertiaryOutlineColorClass}`, inlineWeekNumberClass: (data) => joinClassNames("fc-monarch-YA2 fc-monarch-Hhr fc-monarch-uEy fc-monarch-gfU fc-monarch-JTJ", data.isNarrow
155
+ ? `fc-monarch-RWe fc-monarch-9o9 fc-monarch-8in fc-monarch-dNj fc-monarch-B2v fc-monarch-6qy ${xxsTextClass}`
156
+ : "fc-monarch-rzf fc-monarch-y8j fc-monarch-6U1 fc-monarch-ybQ fc-monarch-IdG fc-monarch-gEy", data.hasNavLink
157
+ ? secondaryPressableClass
158
+ : secondaryClass), nonBusinessClass: faintBgClass, highlightClass: "fc-monarch-gKu", nowIndicatorLineClass: "fc-monarch-7VH fc-monarch-v0S fc-monarch-R3n", nowIndicatorDotClass: "fc-monarch-xny fc-monarch-uDX fc-monarch-R3n fc-monarch-UmK fc-monarch-IdG fc-monarch-fo8 fc-monarch-bLM",
159
+ /* View-Specific Options
160
+ ----------------------------------------------------------------------------------------- */
161
+ views: {
162
+ ...userViews,
163
+ dayGrid: {
164
+ ...dayRowCommonClasses,
165
+ dayCellBottomClass: getShortDayCellBottomClass,
166
+ ...userViews?.dayGrid,
167
+ },
168
+ multiMonth: {
169
+ ...dayRowCommonClasses,
170
+ dayCellBottomClass: getShortDayCellBottomClass,
171
+ tableBodyClass: `fc-monarch-UZp fc-monarch-G56 fc-monarch-dpa`,
172
+ dayHeaderInnerClass: (data) => joinClassNames(!data.inPopover && "fc-monarch-0J7"),
173
+ ...userViews?.multiMonth,
174
+ },
175
+ timeGrid: {
176
+ ...dayRowCommonClasses,
177
+ dayCellBottomClass: tallDayCellBottomClass,
178
+ /* TimeGrid > Week Number Header
179
+ ------------------------------------------------------------------------------------- */
180
+ weekNumberHeaderClass: "fc-monarch-gfU fc-monarch-RhI",
181
+ weekNumberHeaderInnerClass: (data) => joinClassNames("fc-monarch-fpO fc-monarch-j5m fc-monarch-Hhr fc-monarch-uEy fc-monarch-gfU fc-monarch-IdG", data.options.dayMinWidth !== undefined && "fc-monarch-hCF", data.isNarrow
182
+ ? "fc-monarch-cL9 fc-monarch-qMw fc-monarch-17F"
183
+ : "fc-monarch-6U1 fc-monarch-ybQ fc-monarch-gEy", data.hasNavLink
184
+ ? secondaryPressableClass
185
+ : secondaryClass),
186
+ /* TimeGrid > All-Day Header
187
+ ------------------------------------------------------------------------------------- */
188
+ allDayHeaderClass: "fc-monarch-gfU fc-monarch-RhI",
189
+ allDayHeaderInnerClass: (data) => joinClassNames("fc-monarch-aS8 fc-monarch-csg fc-monarch-XMF", data.isNarrow ? xxsTextClass : "fc-monarch-gEy"),
190
+ allDayDividerClass: `fc-monarch-QTT fc-monarch-G56`,
191
+ /* TimeGrid > Slot Header
192
+ ------------------------------------------------------------------------------------- */
193
+ slotHeaderClass: (data) => joinClassNames("fc-monarch-1lj fc-monarch-Knn fc-monarch-RhI fc-monarch-UZp fc-monarch-G56", data.isMinor && "fc-monarch-M5N"),
194
+ slotHeaderInnerClass: (data) => joinClassNames("fc-monarch-vPs fc-monarch-8Z4 fc-monarch-0En fc-monarch-KyB", data.isNarrow
195
+ ? `fc-monarch-IWs ${xxsTextClass}`
196
+ : "fc-monarch-K1c fc-monarch-gEy", data.isFirst && "fc-monarch-C9h"),
197
+ slotHeaderDividerClass: (data) => joinClassNames("fc-monarch-EWl", (data.isHeader && data.options.dayMinWidth === undefined)
198
+ ? "fc-monarch-lqW"
199
+ : "fc-monarch-G56"),
200
+ ...userViews?.timeGrid,
201
+ },
202
+ list: {
203
+ /* List-View > List-Item Event
204
+ ------------------------------------------------------------------------------------- */
205
+ listItemEventClass: "fc-monarch-ytQ fc-monarch-aS8 fc-monarch-4Vv fc-monarch-ODb",
206
+ listItemEventBeforeClass: "fc-monarch-NoV fc-monarch-1uc",
207
+ listItemEventInnerClass: "fc-monarch-ODb fc-monarch-gEy",
208
+ listItemEventTimeClass: "fc-monarch-yvz fc-monarch-8Ko fc-monarch-cHr fc-monarch-JTJ fc-monarch-O5O fc-monarch-yGY",
209
+ listItemEventTitleClass: (data) => joinClassNames("fc-monarch-oee fc-monarch-qbd fc-monarch-JTJ fc-monarch-O5O", data.event.url && "fc-monarch-YdZ"),
210
+ /* No-Events Screen
211
+ ------------------------------------------------------------------------------------- */
212
+ noEventsClass: "fc-monarch-oee fc-monarch-Hhr fc-monarch-bXY fc-monarch-gfU fc-monarch-a65",
213
+ noEventsInnerClass: "fc-monarch-UyD",
214
+ ...userViews?.list,
215
+ },
216
+ }, ...restOptions })));
217
+ }
218
+ /* SVGs
219
+ ------------------------------------------------------------------------------------------------- */
220
+ function filledRightTriangle(className) {
221
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 800 2200", preserveAspectRatio: "none", className: className },
222
+ React.createElement("polygon", { points: "0,0 66,0 800,1100 66,2200 0,2200", fill: "currentColor" })));
223
+ }
224
+
225
+ export { dayRowCommonClasses, EventCalendarViews as default, faintBgClass, getShortDayCellBottomClass, mutedBgClass, mutedHoverPressableClass, outlineWidthClass, outlineWidthFocusClass, outlineWidthGroupFocusClass, rowPointerResizerClass, rowTouchResizerClass, secondaryClass, secondaryPressableClass, strongSolidPressableClass, tallDayCellBottomClass, tertiaryClass, tertiaryOutlineColorClass, tertiaryPressableClass, tertiaryPressableGroupClass };
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { CalendarOptions } from '@fullcalendar/core';
3
+
4
+ interface ResourceTimeGridProps 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 ResourceTimeGrid({ availableViews, addButton, className, height, contentHeight, direction, plugins: userPlugins, ...restOptions }: ResourceTimeGridProps): React.JSX.Element;
14
+
15
+ export { ResourceTimeGridProps, ResourceTimeGrid as default };