@fluentui/react-calendar-compat 0.0.0-nightly-20250728-0406.1 → 0.0.0-nightly-20250730-0406.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -12
- package/lib/Calendar.js.map +1 -1
- package/lib/CalendarDay.js.map +1 -1
- package/lib/CalendarDayGrid.js.map +1 -1
- package/lib/CalendarMonth.js.map +1 -1
- package/lib/CalendarPicker.js.map +1 -1
- package/lib/CalendarYear.js.map +1 -1
- package/lib/components/Calendar/Calendar.js.map +1 -1
- package/lib/components/Calendar/Calendar.types.js +3 -3
- package/lib/components/Calendar/Calendar.types.js.map +1 -1
- package/lib/components/Calendar/calendarNavigationIcons.js.map +1 -1
- package/lib/components/Calendar/defaults.js.map +1 -1
- package/lib/components/Calendar/index.js.map +1 -1
- package/lib/components/Calendar/useCalendarStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib/components/CalendarDay/CalendarDay.types.js.map +1 -1
- package/lib/components/CalendarDay/index.js.map +1 -1
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
- package/lib/components/CalendarDayGrid/index.js.map +1 -1
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -1
- package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
- package/lib/components/CalendarMonth/index.js.map +1 -1
- package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
- package/lib/components/CalendarPicker/index.js.map +1 -1
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +1 -1
- package/lib/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib/components/CalendarYear/CalendarYear.types.js.map +1 -1
- package/lib/components/CalendarYear/index.js.map +1 -1
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/animations.js.map +1 -1
- package/lib/utils/constants.js +18 -12
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/dateFormatting/dateFormatting.defaults.js.map +1 -1
- package/lib/utils/dateFormatting/dateFormatting.types.js.map +1 -1
- package/lib/utils/dateFormatting/index.js.map +1 -1
- package/lib/utils/dateGrid/dateGrid.types.js.map +1 -1
- package/lib/utils/dateGrid/findAvailableDate.js.map +1 -1
- package/lib/utils/dateGrid/getBoundedDateRange.js.map +1 -1
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
- package/lib/utils/dateGrid/getDayGrid.js.map +1 -1
- package/lib/utils/dateGrid/index.js.map +1 -1
- package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -1
- package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -1
- package/lib/utils/dateGrid/isContiguous.js.map +1 -1
- package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -1
- package/lib/utils/dateMath/dateMath.js.map +1 -1
- package/lib/utils/dateMath/index.js.map +1 -1
- package/lib/utils/focus.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib-commonjs/Calendar.js.map +1 -1
- package/lib-commonjs/CalendarDay.js.map +1 -1
- package/lib-commonjs/CalendarDayGrid.js.map +1 -1
- package/lib-commonjs/CalendarMonth.js.map +1 -1
- package/lib-commonjs/CalendarPicker.js.map +1 -1
- package/lib-commonjs/CalendarYear.js.map +1 -1
- package/lib-commonjs/components/Calendar/Calendar.js.map +1 -1
- package/lib-commonjs/components/Calendar/Calendar.types.js +3 -3
- package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -1
- package/lib-commonjs/components/Calendar/calendarNavigationIcons.js.map +1 -1
- package/lib-commonjs/components/Calendar/defaults.js.map +1 -1
- package/lib-commonjs/components/Calendar/index.js.map +1 -1
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/index.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/index.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/index.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/index.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/animations.js.map +1 -1
- package/lib-commonjs/utils/constants.js +12 -12
- package/lib-commonjs/utils/constants.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/index.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/index.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -1
- package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -1
- package/lib-commonjs/utils/dateMath/index.js.map +1 -1
- package/lib-commonjs/utils/focus.js.map +1 -1
- package/lib-commonjs/utils/index.js.map +1 -1
- package/package.json +9 -9
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarDayGrid/CalendarDayGrid.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport { DayOfWeek, FirstWeekOfYear, DateRangeType } from '../../utils';\nimport type { CalendarStrings, DateFormatting, DayGridOptions } from '../../utils';\n\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ICalendarDayGrid {\n focus(): void;\n}\n\n/**\n * @internal\n */\nexport interface CalendarDayGridProps extends DayGridOptions {\n /**\n * Optional callback to access the ICalendarDayGrid interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<ICalendarDayGrid>;\n\n /**\n * Additional CSS class(es) to apply to the CalendarDayGrid.\n */\n className?: string;\n\n /**\n * Localized strings to use in the CalendarDayGrid\n */\n strings: CalendarStrings;\n\n /**\n * The currently selected date\n */\n selectedDate: Date;\n\n /**\n * The currently navigated date\n */\n navigatedDate: Date;\n\n /**\n * Callback issued when a date is selected\n * @param date - The date the user selected\n * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set\n * for the component.\n */\n onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;\n\n /**\n * Callback issued when a date in the calendar is navigated\n * @param date - The date that is navigated to\n * @param focusOnNavigatedDay - Whether to set the focus to the navigated date.\n */\n onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;\n\n /**\n * Callback issued when calendar day is closed\n */\n onDismiss?: () => void;\n\n /**\n * The first day of the week for your locale.\n * @default DayOfWeek.Sunday\n */\n firstDayOfWeek: DayOfWeek;\n\n /**\n * Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,\n * FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values\n * @default FirstWeekOfYear.FirstDay\n */\n firstWeekOfYear: FirstWeekOfYear;\n\n /**\n * The date range type indicating how many days should be selected as the user\n * selects days\n * @default DateRangeType.Day\n */\n dateRangeType: DateRangeType;\n\n /**\n * The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day\n * views.\n * @default 1\n */\n daysToSelectInDayView?: number;\n\n /**\n * Value of today. If unspecified, current time in client machine will be used.\n */\n today?: Date;\n\n /**\n * Whether the calendar should show the week number (weeks 1 to 53) before each week row\n * @default false\n */\n showWeekNumbers?: boolean;\n\n /**\n * Apply additional formatting to dates, for example localized date formatting.\n */\n dateTimeFormatter: DateFormatting;\n\n /**\n * Ref callback for individual days. Allows for customization of the styling, properties, or listeners of the\n * specific day.\n */\n customDayCellRef?: (element: HTMLElement, date: Date, classNames: CalendarDayGridStyles) => void;\n\n /**\n * How many weeks to show by default. If not provided, will show enough weeks to display the current\n * month, between 4 and 6 depending\n * @default undefined\n */\n weeksToShow?: number;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date earlier than this value.\n */\n minDate?: Date;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date later than this value.\n */\n maxDate?: Date;\n\n /**\n * If set the Calendar will not allow selection of dates in this array.\n */\n restrictedDates?: Date[];\n\n /**\n * The days that are selectable when `dateRangeType` is WorkWeek.\n * If `dateRangeType` is not WorkWeek this property does nothing.\n * @default [Monday,Tuesday,Wednesday,Thursday,Friday]\n */\n workWeekDays?: DayOfWeek[];\n\n /**\n * Whether the close button should be shown or not\n * @default false\n */\n showCloseButton?: boolean;\n\n /**\n * Allows all dates and buttons to be focused, including disabled ones\n * @default false\n */\n allFocusable?: boolean;\n\n /**\n * Label string for the grid\n */\n gridLabel?: string;\n\n /**\n * The ID of the control that labels this one\n */\n labelledBy?: string;\n\n /**\n * Whether to show days outside the selected month with lighter styles\n * @default true\n */\n lightenDaysOutsideNavigatedMonth?: boolean;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or veritcal\n */\n animationDirection?: AnimationDirection;\n\n /**\n * Optional callback function to mark specific days with a small symbol. Fires when the date range changes,\n * gives the starting and ending displayed dates and expects the list of which days in between should be\n * marked.\n */\n getMarkedDays?: (startingDate: Date, endingDate: Date) => Date[];\n}\n\n/**\n * @internal\n */\nexport interface CalendarDayGridStyleProps {\n /**\n * Accept custom classNames\n */\n className?: string;\n\n /**\n * The date range type\n */\n dateRangeType?: DateRangeType;\n\n /**\n * Whether week numbers are being shown\n */\n showWeekNumbers?: boolean;\n\n /**\n * Whether to show days outside the selected month with lighter styles\n */\n lightenDaysOutsideNavigatedMonth?: boolean;\n\n /**\n * Whether grid entering animation should be forwards or backwards\n */\n animateBackwards?: boolean;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or vertical\n */\n animationDirection?: AnimationDirection;\n}\n\n/**\n * @internal\n */\nexport interface CalendarDayGridStyles {\n /**\n * The style for the root div\n */\n wrapper?: string;\n\n /**\n * The style for the table containing the grid\n */\n table?: string;\n\n /**\n * The style to apply to the grid cells for days\n */\n dayCell?: string;\n\n /**\n * The style to apply to grid cells for days in the selected range\n */\n daySelected?: string;\n\n /**\n * The classname applied when a single day is selected\n */\n daySingleSelected?: string;\n\n /**\n * The style to apply to row around weeks\n */\n weekRow?: string;\n\n /**\n * The style to apply to the column headers above the weeks\n */\n weekDayLabelCell?: string;\n\n /**\n * The style to apply to grid cells for week numbers\n */\n weekNumberCell?: string;\n\n /**\n * The style to apply to individual days that are outside the min/max date range\n */\n dayOutsideBounds?: string;\n\n /**\n * The style to apply to individual days that are outside the current month\n */\n dayOutsideNavigatedMonth?: string;\n\n /**\n * The style to apply to the button element within the day cells\n */\n dayButton?: string;\n\n /**\n * The style to apply to the individual button element that matches the \"today\" parameter\n */\n dayIsToday?: string;\n\n /**\n * The style applied to the first placeholder week used during transitions\n */\n firstTransitionWeek?: string;\n\n /**\n * The style applied to the last placeholder week used during transitions\n */\n lastTransitionWeek?: string;\n\n /**\n * The style applied to the marker on days to mark as important\n */\n dayMarker?: string;\n\n /**\n * The classname applied to the day \"today\" span\n */\n dayTodayMarker?: string;\n}\n"],"names":["React"],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/CalendarDayGrid.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport { DayOfWeek, FirstWeekOfYear, DateRangeType } from '../../utils';\nimport type { CalendarStrings, DateFormatting, DayGridOptions } from '../../utils';\n\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ICalendarDayGrid {\n focus(): void;\n}\n\n/**\n * @internal\n */\nexport interface CalendarDayGridProps extends DayGridOptions {\n /**\n * Optional callback to access the ICalendarDayGrid interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<ICalendarDayGrid>;\n\n /**\n * Additional CSS class(es) to apply to the CalendarDayGrid.\n */\n className?: string;\n\n /**\n * Localized strings to use in the CalendarDayGrid\n */\n strings: CalendarStrings;\n\n /**\n * The currently selected date\n */\n selectedDate: Date;\n\n /**\n * The currently navigated date\n */\n navigatedDate: Date;\n\n /**\n * Callback issued when a date is selected\n * @param date - The date the user selected\n * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set\n * for the component.\n */\n onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;\n\n /**\n * Callback issued when a date in the calendar is navigated\n * @param date - The date that is navigated to\n * @param focusOnNavigatedDay - Whether to set the focus to the navigated date.\n */\n onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;\n\n /**\n * Callback issued when calendar day is closed\n */\n onDismiss?: () => void;\n\n /**\n * The first day of the week for your locale.\n * @default DayOfWeek.Sunday\n */\n firstDayOfWeek: DayOfWeek;\n\n /**\n * Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,\n * FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values\n * @default FirstWeekOfYear.FirstDay\n */\n firstWeekOfYear: FirstWeekOfYear;\n\n /**\n * The date range type indicating how many days should be selected as the user\n * selects days\n * @default DateRangeType.Day\n */\n dateRangeType: DateRangeType;\n\n /**\n * The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day\n * views.\n * @default 1\n */\n daysToSelectInDayView?: number;\n\n /**\n * Value of today. If unspecified, current time in client machine will be used.\n */\n today?: Date;\n\n /**\n * Whether the calendar should show the week number (weeks 1 to 53) before each week row\n * @default false\n */\n showWeekNumbers?: boolean;\n\n /**\n * Apply additional formatting to dates, for example localized date formatting.\n */\n dateTimeFormatter: DateFormatting;\n\n /**\n * Ref callback for individual days. Allows for customization of the styling, properties, or listeners of the\n * specific day.\n */\n customDayCellRef?: (element: HTMLElement, date: Date, classNames: CalendarDayGridStyles) => void;\n\n /**\n * How many weeks to show by default. If not provided, will show enough weeks to display the current\n * month, between 4 and 6 depending\n * @default undefined\n */\n weeksToShow?: number;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date earlier than this value.\n */\n minDate?: Date;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date later than this value.\n */\n maxDate?: Date;\n\n /**\n * If set the Calendar will not allow selection of dates in this array.\n */\n restrictedDates?: Date[];\n\n /**\n * The days that are selectable when `dateRangeType` is WorkWeek.\n * If `dateRangeType` is not WorkWeek this property does nothing.\n * @default [Monday,Tuesday,Wednesday,Thursday,Friday]\n */\n workWeekDays?: DayOfWeek[];\n\n /**\n * Whether the close button should be shown or not\n * @default false\n */\n showCloseButton?: boolean;\n\n /**\n * Allows all dates and buttons to be focused, including disabled ones\n * @default false\n */\n allFocusable?: boolean;\n\n /**\n * Label string for the grid\n */\n gridLabel?: string;\n\n /**\n * The ID of the control that labels this one\n */\n labelledBy?: string;\n\n /**\n * Whether to show days outside the selected month with lighter styles\n * @default true\n */\n lightenDaysOutsideNavigatedMonth?: boolean;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or veritcal\n */\n animationDirection?: AnimationDirection;\n\n /**\n * Optional callback function to mark specific days with a small symbol. Fires when the date range changes,\n * gives the starting and ending displayed dates and expects the list of which days in between should be\n * marked.\n */\n getMarkedDays?: (startingDate: Date, endingDate: Date) => Date[];\n}\n\n/**\n * @internal\n */\nexport interface CalendarDayGridStyleProps {\n /**\n * Accept custom classNames\n */\n className?: string;\n\n /**\n * The date range type\n */\n dateRangeType?: DateRangeType;\n\n /**\n * Whether week numbers are being shown\n */\n showWeekNumbers?: boolean;\n\n /**\n * Whether to show days outside the selected month with lighter styles\n */\n lightenDaysOutsideNavigatedMonth?: boolean;\n\n /**\n * Whether grid entering animation should be forwards or backwards\n */\n animateBackwards?: boolean;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or vertical\n */\n animationDirection?: AnimationDirection;\n}\n\n/**\n * @internal\n */\nexport interface CalendarDayGridStyles {\n /**\n * The style for the root div\n */\n wrapper?: string;\n\n /**\n * The style for the table containing the grid\n */\n table?: string;\n\n /**\n * The style to apply to the grid cells for days\n */\n dayCell?: string;\n\n /**\n * The style to apply to grid cells for days in the selected range\n */\n daySelected?: string;\n\n /**\n * The classname applied when a single day is selected\n */\n daySingleSelected?: string;\n\n /**\n * The style to apply to row around weeks\n */\n weekRow?: string;\n\n /**\n * The style to apply to the column headers above the weeks\n */\n weekDayLabelCell?: string;\n\n /**\n * The style to apply to grid cells for week numbers\n */\n weekNumberCell?: string;\n\n /**\n * The style to apply to individual days that are outside the min/max date range\n */\n dayOutsideBounds?: string;\n\n /**\n * The style to apply to individual days that are outside the current month\n */\n dayOutsideNavigatedMonth?: string;\n\n /**\n * The style to apply to the button element within the day cells\n */\n dayButton?: string;\n\n /**\n * The style to apply to the individual button element that matches the \"today\" parameter\n */\n dayIsToday?: string;\n\n /**\n * The style applied to the first placeholder week used during transitions\n */\n firstTransitionWeek?: string;\n\n /**\n * The style applied to the last placeholder week used during transitions\n */\n lastTransitionWeek?: string;\n\n /**\n * The style applied to the marker on days to mark as important\n */\n dayMarker?: string;\n\n /**\n * The classname applied to the day \"today\" span\n */\n dayTodayMarker?: string;\n}\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarDayGrid/CalendarGridDayCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Enter } from '@fluentui/keyboard-keys';\nimport { getRTLSafeKey } from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { mergeClasses } from '@griffel/react';\nimport { addDays, addWeeks, compareDates, findAvailableDate, DateRangeType } from '../../utils';\nimport { weekCornersClassNames } from './useWeekCornerStyles.styles';\nimport { extraCalendarDayGridClassNames } from './useCalendarDayGridStyles.styles';\nimport type { AvailableDateOptions } from '../../utils';\nimport type { DayInfo } from './CalendarDayGrid';\nimport type { CalendarGridRowProps } from './CalendarGridRow';\n\n/**\n * @internal\n */\nexport interface CalendarGridDayCellProps extends CalendarGridRowProps {\n day: DayInfo;\n dayIndex: number;\n}\n\n/**\n * @internal\n */\nexport const CalendarGridDayCell: React.FunctionComponent<CalendarGridDayCellProps> = props => {\n 'use no memo';\n\n const {\n navigatedDate,\n dateTimeFormatter,\n allFocusable,\n strings,\n activeDescendantId,\n navigatedDayRef,\n calculateRoundedStyles,\n weeks,\n classNames,\n day,\n dayIndex,\n weekIndex,\n weekCorners,\n ariaHidden,\n customDayCellRef,\n dateRangeType,\n daysToSelectInDayView,\n onSelectDate,\n restrictedDates,\n minDate,\n maxDate,\n onNavigateDate,\n getDayInfosInRangeOfDay,\n getRefsFromDayInfos,\n } = props;\n const cornerStyle = weekCorners?.[weekIndex + '_' + dayIndex] ?? '';\n const isNavigatedDate = compareDates(navigatedDate, day.originalDate);\n\n const { dir } = useFluent_unstable();\n\n const navigateMonthEdge = (ev: React.KeyboardEvent<HTMLElement>, date: Date): void => {\n let targetDate: Date | undefined = undefined;\n let direction = 1; // by default search forward\n\n if (ev.key === ArrowUp) {\n targetDate = addWeeks(date, -1);\n direction = -1;\n } else if (ev.key === ArrowDown) {\n targetDate = addWeeks(date, 1);\n } else if (ev.key === getRTLSafeKey(ArrowLeft, dir)) {\n targetDate = addDays(date, -1);\n direction = -1;\n } else if (ev.key === getRTLSafeKey(ArrowRight, dir)) {\n targetDate = addDays(date, 1);\n }\n\n if (!targetDate) {\n // if we couldn't find a target date at all, do nothing\n return;\n }\n\n const findAvailableDateOptions: AvailableDateOptions = {\n initialDate: date,\n targetDate,\n direction,\n restrictedDates,\n minDate,\n maxDate,\n };\n\n // target date is restricted, search in whatever direction until finding the next possible date,\n // stopping at boundaries\n let nextDate = findAvailableDate(findAvailableDateOptions);\n\n if (!nextDate) {\n // if no dates available in initial direction, try going backwards\n findAvailableDateOptions.direction = -direction;\n nextDate = findAvailableDate(findAvailableDateOptions);\n }\n\n // if the nextDate is still inside the same focusZone area, let the focusZone handle setting the focus so we\n // don't jump the view unnecessarily\n const isInCurrentView =\n weeks &&\n nextDate &&\n weeks.slice(1, weeks.length - 1).some((week: DayInfo[]) => {\n return week.some((dayToCompare: DayInfo) => {\n return compareDates(dayToCompare.originalDate, nextDate!);\n });\n });\n if (isInCurrentView) {\n return;\n }\n\n // else, fire navigation on the date to change the view to show it\n if (nextDate) {\n onNavigateDate(nextDate, true);\n ev.preventDefault();\n }\n };\n\n const onMouseOverDay = (ev: React.MouseEvent<HTMLElement>) => {\n const dayInfos = getDayInfosInRangeOfDay(day);\n const dayRefs = getRefsFromDayInfos(dayInfos);\n\n dayRefs.forEach((dayRef: HTMLElement | null, index: number) => {\n if (dayRef) {\n dayRef.classList.add(extraCalendarDayGridClassNames.hoverStyle);\n if (\n !dayInfos[index].isSelected &&\n dateRangeType === DateRangeType.Day &&\n daysToSelectInDayView &&\n daysToSelectInDayView > 1\n ) {\n // remove the static classes first to overwrite them\n dayRef.classList.remove(\n weekCornersClassNames.bottomLeftCornerDate!,\n weekCornersClassNames.bottomRightCornerDate!,\n weekCornersClassNames.topLeftCornerDate!,\n weekCornersClassNames.topRightCornerDate!,\n );\n\n const classNamesToAdd = calculateRoundedStyles(false, false, index > 0, index < dayRefs.length - 1).trim();\n if (classNamesToAdd) {\n dayRef.classList.add(...classNamesToAdd.trim().split(' '));\n }\n }\n }\n });\n };\n\n const onMouseDownDay = (ev: React.MouseEvent<HTMLElement>) => {\n const dayInfos = getDayInfosInRangeOfDay(day);\n const dayRefs = getRefsFromDayInfos(dayInfos);\n\n dayRefs.forEach((dayRef: HTMLElement | null) => {\n if (dayRef) {\n dayRef.classList.add(extraCalendarDayGridClassNames.pressedStyle);\n }\n });\n };\n\n const onMouseUpDay = (ev: React.MouseEvent<HTMLElement>) => {\n const dayInfos = getDayInfosInRangeOfDay(day);\n const dayRefs = getRefsFromDayInfos(dayInfos);\n\n dayRefs.forEach((dayRef: HTMLElement | null) => {\n if (dayRef) {\n dayRef.classList.remove(extraCalendarDayGridClassNames.pressedStyle);\n }\n });\n };\n\n const onMouseOutDay = (ev: React.MouseEvent<HTMLElement>) => {\n const dayInfos = getDayInfosInRangeOfDay(day);\n const dayRefs = getRefsFromDayInfos(dayInfos);\n\n dayRefs.forEach((dayRef: HTMLElement | null, index: number) => {\n if (dayRef) {\n dayRef.classList.remove(extraCalendarDayGridClassNames.hoverStyle);\n dayRef.classList.remove(extraCalendarDayGridClassNames.pressedStyle);\n if (\n !dayInfos[index].isSelected &&\n dateRangeType === DateRangeType.Day &&\n daysToSelectInDayView &&\n daysToSelectInDayView > 1\n ) {\n const classNamesToAdd = calculateRoundedStyles(false, false, index > 0, index < dayRefs.length - 1).trim();\n if (classNamesToAdd) {\n dayRef.classList.remove(...classNamesToAdd.trim().split(' '));\n }\n }\n }\n });\n };\n\n const onDayKeyDown = (ev: React.KeyboardEvent<HTMLElement>): void => {\n if (ev.key === Enter) {\n onSelectDate?.(day.originalDate);\n } else {\n navigateMonthEdge(ev, day.originalDate);\n }\n };\n\n let ariaLabel =\n day.originalDate.getDate() +\n ', ' +\n strings.months[day.originalDate.getMonth()] +\n ', ' +\n day.originalDate.getFullYear();\n\n if (day.isMarked) {\n ariaLabel = ariaLabel + ', ' + strings.dayMarkedAriaLabel;\n }\n\n const isFocusable = !ariaHidden && (allFocusable || (day.isInBounds ? true : undefined));\n\n return (\n <td\n className={mergeClasses(\n classNames.dayCell,\n weekCorners && cornerStyle,\n day.isSelected && !day.isSingleSelected && classNames.daySelected,\n day.isSingleSelected && classNames.daySingleSelected,\n !day.isInBounds && classNames.dayOutsideBounds,\n !day.isInMonth && classNames.dayOutsideNavigatedMonth,\n )}\n ref={(element: HTMLTableCellElement) => {\n customDayCellRef?.(element, day.originalDate, classNames);\n day.setRef(element);\n isNavigatedDate && (navigatedDayRef.current = element);\n }}\n aria-disabled={!ariaHidden && !day.isInBounds}\n onClick={day.isInBounds && !ariaHidden ? day.onSelected : undefined}\n onMouseOver={!ariaHidden ? onMouseOverDay : undefined}\n onMouseDown={!ariaHidden ? onMouseDownDay : undefined}\n onMouseUp={!ariaHidden ? onMouseUpDay : undefined}\n onMouseOut={!ariaHidden ? onMouseOutDay : undefined}\n onKeyDown={!ariaHidden ? onDayKeyDown : undefined}\n role=\"gridcell\"\n tabIndex={isNavigatedDate || isFocusable ? 0 : undefined}\n aria-current={day.isToday ? 'date' : undefined}\n aria-selected={day.isInBounds ? day.isSelected : undefined}\n >\n <button\n key={day.key + 'button'}\n className={mergeClasses(classNames.dayButton, day.isToday && classNames.dayIsToday)}\n aria-label={ariaLabel}\n id={isNavigatedDate ? activeDescendantId : undefined}\n disabled={!ariaHidden && !day.isInBounds}\n type=\"button\"\n tabIndex={-1}\n >\n <span className={day.isToday ? mergeClasses(classNames.dayTodayMarker) : undefined}>\n {dateTimeFormatter.formatDay(day.originalDate)}\n </span>\n {day.isMarked && <div aria-hidden=\"true\" className={classNames.dayMarker} />}\n </button>\n </td>\n );\n};\n"],"names":["React","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Enter","getRTLSafeKey","useFluent_unstable","mergeClasses","addDays","addWeeks","compareDates","findAvailableDate","DateRangeType","weekCornersClassNames","extraCalendarDayGridClassNames","CalendarGridDayCell","props","navigatedDate","dateTimeFormatter","allFocusable","strings","activeDescendantId","navigatedDayRef","calculateRoundedStyles","weeks","classNames","day","dayIndex","weekIndex","weekCorners","ariaHidden","customDayCellRef","dateRangeType","daysToSelectInDayView","onSelectDate","restrictedDates","minDate","maxDate","onNavigateDate","getDayInfosInRangeOfDay","getRefsFromDayInfos","cornerStyle","isNavigatedDate","originalDate","dir","navigateMonthEdge","ev","date","targetDate","undefined","direction","key","findAvailableDateOptions","initialDate","nextDate","isInCurrentView","slice","length","some","week","dayToCompare","preventDefault","onMouseOverDay","dayInfos","dayRefs","forEach","dayRef","index","classList","add","hoverStyle","isSelected","Day","remove","bottomLeftCornerDate","bottomRightCornerDate","topLeftCornerDate","topRightCornerDate","classNamesToAdd","trim","split","onMouseDownDay","pressedStyle","onMouseUpDay","onMouseOutDay","onDayKeyDown","ariaLabel","getDate","months","getMonth","getFullYear","isMarked","dayMarkedAriaLabel","isFocusable","isInBounds","td","className","dayCell","isSingleSelected","daySelected","daySingleSelected","dayOutsideBounds","isInMonth","dayOutsideNavigatedMonth","ref","element","setRef","current","aria-disabled","onClick","onSelected","onMouseOver","onMouseDown","onMouseUp","onMouseOut","onKeyDown","role","tabIndex","aria-current","isToday","aria-selected","button","dayButton","dayIsToday","aria-label","id","disabled","type","span","dayTodayMarker","formatDay","div","aria-hidden","dayMarker"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AgBqF,OAAO,GAAGF,OAAM;QACtD;QACAG,iBAAe,CAAC9E,cAAc,CAACJ,IAAIoE,UAAU;QAC7Ce,SAASnF,IAAIoE,UAAU,IAAI,CAAChE,aAAaJ,IAAIoF,UAAU,GAAG7D;QAC1D8D,aAAa,CAACjF,aAAagC,iBAAiBb;QAC5C+D,aAAa,CAAClF,aAAamD,iBAAiBhC;QAC5CgE,WAAW,CAACnF,aAAaqD,eAAelC;QACxCiE,YAAY,CAACpF,aAAasD,gBAAgBnC;QAC1CkE,WAAW,CAACrF,aAAauD,eAAepC;QACxCmE,MAAK;QACLC,UAAU3E,mBAAmBmD,cAAc,IAAI5C;QAC/CqE,gBAAc5F,IAAI6F,OAAO,GAAG,SAAStE;QACrCuE,iBAAe9F,IAAIoE,UAAU,GAAGpE,IAAI6C,UAAU,GAAGtB;qBAEjD,oBAACwE;QACCtE,KAAKzB,IAAIyB,GAAG,GAAG;QACf6C,WAAWzF,aAAakB,WAAWiG,SAAS,EAAEhG,IAAI6F,OAAO,IAAI9F,WAAWkG,UAAU;QAClFC,cAAYtC;QACZuC,IAAInF,kBAAkBrB,qBAAqB4B;QAC3C6E,UAAU,CAAChG,cAAc,CAACJ,IAAIoE,UAAU;QACxCiC,MAAK;QACLV,UAAU,CAAC;qBAEX,oBAACW;QAAKhC,WAAWtE,IAAI6F,OAAO,GAAGhH,aAAakB,WAAWwG,cAAc,IAAIhF;OACtE/B,kBAAkBgH,SAAS,CAACxG,IAAIiB,YAAY,IAE9CjB,IAAIiE,QAAQ,kBAAI,oBAACwC;QAAIC,eAAY;QAAOpC,WAAWvE,WAAW4G,SAAS;;AAIhF,EAAE"}
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/CalendarGridDayCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Enter } from '@fluentui/keyboard-keys';\nimport { getRTLSafeKey } from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { mergeClasses } from '@griffel/react';\nimport { addDays, addWeeks, compareDates, findAvailableDate, DateRangeType } from '../../utils';\nimport { weekCornersClassNames } from './useWeekCornerStyles.styles';\nimport { extraCalendarDayGridClassNames } from './useCalendarDayGridStyles.styles';\nimport type { AvailableDateOptions } from '../../utils';\nimport type { DayInfo } from './CalendarDayGrid';\nimport type { CalendarGridRowProps } from './CalendarGridRow';\n\n/**\n * @internal\n */\nexport interface CalendarGridDayCellProps extends CalendarGridRowProps {\n day: DayInfo;\n dayIndex: number;\n}\n\n/**\n * @internal\n */\nexport const CalendarGridDayCell: React.FunctionComponent<CalendarGridDayCellProps> = props => {\n 'use no memo';\n\n const {\n navigatedDate,\n dateTimeFormatter,\n allFocusable,\n strings,\n activeDescendantId,\n navigatedDayRef,\n calculateRoundedStyles,\n weeks,\n classNames,\n day,\n dayIndex,\n weekIndex,\n weekCorners,\n ariaHidden,\n customDayCellRef,\n dateRangeType,\n daysToSelectInDayView,\n onSelectDate,\n restrictedDates,\n minDate,\n maxDate,\n onNavigateDate,\n getDayInfosInRangeOfDay,\n getRefsFromDayInfos,\n } = props;\n const cornerStyle = weekCorners?.[weekIndex + '_' + dayIndex] ?? '';\n const isNavigatedDate = compareDates(navigatedDate, day.originalDate);\n\n const { dir } = useFluent_unstable();\n\n const navigateMonthEdge = (ev: React.KeyboardEvent<HTMLElement>, date: Date): void => {\n let targetDate: Date | undefined = undefined;\n let direction = 1; // by default search forward\n\n if (ev.key === ArrowUp) {\n targetDate = addWeeks(date, -1);\n direction = -1;\n } else if (ev.key === ArrowDown) {\n targetDate = addWeeks(date, 1);\n } else if (ev.key === getRTLSafeKey(ArrowLeft, dir)) {\n targetDate = addDays(date, -1);\n direction = -1;\n } else if (ev.key === getRTLSafeKey(ArrowRight, dir)) {\n targetDate = addDays(date, 1);\n }\n\n if (!targetDate) {\n // if we couldn't find a target date at all, do nothing\n return;\n }\n\n const findAvailableDateOptions: AvailableDateOptions = {\n initialDate: date,\n targetDate,\n direction,\n restrictedDates,\n minDate,\n maxDate,\n };\n\n // target date is restricted, search in whatever direction until finding the next possible date,\n // stopping at boundaries\n let nextDate = findAvailableDate(findAvailableDateOptions);\n\n if (!nextDate) {\n // if no dates available in initial direction, try going backwards\n findAvailableDateOptions.direction = -direction;\n nextDate = findAvailableDate(findAvailableDateOptions);\n }\n\n // if the nextDate is still inside the same focusZone area, let the focusZone handle setting the focus so we\n // don't jump the view unnecessarily\n const isInCurrentView =\n weeks &&\n nextDate &&\n weeks.slice(1, weeks.length - 1).some((week: DayInfo[]) => {\n return week.some((dayToCompare: DayInfo) => {\n return compareDates(dayToCompare.originalDate, nextDate!);\n });\n });\n if (isInCurrentView) {\n return;\n }\n\n // else, fire navigation on the date to change the view to show it\n if (nextDate) {\n onNavigateDate(nextDate, true);\n ev.preventDefault();\n }\n };\n\n const onMouseOverDay = (ev: React.MouseEvent<HTMLElement>) => {\n const dayInfos = getDayInfosInRangeOfDay(day);\n const dayRefs = getRefsFromDayInfos(dayInfos);\n\n dayRefs.forEach((dayRef: HTMLElement | null, index: number) => {\n if (dayRef) {\n dayRef.classList.add(extraCalendarDayGridClassNames.hoverStyle);\n if (\n !dayInfos[index].isSelected &&\n dateRangeType === DateRangeType.Day &&\n daysToSelectInDayView &&\n daysToSelectInDayView > 1\n ) {\n // remove the static classes first to overwrite them\n dayRef.classList.remove(\n weekCornersClassNames.bottomLeftCornerDate!,\n weekCornersClassNames.bottomRightCornerDate!,\n weekCornersClassNames.topLeftCornerDate!,\n weekCornersClassNames.topRightCornerDate!,\n );\n\n const classNamesToAdd = calculateRoundedStyles(false, false, index > 0, index < dayRefs.length - 1).trim();\n if (classNamesToAdd) {\n dayRef.classList.add(...classNamesToAdd.trim().split(' '));\n }\n }\n }\n });\n };\n\n const onMouseDownDay = (ev: React.MouseEvent<HTMLElement>) => {\n const dayInfos = getDayInfosInRangeOfDay(day);\n const dayRefs = getRefsFromDayInfos(dayInfos);\n\n dayRefs.forEach((dayRef: HTMLElement | null) => {\n if (dayRef) {\n dayRef.classList.add(extraCalendarDayGridClassNames.pressedStyle);\n }\n });\n };\n\n const onMouseUpDay = (ev: React.MouseEvent<HTMLElement>) => {\n const dayInfos = getDayInfosInRangeOfDay(day);\n const dayRefs = getRefsFromDayInfos(dayInfos);\n\n dayRefs.forEach((dayRef: HTMLElement | null) => {\n if (dayRef) {\n dayRef.classList.remove(extraCalendarDayGridClassNames.pressedStyle);\n }\n });\n };\n\n const onMouseOutDay = (ev: React.MouseEvent<HTMLElement>) => {\n const dayInfos = getDayInfosInRangeOfDay(day);\n const dayRefs = getRefsFromDayInfos(dayInfos);\n\n dayRefs.forEach((dayRef: HTMLElement | null, index: number) => {\n if (dayRef) {\n dayRef.classList.remove(extraCalendarDayGridClassNames.hoverStyle);\n dayRef.classList.remove(extraCalendarDayGridClassNames.pressedStyle);\n if (\n !dayInfos[index].isSelected &&\n dateRangeType === DateRangeType.Day &&\n daysToSelectInDayView &&\n daysToSelectInDayView > 1\n ) {\n const classNamesToAdd = calculateRoundedStyles(false, false, index > 0, index < dayRefs.length - 1).trim();\n if (classNamesToAdd) {\n dayRef.classList.remove(...classNamesToAdd.trim().split(' '));\n }\n }\n }\n });\n };\n\n const onDayKeyDown = (ev: React.KeyboardEvent<HTMLElement>): void => {\n if (ev.key === Enter) {\n onSelectDate?.(day.originalDate);\n } else {\n navigateMonthEdge(ev, day.originalDate);\n }\n };\n\n let ariaLabel =\n day.originalDate.getDate() +\n ', ' +\n strings.months[day.originalDate.getMonth()] +\n ', ' +\n day.originalDate.getFullYear();\n\n if (day.isMarked) {\n ariaLabel = ariaLabel + ', ' + strings.dayMarkedAriaLabel;\n }\n\n const isFocusable = !ariaHidden && (allFocusable || (day.isInBounds ? true : undefined));\n\n return (\n <td\n className={mergeClasses(\n classNames.dayCell,\n weekCorners && cornerStyle,\n day.isSelected && !day.isSingleSelected && classNames.daySelected,\n day.isSingleSelected && classNames.daySingleSelected,\n !day.isInBounds && classNames.dayOutsideBounds,\n !day.isInMonth && classNames.dayOutsideNavigatedMonth,\n )}\n ref={(element: HTMLTableCellElement) => {\n customDayCellRef?.(element, day.originalDate, classNames);\n day.setRef(element);\n isNavigatedDate && (navigatedDayRef.current = element);\n }}\n aria-disabled={!ariaHidden && !day.isInBounds}\n onClick={day.isInBounds && !ariaHidden ? day.onSelected : undefined}\n onMouseOver={!ariaHidden ? onMouseOverDay : undefined}\n onMouseDown={!ariaHidden ? onMouseDownDay : undefined}\n onMouseUp={!ariaHidden ? onMouseUpDay : undefined}\n onMouseOut={!ariaHidden ? onMouseOutDay : undefined}\n onKeyDown={!ariaHidden ? onDayKeyDown : undefined}\n role=\"gridcell\"\n tabIndex={isNavigatedDate || isFocusable ? 0 : undefined}\n aria-current={day.isToday ? 'date' : undefined}\n aria-selected={day.isInBounds ? day.isSelected : undefined}\n >\n <button\n key={day.key + 'button'}\n className={mergeClasses(classNames.dayButton, day.isToday && classNames.dayIsToday)}\n aria-label={ariaLabel}\n id={isNavigatedDate ? activeDescendantId : undefined}\n disabled={!ariaHidden && !day.isInBounds}\n type=\"button\"\n tabIndex={-1}\n >\n <span className={day.isToday ? mergeClasses(classNames.dayTodayMarker) : undefined}>\n {dateTimeFormatter.formatDay(day.originalDate)}\n </span>\n {day.isMarked && <div aria-hidden=\"true\" className={classNames.dayMarker} />}\n </button>\n </td>\n );\n};\n"],"names":["React","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Enter","getRTLSafeKey","useFluent_unstable","mergeClasses","addDays","addWeeks","compareDates","findAvailableDate","DateRangeType","weekCornersClassNames","extraCalendarDayGridClassNames","CalendarGridDayCell","props","navigatedDate","dateTimeFormatter","allFocusable","strings","activeDescendantId","navigatedDayRef","calculateRoundedStyles","weeks","classNames","day","dayIndex","weekIndex","weekCorners","ariaHidden","customDayCellRef","dateRangeType","daysToSelectInDayView","onSelectDate","restrictedDates","minDate","maxDate","onNavigateDate","getDayInfosInRangeOfDay","getRefsFromDayInfos","cornerStyle","isNavigatedDate","originalDate","dir","navigateMonthEdge","ev","date","targetDate","undefined","direction","key","findAvailableDateOptions","initialDate","nextDate","isInCurrentView","slice","length","some","week","dayToCompare","preventDefault","onMouseOverDay","dayInfos","dayRefs","forEach","dayRef","index","classList","add","hoverStyle","isSelected","Day","remove","bottomLeftCornerDate","bottomRightCornerDate","topLeftCornerDate","topRightCornerDate","classNamesToAdd","trim","split","onMouseDownDay","pressedStyle","onMouseUpDay","onMouseOutDay","onDayKeyDown","ariaLabel","getDate","months","getMonth","getFullYear","isMarked","dayMarkedAriaLabel","isFocusable","isInBounds","td","className","dayCell","isSingleSelected","daySelected","daySingleSelected","dayOutsideBounds","isInMonth","dayOutsideNavigatedMonth","ref","element","setRef","current","aria-disabled","onClick","onSelected","onMouseOver","onMouseDown","onMouseUp","onMouseOut","onKeyDown","role","tabIndex","aria-current","isToday","aria-selected","button","dayButton","dayIsToday","aria-label","id","disabled","type","span","dayTodayMarker","formatDay","div","aria-hidden","dayMarker"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,EAAEC,SAAS,EAAEC,UAAU,EAAEC,OAAO,EAAEC,KAAK,QAAQ,0BAA0B;AAC3F,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,OAAO,EAAEC,QAAQ,EAAEC,YAAY,EAAEC,iBAAiB,EAAEC,aAAa,QAAQ,cAAc;AAChG,SAASC,qBAAqB,QAAQ,+BAA+B;AACrE,SAASC,8BAA8B,QAAQ,oCAAoC;AAanF;;CAEC,GACD,OAAO,MAAMC,sBAAyEC,CAAAA;IACpF;IAEA,MAAM,EACJC,aAAa,EACbC,iBAAiB,EACjBC,YAAY,EACZC,OAAO,EACPC,kBAAkB,EAClBC,eAAe,EACfC,sBAAsB,EACtBC,KAAK,EACLC,UAAU,EACVC,GAAG,EACHC,QAAQ,EACRC,SAAS,EACTC,WAAW,EACXC,U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C;QACZuC,IAAInF,kBAAkBrB,qBAAqB4B;QAC3C6E,UAAU,CAAChG,cAAc,CAACJ,IAAIoE,UAAU;QACxCiC,MAAK;QACLV,UAAU,CAAC;qBAEX,oBAACW;QAAKhC,WAAWtE,IAAI6F,OAAO,GAAGhH,aAAakB,WAAWwG,cAAc,IAAIhF;OACtE/B,kBAAkBgH,SAAS,CAACxG,IAAIiB,YAAY,IAE9CjB,IAAIiE,QAAQ,kBAAI,oBAACwC;QAAIC,eAAY;QAAOpC,WAAWvE,WAAW4G,SAAS;;AAIhF,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarDayGrid/CalendarGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getWeekNumbersInMonth } from '../../utils';\nimport { CalendarGridDayCell } from './CalendarGridDayCell';\nimport type { CalendarDayGridProps, CalendarDayGridStyles } from './CalendarDayGrid.types';\nimport type { DayInfo } from './CalendarDayGrid';\nimport type { WeekCorners } from './useWeekCornerStyles.styles';\n\n/**\n * @internal\n */\nexport interface CalendarGridRowProps extends CalendarDayGridProps {\n classNames: CalendarDayGridStyles;\n weeks: DayInfo[][];\n week: DayInfo[];\n weekIndex: number;\n weekCorners?: WeekCorners;\n ariaHidden?: boolean;\n rowClassName?: string;\n ariaRole?: string;\n navigatedDayRef: React.MutableRefObject<HTMLTableCellElement>;\n activeDescendantId: string;\n calculateRoundedStyles(above: boolean, below: boolean, left: boolean, right: boolean): string;\n getDayInfosInRangeOfDay(dayToCompare: DayInfo): DayInfo[];\n getRefsFromDayInfos(dayInfosInRange: DayInfo[]): (HTMLElement | null)[];\n}\n\n/**\n * @internal\n */\nexport const CalendarGridRow: React.FunctionComponent<CalendarGridRowProps> = props => {\n const {\n ariaHidden,\n classNames,\n week,\n weeks,\n weekIndex,\n rowClassName,\n ariaRole,\n showWeekNumbers,\n firstDayOfWeek,\n firstWeekOfYear,\n navigatedDate,\n strings,\n } = props;\n const weekNumbers = showWeekNumbers\n ? getWeekNumbersInMonth(weeks!.length, firstDayOfWeek, firstWeekOfYear, navigatedDate)\n : null;\n\n const titleString = weekNumbers\n ? strings.weekNumberFormatString && strings.weekNumberFormatString.replace('{0}', `${weekNumbers[weekIndex]}`)\n : '';\n\n return (\n <tr role={ariaRole} aria-hidden={ariaHidden} className={rowClassName} key={weekIndex + '_' + week[0].key}>\n {showWeekNumbers && weekNumbers && (\n <th\n className={classNames.weekNumberCell}\n key={weekIndex}\n title={titleString}\n aria-label={titleString}\n scope=\"row\"\n >\n <span>{weekNumbers[weekIndex]}</span>\n </th>\n )}\n {week.map((day: DayInfo, dayIndex: number) => (\n <CalendarGridDayCell {...props} key={day.key} day={day} dayIndex={dayIndex} />\n ))}\n </tr>\n );\n};\n"],"names":["React","getWeekNumbersInMonth","CalendarGridDayCell","CalendarGridRow","props","ariaHidden","classNames","week","weeks","weekIndex","rowClassName","ariaRole","showWeekNumbers","firstDayOfWeek","firstWeekOfYear","navigatedDate","strings","weekNumbers","length","titleString","weekNumberFormatString","replace","tr","role","aria-hidden","className","key","th","weekNumberCell","title","aria-label","scope","span","map","day","dayIndex"],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/CalendarGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getWeekNumbersInMonth } from '../../utils';\nimport { CalendarGridDayCell } from './CalendarGridDayCell';\nimport type { CalendarDayGridProps, CalendarDayGridStyles } from './CalendarDayGrid.types';\nimport type { DayInfo } from './CalendarDayGrid';\nimport type { WeekCorners } from './useWeekCornerStyles.styles';\n\n/**\n * @internal\n */\nexport interface CalendarGridRowProps extends CalendarDayGridProps {\n classNames: CalendarDayGridStyles;\n weeks: DayInfo[][];\n week: DayInfo[];\n weekIndex: number;\n weekCorners?: WeekCorners;\n ariaHidden?: boolean;\n rowClassName?: string;\n ariaRole?: string;\n navigatedDayRef: React.MutableRefObject<HTMLTableCellElement>;\n activeDescendantId: string;\n calculateRoundedStyles(above: boolean, below: boolean, left: boolean, right: boolean): string;\n getDayInfosInRangeOfDay(dayToCompare: DayInfo): DayInfo[];\n getRefsFromDayInfos(dayInfosInRange: DayInfo[]): (HTMLElement | null)[];\n}\n\n/**\n * @internal\n */\nexport const CalendarGridRow: React.FunctionComponent<CalendarGridRowProps> = props => {\n const {\n ariaHidden,\n classNames,\n week,\n weeks,\n weekIndex,\n rowClassName,\n ariaRole,\n showWeekNumbers,\n firstDayOfWeek,\n firstWeekOfYear,\n navigatedDate,\n strings,\n } = props;\n const weekNumbers = showWeekNumbers\n ? getWeekNumbersInMonth(weeks!.length, firstDayOfWeek, firstWeekOfYear, navigatedDate)\n : null;\n\n const titleString = weekNumbers\n ? strings.weekNumberFormatString && strings.weekNumberFormatString.replace('{0}', `${weekNumbers[weekIndex]}`)\n : '';\n\n return (\n <tr role={ariaRole} aria-hidden={ariaHidden} className={rowClassName} key={weekIndex + '_' + week[0].key}>\n {showWeekNumbers && weekNumbers && (\n <th\n className={classNames.weekNumberCell}\n key={weekIndex}\n title={titleString}\n aria-label={titleString}\n scope=\"row\"\n >\n <span>{weekNumbers[weekIndex]}</span>\n </th>\n )}\n {week.map((day: DayInfo, dayIndex: number) => (\n <CalendarGridDayCell {...props} key={day.key} day={day} dayIndex={dayIndex} />\n ))}\n </tr>\n );\n};\n"],"names":["React","getWeekNumbersInMonth","CalendarGridDayCell","CalendarGridRow","props","ariaHidden","classNames","week","weeks","weekIndex","rowClassName","ariaRole","showWeekNumbers","firstDayOfWeek","firstWeekOfYear","navigatedDate","strings","weekNumbers","length","titleString","weekNumberFormatString","replace","tr","role","aria-hidden","className","key","th","weekNumberCell","title","aria-label","scope","span","map","day","dayIndex"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,cAAc;AACpD,SAASC,mBAAmB,QAAQ,wBAAwB;AAwB5D;;CAEC,GACD,OAAO,MAAMC,kBAAiEC,CAAAA;IAC5E,MAAM,EACJC,UAAU,EACVC,UAAU,EACVC,IAAI,EACJC,KAAK,EACLC,SAAS,EACTC,YAAY,EACZC,QAAQ,EACRC,eAAe,EACfC,cAAc,EACdC,eAAe,EACfC,aAAa,EACbC,OAAO,EACR,GAAGZ;IACJ,MAAMa,cAAcL,kBAChBX,sBAAsBO,MAAOU,MAAM,EAAEL,gBAAgBC,iBAAiBC,iBACtE;IAEJ,MAAMI,cAAcF,cAChBD,QAAQI,sBAAsB,IAAIJ,QAAQI,sBAAsB,CAACC,OAAO,CAAC,OAAO,GAAGJ,WAAW,CAACR,UAAU,EAAE,IAC3G;IAEJ,qBACE,oBAACa;QAAGC,MAAMZ;QAAUa,eAAanB;QAAYoB,WAAWf;QAAcgB,KAAKjB,YAAY,MAAMF,IAAI,CAAC,EAAE,CAACmB,GAAG;OACrGd,mBAAmBK,6BAClB,oBAACU;QACCF,WAAWnB,WAAWsB,cAAc;QACpCF,KAAKjB;QACLoB,OAAOV;QACPW,cAAYX;QACZY,OAAM;qBAEN,oBAACC,cAAMf,WAAW,CAACR,UAAU,IAGhCF,KAAK0B,GAAG,CAAC,CAACC,KAAcC,yBACvB,oBAACjC;YAAqB,GAAGE,KAAK;YAAEsB,KAAKQ,IAAIR,GAAG;YAAEQ,KAAKA;YAAKC,UAAUA;;AAI1E,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarDayGrid/CalendarMonthHeaderRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@griffel/react';\nimport { DAYS_IN_WEEK } from '../../utils';\nimport type { CalendarDayGridProps, CalendarDayGridStyles } from './CalendarDayGrid.types';\nimport type { DayInfo } from './CalendarDayGrid';\n\n/**\n * @internal\n */\nexport interface CalendarDayMonthHeaderRowProps extends CalendarDayGridProps {\n weeks: DayInfo[][];\n classNames: CalendarDayGridStyles;\n}\n\n/**\n * @internal\n */\nexport const CalendarMonthHeaderRow: React.FunctionComponent<CalendarDayMonthHeaderRowProps> = props => {\n const { showWeekNumbers, strings, firstDayOfWeek, allFocusable, weeksToShow, weeks, classNames } = props;\n const dayLabels = strings.shortDays.slice();\n\n let firstOfMonthIndex = -1;\n const firstWeekOfMonth = weeks![1];\n for (let i = 0; i < weeks![1].length; i++) {\n if (firstWeekOfMonth[i].originalDate.getDate() === 1) {\n firstOfMonthIndex = i;\n break;\n }\n }\n\n if (weeksToShow === 1 && firstOfMonthIndex >= 0) {\n // if we only show one week, replace the header with short month name\n const firstOfMonthIndexOffset = (firstOfMonthIndex + firstDayOfWeek) % DAYS_IN_WEEK;\n dayLabels[firstOfMonthIndexOffset] = strings.shortMonths[weeks![1][firstOfMonthIndex].originalDate.getMonth()];\n }\n\n return (\n <tr>\n {showWeekNumbers && <th className={classNames.dayCell} />}\n {dayLabels.map((val: string, index: number) => {\n const i = (index + firstDayOfWeek) % DAYS_IN_WEEK;\n const label = strings.days[i];\n return (\n <th\n className={mergeClasses(classNames.dayCell, classNames.weekDayLabelCell)}\n scope=\"col\"\n key={dayLabels[i] + ' ' + index}\n title={label}\n aria-label={label}\n tabIndex={allFocusable ? 0 : undefined}\n >\n {dayLabels[i]}\n </th>\n );\n })}\n </tr>\n );\n};\n"],"names":["React","mergeClasses","DAYS_IN_WEEK","CalendarMonthHeaderRow","props","showWeekNumbers","strings","firstDayOfWeek","allFocusable","weeksToShow","weeks","classNames","dayLabels","shortDays","slice","firstOfMonthIndex","firstWeekOfMonth","i","length","originalDate","getDate","firstOfMonthIndexOffset","shortMonths","getMonth","tr","th","className","dayCell","map","val","index","label","days","weekDayLabelCell","scope","key","title","aria-label","tabIndex","undefined"],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/CalendarMonthHeaderRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@griffel/react';\nimport { DAYS_IN_WEEK } from '../../utils';\nimport type { CalendarDayGridProps, CalendarDayGridStyles } from './CalendarDayGrid.types';\nimport type { DayInfo } from './CalendarDayGrid';\n\n/**\n * @internal\n */\nexport interface CalendarDayMonthHeaderRowProps extends CalendarDayGridProps {\n weeks: DayInfo[][];\n classNames: CalendarDayGridStyles;\n}\n\n/**\n * @internal\n */\nexport const CalendarMonthHeaderRow: React.FunctionComponent<CalendarDayMonthHeaderRowProps> = props => {\n const { showWeekNumbers, strings, firstDayOfWeek, allFocusable, weeksToShow, weeks, classNames } = props;\n const dayLabels = strings.shortDays.slice();\n\n let firstOfMonthIndex = -1;\n const firstWeekOfMonth = weeks![1];\n for (let i = 0; i < weeks![1].length; i++) {\n if (firstWeekOfMonth[i].originalDate.getDate() === 1) {\n firstOfMonthIndex = i;\n break;\n }\n }\n\n if (weeksToShow === 1 && firstOfMonthIndex >= 0) {\n // if we only show one week, replace the header with short month name\n const firstOfMonthIndexOffset = (firstOfMonthIndex + firstDayOfWeek) % DAYS_IN_WEEK;\n dayLabels[firstOfMonthIndexOffset] = strings.shortMonths[weeks![1][firstOfMonthIndex].originalDate.getMonth()];\n }\n\n return (\n <tr>\n {showWeekNumbers && <th className={classNames.dayCell} />}\n {dayLabels.map((val: string, index: number) => {\n const i = (index + firstDayOfWeek) % DAYS_IN_WEEK;\n const label = strings.days[i];\n return (\n <th\n className={mergeClasses(classNames.dayCell, classNames.weekDayLabelCell)}\n scope=\"col\"\n key={dayLabels[i] + ' ' + index}\n title={label}\n aria-label={label}\n tabIndex={allFocusable ? 0 : undefined}\n >\n {dayLabels[i]}\n </th>\n );\n })}\n </tr>\n );\n};\n"],"names":["React","mergeClasses","DAYS_IN_WEEK","CalendarMonthHeaderRow","props","showWeekNumbers","strings","firstDayOfWeek","allFocusable","weeksToShow","weeks","classNames","dayLabels","shortDays","slice","firstOfMonthIndex","firstWeekOfMonth","i","length","originalDate","getDate","firstOfMonthIndexOffset","shortMonths","getMonth","tr","th","className","dayCell","map","val","index","label","days","weekDayLabelCell","scope","key","title","aria-label","tabIndex","undefined"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,YAAY,QAAQ,cAA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alendarDayGrid/index.ts"],"sourcesContent":["export type { DayInfo } from './CalendarDayGrid';\nexport { CalendarDayGrid } from './CalendarDayGrid';\nexport type {\n CalendarDayGridProps,\n CalendarDayGridStyleProps,\n CalendarDayGridStyles,\n ICalendarDayGrid,\n} from './CalendarDayGrid.types';\nexport {\n calendarDayGridClassNames,\n extraCalendarDayGridClassNames,\n useCalendarDayGridStyles_unstable,\n} from './useCalendarDayGridStyles.styles';\nexport type { WeekCorners } from './useWeekCornerStyles.styles';\n"],"names":["CalendarDayGrid","calendarDayGridClassNames","extraCalendarDayGridClassNames","useCalendarDayGridStyles_unstable"],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/index.ts"],"sourcesContent":["export type { DayInfo } from './CalendarDayGrid';\nexport { CalendarDayGrid } from './CalendarDayGrid';\nexport type {\n CalendarDayGridProps,\n CalendarDayGridStyleProps,\n CalendarDayGridStyles,\n ICalendarDayGrid,\n} from './CalendarDayGrid.types';\nexport {\n calendarDayGridClassNames,\n extraCalendarDayGridClassNames,\n useCalendarDayGridStyles_unstable,\n} from './useCalendarDayGridStyles.styles';\nexport type { WeekCorners } from './useWeekCornerStyles.styles';\n"],"names":["CalendarDayGrid","calendarDayGridClassNames","extraCalendarDayGridClassNames","useCalendarDayGridStyles_unstable"],"mappings":"AACA,SAASA,eAAe,QAAQ,oBAAoB;AAOpD,SACEC,yBAAyB,EACzBC,8BAA8B,EAC9BC,iCAAiC,QAC5B,oCAAoC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarDayGrid/useCalendarDayGridStyles.styles.ts"],"sourcesContent":["import { 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 FADE_OUT,\n SLIDE_DOWN_IN20,\n SLIDE_DOWN_OUT20,\n SLIDE_LEFT_IN20,\n SLIDE_RIGHT_IN20,\n SLIDE_UP_IN20,\n SLIDE_UP_OUT20,\n TRANSITION_ROW_DISAPPEARANCE,\n} from '../../utils';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport { weekCornersClassNames } from './useWeekCornerStyles.styles';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CalendarDayGridStyles, CalendarDayGridStyleProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport const calendarDayGridClassNames: SlotClassNames<CalendarDayGridStyles> = {\n wrapper: 'fui-CalendarDayGrid__wrapper',\n table: 'fui-CalendarDayGrid__table',\n dayCell: 'fui-CalendarDayGrid__dayCell',\n daySelected: 'fui-CalendarDayGrid__daySelected',\n daySingleSelected: 'fui-CalendarDayGrid__daySingleSelected',\n weekRow: 'fui-CalendarDayGrid__weekRow',\n weekDayLabelCell: 'fui-CalendarDayGrid__weekDayLabelCell',\n weekNumberCell: 'fui-CalendarDayGrid__weekNumberCell',\n dayOutsideBounds: 'fui-CalendarDayGrid__dayOutsideBounds',\n dayOutsideNavigatedMonth: 'fui-CalendarDayGrid__dayOutsideNavigatedMonth',\n dayButton: 'fui-CalendarDayGrid__dayButton',\n dayIsToday: 'fui-CalendarDayGrid__dayIsToday',\n firstTransitionWeek: 'fui-CalendarDayGrid__firstTransitionWeek',\n lastTransitionWeek: 'fui-CalendarDayGrid__lastTransitionWeek',\n dayMarker: 'fui-CalendarDayGrid__dayMarker',\n dayTodayMarker: 'fui-CalendarDayGrid__dayTodayMarker',\n};\n\n/**\n * @internal\n */\nexport const extraCalendarDayGridClassNames = {\n hoverStyle: 'fui-CalendarDayGrid__hoverStyle',\n pressedStyle: 'fui-CalendarDayGrid__pressedStyle',\n};\n\nconst useWrapperStyles = makeStyles({\n base: {\n paddingBottom: '10px',\n },\n});\n\nconst useTableStyles = makeStyles({\n base: {\n borderCollapse: 'collapse',\n borderSpacing: 0,\n fontSize: 'inherit',\n marginTop: '4px',\n paddingBottom: '10px',\n position: 'relative',\n tableLayout: 'fixed',\n textAlign: 'center',\n width: '196px',\n },\n showWeekNumbers: {\n width: '226px',\n },\n});\n\nconst useDayCellStyles = makeStyles({\n base: {\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n margin: '0',\n padding: '2px',\n position: 'relative',\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n },\n\n [`&.${extraCalendarDayGridClassNames.hoverStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n '@media (forced-colors: active)': {\n outline: '1px solid Highlight',\n zIndex: 3,\n [`& .${calendarDayGridClassNames.dayTodayMarker}`]: {\n backgroundColor: 'Highlight',\n },\n },\n },\n\n [`&.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n ...shorthands.borderColor('Highlight'),\n color: 'Highlight',\n },\n },\n },\n focusIndicator: createFocusOutlineStyle({\n style: {\n outlineWidth: tokens.strokeWidthThick,\n ...shorthands.borderWidth(tokens.strokeWidthThick),\n },\n }),\n});\n\nconst useDaySelectedStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Highlight'),\n color: 'HighlightText',\n forcedColorAdjust: 'none',\n },\n\n [`&:hover, &.${extraCalendarDayGridClassNames.hoverStyle}, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n },\n },\n },\n});\n\nconst useDaySingleSelectedStyles = makeStyles({\n base: {\n color: tokens.colorNeutralForeground1Static,\n\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n },\n },\n\n [`& > .${calendarDayGridClassNames.dayButton}`]: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n borderRadius: tokens.borderRadiusMedium,\n ...shorthands.border('1px', 'solid', tokens.colorBrandStroke1),\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Highlight'),\n color: 'HighlightText',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useWeekRowStyles = makeStyles({\n base: {\n position: 'relative',\n ':focus-within': {\n zIndex: 1,\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 useWeekDayLabelCellStyles = makeStyles({\n base: {\n userSelect: 'none',\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2,\n },\n});\n\nconst useWeekNumberCellStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n borderRight: `1px solid ${tokens.colorNeutralStroke2}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground4,\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n height: '28px',\n margin: '0',\n padding: '0',\n width: '28px',\n },\n});\n\nconst useDayOutsideBoundsStyles = makeStyles({\n base: {\n [`&, &:disabled, & button, &.${extraCalendarDayGridClassNames.hoverStyle}` +\n `, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none',\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\nconst useDayOutsideNavigatedMonthStyles = makeStyles({\n lightenDaysOutsideNavigatedMonth: {\n color: tokens.colorNeutralForeground4,\n fontWeight: tokens.fontWeightRegular,\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\nconst useDayButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n fontSize: tokens.fontSizeBase200,\n fontWeight: 'inherit',\n height: '24px',\n lineHeight: '24px',\n overflow: 'visible',\n padding: '0',\n width: '24px',\n\n '&span': {\n height: 'inherit',\n lineHeight: 'inherit',\n },\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n borderRadius: tokens.borderRadiusMedium,\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n },\n },\n});\n\nconst useDayIsTodayStyles = makeStyles({\n base: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n },\n },\n },\n});\n\nconst useDayTodayMarkerStyles = makeStyles({\n base: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: tokens.colorBrandBackground,\n borderRadius: '100%',\n width: '20px',\n height: '20px',\n lineHeight: '20px',\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n ...shorthands.borderColor('WindowText'),\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n },\n});\n\nconst useFirstTransitionWeekStyles = makeStyles({\n base: {\n height: 0,\n opacity: 0,\n overflow: 'hidden',\n\n position: 'absolute',\n width: 0,\n },\n verticalForward: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationName: [FADE_OUT, SLIDE_UP_OUT20, TRANSITION_ROW_DISAPPEARANCE],\n animationTimingFunction: EASING_FUNCTION_1,\n },\n});\n\nconst useLastTransitionWeekStyles = makeStyles({\n base: {\n height: 0,\n marginTop: '-28px',\n opacity: 0,\n overflow: 'hidden',\n position: 'absolute',\n width: 0,\n },\n verticalBackward: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationName: [FADE_OUT, SLIDE_DOWN_OUT20, TRANSITION_ROW_DISAPPEARANCE],\n animationTimingFunction: EASING_FUNCTION_1,\n },\n});\n\nconst useDayMarkerStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandForeground2,\n borderRadius: '100%',\n bottom: '1px',\n height: '4px',\n left: 0,\n margin: 'auto',\n\n position: 'absolute',\n right: 0,\n width: '4px',\n\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n forcedColorAdjust: 'none',\n },\n },\n});\n\nconst useCornerBorderAndRadiusStyles = makeStyles({\n corners: {\n [`&.${weekCornersClassNames.topRightCornerDate}`]: {\n borderTopRightRadius: tokens.borderRadiusMedium,\n },\n [`&.${weekCornersClassNames.topLeftCornerDate}`]: {\n borderTopLeftRadius: tokens.borderRadiusMedium,\n },\n [`&.${weekCornersClassNames.bottomRightCornerDate}`]: {\n borderBottomRightRadius: tokens.borderRadiusMedium,\n },\n [`&.${weekCornersClassNames.bottomLeftCornerDate}`]: {\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n },\n },\n});\n\n/**\n * @internal\n *\n * Apply styling to the CalendarDayGrid slots based on the state\n */\nexport const useCalendarDayGridStyles_unstable = (props: CalendarDayGridStyleProps): CalendarDayGridStyles => {\n 'use no memo';\n\n const wrapperStyles = useWrapperStyles();\n const tableStyles = useTableStyles();\n const dayCellStyles = useDayCellStyles();\n const daySelectedStyles = useDaySelectedStyles();\n const daySingleSelectedStyles = useDaySingleSelectedStyles();\n const weekRowStyles = useWeekRowStyles();\n const weekDayLabelCellStyles = useWeekDayLabelCellStyles();\n const weekNumberCellStyles = useWeekNumberCellStyles();\n const dayOutsideBoundsStyles = useDayOutsideBoundsStyles();\n const dayOutsideNavigatedMonthStyles = useDayOutsideNavigatedMonthStyles();\n const dayButtonStyles = useDayButtonStyles();\n const dayIsTodayStyles = useDayIsTodayStyles();\n const firstTransitionWeekStyles = useFirstTransitionWeekStyles();\n const lastTransitionWeekStyles = useLastTransitionWeekStyles();\n const dayMarkerStyles = useDayMarkerStyles();\n const cornerBorderAndRadiusStyles = useCornerBorderAndRadiusStyles();\n const dayTodayMarkerStyles = useDayTodayMarkerStyles();\n\n const { animateBackwards, animationDirection, lightenDaysOutsideNavigatedMonth, showWeekNumbers } = props;\n\n return {\n wrapper: mergeClasses(calendarDayGridClassNames.wrapper, wrapperStyles.base),\n table: mergeClasses(\n calendarDayGridClassNames.table,\n tableStyles.base,\n showWeekNumbers && tableStyles.showWeekNumbers,\n ),\n dayCell: mergeClasses(\n calendarDayGridClassNames.dayCell,\n dayCellStyles.base,\n dayCellStyles.focusIndicator,\n cornerBorderAndRadiusStyles.corners,\n ),\n daySelected: mergeClasses(calendarDayGridClassNames.daySelected, daySelectedStyles.base),\n daySingleSelected: mergeClasses(calendarDayGridClassNames.daySingleSelected, daySingleSelectedStyles.base),\n weekRow: mergeClasses(\n calendarDayGridClassNames.weekRow,\n weekRowStyles.base,\n animateBackwards !== undefined && weekRowStyles.animation,\n animateBackwards !== undefined &&\n (animationDirection === AnimationDirection.Horizontal\n ? animateBackwards\n ? weekRowStyles.horizontalBackward\n : weekRowStyles.horizontalForward\n : animateBackwards\n ? weekRowStyles.verticalBackward\n : weekRowStyles.verticalForward),\n ),\n weekDayLabelCell: mergeClasses(calendarDayGridClassNames.weekDayLabelCell, weekDayLabelCellStyles.base),\n weekNumberCell: mergeClasses(calendarDayGridClassNames.weekNumberCell, weekNumberCellStyles.base),\n dayOutsideBounds: mergeClasses(calendarDayGridClassNames.dayOutsideBounds, dayOutsideBoundsStyles.base),\n dayOutsideNavigatedMonth: mergeClasses(\n calendarDayGridClassNames.dayOutsideNavigatedMonth,\n lightenDaysOutsideNavigatedMonth && dayOutsideNavigatedMonthStyles.lightenDaysOutsideNavigatedMonth,\n ),\n dayButton: mergeClasses(calendarDayGridClassNames.dayButton, dayButtonStyles.base),\n dayIsToday: mergeClasses(calendarDayGridClassNames.dayIsToday, dayIsTodayStyles.base),\n firstTransitionWeek: mergeClasses(\n calendarDayGridClassNames.firstTransitionWeek,\n firstTransitionWeekStyles.base,\n animateBackwards !== undefined &&\n animationDirection !== AnimationDirection.Horizontal &&\n !animateBackwards &&\n firstTransitionWeekStyles.verticalForward,\n ),\n lastTransitionWeek: mergeClasses(\n calendarDayGridClassNames.lastTransitionWeek,\n lastTransitionWeekStyles.base,\n animateBackwards !== undefined &&\n animationDirection !== AnimationDirection.Horizontal &&\n animateBackwards &&\n lastTransitionWeekStyles.verticalBackward,\n ),\n dayMarker: mergeClasses(calendarDayGridClassNames.dayMarker, dayMarkerStyles.base),\n dayTodayMarker: mergeClasses(calendarDayGridClassNames.dayTodayMarker, dayTodayMarkerStyles.base),\n };\n};\n"],"names":["tokens","makeStyles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","FADE_OUT","SLIDE_DOWN_IN20","SLIDE_DOWN_OUT20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","SLIDE_UP_OUT20","TRANSITION_ROW_DISAPPEARANCE","AnimationDirection","weekCornersClassNames","createFocusOutlineStyle","calendarDayGridClassNames","wrapper","table","dayCell","daySelected","daySingleSelected","weekRow","weekDayLabelCell","weekNumberCell","dayOutsideBounds","dayOutsideNavigatedMonth","dayButton","dayIsToday","firstTransitionWeek","lastTransitionWeek","dayMarker","dayTodayMarker","extraCalendarDayGridClassNames","hoverStyle","pressedStyle","useWrapperStyles","base","paddingBottom","useTableStyles","borderCollapse","borderSpacing","fontSize","marginTop","position","tableLayout","textAlign","width","showWeekNumbers","useDayCellStyles","color","colorNeutralForeground1","cursor","fontSizeBase200","fontWeight","fontWeightRegular","margin","padding","backgroundColor","colorNeutralForeground1Static","colorBrandBackgroundInvertedHover","outline","zIndex","colorBrandBackgroundInvertedPressed","borderColor","focusIndicator","style","outlineWidth","strokeWidthThick","borderWidth","useDaySelectedStyles","colorBrandBackgroundInvertedSelected","forcedColorAdjust","useDaySingleSelectedStyles","borderRadius","borderRadiusMedium","border","colorBrandStroke1","useWeekRowStyles","animation","animationDuration","animationFillMode","animationTimingFunction","horizontalBackward","animationName","horizontalForward","verticalBackward","verticalForward","useWeekDayLabelCellStyles","userSelect","useWeekNumberCellStyles","colorTransparentBackground","borderRight","colorNeutralStroke2","boxSizing","colorNeutralForeground4","height","useDayOutsideBoundsStyles","colorNeutralForegroundDisabled","pointerEvents","useDayOutsideNavigatedMonthStyles","lightenDaysOutsideNavigatedMonth","useDayButtonStyles","lineHeight","overflow","useDayIsTodayStyles","display","justifyContent","alignItems","colorNeutralForegroundOnBrand","fontWeightSemibold","useDayTodayMarkerStyles","colorBrandBackground","useFirstTransitionWeekStyles","opacity","useLastTransitionWeekStyles","useDayMarkerStyles","colorBrandForeground2","bottom","left","right","useCornerBorderAndRadiusStyles","corners","topRightCornerDate","borderTopRightRadius","topLeftCornerDate","borderTopLeftRadius","bottomRightCornerDate","borderBottomRightRadius","bottomLeftCornerDate","borderBottomLeftRadius","useCalendarDayGridStyles_unstable","props","wrapperStyles","tableStyles","dayCellStyles","daySelectedStyles","daySingleSelectedStyles","weekRowStyles","weekDayLabelCellStyles","weekNumberCellStyles","dayOutsideBoundsStyles","dayOutsideNavigatedMonthStyles","dayButtonStyles","dayIsTodayStyles","firstTransitionWeekStyles","lastTransitionWeekStyles","dayMarkerStyles","cornerBorderAndRadiusStyles","dayTodayMarkerStyles","animateBackwards","animationDirection","undefined","Horizontal"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AACtE,SACEC,UAAU,EACVC,UAAU,EACVC,iBAAiB,EACjBC,iBAAiB,EACjBC,OAAO,EACPC,QAAQ,EACRC,eAAe,EACfC,gBAAgB,EAChBC,eAAe,EACfC,gBAAgB,EAChBC,aAAa,EACbC,cAAc,EACdC,4BAA4B,QACvB,cAAc;AACrB,SAASC,kBAAkB,QAAQ,6BAA6B;AAChE,SAASC,qBAAqB,QAAQ,+BAA+B;AACrE,SAASC,uBAAuB,QAAQ,0BAA0B;AAIlE;;CAEC,GACD,OAAO,MAAMC,4BAAmE;IAC9EC,SAAS;IACTC,OAAO;IACPC,SAAS;IACTC,aAAa;IACbC,mBAAmB;IACnBC,SAAS;IACTC,kBAAkB;IAClBC,gBAAgB;IAChBC,kBAAkB;IAClBC,0BAA0B;IAC1BC,WAAW;IACXC,YAAY;IACZC,qBAAqB;IACrBC,oBAAoB;IACpBC,WAAW;IACXC,gBAAgB;AAClB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AqBvG,IAAI;QAChGZ,kBAAkB3B,aAAakB,0BAA0BS,gBAAgB,EAAEoH,uBAAuBxG,IAAI;QACtGX,0BAA0B5B,aACxBkB,0BAA0BU,wBAAwB,EAClD2E,oCAAoCyC,+BAA+BzC,gCAAgC;QAErG1E,WAAW7B,aAAakB,0BAA0BW,SAAS,EAAEoH,gBAAgB1G,IAAI;QACjFT,YAAY9B,aAAakB,0BAA0BY,UAAU,EAAEoH,iBAAiB3G,IAAI;QACpFR,qBAAqB/B,aACnBkB,0BAA0Ba,mBAAmB,EAC7CoH,0BAA0B5G,IAAI,EAC9BiH,qBAAqBE,aACnBD,uBAAuB1I,mBAAmB4I,UAAU,IACpD,CAACH,oBACDL,0BAA0B1D,eAAe;QAE7CzD,oBAAoBhC,aAClBkB,0BAA0Bc,kBAAkB,EAC5CoH,yBAAyB7G,IAAI,EAC7BiH,qBAAqBE,aACnBD,uBAAuB1I,mBAAmB4I,UAAU,IACpDH,oBACAJ,yBAAyB5D,gBAAgB;QAE7CvD,WAAWjC,aAAakB,0BAA0Be,SAAS,EAAEoH,gBAAgB9G,IAAI;QACjFL,gBAAgBlC,aAAakB,0BAA0BgB,cAAc,EAAEqH,qBAAqBhH,IAAI;IAClG;AACF,EAAE"}
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/useCalendarDayGridStyles.styles.ts"],"sourcesContent":["import { 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 FADE_OUT,\n SLIDE_DOWN_IN20,\n SLIDE_DOWN_OUT20,\n SLIDE_LEFT_IN20,\n SLIDE_RIGHT_IN20,\n SLIDE_UP_IN20,\n SLIDE_UP_OUT20,\n TRANSITION_ROW_DISAPPEARANCE,\n} from '../../utils';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport { weekCornersClassNames } from './useWeekCornerStyles.styles';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CalendarDayGridStyles, CalendarDayGridStyleProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport const calendarDayGridClassNames: SlotClassNames<CalendarDayGridStyles> = {\n wrapper: 'fui-CalendarDayGrid__wrapper',\n table: 'fui-CalendarDayGrid__table',\n dayCell: 'fui-CalendarDayGrid__dayCell',\n daySelected: 'fui-CalendarDayGrid__daySelected',\n daySingleSelected: 'fui-CalendarDayGrid__daySingleSelected',\n weekRow: 'fui-CalendarDayGrid__weekRow',\n weekDayLabelCell: 'fui-CalendarDayGrid__weekDayLabelCell',\n weekNumberCell: 'fui-CalendarDayGrid__weekNumberCell',\n dayOutsideBounds: 'fui-CalendarDayGrid__dayOutsideBounds',\n dayOutsideNavigatedMonth: 'fui-CalendarDayGrid__dayOutsideNavigatedMonth',\n dayButton: 'fui-CalendarDayGrid__dayButton',\n dayIsToday: 'fui-CalendarDayGrid__dayIsToday',\n firstTransitionWeek: 'fui-CalendarDayGrid__firstTransitionWeek',\n lastTransitionWeek: 'fui-CalendarDayGrid__lastTransitionWeek',\n dayMarker: 'fui-CalendarDayGrid__dayMarker',\n dayTodayMarker: 'fui-CalendarDayGrid__dayTodayMarker',\n};\n\n/**\n * @internal\n */\nexport const extraCalendarDayGridClassNames = {\n hoverStyle: 'fui-CalendarDayGrid__hoverStyle',\n pressedStyle: 'fui-CalendarDayGrid__pressedStyle',\n};\n\nconst useWrapperStyles = makeStyles({\n base: {\n paddingBottom: '10px',\n },\n});\n\nconst useTableStyles = makeStyles({\n base: {\n borderCollapse: 'collapse',\n borderSpacing: 0,\n fontSize: 'inherit',\n marginTop: '4px',\n paddingBottom: '10px',\n position: 'relative',\n tableLayout: 'fixed',\n textAlign: 'center',\n width: '196px',\n },\n showWeekNumbers: {\n width: '226px',\n },\n});\n\nconst useDayCellStyles = makeStyles({\n base: {\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n margin: '0',\n padding: '2px',\n position: 'relative',\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n },\n\n [`&.${extraCalendarDayGridClassNames.hoverStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n '@media (forced-colors: active)': {\n outline: '1px solid Highlight',\n zIndex: 3,\n [`& .${calendarDayGridClassNames.dayTodayMarker}`]: {\n backgroundColor: 'Highlight',\n },\n },\n },\n\n [`&.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n ...shorthands.borderColor('Highlight'),\n color: 'Highlight',\n },\n },\n },\n focusIndicator: createFocusOutlineStyle({\n style: {\n outlineWidth: tokens.strokeWidthThick,\n ...shorthands.borderWidth(tokens.strokeWidthThick),\n },\n }),\n});\n\nconst useDaySelectedStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Highlight'),\n color: 'HighlightText',\n forcedColorAdjust: 'none',\n },\n\n [`&:hover, &.${extraCalendarDayGridClassNames.hoverStyle}, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n },\n },\n },\n});\n\nconst useDaySingleSelectedStyles = makeStyles({\n base: {\n color: tokens.colorNeutralForeground1Static,\n\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n },\n },\n\n [`& > .${calendarDayGridClassNames.dayButton}`]: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n borderRadius: tokens.borderRadiusMedium,\n ...shorthands.border('1px', 'solid', tokens.colorBrandStroke1),\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Highlight'),\n color: 'HighlightText',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useWeekRowStyles = makeStyles({\n base: {\n position: 'relative',\n ':focus-within': {\n zIndex: 1,\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 useWeekDayLabelCellStyles = makeStyles({\n base: {\n userSelect: 'none',\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2,\n },\n});\n\nconst useWeekNumberCellStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n borderRight: `1px solid ${tokens.colorNeutralStroke2}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground4,\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n height: '28px',\n margin: '0',\n padding: '0',\n width: '28px',\n },\n});\n\nconst useDayOutsideBoundsStyles = makeStyles({\n base: {\n [`&, &:disabled, & button, &.${extraCalendarDayGridClassNames.hoverStyle}` +\n `, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none',\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\nconst useDayOutsideNavigatedMonthStyles = makeStyles({\n lightenDaysOutsideNavigatedMonth: {\n color: tokens.colorNeutralForeground4,\n fontWeight: tokens.fontWeightRegular,\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\nconst useDayButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n fontSize: tokens.fontSizeBase200,\n fontWeight: 'inherit',\n height: '24px',\n lineHeight: '24px',\n overflow: 'visible',\n padding: '0',\n width: '24px',\n\n '&span': {\n height: 'inherit',\n lineHeight: 'inherit',\n },\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n borderRadius: tokens.borderRadiusMedium,\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n },\n },\n});\n\nconst useDayIsTodayStyles = makeStyles({\n base: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n },\n },\n },\n});\n\nconst useDayTodayMarkerStyles = makeStyles({\n base: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: tokens.colorBrandBackground,\n borderRadius: '100%',\n width: '20px',\n height: '20px',\n lineHeight: '20px',\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n ...shorthands.borderColor('WindowText'),\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n },\n});\n\nconst useFirstTransitionWeekStyles = makeStyles({\n base: {\n height: 0,\n opacity: 0,\n overflow: 'hidden',\n\n position: 'absolute',\n width: 0,\n },\n verticalForward: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationName: [FADE_OUT, SLIDE_UP_OUT20, TRANSITION_ROW_DISAPPEARANCE],\n animationTimingFunction: EASING_FUNCTION_1,\n },\n});\n\nconst useLastTransitionWeekStyles = makeStyles({\n base: {\n height: 0,\n marginTop: '-28px',\n opacity: 0,\n overflow: 'hidden',\n position: 'absolute',\n width: 0,\n },\n verticalBackward: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationName: [FADE_OUT, SLIDE_DOWN_OUT20, TRANSITION_ROW_DISAPPEARANCE],\n animationTimingFunction: EASING_FUNCTION_1,\n },\n});\n\nconst useDayMarkerStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandForeground2,\n borderRadius: '100%',\n bottom: '1px',\n height: '4px',\n left: 0,\n margin: 'auto',\n\n position: 'absolute',\n right: 0,\n width: '4px',\n\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n forcedColorAdjust: 'none',\n },\n },\n});\n\nconst useCornerBorderAndRadiusStyles = makeStyles({\n corners: {\n [`&.${weekCornersClassNames.topRightCornerDate}`]: {\n borderTopRightRadius: tokens.borderRadiusMedium,\n },\n [`&.${weekCornersClassNames.topLeftCornerDate}`]: {\n borderTopLeftRadius: tokens.borderRadiusMedium,\n },\n [`&.${weekCornersClassNames.bottomRightCornerDate}`]: {\n borderBottomRightRadius: tokens.borderRadiusMedium,\n },\n [`&.${weekCornersClassNames.bottomLeftCornerDate}`]: {\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n },\n },\n});\n\n/**\n * @internal\n *\n * Apply styling to the CalendarDayGrid slots based on the state\n */\nexport const useCalendarDayGridStyles_unstable = (props: CalendarDayGridStyleProps): CalendarDayGridStyles => {\n 'use no memo';\n\n const wrapperStyles = useWrapperStyles();\n const tableStyles = useTableStyles();\n const dayCellStyles = useDayCellStyles();\n const daySelectedStyles = useDaySelectedStyles();\n const daySingleSelectedStyles = useDaySingleSelectedStyles();\n const weekRowStyles = useWeekRowStyles();\n const weekDayLabelCellStyles = useWeekDayLabelCellStyles();\n const weekNumberCellStyles = useWeekNumberCellStyles();\n const dayOutsideBoundsStyles = useDayOutsideBoundsStyles();\n const dayOutsideNavigatedMonthStyles = useDayOutsideNavigatedMonthStyles();\n const dayButtonStyles = useDayButtonStyles();\n const dayIsTodayStyles = useDayIsTodayStyles();\n const firstTransitionWeekStyles = useFirstTransitionWeekStyles();\n const lastTransitionWeekStyles = useLastTransitionWeekStyles();\n const dayMarkerStyles = useDayMarkerStyles();\n const cornerBorderAndRadiusStyles = useCornerBorderAndRadiusStyles();\n const dayTodayMarkerStyles = useDayTodayMarkerStyles();\n\n const { animateBackwards, animationDirection, lightenDaysOutsideNavigatedMonth, showWeekNumbers } = props;\n\n return {\n wrapper: mergeClasses(calendarDayGridClassNames.wrapper, wrapperStyles.base),\n table: mergeClasses(\n calendarDayGridClassNames.table,\n tableStyles.base,\n showWeekNumbers && tableStyles.showWeekNumbers,\n ),\n dayCell: mergeClasses(\n calendarDayGridClassNames.dayCell,\n dayCellStyles.base,\n dayCellStyles.focusIndicator,\n cornerBorderAndRadiusStyles.corners,\n ),\n daySelected: mergeClasses(calendarDayGridClassNames.daySelected, daySelectedStyles.base),\n daySingleSelected: mergeClasses(calendarDayGridClassNames.daySingleSelected, daySingleSelectedStyles.base),\n weekRow: mergeClasses(\n calendarDayGridClassNames.weekRow,\n weekRowStyles.base,\n animateBackwards !== undefined && weekRowStyles.animation,\n animateBackwards !== undefined &&\n (animationDirection === AnimationDirection.Horizontal\n ? animateBackwards\n ? weekRowStyles.horizontalBackward\n : weekRowStyles.horizontalForward\n : animateBackwards\n ? weekRowStyles.verticalBackward\n : weekRowStyles.verticalForward),\n ),\n weekDayLabelCell: mergeClasses(calendarDayGridClassNames.weekDayLabelCell, weekDayLabelCellStyles.base),\n weekNumberCell: mergeClasses(calendarDayGridClassNames.weekNumberCell, weekNumberCellStyles.base),\n dayOutsideBounds: mergeClasses(calendarDayGridClassNames.dayOutsideBounds, dayOutsideBoundsStyles.base),\n dayOutsideNavigatedMonth: mergeClasses(\n calendarDayGridClassNames.dayOutsideNavigatedMonth,\n lightenDaysOutsideNavigatedMonth && dayOutsideNavigatedMonthStyles.lightenDaysOutsideNavigatedMonth,\n ),\n dayButton: mergeClasses(calendarDayGridClassNames.dayButton, dayButtonStyles.base),\n dayIsToday: mergeClasses(calendarDayGridClassNames.dayIsToday, dayIsTodayStyles.base),\n firstTransitionWeek: mergeClasses(\n calendarDayGridClassNames.firstTransitionWeek,\n firstTransitionWeekStyles.base,\n animateBackwards !== undefined &&\n animationDirection !== AnimationDirection.Horizontal &&\n !animateBackwards &&\n firstTransitionWeekStyles.verticalForward,\n ),\n lastTransitionWeek: mergeClasses(\n calendarDayGridClassNames.lastTransitionWeek,\n lastTransitionWeekStyles.base,\n animateBackwards !== undefined &&\n animationDirection !== AnimationDirection.Horizontal &&\n animateBackwards &&\n lastTransitionWeekStyles.verticalBackward,\n ),\n dayMarker: mergeClasses(calendarDayGridClassNames.dayMarker, dayMarkerStyles.base),\n dayTodayMarker: mergeClasses(calendarDayGridClassNames.dayTodayMarker, dayTodayMarkerStyles.base),\n };\n};\n"],"names":["tokens","makeStyles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","FADE_OUT","SLIDE_DOWN_IN20","SLIDE_DOWN_OUT20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","SLIDE_UP_OUT20","TRANSITION_ROW_DISAPPEARANCE","AnimationDirection","weekCornersClassNames","createFocusOutlineStyle","calendarDayGridClassNames","wrapper","table","dayCell","daySelected","daySingleSelected","weekRow","weekDayLabelCell","weekNumberCell","dayOutsideBounds","dayOutsideNavigatedMonth","dayButton","dayIsToday","firstTransitionWeek","lastTransitionWeek","dayMarker","dayTodayMarker","extraCalendarDayGridClassNames","hoverStyle","pressedStyle","useWrapperStyles","base","paddingBottom","useTableStyles","borderCollapse","borderSpacing","fontSize","marginTop","position","tableLayout","textAlign","width","showWeekNumbers","useDayCellStyles","color","colorNeutralForeground1","cursor","fontSizeBase200","fontWeight","fontWeightRegular","margin","padding","backgroundColor","colorNeutralForeground1Static","colorBrandBackgroundInvertedHover","outline","zIndex","colorBrandBackgroundInvertedPressed","borderColor","focusIndicator","style","outlineWidth","strokeWidthThick","borderWidth","useDaySelectedStyles","colorBrandBackgroundInvertedSelected","forcedColorAdjust","useDaySingleSelectedStyles","borderRadius","borderRadiusMedium","border","colorBrandStroke1","useWeekRowStyles","animation","animationDuration","animationFillMode","animationTimingFunction","horizontalBackward","animationName","horizontalForward","verticalBackward","verticalForward","useWeekDayLabelCellStyles","userSelect","useWeekNumberCellStyles","colorTransparentBackground","borderRight","colorNeutralStroke2","boxSizing","colorNeutralForeground4","height","useDayOutsideBoundsStyles","colorNeutralForegroundDisabled","pointerEvents","useDayOutsideNavigatedMonthStyles","lightenDaysOutsideNavigatedMonth","useDayButtonStyles","lineHeight","overflow","useDayIsTodayStyles","display","justifyContent","alignItems","colorNeutralForegroundOnBrand","fontWeightSemibold","useDayTodayMarkerStyles","colorBrandBackground","useFirstTransitionWeekStyles","opacity","useLastTransitionWeekStyles","useDayMarkerStyles","colorBrandForeground2","bottom","left","right","useCornerBorderAndRadiusStyles","corners","topRightCornerDate","borderTopRightRadius","topLeftCornerDate","borderTopLeftRadius","bottomRightCornerDate","borderBottomRightRadius","bottomLeftCornerDate","borderBottomLeftRadius","useCalendarDayGridStyles_unstable","props","wrapperStyles","tableStyles","dayCellStyles","daySelectedStyles","daySingleSelectedStyles","weekRowStyles","weekDayLabelCellStyles","weekNumberCellStyles","dayOutsideBoundsStyles","dayOutsideNavigatedMonthStyles","dayButtonStyles","dayIsTodayStyles","firstTransitionWeekStyles","lastTransitionWeekStyles","dayMarkerStyles","cornerBorderAndRadiusStyles","dayTodayMarkerStyles","animateBackwards","animationDirection","undefined","Horizontal"],"mappings":"AAAA,SAASA,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,UAAU,EAAEC,YAAY,EAAEC,U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AEqH,qBAAqBhH,IAAI;IAClG;AACF,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarDayGrid/useWeekCornerStyles.styles.ts"],"sourcesContent":["import { 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(props: CalendarDayGridProps) {\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"],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/useWeekCornerStyles.styles.ts"],"sourcesContent":["import { 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(props: CalendarDayGridProps) {\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,SAASA,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,iBAAiB,QAAQ,oBAAoB;AAItD;;CAEC,GACD,OAAO,MAAMC,wBAAwB;IACnCC,oBAAoB;IACpBC,mBAAmB;IACnBC,uBAAuB;IACvBC,sBAAsB;AACxB,EAAE;AASF;;CAEC,GACD,OAAO,SAASC,oBAAoBC,KAA2B;IAC7D,MAAM,EAAEC,GAAG,EAAE,GAAGX;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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sBAAsBC,kBAAkB,GAAGD,sBAAsBE,iBAAiB;QAC/G;QACA,IAAI2B,iBAAiB;YACnBF,MAAMK,IAAI,CAACzB,QAAQ,QAAQP,sBAAsBE,iBAAiB,GAAGF,sBAAsBC,kBAAkB;QAC/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,OAAON,gBAAgB8B;IACzB;IAEA,MAAMP,qBAAqB,CAACa,OAAaC,OAAaC,eAAwBC;QAC5E,MAAM,EAAEC,aAAa,EAAEC,cAAc,EAAEC,YAAY,EAAE,GAAGjC;QAExD,8GAA8G;QAC9G,MAAMkC,qBAAqBH,kBAAkBvC,cAAc2C,QAAQ,GAAG3C,cAAc4C,IAAI,GAAGL;QAE3F,0GAA0G;QAC1G,MAAMM,YAAY5C,kBAAkBkC,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":["import * as React from 'react';\nimport { compareDates, DAYS_IN_WEEK, getDayGrid } from '../../utils/index';\nimport { DayInfo } from './CalendarDayGrid';\nimport { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport function useWeeks(\n props: CalendarDayGridProps,\n onSelectDate: (date: Date) => void,\n getSetRefCallback: (dayKey: string) => (element: HTMLElement | null) => void,\n): DayInfo[][] {\n 'use no memo';\n\n /**\n * Initial parsing of the given props to generate IDayInfo two dimensional array, which contains a representation\n * of every day in the grid. Convenient for helping with conversions between day refs and Date objects in callbacks.\n */\n const weeks = React.useMemo((): DayInfo[][] => {\n const weeksGrid = getDayGrid(props);\n\n const firstVisibleDay = weeksGrid[1][0].originalDate;\n const lastVisibleDay = weeksGrid[weeksGrid.length - 1][6].originalDate;\n const markedDays = props.getMarkedDays?.(firstVisibleDay, lastVisibleDay) || [];\n\n /**\n * Weeks is a 2D array. Weeks[0] contains the last week of the prior range,\n * Weeks[weeks.length - 1] contains first week of next range. These are for transition states.\n *\n * Weeks[1... weeks.length - 2] contains the actual visible data\n */\n const returnValue: DayInfo[][] = [];\n\n for (let weekIndex = 0; weekIndex < weeksGrid.length; weekIndex++) {\n const week: DayInfo[] = [];\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const day = weeksGrid[weekIndex][dayIndex];\n const dayInfo: DayInfo = {\n onSelected: () => onSelectDate(day.originalDate),\n setRef: getSetRefCallback(day.key),\n ...day,\n isMarked: day.isMarked || markedDays?.some(markedDay => compareDates(day.originalDate, markedDay)),\n };\n\n week.push(dayInfo);\n }\n returnValue.push(week);\n }\n\n return returnValue;\n // TODO: this is missing deps on getSetRefCallback and onSelectDate (and depending on the entire\n // props object may not be a good idea due to likely frequent mutation). It would be easy to\n // fix getSetRefCallback to not mutate every render, but onSelectDate is passed down from\n // Calendar and trying to fix it requires a huge cascade of changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n\n return weeks;\n}\n"],"names":["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"],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/useWeeks.ts"],"sourcesContent":["import * as React from 'react';\nimport { compareDates, DAYS_IN_WEEK, getDayGrid } from '../../utils/index';\nimport { DayInfo } from './CalendarDayGrid';\nimport { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport function useWeeks(\n props: CalendarDayGridProps,\n onSelectDate: (date: Date) => void,\n getSetRefCallback: (dayKey: string) => (element: HTMLElement | null) => void,\n): DayInfo[][] {\n 'use no memo';\n\n /**\n * Initial parsing of the given props to generate IDayInfo two dimensional array, which contains a representation\n * of every day in the grid. Convenient for helping with conversions between day refs and Date objects in callbacks.\n */\n const weeks = React.useMemo((): DayInfo[][] => {\n const weeksGrid = getDayGrid(props);\n\n const firstVisibleDay = weeksGrid[1][0].originalDate;\n const lastVisibleDay = weeksGrid[weeksGrid.length - 1][6].originalDate;\n const markedDays = props.getMarkedDays?.(firstVisibleDay, lastVisibleDay) || [];\n\n /**\n * Weeks is a 2D array. Weeks[0] contains the last week of the prior range,\n * Weeks[weeks.length - 1] contains first week of next range. These are for transition states.\n *\n * Weeks[1... weeks.length - 2] contains the actual visible data\n */\n const returnValue: DayInfo[][] = [];\n\n for (let weekIndex = 0; weekIndex < weeksGrid.length; weekIndex++) {\n const week: DayInfo[] = [];\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const day = weeksGrid[weekIndex][dayIndex];\n const dayInfo: DayInfo = {\n onSelected: () => onSelectDate(day.originalDate),\n setRef: getSetRefCallback(day.key),\n ...day,\n isMarked: day.isMarked || markedDays?.some(markedDay => compareDates(day.originalDate, markedDay)),\n };\n\n week.push(dayInfo);\n }\n returnValue.push(week);\n }\n\n return returnValue;\n // TODO: this is missing deps on getSetRefCallback and onSelectDate (and depending on the entire\n // props object may not be a good idea due to likely frequent mutation). It would be easy to\n // fix getSetRefCallback to not mutate every render, but onSelectDate is passed down from\n // Calendar and trying to fix it requires a huge cascade of changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n\n return weeks;\n}\n"],"names":["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"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,EAAEC,YAAY,EAAEC,UAAU,QAAQ,oBAAoB;AAI3E;;CAEC,GACD,OAAO,SAASC,SACdC,KAA2B,EAC3BC,YAAkC,EAClCC,iBAA4E;IAE5E;IAEA;;;GAGC,GACD,MAAMC,QAAQR,MAAMS,OAAO,CAAC;YAKPJ;QAJnB,MAAMK,YAAYP,WAAWE;QAE7B,MAAMM,kBAAkBD,SAAS,CAAC,EAAE,CAAC,EAAE,CAACE,YAAY;QACpD,MAAMC,iBAAiBH,SAAS,CAACA,UAAUI,MAAM,GAAG,EAAE,CAAC,EAAE,CAACF,YAAY;QACtE,MAAMG,aAAaV,EAAAA,uBAAAA,MAAMW,aAAa,cAAnBX,2CAAAA,0BAAAA,OAAsBM,iBAAiBE,oBAAmB,EAAE;QAE/E;;;;;KAKC,GACD,MAAMI,cAA2B,EAAE;QAEnC,IAAK,IAAIC,YAAY,GAAGA,YAAYR,UAAUI,MAAM,EAAEI,YAAa;YACjE,MAAMC,OAAkB,EAAE;YAC1B,IAAK,IAAIC,WAAW,GAAGA,WAAWlB,cAAckB,WAAY;gBAC1D,MAAMC,MAAMX,SAAS,CAACQ,UAAU,CAACE,SAAS;gBAC1C,MAAME,UAAmB;oBACvBC,YAAY,IAAMjB,aAAae,IAAIT,YAAY;oBAC/CY,QAAQjB,kBAAkBc,IAAII,GAAG;oBACjC,GAAGJ,GAAG;oBACNK,UAAUL,IAAIK,QAAQ,KAAIX,uBAAAA,iCAAAA,WAAYY,IAAI,CAACC,CAAAA,YAAa3B,aAAaoB,IAAIT,YAAY,EAAEgB;gBACzF;gBAEAT,KAAKU,IAAI,CAACP;YACZ;YACAL,YAAYY,IAAI,CAACV;QACnB;QAEA,OAAOF;IACP,gGAAgG;IAChG,4FAA4F;IAC5F,yFAAyF;IACzF,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>();\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","useEffect","current","previousYear","undefined","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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAC,GAAG;IAChH;IAEA,OAAO;QACLL;QACA;YACEY,gBAAgBR;YAChBS,oBAAoBH;YACpBI,oBAAoBN;YACpBO,6BAA6B7G,QAAQ+C,0BAA0B;QACjE;KACD;AACH;AAEA,SAAS0C,eAAeV,KAAa,EAAEgB,IAAY,EAAE9F,KAAW;IAC9D,OAAOA,MAAMhC,WAAW,OAAO8H,QAAQ9F,MAAMkB,QAAQ,OAAO4D;AAC9D;AAEA,SAASvB,gBAAgBsD,QAAoB;IAC3C,OAAO,CAACC;QACN,OAAQA,GAAG9E,GAAG;YACZ,KAAKjF;gBACH8J;gBACA;QACJ;IACF;AACF"}
|
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>();\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","useEffect","current","previousYear","undefined","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,YAAYA,WAAW,QAAQ;AAC/B,SAASC,KAAK,QAAQ,0BAA0B;AAChD,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SACEC,QAAQ,EACRC,eAAe,EACfC,WAAW,EACXC,aAAa,EACbC,UAAU,EACVC,YAAY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4D;AAC9D;AAEA,SAASvB,gBAAgBsD,QAAoB;IAC3C,OAAO,CAACC;QACN,OAAQA,GAAG9E,GAAG;YACZ,KAAKjF;gBACH8J;gBACA;QACJ;IACF;AACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarMonth/CalendarMonth.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { CalendarNavigationIcons } from '../Calendar/calendarNavigationIcons';\nimport type { CalendarStrings, DateFormatting } from '../../utils';\nimport type { CalendarPickerStyleProps, CalendarPickerStyles } from '../CalendarPicker/CalendarPicker.types';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ICalendarMonth {\n focus(): void;\n}\n\nexport interface CalendarMonthProps {\n /**\n * Optional callback to access the ICalendarMonth interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<ICalendarMonth>;\n\n /**\n * Localized strings to use in the Calendar\n */\n strings: CalendarStrings;\n\n /**\n * The currently selected date\n */\n selectedDate: Date;\n\n /**\n * The currently navigated date\n */\n navigatedDate: Date;\n\n /**\n * Callback issued when a month is selected\n * @param date - The date the user selected\n * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set\n * for the component.\n */\n onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;\n\n /**\n * Callback issued when the year is navigated\n * @param date - The date that is navigated to\n * @param focusOnNavigatedDay - Whether to set the focus to the navigated date.\n */\n onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;\n\n /**\n * Value of today. If unspecified, current time in client machine will be used.\n */\n today?: Date;\n\n /**\n * Callback function when the header is selected\n */\n onHeaderSelect?: () => void;\n\n /**\n * Apply additional formatting to dates, for example localized date formatting.\n */\n dateTimeFormatter?: DateFormatting;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date earlier than this value.\n */\n minDate?: Date;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date later than this value.\n */\n maxDate?: Date;\n\n /**\n * Whether the month picker should highlight the current month\n * @default false\n */\n highlightCurrentMonth?: boolean;\n\n /**\n * Whether the month picker should highlight the selected month\n * @default false\n */\n highlightSelectedMonth?: boolean;\n\n /**\n * Allows all dates and buttons to be focused, including disabled ones\n * @default false\n */\n allFocusable?: boolean;\n\n /**\n * Additional CSS class(es) to apply to the CalendarMonth.\n */\n className?: string;\n\n /**\n * Whether the year picker is hidden\n * @default false\n */\n yearPickerHidden?: boolean;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or veritcal\n */\n animationDirection?: AnimationDirection;\n\n /**\n * Custom navigation icons.\n */\n navigationIcons: CalendarNavigationIcons;\n}\n\n/**\n * @internal\n */\nexport interface CalendarMonthStyleProps extends CalendarPickerStyleProps {}\n\n/**\n * @internal\n */\nexport interface CalendarMonthStyles extends CalendarPickerStyles {}\n"],"names":["React"],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarMonth/CalendarMonth.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { CalendarNavigationIcons } from '../Calendar/calendarNavigationIcons';\nimport type { CalendarStrings, DateFormatting } from '../../utils';\nimport type { CalendarPickerStyleProps, CalendarPickerStyles } from '../CalendarPicker/CalendarPicker.types';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ICalendarMonth {\n focus(): void;\n}\n\nexport interface CalendarMonthProps {\n /**\n * Optional callback to access the ICalendarMonth interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<ICalendarMonth>;\n\n /**\n * Localized strings to use in the Calendar\n */\n strings: CalendarStrings;\n\n /**\n * The currently selected date\n */\n selectedDate: Date;\n\n /**\n * The currently navigated date\n */\n navigatedDate: Date;\n\n /**\n * Callback issued when a month is selected\n * @param date - The date the user selected\n * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set\n * for the component.\n */\n onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;\n\n /**\n * Callback issued when the year is navigated\n * @param date - The date that is navigated to\n * @param focusOnNavigatedDay - Whether to set the focus to the navigated date.\n */\n onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;\n\n /**\n * Value of today. If unspecified, current time in client machine will be used.\n */\n today?: Date;\n\n /**\n * Callback function when the header is selected\n */\n onHeaderSelect?: () => void;\n\n /**\n * Apply additional formatting to dates, for example localized date formatting.\n */\n dateTimeFormatter?: DateFormatting;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date earlier than this value.\n */\n minDate?: Date;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date later than this value.\n */\n maxDate?: Date;\n\n /**\n * Whether the month picker should highlight the current month\n * @default false\n */\n highlightCurrentMonth?: boolean;\n\n /**\n * Whether the month picker should highlight the selected month\n * @default false\n */\n highlightSelectedMonth?: boolean;\n\n /**\n * Allows all dates and buttons to be focused, including disabled ones\n * @default false\n */\n allFocusable?: boolean;\n\n /**\n * Additional CSS class(es) to apply to the CalendarMonth.\n */\n className?: string;\n\n /**\n * Whether the year picker is hidden\n * @default false\n */\n yearPickerHidden?: boolean;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or veritcal\n */\n animationDirection?: AnimationDirection;\n\n /**\n * Custom navigation icons.\n */\n navigationIcons: CalendarNavigationIcons;\n}\n\n/**\n * @internal\n */\nexport interface CalendarMonthStyleProps extends CalendarPickerStyleProps {}\n\n/**\n * @internal\n */\nexport interface CalendarMonthStyles extends CalendarPickerStyles {}\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarMonth/index.ts"],"sourcesContent":["export { CalendarMonth } from './CalendarMonth';\nexport type {\n CalendarMonthProps,\n CalendarMonthStyleProps,\n CalendarMonthStyles,\n ICalendarMonth,\n} from './CalendarMonth.types';\nexport { useCalendarMonthStyles_unstable } from './useCalendarMonthStyles.styles';\n"],"names":["CalendarMonth","useCalendarMonthStyles_unstable"],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarMonth/index.ts"],"sourcesContent":["export { CalendarMonth } from './CalendarMonth';\nexport type {\n CalendarMonthProps,\n CalendarMonthStyleProps,\n CalendarMonthStyles,\n ICalendarMonth,\n} from './CalendarMonth.types';\nexport { useCalendarMonthStyles_unstable } from './useCalendarMonthStyles.styles';\n"],"names":["CalendarMonth","useCalendarMonthStyles_unstable"],"mappings":"AAAA,SAASA,aAAa,QAAQ,kBAAkB;AAOhD,SAASC,+BAA+B,QAAQ,kCAAkC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarMonth/useCalendarMonthStyles.styles.ts"],"sourcesContent":["import { 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"],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarMonth/useCalendarMonthStyles.styles.ts"],"sourcesContent":["import { 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,SAASA,gCAAgC,QAAQ,mDAAmD;AAGpG;;;;CAIC,GACD,OAAO,MAAMC,kCAAkC,CAACC;IAC9C;IAEA,OAAOF,iCAAiCE;AAC1C,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarPicker/CalendarPicker.types.ts"],"sourcesContent":["import { AnimationDirection } from '../Calendar/Calendar.types';\n\n/**\n * @internal\n */\nexport interface CalendarPickerStyleProps {\n /**\n * Accept custom classNames\n */\n className?: string;\n\n /**\n * Whether the header can be clicked\n */\n hasHeaderClickCallback?: boolean;\n\n /**\n * Whether the picker should highlight the current item\n */\n highlightCurrent?: boolean;\n\n /**\n * Whether the picker should highlight the selected item\n */\n highlightSelected?: boolean;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or veritcal\n */\n animationDirection?: AnimationDirection;\n\n /**\n * Whether grid entering animation should be forwards or backwards\n */\n animateBackwards?: boolean;\n}\n\n/**\n * @internal\n */\nexport interface CalendarPickerStyles {\n /**\n * Style for the root element.\n */\n root: string;\n\n headerContainer: string;\n\n currentItemButton: string;\n\n navigationButtonsContainer: string;\n\n navigationButton: string;\n\n gridContainer: string;\n\n buttonRow: string;\n\n itemButton: string;\n\n current: string;\n\n selected: string;\n\n disabled: string;\n}\n"],"names":[],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarPicker/CalendarPicker.types.ts"],"sourcesContent":["import { AnimationDirection } from '../Calendar/Calendar.types';\n\n/**\n * @internal\n */\nexport interface CalendarPickerStyleProps {\n /**\n * Accept custom classNames\n */\n className?: string;\n\n /**\n * Whether the header can be clicked\n */\n hasHeaderClickCallback?: boolean;\n\n /**\n * Whether the picker should highlight the current item\n */\n highlightCurrent?: boolean;\n\n /**\n * Whether the picker should highlight the selected item\n */\n highlightSelected?: boolean;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or veritcal\n */\n animationDirection?: AnimationDirection;\n\n /**\n * Whether grid entering animation should be forwards or backwards\n */\n animateBackwards?: boolean;\n}\n\n/**\n * @internal\n */\nexport interface CalendarPickerStyles {\n /**\n * Style for the root element.\n */\n root: string;\n\n headerContainer: string;\n\n currentItemButton: string;\n\n navigationButtonsContainer: string;\n\n navigationButton: string;\n\n gridContainer: string;\n\n buttonRow: string;\n\n itemButton: string;\n\n current: string;\n\n selected: string;\n\n disabled: string;\n}\n"],"names":[],"mappings":"AAqCA;;CAEC,GACD,WAyBC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarPicker/index.ts"],"sourcesContent":["export type { CalendarPickerStyleProps, CalendarPickerStyles } from './CalendarPicker.types';\nexport { calendarPickerClassNames, useCalendarPickerStyles_unstable } from './useCalendarPickerStyles.styles';\n"],"names":["calendarPickerClassNames","useCalendarPickerStyles_unstable"],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarPicker/index.ts"],"sourcesContent":["export type { CalendarPickerStyleProps, CalendarPickerStyles } from './CalendarPicker.types';\nexport { calendarPickerClassNames, useCalendarPickerStyles_unstable } from './useCalendarPickerStyles.styles';\n"],"names":["calendarPickerClassNames","useCalendarPickerStyles_unstable"],"mappings":"AACA,SAASA,wBAAwB,EAAEC,gCAAgC,QAAQ,mCAAmC"}
|