@fluentui/react-calendar-compat 0.3.3 → 0.3.5
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 -2
- package/lib/Calendar.js.map +1 -1
- package/lib/CalendarDay.js.map +1 -1
- package/lib/CalendarDayGrid.js.map +1 -1
- package/lib/CalendarMonth.js.map +1 -1
- package/lib/CalendarPicker.js.map +1 -1
- package/lib/CalendarYear.js.map +1 -1
- package/lib/components/Calendar/Calendar.js.map +1 -1
- package/lib/components/Calendar/Calendar.types.js +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 +115 -0
- package/lib/components/Calendar/useCalendarStyles.styles.raw.js.map +1 -0
- 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 +142 -0
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +1 -0
- 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 +395 -0
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +1 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js +92 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +1 -0
- 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 +9 -0
- package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +1 -0
- 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 +291 -0
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +1 -0
- 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 +9 -0
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +1 -0
- 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 +127 -0
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.raw.js.map +1 -0
- 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 +154 -0
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +1 -0
- 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 +408 -0
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js +106 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +1 -0
- 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 +15 -0
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +1 -0
- 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 +303 -0
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +1 -0
- 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 +15 -0
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +1 -0
- 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 +4 -4
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useWeekCornerStyles.styles.js"],"sourcesContent":["import { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { mergeClasses } from '@griffel/react';\nimport { DateRangeType } from '../../utils/constants';\nimport { getDateRangeArray } from '../../utils/index';\n/**\n * @internal\n */ export const weekCornersClassNames = {\n topRightCornerDate: 'fui-CalendarDayGrid__topRightCornerDate',\n topLeftCornerDate: 'fui-CalendarDayGrid__topLeftCornerDate',\n bottomRightCornerDate: 'fui-CalendarDayGrid__bottomRightCornerDate',\n bottomLeftCornerDate: 'fui-CalendarDayGrid__bottomLeftCornerDate'\n};\n/**\n * @internal\n */ export function useWeekCornerStyles(props) {\n const { dir } = useFluent_unstable();\n /**\n *\n * Section for setting the rounded corner styles on individual day cells. Individual day cells need different\n * corners to be rounded depending on which date range type and where the cell is located in the current grid.\n * If we just round all of the corners, there isn't a good overlap and we get gaps between contiguous day boxes\n * in Edge browser.\n *\n */ const getWeekCornerStyles = (initialWeeks)=>{\n const weekCornersStyled = {};\n /* need to handle setting all of the corners on arbitrarily shaped blobs\n __\n __|A |\n |B |C |__\n |D |E |F |\n\n in this case, A needs top left rounded, top right rounded\n B needs top left rounded\n C doesn't need any rounding\n D needs bottom left rounded\n E doesn't need any rounding\n F needs top right rounding\n */ // cut off the animation transition weeks\n const weeks = initialWeeks.slice(1, initialWeeks.length - 1);\n // if there's an item above, lose both top corners. Item below, lose both bottom corners, etc.\n weeks.forEach((week, weekIndex)=>{\n week.forEach((day, dayIndex)=>{\n const above = weeks[weekIndex - 1] && weeks[weekIndex - 1][dayIndex] && isInSameHoverRange(weeks[weekIndex - 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex - 1][dayIndex].isSelected, day.isSelected);\n const below = weeks[weekIndex + 1] && weeks[weekIndex + 1][dayIndex] && isInSameHoverRange(weeks[weekIndex + 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex + 1][dayIndex].isSelected, day.isSelected);\n const left = weeks[weekIndex][dayIndex - 1] && isInSameHoverRange(weeks[weekIndex][dayIndex - 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex - 1].isSelected, day.isSelected);\n const right = weeks[weekIndex][dayIndex + 1] && isInSameHoverRange(weeks[weekIndex][dayIndex + 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex + 1].isSelected, day.isSelected);\n weekCornersStyled[weekIndex + '_' + dayIndex] = calculateRoundedStyles(above, below, left, right);\n });\n });\n return weekCornersStyled;\n };\n const calculateRoundedStyles = (above, below, left, right)=>{\n const style = [];\n const roundedTopLeft = !above && !left;\n const roundedTopRight = !above && !right;\n const roundedBottomLeft = !below && !left;\n const roundedBottomRight = !below && !right;\n if (roundedTopLeft) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topRightCornerDate : weekCornersClassNames.topLeftCornerDate);\n }\n if (roundedTopRight) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topLeftCornerDate : weekCornersClassNames.topRightCornerDate);\n }\n if (roundedBottomLeft) {\n style.push(dir === 'rtl' ? weekCornersClassNames.bottomRightCornerDate : weekCornersClassNames.bottomLeftCornerDate);\n }\n if (roundedBottomRight) {\n style.push(dir === 'rtl' ? weekCornersClassNames.bottomLeftCornerDate : weekCornersClassNames.bottomRightCornerDate);\n }\n return mergeClasses(...style);\n };\n const isInSameHoverRange = (date1, date2, date1Selected, date2Selected)=>{\n const { dateRangeType, firstDayOfWeek, workWeekDays } = props;\n // The hover state looks weird with non-contiguous days in work week view. In work week, show week hover state\n const dateRangeHoverType = dateRangeType === DateRangeType.WorkWeek ? DateRangeType.Week : dateRangeType;\n // we do not pass daysToSelectInDayView because we handle setting those styles dyanamically in onMouseOver\n const dateRange = getDateRangeArray(date1, dateRangeHoverType, firstDayOfWeek, workWeekDays);\n if (date1Selected !== date2Selected) {\n // if one is selected and the other is not, they can't be in the same range\n return false;\n } else if (date1Selected && date2Selected) {\n // if they're both selected at the same time they must be in the same range\n return true;\n }\n // otherwise, both must be unselected, so check the dateRange\n return dateRange.filter((date)=>date.getTime() === date2.getTime()).length > 0;\n };\n return [\n getWeekCornerStyles,\n calculateRoundedStyles\n ];\n}\n"],"names":["
|
1
|
+
{"version":3,"sources":["useWeekCornerStyles.styles.js"],"sourcesContent":["import { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { mergeClasses } from '@griffel/react';\nimport { DateRangeType } from '../../utils/constants';\nimport { getDateRangeArray } from '../../utils/index';\n/**\n * @internal\n */ export const weekCornersClassNames = {\n topRightCornerDate: 'fui-CalendarDayGrid__topRightCornerDate',\n topLeftCornerDate: 'fui-CalendarDayGrid__topLeftCornerDate',\n bottomRightCornerDate: 'fui-CalendarDayGrid__bottomRightCornerDate',\n bottomLeftCornerDate: 'fui-CalendarDayGrid__bottomLeftCornerDate'\n};\n/**\n * @internal\n */ export function useWeekCornerStyles(props) {\n const { dir } = useFluent_unstable();\n /**\n *\n * Section for setting the rounded corner styles on individual day cells. Individual day cells need different\n * corners to be rounded depending on which date range type and where the cell is located in the current grid.\n * If we just round all of the corners, there isn't a good overlap and we get gaps between contiguous day boxes\n * in Edge browser.\n *\n */ const getWeekCornerStyles = (initialWeeks)=>{\n const weekCornersStyled = {};\n /* need to handle setting all of the corners on arbitrarily shaped blobs\n __\n __|A |\n |B |C |__\n |D |E |F |\n\n in this case, A needs top left rounded, top right rounded\n B needs top left rounded\n C doesn't need any rounding\n D needs bottom left rounded\n E doesn't need any rounding\n F needs top right rounding\n */ // cut off the animation transition weeks\n const weeks = initialWeeks.slice(1, initialWeeks.length - 1);\n // if there's an item above, lose both top corners. Item below, lose both bottom corners, etc.\n weeks.forEach((week, weekIndex)=>{\n week.forEach((day, dayIndex)=>{\n const above = weeks[weekIndex - 1] && weeks[weekIndex - 1][dayIndex] && isInSameHoverRange(weeks[weekIndex - 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex - 1][dayIndex].isSelected, day.isSelected);\n const below = weeks[weekIndex + 1] && weeks[weekIndex + 1][dayIndex] && isInSameHoverRange(weeks[weekIndex + 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex + 1][dayIndex].isSelected, day.isSelected);\n const left = weeks[weekIndex][dayIndex - 1] && isInSameHoverRange(weeks[weekIndex][dayIndex - 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex - 1].isSelected, day.isSelected);\n const right = weeks[weekIndex][dayIndex + 1] && isInSameHoverRange(weeks[weekIndex][dayIndex + 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex + 1].isSelected, day.isSelected);\n weekCornersStyled[weekIndex + '_' + dayIndex] = calculateRoundedStyles(above, below, left, right);\n });\n });\n return weekCornersStyled;\n };\n const calculateRoundedStyles = (above, below, left, right)=>{\n const style = [];\n const roundedTopLeft = !above && !left;\n const roundedTopRight = !above && !right;\n const roundedBottomLeft = !below && !left;\n const roundedBottomRight = !below && !right;\n if (roundedTopLeft) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topRightCornerDate : weekCornersClassNames.topLeftCornerDate);\n }\n if (roundedTopRight) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topLeftCornerDate : weekCornersClassNames.topRightCornerDate);\n }\n if (roundedBottomLeft) {\n style.push(dir === 'rtl' ? weekCornersClassNames.bottomRightCornerDate : weekCornersClassNames.bottomLeftCornerDate);\n }\n if (roundedBottomRight) {\n style.push(dir === 'rtl' ? weekCornersClassNames.bottomLeftCornerDate : weekCornersClassNames.bottomRightCornerDate);\n }\n return mergeClasses(...style);\n };\n const isInSameHoverRange = (date1, date2, date1Selected, date2Selected)=>{\n const { dateRangeType, firstDayOfWeek, workWeekDays } = props;\n // The hover state looks weird with non-contiguous days in work week view. In work week, show week hover state\n const dateRangeHoverType = dateRangeType === DateRangeType.WorkWeek ? DateRangeType.Week : dateRangeType;\n // we do not pass daysToSelectInDayView because we handle setting those styles dyanamically in onMouseOver\n const dateRange = getDateRangeArray(date1, dateRangeHoverType, firstDayOfWeek, workWeekDays);\n if (date1Selected !== date2Selected) {\n // if one is selected and the other is not, they can't be in the same range\n return false;\n } else if (date1Selected && date2Selected) {\n // if they're both selected at the same time they must be in the same range\n return true;\n }\n // otherwise, both must be unselected, so check the dateRange\n return dateRange.filter((date)=>date.getTime() === date2.getTime()).length > 0;\n };\n return [\n getWeekCornerStyles,\n calculateRoundedStyles\n ];\n}\n"],"names":["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":";;;;;;;;;;;IAcoBS,mBAAmBA;;;IARtBL,qBAAqB;;;;qCANH,iCAAiC;uBACvC,gBAAgB;2BACf,uBAAuB;uBACnB,mBAAmB;AAG1C,8BAA8B;IACrCC,kBAAkB,EAAE,yCAAyC;IAC7DC,iBAAiB,EAAE,wCAAwC;IAC3DC,qBAAqB,EAAE,4CAA4C;IACnEC,oBAAoB,EAAE;AAC1B,CAAC;AAGU,6BAA6BE,KAAK,EAAE;IAC3C,MAAM,EAAEC,GAAAA,EAAK,OAAGX,uCAAkB,CAAC,CAAC;IACpC;;;;;;;EAOJ,GAAM,MAAMY,mBAAmB,IAAIC,YAAY,IAAG;QAC1C,MAAMC,iBAAiB,GAAG,CAAC,CAAC;QAC5B;;;;;;;;;;;IAWR,EAXQ,CAYD,yCAAA;QACC,MAAMC,KAAK,GAAGF,YAAY,CAACG,KAAK,CAAC,CAAC,EAAEH,YAAY,CAACI,MAAM,GAAG,CAAC,CAAC;QAC5D,8FAAA;QACAF,KAAK,CAACG,OAAO,CAAC,CAACC,IAAI,EAAEC,SAAS,KAAG;YAC7BD,IAAI,CAACD,OAAO,CAAC,CAACG,GAAG,EAAEC,QAAQ,KAAG;gBAC1B,MAAMC,KAAK,GAAGR,KAAK,CAACK,SAAS,GAAG,CAAC,CAAC,IAAIL,KAAK,CAACK,SAAS,GAAG,CAAC,CAAC,CAACE,QAAQ,CAAC,IAAIE,kBAAkB,CAACT,KAAK,CAACK,SAAS,GAAG,CAAC,CAAC,CAACE,QAAQ,CAAC,CAACG,YAAY,EAAEJ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QACA,MAAMkC,kBAAkB,GAAGH,aAAa,KAAKvC,wBAAa,CAAC2C,QAAQ,GAAG3C,wBAAa,CAAC4C,IAAI,GAAGL,aAAa;QACxG,0GAAA;QACA,MAAMM,SAAS,OAAG5C,wBAAiB,EAACkC,KAAK,EAAEO,kBAAkB,EAAEF,cAAc,EAAEC,YAAY,CAAC;QAC5F,IAAIJ,aAAa,KAAKC,aAAa,EAAE;YACjC,2EAAA;YACA,OAAO,KAAK;QAChB,CAAC,MAAM,IAAID,aAAa,IAAIC,aAAa,EAAE;YACvC,2EAAA;YACA,OAAO,IAAI;QACf;QACA,6DAAA;QACA,OAAOO,SAAS,CAACC,MAAM,EAAEC,IAAI,GAAGA,IAAI,CAACC,OAAO,CAAC,CAAC,KAAKZ,KAAK,CAACY,OAAO,CAAC,CAAC,CAAC,CAACjC,MAAM,GAAG,CAAC;IAClF,CAAC;IACD,OAAO;QACHL,mBAAmB;QACnBkB,sBAAsB;KACzB;AACL"}
|
@@ -0,0 +1,106 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
useWeekCornerStyles: function() {
|
13
|
+
return useWeekCornerStyles;
|
14
|
+
},
|
15
|
+
weekCornersClassNames: function() {
|
16
|
+
return weekCornersClassNames;
|
17
|
+
}
|
18
|
+
});
|
19
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
20
|
+
const _react = require("@griffel/react");
|
21
|
+
const _constants = require("../../utils/constants");
|
22
|
+
const _index = require("../../utils/index");
|
23
|
+
const weekCornersClassNames = {
|
24
|
+
topRightCornerDate: 'fui-CalendarDayGrid__topRightCornerDate',
|
25
|
+
topLeftCornerDate: 'fui-CalendarDayGrid__topLeftCornerDate',
|
26
|
+
bottomRightCornerDate: 'fui-CalendarDayGrid__bottomRightCornerDate',
|
27
|
+
bottomLeftCornerDate: 'fui-CalendarDayGrid__bottomLeftCornerDate'
|
28
|
+
};
|
29
|
+
function useWeekCornerStyles(props) {
|
30
|
+
const { dir } = (0, _reactsharedcontexts.useFluent_unstable)();
|
31
|
+
/**
|
32
|
+
*
|
33
|
+
* Section for setting the rounded corner styles on individual day cells. Individual day cells need different
|
34
|
+
* corners to be rounded depending on which date range type and where the cell is located in the current grid.
|
35
|
+
* If we just round all of the corners, there isn't a good overlap and we get gaps between contiguous day boxes
|
36
|
+
* in Edge browser.
|
37
|
+
*
|
38
|
+
*/ const getWeekCornerStyles = (initialWeeks)=>{
|
39
|
+
const weekCornersStyled = {};
|
40
|
+
/* need to handle setting all of the corners on arbitrarily shaped blobs
|
41
|
+
__
|
42
|
+
__|A |
|
43
|
+
|B |C |__
|
44
|
+
|D |E |F |
|
45
|
+
|
46
|
+
in this case, A needs top left rounded, top right rounded
|
47
|
+
B needs top left rounded
|
48
|
+
C doesn't need any rounding
|
49
|
+
D needs bottom left rounded
|
50
|
+
E doesn't need any rounding
|
51
|
+
F needs top right rounding
|
52
|
+
*/ // cut off the animation transition weeks
|
53
|
+
const weeks = initialWeeks.slice(1, initialWeeks.length - 1);
|
54
|
+
// if there's an item above, lose both top corners. Item below, lose both bottom corners, etc.
|
55
|
+
weeks.forEach((week, weekIndex)=>{
|
56
|
+
week.forEach((day, dayIndex)=>{
|
57
|
+
const above = weeks[weekIndex - 1] && weeks[weekIndex - 1][dayIndex] && isInSameHoverRange(weeks[weekIndex - 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex - 1][dayIndex].isSelected, day.isSelected);
|
58
|
+
const below = weeks[weekIndex + 1] && weeks[weekIndex + 1][dayIndex] && isInSameHoverRange(weeks[weekIndex + 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex + 1][dayIndex].isSelected, day.isSelected);
|
59
|
+
const left = weeks[weekIndex][dayIndex - 1] && isInSameHoverRange(weeks[weekIndex][dayIndex - 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex - 1].isSelected, day.isSelected);
|
60
|
+
const right = weeks[weekIndex][dayIndex + 1] && isInSameHoverRange(weeks[weekIndex][dayIndex + 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex + 1].isSelected, day.isSelected);
|
61
|
+
weekCornersStyled[weekIndex + '_' + dayIndex] = calculateRoundedStyles(above, below, left, right);
|
62
|
+
});
|
63
|
+
});
|
64
|
+
return weekCornersStyled;
|
65
|
+
};
|
66
|
+
const calculateRoundedStyles = (above, below, left, right)=>{
|
67
|
+
const style = [];
|
68
|
+
const roundedTopLeft = !above && !left;
|
69
|
+
const roundedTopRight = !above && !right;
|
70
|
+
const roundedBottomLeft = !below && !left;
|
71
|
+
const roundedBottomRight = !below && !right;
|
72
|
+
if (roundedTopLeft) {
|
73
|
+
style.push(dir === 'rtl' ? weekCornersClassNames.topRightCornerDate : weekCornersClassNames.topLeftCornerDate);
|
74
|
+
}
|
75
|
+
if (roundedTopRight) {
|
76
|
+
style.push(dir === 'rtl' ? weekCornersClassNames.topLeftCornerDate : weekCornersClassNames.topRightCornerDate);
|
77
|
+
}
|
78
|
+
if (roundedBottomLeft) {
|
79
|
+
style.push(dir === 'rtl' ? weekCornersClassNames.bottomRightCornerDate : weekCornersClassNames.bottomLeftCornerDate);
|
80
|
+
}
|
81
|
+
if (roundedBottomRight) {
|
82
|
+
style.push(dir === 'rtl' ? weekCornersClassNames.bottomLeftCornerDate : weekCornersClassNames.bottomRightCornerDate);
|
83
|
+
}
|
84
|
+
return (0, _react.mergeClasses)(...style);
|
85
|
+
};
|
86
|
+
const isInSameHoverRange = (date1, date2, date1Selected, date2Selected)=>{
|
87
|
+
const { dateRangeType, firstDayOfWeek, workWeekDays } = props;
|
88
|
+
// The hover state looks weird with non-contiguous days in work week view. In work week, show week hover state
|
89
|
+
const dateRangeHoverType = dateRangeType === _constants.DateRangeType.WorkWeek ? _constants.DateRangeType.Week : dateRangeType;
|
90
|
+
// we do not pass daysToSelectInDayView because we handle setting those styles dyanamically in onMouseOver
|
91
|
+
const dateRange = (0, _index.getDateRangeArray)(date1, dateRangeHoverType, firstDayOfWeek, workWeekDays);
|
92
|
+
if (date1Selected !== date2Selected) {
|
93
|
+
// if one is selected and the other is not, they can't be in the same range
|
94
|
+
return false;
|
95
|
+
} else if (date1Selected && date2Selected) {
|
96
|
+
// if they're both selected at the same time they must be in the same range
|
97
|
+
return true;
|
98
|
+
}
|
99
|
+
// otherwise, both must be unselected, so check the dateRange
|
100
|
+
return dateRange.filter((date)=>date.getTime() === date2.getTime()).length > 0;
|
101
|
+
};
|
102
|
+
return [
|
103
|
+
getWeekCornerStyles,
|
104
|
+
calculateRoundedStyles
|
105
|
+
];
|
106
|
+
}
|
@@ -0,0 +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"],"mappings":";;;;;;;;;;;IA2BgBS,mBAAAA;;;IAjBHL,qBAAAA;;;;qCAVsB,kCAAkC;uBACxC,iBAAiB;2BAChB,wBAAwB;uBACpB,oBAAoB;AAO/C,8BAA8B;IACnCC,oBAAoB;IACpBC,mBAAmB;IACnBC,uBAAuB;IACvBC,sBAAsB;AACxB,EAAE;AAYK,6BAA6BE,KAA2B;IAC7D,MAAM,EAAEC,GAAG,EAAE,OAAGX,uCAAAA;IAEhB;;;;;;;GAOC,GACD,MAAMY,sBAAsB,CAACC;QAC3B,MAAMC,oBAA+C,CAAC;QACtD;;;;;;;;;;;;IAYA,GAEA,yCAAyC;QACzC,MAAMC,QAAQF,aAAaG,KAAK,CAAC,GAAGH,aAAaI,MAAM,GAAG;QAE1D,8FAA8F;QAC9FF,MAAMG,OAAO,CAAC,CAACC,MAAiBC;YAC9BD,KAAKD,OAAO,CAAC,CAACG,KAAcC;gBAC1B,MAAMC,QACJR,KAAK,CAACK,YAAY,EAAE,IACpBL,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,IAC9BE,mBACET,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACG,YAAY,EAC3CJ,IAAII,YAAY,EAChBV,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACI,UAAU,EACzCL,IAAIK,UAAU;gBAElB,MAAMC,QACJZ,KAAK,CAACK,YAAY,EAAE,IACpBL,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,IAC9BE,mBACET,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACG,YAAY,EAC3CJ,IAAII,YAAY,EAChBV,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACI,UAAU,EACzCL,IAAIK,UAAU;gBAElB,MAAME,OACJb,KAAK,CAACK,UAAU,CAACE,W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zB;IAEA,MAAMP,qBAAqB,CAACa,OAAaC,OAAaC,eAAwBC;QAC5E,MAAM,EAAEC,aAAa,EAAEC,cAAc,EAAEC,YAAY,EAAE,GAAGjC;QAExD,8GAA8G;QAC9G,MAAMkC,qBAAqBH,kBAAkBvC,wBAAAA,CAAc2C,QAAQ,GAAG3C,wBAAAA,CAAc4C,IAAI,GAAGL;QAE3F,0GAA0G;QAC1G,MAAMM,gBAAY5C,wBAAAA,EAAkBkC,OAAOO,oBAAoBF,gBAAgBC;QAE/E,IAAIJ,kBAAkBC,eAAe;YACnC,2EAA2E;YAC3E,OAAO;QACT,OAAO,IAAID,iBAAiBC,eAAe;YACzC,2EAA2E;YAC3E,OAAO;QACT;QAEA,6DAA6D;QAC7D,OAAOO,UAAUC,MAAM,CAAC,CAACC,OAAeA,KAAKC,OAAO,OAAOZ,MAAMY,OAAO,IAAIjC,MAAM,GAAG;IACvF;IAEA,OAAO;QAACL;QAAqBkB;KAAuB;AACtD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarDayGrid/useWeeks.ts"],"sourcesContent":["import * as React from 'react';\nimport { compareDates, DAYS_IN_WEEK, getDayGrid } from '../../utils/index';\nimport { DayInfo } from './CalendarDayGrid';\nimport { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport function useWeeks(\n props: CalendarDayGridProps,\n onSelectDate: (date: Date) => void,\n getSetRefCallback: (dayKey: string) => (element: HTMLElement | null) => void,\n): DayInfo[][] {\n 'use no memo';\n\n /**\n * Initial parsing of the given props to generate IDayInfo two dimensional array, which contains a representation\n * of every day in the grid. Convenient for helping with conversions between day refs and Date objects in callbacks.\n */\n const weeks = React.useMemo((): DayInfo[][] => {\n const weeksGrid = getDayGrid(props);\n\n const firstVisibleDay = weeksGrid[1][0].originalDate;\n const lastVisibleDay = weeksGrid[weeksGrid.length - 1][6].originalDate;\n const markedDays = props.getMarkedDays?.(firstVisibleDay, lastVisibleDay) || [];\n\n /**\n * Weeks is a 2D array. Weeks[0] contains the last week of the prior range,\n * Weeks[weeks.length - 1] contains first week of next range. These are for transition states.\n *\n * Weeks[1... weeks.length - 2] contains the actual visible data\n */\n const returnValue: DayInfo[][] = [];\n\n for (let weekIndex = 0; weekIndex < weeksGrid.length; weekIndex++) {\n const week: DayInfo[] = [];\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const day = weeksGrid[weekIndex][dayIndex];\n const dayInfo: DayInfo = {\n onSelected: () => onSelectDate(day.originalDate),\n setRef: getSetRefCallback(day.key),\n ...day,\n isMarked: day.isMarked || markedDays?.some(markedDay => compareDates(day.originalDate, markedDay)),\n };\n\n week.push(dayInfo);\n }\n returnValue.push(week);\n }\n\n return returnValue;\n // TODO: this is missing deps on getSetRefCallback and onSelectDate (and depending on the entire\n // props object may not be a good idea due to likely frequent mutation). It would be easy to\n // fix getSetRefCallback to not mutate every render, but onSelectDate is passed down from\n // Calendar and trying to fix it requires a huge cascade of changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n\n return weeks;\n}\n"],"names":["useWeeks","props","onSelectDate","getSetRefCallback","weeks","
|
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":";;;;+BAQgBI;;;;;;;iEARO,QAAQ;uBACwB,oBAAoB;AAOpE,kBACLC,KAA2B,EAC3BC,YAAkC,EAClCC,iBAA4E;IAE5E;IAEA;;;GAGC,GACD,MAAMC,QAAQR,OAAMS,OAAO,CAAC;YAKPJ;QAJnB,MAAMK,YAAYP,qBAAAA,EAAWE;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,CAAAA,CAAAA,uBAAAA,MAAMW,aAAAA,AAAa,MAAA,QAAnBX,yBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,qBAAAA,IAAAA,CAAAA,OAAsBM,iBAAiBE,eAAAA,KAAmB,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,mBAAAA,EAAckB,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,eAAAA,QAAAA,eAAAA,KAAAA,IAAAA,KAAAA,IAAAA,WAAYY,IAAI,CAACC,CAAAA,gBAAa3B,mBAAAA,EAAaoB,IAAIT,YAAY,EAAEgB,WAAAA;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":["CalendarMonth","MONTHS_PER_ROW","useAnimateBackwards","navigatedDate","currentYear","getFullYear","previousYearRef","React","useRef","useEffect","current","previousYear","undefined","useFocusLogic","componentRef","navigatedMonthRef","calendarYearRef","focusOnUpdate","focus","useCallback","useImperativeHandle","focusOnNextUpdate","props","allFocusable","animationDirection","className","dateTimeFormatter","DEFAULT_DATE_FORMATTING","highlightCurrentMonth","highlightSelectedMonth","maxDate","minDate","navigationIcons","onHeaderSelect","onUserHeaderSelect","onNavigateDate","selectedDate","strings","today","Date","yearPickerHidden","isYearPickerVisible","setIsYearPickerVisible","useState","animateBackwards","selectMonthCallback","newMonth","onSelectMonth","onSelectNextYear","addYears","onSelectPrevYear","setMonth","onSelectYear","selectedYear","navYear","newNavigationDate","getTime","setFullYear","getMonth","onYearPickerHeaderSelect","dateFormatter","isPrevYearInBounds","compareDatePart","getYearStart","isNextYearInBounds","getYearEnd","classNames","useCalendarMonthStyles_unstable","hasHeaderClickCallback","highlightCurrent","highlightSelected","arrowNavigationAttributes","useArrowNavigationGroup","axis","onRenderYear","yearStrings","getYearStrings","createElement","CalendarYear","key","minYear","maxYear","navigatedYear","highlightCurrentYear","highlightSelectedYear","rowIndexes","i","shortMonths","length","push","yearString","formatYear","headerAriaLabel","monthPickerHeaderAriaLabel","replace","div","root","headerContainer","button","currentItemButton","onClick","onKeyDown","onButtonKeyDown","aria-label","tabIndex","type","span","aria-live","aria-atomic","navigationButtonsContainer","mergeClasses","navigationButton","disabled","aria-disabled","title","prevYearAriaLabel","upNavigation","nextYearAriaLabel","downNavigation","gridContainer","role","map","rowNum","monthsForRow","slice","buttonRow","month","index","monthIndex","indexedMonth","isNavigatedMonth","isSelectedMonth","isSelectedYear","isInBounds","getMonthEnd","getMonthStart","ref","itemButton","isCurrentMonth","selected","formatMonth","aria-selected","displayName","yearToString","year","yearFormattingDate","String","yearRangeToString","yearRange","fromYear","toYear","yearRangeToNextDecadeLabel","nextYearRangeAriaLabel","yearRangeToPrevDecadeLabel","prevYearRangeAriaLabel","rangeAriaLabel","prevRangeAriaLabel","nextRangeAriaLabel","headerAriaLabelFormatString","callback","ev","Enter"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAqEaA;;;eAAAA;;;;iEArEU;8BACD;8BACkB;wBACX;uBAUtB;8BACsB;8CACmB;AAIhD,MAAMC,iBAAiB;AAEvB,SAASC,oBAAoB,EAAEC,aAAa,EAA0D;IACpG,MAAMC,cAAcD,cAAcE,WAAW;IAE7C,MAAMC,kBAAkBC,OAAMC,MAAM;IACpCD,OAAME,SAAS,CAAC;QACdH,gBAAgBI,OAAO,GAAGN;IAC5B;IACA,MAAMO,eAAeL,gBAAgBI,OAAO;IAE5C,IAAIC,iBAAiBC,aAAaD,iBAAiBP,aAAa;QAC9D,OAAOQ;IACT,OAAO;QACL,OAAOD,eAAeP;IACxB;AACF;AAEA,SAASS,cAAc,EAAEC,YAAY,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BR;YAChBS,oBAAoBH;YACpBI,oBAAoBN;YACpBO,6BAA6BzH,QAAQwD,0BAA0B;QACjE;KACD;AACH;AAEA,SAAS6C,eAAeZ,KAAa,EAAEkB,IAAY,EAAE1G,KAAW;IAC9D,OAAOA,MAAMjC,WAAW,OAAO2I,QAAQ1G,MAAMoB,QAAQ,OAAOoE;AAC9D;AAEA,SAASxB,gBAAgByD,QAAoB;IAC3C,OAAO,CAACC;QACN,OAAQA,GAAGjF,GAAG;YACZ,KAAKkF,mBAAAA;gBACHF;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":";;;;+BAqEakC;;;;;;;iEArEU,QAAQ;8BACT,0BAA0B;8BACR,0BAA0B;wBACrC,iBAAiB;uBAUvC,cAAc;8BACQ,+BAA+B;8CACZ,kCAAkC;AAIlF,MAAMpB,iBAAiB;AAEvB,SAASC,oBAAoB,EAAEC,aAAa,EAA0D;IACpG,MAAMC,cAAcD,cAAcE,WAAW;IAE7C,MAAMC,kBAAkBnB,OAAMoB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AEA,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,mBAAAA;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":[
|
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":";;;;;iEAAuB,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":";;;;;;;;;;;;eAASA,4BAAa;;;eAObC,6DAA+B;;;+BAPV,kBAAkB;8CAOA,kCAAkC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCalendarMonthStyles.styles.js"],"sourcesContent":["import { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\n/**\n * @internal\n *\n * Apply styling to the CalendarMonth slots based on the state\n */ export const useCalendarMonthStyles_unstable = (props)=>{\n 'use no memo';\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["
|
1
|
+
{"version":3,"sources":["useCalendarMonthStyles.styles.js"],"sourcesContent":["import { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\n/**\n * @internal\n *\n * Apply styling to the CalendarMonth slots based on the state\n */ export const useCalendarMonthStyles_unstable = (props)=>{\n 'use no memo';\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarPickerStyles_unstable","useCalendarMonthStyles_unstable","props"],"mappings":";;;;;;;;;;+CAAiD,kDAAkD;AAKxF,MAAMC,+BAA+B,IAAIC,KAAK,IAAG;IACxD,aAAa;IACb,WAAOF,+DAAgC,EAACE,KAAK,CAAC;AAClD,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "useCalendarMonthStyles_unstable", {
|
6
|
+
enumerable: true,
|
7
|
+
get: function() {
|
8
|
+
return useCalendarMonthStyles_unstable;
|
9
|
+
}
|
10
|
+
});
|
11
|
+
const _useCalendarPickerStylesstyles = require("../CalendarPicker/useCalendarPickerStyles.styles");
|
12
|
+
const useCalendarMonthStyles_unstable = (props)=>{
|
13
|
+
'use no memo';
|
14
|
+
return (0, _useCalendarPickerStylesstyles.useCalendarPickerStyles_unstable)(props);
|
15
|
+
};
|
@@ -0,0 +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"],"mappings":";;;;;;;;;;+CAAiD,mDAAmD;AAQ7F,MAAMC,kCAAkC,CAACC;IAC9C;IAEA,WAAOF,+DAAAA,EAAiCE;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":";;;;;;;;;;;;eACSA,uDAAwB;;;eAAEC,+DAAgC;;;+CAAQ,mCAAmC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCalendarPickerStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { DURATION_2, DURATION_3, EASING_FUNCTION_1, EASING_FUNCTION_2, FADE_IN, SLIDE_DOWN_IN20, SLIDE_LEFT_IN20, SLIDE_RIGHT_IN20, SLIDE_UP_IN20 } from '../../utils/animations';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\n/**\n * @internal\n */ export const calendarPickerClassNames = {\n root: 'fui-CalendarPicker',\n headerContainer: 'fui-CalendarPicker__headerContainer',\n currentItemButton: 'fui-CalendarPicker__currentItemButton',\n navigationButtonsContainer: 'fui-CalendarPicker__navigationButtonsContainer',\n navigationButton: 'fui-CalendarPicker__navigationButton',\n gridContainer: 'fui-CalendarPicker__gridContainer',\n buttonRow: 'fui-CalendarPicker__buttonRow',\n itemButton: 'fui-CalendarPicker__itemButton',\n current: 'fui-CalendarPicker__current',\n selected: 'fui-CalendarPicker__selected',\n disabled: 'fui-CalendarPicker__disabled'\n};\nconst useRootStyles = makeStyles({\n base: {\n boxSizing: 'content-box',\n overflow: 'hidden',\n padding: '12px',\n width: '196px'\n },\n normalize: {\n boxShadow: 'none',\n boxSizing: 'border-box',\n margin: '0',\n padding: '0'\n }\n});\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex'\n }\n});\nconst useCurrentItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n borderRadius: tokens.borderRadiusMedium,\n color: 'inherit',\n flexGrow: 1,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n overflow: 'visible',\n padding: '0 4px 0 10px',\n textAlign: 'left'\n },\n animation: {\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2\n },\n hasHeaderClickCallback: {\n // If this is updated, make sure to update headerIsClickable in useCalendarDayStyles as well\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n }\n }\n});\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex'\n }\n});\nconst useNavigationButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground1,\n display: 'block',\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '28px',\n lineHeight: '28px',\n minHeight: '28px',\n minWidth: '28px',\n overflow: 'visible',\n padding: '0',\n position: 'relative',\n textAlign: 'center',\n width: '28px',\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed\n }\n }\n});\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px'\n }\n});\nconst useButtonRowStyles = makeStyles({\n base: {\n marginBottom: '16px',\n '&:last-of-type': {\n marginBottom: 0\n }\n },\n animation: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationTimingFunction: EASING_FUNCTION_1\n },\n horizontalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_RIGHT_IN20\n ]\n },\n horizontalForward: {\n animationName: [\n FADE_IN,\n SLIDE_LEFT_IN20\n ]\n },\n verticalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_DOWN_IN20\n ]\n },\n verticalForward: {\n animationName: [\n FADE_IN,\n SLIDE_UP_IN20\n ]\n }\n});\nconst useItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground3,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '40px',\n lineHeight: '40px',\n minHeight: '40px',\n minWidth: '40px',\n margin: '0 12px 0 0',\n overflow: 'visible',\n padding: '0',\n width: '40px',\n '&:nth-child(4n + 4)': {\n marginRight: 0\n },\n '&:nth-child(n + 9)': {\n marginBottom: 0\n },\n '& div': {\n fontWeight: tokens.fontWeightRegular\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorNeutralForeground1Static,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n forcedColorAdjust: 'none',\n outline: '1px solid Highlight'\n }\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n },\n '&:hover, &:hover:active': {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none'\n },\n '& div': {\n fontWeight: tokens.fontWeightSemibold\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed\n }\n }\n});\nconst useDisabledStyles = makeStyles({\n base: {\n '&, &:disabled, & button': {\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none'\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n forcedColorAdjust: 'none'\n }\n }\n});\n/**\n * @internal\n *\n * Apply styling to the CalendarPicker slots based on the state\n */ export const useCalendarPickerStyles_unstable = (props)=>{\n 'use no memo';\n const rootStyles = useRootStyles();\n const headerContainerStyles = useHeaderContainerStyles();\n const currentItemButtonStyles = useCurrentItemButtonStyles();\n const navigationButtonsContainerStyles = useNavigationButtonsContainerStyles();\n const navigationButtonStyles = useNavigationButtonStyles();\n const gridContainerStyles = useGridContainerStyles();\n const buttonRowStyles = useButtonRowStyles();\n const itemButtonStyles = useItemButtonStyles();\n const currentStyles = useCurrentStyles();\n const selectedStyles = useSelectedStyles();\n const disabledStyles = useDisabledStyles();\n const { animateBackwards, animationDirection, className, hasHeaderClickCallback, highlightCurrent, highlightSelected } = props;\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(calendarPickerClassNames.currentItemButton, currentItemButtonStyles.base, animateBackwards !== undefined && currentItemButtonStyles.animation, hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback),\n navigationButtonsContainer: mergeClasses(calendarPickerClassNames.navigationButtonsContainer, navigationButtonsContainerStyles.base),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(calendarPickerClassNames.buttonRow, buttonRowStyles.base, buttonRowStyles.animation, animateBackwards !== undefined && (animationDirection === AnimationDirection.Horizontal ? animateBackwards ? buttonRowStyles.horizontalBackward : buttonRowStyles.horizontalForward : animateBackwards ? buttonRowStyles.verticalBackward : buttonRowStyles.verticalForward)),\n itemButton: mergeClasses(calendarPickerClassNames.itemButton, itemButtonStyles.base),\n selected: mergeClasses(calendarPickerClassNames.selected, highlightSelected && selectedStyles.highlightSelected),\n current: mergeClasses(calendarPickerClassNames.current, highlightCurrent && currentStyles.highlightCurrent),\n disabled: mergeClasses(calendarPickerClassNames.disabled, disabledStyles.base)\n };\n};\n"],"names":["calendarPickerClassNames","useCalendarPickerStyles_unstable","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","__styles","base","B7ck84d","B68tc82","Bmxbyg5","Bpg54ce","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","a9b677","normalize","E5pizo","jrapky","Frg6f3","t21cq0","B6of3ja","B74szlk","d","p","useHeaderContainerStyles","mc9l5x","useCurrentItemButtonStyles","De3pzq","icvyot","vrafjx","oivjwe","wvpqe5","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","sj55zd","Bh6795r","Bahqtrf","Be2twd7","Bhrd7zp","fsow6f","animation","vin17d","Bf5fcs","Bv12yb3","Ezkn3b","hasHeaderClickCallback","Jwef8y","Bi91k9c","eoavqd","pugfm4","ukgb2i","Dwtyhm","Biisq0s","iro3zm","B2d53fq","c3iz72","mghro0","Bx68yb","syojd9","E5hylx","k","h","useNavigationButtonsContainerStyles","Bt984gj","useNavigationButtonStyles","Bgfg5da","B9xav0g","Bn0qgzm","B4g9neb","zhjwy3","ibv6hh","u1mtju","h3c5rm","Bekrc4i","i8vvqc","g2u3we","B4j52fo","irswps","Bqenvij","Bg96gwp","sshi5w","Bf4jedk","qhf8xq","useGridContainerStyles","useButtonRowStyles","sw9gdo","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","Btgfwho","xrote9","Bja5ulm","Bqrx1nm","ze5xyy","iyr2r2","Bx7pl5v","Bnosqey","Bv57zgv","Bbxjs3m","g2kj27","pc6evw","B76w7ga","m","useCurrentStyles","highlightCurrent","Bsw6fvg","Bbusuzp","ycbfsm","mk428o","B1lrsqs","z0vste","Bgjd7nk","kur00z","useSelectedStyles","highlightSelected","useDisabledStyles","Bg33ivm","t69wg0","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","mergeClasses","undefined","AnimationDirection","Horizontal"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,UAAU,EAAEqI,iBAAiB/H,IAAI;QACnFJ,UAAU0I,IAAAA,mBAAY,EAACrJ,yBAAyBW,QAAQ,EAAEuH,qBAAqBc,eAAed,iBAAiB;QAC/GxH,SAAS2I,IAAAA,mBAAY,EAACrJ,yBAAyBU,OAAO,EAAE8G,oBAAoBuB,cAAcvB,gBAAgB;QAC1G5G,UAAUyI,IAAAA,mBAAY,EAACrJ,yBAAyBY,QAAQ,EAAEqI,eAAelI,IAAI;IACjF;AACJ"}
|
1
|
+
{"version":3,"sources":["useCalendarPickerStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { DURATION_2, DURATION_3, EASING_FUNCTION_1, EASING_FUNCTION_2, FADE_IN, SLIDE_DOWN_IN20, SLIDE_LEFT_IN20, SLIDE_RIGHT_IN20, SLIDE_UP_IN20 } from '../../utils/animations';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\n/**\n * @internal\n */ export const calendarPickerClassNames = {\n root: 'fui-CalendarPicker',\n headerContainer: 'fui-CalendarPicker__headerContainer',\n currentItemButton: 'fui-CalendarPicker__currentItemButton',\n navigationButtonsContainer: 'fui-CalendarPicker__navigationButtonsContainer',\n navigationButton: 'fui-CalendarPicker__navigationButton',\n gridContainer: 'fui-CalendarPicker__gridContainer',\n buttonRow: 'fui-CalendarPicker__buttonRow',\n itemButton: 'fui-CalendarPicker__itemButton',\n current: 'fui-CalendarPicker__current',\n selected: 'fui-CalendarPicker__selected',\n disabled: 'fui-CalendarPicker__disabled'\n};\nconst useRootStyles = makeStyles({\n base: {\n boxSizing: 'content-box',\n overflow: 'hidden',\n padding: '12px',\n width: '196px'\n },\n normalize: {\n boxShadow: 'none',\n boxSizing: 'border-box',\n margin: '0',\n padding: '0'\n }\n});\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex'\n }\n});\nconst useCurrentItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n borderRadius: tokens.borderRadiusMedium,\n color: 'inherit',\n flexGrow: 1,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n overflow: 'visible',\n padding: '0 4px 0 10px',\n textAlign: 'left'\n },\n animation: {\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2\n },\n hasHeaderClickCallback: {\n // If this is updated, make sure to update headerIsClickable in useCalendarDayStyles as well\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n }\n }\n});\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex'\n }\n});\nconst useNavigationButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground1,\n display: 'block',\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '28px',\n lineHeight: '28px',\n minHeight: '28px',\n minWidth: '28px',\n overflow: 'visible',\n padding: '0',\n position: 'relative',\n textAlign: 'center',\n width: '28px',\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed\n }\n }\n});\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px'\n }\n});\nconst useButtonRowStyles = makeStyles({\n base: {\n marginBottom: '16px',\n '&:last-of-type': {\n marginBottom: 0\n }\n },\n animation: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationTimingFunction: EASING_FUNCTION_1\n },\n horizontalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_RIGHT_IN20\n ]\n },\n horizontalForward: {\n animationName: [\n FADE_IN,\n SLIDE_LEFT_IN20\n ]\n },\n verticalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_DOWN_IN20\n ]\n },\n verticalForward: {\n animationName: [\n FADE_IN,\n SLIDE_UP_IN20\n ]\n }\n});\nconst useItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground3,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '40px',\n lineHeight: '40px',\n minHeight: '40px',\n minWidth: '40px',\n margin: '0 12px 0 0',\n overflow: 'visible',\n padding: '0',\n width: '40px',\n '&:nth-child(4n + 4)': {\n marginRight: 0\n },\n '&:nth-child(n + 9)': {\n marginBottom: 0\n },\n '& div': {\n fontWeight: tokens.fontWeightRegular\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorNeutralForeground1Static,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n forcedColorAdjust: 'none',\n outline: '1px solid Highlight'\n }\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n },\n '&:hover, &:hover:active': {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none'\n },\n '& div': {\n fontWeight: tokens.fontWeightSemibold\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed\n }\n }\n});\nconst useDisabledStyles = makeStyles({\n base: {\n '&, &:disabled, & button': {\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none'\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n forcedColorAdjust: 'none'\n }\n }\n});\n/**\n * @internal\n *\n * Apply styling to the CalendarPicker slots based on the state\n */ export const useCalendarPickerStyles_unstable = (props)=>{\n 'use no memo';\n const rootStyles = useRootStyles();\n const headerContainerStyles = useHeaderContainerStyles();\n const currentItemButtonStyles = useCurrentItemButtonStyles();\n const navigationButtonsContainerStyles = useNavigationButtonsContainerStyles();\n const navigationButtonStyles = useNavigationButtonStyles();\n const gridContainerStyles = useGridContainerStyles();\n const buttonRowStyles = useButtonRowStyles();\n const itemButtonStyles = useItemButtonStyles();\n const currentStyles = useCurrentStyles();\n const selectedStyles = useSelectedStyles();\n const disabledStyles = useDisabledStyles();\n const { animateBackwards, animationDirection, className, hasHeaderClickCallback, highlightCurrent, highlightSelected } = props;\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(calendarPickerClassNames.currentItemButton, currentItemButtonStyles.base, animateBackwards !== undefined && currentItemButtonStyles.animation, hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback),\n navigationButtonsContainer: mergeClasses(calendarPickerClassNames.navigationButtonsContainer, navigationButtonsContainerStyles.base),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(calendarPickerClassNames.buttonRow, buttonRowStyles.base, buttonRowStyles.animation, animateBackwards !== undefined && (animationDirection === AnimationDirection.Horizontal ? animateBackwards ? buttonRowStyles.horizontalBackward : buttonRowStyles.horizontalForward : animateBackwards ? buttonRowStyles.verticalBackward : buttonRowStyles.verticalForward)),\n itemButton: mergeClasses(calendarPickerClassNames.itemButton, itemButtonStyles.base),\n selected: mergeClasses(calendarPickerClassNames.selected, highlightSelected && selectedStyles.highlightSelected),\n current: mergeClasses(calendarPickerClassNames.current, highlightCurrent && currentStyles.highlightCurrent),\n disabled: mergeClasses(calendarPickerClassNames.disabled, disabledStyles.base)\n };\n};\n"],"names":["tokens","__styles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","AnimationDirection","calendarPickerClassNames","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","base","B7ck84d","B68tc82","Bmxbyg5","Bpg54ce","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","a9b677","normalize","E5pizo","jrapky","Frg6f3","t21cq0","B6of3ja","B74szlk","d","p","useHeaderContainerStyles","mc9l5x","useCurrentItemButtonStyles","De3pzq","icvyot","vrafjx","oivjwe","wvpqe5","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","sj55zd","Bh6795r","Bahqtrf","Be2twd7","Bhrd7zp","fsow6f","animation","vin17d","Bf5fcs","Bv12yb3","Ezkn3b","hasHeaderClickCallback","Jwef8y","Bi91k9c","eoavqd","pugfm4","ukgb2i","Dwtyhm","Biisq0s","iro3zm","B2d53fq","c3iz72","mghro0","Bx68yb","syojd9","E5hylx","k","h","useNavigationButtonsContainerStyles","Bt984gj","useNavigationButtonStyles","Bgfg5da","B9xav0g","Bn0qgzm","B4g9neb","zhjwy3","ibv6hh","u1mtju","h3c5rm","Bekrc4i","i8vvqc","g2u3we","B4j52fo","irswps","Bqenvij","Bg96gwp","sshi5w","Bf4jedk","qhf8xq","useGridContainerStyles","useButtonRowStyles","sw9gdo","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","Btgfwho","xrote9","Bja5ulm","Bqrx1nm","ze5xyy","iyr2r2","Bx7pl5v","Bnosqey","Bv57zgv","Bbxjs3m","g2kj27","pc6evw","B76w7ga","m","useCurrentStyles","highlightCurrent","Bsw6fvg","Bbusuzp","ycbfsm","mk428o","B1lrsqs","z0vste","Bgjd7nk","kur00z","useSelectedStyles","highlightSelected","useDisabledStyles","Bg33ivm","t69wg0","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"mappings":";;;;;;;;;;;IAMiBc,wBAAwB;;;oCAiQQ;eAAhCoI;;;uBAtQoC,gBAAgB;+BAElC,4BAA4B;AAGpD,iCAAiC;IACxCnI,IAAI,EAAE,oBAAoB;IAC1BC,eAAe,EAAE,qCAAqC;IACtDC,iBA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