@fluentui/react-calendar-compat 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -2
- package/lib/Calendar.js.map +1 -1
- package/lib/CalendarDay.js.map +1 -1
- package/lib/CalendarDayGrid.js.map +1 -1
- package/lib/CalendarMonth.js.map +1 -1
- package/lib/CalendarPicker.js.map +1 -1
- package/lib/CalendarYear.js.map +1 -1
- package/lib/components/Calendar/Calendar.js.map +1 -1
- package/lib/components/Calendar/Calendar.types.js +4 -4
- package/lib/components/Calendar/Calendar.types.js.map +1 -1
- package/lib/components/Calendar/calendarNavigationIcons.js.map +1 -1
- package/lib/components/Calendar/defaults.js.map +1 -1
- package/lib/components/Calendar/index.js.map +1 -1
- package/lib/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib/components/CalendarDay/CalendarDay.types.js.map +1 -1
- package/lib/components/CalendarDay/index.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
- package/lib/components/CalendarDayGrid/index.js.map +1 -1
- package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -1
- package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
- package/lib/components/CalendarMonth/index.js.map +1 -1
- package/lib/components/CalendarPicker/CalendarPicker.types.js +3 -1
- package/lib/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
- package/lib/components/CalendarPicker/index.js.map +1 -1
- package/lib/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib/components/CalendarYear/CalendarYear.types.js.map +1 -1
- package/lib/components/CalendarYear/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/animations.js.map +1 -1
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/dateFormatting/dateFormatting.defaults.js.map +1 -1
- package/lib/utils/dateFormatting/dateFormatting.types.js.map +1 -1
- package/lib/utils/dateFormatting/index.js.map +1 -1
- package/lib/utils/dateGrid/dateGrid.types.js.map +1 -1
- package/lib/utils/dateGrid/findAvailableDate.js.map +1 -1
- package/lib/utils/dateGrid/getBoundedDateRange.js.map +1 -1
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
- package/lib/utils/dateGrid/getDayGrid.js.map +1 -1
- package/lib/utils/dateGrid/index.js.map +1 -1
- package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -1
- package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -1
- package/lib/utils/dateGrid/isContiguous.js.map +1 -1
- package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -1
- package/lib/utils/dateMath/dateMath.js.map +1 -1
- package/lib/utils/dateMath/index.js.map +1 -1
- package/lib/utils/focus.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib-commonjs/Calendar.js.map +1 -1
- package/lib-commonjs/CalendarDay.js.map +1 -1
- package/lib-commonjs/CalendarDayGrid.js.map +1 -1
- package/lib-commonjs/CalendarMonth.js.map +1 -1
- package/lib-commonjs/CalendarPicker.js.map +1 -1
- package/lib-commonjs/CalendarYear.js.map +1 -1
- package/lib-commonjs/components/Calendar/Calendar.js.map +1 -1
- package/lib-commonjs/components/Calendar/Calendar.types.js +4 -4
- package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -1
- package/lib-commonjs/components/Calendar/calendarNavigationIcons.js.map +1 -1
- package/lib-commonjs/components/Calendar/defaults.js.map +1 -1
- package/lib-commonjs/components/Calendar/index.js.map +1 -1
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/index.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js +3 -3
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/index.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js +3 -1
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/index.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/index.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
- package/lib-commonjs/index.js +44 -44
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/animations.js +9 -9
- package/lib-commonjs/utils/animations.js.map +1 -1
- package/lib-commonjs/utils/constants.js +8 -8
- package/lib-commonjs/utils/constants.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js +12 -12
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/index.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/index.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -1
- package/lib-commonjs/utils/dateMath/dateMath.js +29 -29
- package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -1
- package/lib-commonjs/utils/dateMath/index.js.map +1 -1
- package/lib-commonjs/utils/focus.js.map +1 -1
- package/lib-commonjs/utils/index.js.map +1 -1
- package/package.json +5 -5
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useWeekCornerStyles.styles.js"],"sourcesContent":["import { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { mergeClasses } from '@griffel/react';\nimport { DateRangeType } from '../../utils/constants';\nimport { getDateRangeArray } from '../../utils/index';\n/**\n * @internal\n
|
1
|
+
{"version":3,"sources":["useWeekCornerStyles.styles.js"],"sourcesContent":["import { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { mergeClasses } from '@griffel/react';\nimport { DateRangeType } from '../../utils/constants';\nimport { getDateRangeArray } from '../../utils/index';\n/**\n * @internal\n */ export const weekCornersClassNames = {\n topRightCornerDate: 'fui-CalendarDayGrid__topRightCornerDate',\n topLeftCornerDate: 'fui-CalendarDayGrid__topLeftCornerDate',\n bottomRightCornerDate: 'fui-CalendarDayGrid__bottomRightCornerDate',\n bottomLeftCornerDate: 'fui-CalendarDayGrid__bottomLeftCornerDate'\n};\n/**\n * @internal\n */ export function useWeekCornerStyles(props) {\n const { dir } = useFluent_unstable();\n /**\n *\n * Section for setting the rounded corner styles on individual day cells. Individual day cells need different\n * corners to be rounded depending on which date range type and where the cell is located in the current grid.\n * If we just round all of the corners, there isn't a good overlap and we get gaps between contiguous day boxes\n * in Edge browser.\n *\n */ const getWeekCornerStyles = (initialWeeks)=>{\n const weekCornersStyled = {};\n /* need to handle setting all of the corners on arbitrarily shaped blobs\n __\n __|A |\n |B |C |__\n |D |E |F |\n\n in this case, A needs top left rounded, top right rounded\n B needs top left rounded\n C doesn't need any rounding\n D needs bottom left rounded\n E doesn't need any rounding\n F needs top right rounding\n */ // cut off the animation transition weeks\n const weeks = initialWeeks.slice(1, initialWeeks.length - 1);\n // if there's an item above, lose both top corners. Item below, lose both bottom corners, etc.\n weeks.forEach((week, weekIndex)=>{\n week.forEach((day, dayIndex)=>{\n const above = weeks[weekIndex - 1] && weeks[weekIndex - 1][dayIndex] && isInSameHoverRange(weeks[weekIndex - 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex - 1][dayIndex].isSelected, day.isSelected);\n const below = weeks[weekIndex + 1] && weeks[weekIndex + 1][dayIndex] && isInSameHoverRange(weeks[weekIndex + 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex + 1][dayIndex].isSelected, day.isSelected);\n const left = weeks[weekIndex][dayIndex - 1] && isInSameHoverRange(weeks[weekIndex][dayIndex - 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex - 1].isSelected, day.isSelected);\n const right = weeks[weekIndex][dayIndex + 1] && isInSameHoverRange(weeks[weekIndex][dayIndex + 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex + 1].isSelected, day.isSelected);\n weekCornersStyled[weekIndex + '_' + dayIndex] = calculateRoundedStyles(above, below, left, right);\n });\n });\n return weekCornersStyled;\n };\n const calculateRoundedStyles = (above, below, left, right)=>{\n const style = [];\n const roundedTopLeft = !above && !left;\n const roundedTopRight = !above && !right;\n const roundedBottomLeft = !below && !left;\n const roundedBottomRight = !below && !right;\n if (roundedTopLeft) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topRightCornerDate : weekCornersClassNames.topLeftCornerDate);\n }\n if (roundedTopRight) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topLeftCornerDate : weekCornersClassNames.topRightCornerDate);\n }\n if (roundedBottomLeft) {\n style.push(dir === 'rtl' ? weekCornersClassNames.bottomRightCornerDate : weekCornersClassNames.bottomLeftCornerDate);\n }\n if (roundedBottomRight) {\n style.push(dir === 'rtl' ? weekCornersClassNames.bottomLeftCornerDate : weekCornersClassNames.bottomRightCornerDate);\n }\n return mergeClasses(...style);\n };\n const isInSameHoverRange = (date1, date2, date1Selected, date2Selected)=>{\n const { dateRangeType, firstDayOfWeek, workWeekDays } = props;\n // The hover state looks weird with non-contiguous days in work week view. In work week, show week hover state\n const dateRangeHoverType = dateRangeType === DateRangeType.WorkWeek ? DateRangeType.Week : dateRangeType;\n // we do not pass daysToSelectInDayView because we handle setting those styles dyanamically in onMouseOver\n const dateRange = getDateRangeArray(date1, dateRangeHoverType, firstDayOfWeek, workWeekDays);\n if (date1Selected !== date2Selected) {\n // if one is selected and the other is not, they can't be in the same range\n return false;\n } else if (date1Selected && date2Selected) {\n // if they're both selected at the same time they must be in the same range\n return true;\n }\n // otherwise, both must be unselected, so check the dateRange\n return dateRange.filter((date)=>date.getTime() === date2.getTime()).length > 0;\n };\n return [\n getWeekCornerStyles,\n calculateRoundedStyles\n ];\n}\n"],"names":["useWeekCornerStyles","weekCornersClassNames","topRightCornerDate","topLeftCornerDate","bottomRightCornerDate","bottomLeftCornerDate","props","dir","useFluent_unstable","getWeekCornerStyles","initialWeeks","weekCornersStyled","weeks","slice","length","forEach","week","weekIndex","day","dayIndex","above","isInSameHoverRange","originalDate","isSelected","below","left","right","calculateRoundedStyles","style","roundedTopLeft","roundedTopRight","roundedBottomLeft","roundedBottomRight","push","mergeClasses","date1","date2","date1Selected","date2Selected","dateRangeType","firstDayOfWeek","workWeekDays","dateRangeHoverType","DateRangeType","WorkWeek","Week","dateRange","getDateRangeArray","filter","date","getTime"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAcoBA,mBAAmBA;eAAnBA;;IARHC,qBAAqB;eAArBA;;;qCANkB;uBACN;2BACC;uBACI;AAGvB,MAAMA,wBAAwB;IACrCC,oBAAoB;IACpBC,mBAAmB;IACnBC,uBAAuB;IACvBC,sBAAsB;AAC1B;AAGW,SAASL,oBAAoBM,KAAK;IACzC,MAAM,EAAEC,GAAAA,EAAK,GAAGC,IAAAA,uCAAkB;IAClC;;;;;;;EAOJ,GAAM,MAAMC,sBAAuBC,CAAAA;QAC3B,MAAMC,oBAAoB,CAAC;QAC3B;;;;;;;;;;;IAWR,GACO,yCAAA;QACC,MAAMC,QAAQF,aAAaG,KAAK,CAAC,GAAGH,aAAaI,MAAM,GAAG;QAC1D,8FAAA;QACAF,MAAMG,OAAO,CAAC,CAACC,MAAMC;YACjBD,KAAKD,OAAO,CAAC,CAACG,KAAKC;gBACf,MAAMC,QAAQR,KAAK,CAACK,YAAY,EAAE,IAAIL,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,IAAIE,mBAAmBT,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACG,YAAY,EAAEJ,IAAII,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;QACA,IAAI2B,iBAAiB;YACjBF,MAAMK,IAAI,CAAC1B,QAAQ,QAAQN,sBAAsBE,iBAAiB,GAAGF,sBAAsBC,kBAAkB;QACjH;QACA,IAAI6B,mBAAmB;YACnBH,MAAMK,IAAI,CAAC1B,QAAQ,QAAQN,sBAAsBG,qBAAqB,GAAGH,sBAAsBI,oBAAoB;QACvH;QACA,IAAI2B,oBAAoB;YACpBJ,MAAMK,IAAI,CAAC1B,QAAQ,QAAQN,sBAAsBI,oBAAoB,GAAGJ,sBAAsBG,qBAAqB;QACvH;QACA,OAAO8B,IAAAA,mBAAY,KAAIN;IAC3B;IACA,MAAMP,qBAAqBA,CAACc,OAAOC,OAAOC,eAAeC;QACrD,MAAM,EAAEC,aAAa,EAAEC,cAAc,EAAEC,YAAAA,EAAc,GAAGnC;QACxD,8GAAA;QACA,MAAMoC,qBAAqBH,kBAAkBI,wBAAa,CAACC,QAAQ,GAAGD,wBAAa,CAACE,IAAI,GAAGN;QAC3F,0GAAA;QACA,MAAMO,YAAYC,IAAAA,wBAAiB,EAACZ,OAAOO,oBAAoBF,gBAAgBC;QAC/E,IAAIJ,kBAAkBC,eAAe;YACjC,2EAAA;YACA,OAAO;QACX,OAAO,IAAID,iBAAiBC,eAAe;YACvC,2EAAA;YACA,OAAO;QACX;QACA,6DAAA;QACA,OAAOQ,UAAUE,MAAM,CAAEC,CAAAA,OAAOA,KAAKC,OAAO,OAAOd,MAAMc,OAAO,IAAIpC,MAAM,GAAG;IACjF;IACA,OAAO;QACHL;QACAkB;KACH;AACL"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useWeeks.
|
1
|
+
{"version":3,"sources":["useWeeks.ts"],"sourcesContent":["import * as React from 'react';\nimport { compareDates, DAYS_IN_WEEK, getDayGrid } from '../../utils/index';\nimport { DayInfo } from './CalendarDayGrid';\nimport { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport function useWeeks(\n props: CalendarDayGridProps,\n onSelectDate: (date: Date) => void,\n getSetRefCallback: (dayKey: string) => (element: HTMLElement | null) => void,\n): DayInfo[][] {\n 'use no memo';\n\n /**\n * Initial parsing of the given props to generate IDayInfo two dimensional array, which contains a representation\n * of every day in the grid. Convenient for helping with conversions between day refs and Date objects in callbacks.\n */\n const weeks = React.useMemo((): DayInfo[][] => {\n const weeksGrid = getDayGrid(props);\n\n const firstVisibleDay = weeksGrid[1][0].originalDate;\n const lastVisibleDay = weeksGrid[weeksGrid.length - 1][6].originalDate;\n const markedDays = props.getMarkedDays?.(firstVisibleDay, lastVisibleDay) || [];\n\n /**\n * Weeks is a 2D array. Weeks[0] contains the last week of the prior range,\n * Weeks[weeks.length - 1] contains first week of next range. These are for transition states.\n *\n * Weeks[1... weeks.length - 2] contains the actual visible data\n */\n const returnValue: DayInfo[][] = [];\n\n for (let weekIndex = 0; weekIndex < weeksGrid.length; weekIndex++) {\n const week: DayInfo[] = [];\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const day = weeksGrid[weekIndex][dayIndex];\n const dayInfo: DayInfo = {\n onSelected: () => onSelectDate(day.originalDate),\n setRef: getSetRefCallback(day.key),\n ...day,\n isMarked: day.isMarked || markedDays?.some(markedDay => compareDates(day.originalDate, markedDay)),\n };\n\n week.push(dayInfo);\n }\n returnValue.push(week);\n }\n\n return returnValue;\n // TODO: this is missing deps on getSetRefCallback and onSelectDate (and depending on the entire\n // props object may not be a good idea due to likely frequent mutation). It would be easy to\n // fix getSetRefCallback to not mutate every render, but onSelectDate is passed down from\n // Calendar and trying to fix it requires a huge cascade of changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n\n return weeks;\n}\n"],"names":["useWeeks","props","onSelectDate","getSetRefCallback","weeks","React","useMemo","weeksGrid","getDayGrid","firstVisibleDay","originalDate","lastVisibleDay","length","markedDays","getMarkedDays","returnValue","weekIndex","week","dayIndex","DAYS_IN_WEEK","day","dayInfo","onSelected","setRef","key","isMarked","some","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ACR;YACZ;YACAN,YAAYc,IAAI,CAACZ;QACnB;QAEA,OAAOF;IACP,gGAAgG;IAChG,4FAA4F;IAC5F,yFAAyF;IACzF,oEAAoE;IACpE,uDAAuD;IACzD,GAAG;QAACd;KAAM;IAEV,OAAOG;AACT"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["CalendarMonth.js"],"sourcesContent":["import * as React from 'react';\nimport { Enter } from '@fluentui/keyboard-keys';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { mergeClasses } from '@griffel/react';\nimport { addYears, compareDatePart, getMonthEnd, getMonthStart, getYearEnd, getYearStart, setMonth, DEFAULT_DATE_FORMATTING } from '../../utils';\nimport { CalendarYear } from '../CalendarYear/CalendarYear';\nimport { useCalendarMonthStyles_unstable } from './useCalendarMonthStyles.styles';\nconst MONTHS_PER_ROW = 4;\nfunction useAnimateBackwards({ navigatedDate }) {\n const currentYear = navigatedDate.getFullYear();\n const previousYearRef = React.useRef();\n React.useEffect(()=>{\n previousYearRef.current = currentYear;\n });\n const previousYear = previousYearRef.current;\n if (previousYear === undefined || previousYear === currentYear) {\n return undefined;\n } else {\n return previousYear > currentYear;\n }\n}\nfunction useFocusLogic({ componentRef }) {\n const navigatedMonthRef = React.useRef(null);\n const calendarYearRef = React.useRef(null);\n const focusOnUpdate = React.useRef(false);\n const focus = React.useCallback(()=>{\n if (calendarYearRef.current) {\n calendarYearRef.current.focus();\n } else if (navigatedMonthRef.current) {\n navigatedMonthRef.current.focus();\n }\n }, []);\n React.useImperativeHandle(componentRef, ()=>({\n focus\n }), [\n focus\n ]);\n React.useEffect(()=>{\n if (focusOnUpdate.current) {\n focus();\n focusOnUpdate.current = false;\n }\n });\n const focusOnNextUpdate = ()=>{\n focusOnUpdate.current = true;\n };\n return [\n navigatedMonthRef,\n calendarYearRef,\n focusOnNextUpdate\n ];\n}\n/**\n * @internal\n */ export const CalendarMonth = (props)=>{\n const { allFocusable, animationDirection, className, componentRef, dateTimeFormatter = DEFAULT_DATE_FORMATTING, highlightCurrentMonth, highlightSelectedMonth, maxDate, minDate, navigatedDate, navigationIcons, onHeaderSelect: onUserHeaderSelect, onNavigateDate, selectedDate, strings, today = new Date(), yearPickerHidden = false } = props;\n const [navigatedMonthRef, calendarYearRef, focusOnNextUpdate] = useFocusLogic({\n componentRef\n });\n const [isYearPickerVisible, setIsYearPickerVisible] = React.useState(false);\n const animateBackwards = useAnimateBackwards({\n navigatedDate\n });\n const selectMonthCallback = (newMonth)=>{\n return ()=>onSelectMonth(newMonth);\n };\n const onSelectNextYear = ()=>{\n onNavigateDate(addYears(navigatedDate, 1), false);\n };\n const onSelectPrevYear = ()=>{\n onNavigateDate(addYears(navigatedDate, -1), false);\n };\n const onSelectMonth = (newMonth)=>{\n // If header is clickable the calendars are overlayed, switch back to day picker when month is clicked\n onUserHeaderSelect === null || onUserHeaderSelect === void 0 ? void 0 : onUserHeaderSelect();\n onNavigateDate(setMonth(navigatedDate, newMonth), true);\n };\n const onHeaderSelect = ()=>{\n if (!yearPickerHidden) {\n focusOnNextUpdate();\n setIsYearPickerVisible(true);\n } else {\n onUserHeaderSelect === null || onUserHeaderSelect === void 0 ? void 0 : onUserHeaderSelect();\n }\n };\n const onSelectYear = (selectedYear)=>{\n focusOnNextUpdate();\n const navYear = navigatedDate.getFullYear();\n if (navYear !== selectedYear) {\n let newNavigationDate = new Date(navigatedDate.getTime());\n newNavigationDate.setFullYear(selectedYear);\n // for min and max dates, adjust the new navigation date - perhaps this should be\n // checked on the master navigation date handler (i.e. in Calendar)\n if (maxDate && newNavigationDate > maxDate) {\n newNavigationDate = setMonth(newNavigationDate, maxDate.getMonth());\n } else if (minDate && newNavigationDate < minDate) {\n newNavigationDate = setMonth(newNavigationDate, minDate.getMonth());\n }\n onNavigateDate(newNavigationDate, true);\n }\n setIsYearPickerVisible(false);\n };\n const onYearPickerHeaderSelect = (focus)=>{\n focusOnNextUpdate();\n setIsYearPickerVisible(false);\n };\n const dateFormatter = dateTimeFormatter;\n // determine if previous/next years are in bounds\n const isPrevYearInBounds = minDate ? compareDatePart(minDate, getYearStart(navigatedDate)) < 0 : true;\n const isNextYearInBounds = maxDate ? compareDatePart(getYearEnd(navigatedDate), maxDate) < 0 : true;\n const classNames = useCalendarMonthStyles_unstable({\n className,\n hasHeaderClickCallback: !!onUserHeaderSelect || !yearPickerHidden,\n highlightCurrent: highlightCurrentMonth,\n highlightSelected: highlightSelectedMonth,\n animateBackwards,\n animationDirection\n });\n const arrowNavigationAttributes = useArrowNavigationGroup({\n axis: 'grid'\n });\n if (isYearPickerVisible) {\n const [onRenderYear, yearStrings] = getYearStrings({\n dateTimeFormatter,\n navigatedDate,\n strings\n });\n // use navigated date for the year picker\n return /*#__PURE__*/ React.createElement(CalendarYear, {\n key: 'calendarYear',\n minYear: minDate ? minDate.getFullYear() : undefined,\n maxYear: maxDate ? maxDate.getFullYear() : undefined,\n // eslint-disable-next-line react/jsx-no-bind\n onSelectYear: onSelectYear,\n // eslint-disable-next-line react/jsx-no-bind\n onHeaderSelect: onYearPickerHeaderSelect,\n selectedYear: selectedDate ? selectedDate.getFullYear() : navigatedDate ? navigatedDate.getFullYear() : undefined,\n navigatedYear: navigatedDate.getFullYear(),\n navigationIcons: navigationIcons,\n onRenderYear: onRenderYear,\n strings: yearStrings,\n componentRef: calendarYearRef,\n highlightCurrentYear: highlightCurrentMonth,\n highlightSelectedYear: highlightSelectedMonth,\n animationDirection: animationDirection\n });\n }\n const rowIndexes = [];\n for(let i = 0; i < strings.shortMonths.length / MONTHS_PER_ROW; i++){\n rowIndexes.push(i);\n }\n const yearString = dateFormatter.formatYear(navigatedDate);\n const headerAriaLabel = strings.monthPickerHeaderAriaLabel ? strings.monthPickerHeaderAriaLabel.replace('{0}', yearString) : yearString;\n return /*#__PURE__*/ React.createElement(\"div\", {\n className: classNames.root\n }, /*#__PURE__*/ React.createElement(\"div\", {\n className: classNames.headerContainer\n }, /*#__PURE__*/ React.createElement(\"button\", {\n className: classNames.currentItemButton,\n onClick: onHeaderSelect,\n onKeyDown: onButtonKeyDown(onHeaderSelect),\n \"aria-label\": headerAriaLabel,\n tabIndex: !!onUserHeaderSelect || !yearPickerHidden ? 0 : -1,\n type: \"button\"\n }, /*#__PURE__*/ React.createElement(\"span\", {\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\"\n }, yearString)), /*#__PURE__*/ React.createElement(\"div\", {\n className: classNames.navigationButtonsContainer\n }, /*#__PURE__*/ React.createElement(\"button\", {\n className: mergeClasses(classNames.navigationButton, !isPrevYearInBounds && classNames.disabled),\n \"aria-disabled\": !isPrevYearInBounds,\n tabIndex: isPrevYearInBounds ? undefined : allFocusable ? 0 : -1,\n onClick: isPrevYearInBounds ? onSelectPrevYear : undefined,\n onKeyDown: isPrevYearInBounds ? onButtonKeyDown(onSelectPrevYear) : undefined,\n title: strings.prevYearAriaLabel ? strings.prevYearAriaLabel + ' ' + dateFormatter.formatYear(addYears(navigatedDate, -1)) : undefined,\n type: \"button\"\n }, navigationIcons.upNavigation), /*#__PURE__*/ React.createElement(\"button\", {\n className: mergeClasses(classNames.navigationButton, !isNextYearInBounds && classNames.disabled),\n \"aria-disabled\": !isNextYearInBounds,\n tabIndex: isNextYearInBounds ? undefined : allFocusable ? 0 : -1,\n onClick: isNextYearInBounds ? onSelectNextYear : undefined,\n onKeyDown: isNextYearInBounds ? onButtonKeyDown(onSelectNextYear) : undefined,\n title: strings.nextYearAriaLabel ? strings.nextYearAriaLabel + ' ' + dateFormatter.formatYear(addYears(navigatedDate, 1)) : undefined,\n type: \"button\"\n }, navigationIcons.downNavigation))), /*#__PURE__*/ React.createElement(\"div\", {\n ...arrowNavigationAttributes,\n className: classNames.gridContainer,\n role: \"grid\",\n \"aria-label\": yearString\n }, rowIndexes.map((rowNum)=>{\n const monthsForRow = strings.shortMonths.slice(rowNum * MONTHS_PER_ROW, (rowNum + 1) * MONTHS_PER_ROW);\n return /*#__PURE__*/ React.createElement(\"div\", {\n key: 'monthRow_' + rowNum + navigatedDate.getFullYear(),\n role: \"row\",\n className: classNames.buttonRow\n }, monthsForRow.map((month, index)=>{\n const monthIndex = rowNum * MONTHS_PER_ROW + index;\n const indexedMonth = setMonth(navigatedDate, monthIndex);\n const isNavigatedMonth = navigatedDate.getMonth() === monthIndex;\n const isSelectedMonth = selectedDate.getMonth() === monthIndex;\n const isSelectedYear = selectedDate.getFullYear() === navigatedDate.getFullYear();\n const isInBounds = (minDate ? compareDatePart(minDate, getMonthEnd(indexedMonth)) < 1 : true) && (maxDate ? compareDatePart(getMonthStart(indexedMonth), maxDate) < 1 : true);\n return /*#__PURE__*/ React.createElement(\"button\", {\n ref: isNavigatedMonth ? navigatedMonthRef : undefined,\n role: 'gridcell',\n className: mergeClasses(classNames.itemButton, highlightCurrentMonth && isCurrentMonth(monthIndex, navigatedDate.getFullYear(), today) && classNames.current, highlightSelectedMonth && isSelectedMonth && isSelectedYear && classNames.selected, !isInBounds && classNames.disabled),\n disabled: !allFocusable && !isInBounds,\n key: monthIndex,\n onClick: isInBounds ? selectMonthCallback(monthIndex) : undefined,\n onKeyDown: isInBounds ? onButtonKeyDown(selectMonthCallback(monthIndex)) : undefined,\n \"aria-label\": dateFormatter.formatMonth(indexedMonth, strings),\n \"aria-selected\": isNavigatedMonth,\n tabIndex: isInBounds ? 0 : -1,\n type: \"button\"\n }, month);\n }));\n })));\n};\nCalendarMonth.displayName = 'CalendarMonth';\nfunction getYearStrings({ dateTimeFormatter, navigatedDate, strings }) {\n const yearToString = (year)=>{\n if (dateTimeFormatter) {\n // create a date based on the current nav date\n const yearFormattingDate = new Date(navigatedDate.getTime());\n yearFormattingDate.setFullYear(year);\n return dateTimeFormatter.formatYear(yearFormattingDate);\n }\n return String(year);\n };\n const yearRangeToString = (yearRange)=>{\n return `${yearToString(yearRange.fromYear)} - ${yearToString(yearRange.toYear)}`;\n };\n const yearRangeToNextDecadeLabel = (yearRange)=>{\n return strings.nextYearRangeAriaLabel ? `${strings.nextYearRangeAriaLabel} ${yearRangeToString(yearRange)}` : '';\n };\n const yearRangeToPrevDecadeLabel = (yearRange)=>{\n return strings.prevYearRangeAriaLabel ? `${strings.prevYearRangeAriaLabel} ${yearRangeToString(yearRange)}` : '';\n };\n return [\n yearToString,\n {\n rangeAriaLabel: yearRangeToString,\n prevRangeAriaLabel: yearRangeToPrevDecadeLabel,\n nextRangeAriaLabel: yearRangeToNextDecadeLabel,\n headerAriaLabelFormatString: strings.yearPickerHeaderAriaLabel\n }\n ];\n}\nfunction isCurrentMonth(month, year, today) {\n return today.getFullYear() === year && today.getMonth() === month;\n}\nfunction onButtonKeyDown(callback) {\n return (ev)=>{\n switch(ev.key){\n case Enter:\n callback();\n break;\n }\n };\n}\n"],"names":["CalendarMonth","MONTHS_PER_ROW","useAnimateBackwards","navigatedDate","currentYear","getFullYear","previousYearRef","React","useRef","useEffect","current","previousYear","undefined","useFocusLogic","componentRef","navigatedMonthRef","calendarYearRef","focusOnUpdate","focus","useCallback","useImperativeHandle","focusOnNextUpdate","props","allFocusable","animationDirection","className","dateTimeFormatter","DEFAULT_DATE_FORMATTING","highlightCurrentMonth","highlightSelectedMonth","maxDate","minDate","navigationIcons","onHeaderSelect","onUserHeaderSelect","onNavigateDate","selectedDate","strings","today","Date","yearPickerHidden","isYearPickerVisible","setIsYearPickerVisible","useState","animateBackwards","selectMonthCallback","newMonth","onSelectMonth","onSelectNextYear","addYears","onSelectPrevYear","setMonth","onSelectYear","selectedYear","navYear","newNavigationDate","getTime","setFullYear","getMonth","onYearPickerHeaderSelect","dateFormatter","isPrevYearInBounds","compareDatePart","getYearStart","isNextYearInBounds","getYearEnd","classNames","useCalendarMonthStyles_unstable","hasHeaderClickCallback","highlightCurrent","highlightSelected","arrowNavigationAttributes","useArrowNavigationGroup","axis","onRenderYear","yearStrings","getYearStrings","createElement","CalendarYear","key","minYear","maxYear","navigatedYear","highlightCurrentYear","highlightSelectedYear","rowIndexes","i","shortMonths","length","push","yearString","formatYear","headerAriaLabel","monthPickerHeaderAriaLabel","replace","root","headerContainer","currentItemButton","onClick","onKeyDown","onButtonKeyDown","tabIndex","type","navigationButtonsContainer","mergeClasses","navigationButton","disabled","title","prevYearAriaLabel","upNavigation","nextYearAriaLabel","downNavigation","gridContainer","role","map","rowNum","monthsForRow","slice","buttonRow","month","index","monthIndex","indexedMonth","isNavigatedMonth","isSelectedMonth","isSelectedYear","isInBounds","getMonthEnd","getMonthStart","ref","itemButton","isCurrentMonth","selected","formatMonth","displayName","yearToString","year","yearFormattingDate","String","yearRangeToString","yearRange","fromYear","toYear","yearRangeToNextDecadeLabel","nextYearRangeAriaLabel","yearRangeToPrevDecadeLabel","prevYearRangeAriaLabel","rangeAriaLabel","prevRangeAriaLabel","nextRangeAriaLabel","headerAriaLabelFormatString","yearPickerHeaderAriaLabel","callback","ev","Enter"],"mappings":";;;;+BAsDiBA;;;eAAAA;;;;iEAtDM;8BACD;8BACkB;wBACX;uBACsG;8BACtG;8CACmB;AAChD,MAAMC,iBAAiB;AACvB,SAASC,oBAAoB,EAAEC,aAAa,EAAE;IAC1C,MAAMC,cAAcD,cAAcE,WAAW;IAC7C,MAAMC,kBAAkBC,OAAMC,MAAM;IACpCD,OAAME,SAAS,CAAC;QACZH,gBAAgBI,OAAO,GAAGN;IAC9B;IACA,MAAMO,eAAeL,gBAAgBI,OAAO;IAC5C,IAAIC,iBAAiBC,aAAaD,iBAAiBP,aAAa;QAC5D,OAAOQ;IACX,OAAO;QACH,OAAOD,eAAeP;IAC1B;AACJ;AACA,SAASS,cAAc,EAAEC,YAAY,EAAE;IACnC,MAAMC,oBAAoBR,OAAMC,MAAM,CAAC;IACvC,MAAMQ,kBAAkBT,OAAMC,MAAM,CAAC;IACrC,MAAMS,gBAAgBV,OAAMC,MAAM,CAAC;IACnC,MAAMU,QAAQX,OAAMY,WAAW,CAAC;QAC5B,IAAIH,gBAAgBN,OAAO,EAAE;YACzBM,gBAAgBN,OAAO,CAACQ,KAAK;QACjC,OAAO,IAAIH,kBAAkBL,OAAO,E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D,QAAQ;IAC7B,OAAO,CAACC;QACJ,OAAOA,GAAG1E,GAAG;YACT,KAAK2E,mBAAK;gBACNF;gBACA;QACR;IACJ;AACJ"}
|
1
|
+
{"version":3,"sources":["CalendarMonth.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Enter } from '@fluentui/keyboard-keys';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { mergeClasses } from '@griffel/react';\nimport {\n addYears,\n compareDatePart,\n getMonthEnd,\n getMonthStart,\n getYearEnd,\n getYearStart,\n setMonth,\n DEFAULT_DATE_FORMATTING,\n} from '../../utils';\nimport { CalendarYear } from '../CalendarYear/CalendarYear';\nimport { useCalendarMonthStyles_unstable } from './useCalendarMonthStyles.styles';\nimport type { CalendarMonthProps } from './CalendarMonth.types';\nimport type { CalendarYearRange, ICalendarYear } from '../CalendarYear/CalendarYear.types';\n\nconst MONTHS_PER_ROW = 4;\n\nfunction useAnimateBackwards({ navigatedDate }: { navigatedDate: CalendarMonthProps['navigatedDate'] }) {\n const currentYear = navigatedDate.getFullYear();\n\n const previousYearRef = React.useRef<number | undefined>();\n React.useEffect(() => {\n previousYearRef.current = currentYear;\n });\n const previousYear = previousYearRef.current;\n\n if (previousYear === undefined || previousYear === currentYear) {\n return undefined;\n } else {\n return previousYear > currentYear;\n }\n}\n\nfunction useFocusLogic({ componentRef }: { componentRef: CalendarMonthProps['componentRef'] }) {\n const navigatedMonthRef = React.useRef<HTMLButtonElement>(null);\n const calendarYearRef = React.useRef<ICalendarYear>(null);\n const focusOnUpdate = React.useRef(false);\n\n const focus = React.useCallback(() => {\n if (calendarYearRef.current) {\n calendarYearRef.current.focus();\n } else if (navigatedMonthRef.current) {\n navigatedMonthRef.current.focus();\n }\n }, []);\n\n React.useImperativeHandle(componentRef, () => ({ focus }), [focus]);\n\n React.useEffect(() => {\n if (focusOnUpdate.current) {\n focus();\n focusOnUpdate.current = false;\n }\n });\n\n const focusOnNextUpdate = () => {\n focusOnUpdate.current = true;\n };\n\n return [navigatedMonthRef, calendarYearRef, focusOnNextUpdate] as const;\n}\n\n/**\n * @internal\n */\nexport const CalendarMonth: React.FunctionComponent<CalendarMonthProps> = props => {\n const {\n allFocusable,\n animationDirection,\n className,\n componentRef,\n dateTimeFormatter = DEFAULT_DATE_FORMATTING,\n highlightCurrentMonth,\n highlightSelectedMonth,\n maxDate,\n minDate,\n navigatedDate,\n navigationIcons,\n onHeaderSelect: onUserHeaderSelect,\n onNavigateDate,\n selectedDate,\n strings,\n today = new Date(),\n yearPickerHidden = false,\n } = props;\n\n const [navigatedMonthRef, calendarYearRef, focusOnNextUpdate] = useFocusLogic({ componentRef });\n const [isYearPickerVisible, setIsYearPickerVisible] = React.useState(false);\n\n const animateBackwards = useAnimateBackwards({ navigatedDate });\n\n const selectMonthCallback = (newMonth: number): (() => void) => {\n return () => onSelectMonth(newMonth);\n };\n\n const onSelectNextYear = (): void => {\n onNavigateDate(addYears(navigatedDate, 1), false);\n };\n\n const onSelectPrevYear = (): void => {\n onNavigateDate(addYears(navigatedDate, -1), false);\n };\n\n const onSelectMonth = (newMonth: number): void => {\n // If header is clickable the calendars are overlayed, switch back to day picker when month is clicked\n onUserHeaderSelect?.();\n onNavigateDate(setMonth(navigatedDate, newMonth), true);\n };\n\n const onHeaderSelect = (): void => {\n if (!yearPickerHidden) {\n focusOnNextUpdate();\n setIsYearPickerVisible(true);\n } else {\n onUserHeaderSelect?.();\n }\n };\n\n const onSelectYear = (selectedYear: number) => {\n focusOnNextUpdate();\n const navYear = navigatedDate.getFullYear();\n if (navYear !== selectedYear) {\n let newNavigationDate = new Date(navigatedDate.getTime());\n newNavigationDate.setFullYear(selectedYear);\n // for min and max dates, adjust the new navigation date - perhaps this should be\n // checked on the master navigation date handler (i.e. in Calendar)\n if (maxDate && newNavigationDate > maxDate) {\n newNavigationDate = setMonth(newNavigationDate, maxDate.getMonth());\n } else if (minDate && newNavigationDate < minDate) {\n newNavigationDate = setMonth(newNavigationDate, minDate.getMonth());\n }\n onNavigateDate(newNavigationDate, true);\n }\n setIsYearPickerVisible(false);\n };\n\n const onYearPickerHeaderSelect = (focus: boolean): void => {\n focusOnNextUpdate();\n setIsYearPickerVisible(false);\n };\n\n const dateFormatter = dateTimeFormatter!;\n\n // determine if previous/next years are in bounds\n const isPrevYearInBounds = minDate ? compareDatePart(minDate, getYearStart(navigatedDate)) < 0 : true;\n const isNextYearInBounds = maxDate ? compareDatePart(getYearEnd(navigatedDate), maxDate) < 0 : true;\n\n const classNames = useCalendarMonthStyles_unstable({\n className,\n hasHeaderClickCallback: !!onUserHeaderSelect || !yearPickerHidden,\n highlightCurrent: highlightCurrentMonth,\n highlightSelected: highlightSelectedMonth,\n animateBackwards,\n animationDirection,\n });\n\n const arrowNavigationAttributes = useArrowNavigationGroup({ axis: 'grid' });\n\n if (isYearPickerVisible) {\n const [onRenderYear, yearStrings] = getYearStrings({ dateTimeFormatter, navigatedDate, strings });\n // use navigated date for the year picker\n return (\n <CalendarYear\n key={'calendarYear'}\n minYear={minDate ? minDate.getFullYear() : undefined}\n maxYear={maxDate ? maxDate.getFullYear() : undefined}\n // eslint-disable-next-line react/jsx-no-bind\n onSelectYear={onSelectYear}\n // eslint-disable-next-line react/jsx-no-bind\n onHeaderSelect={onYearPickerHeaderSelect}\n selectedYear={\n selectedDate ? selectedDate.getFullYear() : navigatedDate ? navigatedDate.getFullYear() : undefined\n }\n navigatedYear={navigatedDate.getFullYear()}\n navigationIcons={navigationIcons}\n onRenderYear={onRenderYear}\n strings={yearStrings}\n componentRef={calendarYearRef}\n highlightCurrentYear={highlightCurrentMonth}\n highlightSelectedYear={highlightSelectedMonth}\n animationDirection={animationDirection}\n />\n );\n }\n\n const rowIndexes = [];\n for (let i = 0; i < strings.shortMonths.length / MONTHS_PER_ROW; i++) {\n rowIndexes.push(i);\n }\n\n const yearString = dateFormatter.formatYear(navigatedDate);\n const headerAriaLabel = strings.monthPickerHeaderAriaLabel\n ? strings.monthPickerHeaderAriaLabel.replace('{0}', yearString)\n : yearString;\n\n return (\n <div className={classNames.root}>\n <div className={classNames.headerContainer}>\n <button\n className={classNames.currentItemButton}\n onClick={onHeaderSelect}\n onKeyDown={onButtonKeyDown(onHeaderSelect)}\n aria-label={headerAriaLabel}\n tabIndex={!!onUserHeaderSelect || !yearPickerHidden ? 0 : -1}\n type=\"button\"\n >\n <span aria-live=\"polite\" aria-atomic=\"true\">\n {yearString}\n </span>\n </button>\n <div className={classNames.navigationButtonsContainer}>\n <button\n className={mergeClasses(classNames.navigationButton, !isPrevYearInBounds && classNames.disabled)}\n aria-disabled={!isPrevYearInBounds}\n tabIndex={isPrevYearInBounds ? undefined : allFocusable ? 0 : -1}\n onClick={isPrevYearInBounds ? onSelectPrevYear : undefined}\n onKeyDown={isPrevYearInBounds ? onButtonKeyDown(onSelectPrevYear) : undefined}\n title={\n strings.prevYearAriaLabel\n ? strings.prevYearAriaLabel + ' ' + dateFormatter.formatYear(addYears(navigatedDate, -1))\n : undefined\n }\n type=\"button\"\n >\n {navigationIcons.upNavigation}\n </button>\n <button\n className={mergeClasses(classNames.navigationButton, !isNextYearInBounds && classNames.disabled)}\n aria-disabled={!isNextYearInBounds}\n tabIndex={isNextYearInBounds ? undefined : allFocusable ? 0 : -1}\n onClick={isNextYearInBounds ? onSelectNextYear : undefined}\n onKeyDown={isNextYearInBounds ? onButtonKeyDown(onSelectNextYear) : undefined}\n title={\n strings.nextYearAriaLabel\n ? strings.nextYearAriaLabel + ' ' + dateFormatter.formatYear(addYears(navigatedDate, 1))\n : undefined\n }\n type=\"button\"\n >\n {navigationIcons.downNavigation}\n </button>\n </div>\n </div>\n <div {...arrowNavigationAttributes} className={classNames.gridContainer} role=\"grid\" aria-label={yearString}>\n {rowIndexes.map((rowNum: number) => {\n const monthsForRow = strings!.shortMonths.slice(rowNum * MONTHS_PER_ROW, (rowNum + 1) * MONTHS_PER_ROW);\n return (\n <div key={'monthRow_' + rowNum + navigatedDate.getFullYear()} role=\"row\" className={classNames.buttonRow}>\n {monthsForRow.map((month: string, index: number) => {\n const monthIndex = rowNum * MONTHS_PER_ROW + index;\n const indexedMonth = setMonth(navigatedDate, monthIndex);\n const isNavigatedMonth = navigatedDate.getMonth() === monthIndex;\n const isSelectedMonth = selectedDate.getMonth() === monthIndex;\n const isSelectedYear = selectedDate.getFullYear() === navigatedDate.getFullYear();\n const isInBounds =\n (minDate ? compareDatePart(minDate, getMonthEnd(indexedMonth)) < 1 : true) &&\n (maxDate ? compareDatePart(getMonthStart(indexedMonth), maxDate) < 1 : true);\n\n return (\n <button\n ref={isNavigatedMonth ? navigatedMonthRef : undefined}\n role={'gridcell'}\n className={mergeClasses(\n classNames.itemButton,\n highlightCurrentMonth &&\n isCurrentMonth(monthIndex, navigatedDate.getFullYear(), today) &&\n classNames.current,\n highlightSelectedMonth && isSelectedMonth && isSelectedYear && classNames.selected,\n !isInBounds && classNames.disabled,\n )}\n disabled={!allFocusable && !isInBounds}\n key={monthIndex}\n onClick={isInBounds ? selectMonthCallback(monthIndex) : undefined}\n onKeyDown={isInBounds ? onButtonKeyDown(selectMonthCallback(monthIndex)) : undefined}\n aria-label={dateFormatter.formatMonth(indexedMonth, strings!)}\n aria-selected={isNavigatedMonth}\n tabIndex={isInBounds ? 0 : -1}\n type=\"button\"\n >\n {month}\n </button>\n );\n })}\n </div>\n );\n })}\n </div>\n </div>\n );\n};\nCalendarMonth.displayName = 'CalendarMonth';\n\nfunction getYearStrings({\n dateTimeFormatter,\n navigatedDate,\n strings,\n}: Pick<CalendarMonthProps, 'dateTimeFormatter' | 'navigatedDate' | 'strings'>) {\n const yearToString = (year: number) => {\n if (dateTimeFormatter) {\n // create a date based on the current nav date\n const yearFormattingDate = new Date(navigatedDate.getTime());\n yearFormattingDate.setFullYear(year);\n return dateTimeFormatter.formatYear(yearFormattingDate);\n }\n return String(year);\n };\n\n const yearRangeToString = (yearRange: CalendarYearRange) => {\n return `${yearToString(yearRange.fromYear)} - ${yearToString(yearRange.toYear)}`;\n };\n\n const yearRangeToNextDecadeLabel = (yearRange: CalendarYearRange) => {\n return strings.nextYearRangeAriaLabel ? `${strings.nextYearRangeAriaLabel} ${yearRangeToString(yearRange)}` : '';\n };\n\n const yearRangeToPrevDecadeLabel = (yearRange: CalendarYearRange) => {\n return strings.prevYearRangeAriaLabel ? `${strings.prevYearRangeAriaLabel} ${yearRangeToString(yearRange)}` : '';\n };\n\n return [\n yearToString,\n {\n rangeAriaLabel: yearRangeToString,\n prevRangeAriaLabel: yearRangeToPrevDecadeLabel,\n nextRangeAriaLabel: yearRangeToNextDecadeLabel,\n headerAriaLabelFormatString: strings.yearPickerHeaderAriaLabel,\n } as const,\n ] as const;\n}\n\nfunction isCurrentMonth(month: number, year: number, today: Date): boolean {\n return today.getFullYear() === year && today.getMonth() === month;\n}\n\nfunction onButtonKeyDown(callback: () => void): (ev: React.KeyboardEvent<HTMLButtonElement>) => void {\n return (ev: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (ev.key) {\n case Enter:\n callback();\n break;\n }\n };\n}\n"],"names":["CalendarMonth","MONTHS_PER_ROW","useAnimateBackwards","navigatedDate","currentYear","getFullYear","previousYearRef","React","useRef","useEffect","current","previousYear","undefined","useFocusLogic","componentRef","navigatedMonthRef","calendarYearRef","focusOnUpdate","focus","useCallback","useImperativeHandle","focusOnNextUpdate","props","allFocusable","animationDirection","className","dateTimeFormatter","DEFAULT_DATE_FORMATTING","highlightCurrentMonth","highlightSelectedMonth","maxDate","minDate","navigationIcons","onHeaderSelect","onUserHeaderSelect","onNavigateDate","selectedDate","strings","today","Date","yearPickerHidden","isYearPickerVisible","setIsYearPickerVisible","useState","animateBackwards","selectMonthCallback","newMonth","onSelectMonth","onSelectNextYear","addYears","onSelectPrevYear","setMonth","onSelectYear","selectedYear","navYear","newNavigationDate","getTime","setFullYear","getMonth","onYearPickerHeaderSelect","dateFormatter","isPrevYearInBounds","compareDatePart","getYearStart","isNextYearInBounds","getYearEnd","classNames","useCalendarMonthStyles_unstable","hasHeaderClickCallback","highlightCurrent","highlightSelected","arrowNavigationAttributes","useArrowNavigationGroup","axis","onRenderYear","yearStrings","getYearStrings","createElement","CalendarYear","key","minYear","maxYear","navigatedYear","highlightCurrentYear","highlightSelectedYear","rowIndexes","i","shortMonths","length","push","yearString","formatYear","headerAriaLabel","monthPickerHeaderAriaLabel","replace","div","root","headerContainer","button","currentItemButton","onClick","onKeyDown","onButtonKeyDown","aria-label","tabIndex","type","span","aria-live","aria-atomic","navigationButtonsContainer","mergeClasses","navigationButton","disabled","aria-disabled","title","prevYearAriaLabel","upNavigation","nextYearAriaLabel","downNavigation","gridContainer","role","map","rowNum","monthsForRow","slice","buttonRow","month","index","monthIndex","indexedMonth","isNavigatedMonth","isSelectedMonth","isSelectedYear","isInBounds","getMonthEnd","getMonthStart","ref","itemButton","isCurrentMonth","selected","formatMonth","aria-selected","displayName","yearToString","year","yearFormattingDate","String","yearRangeToString","yearRange","fromYear","toYear","yearRangeToNextDecadeLabel","nextYearRangeAriaLabel","yearRangeToPrevDecadeLabel","prevYearRangeAriaLabel","rangeAriaLabel","prevRangeAriaLabel","nextRangeAriaLabel","headerAriaLabelFormatString","yearPickerHeaderAriaLabel","callback","ev","Enter"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAqEaA;;;eAAAA;;;;iEArEU;8BACD;8BACkB;wBACX;uBAUtB;8BACsB;8CACmB;AAIhD,MAAMC,iBAAiB;AAEvB,SAASC,oBAAoB,EAAEC,aAAa,EAA0D;IACpG,MAAMC,cAAcD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,sBAAsB,GAAG,CAAC,EAAEnH,QAAQmH,sBAAsB,CAAC,CAAC,EAAEL,kBAAkBC,WAAW,CAAC,GAAG;IAChH;IAEA,MAAMK,6BAA6B,CAACL;QAClC,OAAO/G,QAAQqH,sBAAsB,GAAG,CAAC,EAAErH,QAAQqH,sBAAsB,CAAC,CAAC,EAAEP,kBAAkBC,WAAW,CAAC,GAAG;IAChH;IAEA,OAAO;QACLL;QACA;YACEY,gBAAgBR;YAChBS,oBAAoBH;YACpBI,oBAAoBN;YACpBO,6BAA6BzH,QAAQ0H,yBAAyB;QAChE;KACD;AACH;AAEA,SAASrB,eAAeZ,KAAa,EAAEkB,IAAY,EAAE1G,KAAW;IAC9D,OAAOA,MAAMjC,WAAW,OAAO2I,QAAQ1G,MAAMoB,QAAQ,OAAOoE;AAC9D;AAEA,SAASxB,gBAAgB0D,QAAoB;IAC3C,OAAO,CAACC;QACN,OAAQA,GAAGlF,GAAG;YACZ,KAAKmF,mBAAAA;gBACHF;gBACA;QACJ;IACF;AACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["CalendarMonth.types.
|
1
|
+
{"version":3,"sources":["CalendarMonth.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { CalendarNavigationIcons } from '../Calendar/calendarNavigationIcons';\nimport type { CalendarStrings, DateFormatting } from '../../utils';\nimport type { CalendarPickerStyleProps, CalendarPickerStyles } from '../CalendarPicker/CalendarPicker.types';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ICalendarMonth {\n focus(): void;\n}\n\nexport interface CalendarMonthProps {\n /**\n * Optional callback to access the ICalendarMonth interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<ICalendarMonth>;\n\n /**\n * Localized strings to use in the Calendar\n */\n strings: CalendarStrings;\n\n /**\n * The currently selected date\n */\n selectedDate: Date;\n\n /**\n * The currently navigated date\n */\n navigatedDate: Date;\n\n /**\n * Callback issued when a month is selected\n * @param date - The date the user selected\n * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set\n * for the component.\n */\n onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;\n\n /**\n * Callback issued when the year is navigated\n * @param date - The date that is navigated to\n * @param focusOnNavigatedDay - Whether to set the focus to the navigated date.\n */\n onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;\n\n /**\n * Value of today. If unspecified, current time in client machine will be used.\n */\n today?: Date;\n\n /**\n * Callback function when the header is selected\n */\n onHeaderSelect?: () => void;\n\n /**\n * Apply additional formatting to dates, for example localized date formatting.\n */\n dateTimeFormatter?: DateFormatting;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date earlier than this value.\n */\n minDate?: Date;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date later than this value.\n */\n maxDate?: Date;\n\n /**\n * Whether the month picker should highlight the current month\n * @default false\n */\n highlightCurrentMonth?: boolean;\n\n /**\n * Whether the month picker should highlight the selected month\n * @default false\n */\n highlightSelectedMonth?: boolean;\n\n /**\n * Allows all dates and buttons to be focused, including disabled ones\n * @default false\n */\n allFocusable?: boolean;\n\n /**\n * Additional CSS class(es) to apply to the CalendarMonth.\n */\n className?: string;\n\n /**\n * Whether the year picker is hidden\n * @default false\n */\n yearPickerHidden?: boolean;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or veritcal\n */\n animationDirection?: AnimationDirection;\n\n /**\n * Custom navigation icons.\n */\n navigationIcons: CalendarNavigationIcons;\n}\n\n/**\n * @internal\n */\nexport interface CalendarMonthStyleProps extends CalendarPickerStyleProps {}\n\n/**\n * @internal\n */\nexport interface CalendarMonthStyles extends CalendarPickerStyles {}\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './CalendarMonth';\nexport * from './CalendarMonth.types';\nexport * from './useCalendarMonthStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCalendarMonthStyles.styles.js"],"sourcesContent":["import { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\n/**\n * @internal\n *\n * Apply styling to the CalendarMonth slots based on the state\n
|
1
|
+
{"version":3,"sources":["useCalendarMonthStyles.styles.js"],"sourcesContent":["import { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\n/**\n * @internal\n *\n * Apply styling to the CalendarMonth slots based on the state\n */ export const useCalendarMonthStyles_unstable = (props)=>{\n 'use no memo';\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarMonthStyles_unstable","props","useCalendarPickerStyles_unstable"],"rangeMappings":";;;;;;;;;;;;;;","mappings":";;;;+BAKiBA;;;eAAAA;;;+CALgC;AAKtC,MAAMA,kCAAmCC,CAAAA;IAChD;IACA,OAAOC,IAAAA,+DAAgC,EAACD;AAC5C"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
1
|
+
{"version":3,"sources":["CalendarPicker.types.ts"],"sourcesContent":["import { AnimationDirection } from '../Calendar/Calendar.types';\n\n/**\n * @internal\n */\nexport interface CalendarPickerStyleProps {\n /**\n * Accept custom classNames\n */\n className?: string;\n\n /**\n * Whether the header can be clicked\n */\n hasHeaderClickCallback?: boolean;\n\n /**\n * Whether the picker should highlight the current item\n */\n highlightCurrent?: boolean;\n\n /**\n * Whether the picker should highlight the selected item\n */\n highlightSelected?: boolean;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or veritcal\n */\n animationDirection?: AnimationDirection;\n\n /**\n * Whether grid entering animation should be forwards or backwards\n */\n animateBackwards?: boolean;\n}\n\n/**\n * @internal\n */\nexport interface CalendarPickerStyles {\n /**\n * Style for the root element.\n */\n root: string;\n\n headerContainer: string;\n\n currentItemButton: string;\n\n navigationButtonsContainer: string;\n\n navigationButton: string;\n\n gridContainer: string;\n\n buttonRow: string;\n\n itemButton: string;\n\n current: string;\n\n selected: string;\n\n disabled: string;\n}\n"],"names":[],"rangeMappings":";;","mappings":"AAqCA;;CAEC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './CalendarPicker.types';\nexport * from './useCalendarPickerStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCalendarPickerStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { DURATION_2, DURATION_3, EASING_FUNCTION_1, EASING_FUNCTION_2, FADE_IN, SLIDE_DOWN_IN20, SLIDE_LEFT_IN20, SLIDE_RIGHT_IN20, SLIDE_UP_IN20 } from '../../utils/animations';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\n/**\n * @internal\n */\nexport const calendarPickerClassNames = {\n root: 'fui-CalendarPicker',\n headerContainer: 'fui-CalendarPicker__headerContainer',\n currentItemButton: 'fui-CalendarPicker__currentItemButton',\n navigationButtonsContainer: 'fui-CalendarPicker__navigationButtonsContainer',\n navigationButton: 'fui-CalendarPicker__navigationButton',\n gridContainer: 'fui-CalendarPicker__gridContainer',\n buttonRow: 'fui-CalendarPicker__buttonRow',\n itemButton: 'fui-CalendarPicker__itemButton',\n current: 'fui-CalendarPicker__current',\n selected: 'fui-CalendarPicker__selected',\n disabled: 'fui-CalendarPicker__disabled'\n};\nconst useRootStyles = /*#__PURE__*/__styles({\n base: {\n B7ck84d: \"f1e4lqlz\",\n B68tc82: 0,\n Bmxbyg5: 0,\n Bpg54ce: \"f1a3p1vp\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"f1sy4kr4\",\n a9b677: \"f4m2ahc\"\n },\n normalize: {\n E5pizo: \"f1couhl3\",\n B7ck84d: \"f1ewtqcl\",\n jrapky: 0,\n Frg6f3: 0,\n t21cq0: 0,\n B6of3ja: 0,\n B74szlk: \"f1s184ao\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"f1mk8lai\"\n }\n}, {\n d: [\".f1e4lqlz{box-sizing:content-box;}\", [\".f1a3p1vp{overflow:hidden;}\", {\n p: -1\n }], [\".f1sy4kr4{padding:12px;}\", {\n p: -1\n }], \".f4m2ahc{width:196px;}\", \".f1couhl3{box-shadow:none;}\", \".f1ewtqcl{box-sizing:border-box;}\", [\".f1s184ao{margin:0;}\", {\n p: -1\n }], [\".f1mk8lai{padding:0;}\", {\n p: -1\n }]]\n});\nconst useHeaderContainerStyles = /*#__PURE__*/__styles({\n base: {\n mc9l5x: \"f22iagw\"\n }\n}, {\n d: [\".f22iagw{display:flex;}\"]\n});\nconst useCurrentItemButtonStyles = /*#__PURE__*/__styles({\n base: {\n De3pzq: \"f1c21dwh\",\n icvyot: \"f1ern45e\",\n vrafjx: [\"f1n71otn\", \"f1deefiw\"],\n oivjwe: \"f1h8hb77\",\n wvpqe5: [\"f1deefiw\", \"f1n71otn\"],\n Beyfa6y: 0,\n Bbmb7ep: 0,\n Btl43ni: 0,\n B7oj6ja: 0,\n Dimara: \"ft85np5\",\n sj55zd: \"f1ym3bx4\",\n Bh6795r: \"fqerorx\",\n Bahqtrf: \"f1mo0ibp\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"fl43uef\",\n B68tc82: 0,\n Bmxbyg5: 0,\n Bpg54ce: \"f1gl81tg\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: [\"f1td8mcv\", \"f1udkdxo\"],\n fsow6f: [\"f1o700av\", \"fes3tcz\"]\n },\n animation: {\n vin17d: \"fhsqnsn\",\n Bf5fcs: \"fywypte\",\n Bv12yb3: \"f1h7u52p\",\n Ezkn3b: \"fjq4c94\"\n },\n hasHeaderClickCallback: {\n Jwef8y: \"f18a0fwf\",\n Bi91k9c: \"f3sdaeg\",\n eoavqd: \"f8491dx\",\n pugfm4: 0,\n ukgb2i: 0,\n Dwtyhm: 0,\n Biisq0s: \"f15rpok4\",\n iro3zm: \"f1wvkgvo\",\n B2d53fq: \"f1wdoaqd\",\n c3iz72: \"f13c0t7h\",\n mghro0: 0,\n Bx68yb: 0,\n syojd9: 0,\n E5hylx: \"fy2scak\"\n }\n}, {\n d: [\".f1c21dwh{background-color:var(--colorTransparentBackground);}\", \".f1ern45e{border-top-style:none;}\", \".f1n71otn{border-right-style:none;}\", \".f1deefiw{border-left-style:none;}\", \".f1h8hb77{border-bottom-style:none;}\", [\".ft85np5{border-radius:var(--borderRadiusMedium);}\", {\n p: -1\n }], \".f1ym3bx4{color:inherit;}\", \".fqerorx{flex-grow:1;}\", \".f1mo0ibp{font-family:inherit;}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", [\".f1gl81tg{overflow:visible;}\", {\n p: -1\n }], [\".f1td8mcv{padding:0 4px 0 10px;}\", {\n p: -1\n }], [\".f1udkdxo{padding:0 10px 0 4px;}\", {\n p: -1\n }], \".f1o700av{text-align:left;}\", \".fes3tcz{text-align:right;}\", \".fhsqnsn{animation-duration:0.267s;}\", \".fywypte{animation-fill-mode:both;}\", \".f1h7u52p{animation-name:f5j8bii;}\", \".fjq4c94{animation-timing-function:cubic-bezier(.1,.25,.75,.9);}\"],\n k: [\"@keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}\"],\n h: [\".f18a0fwf:hover{background-color:var(--colorBrandBackgroundInvertedHover);}\", \".f3sdaeg:hover{color:var(--colorBrandForegroundOnLightHover);}\", \".f8491dx:hover{cursor:pointer;}\", [\".f15rpok4:hover{outline:1px solid var(--colorTransparentStroke);}\", {\n p: -1\n }], \".f1wvkgvo:hover:active{background-color:var(--colorBrandBackgroundInvertedPressed);}\", \".f1wdoaqd:hover:active{color:var(--colorBrandForegroundOnLightPressed);}\", \".f13c0t7h:hover:active{cursor:pointer;}\", [\".fy2scak:hover:active{outline:1px solid var(--colorTransparentStroke);}\", {\n p: -1\n }]]\n});\nconst useNavigationButtonsContainerStyles = /*#__PURE__*/__styles({\n base: {\n Bt984gj: \"f122n59\",\n mc9l5x: \"f22iagw\"\n }\n}, {\n d: [\".f122n59{align-items:center;}\", \".f22iagw{display:flex;}\"]\n});\nconst useNavigationButtonStyles = /*#__PURE__*/__styles({\n base: {\n De3pzq: \"f1c21dwh\",\n Bgfg5da: 0,\n B9xav0g: 0,\n oivjwe: 0,\n Bn0qgzm: 0,\n B4g9neb: 0,\n zhjwy3: 0,\n wvpqe5: 0,\n ibv6hh: 0,\n u1mtju: 0,\n h3c5rm: 0,\n vrafjx: 0,\n Bekrc4i: 0,\n i8vvqc: 0,\n g2u3we: 0,\n icvyot: 0,\n B4j52fo: 0,\n irswps: \"f3bhgqh\",\n Beyfa6y: 0,\n Bbmb7ep: 0,\n Btl43ni: 0,\n B7oj6ja: 0,\n Dimara: \"ft85np5\",\n sj55zd: \"f19n0e5\",\n mc9l5x: \"ftgm304\",\n Bahqtrf: \"f1mo0ibp\",\n Be2twd7: \"fy9rknc\",\n Bqenvij: \"fxldao9\",\n Bg96gwp: \"f336tjw\",\n sshi5w: \"f1ysfysz\",\n Bf4jedk: \"f107v6xj\",\n B68tc82: 0,\n Bmxbyg5: 0,\n Bpg54ce: \"f1gl81tg\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"f1mk8lai\",\n qhf8xq: \"f10pi13n\",\n fsow6f: \"f17mccla\",\n a9b677: \"f1w9dchk\",\n Jwef8y: \"f18a0fwf\",\n Bi91k9c: \"f3sdaeg\",\n eoavqd: \"f8491dx\",\n pugfm4: 0,\n ukgb2i: 0,\n Dwtyhm: 0,\n Biisq0s: \"f15rpok4\",\n iro3zm: \"f1wvkgvo\",\n B2d53fq: \"f1wdoaqd\"\n }\n}, {\n d: [\".f1c21dwh{background-color:var(--colorTransparentBackground);}\", [\".f3bhgqh{border:none;}\", {\n p: -2\n }], [\".ft85np5{border-radius:var(--borderRadiusMedium);}\", {\n p: -1\n }], \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".ftgm304{display:block;}\", \".f1mo0ibp{font-family:inherit;}\", \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".fxldao9{height:28px;}\", \".f336tjw{line-height:28px;}\", \".f1ysfysz{min-height:28px;}\", \".f107v6xj{min-width:28px;}\", [\".f1gl81tg{overflow:visible;}\", {\n p: -1\n }], [\".f1mk8lai{padding:0;}\", {\n p: -1\n }], \".f10pi13n{position:relative;}\", \".f17mccla{text-align:center;}\", \".f1w9dchk{width:28px;}\"],\n h: [\".f18a0fwf:hover{background-color:var(--colorBrandBackgroundInvertedHover);}\", \".f3sdaeg:hover{color:var(--colorBrandForegroundOnLightHover);}\", \".f8491dx:hover{cursor:pointer;}\", [\".f15rpok4:hover{outline:1px solid var(--colorTransparentStroke);}\", {\n p: -1\n }], \".f1wvkgvo:hover:active{background-color:var(--colorBrandBackgroundInvertedPressed);}\", \".f1wdoaqd:hover:active{color:var(--colorBrandForegroundOnLightPressed);}\"]\n});\nconst useGridContainerStyles = /*#__PURE__*/__styles({\n base: {\n B6of3ja: \"fvjh0tl\"\n }\n}, {\n d: [\".fvjh0tl{margin-top:4px;}\"]\n});\nconst useButtonRowStyles = /*#__PURE__*/__styles({\n base: {\n jrapky: \"f15tpi3i\",\n sw9gdo: \"f1gdbdba\"\n },\n animation: {\n vin17d: \"f5f2jbu\",\n Bf5fcs: \"fywypte\",\n Ezkn3b: \"f1ee2ue\"\n },\n horizontalBackward: {\n Bv12yb3: [\"f1o9w3l8\", \"f1kwjajc\"]\n },\n horizontalForward: {\n Bv12yb3: [\"f1kwjajc\", \"f1o9w3l8\"]\n },\n verticalBackward: {\n Bv12yb3: \"fgl3yn7\"\n },\n verticalForward: {\n Bv12yb3: \"faiu5ye\"\n }\n}, {\n d: [\".f15tpi3i{margin-bottom:16px;}\", \".f1gdbdba:last-of-type{margin-bottom:0;}\", \".f5f2jbu{animation-duration:0.367s;}\", \".fywypte{animation-fill-mode:both;}\", \".f1ee2ue{animation-timing-function:cubic-bezier(.1,.9,.2,1);}\", \".f1o9w3l8{animation-name:f5j8bii,f2lgmc3;}\", \".f1kwjajc{animation-name:f5j8bii,fpktcv7;}\", \".fgl3yn7{animation-name:f5j8bii,f3bv9km;}\", \".faiu5ye{animation-name:f5j8bii,funtx0y;}\"],\n k: [\"@keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}\", \"@keyframes f2lgmc3{from{pointer-events:none;transform:translate3d(-20px, 0, 0);}to{pointer-events:auto;transform:translate3d(0, 0, 0);}}\", \"@keyframes fpktcv7{from{pointer-events:none;transform:translate3d(20px, 0, 0);}to{pointer-events:auto;transform:translate3d(0, 0, 0);}}\", \"@keyframes f3bv9km{from{pointer-events:none;transform:translate3d(0, -20px, 0);}to{pointer-events:auto;transform:translate3d(0, 0, 0);}}\", \"@keyframes funtx0y{from{pointer-events:none;transform:translate3d(0, 20px, 0);}to{pointer-events:auto;transform:translate3d(0, 0, 0);}}\"]\n});\nconst useItemButtonStyles = /*#__PURE__*/__styles({\n base: {\n De3pzq: \"f1c21dwh\",\n Bgfg5da: 0,\n B9xav0g: 0,\n oivjwe: 0,\n Bn0qgzm: 0,\n B4g9neb: 0,\n zhjwy3: 0,\n wvpqe5: 0,\n ibv6hh: 0,\n u1mtju: 0,\n h3c5rm: 0,\n vrafjx: 0,\n Bekrc4i: 0,\n i8vvqc: 0,\n g2u3we: 0,\n icvyot: 0,\n B4j52fo: 0,\n irswps: \"f3bhgqh\",\n Beyfa6y: 0,\n Bbmb7ep: 0,\n Btl43ni: 0,\n B7oj6ja: 0,\n Dimara: \"ft85np5\",\n sj55zd: \"f11d4kpn\",\n Bahqtrf: \"f1mo0ibp\",\n Be2twd7: \"fy9rknc\",\n Bqenvij: \"fbhnoac\",\n Bg96gwp: \"fc76cdq\",\n sshi5w: \"f1w5jphr\",\n Bf4jedk: \"f12clzc2\",\n jrapky: 0,\n Frg6f3: 0,\n t21cq0: 0,\n B6of3ja: 0,\n B74szlk: [\"f1ytixos\", \"fqk6p8t\"],\n B68tc82: 0,\n Bmxbyg5: 0,\n Bpg54ce: \"f1gl81tg\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"f1mk8lai\",\n a9b677: \"feqmc2u\",\n Btgfwho: [\"f65zstl\", \"f1yt3tqw\"],\n xrote9: \"flfbxit\",\n Bja5ulm: \"ff5vbxt\",\n Jwef8y: \"f18a0fwf\",\n Bi91k9c: \"f1u69ym5\",\n eoavqd: \"f8491dx\",\n pugfm4: 0,\n ukgb2i: 0,\n Dwtyhm: 0,\n Biisq0s: \"f15rpok4\",\n Bqrx1nm: \"f9ep5xw\",\n ze5xyy: \"f1qvjex\",\n iyr2r2: \"fd2qbv0\",\n Bx7pl5v: 0,\n Bnosqey: 0,\n Bv57zgv: 0,\n Bbxjs3m: \"fm3bo9w\",\n iro3zm: \"f1wvkgvo\",\n g2kj27: \"f1b9qfq3\",\n pc6evw: \"f9ddjv3\",\n B76w7ga: \"fr4cgi0\"\n }\n}, {\n d: [\".f1c21dwh{background-color:var(--colorTransparentBackground);}\", [\".f3bhgqh{border:none;}\", {\n p: -2\n }], [\".ft85np5{border-radius:var(--borderRadiusMedium);}\", {\n p: -1\n }], \".f11d4kpn{color:var(--colorNeutralForeground3);}\", \".f1mo0ibp{font-family:inherit;}\", \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".fbhnoac{height:40px;}\", \".fc76cdq{line-height:40px;}\", \".f1w5jphr{min-height:40px;}\", \".f12clzc2{min-width:40px;}\", [\".f1ytixos{margin:0 12px 0 0;}\", {\n p: -1\n }], [\".fqk6p8t{margin:0 0 0 12px;}\", {\n p: -1\n }], [\".f1gl81tg{overflow:visible;}\", {\n p: -1\n }], [\".f1mk8lai{padding:0;}\", {\n p: -1\n }], \".feqmc2u{width:40px;}\", \".f65zstl:nth-child(4n + 4){margin-right:0;}\", \".f1yt3tqw:nth-child(4n + 4){margin-left:0;}\", \".flfbxit:nth-child(n + 9){margin-bottom:0;}\", \".ff5vbxt div{font-weight:var(--fontWeightRegular);}\"],\n h: [\".f18a0fwf:hover{background-color:var(--colorBrandBackgroundInvertedHover);}\", \".f1u69ym5:hover{color:var(--colorNeutralForeground1Static);}\", \".f8491dx:hover{cursor:pointer;}\", [\".f15rpok4:hover{outline:1px solid var(--colorTransparentStroke);}\", {\n p: -1\n }], \".f1wvkgvo:hover:active{background-color:var(--colorBrandBackgroundInvertedPressed);}\"],\n m: [[\"@media (forced-colors: active){.f9ep5xw:hover{background-color:Window;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1qvjex:hover{color:WindowText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fd2qbv0:hover{forced-color-adjust:none;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fm3bo9w:hover{outline:1px solid Highlight;}}\", {\n p: -1,\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1b9qfq3:hover:active{background-color:Window;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f9ddjv3:hover:active{color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fr4cgi0:hover:active{forced-color-adjust:none;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\nconst useCurrentStyles = /*#__PURE__*/__styles({\n highlightCurrent: {\n De3pzq: \"ffp7eso\",\n sj55zd: \"f1phragk\",\n Bhrd7zp: \"fl43uef\",\n Bsw6fvg: \"fg374yq\",\n Bbusuzp: \"f1yig07e\",\n ycbfsm: \"fkc42ay\",\n mk428o: \"ffic4m0\",\n B1lrsqs: \"f13lyc4l\",\n z0vste: \"f13g7o2i\",\n Bgjd7nk: \"fbbf6h8\",\n kur00z: \"f1fsg2me\"\n }\n}, {\n d: [\".ffp7eso{background-color:var(--colorBrandBackground);}\", \".f1phragk{color:var(--colorNeutralForegroundOnBrand);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\"],\n m: [[\"@media (forced-colors: active){.fg374yq{background-color:WindowText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1yig07e{color:Window;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fkc42ay{forced-color-adjust:none;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f13g7o2i:hover,.f13g7o2i:hover:active{background-color:WindowText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fbbf6h8:hover,.fbbf6h8:hover:active{color:Window;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1fsg2me:hover,.f1fsg2me:hover:active{forced-color-adjust:none;}}\", {\n m: \"(forced-colors: active)\"\n }]],\n h: [\".ffic4m0:hover,.ffic4m0:hover:active{background-color:var(--colorBrandBackground);}\", \".f13lyc4l:hover,.f13lyc4l:hover:active{color:var(--colorNeutralForegroundOnBrand);}\"]\n});\nconst useSelectedStyles = /*#__PURE__*/__styles({\n highlightSelected: {\n De3pzq: \"f1vevd59\",\n sj55zd: \"ff5vbop\",\n Bhrd7zp: \"fl43uef\",\n Bsw6fvg: \"f1rirnrt\",\n Bbusuzp: \"f1yig07e\",\n ycbfsm: \"fkc42ay\",\n Bja5ulm: \"fospawf\",\n Jwef8y: \"fbo057p\",\n Bi91k9c: \"f1u69ym5\",\n Bqrx1nm: \"fiu8gst\",\n ze5xyy: \"f1v4q6pl\",\n iyr2r2: \"fd2qbv0\",\n iro3zm: \"f1wvkgvo\"\n }\n}, {\n d: [\".f1vevd59{background-color:var(--colorBrandBackgroundInvertedSelected);}\", \".ff5vbop{color:var(--colorNeutralForeground1Static);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", \".fospawf div{font-weight:var(--fontWeightSemibold);}\"],\n m: [[\"@media (forced-colors: active){.f1rirnrt{background-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1yig07e{color:Window;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fkc42ay{forced-color-adjust:none;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fiu8gst:hover{background-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1v4q6pl:hover{color:Window;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fd2qbv0:hover{forced-color-adjust:none;}}\", {\n m: \"(forced-colors: active)\"\n }]],\n h: [\".fbo057p:hover{background-color:var(--colorBrandBackgroundInvertedSelected);}\", \".f1u69ym5:hover{color:var(--colorNeutralForeground1Static);}\", \".f1wvkgvo:hover:active{background-color:var(--colorBrandBackgroundInvertedPressed);}\"]\n});\nconst useDisabledStyles = /*#__PURE__*/__styles({\n base: {\n Bg33ivm: \"f1oelgmz\",\n t69wg0: \"fhh1ekj\",\n Bbusuzp: \"f1dcs8yz\",\n ycbfsm: \"fkc42ay\"\n }\n}, {\n d: [\".f1oelgmz,.f1oelgmz:disabled,.f1oelgmz button{color:var(--colorNeutralForegroundDisabled);}\", \".fhh1ekj,.fhh1ekj:disabled,.fhh1ekj button{pointer-events:none;}\"],\n m: [[\"@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fkc42ay{forced-color-adjust:none;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\n/**\n * @internal\n *\n * Apply styling to the CalendarPicker slots based on the state\n */\nexport const useCalendarPickerStyles_unstable = props => {\n 'use no memo';\n\n const rootStyles = useRootStyles();\n const headerContainerStyles = useHeaderContainerStyles();\n const currentItemButtonStyles = useCurrentItemButtonStyles();\n const navigationButtonsContainerStyles = useNavigationButtonsContainerStyles();\n const navigationButtonStyles = useNavigationButtonStyles();\n const gridContainerStyles = useGridContainerStyles();\n const buttonRowStyles = useButtonRowStyles();\n const itemButtonStyles = useItemButtonStyles();\n const currentStyles = useCurrentStyles();\n const selectedStyles = useSelectedStyles();\n const disabledStyles = useDisabledStyles();\n const {\n animateBackwards,\n animationDirection,\n className,\n hasHeaderClickCallback,\n highlightCurrent,\n highlightSelected\n } = props;\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(calendarPickerClassNames.currentItemButton, currentItemButtonStyles.base, animateBackwards !== undefined && currentItemButtonStyles.animation, hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback),\n navigationButtonsContainer: mergeClasses(calendarPickerClassNames.navigationButtonsContainer, navigationButtonsContainerStyles.base),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(calendarPickerClassNames.buttonRow, buttonRowStyles.base, buttonRowStyles.animation, animateBackwards !== undefined && (animationDirection === AnimationDirection.Horizontal ? animateBackwards ? buttonRowStyles.horizontalBackward : buttonRowStyles.horizontalForward : animateBackwards ? buttonRowStyles.verticalBackward : buttonRowStyles.verticalForward)),\n itemButton: mergeClasses(calendarPickerClassNames.itemButton, itemButtonStyles.base),\n selected: mergeClasses(calendarPickerClassNames.selected, highlightSelected && selectedStyles.highlightSelected),\n current: mergeClasses(calendarPickerClassNames.current, highlightCurrent && currentStyles.highlightCurrent),\n disabled: mergeClasses(calendarPickerClassNames.disabled, disabledStyles.base)\n };\n};\n//# sourceMappingURL=useCalendarPickerStyles.styles.js.map"],"names":["calendarPickerClassNames","useCalendarPickerStyles_unstable","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","__styles","base","B7ck84d","B68tc82","Bmxbyg5","Bpg54ce","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","a9b677","normalize","E5pizo","jrapky","Frg6f3","t21cq0","B6of3ja","B74szlk","d","p","useHeaderContainerStyles","mc9l5x","useCurrentItemButtonStyles","De3pzq","icvyot","vrafjx","oivjwe","wvpqe5","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","sj55zd","Bh6795r","Bahqtrf","Be2twd7","Bhrd7zp","fsow6f","animation","vin17d","Bf5fcs","Bv12yb3","Ezkn3b","hasHeaderClickCallback","Jwef8y","Bi91k9c","eoavqd","pugfm4","ukgb2i","Dwtyhm","Biisq0s","iro3zm","B2d53fq","c3iz72","mghro0","Bx68yb","syojd9","E5hylx","k","h","useNavigationButtonsContainerStyles","Bt984gj","useNavigationButtonStyles","Bgfg5da","B9xav0g","Bn0qgzm","B4g9neb","zhjwy3","ibv6hh","u1mtju","h3c5rm","Bekrc4i","i8vvqc","g2u3we","B4j52fo","irswps","Bqenvij","Bg96gwp","sshi5w","Bf4jedk","qhf8xq","useGridContainerStyles","useButtonRowStyles","sw9gdo","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","Btgfwho","xrote9","Bja5ulm","Bqrx1nm","ze5xyy","iyr2r2","Bx7pl5v","Bnosqey","Bv57zgv","Bbxjs3m","g2kj27","pc6evw","B76w7ga","m","useCurrentStyles","highlightCurrent","Bsw6fvg","Bbusuzp","ycbfsm","mk428o","B1lrsqs","z0vste","Bgjd7nk","kur00z","useSelectedStyles","highlightSelected","useDisabledStyles","Bg33ivm","t69wg0","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","mergeClasses","undefined","AnimationDirection","Horizontal"],"mappings":";;;;;;;;;;;IAOaA,wBAAwB;eAAxBA;;IAmaAC,gCAAgC;eAAhCA;;;uBAzasC;+BAEhB;AAI5B,MAAMD,2BAA2B;IACtCE,MAAM;IACNC,iBAAiB;IACjBC,mBAAmB;IACnBC,4BAA4B;IAC5BC,kBAAkB;IAClBC,eAAe;IACfC,WAAW;IACXC,YAAY;IACZC,SAAS;IACTC,UAAU;IACVC,UAAU;AACZ;AACA,MAAMC,gBAAgB,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IAC1CC,MAAM;QACJC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,QAAQ;IACV;IACAC,WAAW;QACTC,QAAQ;QACRX,SAAS;QACTY,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTZ,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;IACX;AACF,GAAG;IACDS,GAAG;QAAC;QAAsC;YAAC;YAA+B;gBACxEC,GAAG,CAAC;YACN;SAAE;QAAE;YAAC;YAA4B;gBAC/BA,GAAG,CAAC;YACN;SAAE;QAAE;QAA0B;QAA+B;QAAqC;YAAC;YAAwB;gBACzHA,GAAG,CAAC;YACN;SAAE;QAAE;YAAC;YAAyB;gBAC5BA,GAAG,CAAC;YACN;SAAE;KAAC;AACL;AACA,MAAMC,2BAA2B,WAAW,GAAErB,IAAAA,eAAQ,EAAC;IACrDC,MAAM;QACJqB,QAAQ;IACV;AACF,GAAG;IACDH,GAAG;QAAC;KAA0B;AAChC;AACA,MAAMI,6BAA6B,WAAW,GAAEvB,IAAAA,eAAQ,EAAC;IACvDC,MAAM;QACJuB,QAAQ;QACRC,QAAQ;QACRC,QAAQ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EqI,iCAAiC3H,IAAI;QACnIT,kBAAkB+I,IAAAA,mBAAY,EAACrJ,yBAAyBM,gBAAgB,EAAEqI,uBAAuB5H,IAAI;QACrGR,eAAe8I,IAAAA,mBAAY,EAACrJ,yBAAyBO,aAAa,EAAEqI,oBAAoB7H,IAAI;QAC5FP,WAAW6I,IAAAA,mBAAY,EAACrJ,yBAAyBQ,SAAS,EAAEqI,gBAAgB9H,IAAI,EAAE8H,gBAAgBvF,SAAS,EAAE4F,qBAAqBI,aAAcH,CAAAA,uBAAuBI,iCAAkB,CAACC,UAAU,GAAGN,mBAAmBL,gBAAgBzC,kBAAkB,GAAGyC,gBAAgBxC,iBAAiB,GAAG6C,mBAAmBL,gBAAgBvC,gBAAgB,GAAGuC,gBAAgBtC,eAAe,AAAD;QACvX9F,YAAY4I,IAAAA,mBAAY,EAACrJ,yBAAyBS,UAAU,EAAEqI,iBAAiB/H,IAAI;QACnFJ,UAAU0I,IAAAA,mBAAY,EAACrJ,yBAAyBW,QAAQ,EAAEuH,qBAAqBc,eAAed,iBAAiB;QAC/GxH,SAAS2I,IAAAA,mBAAY,EAACrJ,yBAAyBU,OAAO,EAAE8G,oBAAoBuB,cAAcvB,gBAAgB;QAC1G5G,UAAUyI,IAAAA,mBAAY,EAACrJ,yBAAyBY,QAAQ,EAAEqI,eAAelI,IAAI;IAC/E;AACF,GACA,0DAA0D"}
|
1
|
+
{"version":3,"sources":["useCalendarPickerStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { DURATION_2, DURATION_3, EASING_FUNCTION_1, EASING_FUNCTION_2, FADE_IN, SLIDE_DOWN_IN20, SLIDE_LEFT_IN20, SLIDE_RIGHT_IN20, SLIDE_UP_IN20 } from '../../utils/animations';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\n/**\n * @internal\n */ export const calendarPickerClassNames = {\n root: 'fui-CalendarPicker',\n headerContainer: 'fui-CalendarPicker__headerContainer',\n currentItemButton: 'fui-CalendarPicker__currentItemButton',\n navigationButtonsContainer: 'fui-CalendarPicker__navigationButtonsContainer',\n navigationButton: 'fui-CalendarPicker__navigationButton',\n gridContainer: 'fui-CalendarPicker__gridContainer',\n buttonRow: 'fui-CalendarPicker__buttonRow',\n itemButton: 'fui-CalendarPicker__itemButton',\n current: 'fui-CalendarPicker__current',\n selected: 'fui-CalendarPicker__selected',\n disabled: 'fui-CalendarPicker__disabled'\n};\nconst useRootStyles = makeStyles({\n base: {\n boxSizing: 'content-box',\n overflow: 'hidden',\n padding: '12px',\n width: '196px'\n },\n normalize: {\n boxShadow: 'none',\n boxSizing: 'border-box',\n margin: '0',\n padding: '0'\n }\n});\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex'\n }\n});\nconst useCurrentItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n borderRadius: tokens.borderRadiusMedium,\n color: 'inherit',\n flexGrow: 1,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n overflow: 'visible',\n padding: '0 4px 0 10px',\n textAlign: 'left'\n },\n animation: {\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2\n },\n hasHeaderClickCallback: {\n // If this is updated, make sure to update headerIsClickable in useCalendarDayStyles as well\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n }\n }\n});\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex'\n }\n});\nconst useNavigationButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground1,\n display: 'block',\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '28px',\n lineHeight: '28px',\n minHeight: '28px',\n minWidth: '28px',\n overflow: 'visible',\n padding: '0',\n position: 'relative',\n textAlign: 'center',\n width: '28px',\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed\n }\n }\n});\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px'\n }\n});\nconst useButtonRowStyles = makeStyles({\n base: {\n marginBottom: '16px',\n '&:last-of-type': {\n marginBottom: 0\n }\n },\n animation: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationTimingFunction: EASING_FUNCTION_1\n },\n horizontalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_RIGHT_IN20\n ]\n },\n horizontalForward: {\n animationName: [\n FADE_IN,\n SLIDE_LEFT_IN20\n ]\n },\n verticalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_DOWN_IN20\n ]\n },\n verticalForward: {\n animationName: [\n FADE_IN,\n SLIDE_UP_IN20\n ]\n }\n});\nconst useItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground3,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '40px',\n lineHeight: '40px',\n minHeight: '40px',\n minWidth: '40px',\n margin: '0 12px 0 0',\n overflow: 'visible',\n padding: '0',\n width: '40px',\n '&:nth-child(4n + 4)': {\n marginRight: 0\n },\n '&:nth-child(n + 9)': {\n marginBottom: 0\n },\n '& div': {\n fontWeight: tokens.fontWeightRegular\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorNeutralForeground1Static,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n forcedColorAdjust: 'none',\n outline: '1px solid Highlight'\n }\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n },\n '&:hover, &:hover:active': {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none'\n },\n '& div': {\n fontWeight: tokens.fontWeightSemibold\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed\n }\n }\n});\nconst useDisabledStyles = makeStyles({\n base: {\n '&, &:disabled, & button': {\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none'\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n forcedColorAdjust: 'none'\n }\n }\n});\n/**\n * @internal\n *\n * Apply styling to the CalendarPicker slots based on the state\n */ export const useCalendarPickerStyles_unstable = (props)=>{\n 'use no memo';\n const rootStyles = useRootStyles();\n const headerContainerStyles = useHeaderContainerStyles();\n const currentItemButtonStyles = useCurrentItemButtonStyles();\n const navigationButtonsContainerStyles = useNavigationButtonsContainerStyles();\n const navigationButtonStyles = useNavigationButtonStyles();\n const gridContainerStyles = useGridContainerStyles();\n const buttonRowStyles = useButtonRowStyles();\n const itemButtonStyles = useItemButtonStyles();\n const currentStyles = useCurrentStyles();\n const selectedStyles = useSelectedStyles();\n const disabledStyles = useDisabledStyles();\n const { animateBackwards, animationDirection, className, hasHeaderClickCallback, highlightCurrent, highlightSelected } = props;\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(calendarPickerClassNames.currentItemButton, currentItemButtonStyles.base, animateBackwards !== undefined && currentItemButtonStyles.animation, hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback),\n navigationButtonsContainer: mergeClasses(calendarPickerClassNames.navigationButtonsContainer, navigationButtonsContainerStyles.base),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(calendarPickerClassNames.buttonRow, buttonRowStyles.base, buttonRowStyles.animation, animateBackwards !== undefined && (animationDirection === AnimationDirection.Horizontal ? animateBackwards ? buttonRowStyles.horizontalBackward : buttonRowStyles.horizontalForward : animateBackwards ? buttonRowStyles.verticalBackward : buttonRowStyles.verticalForward)),\n itemButton: mergeClasses(calendarPickerClassNames.itemButton, itemButtonStyles.base),\n selected: mergeClasses(calendarPickerClassNames.selected, highlightSelected && selectedStyles.highlightSelected),\n current: mergeClasses(calendarPickerClassNames.current, highlightCurrent && currentStyles.highlightCurrent),\n disabled: mergeClasses(calendarPickerClassNames.disabled, disabledStyles.base)\n };\n};\n"],"names":["calendarPickerClassNames","useCalendarPickerStyles_unstable","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","__styles","base","B7ck84d","B68tc82","Bmxbyg5","Bpg54ce","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","a9b677","normalize","E5pizo","jrapky","Frg6f3","t21cq0","B6of3ja","B74szlk","d","p","useHeaderContainerStyles","mc9l5x","useCurrentItemButtonStyles","De3pzq","icvyot","vrafjx","oivjwe","wvpqe5","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","sj55zd","Bh6795r","Bahqtrf","Be2twd7","Bhrd7zp","fsow6f","animation","vin17d","Bf5fcs","Bv12yb3","Ezkn3b","hasHeaderClickCallback","Jwef8y","Bi91k9c","eoavqd","pugfm4","ukgb2i","Dwtyhm","Biisq0s","iro3zm","B2d53fq","c3iz72","mghro0","Bx68yb","syojd9","E5hylx","k","h","useNavigationButtonsContainerStyles","Bt984gj","useNavigationButtonStyles","Bgfg5da","B9xav0g","Bn0qgzm","B4g9neb","zhjwy3","ibv6hh","u1mtju","h3c5rm","Bekrc4i","i8vvqc","g2u3we","B4j52fo","irswps","Bqenvij","Bg96gwp","sshi5w","Bf4jedk","qhf8xq","useGridContainerStyles","useButtonRowStyles","sw9gdo","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","Btgfwho","xrote9","Bja5ulm","Bqrx1nm","ze5xyy","iyr2r2","Bx7pl5v","Bnosqey","Bv57zgv","Bbxjs3m","g2kj27","pc6evw","B76w7ga","m","useCurrentStyles","highlightCurrent","Bsw6fvg","Bbusuzp","ycbfsm","mk428o","B1lrsqs","z0vste","Bgjd7nk","kur00z","useSelectedStyles","highlightSelected","useDisabledStyles","Bg33ivm","t69wg0","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","mergeClasses","undefined","AnimationDirection","Horizontal"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMiBA,wBAAwB;eAAxBA;;IAiQAC,gCAAgC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AAA,mBAAY,EAACrJ,yBAAyBO,aAAa,EAAEqI,oBAAoB7H,IAAI;QAC5FP,WAAW6I,IAAAA,mBAAY,EAACrJ,yBAAyBQ,SAAS,EAAEqI,gBAAgB9H,IAAI,EAAE8H,gBAAgBvF,SAAS,EAAE4F,qBAAqBI,aAAcH,CAAAA,uBAAuBI,iCAAkB,CAACC,UAAU,GAAGN,mBAAmBL,gBAAgBzC,kBAAkB,GAAGyC,gBAAgBxC,iBAAiB,GAAG6C,mBAAmBL,gBAAgBvC,gBAAgB,GAAGuC,gBAAgBtC,eAAe,AAAfA;QACzW9F,YAAY4I,IAAAA,mBAAY,EAACrJ,yBAAyBS,UAAU,EAAEqI,iBAAiB/H,IAAI;QACnFJ,UAAU0I,IAAAA,mBAAY,EAACrJ,yBAAyBW,QAAQ,EAAEuH,qBAAqBc,eAAed,iBAAiB;QAC/GxH,SAAS2I,IAAAA,mBAAY,EAACrJ,yBAAyBU,OAAO,EAAE8G,oBAAoBuB,cAAcvB,gBAAgB;QAC1G5G,UAAUyI,IAAAA,mBAAY,EAACrJ,yBAAyBY,QAAQ,EAAEqI,eAAelI,IAAI;IACjF;AACJ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["CalendarYear.js"],"sourcesContent":["import * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { mergeClasses } from '@griffel/react';\nimport { useCalendarYearStyles_unstable } from './useCalendarYearStyles.styles';\nconst CELL_COUNT = 12;\nconst CELLS_PER_ROW = 4;\nconst DefaultCalendarYearStrings = {\n prevRangeAriaLabel: undefined,\n nextRangeAriaLabel: undefined\n};\nconst CalendarYearGridCell = (props)=>{\n const { className, highlightCurrentYear, highlightSelectedYear, year, selected, disabled, componentRef, onSelectYear, onRenderYear } = props;\n const buttonRef = React.useRef(null);\n React.useImperativeHandle(componentRef, ()=>({\n focus () {\n var _buttonRef_current_focus, _buttonRef_current;\n (_buttonRef_current = buttonRef.current) === null || _buttonRef_current === void 0 ? void 0 : (_buttonRef_current_focus = _buttonRef_current.focus) === null || _buttonRef_current_focus === void 0 ? void 0 : _buttonRef_current_focus.call(_buttonRef_current);\n }\n }), []);\n const onClick = ()=>{\n onSelectYear === null || onSelectYear === void 0 ? void 0 : onSelectYear(year);\n };\n const onKeyDown = (ev)=>{\n if (ev.key === Enter) {\n onSelectYear === null || onSelectYear === void 0 ? void 0 : onSelectYear(year);\n }\n };\n const classNames = useCalendarYearStyles_unstable({\n className,\n highlightCurrent: highlightCurrentYear,\n highlightSelected: highlightSelectedYear\n });\n var _onRenderYear;\n return /*#__PURE__*/ React.createElement(\"button\", {\n className: mergeClasses(classNames.itemButton, selected && classNames.selected, disabled && classNames.disabled),\n type: \"button\",\n role: \"gridcell\",\n onClick: !disabled ? onClick : undefined,\n onKeyDown: !disabled ? onKeyDown : undefined,\n disabled: disabled,\n \"aria-selected\": selected,\n ref: buttonRef\n }, (_onRenderYear = onRenderYear === null || onRenderYear === void 0 ? void 0 : onRenderYear(year)) !== null && _onRenderYear !== void 0 ? _onRenderYear : year);\n};\nCalendarYearGridCell.displayName = 'CalendarYearGridCell';\nconst CalendarYearGrid = (props)=>{\n const { className, fromYear, toYear, animationDirection, animateBackwards, minYear, maxYear, onSelectYear, selectedYear, componentRef } = props;\n const selectedCellRef = React.useRef(null);\n const currentCellRef = React.useRef(null);\n React.useImperativeHandle(componentRef, ()=>({\n focus () {\n var _focus, _this;\n (_this = selectedCellRef.current || currentCellRef.current) === null || _this === void 0 ? void 0 : (_focus = _this.focus) === null || _focus === void 0 ? void 0 : _focus.call(_this);\n }\n }), []);\n const renderCell = (yearToRender)=>{\n const selected = yearToRender === selectedYear;\n const disabled = minYear !== undefined && yearToRender < minYear || maxYear !== undefined && yearToRender > maxYear;\n const current = yearToRender === new Date().getFullYear();\n return /*#__PURE__*/ React.createElement(CalendarYearGridCell, {\n ...props,\n key: yearToRender,\n year: yearToRender,\n selected: selected,\n current: current,\n disabled: disabled,\n onSelectYear: onSelectYear,\n componentRef: selected ? selectedCellRef : current ? currentCellRef : undefined\n });\n };\n const classNames = useCalendarYearStyles_unstable({\n className,\n animateBackwards,\n animationDirection\n });\n const onRenderYear = (value)=>{\n var _props_onRenderYear;\n var _props_onRenderYear1;\n return (_props_onRenderYear1 = (_props_onRenderYear = props.onRenderYear) === null || _props_onRenderYear === void 0 ? void 0 : _props_onRenderYear.call(props, value)) !== null && _props_onRenderYear1 !== void 0 ? _props_onRenderYear1 : value;\n };\n const gridAriaLabel = `${onRenderYear(fromYear)} - ${onRenderYear(toYear)}`;\n let year = fromYear;\n const cells = [];\n for(let i = 0; i < (toYear - fromYear + 1) / CELLS_PER_ROW; i++){\n cells.push([]);\n for(let j = 0; j < CELLS_PER_ROW; j++){\n cells[i].push(renderCell(year));\n year++;\n }\n }\n const arrowNavigationAttributes = useArrowNavigationGroup({\n axis: 'grid'\n });\n return /*#__PURE__*/ React.createElement(\"div\", {\n ...arrowNavigationAttributes,\n className: classNames.gridContainer,\n role: \"grid\",\n \"aria-label\": gridAriaLabel\n }, cells.map((cellRow, index)=>{\n return /*#__PURE__*/ React.createElement(\"div\", {\n key: 'yearPickerRow_' + index + '_' + fromYear,\n role: \"row\",\n className: classNames.buttonRow\n }, cellRow);\n }));\n};\nCalendarYearGrid.displayName = 'CalendarYearGrid';\nconst CalendarYearNavDirection = {\n Previous: 0,\n Next: 1\n};\nconst CalendarYearNavArrow = (props)=>{\n const { className, strings = DefaultCalendarYearStrings, direction, onSelectPrev, onSelectNext, fromYear, toYear, maxYear, minYear, navigationIcons } = props;\n const classNames = useCalendarYearStyles_unstable({\n className\n });\n const ariaLabel = direction === CalendarYearNavDirection.Previous ? strings.prevRangeAriaLabel : strings.nextRangeAriaLabel;\n const newRangeOffset = direction === CalendarYearNavDirection.Previous ? -CELL_COUNT : CELL_COUNT;\n const newRange = {\n fromYear: fromYear + newRangeOffset,\n toYear: toYear + newRangeOffset\n };\n const ariaLabelString = ariaLabel ? typeof ariaLabel === 'string' ? ariaLabel : ariaLabel(newRange) : undefined;\n const disabled = direction === CalendarYearNavDirection.Previous ? minYear !== undefined && fromYear < minYear : maxYear !== undefined && props.fromYear + CELL_COUNT > maxYear;\n const onNavigate = ()=>{\n direction === CalendarYearNavDirection.Previous ? onSelectPrev === null || onSelectPrev === void 0 ? void 0 : onSelectPrev() : onSelectNext === null || onSelectNext === void 0 ? void 0 : onSelectNext();\n };\n const onKeyDown = (ev)=>{\n if (ev.key === Enter) {\n onNavigate();\n }\n };\n return /*#__PURE__*/ React.createElement(\"button\", {\n className: mergeClasses(classNames.navigationButton, disabled && classNames.disabled),\n onClick: !disabled ? onNavigate : undefined,\n onKeyDown: !disabled ? onKeyDown : undefined,\n type: \"button\",\n title: ariaLabelString,\n disabled: disabled\n }, direction === CalendarYearNavDirection.Previous ? navigationIcons.upNavigation : navigationIcons.downNavigation);\n};\nCalendarYearNavArrow.displayName = 'CalendarYearNavArrow';\nconst CalendarYearNav = (props)=>{\n const { className } = props;\n const classNames = useCalendarYearStyles_unstable({\n className\n });\n return /*#__PURE__*/ React.createElement(\"div\", {\n className: classNames.navigationButtonsContainer\n }, /*#__PURE__*/ React.createElement(CalendarYearNavArrow, {\n ...props,\n direction: CalendarYearNavDirection.Previous\n }), /*#__PURE__*/ React.createElement(CalendarYearNavArrow, {\n ...props,\n direction: CalendarYearNavDirection.Next\n }));\n};\nCalendarYearNav.displayName = 'CalendarYearNav';\nconst CalendarYearTitle = (props)=>{\n const { className, fromYear, toYear, strings = DefaultCalendarYearStrings, animateBackwards, animationDirection } = props;\n const onHeaderSelect = ()=>{\n var _props_onHeaderSelect;\n (_props_onHeaderSelect = props.onHeaderSelect) === null || _props_onHeaderSelect === void 0 ? void 0 : _props_onHeaderSelect.call(props, true);\n };\n const onHeaderKeyDown = (ev)=>{\n if (ev.key === Enter || ev.key === Space) {\n onHeaderSelect();\n }\n };\n const onRenderYear = (year)=>{\n var _props_onRenderYear;\n var _props_onRenderYear1;\n return (_props_onRenderYear1 = (_props_onRenderYear = props.onRenderYear) === null || _props_onRenderYear === void 0 ? void 0 : _props_onRenderYear.call(props, year)) !== null && _props_onRenderYear1 !== void 0 ? _props_onRenderYear1 : year;\n };\n const classNames = useCalendarYearStyles_unstable({\n className,\n hasHeaderClickCallback: !!props.onHeaderSelect,\n animateBackwards,\n animationDirection\n });\n if (props.onHeaderSelect) {\n const rangeAriaLabel = strings.rangeAriaLabel;\n const headerAriaLabelFormatString = strings.headerAriaLabelFormatString;\n const currentDateRange = rangeAriaLabel ? typeof rangeAriaLabel === 'string' ? rangeAriaLabel : rangeAriaLabel(props) : undefined;\n const ariaLabel = headerAriaLabelFormatString ? headerAriaLabelFormatString.replace('{0}', currentDateRange !== null && currentDateRange !== void 0 ? currentDateRange : '') : currentDateRange;\n return /*#__PURE__*/ React.createElement(\"button\", {\n className: classNames.currentItemButton,\n onClick: onHeaderSelect,\n onKeyDown: onHeaderKeyDown,\n \"aria-label\": ariaLabel,\n role: \"button\",\n type: \"button\"\n }, /*#__PURE__*/ React.createElement(\"span\", {\n \"aria-live\": \"assertive\",\n \"aria-atomic\": \"true\"\n }, onRenderYear(fromYear), \" - \", onRenderYear(toYear)));\n }\n return /*#__PURE__*/ React.createElement(\"div\", {\n className: classNames.current\n }, onRenderYear(fromYear), \" - \", onRenderYear(toYear));\n};\nCalendarYearTitle.displayName = 'CalendarYearTitle';\nconst CalendarYearHeader = (props)=>{\n const { className, animateBackwards, animationDirection, onRenderTitle } = props;\n const classNames = useCalendarYearStyles_unstable({\n className,\n hasHeaderClickCallback: !!props.onHeaderSelect,\n animateBackwards,\n animationDirection\n });\n var _onRenderTitle;\n return /*#__PURE__*/ React.createElement(\"div\", {\n className: classNames.headerContainer\n }, (_onRenderTitle = onRenderTitle === null || onRenderTitle === void 0 ? void 0 : onRenderTitle(props)) !== null && _onRenderTitle !== void 0 ? _onRenderTitle : /*#__PURE__*/ React.createElement(CalendarYearTitle, props), /*#__PURE__*/ React.createElement(CalendarYearNav, props));\n};\nCalendarYearHeader.displayName = 'CalendarYearHeader';\nfunction useAnimateBackwards({ selectedYear, navigatedYear }) {\n const rangeYear = selectedYear || navigatedYear || new Date().getFullYear();\n const fromYear = Math.floor(rangeYear / 10) * 10;\n const previousFromYearRef = React.useRef(fromYear);\n React.useRef(()=>{\n previousFromYearRef.current = fromYear;\n });\n const previousFromYear = previousFromYearRef.current;\n if (!previousFromYear || previousFromYear === fromYear) {\n return undefined;\n } else if (previousFromYear > fromYear) {\n return true;\n } else {\n return false;\n }\n}\nfunction useYearRangeState({ selectedYear, navigatedYear }) {\n const rangeYear = React.useMemo(()=>{\n return selectedYear || navigatedYear || Math.floor(new Date().getFullYear() / 10) * 10;\n }, [\n navigatedYear,\n selectedYear\n ]);\n const [fromYear, setFromYear] = React.useState(rangeYear);\n const onNavNext = ()=>{\n setFromYear((year)=>year + CELL_COUNT);\n };\n const onNavPrevious = ()=>{\n setFromYear((year)=>year - CELL_COUNT);\n };\n React.useEffect(()=>{\n setFromYear(rangeYear);\n }, [\n rangeYear\n ]);\n const toYear = fromYear + CELL_COUNT - 1;\n return [\n fromYear,\n toYear,\n onNavNext,\n onNavPrevious\n ];\n}\n/**\n * @internal\n */ export const CalendarYear = (props)=>{\n const animateBackwards = useAnimateBackwards(props);\n const [fromYear, toYear, onNavNext, onNavPrevious] = useYearRangeState(props);\n const gridRef = React.useRef(null);\n React.useImperativeHandle(props.componentRef, ()=>({\n focus () {\n var _gridRef_current_focus, _gridRef_current;\n (_gridRef_current = gridRef.current) === null || _gridRef_current === void 0 ? void 0 : (_gridRef_current_focus = _gridRef_current.focus) === null || _gridRef_current_focus === void 0 ? void 0 : _gridRef_current_focus.call(_gridRef_current);\n }\n }));\n const { className } = props;\n const classNames = useCalendarYearStyles_unstable({\n className\n });\n return /*#__PURE__*/ React.createElement(\"div\", {\n className: classNames.root\n }, /*#__PURE__*/ React.createElement(CalendarYearHeader, {\n ...props,\n fromYear: fromYear,\n toYear: toYear,\n onSelectPrev: onNavPrevious,\n onSelectNext: onNavNext,\n animateBackwards: animateBackwards\n }), /*#__PURE__*/ React.createElement(CalendarYearGrid, {\n ...props,\n fromYear: fromYear,\n toYear: toYear,\n animateBackwards: animateBackwards,\n componentRef: gridRef\n }));\n};\nCalendarYear.displayName = 'CalendarYear';\n"],"names":["CalendarYear","CELL_COUNT","CELLS_PER_ROW","DefaultCalendarYearStrings","prevRangeAriaLabel","undefined","nextRangeAriaLabel","CalendarYearGridCell","props","className","highlightCurrentYear","highlightSelectedYear","year","selected","disabled","componentRef","onSelectYear","onRenderYear","buttonRef","React","useRef","useImperativeHandle","focus","_buttonRef_current_focus","_buttonRef_current","current","call","onClick","onKeyDown","ev","key","Enter","classNames","useCalendarYearStyles_unstable","highlightCurrent","highlightSelected","_onRenderYear","createElement","mergeClasses","itemButton","type","role","ref","displayName","CalendarYearGrid","fromYear","toYear","animationDirection","animateBackwards","minYear","maxYear","selectedYear","selectedCellRef","currentCellRef","_focus","_this","renderCell","yearToRender","Date","getFullYear","value","_props_onRenderYear","_props_onRenderYear1","gridAriaLabel","cells","i","push","j","arrowNavigationAttributes","useArrowNavigationGroup","axis","gridContainer","map","cellRow","index","buttonRow","CalendarYearNavDirection","Previous","Next","CalendarYearNavArrow","strings","direction","onSelectPrev","onSelectNext","navigationIcons","ariaLabel","newRangeOffset","newRange","ariaLabelString","onNavigate","navigationButton","title","upNavigation","downNavigation","CalendarYearNav","navigationButtonsContainer","CalendarYearTitle","onHeaderSelect","_props_onHeaderSelect","onHeaderKeyDown","Space","hasHeaderClickCallback","rangeAriaLabel","headerAriaLabelFormatString","currentDateRange","replace","currentItemButton","CalendarYearHeader","onRenderTitle","_onRenderTitle","headerContainer","useAnimateBackwards","navigatedYear","rangeYear","Math","floor","previousFromYearRef","previousFromYear","useYearRangeState","useMemo","setFromYear","useState","onNavNext","onNavPrevious","useEffect","gridRef","_gridRef_current_focus","_gridRef_current","root"],"mappings":";;;;+BAsQiBA;;;eAAAA;;;;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":["import * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { mergeClasses } from '@griffel/react';\nimport { useCalendarYearStyles_unstable } from './useCalendarYearStyles.styles';\nimport type {\n CalendarYearStrings,\n CalendarYearProps,\n CalendarYearRange,\n CalendarYearHeaderProps,\n} from './CalendarYear.types';\n\nconst CELL_COUNT = 12;\nconst CELLS_PER_ROW = 4;\n\nconst DefaultCalendarYearStrings: CalendarYearStrings = {\n prevRangeAriaLabel: undefined,\n nextRangeAriaLabel: undefined,\n};\ninterface CalendarYearGrid {\n focus(): void;\n}\n\ninterface CalendarYearGridCellProps extends CalendarYearProps {\n year: number;\n current?: boolean;\n selected?: boolean;\n disabled?: boolean;\n onSelectYear?: (year: number) => void;\n onRenderYear?: (year: number) => React.ReactNode;\n}\n\ninterface CalendarYearGridProps extends CalendarYearProps, CalendarYearRange {\n selectedYear?: number;\n animateBackwards?: boolean;\n componentRef?: React.RefObject<CalendarYearGridCell>;\n}\n\ninterface CalendarYearGridCell {\n focus(): void;\n}\n\nconst CalendarYearGridCell: React.FunctionComponent<CalendarYearGridCellProps> = props => {\n const {\n className,\n highlightCurrentYear,\n highlightSelectedYear,\n year,\n selected,\n disabled,\n componentRef,\n onSelectYear,\n onRenderYear,\n } = props;\n\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n\n React.useImperativeHandle(\n componentRef,\n () => ({\n focus() {\n buttonRef.current?.focus?.();\n },\n }),\n [],\n );\n\n const onClick = () => {\n onSelectYear?.(year);\n };\n\n const onKeyDown = (ev: React.KeyboardEvent<HTMLElement>) => {\n if (ev.key === Enter) {\n onSelectYear?.(year);\n }\n };\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n highlightCurrent: highlightCurrentYear,\n highlightSelected: highlightSelectedYear,\n });\n\n return (\n <button\n className={mergeClasses(classNames.itemButton, selected && classNames.selected, disabled && classNames.disabled)}\n type=\"button\"\n role=\"gridcell\"\n onClick={!disabled ? onClick : undefined}\n onKeyDown={!disabled ? onKeyDown : undefined}\n disabled={disabled}\n aria-selected={selected}\n ref={buttonRef}\n >\n {onRenderYear?.(year) ?? year}\n </button>\n );\n};\nCalendarYearGridCell.displayName = 'CalendarYearGridCell';\n\nconst CalendarYearGrid: React.FunctionComponent<CalendarYearGridProps> = props => {\n const {\n className,\n fromYear,\n toYear,\n animationDirection,\n animateBackwards,\n minYear,\n maxYear,\n onSelectYear,\n selectedYear,\n componentRef,\n } = props;\n\n const selectedCellRef = React.useRef<CalendarYearGridCell>(null);\n const currentCellRef = React.useRef<CalendarYearGridCell>(null);\n\n React.useImperativeHandle(\n componentRef,\n () => ({\n focus() {\n (selectedCellRef.current || currentCellRef.current)?.focus?.();\n },\n }),\n [],\n );\n\n const renderCell = (yearToRender: number): React.ReactNode => {\n const selected = yearToRender === selectedYear;\n const disabled =\n (minYear !== undefined && yearToRender < minYear) || (maxYear !== undefined && yearToRender > maxYear);\n const current = yearToRender === new Date().getFullYear();\n\n return (\n <CalendarYearGridCell\n {...props}\n key={yearToRender}\n year={yearToRender}\n selected={selected}\n current={current}\n disabled={disabled}\n onSelectYear={onSelectYear}\n componentRef={selected ? selectedCellRef : current ? currentCellRef : undefined}\n />\n );\n };\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n animateBackwards,\n animationDirection,\n });\n\n const onRenderYear = (value: number) => {\n return props.onRenderYear?.(value) ?? value;\n };\n\n const gridAriaLabel = `${onRenderYear(fromYear)} - ${onRenderYear(toYear)}`;\n\n let year = fromYear;\n const cells: React.ReactNode[][] = [];\n\n for (let i = 0; i < (toYear - fromYear + 1) / CELLS_PER_ROW; i++) {\n cells.push([]);\n for (let j = 0; j < CELLS_PER_ROW; j++) {\n cells[i].push(renderCell(year));\n year++;\n }\n }\n\n const arrowNavigationAttributes = useArrowNavigationGroup({ axis: 'grid' });\n\n return (\n <div {...arrowNavigationAttributes} className={classNames.gridContainer} role=\"grid\" aria-label={gridAriaLabel}>\n {cells.map((cellRow: React.ReactNode[], index: number) => {\n return (\n <div key={'yearPickerRow_' + index + '_' + fromYear} role=\"row\" className={classNames.buttonRow}>\n {cellRow}\n </div>\n );\n })}\n </div>\n );\n};\nCalendarYearGrid.displayName = 'CalendarYearGrid';\n\nconst CalendarYearNavDirection = {\n Previous: 0 as const,\n Next: 1 as const,\n};\n\ninterface CalendarYearNavArrowProps extends CalendarYearHeaderProps {\n direction: (typeof CalendarYearNavDirection)[keyof typeof CalendarYearNavDirection];\n}\n\nconst CalendarYearNavArrow: React.FunctionComponent<CalendarYearNavArrowProps> = props => {\n const {\n className,\n strings = DefaultCalendarYearStrings,\n direction,\n onSelectPrev,\n onSelectNext,\n fromYear,\n toYear,\n maxYear,\n minYear,\n navigationIcons,\n } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n });\n\n const ariaLabel =\n direction === CalendarYearNavDirection.Previous ? strings.prevRangeAriaLabel : strings.nextRangeAriaLabel;\n const newRangeOffset = direction === CalendarYearNavDirection.Previous ? -CELL_COUNT : CELL_COUNT;\n const newRange = { fromYear: fromYear + newRangeOffset, toYear: toYear + newRangeOffset };\n const ariaLabelString = ariaLabel ? (typeof ariaLabel === 'string' ? ariaLabel : ariaLabel(newRange)) : undefined;\n const disabled =\n direction === CalendarYearNavDirection.Previous\n ? minYear !== undefined && fromYear < minYear\n : maxYear !== undefined && props.fromYear + CELL_COUNT > maxYear;\n\n const onNavigate = () => {\n direction === CalendarYearNavDirection.Previous ? onSelectPrev?.() : onSelectNext?.();\n };\n\n const onKeyDown = (ev: React.KeyboardEvent<HTMLElement>) => {\n if (ev.key === Enter) {\n onNavigate();\n }\n };\n\n return (\n <button\n className={mergeClasses(classNames.navigationButton, disabled && classNames.disabled)}\n onClick={!disabled ? onNavigate : undefined}\n onKeyDown={!disabled ? onKeyDown : undefined}\n type=\"button\"\n title={ariaLabelString}\n disabled={disabled}\n >\n {direction === CalendarYearNavDirection.Previous ? navigationIcons.upNavigation : navigationIcons.downNavigation}\n </button>\n );\n};\nCalendarYearNavArrow.displayName = 'CalendarYearNavArrow';\n\nconst CalendarYearNav: React.FunctionComponent<CalendarYearHeaderProps> = props => {\n const { className } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n });\n\n return (\n <div className={classNames.navigationButtonsContainer}>\n <CalendarYearNavArrow {...props} direction={CalendarYearNavDirection.Previous} />\n <CalendarYearNavArrow {...props} direction={CalendarYearNavDirection.Next} />\n </div>\n );\n};\nCalendarYearNav.displayName = 'CalendarYearNav';\n\nconst CalendarYearTitle: React.FunctionComponent<CalendarYearHeaderProps> = props => {\n const {\n className,\n fromYear,\n toYear,\n strings = DefaultCalendarYearStrings,\n animateBackwards,\n animationDirection,\n } = props;\n\n const onHeaderSelect = () => {\n props.onHeaderSelect?.(true);\n };\n\n const onHeaderKeyDown = (ev: React.KeyboardEvent<HTMLElement>) => {\n if (ev.key === Enter || ev.key === Space) {\n onHeaderSelect();\n }\n };\n\n const onRenderYear = (year: number) => {\n return props.onRenderYear?.(year) ?? year;\n };\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n hasHeaderClickCallback: !!props.onHeaderSelect,\n animateBackwards,\n animationDirection,\n });\n\n if (props.onHeaderSelect) {\n const rangeAriaLabel = strings.rangeAriaLabel;\n const headerAriaLabelFormatString = strings.headerAriaLabelFormatString;\n const currentDateRange = rangeAriaLabel\n ? typeof rangeAriaLabel === 'string'\n ? rangeAriaLabel\n : rangeAriaLabel(props)\n : undefined;\n\n const ariaLabel = headerAriaLabelFormatString\n ? headerAriaLabelFormatString.replace('{0}', currentDateRange ?? '')\n : currentDateRange;\n\n return (\n <button\n className={classNames.currentItemButton}\n onClick={onHeaderSelect}\n onKeyDown={onHeaderKeyDown}\n aria-label={ariaLabel}\n role=\"button\"\n type=\"button\"\n >\n <span aria-live=\"assertive\" aria-atomic=\"true\">\n {onRenderYear(fromYear)} - {onRenderYear(toYear)}\n </span>\n </button>\n );\n }\n\n return (\n <div className={classNames.current}>\n {onRenderYear(fromYear)} - {onRenderYear(toYear)}\n </div>\n );\n};\nCalendarYearTitle.displayName = 'CalendarYearTitle';\n\nconst CalendarYearHeader: React.FunctionComponent<CalendarYearHeaderProps> = props => {\n const { className, animateBackwards, animationDirection, onRenderTitle } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n hasHeaderClickCallback: !!props.onHeaderSelect,\n animateBackwards,\n animationDirection,\n });\n\n return (\n <div className={classNames.headerContainer}>\n {onRenderTitle?.(props) ?? <CalendarYearTitle {...props} />}\n <CalendarYearNav {...props} />\n </div>\n );\n};\nCalendarYearHeader.displayName = 'CalendarYearHeader';\n\nfunction useAnimateBackwards({ selectedYear, navigatedYear }: CalendarYearProps) {\n const rangeYear = selectedYear || navigatedYear || new Date().getFullYear();\n const fromYear = Math.floor(rangeYear / 10) * 10;\n\n const previousFromYearRef = React.useRef<number | undefined>(fromYear);\n React.useRef(() => {\n previousFromYearRef.current = fromYear;\n });\n const previousFromYear = previousFromYearRef.current;\n\n if (!previousFromYear || previousFromYear === fromYear) {\n return undefined;\n } else if (previousFromYear > fromYear) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction useYearRangeState({ selectedYear, navigatedYear }: CalendarYearProps) {\n const rangeYear = React.useMemo(() => {\n return selectedYear || navigatedYear || Math.floor(new Date().getFullYear() / 10) * 10;\n }, [navigatedYear, selectedYear]);\n\n const [fromYear, setFromYear] = React.useState<number>(rangeYear);\n\n const onNavNext = () => {\n setFromYear(year => year + CELL_COUNT);\n };\n\n const onNavPrevious = () => {\n setFromYear(year => year - CELL_COUNT);\n };\n\n React.useEffect(() => {\n setFromYear(rangeYear);\n }, [rangeYear]);\n\n const toYear = fromYear + CELL_COUNT - 1;\n\n return [fromYear, toYear, onNavNext, onNavPrevious] as const;\n}\n\n/**\n * @internal\n */\nexport const CalendarYear: React.FunctionComponent<CalendarYearProps> = props => {\n const animateBackwards = useAnimateBackwards(props);\n const [fromYear, toYear, onNavNext, onNavPrevious] = useYearRangeState(props);\n\n const gridRef = React.useRef<CalendarYearGrid>(null);\n\n React.useImperativeHandle(props.componentRef, () => ({\n focus() {\n gridRef.current?.focus?.();\n },\n }));\n\n const { className } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n });\n\n return (\n <div className={classNames.root}>\n <CalendarYearHeader\n {...props}\n fromYear={fromYear}\n toYear={toYear}\n onSelectPrev={onNavPrevious}\n onSelectNext={onNavNext}\n animateBackwards={animateBackwards}\n />\n <CalendarYearGrid\n {...props}\n fromYear={fromYear}\n toYear={toYear}\n animateBackwards={animateBackwards}\n componentRef={gridRef}\n />\n </div>\n );\n};\nCalendarYear.displayName = 'CalendarYear';\n"],"names":["CalendarYear","CELL_COUNT","CELLS_PER_ROW","DefaultCalendarYearStrings","prevRangeAriaLabel","undefined","nextRangeAriaLabel","CalendarYearGridCell","props","className","highlightCurrentYear","highlightSelectedYear","year","selected","disabled","componentRef","onSelectYear","onRenderYear","buttonRef","React","useRef","useImperativeHandle","focus","current","onClick","onKeyDown","ev","key","Enter","classNames","useCalendarYearStyles_unstable","highlightCurrent","highlightSelected","createElement","button","mergeClasses","itemButton","type","role","aria-selected","ref","displayName","CalendarYearGrid","fromYear","toYear","animationDirection","animateBackwards","minYear","maxYear","selectedYear","selectedCellRef","currentCellRef","_focus","_this","call","renderCell","yearToRender","Date","getFullYear","value","gridAriaLabel","cells","i","push","j","arrowNavigationAttributes","useArrowNavigationGroup","axis","div","gridContainer","aria-label","map","cellRow","index","buttonRow","CalendarYearNavDirection","Previous","Next","CalendarYearNavArrow","strings","direction","onSelectPrev","onSelectNext","navigationIcons","ariaLabel","newRangeOffset","newRange","ariaLabelString","onNavigate","navigationButton","title","upNavigation","downNavigation","CalendarYearNav","navigationButtonsContainer","CalendarYearTitle","onHeaderSelect","onHeaderKeyDown","Space","hasHeaderClickCallback","rangeAriaLabel","headerAriaLabelFormatString","currentDateRange","replace","currentItemButton","span","aria-live","aria-atomic","CalendarYearHeader","onRenderTitle","headerContainer","useAnimateBackwards","navigatedYear","rangeYear","Math","floor","previousFromYearRef","previousFromYear","useYearRangeState","useMemo","setFromYear","useState","onNavNext","onNavPrevious","useEffect","gridRef","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA6YaA;;;eAAAA;;;;iEA7YU;8BACM;8BACW;wBACX;6CACkB;AAQ/C,MAAMC,aAAa;AACnB,MAAMC,gBAAgB;AAEtB,MAAMC,6BAAkD;IACtDC,oBAAoBC;IACpBC,oBAAoBD;AACtB;AAwBA,MAAME,uBAA2EC,CAAAA;IAC/E,MAAM,EACJC,SAAS,EACTC,oBAAoB,EACpBC,qBAAqB,EACrBC,IAAI,EACJC,QAAQ,EACRC,QAAQ,EACRC,YAAY,EACZC,YAAY,EACZC,YAAY,EACb,GAAGT;IAEJ,MAAMU,YAAYC,OAAMC,MAAM,CAAoB;IAElDD,OAAME,mBAAmB,CACvBN,cACA,IAAO,CAAA;YACLO;oBACEJ,0BAAAA;gBAAAA,CAAAA,qBAAAA,UAAUK,OAAO,AAAPA,MAAO,QAAjBL,uBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,2BAAAA,mBAAmBI,KAAK,AAALA,MAAK,QAAxBJ,6BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,yBAAAA,IAAAA,CAAAA;YACF;QACF,CAAA,GACA,EAAE;IAGJ,MAAMM,UAAU;QACdR,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,KAAAA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AWoB,WAAWiG,IAAI;qBAC7B3G,OAAAc,aAAA,CAAC2E,oBAAAA;QACE,GAAGpG,KAAK;QACTmC,UAAUA;QACVC,QAAQA;QACRqC,cAAc0C;QACdzC,cAAcwC;QACd5E,kBAAkBA;sBAEpB3B,OAAAc,aAAA,CAACS,kBAAAA;QACE,GAAGlC,KAAK;QACTmC,UAAUA;QACVC,QAAQA;QACRE,kBAAkBA;QAClB/B,cAAc8G;;AAItB;AACA7H,aAAayC,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["CalendarYear.types.
|
1
|
+
{"version":3,"sources":["CalendarYear.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { CalendarNavigationIcons } from '../Calendar/calendarNavigationIcons';\nimport type { CalendarPickerStyleProps, CalendarPickerStyles } from '../CalendarPicker/CalendarPicker.types';\n\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ICalendarYear {\n focus(): void;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearRange {\n fromYear: number;\n toYear: number;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearRangeToString {\n (range: CalendarYearRange): string;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearStrings {\n rangeAriaLabel?: string | CalendarYearRangeToString;\n prevRangeAriaLabel?: string | CalendarYearRangeToString;\n nextRangeAriaLabel?: string | CalendarYearRangeToString;\n headerAriaLabelFormatString?: string;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearProps {\n /**\n * Optional callback to access the ICalendarYear interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<ICalendarYear>;\n\n /**\n * Localized strings to use in the Calendar\n */\n strings?: CalendarYearStrings;\n\n /**\n * The currently selected year\n */\n selectedYear?: number;\n\n /**\n * The currently navigated year\n */\n navigatedYear?: number;\n\n /**\n * Callback action when a year is selected\n * @param year - The year the user selected\n */\n onSelectYear?: (year: number) => void;\n\n /**\n * Callback action when the header is selected\n */\n onHeaderSelect?: (focus: boolean) => void;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a year earlier than this value.\n */\n minYear?: number;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a year later than this value.\n */\n maxYear?: number;\n\n /**\n * Whether the year picker should highlight the current year\n * @default false\n */\n highlightCurrentYear?: boolean;\n\n /**\n * Whether the year picker should highlight the selected year\n * @default false\n */\n highlightSelectedYear?: boolean;\n\n /**\n * Accept custom classNames\n */\n className?: string;\n\n /**\n * Custom renderer for the title\n */\n onRenderTitle?: (props: CalendarYearHeaderProps) => React.ReactNode;\n\n /**\n * Custom renderer for the year\n */\n onRenderYear?: (year: number) => React.ReactNode;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or veritcal\n */\n animationDirection?: AnimationDirection;\n\n /**\n * Custom navigation icons.\n */\n navigationIcons: CalendarNavigationIcons;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearStyleProps extends CalendarPickerStyleProps {}\n\n/**\n * @internal\n */\nexport interface CalendarYearStyles extends CalendarPickerStyles {}\n\n/**\n * @internal\n */\nexport interface CalendarYearHeaderProps extends CalendarYearProps, CalendarYearRange {\n /**\n * Callback action when the 'previous' navigation button is selected\n */\n onSelectPrev?: () => void;\n\n /**\n * Callback action when the 'next' navigation button is selected\n */\n onSelectNext?: () => void;\n\n /**\n * Whether title entering animation should be forwards or backwards\n */\n animateBackwards?: boolean;\n}\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './CalendarYear';\nexport * from './CalendarYear.types';\nexport * from './useCalendarYearStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCalendarYearStyles.styles.js"],"sourcesContent":["import { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\n/**\n * @internal\n *\n * Apply styling to the CalendarYear slots based on the state\n
|
1
|
+
{"version":3,"sources":["useCalendarYearStyles.styles.js"],"sourcesContent":["import { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\n/**\n * @internal\n *\n * Apply styling to the CalendarYear slots based on the state\n */ export const useCalendarYearStyles_unstable = (props)=>{\n 'use no memo';\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarYearStyles_unstable","props","useCalendarPickerStyles_unstable"],"rangeMappings":";;;;;;;;;;;;;;","mappings":";;;;+BAKiBA;;;eAAAA;;;+CALgC;AAKtC,MAAMA,iCAAkCC,CAAAA;IAC/C;IACA,OAAOC,IAAAA,+DAAgC,EAACD;AAC5C"}
|