@fluentui/react-calendar-compat 0.3.9 → 0.3.11
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/components/Calendar/Calendar.js +1 -0
- package/lib/components/Calendar/Calendar.js.map +1 -1
- package/lib/components/Calendar/useCalendarStyles.styles.js +2 -0
- package/lib/components/Calendar/useCalendarStyles.styles.js.map +1 -1
- package/lib/components/Calendar/useCalendarStyles.styles.raw.js +1 -0
- package/lib/components/Calendar/useCalendarStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarDay/CalendarDay.js +1 -0
- package/lib/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js +2 -0
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.raw.js +1 -0
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js +1 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +1 -0
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +2 -0
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js +1 -0
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js +2 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js +1 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarDayGrid/useWeeks.js +1 -0
- package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -1
- package/lib/components/CalendarMonth/CalendarMonth.js +1 -0
- package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.js +2 -0
- package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.js.map +1 -1
- package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js +1 -0
- package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js +2 -0
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js +1 -0
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarYear/CalendarYear.js +2 -5
- package/lib/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js +2 -0
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.raw.js +1 -0
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +1 -1
- package/lib/utils/dateMath/dateMath.js +14 -3
- package/lib/utils/dateMath/dateMath.js.map +1 -1
- package/lib-commonjs/components/Calendar/Calendar.js +1 -0
- package/lib-commonjs/components/Calendar/Calendar.js.map +1 -1
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js +1 -0
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/CalendarDay.js +1 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js +1 -0
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js +1 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.js +1 -0
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js +1 -0
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/CalendarYear.js +2 -5
- package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js +1 -0
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/utils/dateMath/dateMath.js +14 -3
- package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarDayGrid/useWeekCornerStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/useWeekCornerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { mergeClasses } from '@griffel/react';\nimport { DateRangeType } from '../../utils/constants';\nimport { getDateRangeArray } from '../../utils/index';\nimport { DayInfo } from './CalendarDayGrid';\nimport { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport 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/**\n * @internal\n */\nexport interface WeekCorners {\n [key: string]: string;\n}\n\n/**\n * @internal\n */\nexport function useWeekCornerStyles(\n props: CalendarDayGridProps,\n): readonly [\n (initialWeeks: DayInfo[][]) => WeekCorners,\n (above: boolean, below: boolean, left: boolean, right: boolean) => string,\n] {\n const { dir } = useFluent_unstable();\n\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 */\n const getWeekCornerStyles = (initialWeeks: DayInfo[][]): WeekCorners => {\n const weekCornersStyled: { [key: string]: string } = {};\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 */\n\n // cut off the animation transition weeks\n const weeks = initialWeeks.slice(1, initialWeeks.length - 1);\n\n // if there's an item above, lose both top corners. Item below, lose both bottom corners, etc.\n weeks.forEach((week: DayInfo[], weekIndex: number) => {\n week.forEach((day: DayInfo, dayIndex: number) => {\n const above =\n weeks[weekIndex - 1] &&\n weeks[weekIndex - 1][dayIndex] &&\n isInSameHoverRange(\n weeks[weekIndex - 1][dayIndex].originalDate,\n day.originalDate,\n weeks[weekIndex - 1][dayIndex].isSelected,\n day.isSelected,\n );\n const below =\n weeks[weekIndex + 1] &&\n weeks[weekIndex + 1][dayIndex] &&\n isInSameHoverRange(\n weeks[weekIndex + 1][dayIndex].originalDate,\n day.originalDate,\n weeks[weekIndex + 1][dayIndex].isSelected,\n day.isSelected,\n );\n const left =\n weeks[weekIndex][dayIndex - 1] &&\n isInSameHoverRange(\n weeks[weekIndex][dayIndex - 1].originalDate,\n day.originalDate,\n weeks[weekIndex][dayIndex - 1].isSelected,\n day.isSelected,\n );\n const right =\n weeks[weekIndex][dayIndex + 1] &&\n isInSameHoverRange(\n weeks[weekIndex][dayIndex + 1].originalDate,\n day.originalDate,\n weeks[weekIndex][dayIndex + 1].isSelected,\n day.isSelected,\n );\n\n weekCornersStyled[weekIndex + '_' + dayIndex] = calculateRoundedStyles(above, below, left, right);\n });\n });\n\n return weekCornersStyled;\n };\n\n const calculateRoundedStyles = (above: boolean, below: boolean, left: boolean, right: boolean): string => {\n const style = [];\n const roundedTopLeft = !above && !left;\n const roundedTopRight = !above && !right;\n const roundedBottomLeft = !below && !left;\n const roundedBottomRight = !below && !right;\n\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(\n dir === 'rtl' ? weekCornersClassNames.bottomRightCornerDate : weekCornersClassNames.bottomLeftCornerDate,\n );\n }\n if (roundedBottomRight) {\n style.push(\n dir === 'rtl' ? weekCornersClassNames.bottomLeftCornerDate : weekCornersClassNames.bottomRightCornerDate,\n );\n }\n\n return mergeClasses(...style);\n };\n\n const isInSameHoverRange = (date1: Date, date2: Date, date1Selected: boolean, date2Selected: boolean): boolean => {\n const { dateRangeType, firstDayOfWeek, workWeekDays } = props;\n\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\n // we do not pass daysToSelectInDayView because we handle setting those styles dyanamically in onMouseOver\n const dateRange = getDateRangeArray(date1, dateRangeHoverType, firstDayOfWeek, workWeekDays);\n\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\n // otherwise, both must be unselected, so check the dateRange\n return dateRange.filter((date: Date) => date.getTime() === date2.getTime()).length > 0;\n };\n\n return [getWeekCornerStyles, calculateRoundedStyles] as const;\n}\n"],"names":["useFluent_unstable","mergeClasses","DateRangeType","getDateRangeArray","weekCornersClassNames","topRightCornerDate","topLeftCornerDate","bottomRightCornerDate","bottomLeftCornerDate","useWeekCornerStyles","props","dir","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","date1","date2","date1Selected","date2Selected","dateRangeType","firstDayOfWeek","workWeekDays","dateRangeHoverType","WorkWeek","Week","dateRange","filter","date","getTime"],"mappings":"AAAA;;;;;;;;;;;;IA6BgBS,mBAAAA;;;IAjBHL,qBAAAA;;;;qCAVsB,kCAAkC;uBACxC,iBAAiB;2BAChB,wBAAwB;uBACpB,oBAAoB;AAO/C,8BAA8B;IACnCC,oBAAoB;IACpBC,mBAAmB;IACnBC,uBAAuB;IACvBC,sBAAsB;AACxB,EAAE;AAYK,6BACLE,KAA2B;IAK3B,MAAM,EAAEC,GAAG,EAAE,OAAGX,uCAAAA;IAEhB;;;;;;;GAOC,GACD,MAAMY,sBAAsB,CAACC;QAC3B,MAAMC,oBAA+C,CAAC;QACtD;;;;;;;;;;;;IAYA,GAEA,yCAAyC;QACzC,MAAMC,QAAQF,aAAaG,KAAK,CAAC,GAAGH,aAAaI,MAAM,GAAG;QAE1D,8FAA8F;QAC9FF,MAAMG,OAAO,CAAC,CAACC,MAAiBC;YAC9BD,KAAKD,OAAO,CAAC,CAACG,KAAcC;gBAC1B,MAAMC,QACJR,KAAK,CAACK,YAAY,EAAE,IACpBL,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,IAC9BE,mBACET,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACG,YAAY,EAC3CJ,IAAII,YAAY,EAChBV,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACI,UAAU,EACzCL,IAAIK,UAAU;gBAElB,MAAMC,QACJZ,KAAK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/G;QACA,IAAI6B,mBAAmB;YACrBH,MAAMK,IAAI,CACRzB,QAAQ,QAAQP,sBAAsBG,qBAAqB,GAAGH,sBAAsBI,oBAAoB;QAE5G;QACA,IAAI2B,oBAAoB;YACtBJ,MAAMK,IAAI,CACRzB,QAAQ,QAAQP,sBAAsBI,oBAAoB,GAAGJ,sBAAsBG,qBAAqB;QAE5G;QAEA,WAAON,mBAAAA,KAAgB8B;IACzB;IAEA,MAAMP,qBAAqB,CAACa,OAAaC,OAAaC,eAAwBC;QAC5E,MAAM,EAAEC,aAAa,EAAEC,cAAc,EAAEC,YAAY,EAAE,GAAGjC;QAExD,8GAA8G;QAC9G,MAAMkC,qBAAqBH,kBAAkBvC,wBAAAA,CAAc2C,QAAQ,GAAG3C,wBAAAA,CAAc4C,IAAI,GAAGL;QAE3F,0GAA0G;QAC1G,MAAMM,gBAAY5C,wBAAAA,EAAkBkC,OAAOO,oBAAoBF,gBAAgBC;QAE/E,IAAIJ,kBAAkBC,eAAe;YACnC,2EAA2E;YAC3E,OAAO;QACT,OAAO,IAAID,iBAAiBC,eAAe;YACzC,2EAA2E;YAC3E,OAAO;QACT;QAEA,6DAA6D;QAC7D,OAAOO,UAAUC,MAAM,CAAC,CAACC,OAAeA,KAAKC,OAAO,OAAOZ,MAAMY,OAAO,IAAIjC,MAAM,GAAG;IACvF;IAEA,OAAO;QAACL;QAAqBkB;KAAuB;AACtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarDayGrid/useWeeks.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/useWeeks.ts"],"sourcesContent":["'use client';\n\nimport * 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":["React","compareDates","DAYS_IN_WEEK","getDayGrid","useWeeks","props","onSelectDate","getSetRefCallback","weeks","useMemo","weeksGrid","firstVisibleDay","originalDate","lastVisibleDay","length","markedDays","getMarkedDays","returnValue","weekIndex","week","dayIndex","day","dayInfo","onSelected","setRef","key","isMarked","some","markedDay","push"],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F,oEAAoE;IACpE,uDAAuD;IACzD,GAAG;QAACZ;KAAM;IAEV,OAAOG;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarMonth/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>(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.monthPickerHeaderAriaLabel,\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":["React","Enter","useArrowNavigationGroup","mergeClasses","addYears","compareDatePart","getMonthEnd","getMonthStart","getYearEnd","getYearStart","setMonth","DEFAULT_DATE_FORMATTING","CalendarYear","useCalendarMonthStyles_unstable","MONTHS_PER_ROW","useAnimateBackwards","navigatedDate","currentYear","getFullYear","previousYearRef","useRef","undefined","useEffect","current","previousYear","useFocusLogic","componentRef","navigatedMonthRef","calendarYearRef","focusOnUpdate","focus","useCallback","useImperativeHandle","focusOnNextUpdate","CalendarMonth","props","allFocusable","animationDirection","className","dateTimeFormatter","highlightCurrentMonth","highlightSelectedMonth","maxDate","minDate","navigationIcons","onHeaderSelect","onUserHeaderSelect","onNavigateDate","selectedDate","strings","today","Date","yearPickerHidden","isYearPickerVisible","setIsYearPickerVisible","useState","animateBackwards","selectMonthCallback","newMonth","onSelectMonth","onSelectNextYear","onSelectPrevYear","onSelectYear","selectedYear","navYear","newNavigationDate","getTime","setFullYear","getMonth","onYearPickerHeaderSelect","dateFormatter","isPrevYearInBounds","isNextYearInBounds","classNames","hasHeaderClickCallback","highlightCurrent","highlightSelected","arrowNavigationAttributes","axis","onRenderYear","yearStrings","getYearStrings","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","navigationButton","disabled","aria-disabled","title","prevYearAriaLabel","upNavigation","nextYearAriaLabel","downNavigation","gridContainer","role","map","rowNum","monthsForRow","slice","buttonRow","month","index","monthIndex","indexedMonth","isNavigatedMonth","isSelectedMonth","isSelectedYear","isInBounds","ref","itemButton","isCurrentMonth","selected","formatMonth","aria-selected","displayName","yearToString","year","yearFormattingDate","String","yearRangeToString","yearRange","fromYear","toYear","yearRangeToNextDecadeLabel","nextYearRangeAriaLabel","yearRangeToPrevDecadeLabel","prevYearRangeAriaLabel","rangeAriaLabel","prevRangeAriaLabel","nextRangeAriaLabel","headerAriaLabelFormatString","callback","ev"],"mappings":";;;;+BAqEakC;;;;;;;iEArEU,QAAQ;8BACT,0BAA0B;8BACR,0BAA0B;wBACrC,iBAAiB;uBAUvC,cAAc;8BACQ,+BAA+B;8CACZ,kCAAkC;AAIlF,MAAMpB,iBAAiB;AAEvB,SAASC,oBAAoB,EAAEC,aAAa,EAA0D;IACpG,MAAMC,cAAcD,cAAcE,WAAW;IAE7C,MAAMC,kBAAkBnB,OAAMoB,MAAM,CAAqBC;IACzDrB,OAAMsB,SAAS,CAAC;QACdH,gBAAgBI,OAAO,GAAGN;IAC5B;IACA,MAAMO,eAAeL,gBAAgBI,OAAO;IAE5C,IAAIC,iBAAiBH,aAAaG,iBAAiBP,aAAa;QAC9D,OAAOI;IACT,OAAO;QACL,OAAOG,eAAeP;IACxB;AACF;AAEA,SAASQ,cAAc,EAAEC,YAAY,EAA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AAC9D;AAEA,SAASvB,gBAAgBsD,QAAoB;IAC3C,OAAO,CAACC;QACN,OAAQA,GAAG9E,GAAG;YACZ,KAAKjF,mBAAAA;gBACH8J;gBACA;QACJ;IACF;AACF"}
|
|
1
|
+
{"version":3,"sources":["../src/components/CalendarMonth/CalendarMonth.tsx"],"sourcesContent":["'use client';\n\nimport * 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>(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.monthPickerHeaderAriaLabel,\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":["React","Enter","useArrowNavigationGroup","mergeClasses","addYears","compareDatePart","getMonthEnd","getMonthStart","getYearEnd","getYearStart","setMonth","DEFAULT_DATE_FORMATTING","CalendarYear","useCalendarMonthStyles_unstable","MONTHS_PER_ROW","useAnimateBackwards","navigatedDate","currentYear","getFullYear","previousYearRef","useRef","undefined","useEffect","current","previousYear","useFocusLogic","componentRef","navigatedMonthRef","calendarYearRef","focusOnUpdate","focus","useCallback","useImperativeHandle","focusOnNextUpdate","CalendarMonth","props","allFocusable","animationDirection","className","dateTimeFormatter","highlightCurrentMonth","highlightSelectedMonth","maxDate","minDate","navigationIcons","onHeaderSelect","onUserHeaderSelect","onNavigateDate","selectedDate","strings","today","Date","yearPickerHidden","isYearPickerVisible","setIsYearPickerVisible","useState","animateBackwards","selectMonthCallback","newMonth","onSelectMonth","onSelectNextYear","onSelectPrevYear","onSelectYear","selectedYear","navYear","newNavigationDate","getTime","setFullYear","getMonth","onYearPickerHeaderSelect","dateFormatter","isPrevYearInBounds","isNextYearInBounds","classNames","hasHeaderClickCallback","highlightCurrent","highlightSelected","arrowNavigationAttributes","axis","onRenderYear","yearStrings","getYearStrings","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","navigationButton","disabled","aria-disabled","title","prevYearAriaLabel","upNavigation","nextYearAriaLabel","downNavigation","gridContainer","role","map","rowNum","monthsForRow","slice","buttonRow","month","index","monthIndex","indexedMonth","isNavigatedMonth","isSelectedMonth","isSelectedYear","isInBounds","ref","itemButton","isCurrentMonth","selected","formatMonth","aria-selected","displayName","yearToString","year","yearFormattingDate","String","yearRangeToString","yearRange","fromYear","toYear","yearRangeToNextDecadeLabel","nextYearRangeAriaLabel","yearRangeToPrevDecadeLabel","prevYearRangeAriaLabel","rangeAriaLabel","prevRangeAriaLabel","nextRangeAriaLabel","headerAriaLabelFormatString","callback","ev"],"mappings":"AAAA;;;;;+BAuEakC;;;;;;;iEArEU,QAAQ;8BACT,0BAA0B;8BACR,0BAA0B;wBACrC,iBAAiB;uBAUvC,cAAc;8BACQ,+BAA+B;8CACZ,kCAAkC;AAIlF,MAAMpB,iBAAiB;AAEvB,SAASC,oBAAoB,EAAEC,aAAa,EAA0D;IACpG,MAAMC,cAAcD,cAAcE,WAAW;IAE7C,MAAMC,kBAAkBnB,OAAMoB,MAAM,CAAqBC;IACzDrB,OAAMsB,SAAS,CAAC;QACdH,gBAAgBI,OAAO,GAAGN;IAC5B;IACA,MAAMO,eAAeL,gBAAgBI,OAAO;IAE5C,IAAIC,iBAAiBH,aAAaG,iBAAiBP,aAAa;QAC9D,OAAOI;IACT,OAAO;Q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OAAOA,MAAMhC,WAAW,OAAO8H,QAAQ9F,MAAMkB,QAAQ,OAAO4D;AAC9D;AAEA,SAASvB,gBAAgBsD,QAAoB;IAC3C,OAAO,CAACC;QACN,OAAQA,GAAG9E,GAAG;YACZ,KAAKjF,mBAAAA;gBACH8J;gBACA;QACJ;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useCalendarMonthStyles.styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["useCalendarMonthStyles.styles.js"],"sourcesContent":["'use client';\nimport { 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":["useCalendarPickerStyles_unstable","useCalendarMonthStyles_unstable","props"],"mappings":"AAAA,YAAY;;;;;;;;;;;+CACqC,kDAAkD;AAKxF,MAAMC,+BAA+B,IAAIC,KAAK,IAAG;IACxD,aAAa;IACb,WAAOF,+DAAgC,EAACE,KAAK,CAAC;AAClD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarMonth/useCalendarMonthStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/CalendarMonth/useCalendarMonthStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\nimport type { CalendarMonthStyleProps, CalendarMonthStyles } from './CalendarMonth.types';\n\n/**\n * @internal\n *\n * Apply styling to the CalendarMonth slots based on the state\n */\nexport const useCalendarMonthStyles_unstable = (props: CalendarMonthStyleProps): CalendarMonthStyles => {\n 'use no memo';\n\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarPickerStyles_unstable","useCalendarMonthStyles_unstable","props"],"mappings":"AAAA;;;;;;;;;;;+CAEiD,mDAAmD;AAQ7F,MAAMC,kCAAkC,CAACC;IAC9C;IAEA,WAAOF,+DAAAA,EAAiCE;AAC1C,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
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":["tokens","__styles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","AnimationDirection","calendarPickerClassNames","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","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","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"mappings":";;;;;;;;;;;IAMiBc,wBAAwB;;;oCAiQQ;eAAhCoI;;;uBAtQoC,gBAAgB;+BAElC,4BAA4B;AAGpD,iCAAiC;IACxCnI,IAAI,EAAE,oBAAoB;IAC1BC,eAAe,EAAE,qCAAqC;IACtDC,iBAAiB,EAAE,uCAAuC;IAC1DC,0BAA0B,EAAE,gDAAgD;IAC5EC,gBAAgB,EAAE,sCAAsC;IACxDC,aAAa,EAAE,mCAAmC;IAClDC,SAAS,EAAE,+BAA+B;IAC1CC,UAAU,EAAE,gCAAgC;IAC5CC,OA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,iCAAkB,CAACsJ,UAAU,GAAGJ,gBAAgB,GAAGL,eAAe,CAAC1C,kBAAkB,GAAG0C,eAAe,CAACzC,iBAAiB,GAAG8C,gBAAgB,GAAGL,eAAe,CAACxC,gBAAgB,GAAGwC,eAAe,CAACvC,eAAAA,AAAe,CAAC,CAAC;QAC1X7F,UAAU,MAAEpB,mBAAY,EAACY,wBAAwB,CAACQ,UAAU,EAAEqI,gBAAgB,CAAChI,IAAI,CAAC;QACpFH,QAAQ,MAAEtB,mBAAY,EAACY,wBAAwB,CAACU,QAAQ,EAAEsH,iBAAiB,IAAIe,cAAc,CAACf,iBAAiB,CAAC;QAChHvH,OAAO,MAAErB,mBAAY,EAACY,wBAAwB,CAACS,OAAO,EAAE6G,gBAAgB,IAAIwB,aAAa,CAACxB,gBAAgB,CAAC;QAC3G3G,QAAQ,MAAEvB,mBAAY,EAACY,wBAAwB,CAACW,QAAQ,EAAEqI,cAAc,CAACnI,IAAI;IACjF,CAAC;AACL,CAAC"}
|
|
1
|
+
{"version":3,"sources":["useCalendarPickerStyles.styles.js"],"sourcesContent":["'use client';\nimport { 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":["tokens","__styles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","AnimationDirection","calendarPickerClassNames","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","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","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAOKc,wBAAwB;;;IAiQxBoI,gCAAgC;;;;uBAtQI,gBAAgB;+BAElC,4BAA4B;AAGpD,iCAAiC;IACxCnI,IAAI,EAAE,oBAAoB;IAC1BC,eAAe,EAAE,qCAAqC;IACtDC,iBAAiB,EAAE,uCAAuC;IAC1DC,0BAA0B,EAAE,gDAAgD;IAC5EC,gBAAgB,EAAE,sCAAsC;IACxDC,aAAa,EAAE,mCAAmC;IAClDC,SAAS,EAAE,+BAA+B;IAC1CC,UAAU,EAAE,gCAAgC;IAC5CC,OAAO,EAAE,6BAA6B;IACtCC,QAAQ,EAAE,8BAA8B;IACxCC,QAAQ,EAAE;AACd,CAAC;AACD,MAAMC,aAAa,GAAA,WAAA,OAAGzB,eAAA,EAAA;IAAA0B,IAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAC,SAAA,EAAA;QAAAC,MAAA,EAAA;QAAAX,OAAA,EAAA;QAAAY,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAZ,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAS,CAAA,EAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBA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okens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport {\n DURATION_2,\n DURATION_3,\n EASING_FUNCTION_1,\n EASING_FUNCTION_2,\n FADE_IN,\n SLIDE_DOWN_IN20,\n SLIDE_LEFT_IN20,\n SLIDE_RIGHT_IN20,\n SLIDE_UP_IN20,\n} from '../../utils/animations';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CalendarPickerStyles, CalendarPickerStyleProps } from './CalendarPicker.types';\n\n/**\n * @internal\n */\nexport const calendarPickerClassNames: SlotClassNames<CalendarPickerStyles> = {\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};\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});\n\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex',\n },\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});\n\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex',\n },\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\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n },\n\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n },\n },\n});\n\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px',\n },\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: [FADE_IN, SLIDE_RIGHT_IN20],\n },\n horizontalForward: {\n animationName: [FADE_IN, SLIDE_LEFT_IN20],\n },\n verticalBackward: {\n animationName: [FADE_IN, SLIDE_DOWN_IN20],\n },\n verticalForward: {\n animationName: [FADE_IN, 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\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\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\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n\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\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\n\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\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});\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/**\n * @internal\n *\n * Apply styling to the CalendarPicker slots based on the state\n */\nexport const useCalendarPickerStyles_unstable = (props: CalendarPickerStyleProps): CalendarPickerStyles => {\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\n const {\n animateBackwards,\n animationDirection,\n className,\n hasHeaderClickCallback,\n highlightCurrent,\n highlightSelected,\n } = props;\n\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(\n calendarPickerClassNames.currentItemButton,\n currentItemButtonStyles.base,\n animateBackwards !== undefined && currentItemButtonStyles.animation,\n hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback,\n ),\n navigationButtonsContainer: mergeClasses(\n calendarPickerClassNames.navigationButtonsContainer,\n navigationButtonsContainerStyles.base,\n ),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(\n calendarPickerClassNames.buttonRow,\n buttonRowStyles.base,\n buttonRowStyles.animation,\n animateBackwards !== undefined &&\n (animationDirection === AnimationDirection.Horizontal\n ? animateBackwards\n ? buttonRowStyles.horizontalBackward\n : buttonRowStyles.horizontalForward\n : animateBackwards\n ? buttonRowStyles.verticalBackward\n : buttonRowStyles.verticalForward),\n ),\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":["tokens","makeStyles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","AnimationDirection","calendarPickerClassNames","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","base","boxSizing","overflow","padding","width","normalize","boxShadow","margin","useHeaderContainerStyles","display","useCurrentItemButtonStyles","backgroundColor","colorTransparentBackground","borderStyle","borderRadius","borderRadiusMedium","color","flexGrow","fontFamily","fontSize","fontSizeBase300","fontWeight","fontWeightSemibold","textAlign","animation","animationDuration","animationFillMode","animationName","animationTimingFunction","hasHeaderClickCallback","colorBrandBackgroundInvertedHover","colorBrandForegroundOnLightHover","cursor","outline","colorTransparentStroke","colorBrandBackgroundInvertedPressed","colorBrandForegroundOnLightPressed","useNavigationButtonsContainerStyles","alignItems","useNavigationButtonStyles","border","colorNeutralForeground1","fontSizeBase200","height","lineHeight","minHeight","minWidth","position","useGridContainerStyles","marginTop","useButtonRowStyles","marginBottom","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","colorNeutralForeground3","marginRight","fontWeightRegular","colorNeutralForeground1Static","forcedColorAdjust","useCurrentStyles","highlightCurrent","colorBrandBackground","colorNeutralForegroundOnBrand","useSelectedStyles","highlightSelected","colorBrandBackgroundInvertedSelected","useDisabledStyles","colorNeutralForegroundDisabled","pointerEvents","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"mappings":";;;;;;;;;;;IAoBac,wBAAAA;;;oCA2QAqF;eAAAA;;;4BA/RU,wBAAwB;uBACM,iBAAiB;4BAW/D,yBAAyB;+BACG,6BAA6B;AAOzD,iCAAuE;IAC5EpF,MAAM;IACNC,iBAAiB;IACjBC,mBAAmB;IACnBC,4BAA4B;IAC5BC,kBAAkB;IAClBC,eAAe;IACfC,WAAW;IACXC,YAAY;IACZC,SAAS;IACTC,UAAU;IACVC,UAAU;AACZ,EAAE;AAEF,MAAMC,oBAAgBzB,iBAAAA,EAAW;IAC/B0B,MAAM;QACJC,WAAW;QACXC,UAAU;QACVC,SAAS;QACTC,OAAO;IACT;IACAC,WAAW;QACTC,WAAW;QACXL,WAAW;QACXM,QAAQ;QACRJ,SAAS;IACX;AACF;AAEA,MAAMK,+BAA2BlC,iBAAAA,EAAW;IAC1C0B,MAAM;QACJS,SAAS;IACX;AACF;AAEA,MAAMC,iCAA6BpC,i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F,qBAAqBG,aAAaZ,wBAAwBpD,SAAS,EACnEK,0BAA0B+C,wBAAwB/C,sBAAsB;QAE1EtC,gCAA4BhB,mBAAAA,EAC1BY,yBAAyBI,0BAA0B,EACnDsF,iCAAiC7E,IAAI;QAEvCR,kBAAkBjB,uBAAAA,EAAaY,yBAAyBK,gBAAgB,EAAEsF,uBAAuB9E,IAAI;QACrGP,mBAAelB,mBAAAA,EAAaY,yBAAyBM,aAAa,EAAEsF,oBAAoB/E,IAAI;QAC5FN,eAAWnB,mBAAAA,EACTY,yBAAyBO,SAAS,EAClCsF,gBAAgBhF,IAAI,EACpBgF,gBAAgBxD,SAAS,EACzB6D,qBAAqBG,aAClBF,CAAAA,uBAAuBpG,iCAAAA,CAAmBuG,UAAU,GACjDJ,mBACEL,gBAAgB5B,kBAAkB,GAClC4B,gBAAgB3B,iBAAiB,GACnCgC,mBACAL,gBAAgB1B,gBAAgB,GAChC0B,gBAAgBzB,eAAAA,AAAc;QAEtC5D,gBAAYpB,mBAAAA,EAAaY,yBAAyBQ,UAAU,EAAEsF,iBAAiBjF,IAAI;QACnFH,cAAUtB,mBAAAA,EAAaY,yBAAyBU,QAAQ,EAAEsE,qBAAqBgB,eAAehB,iBAAiB;QAC/GvE,SAASrB,uBAAAA,EAAaY,yBAAyBS,OAAO,EAAEmE,oBAAoBmB,cAAcnB,gBAAgB;QAC1GjE,cAAUvB,mBAAAA,EAAaY,yBAAyBW,QAAQ,EAAEsF,eAAepF,IAAI;IAC/E;AACF,EAAE"}
|
|
1
|
+
{"version":3,"sources":["../src/components/CalendarPicker/useCalendarPickerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport {\n DURATION_2,\n DURATION_3,\n EASING_FUNCTION_1,\n EASING_FUNCTION_2,\n FADE_IN,\n SLIDE_DOWN_IN20,\n SLIDE_LEFT_IN20,\n SLIDE_RIGHT_IN20,\n SLIDE_UP_IN20,\n} from '../../utils/animations';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CalendarPickerStyles, CalendarPickerStyleProps } from './CalendarPicker.types';\n\n/**\n * @internal\n */\nexport const calendarPickerClassNames: SlotClassNames<CalendarPickerStyles> = {\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};\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});\n\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex',\n },\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});\n\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex',\n },\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\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n },\n\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n },\n },\n});\n\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px',\n },\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: [FADE_IN, SLIDE_RIGHT_IN20],\n },\n horizontalForward: {\n animationName: [FADE_IN, SLIDE_LEFT_IN20],\n },\n verticalBackward: {\n animationName: [FADE_IN, SLIDE_DOWN_IN20],\n },\n verticalForward: {\n animationName: [FADE_IN, 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\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\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\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n\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\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\n\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\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});\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/**\n * @internal\n *\n * Apply styling to the CalendarPicker slots based on the state\n */\nexport const useCalendarPickerStyles_unstable = (props: CalendarPickerStyleProps): CalendarPickerStyles => {\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\n const {\n animateBackwards,\n animationDirection,\n className,\n hasHeaderClickCallback,\n highlightCurrent,\n highlightSelected,\n } = props;\n\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(\n calendarPickerClassNames.currentItemButton,\n currentItemButtonStyles.base,\n animateBackwards !== undefined && currentItemButtonStyles.animation,\n hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback,\n ),\n navigationButtonsContainer: mergeClasses(\n calendarPickerClassNames.navigationButtonsContainer,\n navigationButtonsContainerStyles.base,\n ),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(\n calendarPickerClassNames.buttonRow,\n buttonRowStyles.base,\n buttonRowStyles.animation,\n animateBackwards !== undefined &&\n (animationDirection === AnimationDirection.Horizontal\n ? animateBackwards\n ? buttonRowStyles.horizontalBackward\n : buttonRowStyles.horizontalForward\n : animateBackwards\n ? buttonRowStyles.verticalBackward\n : buttonRowStyles.verticalForward),\n ),\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":["tokens","makeStyles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","AnimationDirection","calendarPickerClassNames","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","base","boxSizing","overflow","padding","width","normalize","boxShadow","margin","useHeaderContainerStyles","display","useCurrentItemButtonStyles","backgroundColor","colorTransparentBackground","borderStyle","borderRadius","borderRadiusMedium","color","flexGrow","fontFamily","fontSize","fontSizeBase300","fontWeight","fontWeightSemibold","textAlign","animation","animationDuration","animationFillMode","animationName","animationTimingFunction","hasHeaderClickCallback","colorBrandBackgroundInvertedHover","colorBrandForegroundOnLightHover","cursor","outline","colorTransparentStroke","colorBrandBackgroundInvertedPressed","colorBrandForegroundOnLightPressed","useNavigationButtonsContainerStyles","alignItems","useNavigationButtonStyles","border","colorNeutralForeground1","fontSizeBase200","height","lineHeight","minHeight","minWidth","position","useGridContainerStyles","marginTop","useButtonRowStyles","marginBottom","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","colorNeutralForeground3","marginRight","fontWeightRegular","colorNeutralForeground1Static","forcedColorAdjust","useCurrentStyles","highlightCurrent","colorBrandBackground","colorNeutralForegroundOnBrand","useSelectedStyles","highlightSelected","colorBrandBackgroundInvertedSelected","useDisabledStyles","colorNeutralForegroundDisabled","pointerEvents","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"mappings":"AAAA;;;;;;;;;;;;IAsBac,wBAAAA;;;oCA2QAqF;eAAAA;;;4BA/RU,wBAAwB;uBACM,iBAAiB;4BAW/D,yBAAyB;+BACG,6BAA6B;AAOzD,iCAAuE;IAC5EpF,MAAM;IACNC,iBAAiB;IACjBC,mBAAmB;IACnBC,4BAA4B;IAC5BC,kBAAkB;IAClBC,eAAe;IACfC,WAAW;IACXC,YAAY;IACZC,SAAS;IACTC,UAAU;IACVC,UAAU;AACZ,EAAE;AAEF,MAAMC,oBAAgBzB,iBAAAA,EAAW;IAC/B0B,MAAM;QACJC,WAAW;QACXC,UAAU;QACVC,SAAS;QACTC,OAAO;IACT;IACAC,WAAW;QACTC,WAAW;QACXL,WAAW;QACXM,QAAQ;QACRJ,SAAS;IACX;AACF;AAEA,MAAMK,+BAA2BlC,iBAAAA,EAAW;IAC1C0B,MAAM;QACJS,SAAS;IACX;AACF;AAEA,MAAMC,iCAA6BpC,iBAAAA,EAAW;IAC5C0B,MAAM;QACJW,iBAAiBtC,kBAAAA,CAAOuC,0BAA0B;QAClD,GAAGpC,iBAAAA,CAAWqC,WAAW,CAAC,OAAO;QACjCC,cAAczC,kBAAAA,CAAO0C,kBAAkB;QACvCC,OAAO;QACPC,UAAU;QACVC,YAAY;Q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,gBAAgB,EAAEsF,uBAAuB9E,IAAI;QACrGP,mBAAelB,mBAAAA,EAAaY,yBAAyBM,aAAa,EAAEsF,oBAAoB/E,IAAI;QAC5FN,WAAWnB,uBAAAA,EACTY,yBAAyBO,SAAS,EAClCsF,gBAAgBhF,IAAI,EACpBgF,gBAAgBxD,SAAS,EACzB6D,qBAAqBG,aAClBF,CAAAA,uBAAuBpG,iCAAAA,CAAmBuG,UAAU,GACjDJ,mBACEL,gBAAgB5B,kBAAkB,GAClC4B,gBAAgB3B,iBAAiB,GACnCgC,mBACAL,gBAAgB1B,gBAAgB,GAChC0B,gBAAgBzB,eAAAA,AAAc;QAEtC5D,gBAAYpB,mBAAAA,EAAaY,yBAAyBQ,UAAU,EAAEsF,iBAAiBjF,IAAI;QACnFH,cAAUtB,mBAAAA,EAAaY,yBAAyBU,QAAQ,EAAEsE,qBAAqBgB,eAAehB,iBAAiB;QAC/GvE,aAASrB,mBAAAA,EAAaY,yBAAyBS,OAAO,EAAEmE,oBAAoBmB,cAAcnB,gBAAgB;QAC1GjE,cAAUvB,mBAAAA,EAAaY,yBAAyBW,QAAQ,EAAEsF,eAAepF,IAAI;IAC/E;AACF,EAAE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
4
|
value: true
|
|
@@ -16,7 +17,7 @@ const _react1 = require("@griffel/react");
|
|
|
16
17
|
const _useCalendarYearStylesstyles = require("./useCalendarYearStyles.styles");
|
|
17
18
|
const CELL_COUNT = 12;
|
|
18
19
|
const CELLS_PER_ROW = 4;
|
|
19
|
-
|
|
20
|
+
const DefaultCalendarYearStrings = {
|
|
20
21
|
prevRangeAriaLabel: undefined,
|
|
21
22
|
nextRangeAriaLabel: undefined
|
|
22
23
|
};
|
|
@@ -57,11 +58,8 @@ const CalendarYearGridCell = (props)=>{
|
|
|
57
58
|
CalendarYearGridCell.displayName = 'CalendarYearGridCell';
|
|
58
59
|
const CalendarYearGrid = (props)=>{
|
|
59
60
|
const { className, fromYear, toYear, animationDirection, animateBackwards, minYear, maxYear, onSelectYear, selectedYear, componentRef } = props;
|
|
60
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
61
61
|
const selectedCellRef = _react.useRef(null);
|
|
62
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
63
62
|
const currentCellRef = _react.useRef(null);
|
|
64
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
65
63
|
_react.useImperativeHandle(componentRef, ()=>({
|
|
66
64
|
focus () {
|
|
67
65
|
var _focus, _this;
|
|
@@ -83,7 +81,6 @@ const CalendarYearGrid = (props)=>{
|
|
|
83
81
|
componentRef: selected ? selectedCellRef : current ? currentCellRef : undefined
|
|
84
82
|
});
|
|
85
83
|
};
|
|
86
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
87
84
|
const classNames = (0, _useCalendarYearStylesstyles.useCalendarYearStyles_unstable)({
|
|
88
85
|
className,
|
|
89
86
|
animateBackwards,
|