@utrecht/calendar-react 1.0.4 → 1.0.6
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/css.d.ts +0 -1
- package/dist/css.d.ts.map +1 -1
- package/dist/css.mjs +3648 -416
- package/dist/css.mjs.map +1 -1
- package/dist/index.mjs +3630 -415
- package/dist/index.mjs.map +1 -1
- package/dist/insert-style.d.ts +2 -0
- package/dist/insert-style.d.ts.map +1 -0
- package/package.json +61 -39
- package/src/css.tsx +4 -1
- package/src/index.tsx +1 -1
- package/src/insert-style.ts +8 -0
- package/dist/css.cjs +0 -431
- package/dist/css.cjs.map +0 -1
- package/dist/index.cjs +0 -430
- package/dist/index.cjs.map +0 -1
package/dist/css.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css.cjs","sources":["../src/CalendarNavigation.tsx","../src/CalendarButton.tsx","../src/CalendarIcon.tsx","../src/CalendarNavigationButtons.tsx","../src/CalendarNavigationLabel.tsx","../src/CalendarTableDaysContainer.tsx","../src/CalendarTableDaysItem.tsx","../src/CalendarTableDaysItemDay.tsx","../src/CalendarTableWeeksContainer.tsx","../src/CalendarTableWeeksItem.tsx","../src/IconArrowLeft.tsx","../src/IconArrowLeftDouble.tsx","../src/IconArrowRight.tsx","../src/IconArrowRightDouble.tsx","../src/index.tsx"],"sourcesContent":["import { DetailedHTMLProps, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface CalendarNavigationProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {}\n\nexport const CalendarNavigation = ({ children, ...props }: PropsWithChildren<CalendarNavigationProps>) => (\n <div className=\"utrecht-calendar__navigation\" {...props}>\n {children}\n </div>\n);\n","import { Button, ButtonProps } from '@utrecht/button-react';\nimport { clsx } from 'clsx';\nimport { PropsWithChildren } from 'react';\n\nexport interface CalendarButtonProps extends ButtonProps {}\n\nexport const CalendarButton = ({ children, className, ...props }: PropsWithChildren<CalendarButtonProps>) => (\n <Button appearance=\"subtle-button\" {...props} className={clsx('utrecht-calendar__button', className)}>\n {children}\n </Button>\n);\n","import { clsx } from 'clsx';\nimport { DetailedHTMLProps, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface CalendarIconProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {}\n\nexport const CalendarIcon = ({ children, ...props }: PropsWithChildren<CalendarIconProps>) => (\n <div className={clsx('utrecht-calendar__icon')} {...props}>\n {children}\n </div>\n);\n","import { MouseEventHandler, PropsWithChildren } from 'react';\nimport { CalendarButton, CalendarButtonProps } from './CalendarButton';\nimport { CalendarIcon } from './CalendarIcon';\ninterface CalendarNavigationButtonsProps extends CalendarButtonProps {\n onPreviousClick?: MouseEventHandler<HTMLButtonElement>;\n onNextClick?: MouseEventHandler<HTMLButtonElement>;\n previousIcon?: any;\n nextIcon?: any;\n previousTitle?: string;\n nextTitle?: string;\n}\n\nexport const CalendarNavigationButtons = ({\n onPreviousClick,\n onNextClick,\n previousIcon,\n nextIcon,\n children,\n ...props\n}: PropsWithChildren<CalendarNavigationButtonsProps>) => (\n <div className=\"utrecht-calendar__navigation-buttons\">\n <CalendarButton onClick={onPreviousClick} {...props}>\n <CalendarIcon>{previousIcon}</CalendarIcon>\n </CalendarButton>\n {children}\n <CalendarButton onClick={onNextClick} {...props}>\n <CalendarIcon>{nextIcon}</CalendarIcon>\n </CalendarButton>\n </div>\n);\n","import { PropsWithChildren, TimeHTMLAttributes } from 'react';\n\ntype CalendarNavigationLabelProps = TimeHTMLAttributes<HTMLTimeElement>;\n\nexport const CalendarNavigationLabel = ({ children, ...props }: PropsWithChildren<CalendarNavigationLabelProps>) => (\n <time className=\"utrecht-calendar__navigation-label\" {...props}>\n {children}\n </time>\n);\n","import { DetailedHTMLProps, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface CalendarTableDaysContainerProps\n extends DetailedHTMLProps<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement> {}\n\nexport const CalendarTableDaysContainer = ({\n children,\n ...props\n}: PropsWithChildren<CalendarTableDaysContainerProps>) => (\n <tbody {...props} className=\"utrecht-calendar__table-days-container\">\n {children}\n </tbody>\n);\n","import { DetailedHTMLProps, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface CalendarTableDaysItemProps\n extends DetailedHTMLProps<HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement> {}\n\nexport const CalendarTableDaysItem = ({ children, ...props }: PropsWithChildren<CalendarTableDaysItemProps>) => (\n <tr {...props}>{children}</tr>\n);\n","import clsx from 'clsx';\nimport { PropsWithChildren } from 'react';\nimport { CalendarButton, CalendarButtonProps } from './CalendarButton';\nexport interface CalendarTableDaysItemDayProps extends CalendarButtonProps {\n day: string;\n dayOutOfTheMonth?: boolean;\n isToday: boolean;\n emphasis?: boolean;\n selected?: boolean;\n disabled?: boolean;\n}\n\nexport const CalendarTableDaysItemDay = ({\n day,\n dayOutOfTheMonth,\n isToday,\n emphasis,\n selected,\n disabled,\n ...props\n}: PropsWithChildren<CalendarTableDaysItemDayProps>) => (\n <td>\n <CalendarButton\n className={clsx(\n 'utrecht-calendar__table-days-item-day',\n { 'utrecht-calendar__table-days-item-day--out-of-the-month': dayOutOfTheMonth },\n { 'utrecht-calendar__table-days-item-day--is-today': isToday },\n { 'utrecht-calendar__table-days-item-day--emphasis': emphasis },\n { 'utrecht-calendar__table-days-item-day--selected': selected },\n )}\n disabled={disabled}\n {...props}\n >\n {day}\n </CalendarButton>\n </td>\n);\n","import { PropsWithChildren } from 'react';\n\nexport const CalendarTableWeeksContainer = ({ children }: PropsWithChildren) => (\n <thead className=\"utrecht-calendar__table-weeks-container\">\n <tr className=\"utrecht-calendar__table-weeks-container-content\">{children}</tr>\n </thead>\n);\n","import { DetailedHTMLProps, PropsWithChildren, ThHTMLAttributes } from 'react';\n\nexport interface CalendarTableWeeksItemProps\n extends DetailedHTMLProps<ThHTMLAttributes<HTMLTableCellElement>, HTMLTableCellElement> {}\n\nexport const CalendarTableWeeksItem = ({ children, ...props }: PropsWithChildren<CalendarTableWeeksItemProps>) => (\n <th {...props} className=\"utrecht-calendar__table-weeks-item\">\n {children}\n </th>\n);\n","import { SVGProps } from 'react';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nexport const IconArrowLeft = ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => (\n <svg width=\"100%\" height=\"100%\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby={titleId} {...props}>\n {title ? <title id={titleId}>{title}</title> : null}\n <path d=\"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41Z\" fill=\"currentColor\" />\n </svg>\n);\n","import { SVGProps } from 'react';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nexport const IconArrowLeftDouble = ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => (\n <svg width=\"100%\" height=\"100%\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby={titleId} {...props}>\n {title ? <title id={titleId}>{title}</title> : null}\n <path d=\"M17.59 18 19 16.59 14.42 12 19 7.41 17.59 6l-6 6 6 6Z\" fill=\"currentColor\" />\n <path d=\"m11 18 1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6 6 6Z\" fill=\"currentColor\" />\n </svg>\n);\n","import { SVGProps } from 'react';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nexport const IconArrowRight = ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => (\n <svg width=\"100%\" height=\"100%\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby={titleId} {...props}>\n {title ? <title id={titleId}>{title}</title> : null}\n <path d=\"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41Z\" fill=\"currentColor\" />\n </svg>\n);\n","import { SVGProps } from 'react';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nexport const IconArrowRightDouble = ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => (\n <svg fill=\"none\" width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby={titleId} {...props}>\n {title ? <title id={titleId}>{title}</title> : null}\n <path d=\"M6.41 6 5 7.41 9.58 12 5 16.59 6.41 18l6-6-6-6Z\" fill=\"currentColor\" />\n <path d=\"m13 6-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6-6-6Z\" fill=\"currentColor\" />\n </svg>\n);\n","import {\n addMonths,\n addWeeks,\n addYears,\n eachDayOfInterval,\n endOfDay,\n endOfWeek,\n format,\n formatISO,\n getYear,\n isAfter,\n isBefore,\n isSameDay,\n isSameMonth,\n Locale,\n parseISO,\n setMonth,\n setYear,\n startOfDay,\n startOfMonth,\n startOfWeek,\n} from 'date-fns';\nimport { enUS } from 'date-fns/locale';\nimport chunk from 'lodash.chunk';\nimport { useState } from 'react';\nimport { CalendarNavigation } from './CalendarNavigation';\nimport { CalendarNavigationButtons } from './CalendarNavigationButtons';\nimport { CalendarNavigationLabel } from './CalendarNavigationLabel';\nimport { CalendarTableDaysContainer } from './CalendarTableDaysContainer';\nimport { CalendarTableDaysItem } from './CalendarTableDaysItem';\nimport { CalendarTableDaysItemDay } from './CalendarTableDaysItemDay';\nimport { CalendarTableWeeksContainer } from './CalendarTableWeeksContainer';\nimport { CalendarTableWeeksItem } from './CalendarTableWeeksItem';\nimport { IconArrowLeft } from './IconArrowLeft';\nimport { IconArrowLeftDouble } from './IconArrowLeftDouble';\nimport { IconArrowRight } from './IconArrowRight';\nimport { IconArrowRightDouble } from './IconArrowRightDouble';\n\nfunction createCalendar(today: Date): Date[] {\n const start = startOfWeek(startOfMonth(today), {\n weekStartsOn: 1 /* Monday */,\n });\n const end = endOfWeek(addWeeks(start, 5), {\n weekStartsOn: 1 /* Monday */,\n });\n return eachDayOfInterval({ start, end });\n}\n\nexport type Events = {\n date: string;\n emphasis?: boolean;\n selected?: boolean;\n disabled?: boolean;\n};\n\nexport interface CalendarProps {\n /**\n * `onCalendarClick` It's a callback function that returns the selected date, triggered when you click on the day\n *\n * */\n onCalendarClick: (date: string) => void;\n /**\n * `events` An array of event objects that contain some properties that allow you to change the calendar day style base on your value\n * `{date?: Date; emphasis?: boolean; selected?: boolean; disabled?: boolean;}`\n *\n * */\n events?: Events[];\n /**\n * `currentDate` The default value is `new Date()`, but you can provide a different date\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\n * */\n currentDate?: Date;\n /**\n * `locale` to change the calendar language by using 'date-fns/locale'\n * `import { nl, enUS } from 'date-fns/locale';`\n * */\n locale?: Locale;\n previousYearButtonTitle?: string;\n nextYearButtonTitle?: string;\n previousMonthButtonTitle?: string;\n nextMonthButtonTitle?: string;\n minDate?: Date;\n maxDate?: Date;\n}\n\n/**\n * Calendar Component\n * powered by date-fns, so that make it easy to use the `date-fns` date functions & locale\n * */\n\nexport const Calendar = ({\n onCalendarClick,\n events,\n currentDate,\n locale = enUS,\n previousYearButtonTitle = 'Previous year',\n nextYearButtonTitle = 'Next year',\n previousMonthButtonTitle = 'Previous month',\n nextMonthButtonTitle = 'Next month',\n minDate,\n maxDate,\n}: CalendarProps) => {\n const [visibleMonth, setVisibleMonth] = useState(currentDate || new Date());\n const [selectedDate, setSelectedDate] = useState(currentDate);\n const calendar = createCalendar(visibleMonth);\n const start = startOfWeek(visibleMonth, { weekStartsOn: 1 });\n const end = endOfWeek(visibleMonth, { weekStartsOn: 1 });\n\n const currentWeek = eachDayOfInterval({ start, end }).map((day) => day);\n const chunksWeeks = chunk(calendar, calendar.length / 6);\n\n const weeks = chunksWeeks.map((week) =>\n week.map((date) => {\n const currentEvent =\n events && events.length > 0 && events.find((e) => isSameDay(endOfDay(parseISO(e.date)), date));\n if (currentEvent) {\n return {\n date,\n emphasis: currentEvent.emphasis,\n selected: currentEvent.selected,\n disabled: currentEvent.disabled,\n };\n } else {\n return {\n date,\n emphasis: false,\n selected: false,\n disabled: false,\n };\n }\n }),\n );\n\n return (\n <div className=\"utrecht-calendar\">\n <CalendarNavigation>\n <CalendarNavigationButtons\n previousIcon={<IconArrowLeftDouble title={previousYearButtonTitle} />}\n nextIcon={<IconArrowRightDouble title={nextYearButtonTitle} />}\n onPreviousClick={() => setVisibleMonth(setYear(visibleMonth, getYear(visibleMonth) - 1))}\n onNextClick={() => setVisibleMonth(addYears(visibleMonth, 1))}\n >\n <CalendarNavigationButtons\n previousIcon={<IconArrowLeft title={previousMonthButtonTitle} />}\n nextIcon={<IconArrowRight title={nextMonthButtonTitle} />}\n onPreviousClick={() => setVisibleMonth(setMonth(visibleMonth, visibleMonth.getMonth() - 1))}\n onNextClick={() => setVisibleMonth(addMonths(visibleMonth, 1))}\n >\n <CalendarNavigationLabel dateTime={format(visibleMonth, 'yyyy-mm')}>\n {format(visibleMonth, 'LLLL Y', { locale })}\n </CalendarNavigationLabel>\n </CalendarNavigationButtons>\n </CalendarNavigationButtons>\n </CalendarNavigation>\n <table className=\"utrecht-calendar__table\" role=\"grid\">\n <CalendarTableWeeksContainer>\n {currentWeek &&\n currentWeek.length > 0 &&\n currentWeek.map((day, index) => (\n <CalendarTableWeeksItem scope=\"col\" abbr={format(day, 'EEEE', { locale })} key={index}>\n {format(day, 'EEEEEE', { locale })}\n </CalendarTableWeeksItem>\n ))}\n </CalendarTableWeeksContainer>\n <CalendarTableDaysContainer>\n {weeks &&\n weeks.length > 0 &&\n weeks.map((week, index) => (\n <CalendarTableDaysItem key={index}>\n {week.map((day, index) => {\n return (\n <CalendarTableDaysItemDay\n isToday={isSameDay(day.date, Date.now())}\n dayOutOfTheMonth={!isSameMonth(day.date, visibleMonth)}\n key={index}\n onClick={() => {\n setVisibleMonth(day.date);\n setSelectedDate(day.date);\n onCalendarClick(formatISO(day.date));\n }}\n aria-label={format(day.date, 'eeee dd LLLL Y', { locale })}\n day={day.date.getDate().toString()}\n emphasis={day.emphasis}\n selected={day.selected || (selectedDate && isSameDay(day.date, selectedDate))}\n disabled={\n day.disabled ||\n (minDate && isBefore(day.date, startOfDay(minDate))) ||\n (maxDate && isAfter(day.date, endOfDay(maxDate)))\n }\n />\n );\n })}\n </CalendarTableDaysItem>\n ))}\n </CalendarTableDaysContainer>\n </table>\n </div>\n );\n};\n"],"names":["CalendarNavigation","_ref","children","props","_objectWithoutProperties","_excluded","_jsx","_objectSpread","className","CalendarButton","Button","appearance","clsx","CalendarIcon","CalendarNavigationButtons","onPreviousClick","onNextClick","previousIcon","nextIcon","_jsxs","onClick","CalendarNavigationLabel","CalendarTableDaysContainer","CalendarTableDaysItem","CalendarTableDaysItemDay","day","dayOutOfTheMonth","isToday","emphasis","selected","disabled","CalendarTableWeeksContainer","CalendarTableWeeksItem","IconArrowLeft","title","titleId","width","height","fill","xmlns","id","d","IconArrowLeftDouble","IconArrowRight","IconArrowRightDouble","createCalendar","today","start","startOfWeek","startOfMonth","weekStartsOn","end","endOfWeek","addWeeks","eachDayOfInterval","Calendar","onCalendarClick","events","currentDate","_ref$locale","locale","enUS","_ref$previousYearButt","previousYearButtonTitle","_ref$nextYearButtonTi","nextYearButtonTitle","_ref$previousMonthBut","previousMonthButtonTitle","_ref$nextMonthButtonT","nextMonthButtonTitle","minDate","maxDate","_useState","useState","Date","_useState2","_slicedToArray","visibleMonth","setVisibleMonth","_useState3","_useState4","selectedDate","setSelectedDate","calendar","currentWeek","map","chunksWeeks","chunk","length","weeks","week","date","currentEvent","find","e","isSameDay","endOfDay","parseISO","setYear","getYear","addYears","setMonth","getMonth","addMonths","dateTime","format","role","index","scope","abbr","now","isSameMonth","formatISO","getDate","toString","isBefore","startOfDay","isAfter"],"mappings":";;;;;;;;;;;;;;;;;AAIO,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;AAAKC,IAAAA,KAAK,GAAAC,wBAA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Ae,CAACrD,GAAG,CAACkE,IAAI,CAAC,CAAA;AACzBT,kBAAAA,eAAe,CAACzD,GAAG,CAACkE,IAAI,CAAC,CAAA;AACzBnC,kBAAAA,eAAe,CAACwD,iBAAS,CAACvF,GAAG,CAACkE,IAAI,CAAC,CAAC,CAAA;iBACrC;gBAAA,YAAA,EACWc,cAAM,CAAChF,GAAG,CAACkE,IAAI,EAAE,gBAAgB,EAAE;AAAE/B,kBAAAA,MAAM,EAANA,QAAAA;AAAM,iBAAE,CAAC;gBAC1DnC,GAAG,EAAEA,GAAG,CAACkE,IAAI,CAACsB,OAAO,EAAE,CAACC,QAAQ,EAAE;gBAClCtF,QAAQ,EAAEH,GAAG,CAACG,QAAQ;AACtBC,gBAAAA,QAAQ,EAAEJ,GAAG,CAACI,QAAQ,IAAKoD,YAAY,IAAIc,iBAAS,CAACtE,GAAG,CAACkE,IAAI,EAAEV,YAAY,CAAE;AAC7EnD,gBAAAA,QAAQ,EACNL,GAAG,CAACK,QAAQ,IACXwC,OAAO,IAAI6C,gBAAQ,CAAC1F,GAAG,CAACkE,IAAI,EAAEyB,kBAAU,CAAC9C,OAAO,CAAC,CAAE,IACnDC,OAAO,IAAI8C,eAAO,CAAC5F,GAAG,CAACkE,IAAI,EAAEK,gBAAQ,CAACzB,OAAO,CAAC,CAAA;iBAb5CoC,KAAK,CAeV,CAAA;aAEL,CAAA;WAvByB,EAAAA,KAAK,CAwBT,CAAA;SACzB,CAAA;AACwB,OAAA,CAAA,CAAA;AAAA,KAAA,CACvB,CAAA;AACJ,GAAA,CAAA,CAAA;AAEV;;;;"}
|
package/dist/index.cjs
DELETED
|
@@ -1,430 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var dateFns = require('date-fns');
|
|
6
|
-
var locale = require('date-fns/locale');
|
|
7
|
-
var chunk = require('lodash.chunk');
|
|
8
|
-
var react = require('react');
|
|
9
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
10
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
11
|
-
var buttonReact = require('@utrecht/button-react');
|
|
12
|
-
var clsx = require('clsx');
|
|
13
|
-
|
|
14
|
-
var _excluded$c = ["children"];
|
|
15
|
-
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
-
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
-
var CalendarNavigation = function CalendarNavigation(_ref) {
|
|
18
|
-
var children = _ref.children,
|
|
19
|
-
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
20
|
-
return jsxRuntime.jsx("div", _objectSpread$c(_objectSpread$c({
|
|
21
|
-
className: "utrecht-calendar__navigation"
|
|
22
|
-
}, props), {}, {
|
|
23
|
-
children: children
|
|
24
|
-
}));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
var _excluded$b = ["children", "className"];
|
|
28
|
-
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29
|
-
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30
|
-
var CalendarButton = function CalendarButton(_ref) {
|
|
31
|
-
var children = _ref.children,
|
|
32
|
-
className = _ref.className,
|
|
33
|
-
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
34
|
-
return jsxRuntime.jsx(buttonReact.Button, _objectSpread$b(_objectSpread$b({
|
|
35
|
-
appearance: "subtle-button"
|
|
36
|
-
}, props), {}, {
|
|
37
|
-
className: clsx.clsx('utrecht-calendar__button', className),
|
|
38
|
-
children: children
|
|
39
|
-
}));
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
var _excluded$a = ["children"];
|
|
43
|
-
function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
44
|
-
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
45
|
-
var CalendarIcon = function CalendarIcon(_ref) {
|
|
46
|
-
var children = _ref.children,
|
|
47
|
-
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
48
|
-
return jsxRuntime.jsx("div", _objectSpread$a(_objectSpread$a({
|
|
49
|
-
className: clsx.clsx('utrecht-calendar__icon')
|
|
50
|
-
}, props), {}, {
|
|
51
|
-
children: children
|
|
52
|
-
}));
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
var _excluded$9 = ["onPreviousClick", "onNextClick", "previousIcon", "nextIcon", "children"];
|
|
56
|
-
function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
57
|
-
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
58
|
-
var CalendarNavigationButtons = function CalendarNavigationButtons(_ref) {
|
|
59
|
-
var onPreviousClick = _ref.onPreviousClick,
|
|
60
|
-
onNextClick = _ref.onNextClick,
|
|
61
|
-
previousIcon = _ref.previousIcon,
|
|
62
|
-
nextIcon = _ref.nextIcon,
|
|
63
|
-
children = _ref.children,
|
|
64
|
-
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
65
|
-
return jsxRuntime.jsxs("div", {
|
|
66
|
-
className: "utrecht-calendar__navigation-buttons",
|
|
67
|
-
children: [jsxRuntime.jsx(CalendarButton, _objectSpread$9(_objectSpread$9({
|
|
68
|
-
onClick: onPreviousClick
|
|
69
|
-
}, props), {}, {
|
|
70
|
-
children: jsxRuntime.jsx(CalendarIcon, {
|
|
71
|
-
children: previousIcon
|
|
72
|
-
})
|
|
73
|
-
})), children, jsxRuntime.jsx(CalendarButton, _objectSpread$9(_objectSpread$9({
|
|
74
|
-
onClick: onNextClick
|
|
75
|
-
}, props), {}, {
|
|
76
|
-
children: jsxRuntime.jsx(CalendarIcon, {
|
|
77
|
-
children: nextIcon
|
|
78
|
-
})
|
|
79
|
-
}))]
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
var _excluded$8 = ["children"];
|
|
84
|
-
function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
85
|
-
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
86
|
-
var CalendarNavigationLabel = function CalendarNavigationLabel(_ref) {
|
|
87
|
-
var children = _ref.children,
|
|
88
|
-
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
89
|
-
return jsxRuntime.jsx("time", _objectSpread$8(_objectSpread$8({
|
|
90
|
-
className: "utrecht-calendar__navigation-label"
|
|
91
|
-
}, props), {}, {
|
|
92
|
-
children: children
|
|
93
|
-
}));
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
var _excluded$7 = ["children"];
|
|
97
|
-
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
98
|
-
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
99
|
-
var CalendarTableDaysContainer = function CalendarTableDaysContainer(_ref) {
|
|
100
|
-
var children = _ref.children,
|
|
101
|
-
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
102
|
-
return jsxRuntime.jsx("tbody", _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
103
|
-
className: "utrecht-calendar__table-days-container",
|
|
104
|
-
children: children
|
|
105
|
-
}));
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
var _excluded$6 = ["children"];
|
|
109
|
-
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
110
|
-
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
111
|
-
var CalendarTableDaysItem = function CalendarTableDaysItem(_ref) {
|
|
112
|
-
var children = _ref.children,
|
|
113
|
-
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
114
|
-
return jsxRuntime.jsx("tr", _objectSpread$6(_objectSpread$6({}, props), {}, {
|
|
115
|
-
children: children
|
|
116
|
-
}));
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
var _excluded$5 = ["day", "dayOutOfTheMonth", "isToday", "emphasis", "selected", "disabled"];
|
|
120
|
-
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
121
|
-
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
122
|
-
var CalendarTableDaysItemDay = function CalendarTableDaysItemDay(_ref) {
|
|
123
|
-
var day = _ref.day,
|
|
124
|
-
dayOutOfTheMonth = _ref.dayOutOfTheMonth,
|
|
125
|
-
isToday = _ref.isToday,
|
|
126
|
-
emphasis = _ref.emphasis,
|
|
127
|
-
selected = _ref.selected,
|
|
128
|
-
disabled = _ref.disabled,
|
|
129
|
-
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
130
|
-
return jsxRuntime.jsx("td", {
|
|
131
|
-
children: jsxRuntime.jsx(CalendarButton, _objectSpread$5(_objectSpread$5({
|
|
132
|
-
className: clsx('utrecht-calendar__table-days-item-day', {
|
|
133
|
-
'utrecht-calendar__table-days-item-day--out-of-the-month': dayOutOfTheMonth
|
|
134
|
-
}, {
|
|
135
|
-
'utrecht-calendar__table-days-item-day--is-today': isToday
|
|
136
|
-
}, {
|
|
137
|
-
'utrecht-calendar__table-days-item-day--emphasis': emphasis
|
|
138
|
-
}, {
|
|
139
|
-
'utrecht-calendar__table-days-item-day--selected': selected
|
|
140
|
-
}),
|
|
141
|
-
disabled: disabled
|
|
142
|
-
}, props), {}, {
|
|
143
|
-
children: day
|
|
144
|
-
}))
|
|
145
|
-
});
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
var CalendarTableWeeksContainer = function CalendarTableWeeksContainer(_ref) {
|
|
149
|
-
var children = _ref.children;
|
|
150
|
-
return jsxRuntime.jsx("thead", {
|
|
151
|
-
className: "utrecht-calendar__table-weeks-container",
|
|
152
|
-
children: jsxRuntime.jsx("tr", {
|
|
153
|
-
className: "utrecht-calendar__table-weeks-container-content",
|
|
154
|
-
children: children
|
|
155
|
-
})
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
var _excluded$4 = ["children"];
|
|
160
|
-
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
161
|
-
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
162
|
-
var CalendarTableWeeksItem = function CalendarTableWeeksItem(_ref) {
|
|
163
|
-
var children = _ref.children,
|
|
164
|
-
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
165
|
-
return jsxRuntime.jsx("th", _objectSpread$4(_objectSpread$4({}, props), {}, {
|
|
166
|
-
className: "utrecht-calendar__table-weeks-item",
|
|
167
|
-
children: children
|
|
168
|
-
}));
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
var _excluded$3 = ["title", "titleId"];
|
|
172
|
-
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
173
|
-
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
174
|
-
var IconArrowLeft = function IconArrowLeft(_ref) {
|
|
175
|
-
var title = _ref.title,
|
|
176
|
-
titleId = _ref.titleId,
|
|
177
|
-
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
178
|
-
return jsxRuntime.jsxs("svg", _objectSpread$3(_objectSpread$3({
|
|
179
|
-
width: "100%",
|
|
180
|
-
height: "100%",
|
|
181
|
-
fill: "none",
|
|
182
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
183
|
-
"aria-labelledby": titleId
|
|
184
|
-
}, props), {}, {
|
|
185
|
-
children: [title ? jsxRuntime.jsx("title", {
|
|
186
|
-
id: titleId,
|
|
187
|
-
children: title
|
|
188
|
-
}) : null, jsxRuntime.jsx("path", {
|
|
189
|
-
d: "M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41Z",
|
|
190
|
-
fill: "currentColor"
|
|
191
|
-
})]
|
|
192
|
-
}));
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
var _excluded$2 = ["title", "titleId"];
|
|
196
|
-
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
197
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
198
|
-
var IconArrowLeftDouble = function IconArrowLeftDouble(_ref) {
|
|
199
|
-
var title = _ref.title,
|
|
200
|
-
titleId = _ref.titleId,
|
|
201
|
-
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
202
|
-
return jsxRuntime.jsxs("svg", _objectSpread$2(_objectSpread$2({
|
|
203
|
-
width: "100%",
|
|
204
|
-
height: "100%",
|
|
205
|
-
fill: "none",
|
|
206
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
207
|
-
"aria-labelledby": titleId
|
|
208
|
-
}, props), {}, {
|
|
209
|
-
children: [title ? jsxRuntime.jsx("title", {
|
|
210
|
-
id: titleId,
|
|
211
|
-
children: title
|
|
212
|
-
}) : null, jsxRuntime.jsx("path", {
|
|
213
|
-
d: "M17.59 18 19 16.59 14.42 12 19 7.41 17.59 6l-6 6 6 6Z",
|
|
214
|
-
fill: "currentColor"
|
|
215
|
-
}), jsxRuntime.jsx("path", {
|
|
216
|
-
d: "m11 18 1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6 6 6Z",
|
|
217
|
-
fill: "currentColor"
|
|
218
|
-
})]
|
|
219
|
-
}));
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
var _excluded$1 = ["title", "titleId"];
|
|
223
|
-
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
224
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
225
|
-
var IconArrowRight = function IconArrowRight(_ref) {
|
|
226
|
-
var title = _ref.title,
|
|
227
|
-
titleId = _ref.titleId,
|
|
228
|
-
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
229
|
-
return jsxRuntime.jsxs("svg", _objectSpread$1(_objectSpread$1({
|
|
230
|
-
width: "100%",
|
|
231
|
-
height: "100%",
|
|
232
|
-
fill: "none",
|
|
233
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
234
|
-
"aria-labelledby": titleId
|
|
235
|
-
}, props), {}, {
|
|
236
|
-
children: [title ? jsxRuntime.jsx("title", {
|
|
237
|
-
id: titleId,
|
|
238
|
-
children: title
|
|
239
|
-
}) : null, jsxRuntime.jsx("path", {
|
|
240
|
-
d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41Z",
|
|
241
|
-
fill: "currentColor"
|
|
242
|
-
})]
|
|
243
|
-
}));
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
var _excluded = ["title", "titleId"];
|
|
247
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
248
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
249
|
-
var IconArrowRightDouble = function IconArrowRightDouble(_ref) {
|
|
250
|
-
var title = _ref.title,
|
|
251
|
-
titleId = _ref.titleId,
|
|
252
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
253
|
-
return jsxRuntime.jsxs("svg", _objectSpread(_objectSpread({
|
|
254
|
-
fill: "none",
|
|
255
|
-
width: "100%",
|
|
256
|
-
height: "100%",
|
|
257
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
258
|
-
"aria-labelledby": titleId
|
|
259
|
-
}, props), {}, {
|
|
260
|
-
children: [title ? jsxRuntime.jsx("title", {
|
|
261
|
-
id: titleId,
|
|
262
|
-
children: title
|
|
263
|
-
}) : null, jsxRuntime.jsx("path", {
|
|
264
|
-
d: "M6.41 6 5 7.41 9.58 12 5 16.59 6.41 18l6-6-6-6Z",
|
|
265
|
-
fill: "currentColor"
|
|
266
|
-
}), jsxRuntime.jsx("path", {
|
|
267
|
-
d: "m13 6-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6-6-6Z",
|
|
268
|
-
fill: "currentColor"
|
|
269
|
-
})]
|
|
270
|
-
}));
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
function createCalendar(today) {
|
|
274
|
-
var start = dateFns.startOfWeek(dateFns.startOfMonth(today), {
|
|
275
|
-
weekStartsOn: 1 /* Monday */
|
|
276
|
-
});
|
|
277
|
-
var end = dateFns.endOfWeek(dateFns.addWeeks(start, 5), {
|
|
278
|
-
weekStartsOn: 1 /* Monday */
|
|
279
|
-
});
|
|
280
|
-
return dateFns.eachDayOfInterval({
|
|
281
|
-
start: start,
|
|
282
|
-
end: end
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* Calendar Component
|
|
287
|
-
* powered by date-fns, so that make it easy to use the `date-fns` date functions & locale
|
|
288
|
-
* */
|
|
289
|
-
var Calendar = function Calendar(_ref) {
|
|
290
|
-
var onCalendarClick = _ref.onCalendarClick,
|
|
291
|
-
events = _ref.events,
|
|
292
|
-
currentDate = _ref.currentDate,
|
|
293
|
-
_ref$locale = _ref.locale,
|
|
294
|
-
locale$1 = _ref$locale === void 0 ? locale.enUS : _ref$locale,
|
|
295
|
-
_ref$previousYearButt = _ref.previousYearButtonTitle,
|
|
296
|
-
previousYearButtonTitle = _ref$previousYearButt === void 0 ? 'Previous year' : _ref$previousYearButt,
|
|
297
|
-
_ref$nextYearButtonTi = _ref.nextYearButtonTitle,
|
|
298
|
-
nextYearButtonTitle = _ref$nextYearButtonTi === void 0 ? 'Next year' : _ref$nextYearButtonTi,
|
|
299
|
-
_ref$previousMonthBut = _ref.previousMonthButtonTitle,
|
|
300
|
-
previousMonthButtonTitle = _ref$previousMonthBut === void 0 ? 'Previous month' : _ref$previousMonthBut,
|
|
301
|
-
_ref$nextMonthButtonT = _ref.nextMonthButtonTitle,
|
|
302
|
-
nextMonthButtonTitle = _ref$nextMonthButtonT === void 0 ? 'Next month' : _ref$nextMonthButtonT,
|
|
303
|
-
minDate = _ref.minDate,
|
|
304
|
-
maxDate = _ref.maxDate;
|
|
305
|
-
var _useState = react.useState(currentDate || new Date()),
|
|
306
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
307
|
-
visibleMonth = _useState2[0],
|
|
308
|
-
setVisibleMonth = _useState2[1];
|
|
309
|
-
var _useState3 = react.useState(currentDate),
|
|
310
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
311
|
-
selectedDate = _useState4[0],
|
|
312
|
-
setSelectedDate = _useState4[1];
|
|
313
|
-
var calendar = createCalendar(visibleMonth);
|
|
314
|
-
var start = dateFns.startOfWeek(visibleMonth, {
|
|
315
|
-
weekStartsOn: 1
|
|
316
|
-
});
|
|
317
|
-
var end = dateFns.endOfWeek(visibleMonth, {
|
|
318
|
-
weekStartsOn: 1
|
|
319
|
-
});
|
|
320
|
-
var currentWeek = dateFns.eachDayOfInterval({
|
|
321
|
-
start: start,
|
|
322
|
-
end: end
|
|
323
|
-
}).map(function (day) {
|
|
324
|
-
return day;
|
|
325
|
-
});
|
|
326
|
-
var chunksWeeks = chunk(calendar, calendar.length / 6);
|
|
327
|
-
var weeks = chunksWeeks.map(function (week) {
|
|
328
|
-
return week.map(function (date) {
|
|
329
|
-
var currentEvent = events && events.length > 0 && events.find(function (e) {
|
|
330
|
-
return dateFns.isSameDay(dateFns.endOfDay(dateFns.parseISO(e.date)), date);
|
|
331
|
-
});
|
|
332
|
-
if (currentEvent) {
|
|
333
|
-
return {
|
|
334
|
-
date: date,
|
|
335
|
-
emphasis: currentEvent.emphasis,
|
|
336
|
-
selected: currentEvent.selected,
|
|
337
|
-
disabled: currentEvent.disabled
|
|
338
|
-
};
|
|
339
|
-
} else {
|
|
340
|
-
return {
|
|
341
|
-
date: date,
|
|
342
|
-
emphasis: false,
|
|
343
|
-
selected: false,
|
|
344
|
-
disabled: false
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
});
|
|
349
|
-
return jsxRuntime.jsxs("div", {
|
|
350
|
-
className: "utrecht-calendar",
|
|
351
|
-
children: [jsxRuntime.jsx(CalendarNavigation, {
|
|
352
|
-
children: jsxRuntime.jsx(CalendarNavigationButtons, {
|
|
353
|
-
previousIcon: jsxRuntime.jsx(IconArrowLeftDouble, {
|
|
354
|
-
title: previousYearButtonTitle
|
|
355
|
-
}),
|
|
356
|
-
nextIcon: jsxRuntime.jsx(IconArrowRightDouble, {
|
|
357
|
-
title: nextYearButtonTitle
|
|
358
|
-
}),
|
|
359
|
-
onPreviousClick: function onPreviousClick() {
|
|
360
|
-
return setVisibleMonth(dateFns.setYear(visibleMonth, dateFns.getYear(visibleMonth) - 1));
|
|
361
|
-
},
|
|
362
|
-
onNextClick: function onNextClick() {
|
|
363
|
-
return setVisibleMonth(dateFns.addYears(visibleMonth, 1));
|
|
364
|
-
},
|
|
365
|
-
children: jsxRuntime.jsx(CalendarNavigationButtons, {
|
|
366
|
-
previousIcon: jsxRuntime.jsx(IconArrowLeft, {
|
|
367
|
-
title: previousMonthButtonTitle
|
|
368
|
-
}),
|
|
369
|
-
nextIcon: jsxRuntime.jsx(IconArrowRight, {
|
|
370
|
-
title: nextMonthButtonTitle
|
|
371
|
-
}),
|
|
372
|
-
onPreviousClick: function onPreviousClick() {
|
|
373
|
-
return setVisibleMonth(dateFns.setMonth(visibleMonth, visibleMonth.getMonth() - 1));
|
|
374
|
-
},
|
|
375
|
-
onNextClick: function onNextClick() {
|
|
376
|
-
return setVisibleMonth(dateFns.addMonths(visibleMonth, 1));
|
|
377
|
-
},
|
|
378
|
-
children: jsxRuntime.jsx(CalendarNavigationLabel, {
|
|
379
|
-
dateTime: dateFns.format(visibleMonth, 'yyyy-mm'),
|
|
380
|
-
children: dateFns.format(visibleMonth, 'LLLL Y', {
|
|
381
|
-
locale: locale$1
|
|
382
|
-
})
|
|
383
|
-
})
|
|
384
|
-
})
|
|
385
|
-
})
|
|
386
|
-
}), jsxRuntime.jsxs("table", {
|
|
387
|
-
className: "utrecht-calendar__table",
|
|
388
|
-
role: "grid",
|
|
389
|
-
children: [jsxRuntime.jsx(CalendarTableWeeksContainer, {
|
|
390
|
-
children: currentWeek && currentWeek.length > 0 && currentWeek.map(function (day, index) {
|
|
391
|
-
return jsxRuntime.jsx(CalendarTableWeeksItem, {
|
|
392
|
-
scope: "col",
|
|
393
|
-
abbr: dateFns.format(day, 'EEEE', {
|
|
394
|
-
locale: locale$1
|
|
395
|
-
}),
|
|
396
|
-
children: dateFns.format(day, 'EEEEEE', {
|
|
397
|
-
locale: locale$1
|
|
398
|
-
})
|
|
399
|
-
}, index);
|
|
400
|
-
})
|
|
401
|
-
}), jsxRuntime.jsx(CalendarTableDaysContainer, {
|
|
402
|
-
children: weeks && weeks.length > 0 && weeks.map(function (week, index) {
|
|
403
|
-
return jsxRuntime.jsx(CalendarTableDaysItem, {
|
|
404
|
-
children: week.map(function (day, index) {
|
|
405
|
-
return jsxRuntime.jsx(CalendarTableDaysItemDay, {
|
|
406
|
-
isToday: dateFns.isSameDay(day.date, Date.now()),
|
|
407
|
-
dayOutOfTheMonth: !dateFns.isSameMonth(day.date, visibleMonth),
|
|
408
|
-
onClick: function onClick() {
|
|
409
|
-
setVisibleMonth(day.date);
|
|
410
|
-
setSelectedDate(day.date);
|
|
411
|
-
onCalendarClick(dateFns.formatISO(day.date));
|
|
412
|
-
},
|
|
413
|
-
"aria-label": dateFns.format(day.date, 'eeee dd LLLL Y', {
|
|
414
|
-
locale: locale$1
|
|
415
|
-
}),
|
|
416
|
-
day: day.date.getDate().toString(),
|
|
417
|
-
emphasis: day.emphasis,
|
|
418
|
-
selected: day.selected || selectedDate && dateFns.isSameDay(day.date, selectedDate),
|
|
419
|
-
disabled: day.disabled || minDate && dateFns.isBefore(day.date, dateFns.startOfDay(minDate)) || maxDate && dateFns.isAfter(day.date, dateFns.endOfDay(maxDate))
|
|
420
|
-
}, index);
|
|
421
|
-
})
|
|
422
|
-
}, index);
|
|
423
|
-
})
|
|
424
|
-
})]
|
|
425
|
-
})]
|
|
426
|
-
});
|
|
427
|
-
};
|
|
428
|
-
|
|
429
|
-
exports.Calendar = Calendar;
|
|
430
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/CalendarNavigation.tsx","../src/CalendarButton.tsx","../src/CalendarIcon.tsx","../src/CalendarNavigationButtons.tsx","../src/CalendarNavigationLabel.tsx","../src/CalendarTableDaysContainer.tsx","../src/CalendarTableDaysItem.tsx","../src/CalendarTableDaysItemDay.tsx","../src/CalendarTableWeeksContainer.tsx","../src/CalendarTableWeeksItem.tsx","../src/IconArrowLeft.tsx","../src/IconArrowLeftDouble.tsx","../src/IconArrowRight.tsx","../src/IconArrowRightDouble.tsx","../src/index.tsx"],"sourcesContent":["import { DetailedHTMLProps, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface CalendarNavigationProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {}\n\nexport const CalendarNavigation = ({ children, ...props }: PropsWithChildren<CalendarNavigationProps>) => (\n <div className=\"utrecht-calendar__navigation\" {...props}>\n {children}\n </div>\n);\n","import { Button, ButtonProps } from '@utrecht/button-react';\nimport { clsx } from 'clsx';\nimport { PropsWithChildren } from 'react';\n\nexport interface CalendarButtonProps extends ButtonProps {}\n\nexport const CalendarButton = ({ children, className, ...props }: PropsWithChildren<CalendarButtonProps>) => (\n <Button appearance=\"subtle-button\" {...props} className={clsx('utrecht-calendar__button', className)}>\n {children}\n </Button>\n);\n","import { clsx } from 'clsx';\nimport { DetailedHTMLProps, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface CalendarIconProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {}\n\nexport const CalendarIcon = ({ children, ...props }: PropsWithChildren<CalendarIconProps>) => (\n <div className={clsx('utrecht-calendar__icon')} {...props}>\n {children}\n </div>\n);\n","import { MouseEventHandler, PropsWithChildren } from 'react';\nimport { CalendarButton, CalendarButtonProps } from './CalendarButton';\nimport { CalendarIcon } from './CalendarIcon';\ninterface CalendarNavigationButtonsProps extends CalendarButtonProps {\n onPreviousClick?: MouseEventHandler<HTMLButtonElement>;\n onNextClick?: MouseEventHandler<HTMLButtonElement>;\n previousIcon?: any;\n nextIcon?: any;\n previousTitle?: string;\n nextTitle?: string;\n}\n\nexport const CalendarNavigationButtons = ({\n onPreviousClick,\n onNextClick,\n previousIcon,\n nextIcon,\n children,\n ...props\n}: PropsWithChildren<CalendarNavigationButtonsProps>) => (\n <div className=\"utrecht-calendar__navigation-buttons\">\n <CalendarButton onClick={onPreviousClick} {...props}>\n <CalendarIcon>{previousIcon}</CalendarIcon>\n </CalendarButton>\n {children}\n <CalendarButton onClick={onNextClick} {...props}>\n <CalendarIcon>{nextIcon}</CalendarIcon>\n </CalendarButton>\n </div>\n);\n","import { PropsWithChildren, TimeHTMLAttributes } from 'react';\n\ntype CalendarNavigationLabelProps = TimeHTMLAttributes<HTMLTimeElement>;\n\nexport const CalendarNavigationLabel = ({ children, ...props }: PropsWithChildren<CalendarNavigationLabelProps>) => (\n <time className=\"utrecht-calendar__navigation-label\" {...props}>\n {children}\n </time>\n);\n","import { DetailedHTMLProps, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface CalendarTableDaysContainerProps\n extends DetailedHTMLProps<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement> {}\n\nexport const CalendarTableDaysContainer = ({\n children,\n ...props\n}: PropsWithChildren<CalendarTableDaysContainerProps>) => (\n <tbody {...props} className=\"utrecht-calendar__table-days-container\">\n {children}\n </tbody>\n);\n","import { DetailedHTMLProps, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface CalendarTableDaysItemProps\n extends DetailedHTMLProps<HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement> {}\n\nexport const CalendarTableDaysItem = ({ children, ...props }: PropsWithChildren<CalendarTableDaysItemProps>) => (\n <tr {...props}>{children}</tr>\n);\n","import clsx from 'clsx';\nimport { PropsWithChildren } from 'react';\nimport { CalendarButton, CalendarButtonProps } from './CalendarButton';\nexport interface CalendarTableDaysItemDayProps extends CalendarButtonProps {\n day: string;\n dayOutOfTheMonth?: boolean;\n isToday: boolean;\n emphasis?: boolean;\n selected?: boolean;\n disabled?: boolean;\n}\n\nexport const CalendarTableDaysItemDay = ({\n day,\n dayOutOfTheMonth,\n isToday,\n emphasis,\n selected,\n disabled,\n ...props\n}: PropsWithChildren<CalendarTableDaysItemDayProps>) => (\n <td>\n <CalendarButton\n className={clsx(\n 'utrecht-calendar__table-days-item-day',\n { 'utrecht-calendar__table-days-item-day--out-of-the-month': dayOutOfTheMonth },\n { 'utrecht-calendar__table-days-item-day--is-today': isToday },\n { 'utrecht-calendar__table-days-item-day--emphasis': emphasis },\n { 'utrecht-calendar__table-days-item-day--selected': selected },\n )}\n disabled={disabled}\n {...props}\n >\n {day}\n </CalendarButton>\n </td>\n);\n","import { PropsWithChildren } from 'react';\n\nexport const CalendarTableWeeksContainer = ({ children }: PropsWithChildren) => (\n <thead className=\"utrecht-calendar__table-weeks-container\">\n <tr className=\"utrecht-calendar__table-weeks-container-content\">{children}</tr>\n </thead>\n);\n","import { DetailedHTMLProps, PropsWithChildren, ThHTMLAttributes } from 'react';\n\nexport interface CalendarTableWeeksItemProps\n extends DetailedHTMLProps<ThHTMLAttributes<HTMLTableCellElement>, HTMLTableCellElement> {}\n\nexport const CalendarTableWeeksItem = ({ children, ...props }: PropsWithChildren<CalendarTableWeeksItemProps>) => (\n <th {...props} className=\"utrecht-calendar__table-weeks-item\">\n {children}\n </th>\n);\n","import { SVGProps } from 'react';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nexport const IconArrowLeft = ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => (\n <svg width=\"100%\" height=\"100%\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby={titleId} {...props}>\n {title ? <title id={titleId}>{title}</title> : null}\n <path d=\"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41Z\" fill=\"currentColor\" />\n </svg>\n);\n","import { SVGProps } from 'react';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nexport const IconArrowLeftDouble = ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => (\n <svg width=\"100%\" height=\"100%\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby={titleId} {...props}>\n {title ? <title id={titleId}>{title}</title> : null}\n <path d=\"M17.59 18 19 16.59 14.42 12 19 7.41 17.59 6l-6 6 6 6Z\" fill=\"currentColor\" />\n <path d=\"m11 18 1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6 6 6Z\" fill=\"currentColor\" />\n </svg>\n);\n","import { SVGProps } from 'react';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nexport const IconArrowRight = ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => (\n <svg width=\"100%\" height=\"100%\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby={titleId} {...props}>\n {title ? <title id={titleId}>{title}</title> : null}\n <path d=\"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41Z\" fill=\"currentColor\" />\n </svg>\n);\n","import { SVGProps } from 'react';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\n\nexport const IconArrowRightDouble = ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => (\n <svg fill=\"none\" width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby={titleId} {...props}>\n {title ? <title id={titleId}>{title}</title> : null}\n <path d=\"M6.41 6 5 7.41 9.58 12 5 16.59 6.41 18l6-6-6-6Z\" fill=\"currentColor\" />\n <path d=\"m13 6-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6-6-6Z\" fill=\"currentColor\" />\n </svg>\n);\n","import {\n addMonths,\n addWeeks,\n addYears,\n eachDayOfInterval,\n endOfDay,\n endOfWeek,\n format,\n formatISO,\n getYear,\n isAfter,\n isBefore,\n isSameDay,\n isSameMonth,\n Locale,\n parseISO,\n setMonth,\n setYear,\n startOfDay,\n startOfMonth,\n startOfWeek,\n} from 'date-fns';\nimport { enUS } from 'date-fns/locale';\nimport chunk from 'lodash.chunk';\nimport { useState } from 'react';\nimport { CalendarNavigation } from './CalendarNavigation';\nimport { CalendarNavigationButtons } from './CalendarNavigationButtons';\nimport { CalendarNavigationLabel } from './CalendarNavigationLabel';\nimport { CalendarTableDaysContainer } from './CalendarTableDaysContainer';\nimport { CalendarTableDaysItem } from './CalendarTableDaysItem';\nimport { CalendarTableDaysItemDay } from './CalendarTableDaysItemDay';\nimport { CalendarTableWeeksContainer } from './CalendarTableWeeksContainer';\nimport { CalendarTableWeeksItem } from './CalendarTableWeeksItem';\nimport { IconArrowLeft } from './IconArrowLeft';\nimport { IconArrowLeftDouble } from './IconArrowLeftDouble';\nimport { IconArrowRight } from './IconArrowRight';\nimport { IconArrowRightDouble } from './IconArrowRightDouble';\n\nfunction createCalendar(today: Date): Date[] {\n const start = startOfWeek(startOfMonth(today), {\n weekStartsOn: 1 /* Monday */,\n });\n const end = endOfWeek(addWeeks(start, 5), {\n weekStartsOn: 1 /* Monday */,\n });\n return eachDayOfInterval({ start, end });\n}\n\nexport type Events = {\n date: string;\n emphasis?: boolean;\n selected?: boolean;\n disabled?: boolean;\n};\n\nexport interface CalendarProps {\n /**\n * `onCalendarClick` It's a callback function that returns the selected date, triggered when you click on the day\n *\n * */\n onCalendarClick: (date: string) => void;\n /**\n * `events` An array of event objects that contain some properties that allow you to change the calendar day style base on your value\n * `{date?: Date; emphasis?: boolean; selected?: boolean; disabled?: boolean;}`\n *\n * */\n events?: Events[];\n /**\n * `currentDate` The default value is `new Date()`, but you can provide a different date\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\n * */\n currentDate?: Date;\n /**\n * `locale` to change the calendar language by using 'date-fns/locale'\n * `import { nl, enUS } from 'date-fns/locale';`\n * */\n locale?: Locale;\n previousYearButtonTitle?: string;\n nextYearButtonTitle?: string;\n previousMonthButtonTitle?: string;\n nextMonthButtonTitle?: string;\n minDate?: Date;\n maxDate?: Date;\n}\n\n/**\n * Calendar Component\n * powered by date-fns, so that make it easy to use the `date-fns` date functions & locale\n * */\n\nexport const Calendar = ({\n onCalendarClick,\n events,\n currentDate,\n locale = enUS,\n previousYearButtonTitle = 'Previous year',\n nextYearButtonTitle = 'Next year',\n previousMonthButtonTitle = 'Previous month',\n nextMonthButtonTitle = 'Next month',\n minDate,\n maxDate,\n}: CalendarProps) => {\n const [visibleMonth, setVisibleMonth] = useState(currentDate || new Date());\n const [selectedDate, setSelectedDate] = useState(currentDate);\n const calendar = createCalendar(visibleMonth);\n const start = startOfWeek(visibleMonth, { weekStartsOn: 1 });\n const end = endOfWeek(visibleMonth, { weekStartsOn: 1 });\n\n const currentWeek = eachDayOfInterval({ start, end }).map((day) => day);\n const chunksWeeks = chunk(calendar, calendar.length / 6);\n\n const weeks = chunksWeeks.map((week) =>\n week.map((date) => {\n const currentEvent =\n events && events.length > 0 && events.find((e) => isSameDay(endOfDay(parseISO(e.date)), date));\n if (currentEvent) {\n return {\n date,\n emphasis: currentEvent.emphasis,\n selected: currentEvent.selected,\n disabled: currentEvent.disabled,\n };\n } else {\n return {\n date,\n emphasis: false,\n selected: false,\n disabled: false,\n };\n }\n }),\n );\n\n return (\n <div className=\"utrecht-calendar\">\n <CalendarNavigation>\n <CalendarNavigationButtons\n previousIcon={<IconArrowLeftDouble title={previousYearButtonTitle} />}\n nextIcon={<IconArrowRightDouble title={nextYearButtonTitle} />}\n onPreviousClick={() => setVisibleMonth(setYear(visibleMonth, getYear(visibleMonth) - 1))}\n onNextClick={() => setVisibleMonth(addYears(visibleMonth, 1))}\n >\n <CalendarNavigationButtons\n previousIcon={<IconArrowLeft title={previousMonthButtonTitle} />}\n nextIcon={<IconArrowRight title={nextMonthButtonTitle} />}\n onPreviousClick={() => setVisibleMonth(setMonth(visibleMonth, visibleMonth.getMonth() - 1))}\n onNextClick={() => setVisibleMonth(addMonths(visibleMonth, 1))}\n >\n <CalendarNavigationLabel dateTime={format(visibleMonth, 'yyyy-mm')}>\n {format(visibleMonth, 'LLLL Y', { locale })}\n </CalendarNavigationLabel>\n </CalendarNavigationButtons>\n </CalendarNavigationButtons>\n </CalendarNavigation>\n <table className=\"utrecht-calendar__table\" role=\"grid\">\n <CalendarTableWeeksContainer>\n {currentWeek &&\n currentWeek.length > 0 &&\n currentWeek.map((day, index) => (\n <CalendarTableWeeksItem scope=\"col\" abbr={format(day, 'EEEE', { locale })} key={index}>\n {format(day, 'EEEEEE', { locale })}\n </CalendarTableWeeksItem>\n ))}\n </CalendarTableWeeksContainer>\n <CalendarTableDaysContainer>\n {weeks &&\n weeks.length > 0 &&\n weeks.map((week, index) => (\n <CalendarTableDaysItem key={index}>\n {week.map((day, index) => {\n return (\n <CalendarTableDaysItemDay\n isToday={isSameDay(day.date, Date.now())}\n dayOutOfTheMonth={!isSameMonth(day.date, visibleMonth)}\n key={index}\n onClick={() => {\n setVisibleMonth(day.date);\n setSelectedDate(day.date);\n onCalendarClick(formatISO(day.date));\n }}\n aria-label={format(day.date, 'eeee dd LLLL Y', { locale })}\n day={day.date.getDate().toString()}\n emphasis={day.emphasis}\n selected={day.selected || (selectedDate && isSameDay(day.date, selectedDate))}\n disabled={\n day.disabled ||\n (minDate && isBefore(day.date, startOfDay(minDate))) ||\n (maxDate && isAfter(day.date, endOfDay(maxDate)))\n }\n />\n );\n })}\n </CalendarTableDaysItem>\n ))}\n </CalendarTableDaysContainer>\n </table>\n </div>\n );\n};\n"],"names":["CalendarNavigation","_ref","children","props","_objectWithoutProperties","_excluded","_jsx","_objectSpread","className","CalendarButton","Button","appearance","clsx","CalendarIcon","CalendarNavigationButtons","onPreviousClick","onNextClick","previousIcon","nextIcon","_jsxs","onClick","CalendarNavigationLabel","CalendarTableDaysContainer","CalendarTableDaysItem","CalendarTableDaysItemDay","day","dayOutOfTheMonth","isToday","emphasis","selected","disabled","CalendarTableWeeksContainer","CalendarTableWeeksItem","IconArrowLeft","title","titleId","width","height","fill","xmlns","id","d","IconArrowLeftDouble","IconArrowRight","IconArrowRightDouble","createCalendar","today","start","startOfWeek","startOfMonth","weekStartsOn","end","endOfWeek","addWeeks","eachDayOfInterval","Calendar","onCalendarClick","events","currentDate","_ref$locale","locale","enUS","_ref$previousYearButt","previousYearButtonTitle","_ref$nextYearButtonTi","nextYearButtonTitle","_ref$previousMonthBut","previousMonthButtonTitle","_ref$nextMonthButtonT","nextMonthButtonTitle","minDate","maxDate","_useState","useState","Date","_useState2","_slicedToArray","visibleMonth","setVisibleMonth","_useState3","_useState4","selectedDate","setSelectedDate","calendar","currentWeek","map","chunksWeeks","chunk","length","weeks","week","date","currentEvent","find","e","isSameDay","endOfDay","parseISO","setYear","getYear","addYears","setMonth","getMonth","addMonths","dateTime","format","role","index","scope","abbr","now","isSameMonth","formatISO","getDate","toString","isBefore","startOfDay","isAfter"],"mappings":";;;;;;;;;;;;;;;;AAI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