{"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAiBM,SAAS,0CAAc,KAAyB;IACrD,IAAI,SAAC,KAAK,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG;IAEzC,IAAI,aAAC,SAAS,eAAE,WAAW,YAAE,QAAQ,gBAAE,YAAY,EAAC,GAAG,CAAA,GAAA,2CAAc,EACnE;QACE,GAAG,KAAK;QACR,SAAS,CAAA,GAAA,uCAAS,EAAE;IACtB,GACA;IAGF,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;YAAG,KAAK;YAAO,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;yBAC5C,0DAAC;YAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;WAAiC,wBAK7E,0DAAC,eACE;WAAI,IAAI,MAAM,cAAc,IAAI;KAAG,CAAC,GAAG,CAAC,CAAA,0BACvC,0DAAC;YAAG,KAAK;WACN,MACE,cAAc,CAAC,WAAW,WAC1B,GAAG,CAAC,CAAC,MAAM,IACV,qBACE,0DAAC,CAAA,GAAA,sCAAW;gBACV,KAAK;gBACL,OAAO;gBACP,MAAM;gBACN,cAAc;gBACd,gBAAgB;+BAGlB,0DAAC;gBAAG,KAAK;;AAQ3B","sources":["packages/@adobe/react-spectrum/src/calendar/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} from '@internationalized/date';\nimport {CalendarPropsBase, CalendarState} from 'react-stately/useCalendarState';\nimport {classNames} from '../utils/classNames';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport {RangeCalendarState} from 'react-stately/useRangeCalendarState';\nimport React, {JSX} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useCalendarGrid} from 'react-aria/useCalendar';\n\ninterface CalendarMonthProps extends CalendarPropsBase, DOMProps, StyleProps {\n  state: CalendarState | RangeCalendarState;\n  startDate: CalendarDate;\n}\n\nexport function CalendarMonth(props: CalendarMonthProps): JSX.Element {\n  let {state, startDate, firstDayOfWeek} = props;\n\n  let {gridProps, headerProps, weekDays, weeksInMonth} = useCalendarGrid(\n    {\n      ...props,\n      endDate: endOfMonth(startDate)\n    },\n    state\n  );\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 key={index} className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n              <span className={classNames(styles, 'spectrum-Calendar-dayOfWeek')}>{day}</span>\n            </th>\n          ))}\n        </tr>\n      </thead>\n      <tbody>\n        {[...new Array(weeksInMonth).keys()].map(weekIndex => (\n          <tr key={weekIndex}>\n            {state\n              .getDatesInWeek(weekIndex, startDate)\n              .map((date, i) =>\n                date ? (\n                  <CalendarCell\n                    key={i}\n                    state={state}\n                    date={date}\n                    currentMonth={startDate}\n                    firstDayOfWeek={firstDayOfWeek}\n                  />\n                ) : (\n                  <td key={i} />\n                )\n              )}\n          </tr>\n        ))}\n      </tbody>\n    </table>\n  );\n}\n"],"names":[],"version":3,"file":"CalendarMonth.cjs.map"}