@react-spectrum/calendar 3.5.0 → 3.6.1

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.
@@ -35,7 +35,7 @@ $parcel$export(module.exports, "Calendar", () => $d9490b77e8681e44$export$e1aef4
35
35
 
36
36
 
37
37
 
38
- function $d9490b77e8681e44$var$Calendar(props, ref) {
38
+ const $d9490b77e8681e44$export$e1aef45b828286de = /*#__PURE__*/ (0, ($parcel$interopDefault($jdfnP$react))).forwardRef(function Calendar(props, ref) {
39
39
  props = (0, $jdfnP$reactspectrumprovider.useProviderProps)(props);
40
40
  let { visibleMonths: visibleMonths = 1 } = props;
41
41
  visibleMonths = Math.max(visibleMonths, 1);
@@ -69,10 +69,7 @@ function $d9490b77e8681e44$var$Calendar(props, ref) {
69
69
  nextButtonProps: nextButtonProps,
70
70
  errorMessageProps: errorMessageProps
71
71
  });
72
- }
73
- /**
74
- * Calendars display a grid of days in one or more months and allow users to select a single date.
75
- */ const $d9490b77e8681e44$export$e1aef45b828286de = /*#__PURE__*/ (0, ($parcel$interopDefault($jdfnP$react))).forwardRef($d9490b77e8681e44$var$Calendar);
72
+ });
76
73
 
77
74
 
78
75
  //# sourceMappingURL=Calendar.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAaD,SAAS,+BAA8B,KAA+B,EAAE,GAA8B;IACpG,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,iBAAC,gBAAgB,GAAE,GAAG;IAC1B,gBAAgB,KAAK,GAAG,CAAC,eAAe;IACxC,IAAI,kBAAkB,CAAA,GAAA,oBAAM,EAAE,IAAO,CAAA;YAAC,QAAQ;QAAa,CAAA,GAAI;QAAC;KAAc;IAC9E,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,8BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,4CAAe,EAAE;QAC3B,GAAG,KAAK;gBACR;yBACA;wBACA;IACF;IAEA,IAAI,SAAS,CAAA,GAAA,mBAAK,EAAE;IACpB,CAAA,GAAA,gCAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,sCAAW,EAAE,OAAO;YACvB;gBACE,MAAM,UAAU,CAAC;YACnB;QACF,CAAA;IAEA,IAAI,iBAAC,aAAa,mBAAE,eAAe,mBAAE,eAAe,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,oCAAU,EAAE,OAAO;IAE9F,qBACE,0DAAC,CAAA,GAAA,sCAAW;QACT,GAAG,KAAK;QACT,eAAe;QACf,OAAO;QACP,aAAa;QACb,eAAe;QACf,iBAAiB;QACjB,iBAAiB;QACjB,mBAAmB;;AAEzB;AAEA;;CAEC,GACD,MAAM,0DAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/calendar/src/Calendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {createDOMRef} from '@react-spectrum/utils';\nimport {DateValue, SpectrumCalendarProps} from '@react-types/calendar';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {ReactElement, useImperativeHandle, useMemo, useRef} from 'react';\nimport {useCalendar} from '@react-aria/calendar';\nimport {useCalendarState} from '@react-stately/calendar';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let {visibleMonths = 1} = props;\n visibleMonths = Math.max(visibleMonths, 1);\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let domRef = useRef(null);\n useImperativeHandle(ref, () => ({\n ...createDOMRef(domRef),\n focus() {\n state.setFocused(true);\n }\n }));\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useCalendar(props, state);\n\n return (\n <CalendarBase\n {...props}\n visibleMonths={visibleMonths}\n state={state}\n calendarRef={domRef}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}\n\n/**\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n */\nconst _Calendar = React.forwardRef(Calendar) as <T extends DateValue>(props: SpectrumCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\nexport {_Calendar as Calendar};\n"],"names":[],"version":3,"file":"Calendar.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAgBM,MAAM,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,SAA8B,KAA+B,EAAE,GAA8B;IAC7I,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,iBAAC,gBAAgB,GAAE,GAAG;IAC1B,gBAAgB,KAAK,GAAG,CAAC,eAAe;IACxC,IAAI,kBAAkB,CAAA,GAAA,oBAAM,EAAE,IAAO,CAAA;YAAC,QAAQ;QAAa,CAAA,GAAI;QAAC;KAAc;IAC9E,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,8BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,4CAAe,EAAE;QAC3B,GAAG,KAAK;gBACR;yBACA;wBACA;IACF;IAEA,IAAI,SAAS,CAAA,GAAA,mBAAK,EAAE;IACpB,CAAA,GAAA,gCAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,sCAAW,EAAE,OAAO;YACvB;gBACE,MAAM,UAAU,CAAC;YACnB;QACF,CAAA;IAEA,IAAI,iBAAC,aAAa,mBAAE,eAAe,mBAAE,eAAe,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,oCAAU,EAAE,OAAO;IAE9F,qBACE,0DAAC,CAAA,GAAA,sCAAW;QACT,GAAG,KAAK;QACT,eAAe;QACf,OAAO;QACP,aAAa;QACb,eAAe;QACf,iBAAiB;QACjB,iBAAiB;QACjB,mBAAmB;;AAEzB","sources":["packages/@react-spectrum/calendar/src/Calendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {createDOMRef} from '@react-spectrum/utils';\nimport {DateValue, SpectrumCalendarProps} from '@react-types/calendar';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {ReactElement, useImperativeHandle, useMemo, useRef} from 'react';\nimport {useCalendar} from '@react-aria/calendar';\nimport {useCalendarState} from '@react-stately/calendar';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n */\nexport const Calendar = React.forwardRef(function Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let {visibleMonths = 1} = props;\n visibleMonths = Math.max(visibleMonths, 1);\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let domRef = useRef(null);\n useImperativeHandle(ref, () => ({\n ...createDOMRef(domRef),\n focus() {\n state.setFocused(true);\n }\n }));\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useCalendar(props, state);\n\n return (\n <CalendarBase\n {...props}\n visibleMonths={visibleMonths}\n state={state}\n calendarRef={domRef}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}) as <T extends DateValue>(props: SpectrumCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"Calendar.main.js.map"}
package/dist/Calendar.mjs CHANGED
@@ -25,7 +25,7 @@ import {useProviderProps as $fF0AO$useProviderProps} from "@react-spectrum/provi
25
25
 
26
26
 
27
27
 
28
- function $d2b8d4577dd88671$var$Calendar(props, ref) {
28
+ const $d2b8d4577dd88671$export$e1aef45b828286de = /*#__PURE__*/ (0, $fF0AO$react).forwardRef(function Calendar(props, ref) {
29
29
  props = (0, $fF0AO$useProviderProps)(props);
30
30
  let { visibleMonths: visibleMonths = 1 } = props;
31
31
  visibleMonths = Math.max(visibleMonths, 1);
@@ -59,10 +59,7 @@ function $d2b8d4577dd88671$var$Calendar(props, ref) {
59
59
  nextButtonProps: nextButtonProps,
60
60
  errorMessageProps: errorMessageProps
61
61
  });
62
- }
63
- /**
64
- * Calendars display a grid of days in one or more months and allow users to select a single date.
65
- */ const $d2b8d4577dd88671$export$e1aef45b828286de = /*#__PURE__*/ (0, $fF0AO$react).forwardRef($d2b8d4577dd88671$var$Calendar);
62
+ });
66
63
 
67
64
 
68
65
  export {$d2b8d4577dd88671$export$e1aef45b828286de as Calendar};
@@ -25,7 +25,7 @@ import {useProviderProps as $fF0AO$useProviderProps} from "@react-spectrum/provi
25
25
 
26
26
 
27
27
 
28
- function $d2b8d4577dd88671$var$Calendar(props, ref) {
28
+ const $d2b8d4577dd88671$export$e1aef45b828286de = /*#__PURE__*/ (0, $fF0AO$react).forwardRef(function Calendar(props, ref) {
29
29
  props = (0, $fF0AO$useProviderProps)(props);
30
30
  let { visibleMonths: visibleMonths = 1 } = props;
31
31
  visibleMonths = Math.max(visibleMonths, 1);
@@ -59,10 +59,7 @@ function $d2b8d4577dd88671$var$Calendar(props, ref) {
59
59
  nextButtonProps: nextButtonProps,
60
60
  errorMessageProps: errorMessageProps
61
61
  });
62
- }
63
- /**
64
- * Calendars display a grid of days in one or more months and allow users to select a single date.
65
- */ const $d2b8d4577dd88671$export$e1aef45b828286de = /*#__PURE__*/ (0, $fF0AO$react).forwardRef($d2b8d4577dd88671$var$Calendar);
62
+ });
66
63
 
67
64
 
68
65
  export {$d2b8d4577dd88671$export$e1aef45b828286de as Calendar};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAaD,SAAS,+BAA8B,KAA+B,EAAE,GAA8B;IACpG,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,iBAAC,gBAAgB,GAAE,GAAG;IAC1B,gBAAgB,KAAK,GAAG,CAAC,eAAe;IACxC,IAAI,kBAAkB,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;YAAC,QAAQ;QAAa,CAAA,GAAI;QAAC;KAAc;IAC9E,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,uBAAe,EAAE;QAC3B,GAAG,KAAK;gBACR;yBACA;wBACA;IACF;IAEA,IAAI,SAAS,CAAA,GAAA,aAAK,EAAE;IACpB,CAAA,GAAA,0BAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,mBAAW,EAAE,OAAO;YACvB;gBACE,MAAM,UAAU,CAAC;YACnB;QACF,CAAA;IAEA,IAAI,iBAAC,aAAa,mBAAE,eAAe,mBAAE,eAAe,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,kBAAU,EAAE,OAAO;IAE9F,qBACE,gCAAC,CAAA,GAAA,yCAAW;QACT,GAAG,KAAK;QACT,eAAe;QACf,OAAO;QACP,aAAa;QACb,eAAe;QACf,iBAAiB;QACjB,iBAAiB;QACjB,mBAAmB;;AAEzB;AAEA;;CAEC,GACD,MAAM,0DAAY,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/calendar/src/Calendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {createDOMRef} from '@react-spectrum/utils';\nimport {DateValue, SpectrumCalendarProps} from '@react-types/calendar';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {ReactElement, useImperativeHandle, useMemo, useRef} from 'react';\nimport {useCalendar} from '@react-aria/calendar';\nimport {useCalendarState} from '@react-stately/calendar';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let {visibleMonths = 1} = props;\n visibleMonths = Math.max(visibleMonths, 1);\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let domRef = useRef(null);\n useImperativeHandle(ref, () => ({\n ...createDOMRef(domRef),\n focus() {\n state.setFocused(true);\n }\n }));\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useCalendar(props, state);\n\n return (\n <CalendarBase\n {...props}\n visibleMonths={visibleMonths}\n state={state}\n calendarRef={domRef}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}\n\n/**\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n */\nconst _Calendar = React.forwardRef(Calendar) as <T extends DateValue>(props: SpectrumCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\nexport {_Calendar as Calendar};\n"],"names":[],"version":3,"file":"Calendar.module.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAgBM,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,SAA8B,KAA+B,EAAE,GAA8B;IAC7I,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,iBAAC,gBAAgB,GAAE,GAAG;IAC1B,gBAAgB,KAAK,GAAG,CAAC,eAAe;IACxC,IAAI,kBAAkB,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;YAAC,QAAQ;QAAa,CAAA,GAAI;QAAC;KAAc;IAC9E,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,uBAAe,EAAE;QAC3B,GAAG,KAAK;gBACR;yBACA;wBACA;IACF;IAEA,IAAI,SAAS,CAAA,GAAA,aAAK,EAAE;IACpB,CAAA,GAAA,0BAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,mBAAW,EAAE,OAAO;YACvB;gBACE,MAAM,UAAU,CAAC;YACnB;QACF,CAAA;IAEA,IAAI,iBAAC,aAAa,mBAAE,eAAe,mBAAE,eAAe,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,kBAAU,EAAE,OAAO;IAE9F,qBACE,gCAAC,CAAA,GAAA,yCAAW;QACT,GAAG,KAAK;QACT,eAAe;QACf,OAAO;QACP,aAAa;QACb,eAAe;QACf,iBAAiB;QACjB,iBAAiB;QACjB,mBAAmB;;AAEzB","sources":["packages/@react-spectrum/calendar/src/Calendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {createDOMRef} from '@react-spectrum/utils';\nimport {DateValue, SpectrumCalendarProps} from '@react-types/calendar';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {ReactElement, useImperativeHandle, useMemo, useRef} from 'react';\nimport {useCalendar} from '@react-aria/calendar';\nimport {useCalendarState} from '@react-stately/calendar';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n */\nexport const Calendar = React.forwardRef(function Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let {visibleMonths = 1} = props;\n visibleMonths = Math.max(visibleMonths, 1);\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let domRef = useRef(null);\n useImperativeHandle(ref, () => ({\n ...createDOMRef(domRef),\n focus() {\n state.setFocused(true);\n }\n }));\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useCalendar(props, state);\n\n return (\n <CalendarBase\n {...props}\n visibleMonths={visibleMonths}\n state={state}\n calendarRef={domRef}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}) as <T extends DateValue>(props: SpectrumCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"Calendar.module.js.map"}
@@ -1,6 +1,6 @@
1
1
  var $02c19eea15a72a7b$exports = require("./CalendarMonth.main.js");
2
2
  var $7e7c3b1f5233ce23$exports = require("./intlStrings.main.js");
3
- require("./vars.83159c34.css");
3
+ require("./vars.0e34c9ec.css");
4
4
  var $915891ae6206caad$exports = require("./calendar_vars_css.main.js");
5
5
  var $6ckm4$reactspectrumbutton = require("@react-spectrum/button");
6
6
  var $6ckm4$spectrumiconsuiChevronLeftLarge = require("@spectrum-icons/ui/ChevronLeftLarge");
@@ -43,7 +43,7 @@ $parcel$export(module.exports, "CalendarBase", () => $6d416018158e3a26$export$bf
43
43
 
44
44
 
45
45
  function $6d416018158e3a26$export$bfd52a43017368fe(props) {
46
- let { state: state, calendarProps: calendarProps, nextButtonProps: nextButtonProps, prevButtonProps: prevButtonProps, errorMessageProps: errorMessageProps, calendarRef: ref, visibleMonths: visibleMonths = 1 } = props;
46
+ let { state: state, calendarProps: calendarProps, nextButtonProps: nextButtonProps, prevButtonProps: prevButtonProps, errorMessageProps: errorMessageProps, calendarRef: ref, visibleMonths: visibleMonths = 1, firstDayOfWeek: firstDayOfWeek } = props;
47
47
  let { styleProps: styleProps } = (0, $6ckm4$reactspectrumutils.useStyleProps)(props);
48
48
  let stringFormatter = (0, $6ckm4$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($7e7c3b1f5233ce23$exports))), '@react-spectrum/calendar');
49
49
  let { direction: direction } = (0, $6ckm4$reactariai18n.useLocale)();
@@ -83,7 +83,8 @@ function $6d416018158e3a26$export$bfd52a43017368fe(props) {
83
83
  ...props,
84
84
  key: i,
85
85
  state: state,
86
- startDate: d
86
+ startDate: d,
87
+ firstDayOfWeek: firstDayOfWeek
87
88
  }));
88
89
  }
89
90
  return /*#__PURE__*/ (0, ($parcel$interopDefault($6ckm4$react))).createElement("div", {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AA6BM,SAAS,0CAA2D,KAA2B;IACpG,IAAI,SACF,KAAK,iBACL,aAAa,mBACb,eAAe,mBACf,eAAe,qBACf,iBAAiB,EACjB,aAAa,GAAG,iBAChB,gBAAgB,GACjB,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,eAAe,MAAM,YAAY,CAAC,KAAK;IAC3C,IAAI,qBAAqB,CAAA,GAAA,qCAAe,EAAE;QACxC,OAAO;QACP,MAAM;QACN,KAAK,aAAa,QAAQ,CAAC,UAAU,KAAK,aAAa,aAAa,GAAG,KAAK,OAAO,UAAU;QAC7F,UAAU,aAAa,QAAQ,CAAC,UAAU;QAC1C,UAAU,MAAM,QAAQ;IAC1B;IAEA,IAAI,SAAwB,EAAE;IAC9B,IAAI,YAA2B,EAAE;IACjC,IAAK,IAAI,IAAI,GAAG,IAAI,eAAe,IAAK;QACtC,IAAI,IAAI,aAAa,GAAG,CAAC;YAAC,QAAQ;QAAC;QACnC,OAAO,IAAI,eACT,0DAAC;YAAI,KAAK;YAAG,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;WACxC,MAAM,mBACL,0DAAC,CAAA,GAAA,uCAAW;YACT,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AM,cAAc,kBACnB,0DAAC,CAAA,GAAA,kCAAO;QACN,eAAA;QACA,cAAc,MAAM,YAAY,IAAI,gBAAgB,MAAM,CAAC,oBAAoB;YAAC,eAAe,sBAAsB,QAAQ,IAAI;QAAC;QAClI,mBAAmB;QACnB,WAAA;QACA,+EAA+E;QAC/E,kBAAiB;;AAI3B","sources":["packages/@react-spectrum/calendar/src/CalendarBase.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaButtonProps} from '@react-types/button';\nimport {CalendarMonth} from './CalendarMonth';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport ChevronLeft from '@spectrum-icons/ui/ChevronLeftLarge';\nimport ChevronRight from '@spectrum-icons/ui/ChevronRightLarge';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, RefObject, StyleProps} from '@react-types/shared';\nimport {HelpText} from '@react-spectrum/label';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {HTMLAttributes, JSX} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useDateFormatter, useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface CalendarBaseProps<T extends CalendarState | RangeCalendarState> extends CalendarPropsBase, DOMProps, StyleProps {\n state: T,\n visibleMonths?: number,\n calendarProps: HTMLAttributes<HTMLElement>,\n nextButtonProps: AriaButtonProps,\n prevButtonProps: AriaButtonProps,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n calendarRef: RefObject<HTMLDivElement | null>\n}\n\nexport function CalendarBase<T extends CalendarState | RangeCalendarState>(props: CalendarBaseProps<T>) {\n let {\n state,\n calendarProps,\n nextButtonProps,\n prevButtonProps,\n errorMessageProps,\n calendarRef: ref,\n visibleMonths = 1\n } = props;\n let {styleProps} = useStyleProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/calendar');\n let {direction} = useLocale();\n let currentMonth = state.visibleRange.start;\n let monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n era: currentMonth.calendar.identifier === 'gregory' && currentMonth.era === 'BC' ? 'short' : undefined,\n calendar: currentMonth.calendar.identifier,\n timeZone: state.timeZone\n });\n\n let titles: JSX.Element[] = [];\n let calendars: JSX.Element[] = [];\n for (let i = 0; i < visibleMonths; i++) {\n let d = currentMonth.add({months: i});\n titles.push(\n <div key={i} className={classNames(styles, 'spectrum-Calendar-monthHeader')}>\n {i === 0 &&\n <ActionButton\n {...prevButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-prevMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronRight /> : <ChevronLeft />}\n </ActionButton>\n }\n <h2\n // We have a visually hidden heading describing the entire visible range,\n // and the calendar itself describes the individual month\n // so we don't need to repeat that here for screen reader users.\n aria-hidden\n className={classNames(styles, 'spectrum-Calendar-title')}>\n {monthDateFormatter.format(d.toDate(state.timeZone))}\n </h2>\n {i === visibleMonths - 1 &&\n <ActionButton\n {...nextButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-nextMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronLeft /> : <ChevronRight />}\n </ActionButton>\n }\n </div>\n );\n\n calendars.push(\n <CalendarMonth\n {...props}\n key={i}\n state={state}\n startDate={d} />\n );\n }\n\n return (\n <div\n {...styleProps}\n {...calendarProps}\n ref={ref}\n className={\n classNames(styles,\n 'spectrum-Calendar',\n styleProps.className\n )\n }>\n {/* Add a screen reader only description of the entire visible range rather than\n * a separate heading above each month grid. This is placed first in the DOM order\n * so that it is the first thing a touch screen reader user encounters.\n * In addition, VoiceOver on iOS does not announce the aria-label of the grid\n * elements, so the aria-label of the Calendar is included here as well. */}\n <VisuallyHidden>\n <h2>{calendarProps['aria-label']}</h2>\n </VisuallyHidden>\n <div className={classNames(styles, 'spectrum-Calendar-header')}>\n {titles}\n </div>\n <div className={classNames(styles, 'spectrum-Calendar-months')}>\n {calendars}\n </div>\n {/* For touch screen readers, add a visually hidden next button after the month grid\n * so it's easy to navigate after reaching the end without going all the way\n * back to the start of the month. */}\n <VisuallyHidden>\n <button\n aria-label={nextButtonProps['aria-label']}\n disabled={nextButtonProps.isDisabled}\n onClick={() => state.focusNextPage()}\n tabIndex={-1} />\n </VisuallyHidden>\n {state.isValueInvalid &&\n <HelpText\n showErrorIcon\n errorMessage={props.errorMessage || stringFormatter.format('invalidSelection', {selectedCount: 'highlightedRange' in state ? 2 : 1})}\n errorMessageProps={errorMessageProps}\n isInvalid\n // Intentionally a global class name so it can be targeted in DatePicker CSS...\n UNSAFE_className=\"spectrum-Calendar-helpText\" />\n }\n </div>\n );\n}\n"],"names":[],"version":3,"file":"CalendarBase.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AA6BM,SAAS,0CAA2D,KAA2B;IACpG,IAAI,SACF,KAAK,iBACL,aAAa,mBACb,eAAe,mBACf,eAAe,qBACf,iBAAiB,EACjB,aAAa,GAAG,iBAChB,gBAAgB,mBAChB,cAAc,EACf,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,I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ACL,OAAO;YACP,WAAW;YACX,gBAAgB;;IAEtB;IAEA,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,aAAa;QACjB,KAAK;QACL,WACE,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GACd,qBACA,WAAW,SAAS;qBAQxB,0DAAC,CAAA,GAAA,6CAAa,uBACZ,0DAAC,YAAI,aAAa,CAAC,aAAa,kBAElC,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAChC,uBAEH,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAChC,0BAKH,0DAAC,CAAA,GAAA,6CAAa,uBACZ,0DAAC;QACC,cAAY,eAAe,CAAC,aAAa;QACzC,UAAU,gBAAgB,UAAU;QACpC,SAAS,IAAM,MAAM,aAAa;QAClC,UAAU;SAEb,MAAM,cAAc,kBACnB,0DAAC,CAAA,GAAA,kCAAO;QACN,eAAA;QACA,cAAc,MAAM,YAAY,IAAI,gBAAgB,MAAM,CAAC,oBAAoB;YAAC,eAAe,sBAAsB,QAAQ,IAAI;QAAC;QAClI,mBAAmB;QACnB,WAAA;QACA,+EAA+E;QAC/E,kBAAiB;;AAI3B","sources":["packages/@react-spectrum/calendar/src/CalendarBase.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaButtonProps} from '@react-types/button';\nimport {CalendarMonth} from './CalendarMonth';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport ChevronLeft from '@spectrum-icons/ui/ChevronLeftLarge';\nimport ChevronRight from '@spectrum-icons/ui/ChevronRightLarge';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, RefObject, StyleProps} from '@react-types/shared';\nimport {HelpText} from '@react-spectrum/label';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {HTMLAttributes, JSX} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useDateFormatter, useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface CalendarBaseProps<T extends CalendarState | RangeCalendarState> extends CalendarPropsBase, DOMProps, StyleProps {\n state: T,\n visibleMonths?: number,\n calendarProps: HTMLAttributes<HTMLElement>,\n nextButtonProps: AriaButtonProps,\n prevButtonProps: AriaButtonProps,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n calendarRef: RefObject<HTMLDivElement | null>\n}\n\nexport function CalendarBase<T extends CalendarState | RangeCalendarState>(props: CalendarBaseProps<T>) {\n let {\n state,\n calendarProps,\n nextButtonProps,\n prevButtonProps,\n errorMessageProps,\n calendarRef: ref,\n visibleMonths = 1,\n firstDayOfWeek\n } = props;\n let {styleProps} = useStyleProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/calendar');\n let {direction} = useLocale();\n let currentMonth = state.visibleRange.start;\n let monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n era: currentMonth.calendar.identifier === 'gregory' && currentMonth.era === 'BC' ? 'short' : undefined,\n calendar: currentMonth.calendar.identifier,\n timeZone: state.timeZone\n });\n\n let titles: JSX.Element[] = [];\n let calendars: JSX.Element[] = [];\n for (let i = 0; i < visibleMonths; i++) {\n let d = currentMonth.add({months: i});\n titles.push(\n <div key={i} className={classNames(styles, 'spectrum-Calendar-monthHeader')}>\n {i === 0 &&\n <ActionButton\n {...prevButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-prevMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronRight /> : <ChevronLeft />}\n </ActionButton>\n }\n <h2\n // We have a visually hidden heading describing the entire visible range,\n // and the calendar itself describes the individual month\n // so we don't need to repeat that here for screen reader users.\n aria-hidden\n className={classNames(styles, 'spectrum-Calendar-title')}>\n {monthDateFormatter.format(d.toDate(state.timeZone))}\n </h2>\n {i === visibleMonths - 1 &&\n <ActionButton\n {...nextButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-nextMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronLeft /> : <ChevronRight />}\n </ActionButton>\n }\n </div>\n );\n\n calendars.push(\n <CalendarMonth\n {...props}\n key={i}\n state={state}\n startDate={d}\n firstDayOfWeek={firstDayOfWeek} />\n );\n }\n\n return (\n <div\n {...styleProps}\n {...calendarProps}\n ref={ref}\n className={\n classNames(styles,\n 'spectrum-Calendar',\n styleProps.className\n )\n }>\n {/* Add a screen reader only description of the entire visible range rather than\n * a separate heading above each month grid. This is placed first in the DOM order\n * so that it is the first thing a touch screen reader user encounters.\n * In addition, VoiceOver on iOS does not announce the aria-label of the grid\n * elements, so the aria-label of the Calendar is included here as well. */}\n <VisuallyHidden>\n <h2>{calendarProps['aria-label']}</h2>\n </VisuallyHidden>\n <div className={classNames(styles, 'spectrum-Calendar-header')}>\n {titles}\n </div>\n <div className={classNames(styles, 'spectrum-Calendar-months')}>\n {calendars}\n </div>\n {/* For touch screen readers, add a visually hidden next button after the month grid\n * so it's easy to navigate after reaching the end without going all the way\n * back to the start of the month. */}\n <VisuallyHidden>\n <button\n aria-label={nextButtonProps['aria-label']}\n disabled={nextButtonProps.isDisabled}\n onClick={() => state.focusNextPage()}\n tabIndex={-1} />\n </VisuallyHidden>\n {state.isValueInvalid &&\n <HelpText\n showErrorIcon\n errorMessage={props.errorMessage || stringFormatter.format('invalidSelection', {selectedCount: 'highlightedRange' in state ? 2 : 1})}\n errorMessageProps={errorMessageProps}\n isInvalid\n // Intentionally a global class name so it can be targeted in DatePicker CSS...\n UNSAFE_className=\"spectrum-Calendar-helpText\" />\n }\n </div>\n );\n}\n"],"names":[],"version":3,"file":"CalendarBase.main.js.map"}
@@ -1,6 +1,6 @@
1
1
  import {CalendarMonth as $faa2f3867773cfe5$export$26e2752316b9a375} from "./CalendarMonth.mjs";
2
2
  import $bF3AV$intlStringsmodulejs from "./intlStrings.mjs";
3
- import "./vars.83159c34.css";
3
+ import "./vars.0e34c9ec.css";
4
4
  import $bF3AV$calendar_vars_cssmodulejs from "./calendar_vars_css.mjs";
5
5
  import {ActionButton as $bF3AV$ActionButton} from "@react-spectrum/button";
6
6
  import $bF3AV$spectrumiconsuiChevronLeftLarge from "@spectrum-icons/ui/ChevronLeftLarge";
@@ -37,7 +37,7 @@ function $parcel$interopDefault(a) {
37
37
 
38
38
 
39
39
  function $62cd1e80f0dffb66$export$bfd52a43017368fe(props) {
40
- let { state: state, calendarProps: calendarProps, nextButtonProps: nextButtonProps, prevButtonProps: prevButtonProps, errorMessageProps: errorMessageProps, calendarRef: ref, visibleMonths: visibleMonths = 1 } = props;
40
+ let { state: state, calendarProps: calendarProps, nextButtonProps: nextButtonProps, prevButtonProps: prevButtonProps, errorMessageProps: errorMessageProps, calendarRef: ref, visibleMonths: visibleMonths = 1, firstDayOfWeek: firstDayOfWeek } = props;
41
41
  let { styleProps: styleProps } = (0, $bF3AV$useStyleProps)(props);
42
42
  let stringFormatter = (0, $bF3AV$useLocalizedStringFormatter)((0, ($parcel$interopDefault($bF3AV$intlStringsmodulejs))), '@react-spectrum/calendar');
43
43
  let { direction: direction } = (0, $bF3AV$useLocale)();
@@ -77,7 +77,8 @@ function $62cd1e80f0dffb66$export$bfd52a43017368fe(props) {
77
77
  ...props,
78
78
  key: i,
79
79
  state: state,
80
- startDate: d
80
+ startDate: d,
81
+ firstDayOfWeek: firstDayOfWeek
81
82
  }));
82
83
  }
83
84
  return /*#__PURE__*/ (0, $bF3AV$react).createElement("div", {
@@ -1,6 +1,6 @@
1
1
  import {CalendarMonth as $faa2f3867773cfe5$export$26e2752316b9a375} from "./CalendarMonth.module.js";
2
2
  import $bF3AV$intlStringsmodulejs from "./intlStrings.module.js";
3
- import "./vars.83159c34.css";
3
+ import "./vars.0e34c9ec.css";
4
4
  import $bF3AV$calendar_vars_cssmodulejs from "./calendar_vars_css.module.js";
5
5
  import {ActionButton as $bF3AV$ActionButton} from "@react-spectrum/button";
6
6
  import $bF3AV$spectrumiconsuiChevronLeftLarge from "@spectrum-icons/ui/ChevronLeftLarge";
@@ -37,7 +37,7 @@ function $parcel$interopDefault(a) {
37
37
 
38
38
 
39
39
  function $62cd1e80f0dffb66$export$bfd52a43017368fe(props) {
40
- let { state: state, calendarProps: calendarProps, nextButtonProps: nextButtonProps, prevButtonProps: prevButtonProps, errorMessageProps: errorMessageProps, calendarRef: ref, visibleMonths: visibleMonths = 1 } = props;
40
+ let { state: state, calendarProps: calendarProps, nextButtonProps: nextButtonProps, prevButtonProps: prevButtonProps, errorMessageProps: errorMessageProps, calendarRef: ref, visibleMonths: visibleMonths = 1, firstDayOfWeek: firstDayOfWeek } = props;
41
41
  let { styleProps: styleProps } = (0, $bF3AV$useStyleProps)(props);
42
42
  let stringFormatter = (0, $bF3AV$useLocalizedStringFormatter)((0, ($parcel$interopDefault($bF3AV$intlStringsmodulejs))), '@react-spectrum/calendar');
43
43
  let { direction: direction } = (0, $bF3AV$useLocale)();
@@ -77,7 +77,8 @@ function $62cd1e80f0dffb66$export$bfd52a43017368fe(props) {
77
77
  ...props,
78
78
  key: i,
79
79
  state: state,
80
- startDate: d
80
+ startDate: d,
81
+ firstDayOfWeek: firstDayOfWeek
81
82
  }));
82
83
  }
83
84
  return /*#__PURE__*/ (0, $bF3AV$react).createElement("div", {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;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AM,CAAC,EAAE,MAAM,CAAC,MAAM,QAAQ,KAEnD,MAAM,gBAAgB,mBACrB,gCAAC,CAAA,GAAA,mBAAW;YACT,GAAG,eAAe;YACnB,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;YACrC,SAAA;WACC,cAAc,sBAAQ,gCAAC,CAAA,GAAA,sCAAU,yBAAO,gCAAC,CAAA,GAAA,uCAAW;QAM7D,UAAU,IAAI,eACZ,gCAAC,CAAA,GAAA,yCAAY;YACV,GAAG,KAAK;YACT,KAAK;YACL,OAAO;YACP,WAAW;;IAEjB;IAEA,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,aAAa;QACjB,KAAK;QACL,WACE,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GACd,qBACA,WAAW,SAAS;qBAQxB,gCAAC,CAAA,GAAA,qBAAa,uBACZ,gCAAC,YAAI,aAAa,CAAC,aAAa,kBAElC,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;OAChC,uBAEH,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;OAChC,0BAKH,gCAAC,CAAA,GAAA,qBAAa,uBACZ,gCAAC;QACC,cAAY,eAAe,CAAC,aAAa;QACzC,UAAU,gBAAgB,UAAU;QACpC,SAAS,IAAM,MAAM,aAAa;QAClC,UAAU;SAEb,MAAM,cAAc,kBACnB,gCAAC,CAAA,GAAA,eAAO;QACN,eAAA;QACA,cAAc,MAAM,YAAY,IAAI,gBAAgB,MAAM,CAAC,oBAAoB;YAAC,eAAe,sBAAsB,QAAQ,IAAI;QAAC;QAClI,mBAAmB;QACnB,WAAA;QACA,+EAA+E;QAC/E,kBAAiB;;AAI3B","sources":["packages/@react-spectrum/calendar/src/CalendarBase.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaButtonProps} from '@react-types/button';\nimport {CalendarMonth} from './CalendarMonth';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport ChevronLeft from '@spectrum-icons/ui/ChevronLeftLarge';\nimport ChevronRight from '@spectrum-icons/ui/ChevronRightLarge';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, RefObject, StyleProps} from '@react-types/shared';\nimport {HelpText} from '@react-spectrum/label';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {HTMLAttributes, JSX} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useDateFormatter, useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface CalendarBaseProps<T extends CalendarState | RangeCalendarState> extends CalendarPropsBase, DOMProps, StyleProps {\n state: T,\n visibleMonths?: number,\n calendarProps: HTMLAttributes<HTMLElement>,\n nextButtonProps: AriaButtonProps,\n prevButtonProps: AriaButtonProps,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n calendarRef: RefObject<HTMLDivElement | null>\n}\n\nexport function CalendarBase<T extends CalendarState | RangeCalendarState>(props: CalendarBaseProps<T>) {\n let {\n state,\n calendarProps,\n nextButtonProps,\n prevButtonProps,\n errorMessageProps,\n calendarRef: ref,\n visibleMonths = 1\n } = props;\n let {styleProps} = useStyleProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/calendar');\n let {direction} = useLocale();\n let currentMonth = state.visibleRange.start;\n let monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n era: currentMonth.calendar.identifier === 'gregory' && currentMonth.era === 'BC' ? 'short' : undefined,\n calendar: currentMonth.calendar.identifier,\n timeZone: state.timeZone\n });\n\n let titles: JSX.Element[] = [];\n let calendars: JSX.Element[] = [];\n for (let i = 0; i < visibleMonths; i++) {\n let d = currentMonth.add({months: i});\n titles.push(\n <div key={i} className={classNames(styles, 'spectrum-Calendar-monthHeader')}>\n {i === 0 &&\n <ActionButton\n {...prevButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-prevMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronRight /> : <ChevronLeft />}\n </ActionButton>\n }\n <h2\n // We have a visually hidden heading describing the entire visible range,\n // and the calendar itself describes the individual month\n // so we don't need to repeat that here for screen reader users.\n aria-hidden\n className={classNames(styles, 'spectrum-Calendar-title')}>\n {monthDateFormatter.format(d.toDate(state.timeZone))}\n </h2>\n {i === visibleMonths - 1 &&\n <ActionButton\n {...nextButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-nextMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronLeft /> : <ChevronRight />}\n </ActionButton>\n }\n </div>\n );\n\n calendars.push(\n <CalendarMonth\n {...props}\n key={i}\n state={state}\n startDate={d} />\n );\n }\n\n return (\n <div\n {...styleProps}\n {...calendarProps}\n ref={ref}\n className={\n classNames(styles,\n 'spectrum-Calendar',\n styleProps.className\n )\n }>\n {/* Add a screen reader only description of the entire visible range rather than\n * a separate heading above each month grid. This is placed first in the DOM order\n * so that it is the first thing a touch screen reader user encounters.\n * In addition, VoiceOver on iOS does not announce the aria-label of the grid\n * elements, so the aria-label of the Calendar is included here as well. */}\n <VisuallyHidden>\n <h2>{calendarProps['aria-label']}</h2>\n </VisuallyHidden>\n <div className={classNames(styles, 'spectrum-Calendar-header')}>\n {titles}\n </div>\n <div className={classNames(styles, 'spectrum-Calendar-months')}>\n {calendars}\n </div>\n {/* For touch screen readers, add a visually hidden next button after the month grid\n * so it's easy to navigate after reaching the end without going all the way\n * back to the start of the month. */}\n <VisuallyHidden>\n <button\n aria-label={nextButtonProps['aria-label']}\n disabled={nextButtonProps.isDisabled}\n onClick={() => state.focusNextPage()}\n tabIndex={-1} />\n </VisuallyHidden>\n {state.isValueInvalid &&\n <HelpText\n showErrorIcon\n errorMessage={props.errorMessage || stringFormatter.format('invalidSelection', {selectedCount: 'highlightedRange' in state ? 2 : 1})}\n errorMessageProps={errorMessageProps}\n isInvalid\n // Intentionally a global class name so it can be targeted in DatePicker CSS...\n UNSAFE_className=\"spectrum-Calendar-helpText\" />\n }\n </div>\n );\n}\n"],"names":[],"version":3,"file":"CalendarBase.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AA6BM,SAAS,0CAA2D,KAA2B;IACpG,IAAI,SACF,KAAK,iBACL,aAAa,mBACb,eAAe,mBACf,eAAe,qBACf,iBAAiB,EACjB,aAAa,GAAG,iBAChB,gBAAgB,mBAChB,cAAc,EACf,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAChE,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,IAAI,eAAe,MAAM,YAAY,CAAC,KAAK;IAC3C,IAAI,qBAAqB,CAAA,GAAA,uBAAe,EAAE;QACxC,OAAO;QACP,MAAM;QACN,KAAK,aAAa,QAAQ,CAAC,UAAU,KAAK,aAAa,aAAa,GAAG,KAAK,OAAO,UAAU;QAC7F,UAAU,aAAa,QAAQ,CAAC,UAAU;QAC1C,UAAU,MAAM,QAAQ;IAC1B;IAEA,IAAI,SAAwB,EAAE;IAC9B,IAAI,YAA2B,EAAE;IACjC,IAAK,IAAI,I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K,GAAG;OAChC,uBAEH,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;OAChC,0BAKH,gCAAC,CAAA,GAAA,qBAAa,uBACZ,gCAAC;QACC,cAAY,eAAe,CAAC,aAAa;QACzC,UAAU,gBAAgB,UAAU;QACpC,SAAS,IAAM,MAAM,aAAa;QAClC,UAAU;SAEb,MAAM,cAAc,kBACnB,gCAAC,CAAA,GAAA,eAAO;QACN,eAAA;QACA,cAAc,MAAM,YAAY,IAAI,gBAAgB,MAAM,CAAC,oBAAoB;YAAC,eAAe,sBAAsB,QAAQ,IAAI;QAAC;QAClI,mBAAmB;QACnB,WAAA;QACA,+EAA+E;QAC/E,kBAAiB;;AAI3B","sources":["packages/@react-spectrum/calendar/src/CalendarBase.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaButtonProps} from '@react-types/button';\nimport {CalendarMonth} from './CalendarMonth';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport ChevronLeft from '@spectrum-icons/ui/ChevronLeftLarge';\nimport ChevronRight from '@spectrum-icons/ui/ChevronRightLarge';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, RefObject, StyleProps} from '@react-types/shared';\nimport {HelpText} from '@react-spectrum/label';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {HTMLAttributes, JSX} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useDateFormatter, useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface CalendarBaseProps<T extends CalendarState | RangeCalendarState> extends CalendarPropsBase, DOMProps, StyleProps {\n state: T,\n visibleMonths?: number,\n calendarProps: HTMLAttributes<HTMLElement>,\n nextButtonProps: AriaButtonProps,\n prevButtonProps: AriaButtonProps,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n calendarRef: RefObject<HTMLDivElement | null>\n}\n\nexport function CalendarBase<T extends CalendarState | RangeCalendarState>(props: CalendarBaseProps<T>) {\n let {\n state,\n calendarProps,\n nextButtonProps,\n prevButtonProps,\n errorMessageProps,\n calendarRef: ref,\n visibleMonths = 1,\n firstDayOfWeek\n } = props;\n let {styleProps} = useStyleProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/calendar');\n let {direction} = useLocale();\n let currentMonth = state.visibleRange.start;\n let monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n era: currentMonth.calendar.identifier === 'gregory' && currentMonth.era === 'BC' ? 'short' : undefined,\n calendar: currentMonth.calendar.identifier,\n timeZone: state.timeZone\n });\n\n let titles: JSX.Element[] = [];\n let calendars: JSX.Element[] = [];\n for (let i = 0; i < visibleMonths; i++) {\n let d = currentMonth.add({months: i});\n titles.push(\n <div key={i} className={classNames(styles, 'spectrum-Calendar-monthHeader')}>\n {i === 0 &&\n <ActionButton\n {...prevButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-prevMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronRight /> : <ChevronLeft />}\n </ActionButton>\n }\n <h2\n // We have a visually hidden heading describing the entire visible range,\n // and the calendar itself describes the individual month\n // so we don't need to repeat that here for screen reader users.\n aria-hidden\n className={classNames(styles, 'spectrum-Calendar-title')}>\n {monthDateFormatter.format(d.toDate(state.timeZone))}\n </h2>\n {i === visibleMonths - 1 &&\n <ActionButton\n {...nextButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-nextMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronLeft /> : <ChevronRight />}\n </ActionButton>\n }\n </div>\n );\n\n calendars.push(\n <CalendarMonth\n {...props}\n key={i}\n state={state}\n startDate={d}\n firstDayOfWeek={firstDayOfWeek} />\n );\n }\n\n return (\n <div\n {...styleProps}\n {...calendarProps}\n ref={ref}\n className={\n classNames(styles,\n 'spectrum-Calendar',\n styleProps.className\n )\n }>\n {/* Add a screen reader only description of the entire visible range rather than\n * a separate heading above each month grid. This is placed first in the DOM order\n * so that it is the first thing a touch screen reader user encounters.\n * In addition, VoiceOver on iOS does not announce the aria-label of the grid\n * elements, so the aria-label of the Calendar is included here as well. */}\n <VisuallyHidden>\n <h2>{calendarProps['aria-label']}</h2>\n </VisuallyHidden>\n <div className={classNames(styles, 'spectrum-Calendar-header')}>\n {titles}\n </div>\n <div className={classNames(styles, 'spectrum-Calendar-months')}>\n {calendars}\n </div>\n {/* For touch screen readers, add a visually hidden next button after the month grid\n * so it's easy to navigate after reaching the end without going all the way\n * back to the start of the month. */}\n <VisuallyHidden>\n <button\n aria-label={nextButtonProps['aria-label']}\n disabled={nextButtonProps.isDisabled}\n onClick={() => state.focusNextPage()}\n tabIndex={-1} />\n </VisuallyHidden>\n {state.isValueInvalid &&\n <HelpText\n showErrorIcon\n errorMessage={props.errorMessage || stringFormatter.format('invalidSelection', {selectedCount: 'highlightedRange' in state ? 2 : 1})}\n errorMessageProps={errorMessageProps}\n isInvalid\n // Intentionally a global class name so it can be targeted in DatePicker CSS...\n UNSAFE_className=\"spectrum-Calendar-helpText\" />\n }\n </div>\n );\n}\n"],"names":[],"version":3,"file":"CalendarBase.module.js.map"}
@@ -1,4 +1,4 @@
1
- require("./vars.83159c34.css");
1
+ require("./vars.0e34c9ec.css");
2
2
  var $915891ae6206caad$exports = require("./calendar_vars_css.main.js");
3
3
  var $1NqcN$reactariacalendar = require("@react-aria/calendar");
4
4
  var $1NqcN$internationalizeddate = require("@internationalized/date");
@@ -38,7 +38,7 @@ $parcel$export(module.exports, "CalendarCell", () => $52c7c3c887827b64$export$5d
38
38
 
39
39
 
40
40
 
41
- function $52c7c3c887827b64$export$5d847498420df57b({ state: state, currentMonth: currentMonth, ...props }) {
41
+ function $52c7c3c887827b64$export$5d847498420df57b({ state: state, currentMonth: currentMonth, firstDayOfWeek: firstDayOfWeek, ...props }) {
42
42
  let ref = (0, $1NqcN$react.useRef)(null);
43
43
  let { cellProps: cellProps, buttonProps: buttonProps, isPressed: isPressed, isSelected: isSelected, isDisabled: isDisabled, isFocused: isFocused, isInvalid: isInvalid, formattedDate: formattedDate } = (0, $1NqcN$reactariacalendar.useCalendarCell)({
44
44
  ...props,
@@ -55,7 +55,7 @@ function $52c7c3c887827b64$export$5d847498420df57b({ state: state, currentMonth:
55
55
  let isSelectionStart = isSelected && highlightedRange && (0, $1NqcN$internationalizeddate.isSameDay)(props.date, highlightedRange.start);
56
56
  let isSelectionEnd = isSelected && highlightedRange && (0, $1NqcN$internationalizeddate.isSameDay)(props.date, highlightedRange.end);
57
57
  let { locale: locale } = (0, $1NqcN$reactariai18n.useLocale)();
58
- let dayOfWeek = (0, $1NqcN$internationalizeddate.getDayOfWeek)(props.date, locale);
58
+ let dayOfWeek = (0, $1NqcN$internationalizeddate.getDayOfWeek)(props.date, locale, firstDayOfWeek);
59
59
  let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);
60
60
  let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));
61
61
  let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $1NqcN$reactariafocus.useFocusRing)();
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAkBM,SAAS,0CAAa,SAAC,KAAK,gBAAE,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C,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;QAAC,YAAY,cAAc,iBAAiB,MAAM,UAAU;IAAA;IAEnG,qBACE,0DAAC;QACE,GAAG,SAAS;QACb,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBAC9B,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,EAAE,aAAa,YAAY,WAAW;QACnD,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,0BAA0B;YACtD,YAAY,CAAA,GAAA,oCAAM,EAAE,MAAM,IAAI,EAAE,MAAM,QAAQ;YAC9C,eAAe;YACf,cAAc,aAAa;YAC3B,gFAAgF;YAChF,2DAA2D;YAC3D,eAAe,cAAc,CAAC;YAC9B,kBAAkB,iBAAkB,aAAa;YACjD,mBAAmB,CAAC,CAAA,GAAA,wCAAU,EAAE,MAAM,IAAI,EAAE;YAC5C,kBAAkB;YAClB,gBAAgB;YAChB,sBAAsB,cAAc,sBAAsB;YAC1D,sBAAsB;YACtB,oBAAoB;YACpB,cAAc;YACd,cAAc,aAAa,CAAC,MAAM,UAAU;YAC5C,cAAc;QAChB;qBACA,0DAAC;QAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBAClC,0DAAC,cAAM;AAKjB","sources":["packages/@react-spectrum/calendar/src/CalendarCell.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaCalendarCellProps, useCalendarCell} from '@react-aria/calendar';\nimport {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from '@internationalized/date';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarCellProps extends AriaCalendarCellProps {\n state: CalendarState | RangeCalendarState,\n currentMonth: CalendarDate\n}\n\nexport function CalendarCell({state, currentMonth, ...props}: CalendarCellProps) {\n let ref = useRef<HTMLElement>(null);\n let {\n cellProps,\n buttonProps,\n isPressed,\n isSelected,\n isDisabled,\n isFocused,\n isInvalid,\n formattedDate\n } = useCalendarCell({\n ...props,\n isDisabled: !isSameMonth(props.date, currentMonth)\n }, state, ref);\n let isUnavailable = state.isCellUnavailable(props.date) && !isDisabled;\n let isLastSelectedBeforeDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.add({days: 1}));\n let isFirstSelectedAfterDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.subtract({days: 1}));\n let highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n let isSelectionStart = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.start);\n let isSelectionEnd = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.end);\n let {locale} = useLocale();\n let dayOfWeek = getDayOfWeek(props.date, locale);\n let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);\n let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));\n let {focusProps, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({isDisabled: isDisabled || isUnavailable || state.isReadOnly});\n\n return (\n <td\n {...cellProps}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span\n {...mergeProps(buttonProps, hoverProps, focusProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Calendar-date', {\n 'is-today': isToday(props.date, state.timeZone),\n 'is-selected': isSelected,\n 'is-focused': isFocused && isFocusVisible,\n // Style disabled (i.e. out of min/max range), but selected dates as unavailable\n // since it is more clear than trying to dim the selection.\n 'is-disabled': isDisabled && !isInvalid,\n 'is-unavailable': isUnavailable || (isInvalid && isDisabled),\n 'is-outsideMonth': !isSameMonth(props.date, currentMonth),\n 'is-range-start': isRangeStart,\n 'is-range-end': isRangeEnd,\n 'is-range-selection': isSelected && 'highlightedRange' in state,\n 'is-selection-start': isSelectionStart,\n 'is-selection-end': isSelectionEnd,\n 'is-hovered': isHovered,\n 'is-pressed': isPressed && !state.isReadOnly,\n 'is-invalid': isInvalid\n })}>\n <span className={classNames(styles, 'spectrum-Calendar-dateText')}>\n <span>{formattedDate}</span>\n </span>\n </span>\n </td>\n );\n}\n"],"names":[],"version":3,"file":"CalendarCell.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAmBM,SAAS,0CAAa,SAAC,KAAK,gBAAE,YAAY,kBAAE,cAAc,EAAE,GAAG,OAAyB;IAC7F,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAe;IAC9B,IAAI,aACF,SAAS,eACT,WAAW,aACX,SAAS,cACT,UAAU,cACV,UAAU,aACV,SAAS,aACT,SAAS,iBACT,aAAa,EACd,GAAG,CAAA,GAAA,wCAAc,EAAE;QAClB,GAAG,KAAK;QACR,YAAY,CAAC,CAAA,GAAA,wCAAU,EAAE,MAAM,IAAI,EAAE;IACvC,GAAG,OAAO;IACV,IAAI,gBAAgB,MAAM,iBAAiB,CAAC,MAAM,IAAI,KAAK,CAAC;IAC5D,IAAI,+BAA+B,CAAC,cAAc,CAAC,aAAa,MAAM,iBAAiB,CAAC,MAAM,IAAI,CAAC,GA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YACf,cAAc,aAAa;YAC3B,gFAAgF;YAChF,2DAA2D;YAC3D,eAAe,cAAc,CAAC;YAC9B,kBAAkB,iBAAkB,aAAa;YACjD,mBAAmB,CAAC,CAAA,GAAA,wCAAU,EAAE,MAAM,IAAI,EAAE;YAC5C,kBAAkB;YAClB,gBAAgB;YAChB,sBAAsB,cAAc,sBAAsB;YAC1D,sBAAsB;YACtB,oBAAoB;YACpB,cAAc;YACd,cAAc,aAAa,CAAC,MAAM,UAAU;YAC5C,cAAc;QAChB;qBACA,0DAAC;QAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBAClC,0DAAC,cAAM;AAKjB","sources":["packages/@react-spectrum/calendar/src/CalendarCell.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaCalendarCellProps, useCalendarCell} from '@react-aria/calendar';\nimport {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from '@internationalized/date';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarCellProps extends AriaCalendarCellProps {\n state: CalendarState | RangeCalendarState,\n currentMonth: CalendarDate,\n firstDayOfWeek?: 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'\n}\n\nexport function CalendarCell({state, currentMonth, firstDayOfWeek, ...props}: CalendarCellProps) {\n let ref = useRef<HTMLElement>(null);\n let {\n cellProps,\n buttonProps,\n isPressed,\n isSelected,\n isDisabled,\n isFocused,\n isInvalid,\n formattedDate\n } = useCalendarCell({\n ...props,\n isDisabled: !isSameMonth(props.date, currentMonth)\n }, state, ref);\n let isUnavailable = state.isCellUnavailable(props.date) && !isDisabled;\n let isLastSelectedBeforeDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.add({days: 1}));\n let isFirstSelectedAfterDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.subtract({days: 1}));\n let highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n let isSelectionStart = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.start);\n let isSelectionEnd = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.end);\n let {locale} = useLocale();\n let dayOfWeek = getDayOfWeek(props.date, locale, firstDayOfWeek);\n let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);\n let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));\n let {focusProps, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({isDisabled: isDisabled || isUnavailable || state.isReadOnly});\n\n return (\n <td\n {...cellProps}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span\n {...mergeProps(buttonProps, hoverProps, focusProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Calendar-date', {\n 'is-today': isToday(props.date, state.timeZone),\n 'is-selected': isSelected,\n 'is-focused': isFocused && isFocusVisible,\n // Style disabled (i.e. out of min/max range), but selected dates as unavailable\n // since it is more clear than trying to dim the selection.\n 'is-disabled': isDisabled && !isInvalid,\n 'is-unavailable': isUnavailable || (isInvalid && isDisabled),\n 'is-outsideMonth': !isSameMonth(props.date, currentMonth),\n 'is-range-start': isRangeStart,\n 'is-range-end': isRangeEnd,\n 'is-range-selection': isSelected && 'highlightedRange' in state,\n 'is-selection-start': isSelectionStart,\n 'is-selection-end': isSelectionEnd,\n 'is-hovered': isHovered,\n 'is-pressed': isPressed && !state.isReadOnly,\n 'is-invalid': isInvalid\n })}>\n <span className={classNames(styles, 'spectrum-Calendar-dateText')}>\n <span>{formattedDate}</span>\n </span>\n </span>\n </td>\n );\n}\n"],"names":[],"version":3,"file":"CalendarCell.main.js.map"}
@@ -1,4 +1,4 @@
1
- import "./vars.83159c34.css";
1
+ import "./vars.0e34c9ec.css";
2
2
  import $1nHC4$calendar_vars_cssmodulejs from "./calendar_vars_css.mjs";
3
3
  import {useCalendarCell as $1nHC4$useCalendarCell} from "@react-aria/calendar";
4
4
  import {isSameMonth as $1nHC4$isSameMonth, isSameDay as $1nHC4$isSameDay, getDayOfWeek as $1nHC4$getDayOfWeek, isToday as $1nHC4$isToday} from "@internationalized/date";
@@ -32,7 +32,7 @@ function $parcel$interopDefault(a) {
32
32
 
33
33
 
34
34
 
35
- function $453c556b9066da11$export$5d847498420df57b({ state: state, currentMonth: currentMonth, ...props }) {
35
+ function $453c556b9066da11$export$5d847498420df57b({ state: state, currentMonth: currentMonth, firstDayOfWeek: firstDayOfWeek, ...props }) {
36
36
  let ref = (0, $1nHC4$useRef)(null);
37
37
  let { cellProps: cellProps, buttonProps: buttonProps, isPressed: isPressed, isSelected: isSelected, isDisabled: isDisabled, isFocused: isFocused, isInvalid: isInvalid, formattedDate: formattedDate } = (0, $1nHC4$useCalendarCell)({
38
38
  ...props,
@@ -49,7 +49,7 @@ function $453c556b9066da11$export$5d847498420df57b({ state: state, currentMonth:
49
49
  let isSelectionStart = isSelected && highlightedRange && (0, $1nHC4$isSameDay)(props.date, highlightedRange.start);
50
50
  let isSelectionEnd = isSelected && highlightedRange && (0, $1nHC4$isSameDay)(props.date, highlightedRange.end);
51
51
  let { locale: locale } = (0, $1nHC4$useLocale)();
52
- let dayOfWeek = (0, $1nHC4$getDayOfWeek)(props.date, locale);
52
+ let dayOfWeek = (0, $1nHC4$getDayOfWeek)(props.date, locale, firstDayOfWeek);
53
53
  let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);
54
54
  let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));
55
55
  let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $1nHC4$useFocusRing)();
@@ -1,4 +1,4 @@
1
- import "./vars.83159c34.css";
1
+ import "./vars.0e34c9ec.css";
2
2
  import $1nHC4$calendar_vars_cssmodulejs from "./calendar_vars_css.module.js";
3
3
  import {useCalendarCell as $1nHC4$useCalendarCell} from "@react-aria/calendar";
4
4
  import {isSameMonth as $1nHC4$isSameMonth, isSameDay as $1nHC4$isSameDay, getDayOfWeek as $1nHC4$getDayOfWeek, isToday as $1nHC4$isToday} from "@internationalized/date";
@@ -32,7 +32,7 @@ function $parcel$interopDefault(a) {
32
32
 
33
33
 
34
34
 
35
- function $453c556b9066da11$export$5d847498420df57b({ state: state, currentMonth: currentMonth, ...props }) {
35
+ function $453c556b9066da11$export$5d847498420df57b({ state: state, currentMonth: currentMonth, firstDayOfWeek: firstDayOfWeek, ...props }) {
36
36
  let ref = (0, $1nHC4$useRef)(null);
37
37
  let { cellProps: cellProps, buttonProps: buttonProps, isPressed: isPressed, isSelected: isSelected, isDisabled: isDisabled, isFocused: isFocused, isInvalid: isInvalid, formattedDate: formattedDate } = (0, $1nHC4$useCalendarCell)({
38
38
  ...props,
@@ -49,7 +49,7 @@ function $453c556b9066da11$export$5d847498420df57b({ state: state, currentMonth:
49
49
  let isSelectionStart = isSelected && highlightedRange && (0, $1nHC4$isSameDay)(props.date, highlightedRange.start);
50
50
  let isSelectionEnd = isSelected && highlightedRange && (0, $1nHC4$isSameDay)(props.date, highlightedRange.end);
51
51
  let { locale: locale } = (0, $1nHC4$useLocale)();
52
- let dayOfWeek = (0, $1nHC4$getDayOfWeek)(props.date, locale);
52
+ let dayOfWeek = (0, $1nHC4$getDayOfWeek)(props.date, locale, firstDayOfWeek);
53
53
  let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);
54
54
  let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));
55
55
  let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $1nHC4$useFocusRing)();
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAkBM,SAAS,0CAAa,SAAC,KAAK,gBAAE,YAAY,EAAE,GAAG,OAAyB;IAC7E,IAAI,MAAM,CAAA,GAAA,aAAK,EAAe;IAC9B,IAAI,aACF,SAAS,eACT,WAAW,aACX,SAAS,cACT,UAAU,cACV,UAAU,aACV,SAAS,aACT,SAAS,iBACT,aAAa,EACd,GAAG,CAAA,GAAA,sBAAc,EAAE;QAClB,GAAG,KAAK;QACR,YAAY,CAAC,CAAA,GAAA,kBAAU,EAAE,MAAM,IAAI,EAAE;IACvC,GAAG,OAAO;IACV,IAAI,gBAAgB,MAAM,iBAAiB,CAAC,MAAM,IAAI,KAAK,CAAC;IAC5D,IAAI,+BAA+B,CAAC,cAAc,CAAC,aAAa,MAAM,iBAAiB,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC;QAAC,MAAM;IAAC;IAC/G,IAAI,+BAA+B,CAAC,cAAc,CAAC,aAAa,MAAM,iBAAiB,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC;QAAC,MAAM;IAAC;IACpH,IAAI,mBAAmB,sBAAsB,SAAS,MAAM,gBAAgB;IAC5E,IAAI,mBAAmB,cAAc,oBAAoB,CAAA,GAAA,gBAAQ,EAAE,MAAM,IAAI,EAAE,iBAAiB,KAAK;IACrG,IAAI,iBAAiB,cAAc,oBAAoB,CAAA,GA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WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;qBAClC,gCAAC,cAAM;AAKjB","sources":["packages/@react-spectrum/calendar/src/CalendarCell.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaCalendarCellProps, useCalendarCell} from '@react-aria/calendar';\nimport {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from '@internationalized/date';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarCellProps extends AriaCalendarCellProps {\n state: CalendarState | RangeCalendarState,\n currentMonth: CalendarDate\n}\n\nexport function CalendarCell({state, currentMonth, ...props}: CalendarCellProps) {\n let ref = useRef<HTMLElement>(null);\n let {\n cellProps,\n buttonProps,\n isPressed,\n isSelected,\n isDisabled,\n isFocused,\n isInvalid,\n formattedDate\n } = useCalendarCell({\n ...props,\n isDisabled: !isSameMonth(props.date, currentMonth)\n }, state, ref);\n let isUnavailable = state.isCellUnavailable(props.date) && !isDisabled;\n let isLastSelectedBeforeDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.add({days: 1}));\n let isFirstSelectedAfterDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.subtract({days: 1}));\n let highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n let isSelectionStart = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.start);\n let isSelectionEnd = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.end);\n let {locale} = useLocale();\n let dayOfWeek = getDayOfWeek(props.date, locale);\n let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);\n let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));\n let {focusProps, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({isDisabled: isDisabled || isUnavailable || state.isReadOnly});\n\n return (\n <td\n {...cellProps}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span\n {...mergeProps(buttonProps, hoverProps, focusProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Calendar-date', {\n 'is-today': isToday(props.date, state.timeZone),\n 'is-selected': isSelected,\n 'is-focused': isFocused && isFocusVisible,\n // Style disabled (i.e. out of min/max range), but selected dates as unavailable\n // since it is more clear than trying to dim the selection.\n 'is-disabled': isDisabled && !isInvalid,\n 'is-unavailable': isUnavailable || (isInvalid && isDisabled),\n 'is-outsideMonth': !isSameMonth(props.date, currentMonth),\n 'is-range-start': isRangeStart,\n 'is-range-end': isRangeEnd,\n 'is-range-selection': isSelected && 'highlightedRange' in state,\n 'is-selection-start': isSelectionStart,\n 'is-selection-end': isSelectionEnd,\n 'is-hovered': isHovered,\n 'is-pressed': isPressed && !state.isReadOnly,\n 'is-invalid': isInvalid\n })}>\n <span className={classNames(styles, 'spectrum-Calendar-dateText')}>\n <span>{formattedDate}</span>\n </span>\n </span>\n </td>\n );\n}\n"],"names":[],"version":3,"file":"CalendarCell.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAmBM,SAAS,0CAAa,SAAC,KAAK,gBAAE,YAAY,kBAAE,cAAc,EAAE,GAA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AAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;QAAC,YAAY,cAAc,iBAAiB,MAAM,UAAU;IAAA;IAEnG,qBACE,gCAAC;QACE,GAAG,SAAS;QACb,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;qBAC9B,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,aAAa,YAAY,WAAW;QACnD,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG,0BAA0B;YACtD,YAAY,CAAA,GAAA,cAAM,EAAE,MAAM,IAAI,EAAE,MAAM,QAAQ;YAC9C,eAAe;YACf,cAAc,aAAa;YAC3B,gFAAgF;YAChF,2DAA2D;YAC3D,eAAe,cAAc,CAAC;YAC9B,kBAAkB,iBAAkB,aAAa;YACjD,mBAAmB,CAAC,CAAA,GAAA,kBAAU,EAAE,MAAM,IAAI,EAAE;YAC5C,kBAAkB;YAClB,gBAAgB;YAChB,sBAAsB,cAAc,sBAAsB;YAC1D,sBAAsB;YACtB,oBAAoB;YACpB,cAAc;YACd,cAAc,aAAa,CAAC,MAAM,UAAU;YAC5C,cAAc;QAChB;qBACA,gCAAC;QAAK,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;qBAClC,gCAAC,cAAM;AAKjB","sources":["packages/@react-spectrum/calendar/src/CalendarCell.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaCalendarCellProps, useCalendarCell} from '@react-aria/calendar';\nimport {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from '@internationalized/date';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarCellProps extends AriaCalendarCellProps {\n state: CalendarState | RangeCalendarState,\n currentMonth: CalendarDate,\n firstDayOfWeek?: 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'\n}\n\nexport function CalendarCell({state, currentMonth, firstDayOfWeek, ...props}: CalendarCellProps) {\n let ref = useRef<HTMLElement>(null);\n let {\n cellProps,\n buttonProps,\n isPressed,\n isSelected,\n isDisabled,\n isFocused,\n isInvalid,\n formattedDate\n } = useCalendarCell({\n ...props,\n isDisabled: !isSameMonth(props.date, currentMonth)\n }, state, ref);\n let isUnavailable = state.isCellUnavailable(props.date) && !isDisabled;\n let isLastSelectedBeforeDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.add({days: 1}));\n let isFirstSelectedAfterDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.subtract({days: 1}));\n let highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n let isSelectionStart = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.start);\n let isSelectionEnd = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.end);\n let {locale} = useLocale();\n let dayOfWeek = getDayOfWeek(props.date, locale, firstDayOfWeek);\n let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);\n let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));\n let {focusProps, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({isDisabled: isDisabled || isUnavailable || state.isReadOnly});\n\n return (\n <td\n {...cellProps}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span\n {...mergeProps(buttonProps, hoverProps, focusProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Calendar-date', {\n 'is-today': isToday(props.date, state.timeZone),\n 'is-selected': isSelected,\n 'is-focused': isFocused && isFocusVisible,\n // Style disabled (i.e. out of min/max range), but selected dates as unavailable\n // since it is more clear than trying to dim the selection.\n 'is-disabled': isDisabled && !isInvalid,\n 'is-unavailable': isUnavailable || (isInvalid && isDisabled),\n 'is-outsideMonth': !isSameMonth(props.date, currentMonth),\n 'is-range-start': isRangeStart,\n 'is-range-end': isRangeEnd,\n 'is-range-selection': isSelected && 'highlightedRange' in state,\n 'is-selection-start': isSelectionStart,\n 'is-selection-end': isSelectionEnd,\n 'is-hovered': isHovered,\n 'is-pressed': isPressed && !state.isReadOnly,\n 'is-invalid': isInvalid\n })}>\n <span className={classNames(styles, 'spectrum-Calendar-dateText')}>\n <span>{formattedDate}</span>\n </span>\n </span>\n </td>\n );\n}\n"],"names":[],"version":3,"file":"CalendarCell.module.js.map"}
@@ -1,5 +1,5 @@
1
1
  var $52c7c3c887827b64$exports = require("./CalendarCell.main.js");
2
- require("./vars.83159c34.css");
2
+ require("./vars.0e34c9ec.css");
3
3
  var $915891ae6206caad$exports = require("./calendar_vars_css.main.js");
4
4
  var $4d66a$internationalizeddate = require("@internationalized/date");
5
5
  var $4d66a$reactspectrumutils = require("@react-spectrum/utils");
@@ -35,13 +35,13 @@ $parcel$export(module.exports, "CalendarMonth", () => $02c19eea15a72a7b$export$2
35
35
 
36
36
 
37
37
  function $02c19eea15a72a7b$export$26e2752316b9a375(props) {
38
- let { state: state, startDate: startDate } = props;
38
+ let { state: state, startDate: startDate, firstDayOfWeek: firstDayOfWeek } = props;
39
39
  let { gridProps: gridProps, headerProps: headerProps, weekDays: weekDays } = (0, $4d66a$reactariacalendar.useCalendarGrid)({
40
40
  ...props,
41
41
  endDate: (0, $4d66a$internationalizeddate.endOfMonth)(startDate)
42
42
  }, state);
43
43
  let { locale: locale } = (0, $4d66a$reactariai18n.useLocale)();
44
- let weeksInMonth = (0, $4d66a$internationalizeddate.getWeeksInMonth)(startDate, locale);
44
+ let weeksInMonth = (0, $4d66a$internationalizeddate.getWeeksInMonth)(startDate, locale, firstDayOfWeek);
45
45
  return /*#__PURE__*/ (0, ($parcel$interopDefault($4d66a$react))).createElement("table", {
46
46
  ...gridProps,
47
47
  className: (0, $4d66a$reactspectrumutils.classNames)((0, ($parcel$interopDefault($915891ae6206caad$exports))), 'spectrum-Calendar-body', 'spectrum-Calendar-table')
@@ -58,7 +58,8 @@ function $02c19eea15a72a7b$export$26e2752316b9a375(props) {
58
58
  key: i,
59
59
  state: state,
60
60
  date: date,
61
- currentMonth: startDate
61
+ currentMonth: startDate,
62
+ firstDayOfWeek: firstDayOfWeek
62
63
  }) : /*#__PURE__*/ (0, ($parcel$interopDefault($4d66a$react))).createElement("td", {
63
64
  key: i
64
65
  }))))));
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAkBM,SAAS,0CAAc,KAAyB;IACrD,IAAI,SACF,KAAK,aACL,SAAS,EACV,GAAG;IACJ,IAAI,aACF,SAAS,eACT,WAAW,YACX,QAAQ,EACT,GAAG,CAAA,GAAA,wCAAc,EAAE;QAClB,GAAG,KAAK;QACR,SAAS,CAAA,GAAA,uCAAS,EAAE;IACtB,GAAG;IAEH,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,8BAAQ;IACvB,IAAI,eAAe,CAAA,GAAA,4CAAc,EAAE,WAAW;IAE9C,qBACE,0DAAC;QACE,GAAG,SAAS;QACb,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,0BAA0B;qBACxD,0DAAC,SAAU,2BACT,0DAAC,YACE,SAAS,GAAG,CAAC,CAAC,KAAK,sBAClB,0DAAC;YACC,KAAK;YACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;yBAC9B,0DAAC;YAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;WACjC,wBAMX,0DAAC,eACE;WAAI,IAAI,MAAM,cAAc,IAAI;KAAG,CAAC,GAAG,CAAC,CAAA,0BACvC,0DAAC;YAAG,KAAK;WACN,MAAM,cAAc,CAAC,WAAW,WAAW,GAAG,CAAC,CAAC,MAAM,IACrD,qBACE,0DAAC,CAAA,GAAA,sCAAW;gBACV,KAAK;gBACL,OAAO;gBACP,MAAM;gBACN,cAAc;+BACd,0DAAC;gBAAG,KAAK;;AAO3B","sources":["packages/@react-spectrum/calendar/src/CalendarMonth.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarCell} from './CalendarCell';\nimport {CalendarDate, endOfMonth, getWeeksInMonth} from '@internationalized/date';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport React from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useCalendarGrid} from '@react-aria/calendar';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarMonthProps extends CalendarPropsBase, DOMProps, StyleProps {\n state: CalendarState | RangeCalendarState,\n startDate: CalendarDate\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n let {\n state,\n startDate\n } = props;\n let {\n gridProps,\n headerProps,\n weekDays\n } = useCalendarGrid({\n ...props,\n endDate: endOfMonth(startDate)\n }, state);\n\n let {locale} = useLocale();\n let weeksInMonth = getWeeksInMonth(startDate, locale);\n\n return (\n <table\n {...gridProps}\n className={classNames(styles, 'spectrum-Calendar-body', 'spectrum-Calendar-table')}>\n <thead {...headerProps}>\n <tr>\n {weekDays.map((day, index) => (\n <th\n key={index}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span className={classNames(styles, 'spectrum-Calendar-dayOfWeek')}>\n {day}\n </span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map(weekIndex => (\n <tr key={weekIndex}>\n {state.getDatesInWeek(weekIndex, startDate).map((date, i) => (\n date ? (\n <CalendarCell\n key={i}\n state={state}\n date={date}\n currentMonth={startDate} />\n ) : <td key={i} />\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n"],"names":[],"version":3,"file":"CalendarMonth.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAkBM,SAAS,0CAAc,KAAyB;IACrD,IAAI,SACF,KAAK,aACL,SAAS,kBACT,cAAc,EACf,GAAG;IACJ,IAAI,aACF,SAAS,eACT,WAAW,YACX,QAAQ,EACT,GAAG,CAAA,GAAA,wCAAc,EAAE;QAClB,GAAG,KAAK;QACR,SAAS,CAAA,GAAA,uCAAS,EAAE;IACtB,GAAG;IAEH,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,8BAAQ;IACvB,IAAI,eAAe,CAAA,GAAA,4CAAc,EAAE,WAAW,QAAQ;IAEtD,qBACE,0DAAC;QACE,GAAG,SAAS;QACb,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,0BAA0B;qBACxD,0DAAC,SAAU,2BACT,0DAAC,YACE,SAAS,GAAG,CAAC,CAAC,KAAK,sBAClB,0DAAC;YACC,KAAK;YACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;yBAC9B,0DAAC;YAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;WACjC,wBAMX,0DAAC,eACE;WAAI,IAAI,MAAM,cAAc,IAAI;KAAG,CAAC,GAAG,CAAC,CAAA,0BACvC,0DAAC;YAAG,KAAK;WACN,MAAM,cAAc,CAAC,WAAW,WAAW,GAAG,CAAC,CAAC,MAAM,IACrD,qBACE,0DAAC,CAAA,GAAA,sCAAW;gBACV,KAAK;gBACL,OAAO;gBACP,MAAM;gBACN,cAAc;gBACd,gBAAgB;+BAChB,0DAAC;gBAAG,KAAK;;AAO3B","sources":["packages/@react-spectrum/calendar/src/CalendarMonth.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarCell} from './CalendarCell';\nimport {CalendarDate, endOfMonth, getWeeksInMonth} from '@internationalized/date';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport React from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useCalendarGrid} from '@react-aria/calendar';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarMonthProps extends CalendarPropsBase, DOMProps, StyleProps {\n state: CalendarState | RangeCalendarState,\n startDate: CalendarDate\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n let {\n state,\n startDate,\n firstDayOfWeek\n } = props;\n let {\n gridProps,\n headerProps,\n weekDays\n } = useCalendarGrid({\n ...props,\n endDate: endOfMonth(startDate)\n }, state);\n\n let {locale} = useLocale();\n let weeksInMonth = getWeeksInMonth(startDate, locale, firstDayOfWeek);\n\n return (\n <table\n {...gridProps}\n className={classNames(styles, 'spectrum-Calendar-body', 'spectrum-Calendar-table')}>\n <thead {...headerProps}>\n <tr>\n {weekDays.map((day, index) => (\n <th\n key={index}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span className={classNames(styles, 'spectrum-Calendar-dayOfWeek')}>\n {day}\n </span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map(weekIndex => (\n <tr key={weekIndex}>\n {state.getDatesInWeek(weekIndex, startDate).map((date, i) => (\n date ? (\n <CalendarCell\n key={i}\n state={state}\n date={date}\n currentMonth={startDate}\n firstDayOfWeek={firstDayOfWeek} />\n ) : <td key={i} />\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n"],"names":[],"version":3,"file":"CalendarMonth.main.js.map"}
@@ -1,5 +1,5 @@
1
1
  import {CalendarCell as $453c556b9066da11$export$5d847498420df57b} from "./CalendarCell.mjs";
2
- import "./vars.83159c34.css";
2
+ import "./vars.0e34c9ec.css";
3
3
  import $d434x$calendar_vars_cssmodulejs from "./calendar_vars_css.mjs";
4
4
  import {endOfMonth as $d434x$endOfMonth, getWeeksInMonth as $d434x$getWeeksInMonth} from "@internationalized/date";
5
5
  import {classNames as $d434x$classNames} from "@react-spectrum/utils";
@@ -29,13 +29,13 @@ function $parcel$interopDefault(a) {
29
29
 
30
30
 
31
31
  function $faa2f3867773cfe5$export$26e2752316b9a375(props) {
32
- let { state: state, startDate: startDate } = props;
32
+ let { state: state, startDate: startDate, firstDayOfWeek: firstDayOfWeek } = props;
33
33
  let { gridProps: gridProps, headerProps: headerProps, weekDays: weekDays } = (0, $d434x$useCalendarGrid)({
34
34
  ...props,
35
35
  endDate: (0, $d434x$endOfMonth)(startDate)
36
36
  }, state);
37
37
  let { locale: locale } = (0, $d434x$useLocale)();
38
- let weeksInMonth = (0, $d434x$getWeeksInMonth)(startDate, locale);
38
+ let weeksInMonth = (0, $d434x$getWeeksInMonth)(startDate, locale, firstDayOfWeek);
39
39
  return /*#__PURE__*/ (0, $d434x$react).createElement("table", {
40
40
  ...gridProps,
41
41
  className: (0, $d434x$classNames)((0, ($parcel$interopDefault($d434x$calendar_vars_cssmodulejs))), 'spectrum-Calendar-body', 'spectrum-Calendar-table')
@@ -52,7 +52,8 @@ function $faa2f3867773cfe5$export$26e2752316b9a375(props) {
52
52
  key: i,
53
53
  state: state,
54
54
  date: date,
55
- currentMonth: startDate
55
+ currentMonth: startDate,
56
+ firstDayOfWeek: firstDayOfWeek
56
57
  }) : /*#__PURE__*/ (0, $d434x$react).createElement("td", {
57
58
  key: i
58
59
  }))))));
@@ -1,5 +1,5 @@
1
1
  import {CalendarCell as $453c556b9066da11$export$5d847498420df57b} from "./CalendarCell.module.js";
2
- import "./vars.83159c34.css";
2
+ import "./vars.0e34c9ec.css";
3
3
  import $d434x$calendar_vars_cssmodulejs from "./calendar_vars_css.module.js";
4
4
  import {endOfMonth as $d434x$endOfMonth, getWeeksInMonth as $d434x$getWeeksInMonth} from "@internationalized/date";
5
5
  import {classNames as $d434x$classNames} from "@react-spectrum/utils";
@@ -29,13 +29,13 @@ function $parcel$interopDefault(a) {
29
29
 
30
30
 
31
31
  function $faa2f3867773cfe5$export$26e2752316b9a375(props) {
32
- let { state: state, startDate: startDate } = props;
32
+ let { state: state, startDate: startDate, firstDayOfWeek: firstDayOfWeek } = props;
33
33
  let { gridProps: gridProps, headerProps: headerProps, weekDays: weekDays } = (0, $d434x$useCalendarGrid)({
34
34
  ...props,
35
35
  endDate: (0, $d434x$endOfMonth)(startDate)
36
36
  }, state);
37
37
  let { locale: locale } = (0, $d434x$useLocale)();
38
- let weeksInMonth = (0, $d434x$getWeeksInMonth)(startDate, locale);
38
+ let weeksInMonth = (0, $d434x$getWeeksInMonth)(startDate, locale, firstDayOfWeek);
39
39
  return /*#__PURE__*/ (0, $d434x$react).createElement("table", {
40
40
  ...gridProps,
41
41
  className: (0, $d434x$classNames)((0, ($parcel$interopDefault($d434x$calendar_vars_cssmodulejs))), 'spectrum-Calendar-body', 'spectrum-Calendar-table')
@@ -52,7 +52,8 @@ function $faa2f3867773cfe5$export$26e2752316b9a375(props) {
52
52
  key: i,
53
53
  state: state,
54
54
  date: date,
55
- currentMonth: startDate
55
+ currentMonth: startDate,
56
+ firstDayOfWeek: firstDayOfWeek
56
57
  }) : /*#__PURE__*/ (0, $d434x$react).createElement("td", {
57
58
  key: i
58
59
  }))))));
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAkBM,SAAS,0CAAc,KAAyB;IACrD,IAAI,SACF,KAAK,aACL,SAAS,EACV,GAAG;IACJ,IAAI,aACF,SAAS,eACT,WAAW,YACX,QAAQ,EACT,GAAG,CAAA,GAAA,sBAAc,EAAE;QAClB,GAAG,KAAK;QACR,SAAS,CAAA,GAAA,iBAAS,EAAE;IACtB,GAAG;IAEH,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,eAAe,CAAA,GAAA,sBAAc,EAAE,WAAW;IAE9C,qBACE,gCAAC;QACE,GAAG,SAAS;QACb,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG,0BAA0B;qBACxD,gCAAC,SAAU,2BACT,gCAAC,YACE,SAAS,GAAG,CAAC,CAAC,KAAK,sBAClB,gCAAC;YACC,KAAK;YACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;yBAC9B,gCAAC;YAAK,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;WACjC,wBAMX,gCAAC,eACE;WAAI,IAAI,MAAM,cAAc,IAAI;KAAG,CAAC,GAAG,CAAC,CAAA,0BACvC,gCAAC;YAAG,KAAK;WACN,MAAM,cAAc,CAAC,WAAW,WAAW,GAAG,CAAC,CAAC,MAAM,IACrD,qBACE,gCAAC,CAAA,GAAA,yCAAW;gBACV,KAAK;gBACL,OAAO;gBACP,MAAM;gBACN,cAAc;+BACd,gCAAC;gBAAG,KAAK;;AAO3B","sources":["packages/@react-spectrum/calendar/src/CalendarMonth.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarCell} from './CalendarCell';\nimport {CalendarDate, endOfMonth, getWeeksInMonth} from '@internationalized/date';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport React from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useCalendarGrid} from '@react-aria/calendar';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarMonthProps extends CalendarPropsBase, DOMProps, StyleProps {\n state: CalendarState | RangeCalendarState,\n startDate: CalendarDate\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n let {\n state,\n startDate\n } = props;\n let {\n gridProps,\n headerProps,\n weekDays\n } = useCalendarGrid({\n ...props,\n endDate: endOfMonth(startDate)\n }, state);\n\n let {locale} = useLocale();\n let weeksInMonth = getWeeksInMonth(startDate, locale);\n\n return (\n <table\n {...gridProps}\n className={classNames(styles, 'spectrum-Calendar-body', 'spectrum-Calendar-table')}>\n <thead {...headerProps}>\n <tr>\n {weekDays.map((day, index) => (\n <th\n key={index}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span className={classNames(styles, 'spectrum-Calendar-dayOfWeek')}>\n {day}\n </span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map(weekIndex => (\n <tr key={weekIndex}>\n {state.getDatesInWeek(weekIndex, startDate).map((date, i) => (\n date ? (\n <CalendarCell\n key={i}\n state={state}\n date={date}\n currentMonth={startDate} />\n ) : <td key={i} />\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n"],"names":[],"version":3,"file":"CalendarMonth.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAkBM,SAAS,0CAAc,KAAyB;IACrD,IAAI,SACF,KAAK,aACL,SAAS,kBACT,cAAc,EACf,GAAG;IACJ,IAAI,aACF,SAAS,eACT,WAAW,YACX,QAAQ,EACT,GAAG,CAAA,GAAA,sBAAc,EAAE;QAClB,GAAG,KAAK;QACR,SAAS,CAAA,GAAA,iBAAS,EAAE;IACtB,GAAG;IAEH,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,eAAe,CAAA,GAAA,sBAAc,EAAE,WAAW,QAAQ;IAEtD,qBACE,gCAAC;QACE,GAAG,SAAS;QACb,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG,0BAA0B;qBACxD,gCAAC,SAAU,2BACT,gCAAC,YACE,SAAS,GAAG,CAAC,CAAC,KAAK,sBAClB,gCAAC;YACC,KAAK;YACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;yBAC9B,gCAAC;YAAK,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;WACjC,wBAMX,gCAAC,eACE;WAAI,IAAI,MAAM,cAAc,IAAI;KAAG,CAAC,GAAG,CAAC,CAAA,0BACvC,gCAAC;YAAG,KAAK;WACN,MAAM,cAAc,CAAC,WAAW,WAAW,GAAG,CAAC,CAAC,MAAM,IACrD,qBACE,gCAAC,CAAA,GAAA,yCAAW;gBACV,KAAK;gBACL,OAAO;gBACP,MAAM;gBACN,cAAc;gBACd,gBAAgB;+BAChB,gCAAC;gBAAG,KAAK;;AAO3B","sources":["packages/@react-spectrum/calendar/src/CalendarMonth.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarCell} from './CalendarCell';\nimport {CalendarDate, endOfMonth, getWeeksInMonth} from '@internationalized/date';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport React from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useCalendarGrid} from '@react-aria/calendar';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarMonthProps extends CalendarPropsBase, DOMProps, StyleProps {\n state: CalendarState | RangeCalendarState,\n startDate: CalendarDate\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n let {\n state,\n startDate,\n firstDayOfWeek\n } = props;\n let {\n gridProps,\n headerProps,\n weekDays\n } = useCalendarGrid({\n ...props,\n endDate: endOfMonth(startDate)\n }, state);\n\n let {locale} = useLocale();\n let weeksInMonth = getWeeksInMonth(startDate, locale, firstDayOfWeek);\n\n return (\n <table\n {...gridProps}\n className={classNames(styles, 'spectrum-Calendar-body', 'spectrum-Calendar-table')}>\n <thead {...headerProps}>\n <tr>\n {weekDays.map((day, index) => (\n <th\n key={index}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span className={classNames(styles, 'spectrum-Calendar-dayOfWeek')}>\n {day}\n </span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map(weekIndex => (\n <tr key={weekIndex}>\n {state.getDatesInWeek(weekIndex, startDate).map((date, i) => (\n date ? (\n <CalendarCell\n key={i}\n state={state}\n date={date}\n currentMonth={startDate}\n firstDayOfWeek={firstDayOfWeek} />\n ) : <td key={i} />\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n"],"names":[],"version":3,"file":"CalendarMonth.module.js.map"}
@@ -35,7 +35,7 @@ $parcel$export(module.exports, "RangeCalendar", () => $4d045066f2092e3b$export$a
35
35
 
36
36
 
37
37
 
38
- function $4d045066f2092e3b$var$RangeCalendar(props, ref) {
38
+ const $4d045066f2092e3b$export$a4f5c8b89d277a8d = /*#__PURE__*/ (0, ($parcel$interopDefault($j3Qmk$react))).forwardRef(function RangeCalendar(props, ref) {
39
39
  props = (0, $j3Qmk$reactspectrumprovider.useProviderProps)(props);
40
40
  let { visibleMonths: visibleMonths = 1 } = props;
41
41
  visibleMonths = Math.max(visibleMonths, 1);
@@ -69,10 +69,7 @@ function $4d045066f2092e3b$var$RangeCalendar(props, ref) {
69
69
  nextButtonProps: nextButtonProps,
70
70
  errorMessageProps: errorMessageProps
71
71
  });
72
- }
73
- /**
74
- * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.
75
- */ const $4d045066f2092e3b$export$a4f5c8b89d277a8d = /*#__PURE__*/ (0, ($parcel$interopDefault($j3Qmk$react))).forwardRef($4d045066f2092e3b$var$RangeCalendar);
72
+ });
76
73
 
77
74
 
78
75
  //# sourceMappingURL=RangeCalendar.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAaD,SAAS,oCAAmC,KAAoC,EAAE,GAA8B;IAC9G,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,iBAAC,gBAAgB,GAAE,GAAG;IAC1B,gBAAgB,KAAK,GAAG,CAAC,eAAe;IACxC,IAAI,kBAAkB,CAAA,GAAA,oBAAM,EAAE,IAAO,CAAA;YAAC,QAAQ;QAAa,CAAA,GAAI;QAAC;KAAc;IAC9E,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,8BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,iDAAoB,EAAE;QAChC,GAAG,KAAK;gBACR;yBACA;wBACA;IACF;IAEA,IAAI,SAAS,CAAA,GAAA,mBAAK,EAAE;IACpB,CAAA,GAAA,gCAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,sCAAW,EAAE,OAAO;YACvB;gBACE,MAAM,UAAU,CAAC;YACnB;QACF,CAAA;IAEA,IAAI,iBAAC,aAAa,mBAAE,eAAe,mBAAE,eAAe,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,yCAAe,EAAE,OAAO,OAAO;IAE1G,qBACE,0DAAC,CAAA,GAAA,sCAAW;QACT,GAAG,KAAK;QACT,eAAe;QACf,OAAO;QACP,aAAa;QACb,eAAe;QACf,iBAAiB;QACjB,iBAAiB;QACjB,mBAAmB;;AAEzB;AAEA;;CAEC,GACD,MAAM,0DAAiB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/calendar/src/RangeCalendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {createDOMRef} from '@react-spectrum/utils';\nimport {DateValue, SpectrumRangeCalendarProps} from '@react-types/calendar';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {ReactElement, useImperativeHandle, useMemo, useRef} from 'react';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useRangeCalendar} from '@react-aria/calendar';\nimport {useRangeCalendarState} from '@react-stately/calendar';\n\nfunction RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let {visibleMonths = 1} = props;\n visibleMonths = Math.max(visibleMonths, 1);\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useRangeCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let domRef = useRef(null);\n useImperativeHandle(ref, () => ({\n ...createDOMRef(domRef),\n focus() {\n state.setFocused(true);\n }\n }));\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useRangeCalendar(props, state, domRef);\n\n return (\n <CalendarBase\n {...props}\n visibleMonths={visibleMonths}\n state={state}\n calendarRef={domRef}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nconst _RangeCalendar = React.forwardRef(RangeCalendar) as <T extends DateValue>(props: SpectrumRangeCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\nexport {_RangeCalendar as RangeCalendar};\n"],"names":[],"version":3,"file":"RangeCalendar.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAgBM,MAAM,0DAAgB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,cAAmC,KAAoC,EAAE,GAA8B;IAC5J,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,iBAAC,gBAAgB,GAAE,GAAG;IAC1B,gBAAgB,KAAK,GAAG,CAAC,eAAe;IACxC,IAAI,kBAAkB,CAAA,GAAA,oBAAM,EAAE,IAAO,CAAA;YAAC,QAAQ;QAAa,CAAA,GAAI;QAAC;KAAc;IAC9E,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,8BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,iDAAoB,EAAE;QAChC,GAAG,KAAK;gBACR;yBACA;wBACA;IACF;IAEA,IAAI,SAAS,CAAA,GAAA,mBAAK,EAAE;IACpB,CAAA,GAAA,gCAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,sCAAW,EAAE,OAAO;YACvB;gBACE,MAAM,UAAU,CAAC;YACnB;QACF,CAAA;IAEA,IAAI,iBAAC,aAAa,mBAAE,eAAe,mBAAE,eAAe,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,yCAAe,EAAE,OAAO,OAAO;IAE1G,qBACE,0DAAC,CAAA,GAAA,sCAAW;QACT,GAAG,KAAK;QACT,eAAe;QACf,OAAO;QACP,aAAa;QACb,eAAe;QACf,iBAAiB;QACjB,iBAAiB;QACjB,mBAAmB;;AAEzB","sources":["packages/@react-spectrum/calendar/src/RangeCalendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {createDOMRef} from '@react-spectrum/utils';\nimport {DateValue, SpectrumRangeCalendarProps} from '@react-types/calendar';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {ReactElement, useImperativeHandle, useMemo, useRef} from 'react';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useRangeCalendar} from '@react-aria/calendar';\nimport {useRangeCalendarState} from '@react-stately/calendar';\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport const RangeCalendar = React.forwardRef(function RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let {visibleMonths = 1} = props;\n visibleMonths = Math.max(visibleMonths, 1);\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useRangeCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let domRef = useRef(null);\n useImperativeHandle(ref, () => ({\n ...createDOMRef(domRef),\n focus() {\n state.setFocused(true);\n }\n }));\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useRangeCalendar(props, state, domRef);\n\n return (\n <CalendarBase\n {...props}\n visibleMonths={visibleMonths}\n state={state}\n calendarRef={domRef}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}) as <T extends DateValue>(props: SpectrumRangeCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"RangeCalendar.main.js.map"}
@@ -25,7 +25,7 @@ import {useRangeCalendarState as $7I6vM$useRangeCalendarState} from "@react-stat
25
25
 
26
26
 
27
27
 
28
- function $8b1e8eddbf3b15de$var$RangeCalendar(props, ref) {
28
+ const $8b1e8eddbf3b15de$export$a4f5c8b89d277a8d = /*#__PURE__*/ (0, $7I6vM$react).forwardRef(function RangeCalendar(props, ref) {
29
29
  props = (0, $7I6vM$useProviderProps)(props);
30
30
  let { visibleMonths: visibleMonths = 1 } = props;
31
31
  visibleMonths = Math.max(visibleMonths, 1);
@@ -59,10 +59,7 @@ function $8b1e8eddbf3b15de$var$RangeCalendar(props, ref) {
59
59
  nextButtonProps: nextButtonProps,
60
60
  errorMessageProps: errorMessageProps
61
61
  });
62
- }
63
- /**
64
- * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.
65
- */ const $8b1e8eddbf3b15de$export$a4f5c8b89d277a8d = /*#__PURE__*/ (0, $7I6vM$react).forwardRef($8b1e8eddbf3b15de$var$RangeCalendar);
62
+ });
66
63
 
67
64
 
68
65
  export {$8b1e8eddbf3b15de$export$a4f5c8b89d277a8d as RangeCalendar};
@@ -25,7 +25,7 @@ import {useRangeCalendarState as $7I6vM$useRangeCalendarState} from "@react-stat
25
25
 
26
26
 
27
27
 
28
- function $8b1e8eddbf3b15de$var$RangeCalendar(props, ref) {
28
+ const $8b1e8eddbf3b15de$export$a4f5c8b89d277a8d = /*#__PURE__*/ (0, $7I6vM$react).forwardRef(function RangeCalendar(props, ref) {
29
29
  props = (0, $7I6vM$useProviderProps)(props);
30
30
  let { visibleMonths: visibleMonths = 1 } = props;
31
31
  visibleMonths = Math.max(visibleMonths, 1);
@@ -59,10 +59,7 @@ function $8b1e8eddbf3b15de$var$RangeCalendar(props, ref) {
59
59
  nextButtonProps: nextButtonProps,
60
60
  errorMessageProps: errorMessageProps
61
61
  });
62
- }
63
- /**
64
- * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.
65
- */ const $8b1e8eddbf3b15de$export$a4f5c8b89d277a8d = /*#__PURE__*/ (0, $7I6vM$react).forwardRef($8b1e8eddbf3b15de$var$RangeCalendar);
62
+ });
66
63
 
67
64
 
68
65
  export {$8b1e8eddbf3b15de$export$a4f5c8b89d277a8d as RangeCalendar};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAaD,SAAS,oCAAmC,KAAoC,EAAE,GAA8B;IAC9G,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,iBAAC,gBAAgB,GAAE,GAAG;IAC1B,gBAAgB,KAAK,GAAG,CAAC,eAAe;IACxC,IAAI,kBAAkB,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;YAAC,QAAQ;QAAa,CAAA,GAAI;QAAC;KAAc;IAC9E,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,4BAAoB,EAAE;QAChC,GAAG,KAAK;gBACR;yBACA;wBACA;IACF;IAEA,IAAI,SAAS,CAAA,GAAA,aAAK,EAAE;IACpB,CAAA,GAAA,0BAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,mBAAW,EAAE,OAAO;YACvB;gBACE,MAAM,UAAU,CAAC;YACnB;QACF,CAAA;IAEA,IAAI,iBAAC,aAAa,mBAAE,eAAe,mBAAE,eAAe,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,uBAAe,EAAE,OAAO,OAAO;IAE1G,qBACE,gCAAC,CAAA,GAAA,yCAAW;QACT,GAAG,KAAK;QACT,eAAe;QACf,OAAO;QACP,aAAa;QACb,eAAe;QACf,iBAAiB;QACjB,iBAAiB;QACjB,mBAAmB;;AAEzB;AAEA;;CAEC,GACD,MAAM,0DAAiB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/calendar/src/RangeCalendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {createDOMRef} from '@react-spectrum/utils';\nimport {DateValue, SpectrumRangeCalendarProps} from '@react-types/calendar';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {ReactElement, useImperativeHandle, useMemo, useRef} from 'react';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useRangeCalendar} from '@react-aria/calendar';\nimport {useRangeCalendarState} from '@react-stately/calendar';\n\nfunction RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let {visibleMonths = 1} = props;\n visibleMonths = Math.max(visibleMonths, 1);\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useRangeCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let domRef = useRef(null);\n useImperativeHandle(ref, () => ({\n ...createDOMRef(domRef),\n focus() {\n state.setFocused(true);\n }\n }));\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useRangeCalendar(props, state, domRef);\n\n return (\n <CalendarBase\n {...props}\n visibleMonths={visibleMonths}\n state={state}\n calendarRef={domRef}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nconst _RangeCalendar = React.forwardRef(RangeCalendar) as <T extends DateValue>(props: SpectrumRangeCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\nexport {_RangeCalendar as RangeCalendar};\n"],"names":[],"version":3,"file":"RangeCalendar.module.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAgBM,MAAM,0DAAgB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,cAAmC,KAAoC,EAAE,GAA8B;IAC5J,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,iBAAC,gBAAgB,GAAE,GAAG;IAC1B,gBAAgB,KAAK,GAAG,CAAC,eAAe;IACxC,IAAI,kBAAkB,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;YAAC,QAAQ;QAAa,CAAA,GAAI;QAAC;KAAc;IAC9E,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,4BAAoB,EAAE;QAChC,GAAG,KAAK;gBACR;yBACA;wBACA;IACF;IAEA,IAAI,SAAS,CAAA,GAAA,aAAK,EAAE;IACpB,CAAA,GAAA,0BAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,mBAAW,EAAE,OAAO;YACvB;gBACE,MAAM,UAAU,CAAC;YACnB;QACF,CAAA;IAEA,IAAI,iBAAC,aAAa,mBAAE,eAAe,mBAAE,eAAe,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,uBAAe,EAAE,OAAO,OAAO;IAE1G,qBACE,gCAAC,CAAA,GAAA,yCAAW;QACT,GAAG,KAAK;QACT,eAAe;QACf,OAAO;QACP,aAAa;QACb,eAAe;QACf,iBAAiB;QACjB,iBAAiB;QACjB,mBAAmB;;AAEzB","sources":["packages/@react-spectrum/calendar/src/RangeCalendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {createDOMRef} from '@react-spectrum/utils';\nimport {DateValue, SpectrumRangeCalendarProps} from '@react-types/calendar';\nimport {FocusableRef} from '@react-types/shared';\nimport React, {ReactElement, useImperativeHandle, useMemo, useRef} from 'react';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useRangeCalendar} from '@react-aria/calendar';\nimport {useRangeCalendarState} from '@react-stately/calendar';\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport const RangeCalendar = React.forwardRef(function RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let {visibleMonths = 1} = props;\n visibleMonths = Math.max(visibleMonths, 1);\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useRangeCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let domRef = useRef(null);\n useImperativeHandle(ref, () => ({\n ...createDOMRef(domRef),\n focus() {\n state.setFocused(true);\n }\n }));\n\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useRangeCalendar(props, state, domRef);\n\n return (\n <CalendarBase\n {...props}\n visibleMonths={visibleMonths}\n state={state}\n calendarRef={domRef}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}) as <T extends DateValue>(props: SpectrumRangeCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"RangeCalendar.module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;AG2DA;;GAEG;AACH,OAAA,MAAM,UAA0C,CAAC,CAAmB,SAAT,SAAS,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,aAAa,WAAW,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;ACH3J;;GAEG;AACH,OAAA,MAAM,eAAoD,CAAC,CAAmB,SAAT,SAAS,EAAE,KAAK,EAAE,2BAA2B,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,aAAa,WAAW,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;AC9C1K,YAAY,EAAC,qBAAqB,EAAE,0BAA0B,EAAC,MAAM,uBAAuB,CAAC","sources":["packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/CalendarCell.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/CalendarMonth.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/CalendarBase.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/Calendar.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/RangeCalendar.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/index.ts","packages/@react-spectrum/calendar/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Calendar} from './Calendar';\nexport {RangeCalendar} from './RangeCalendar';\nexport type {SpectrumCalendarProps, SpectrumRangeCalendarProps} from '@react-types/calendar';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AGuBA;;GAEG;AACH,OAAO,MAAM,UAkCP,CAAC,CAAmB,SAAT,SAAS,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,aAAa,WAAW,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;ACrCjH;;GAEG;AACH,OAAO,MAAM,eAkCP,CAAC,CAAmB,SAAT,SAAS,EAAE,KAAK,EAAE,2BAA2B,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,aAAa,WAAW,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;AC5CtH,YAAY,EAAC,qBAAqB,EAAE,0BAA0B,EAAC,MAAM,uBAAuB,CAAC","sources":["packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/CalendarCell.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/CalendarMonth.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/CalendarBase.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/Calendar.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/RangeCalendar.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/index.ts","packages/@react-spectrum/calendar/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Calendar} from './Calendar';\nexport {RangeCalendar} from './RangeCalendar';\nexport type {SpectrumCalendarProps, SpectrumRangeCalendarProps} from '@react-types/calendar';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -96,6 +96,7 @@
96
96
  }
97
97
 
98
98
  .a0JGJW_spectrum-Calendar-monthHeader {
99
+ width: 100%;
99
100
  min-width: calc(var(--spectrum-calendar-day-width, var(--spectrum-global-dimension-size-400)) * 7);
100
101
  max-width: calc((var(--spectrum-calendar-day-width, var(--spectrum-global-dimension-size-400)) * 7) + (var(--spectrum-calendar-day-padding, 4px) * 12));
101
102
  padding: 0 var(--spectrum-global-dimension-size-40);
@@ -103,7 +104,6 @@
103
104
  grid-template-columns: minmax(auto, 1fr) auto minmax(auto, 1fr);
104
105
  grid-template-areas: "a0JGJW_prev a0JGJW_title a0JGJW_next";
105
106
  align-content: start;
106
- width: 100%;
107
107
  display: grid;
108
108
  }
109
109
 
@@ -138,14 +138,14 @@
138
138
  }
139
139
 
140
140
  .a0JGJW_spectrum-Calendar-dayOfWeek {
141
+ width: 100%;
142
+ height: 100%;
141
143
  font-size: var(--spectrum-calendar-day-title-text-size, var(--spectrum-global-dimension-font-size-50));
142
144
  font-weight: var(--spectrum-calendar-day-title-text-font-weight, var(--spectrum-global-font-weight-medium));
143
145
  text-transform: uppercase;
144
146
  cursor: default;
145
147
  flex-direction: column;
146
148
  justify-content: flex-end;
147
- width: 100%;
148
- height: 100%;
149
149
  display: flex;
150
150
  border-bottom: none !important;
151
151
  text-decoration: none !important;
@@ -162,13 +162,13 @@
162
162
 
163
163
  .a0JGJW_spectrum-Calendar-table {
164
164
  table-layout: fixed;
165
+ width: 100%;
165
166
  min-width: calc(var(--spectrum-calendar-day-width, var(--spectrum-global-dimension-size-400)) * 7);
166
167
  max-width: calc((var(--spectrum-calendar-day-width, var(--spectrum-global-dimension-size-400)) * 7) + (var(--spectrum-calendar-day-padding, 4px) * 12));
167
168
  border-collapse: collapse;
168
169
  border-spacing: 0;
169
170
  -webkit-user-select: none;
170
171
  user-select: none;
171
- width: 100%;
172
172
  }
173
173
 
174
174
  .a0JGJW_spectrum-Calendar-tableCell {
@@ -188,6 +188,7 @@
188
188
  .a0JGJW_spectrum-Calendar-date {
189
189
  box-sizing: border-box;
190
190
  height: var(--spectrum-calendar-day-height, var(--spectrum-global-dimension-size-400));
191
+ width: 100%;
191
192
  margin: var(--spectrum-calendar-day-padding, 4px) 0;
192
193
  border-radius: var(--spectrum-calendar-day-width, var(--spectrum-global-dimension-size-400));
193
194
  font-size: var(--spectrum-calendar-day-text-size, var(--spectrum-alias-font-size-default));
@@ -195,7 +196,6 @@
195
196
  white-space: nowrap;
196
197
  cursor: default;
197
198
  --margin: calc((100% - var(--spectrum-calendar-day-width, var(--spectrum-global-dimension-size-400))) / 2);
198
- width: 100%;
199
199
  display: block;
200
200
  position: absolute;
201
201
  top: 0;
@@ -921,4 +921,4 @@
921
921
  color: var(--spectrum-calendar-day-today-text-color, var(--spectrum-global-color-gray-800));
922
922
  }
923
923
  }
924
- /*# sourceMappingURL=vars.83159c34.css.map */
924
+ /*# sourceMappingURL=vars.0e34c9ec.css.map */
@@ -1 +1 @@
1
- {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;AAKA;;;;AAIA;;;;;;;;AAQA;;;;;;;;;;;;AAYA;;;;;;;;;;;;AAcA;;;;;AAKA;;;;;AAKA;;;;;;;;AAQA;;;;;;;;;;;;;;AAiBE;;;;;AAWF;;;;AAIA;;;;;;;;;;;AAeA;;;;;;;;;;AASE;;;;AAKF;;;;;;;;;;;;;;;;;AAwBE;;;;;;;;AAQA;;;;AAIA;;;;AAIA;;;;;AAME;;;;AAGE;;;;;;;;;;;;AAcJ;;;;AAKA;;;;;;;;;;;;;;AAiBE;;;;AAMF;;;;;;;;;;;;AAgBA;;;;;;;AAOE;;;;AASE;;;;AAAA;;;;AAAA;;;;AAAA;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BE;;;;EAIE;;;;;EAWA;;;;EAKA","sources":["packages/@adobe/spectrum-css-temp/components/calendar/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.83159c34.css.map"}
1
+ {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;AAKA;;;;AAIA;;;;;;;;AAQA;;;;;;;;;;;;AAYA;;;;;;;;;;;;AAcA;;;;;AAKA;;;;;AAKA;;;;;;;;AAQA;;;;;;;;;;;;;;AAiBE;;;;;AAWF;;;;AAIA;;;;;;;;;;;AAeA;;;;;;;;;;AASE;;;;AAKF;;;;;;;;;;;;;;;;;AAwBE;;;;;;;;AAQA;;;;AAIA;;;;AAIA;;;;;AAME;;;;AAGE;;;;;;;;;;;;AAcJ;;;;AAKA;;;;;;;;;;;;;;AAiBE;;;;AAMF;;;;;;;;;;;;AAgBA;;;;;;;AAOE;;;;AASE;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAMA;;;;AAfF;;;;;;;AAAA;;;;;;;AAAA;;;;;;;AAAA;;;;;;;AAAA;;;;A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.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.0e34c9ec.css.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/calendar",
3
- "version": "3.5.0",
3
+ "version": "3.6.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,21 +36,21 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@internationalized/date": "^3.6.0",
40
- "@react-aria/calendar": "^3.6.0",
41
- "@react-aria/focus": "^3.19.0",
42
- "@react-aria/i18n": "^3.12.4",
43
- "@react-aria/interactions": "^3.22.5",
44
- "@react-aria/utils": "^3.26.0",
45
- "@react-aria/visually-hidden": "^3.8.18",
46
- "@react-spectrum/button": "^3.16.9",
47
- "@react-spectrum/label": "^3.16.10",
48
- "@react-spectrum/utils": "^3.12.0",
49
- "@react-stately/calendar": "^3.6.0",
50
- "@react-types/button": "^3.10.1",
51
- "@react-types/calendar": "^3.5.0",
52
- "@react-types/shared": "^3.26.0",
53
- "@spectrum-icons/ui": "^3.6.11",
39
+ "@internationalized/date": "^3.7.0",
40
+ "@react-aria/calendar": "^3.7.1",
41
+ "@react-aria/focus": "^3.20.0",
42
+ "@react-aria/i18n": "^3.12.6",
43
+ "@react-aria/interactions": "^3.24.0",
44
+ "@react-aria/utils": "^3.28.0",
45
+ "@react-aria/visually-hidden": "^3.8.20",
46
+ "@react-spectrum/button": "^3.16.11",
47
+ "@react-spectrum/label": "^3.16.12",
48
+ "@react-spectrum/utils": "^3.12.2",
49
+ "@react-stately/calendar": "^3.7.1",
50
+ "@react-types/button": "^3.11.0",
51
+ "@react-types/calendar": "^3.6.1",
52
+ "@react-types/shared": "^3.28.0",
53
+ "@spectrum-icons/ui": "^3.6.13",
54
54
  "@swc/helpers": "^0.5.0"
55
55
  },
56
56
  "devDependencies": {
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "71f0ef23053f9e03ee7e97df736e8b083e006849"
68
+ "gitHead": "4d3c72c94eea2d72eb3a0e7d56000c6ef7e39726"
69
69
  }
package/src/Calendar.tsx CHANGED
@@ -21,7 +21,10 @@ import {useCalendarState} from '@react-stately/calendar';
21
21
  import {useLocale} from '@react-aria/i18n';
22
22
  import {useProviderProps} from '@react-spectrum/provider';
23
23
 
24
- function Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>, ref: FocusableRef<HTMLElement>) {
24
+ /**
25
+ * Calendars display a grid of days in one or more months and allow users to select a single date.
26
+ */
27
+ export const Calendar = React.forwardRef(function Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>, ref: FocusableRef<HTMLElement>) {
25
28
  props = useProviderProps(props);
26
29
  let {visibleMonths = 1} = props;
27
30
  visibleMonths = Math.max(visibleMonths, 1);
@@ -55,10 +58,4 @@ function Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>, ref: Foc
55
58
  nextButtonProps={nextButtonProps}
56
59
  errorMessageProps={errorMessageProps} />
57
60
  );
58
- }
59
-
60
- /**
61
- * Calendars display a grid of days in one or more months and allow users to select a single date.
62
- */
63
- const _Calendar = React.forwardRef(Calendar) as <T extends DateValue>(props: SpectrumCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;
64
- export {_Calendar as Calendar};
61
+ }) as <T extends DateValue>(props: SpectrumCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;
@@ -45,7 +45,8 @@ export function CalendarBase<T extends CalendarState | RangeCalendarState>(props
45
45
  prevButtonProps,
46
46
  errorMessageProps,
47
47
  calendarRef: ref,
48
- visibleMonths = 1
48
+ visibleMonths = 1,
49
+ firstDayOfWeek
49
50
  } = props;
50
51
  let {styleProps} = useStyleProps(props);
51
52
  let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/calendar');
@@ -97,7 +98,8 @@ export function CalendarBase<T extends CalendarState | RangeCalendarState>(props
97
98
  {...props}
98
99
  key={i}
99
100
  state={state}
100
- startDate={d} />
101
+ startDate={d}
102
+ firstDayOfWeek={firstDayOfWeek} />
101
103
  );
102
104
  }
103
105
 
@@ -23,10 +23,11 @@ import {useLocale} from '@react-aria/i18n';
23
23
 
24
24
  interface CalendarCellProps extends AriaCalendarCellProps {
25
25
  state: CalendarState | RangeCalendarState,
26
- currentMonth: CalendarDate
26
+ currentMonth: CalendarDate,
27
+ firstDayOfWeek?: 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'
27
28
  }
28
29
 
29
- export function CalendarCell({state, currentMonth, ...props}: CalendarCellProps) {
30
+ export function CalendarCell({state, currentMonth, firstDayOfWeek, ...props}: CalendarCellProps) {
30
31
  let ref = useRef<HTMLElement>(null);
31
32
  let {
32
33
  cellProps,
@@ -48,7 +49,7 @@ export function CalendarCell({state, currentMonth, ...props}: CalendarCellProps)
48
49
  let isSelectionStart = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.start);
49
50
  let isSelectionEnd = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.end);
50
51
  let {locale} = useLocale();
51
- let dayOfWeek = getDayOfWeek(props.date, locale);
52
+ let dayOfWeek = getDayOfWeek(props.date, locale, firstDayOfWeek);
52
53
  let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);
53
54
  let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));
54
55
  let {focusProps, isFocusVisible} = useFocusRing();
@@ -29,7 +29,8 @@ interface CalendarMonthProps extends CalendarPropsBase, DOMProps, StyleProps {
29
29
  export function CalendarMonth(props: CalendarMonthProps) {
30
30
  let {
31
31
  state,
32
- startDate
32
+ startDate,
33
+ firstDayOfWeek
33
34
  } = props;
34
35
  let {
35
36
  gridProps,
@@ -41,7 +42,7 @@ export function CalendarMonth(props: CalendarMonthProps) {
41
42
  }, state);
42
43
 
43
44
  let {locale} = useLocale();
44
- let weeksInMonth = getWeeksInMonth(startDate, locale);
45
+ let weeksInMonth = getWeeksInMonth(startDate, locale, firstDayOfWeek);
45
46
 
46
47
  return (
47
48
  <table
@@ -69,7 +70,8 @@ export function CalendarMonth(props: CalendarMonthProps) {
69
70
  key={i}
70
71
  state={state}
71
72
  date={date}
72
- currentMonth={startDate} />
73
+ currentMonth={startDate}
74
+ firstDayOfWeek={firstDayOfWeek} />
73
75
  ) : <td key={i} />
74
76
  ))}
75
77
  </tr>
@@ -21,7 +21,10 @@ import {useProviderProps} from '@react-spectrum/provider';
21
21
  import {useRangeCalendar} from '@react-aria/calendar';
22
22
  import {useRangeCalendarState} from '@react-stately/calendar';
23
23
 
24
- function RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarProps<T>, ref: FocusableRef<HTMLElement>) {
24
+ /**
25
+ * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.
26
+ */
27
+ export const RangeCalendar = React.forwardRef(function RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarProps<T>, ref: FocusableRef<HTMLElement>) {
25
28
  props = useProviderProps(props);
26
29
  let {visibleMonths = 1} = props;
27
30
  visibleMonths = Math.max(visibleMonths, 1);
@@ -55,10 +58,4 @@ function RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarProps<T>
55
58
  nextButtonProps={nextButtonProps}
56
59
  errorMessageProps={errorMessageProps} />
57
60
  );
58
- }
59
-
60
- /**
61
- * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.
62
- */
63
- const _RangeCalendar = React.forwardRef(RangeCalendar) as <T extends DateValue>(props: SpectrumRangeCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;
64
- export {_RangeCalendar as RangeCalendar};
61
+ }) as <T extends DateValue>(props: SpectrumRangeCalendarProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;