@fluentui/react-calendar-compat 0.3.21 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/CHANGELOG.md +22 -2
  2. package/dist/index.d.ts +17 -12
  3. package/lib/components/Calendar/Calendar.types.js +0 -1
  4. package/lib/components/Calendar/Calendar.types.js.map +1 -1
  5. package/lib/components/Calendar/useCalendarStyles.styles.js +2 -2
  6. package/lib/components/Calendar/useCalendarStyles.styles.js.map +1 -1
  7. package/lib/components/Calendar/useCalendarStyles.styles.raw.js +2 -2
  8. package/lib/components/Calendar/useCalendarStyles.styles.raw.js.map +1 -1
  9. package/lib/components/CalendarDay/CalendarDay.types.js +3 -1
  10. package/lib/components/CalendarDay/CalendarDay.types.js.map +1 -1
  11. package/lib/components/CalendarDay/useCalendarDayStyles.styles.js +2 -2
  12. package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
  13. package/lib/components/CalendarDay/useCalendarDayStyles.styles.raw.js +2 -2
  14. package/lib/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +1 -1
  15. package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
  16. package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js +3 -1
  17. package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
  18. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +2 -2
  19. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
  20. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js +2 -2
  21. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +1 -1
  22. package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +1 -1
  23. package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -1
  24. package/lib/components/CalendarMonth/CalendarMonth.types.js +3 -1
  25. package/lib/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
  26. package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.js +2 -2
  27. package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.js.map +1 -1
  28. package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js +2 -2
  29. package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +1 -1
  30. package/lib/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
  31. package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js +2 -2
  32. package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
  33. package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js +2 -2
  34. package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +1 -1
  35. package/lib/components/CalendarYear/CalendarYear.js +7 -3
  36. package/lib/components/CalendarYear/CalendarYear.js.map +1 -1
  37. package/lib/components/CalendarYear/CalendarYear.types.js +3 -1
  38. package/lib/components/CalendarYear/CalendarYear.types.js.map +1 -1
  39. package/lib/components/CalendarYear/useCalendarYearStyles.styles.js +2 -2
  40. package/lib/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
  41. package/lib/components/CalendarYear/useCalendarYearStyles.styles.raw.js +2 -2
  42. package/lib/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +1 -1
  43. package/lib/utils/dateGrid/dateGrid.types.js.map +1 -1
  44. package/lib/utils/dateGrid/findAvailableDate.js.map +1 -1
  45. package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
  46. package/lib/utils/dateGrid/getDayGrid.js.map +1 -1
  47. package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -1
  48. package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -1
  49. package/lib/utils/dateGrid/isContiguous.js.map +1 -1
  50. package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -1
  51. package/lib-commonjs/components/Calendar/Calendar.types.js +0 -2
  52. package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -1
  53. package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -1
  54. package/lib-commonjs/components/Calendar/useCalendarStyles.styles.raw.js.map +1 -1
  55. package/lib-commonjs/components/CalendarDay/CalendarDay.types.js +3 -3
  56. package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -1
  57. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
  58. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +1 -1
  59. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
  60. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js +3 -3
  61. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
  62. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
  63. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +1 -1
  64. package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +1 -1
  65. package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -1
  66. package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js +3 -3
  67. package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
  68. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.js.map +1 -1
  69. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +1 -1
  70. package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
  71. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
  72. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +1 -1
  73. package/lib-commonjs/components/CalendarYear/CalendarYear.js +7 -3
  74. package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -1
  75. package/lib-commonjs/components/CalendarYear/CalendarYear.types.js +3 -3
  76. package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -1
  77. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
  78. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +1 -1
  79. package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +1 -1
  80. package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -1
  81. package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
  82. package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -1
  83. package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -1
  84. package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -1
  85. package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -1
  86. package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -1
  87. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CalendarDayGrid/useWeekCornerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { mergeClasses } from '@griffel/react';\nimport { DateRangeType } from '../../utils/constants';\nimport { getDateRangeArray } from '../../utils/index';\nimport { DayInfo } from './CalendarDayGrid';\nimport { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport const weekCornersClassNames = {\n topRightCornerDate: 'fui-CalendarDayGrid__topRightCornerDate',\n topLeftCornerDate: 'fui-CalendarDayGrid__topLeftCornerDate',\n bottomRightCornerDate: 'fui-CalendarDayGrid__bottomRightCornerDate',\n bottomLeftCornerDate: 'fui-CalendarDayGrid__bottomLeftCornerDate',\n};\n\n/**\n * @internal\n */\nexport interface WeekCorners {\n [key: string]: string;\n}\n\n/**\n * @internal\n */\nexport function useWeekCornerStyles(\n props: CalendarDayGridProps,\n): readonly [\n (initialWeeks: DayInfo[][]) => WeekCorners,\n (above: boolean, below: boolean, left: boolean, right: boolean) => string,\n] {\n const { dir } = useFluent_unstable();\n\n /**\n *\n * Section for setting the rounded corner styles on individual day cells. Individual day cells need different\n * corners to be rounded depending on which date range type and where the cell is located in the current grid.\n * If we just round all of the corners, there isn't a good overlap and we get gaps between contiguous day boxes\n * in Edge browser.\n *\n */\n const getWeekCornerStyles = (initialWeeks: DayInfo[][]): WeekCorners => {\n const weekCornersStyled: { [key: string]: string } = {};\n /* need to handle setting all of the corners on arbitrarily shaped blobs\n __\n __|A |\n |B |C |__\n |D |E |F |\n\n in this case, A needs top left rounded, top right rounded\n B needs top left rounded\n C doesn't need any rounding\n D needs bottom left rounded\n E doesn't need any rounding\n F needs top right rounding\n */\n\n // cut off the animation transition weeks\n const weeks = initialWeeks.slice(1, initialWeeks.length - 1);\n\n // if there's an item above, lose both top corners. Item below, lose both bottom corners, etc.\n weeks.forEach((week: DayInfo[], weekIndex: number) => {\n week.forEach((day: DayInfo, dayIndex: number) => {\n const above =\n weeks[weekIndex - 1] &&\n weeks[weekIndex - 1][dayIndex] &&\n isInSameHoverRange(\n weeks[weekIndex - 1][dayIndex].originalDate,\n day.originalDate,\n weeks[weekIndex - 1][dayIndex].isSelected,\n day.isSelected,\n );\n const below =\n weeks[weekIndex + 1] &&\n weeks[weekIndex + 1][dayIndex] &&\n isInSameHoverRange(\n weeks[weekIndex + 1][dayIndex].originalDate,\n day.originalDate,\n weeks[weekIndex + 1][dayIndex].isSelected,\n day.isSelected,\n );\n const left =\n weeks[weekIndex][dayIndex - 1] &&\n isInSameHoverRange(\n weeks[weekIndex][dayIndex - 1].originalDate,\n day.originalDate,\n weeks[weekIndex][dayIndex - 1].isSelected,\n day.isSelected,\n );\n const right =\n weeks[weekIndex][dayIndex + 1] &&\n isInSameHoverRange(\n weeks[weekIndex][dayIndex + 1].originalDate,\n day.originalDate,\n weeks[weekIndex][dayIndex + 1].isSelected,\n day.isSelected,\n );\n\n weekCornersStyled[weekIndex + '_' + dayIndex] = calculateRoundedStyles(above, below, left, right);\n });\n });\n\n return weekCornersStyled;\n };\n\n const calculateRoundedStyles = (above: boolean, below: boolean, left: boolean, right: boolean): string => {\n const style = [];\n const roundedTopLeft = !above && !left;\n const roundedTopRight = !above && !right;\n const roundedBottomLeft = !below && !left;\n const roundedBottomRight = !below && !right;\n\n if (roundedTopLeft) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topRightCornerDate : weekCornersClassNames.topLeftCornerDate);\n }\n if (roundedTopRight) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topLeftCornerDate : weekCornersClassNames.topRightCornerDate);\n }\n if (roundedBottomLeft) {\n style.push(\n dir === 'rtl' ? weekCornersClassNames.bottomRightCornerDate : weekCornersClassNames.bottomLeftCornerDate,\n );\n }\n if (roundedBottomRight) {\n style.push(\n dir === 'rtl' ? weekCornersClassNames.bottomLeftCornerDate : weekCornersClassNames.bottomRightCornerDate,\n );\n }\n\n return mergeClasses(...style);\n };\n\n const isInSameHoverRange = (date1: Date, date2: Date, date1Selected: boolean, date2Selected: boolean): boolean => {\n const { dateRangeType, firstDayOfWeek, workWeekDays } = props;\n\n // The hover state looks weird with non-contiguous days in work week view. In work week, show week hover state\n const dateRangeHoverType = dateRangeType === DateRangeType.WorkWeek ? DateRangeType.Week : dateRangeType;\n\n // we do not pass daysToSelectInDayView because we handle setting those styles dyanamically in onMouseOver\n const dateRange = getDateRangeArray(date1, dateRangeHoverType, firstDayOfWeek, workWeekDays);\n\n if (date1Selected !== date2Selected) {\n // if one is selected and the other is not, they can't be in the same range\n return false;\n } else if (date1Selected && date2Selected) {\n // if they're both selected at the same time they must be in the same range\n return true;\n }\n\n // otherwise, both must be unselected, so check the dateRange\n return dateRange.filter((date: Date) => date.getTime() === date2.getTime()).length > 0;\n };\n\n return [getWeekCornerStyles, calculateRoundedStyles] as const;\n}\n"],"names":["useFluent_unstable","mergeClasses","DateRangeType","getDateRangeArray","weekCornersClassNames","topRightCornerDate","topLeftCornerDate","bottomRightCornerDate","bottomLeftCornerDate","useWeekCornerStyles","props","dir","getWeekCornerStyles","initialWeeks","weekCornersStyled","weeks","slice","length","forEach","week","weekIndex","day","dayIndex","above","isInSameHoverRange","originalDate","isSelected","below","left","right","calculateRoundedStyles","style","roundedTopLeft","roundedTopRight","roundedBottomLeft","roundedBottomRight","push","date1","date2","date1Selected","date2Selected","dateRangeType","firstDayOfWeek","workWeekDays","dateRangeHoverType","WorkWeek","Week","dateRange","filter","date","getTime"],"mappings":"AAAA;;;;;;;;;;;;IA6BgBS,mBAAAA;;;IAjBHL,qBAAAA;;;;qCAVsB,kCAAkC;uBACxC,iBAAiB;2BAChB,wBAAwB;uBACpB,oBAAoB;AAO/C,8BAA8B;IACnCC,oBAAoB;IACpBC,mBAAmB;IACnBC,uBAAuB;IACvBC,sBAAsB;AACxB,EAAE;AAYK,6BACLE,KAA2B;IAK3B,MAAM,EAAEC,GAAG,EAAE,OAAGX,uCAAAA;IAEhB;;;;;;;GAOC,GACD,MAAMY,sBAAsB,CAACC;QAC3B,MAAMC,oBAA+C,CAAC;QACtD;;;;;;;;;;;;IAYA,GAEA,yCAAyC;QACzC,MAAMC,QAAQF,aAAaG,KAAK,CAAC,GAAGH,aAAaI,MAAM,GAAG;QAE1D,8FAA8F;QAC9FF,MAAMG,OAAO,CAAC,CAACC,MAAiBC;YAC9BD,KAAKD,OAAO,CAAC,CAACG,KAAcC;gBAC1B,MAAMC,QACJR,KAAK,CAACK,YAAY,EAAE,IACpBL,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,IAC9BE,mBACET,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACG,YAAY,EAC3CJ,IAAII,YAAY,EAChBV,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACI,UAAU,EACzCL,IAAIK,UAAU;gBAElB,MAAMC,QACJZ,KAAK,CAACK,YAAY,EAAE,IACpBL,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,IAC9BE,mBACET,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACG,YAAY,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AI2B,oBAAoB;YACtBJ,MAAMK,IAAI,CACRzB,QAAQ,QAAQP,sBAAsBI,oBAAoB,GAAGJ,sBAAsBG,qBAAqB;QAE5G;QAEA,WAAON,mBAAAA,KAAgB8B;IACzB;IAEA,MAAMP,qBAAqB,CAACa,OAAaC,OAAaC,eAAwBC;QAC5E,MAAM,EAAEC,aAAa,EAAEC,cAAc,EAAEC,YAAY,EAAE,GAAGjC;QAExD,8GAA8G;QAC9G,MAAMkC,qBAAqBH,kBAAkBvC,wBAAAA,CAAc2C,QAAQ,GAAG3C,wBAAAA,CAAc4C,IAAI,GAAGL;QAE3F,0GAA0G;QAC1G,MAAMM,gBAAY5C,wBAAAA,EAAkBkC,OAAOO,oBAAoBF,gBAAgBC;QAE/E,IAAIJ,kBAAkBC,eAAe;YACnC,2EAA2E;YAC3E,OAAO;QACT,OAAO,IAAID,iBAAiBC,eAAe;YACzC,2EAA2E;YAC3E,OAAO;QACT;QAEA,6DAA6D;QAC7D,OAAOO,UAAUC,MAAM,CAAC,CAACC,OAAeA,KAAKC,OAAO,OAAOZ,MAAMY,OAAO,IAAIjC,MAAM,GAAG;IACvF;IAEA,OAAO;QAACL;QAAqBkB;KAAuB;AACtD"}
1
+ {"version":3,"sources":["../src/components/CalendarDayGrid/useWeekCornerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { mergeClasses } from '@griffel/react';\nimport { DateRangeType } from '../../utils/constants';\nimport { getDateRangeArray } from '../../utils/index';\nimport type { DayInfo } from './CalendarDayGrid';\nimport type { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport const weekCornersClassNames = {\n topRightCornerDate: 'fui-CalendarDayGrid__topRightCornerDate',\n topLeftCornerDate: 'fui-CalendarDayGrid__topLeftCornerDate',\n bottomRightCornerDate: 'fui-CalendarDayGrid__bottomRightCornerDate',\n bottomLeftCornerDate: 'fui-CalendarDayGrid__bottomLeftCornerDate',\n};\n\n/**\n * @internal\n */\nexport interface WeekCorners {\n [key: string]: string;\n}\n\n/**\n * @internal\n */\nexport function useWeekCornerStyles(\n props: CalendarDayGridProps,\n): readonly [\n (initialWeeks: DayInfo[][]) => WeekCorners,\n (above: boolean, below: boolean, left: boolean, right: boolean) => string,\n] {\n const { dir } = useFluent_unstable();\n\n /**\n *\n * Section for setting the rounded corner styles on individual day cells. Individual day cells need different\n * corners to be rounded depending on which date range type and where the cell is located in the current grid.\n * If we just round all of the corners, there isn't a good overlap and we get gaps between contiguous day boxes\n * in Edge browser.\n *\n */\n const getWeekCornerStyles = (initialWeeks: DayInfo[][]): WeekCorners => {\n const weekCornersStyled: { [key: string]: string } = {};\n /* need to handle setting all of the corners on arbitrarily shaped blobs\n __\n __|A |\n |B |C |__\n |D |E |F |\n\n in this case, A needs top left rounded, top right rounded\n B needs top left rounded\n C doesn't need any rounding\n D needs bottom left rounded\n E doesn't need any rounding\n F needs top right rounding\n */\n\n // cut off the animation transition weeks\n const weeks = initialWeeks.slice(1, initialWeeks.length - 1);\n\n // if there's an item above, lose both top corners. Item below, lose both bottom corners, etc.\n weeks.forEach((week: DayInfo[], weekIndex: number) => {\n week.forEach((day: DayInfo, dayIndex: number) => {\n const above =\n weeks[weekIndex - 1] &&\n weeks[weekIndex - 1][dayIndex] &&\n isInSameHoverRange(\n weeks[weekIndex - 1][dayIndex].originalDate,\n day.originalDate,\n weeks[weekIndex - 1][dayIndex].isSelected,\n day.isSelected,\n );\n const below =\n weeks[weekIndex + 1] &&\n weeks[weekIndex + 1][dayIndex] &&\n isInSameHoverRange(\n weeks[weekIndex + 1][dayIndex].originalDate,\n day.originalDate,\n weeks[weekIndex + 1][dayIndex].isSelected,\n day.isSelected,\n );\n const left =\n weeks[weekIndex][dayIndex - 1] &&\n isInSameHoverRange(\n weeks[weekIndex][dayIndex - 1].originalDate,\n day.originalDate,\n weeks[weekIndex][dayIndex - 1].isSelected,\n day.isSelected,\n );\n const right =\n weeks[weekIndex][dayIndex + 1] &&\n isInSameHoverRange(\n weeks[weekIndex][dayIndex + 1].originalDate,\n day.originalDate,\n weeks[weekIndex][dayIndex + 1].isSelected,\n day.isSelected,\n );\n\n weekCornersStyled[weekIndex + '_' + dayIndex] = calculateRoundedStyles(above, below, left, right);\n });\n });\n\n return weekCornersStyled;\n };\n\n const calculateRoundedStyles = (above: boolean, below: boolean, left: boolean, right: boolean): string => {\n const style = [];\n const roundedTopLeft = !above && !left;\n const roundedTopRight = !above && !right;\n const roundedBottomLeft = !below && !left;\n const roundedBottomRight = !below && !right;\n\n if (roundedTopLeft) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topRightCornerDate : weekCornersClassNames.topLeftCornerDate);\n }\n if (roundedTopRight) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topLeftCornerDate : weekCornersClassNames.topRightCornerDate);\n }\n if (roundedBottomLeft) {\n style.push(\n dir === 'rtl' ? weekCornersClassNames.bottomRightCornerDate : weekCornersClassNames.bottomLeftCornerDate,\n );\n }\n if (roundedBottomRight) {\n style.push(\n dir === 'rtl' ? weekCornersClassNames.bottomLeftCornerDate : weekCornersClassNames.bottomRightCornerDate,\n );\n }\n\n return mergeClasses(...style);\n };\n\n const isInSameHoverRange = (date1: Date, date2: Date, date1Selected: boolean, date2Selected: boolean): boolean => {\n const { dateRangeType, firstDayOfWeek, workWeekDays } = props;\n\n // The hover state looks weird with non-contiguous days in work week view. In work week, show week hover state\n const dateRangeHoverType = dateRangeType === DateRangeType.WorkWeek ? DateRangeType.Week : dateRangeType;\n\n // we do not pass daysToSelectInDayView because we handle setting those styles dyanamically in onMouseOver\n const dateRange = getDateRangeArray(date1, dateRangeHoverType, firstDayOfWeek, workWeekDays);\n\n if (date1Selected !== date2Selected) {\n // if one is selected and the other is not, they can't be in the same range\n return false;\n } else if (date1Selected && date2Selected) {\n // if they're both selected at the same time they must be in the same range\n return true;\n }\n\n // otherwise, both must be unselected, so check the dateRange\n return dateRange.filter((date: Date) => date.getTime() === date2.getTime()).length > 0;\n };\n\n return [getWeekCornerStyles, calculateRoundedStyles] as const;\n}\n"],"names":["useFluent_unstable","mergeClasses","DateRangeType","getDateRangeArray","weekCornersClassNames","topRightCornerDate","topLeftCornerDate","bottomRightCornerDate","bottomLeftCornerDate","useWeekCornerStyles","props","dir","getWeekCornerStyles","initialWeeks","weekCornersStyled","weeks","slice","length","forEach","week","weekIndex","day","dayIndex","above","isInSameHoverRange","originalDate","isSelected","below","left","right","calculateRoundedStyles","style","roundedTopLeft","roundedTopRight","roundedBottomLeft","roundedBottomRight","push","date1","date2","date1Selected","date2Selected","dateRangeType","firstDayOfWeek","workWeekDays","dateRangeHoverType","WorkWeek","Week","dateRange","filter","date","getTime"],"mappings":"AAAA;;;;;;;;;;;;IA6BgBS,mBAAAA;;;IAjBHL,qBAAAA;;;;qCAVsB,kCAAkC;uBACxC,iBAAiB;2BAChB,wBAAwB;uBACpB,oBAAoB;AAO/C,8BAA8B;IACnCC,oBAAoB;IACpBC,mBAAmB;IACnBC,uBAAuB;IACvBC,sBAAsB;AACxB,EAAE;AAYK,6BACLE,KAA2B;IAK3B,MAAM,EAAEC,GAAG,EAAE,OAAGX,uCAAAA;IAEhB;;;;;;;GAOC,GACD,MAAMY,sBAAsB,CAACC;QAC3B,MAAMC,oBAA+C,CAAC;QACtD;;;;;;;;;;;;IAYA,GAEA,yCAAyC;QACzC,MAAMC,QAAQF,aAAaG,KAAK,CAAC,GAAGH,aAAaI,MAAM,GAAG;QAE1D,8FAA8F;QAC9FF,MAAMG,OAAO,CAAC,CAACC,MAAiBC;YAC9BD,KAAKD,OAAO,CAAC,CAACG,KAAcC;gBAC1B,MAAMC,QACJR,KAAK,CAACK,YAAY,EAAE,IACpBL,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,IAC9BE,mBACET,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACG,YAAY,EAC3CJ,IAAII,YAAY,EAChBV,KAAK,CAACK,YAAY,EAAE,CAACE,SAAS,CAACI,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AAQP,sBAAsBE,iBAAiB,GAAGF,sBAAsBC,kBAAkB;QAC/G;QACA,IAAI6B,mBAAmB;YACrBH,MAAMK,IAAI,CACRzB,QAAQ,QAAQP,sBAAsBG,qBAAqB,GAAGH,sBAAsBI,oBAAoB;QAE5G;QACA,IAAI2B,oBAAoB;YACtBJ,MAAMK,IAAI,CACRzB,QAAQ,QAAQP,sBAAsBI,oBAAoB,GAAGJ,sBAAsBG,qBAAqB;QAE5G;QAEA,WAAON,mBAAAA,KAAgB8B;IACzB;IAEA,MAAMP,qBAAqB,CAACa,OAAaC,OAAaC,eAAwBC;QAC5E,MAAM,EAAEC,aAAa,EAAEC,cAAc,EAAEC,YAAY,EAAE,GAAGjC;QAExD,8GAA8G;QAC9G,MAAMkC,qBAAqBH,kBAAkBvC,wBAAAA,CAAc2C,QAAQ,GAAG3C,wBAAAA,CAAc4C,IAAI,GAAGL;QAE3F,0GAA0G;QAC1G,MAAMM,gBAAY5C,wBAAAA,EAAkBkC,OAAOO,oBAAoBF,gBAAgBC;QAE/E,IAAIJ,kBAAkBC,eAAe;YACnC,2EAA2E;YAC3E,OAAO;QACT,OAAO,IAAID,iBAAiBC,eAAe;YACzC,2EAA2E;YAC3E,OAAO;QACT;QAEA,6DAA6D;QAC7D,OAAOO,UAAUC,MAAM,CAAC,CAACC,OAAeA,KAAKC,OAAO,OAAOZ,MAAMY,OAAO,IAAIjC,MAAM,GAAG;IACvF;IAEA,OAAO;QAACL;QAAqBkB;KAAuB;AACtD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CalendarDayGrid/useWeeks.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { compareDates, DAYS_IN_WEEK, getDayGrid } from '../../utils/index';\nimport { DayInfo } from './CalendarDayGrid';\nimport { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport function useWeeks(\n props: CalendarDayGridProps,\n onSelectDate: (date: Date) => void,\n getSetRefCallback: (dayKey: string) => (element: HTMLElement | null) => void,\n): DayInfo[][] {\n 'use no memo';\n\n /**\n * Initial parsing of the given props to generate IDayInfo two dimensional array, which contains a representation\n * of every day in the grid. Convenient for helping with conversions between day refs and Date objects in callbacks.\n */\n const weeks = React.useMemo((): DayInfo[][] => {\n const weeksGrid = getDayGrid(props);\n\n const firstVisibleDay = weeksGrid[1][0].originalDate;\n const lastVisibleDay = weeksGrid[weeksGrid.length - 1][6].originalDate;\n const markedDays = props.getMarkedDays?.(firstVisibleDay, lastVisibleDay) || [];\n\n /**\n * Weeks is a 2D array. Weeks[0] contains the last week of the prior range,\n * Weeks[weeks.length - 1] contains first week of next range. These are for transition states.\n *\n * Weeks[1... weeks.length - 2] contains the actual visible data\n */\n const returnValue: DayInfo[][] = [];\n\n for (let weekIndex = 0; weekIndex < weeksGrid.length; weekIndex++) {\n const week: DayInfo[] = [];\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const day = weeksGrid[weekIndex][dayIndex];\n const dayInfo: DayInfo = {\n onSelected: () => onSelectDate(day.originalDate),\n setRef: getSetRefCallback(day.key),\n ...day,\n isMarked: day.isMarked || markedDays?.some(markedDay => compareDates(day.originalDate, markedDay)),\n };\n\n week.push(dayInfo);\n }\n returnValue.push(week);\n }\n\n return returnValue;\n // TODO: this is missing deps on getSetRefCallback and onSelectDate (and depending on the entire\n // props object may not be a good idea due to likely frequent mutation). It would be easy to\n // fix getSetRefCallback to not mutate every render, but onSelectDate is passed down from\n // Calendar and trying to fix it requires a huge cascade of changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n\n return weeks;\n}\n"],"names":["React","compareDates","DAYS_IN_WEEK","getDayGrid","useWeeks","props","onSelectDate","getSetRefCallback","weeks","useMemo","weeksGrid","firstVisibleDay","originalDate","lastVisibleDay","length","markedDays","getMarkedDays","returnValue","weekIndex","week","dayIndex","day","dayInfo","onSelected","setRef","key","isMarked","some","markedDay","push"],"mappings":"AAAA;;;;;+BAUgBI;;;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,GAAG;QAACZ;KAAM;IAEV,OAAOG;AACT"}
1
+ {"version":3,"sources":["../src/components/CalendarDayGrid/useWeeks.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { compareDates, DAYS_IN_WEEK, getDayGrid } from '../../utils/index';\nimport type { DayInfo } from './CalendarDayGrid';\nimport type { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport function useWeeks(\n props: CalendarDayGridProps,\n onSelectDate: (date: Date) => void,\n getSetRefCallback: (dayKey: string) => (element: HTMLElement | null) => void,\n): DayInfo[][] {\n 'use no memo';\n\n /**\n * Initial parsing of the given props to generate IDayInfo two dimensional array, which contains a representation\n * of every day in the grid. Convenient for helping with conversions between day refs and Date objects in callbacks.\n */\n const weeks = React.useMemo((): DayInfo[][] => {\n const weeksGrid = getDayGrid(props);\n\n const firstVisibleDay = weeksGrid[1][0].originalDate;\n const lastVisibleDay = weeksGrid[weeksGrid.length - 1][6].originalDate;\n const markedDays = props.getMarkedDays?.(firstVisibleDay, lastVisibleDay) || [];\n\n /**\n * Weeks is a 2D array. Weeks[0] contains the last week of the prior range,\n * Weeks[weeks.length - 1] contains first week of next range. These are for transition states.\n *\n * Weeks[1... weeks.length - 2] contains the actual visible data\n */\n const returnValue: DayInfo[][] = [];\n\n for (let weekIndex = 0; weekIndex < weeksGrid.length; weekIndex++) {\n const week: DayInfo[] = [];\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const day = weeksGrid[weekIndex][dayIndex];\n const dayInfo: DayInfo = {\n onSelected: () => onSelectDate(day.originalDate),\n setRef: getSetRefCallback(day.key),\n ...day,\n isMarked: day.isMarked || markedDays?.some(markedDay => compareDates(day.originalDate, markedDay)),\n };\n\n week.push(dayInfo);\n }\n returnValue.push(week);\n }\n\n return returnValue;\n // TODO: this is missing deps on getSetRefCallback and onSelectDate (and depending on the entire\n // props object may not be a good idea due to likely frequent mutation). It would be easy to\n // fix getSetRefCallback to not mutate every render, but onSelectDate is passed down from\n // Calendar and trying to fix it requires a huge cascade of changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n\n return weeks;\n}\n"],"names":["React","compareDates","DAYS_IN_WEEK","getDayGrid","useWeeks","props","onSelectDate","getSetRefCallback","weeks","useMemo","weeksGrid","firstVisibleDay","originalDate","lastVisibleDay","length","markedDays","getMarkedDays","returnValue","weekIndex","week","dayIndex","day","dayInfo","onSelected","setRef","key","isMarked","some","markedDay","push"],"mappings":"AAAA;;;;;+BAUgBI;;;;;;;iEARO,QAAQ;uBACwB,oBAAoB;AAOpE,kBACLC,KAA2B,EAC3BC,YAAkC,EAClCC,iBAA4E;IAE5E;IAEA;;;GAGC,GACD,MAAMC,QAAQR,OAAMS,OAAO,CAAC;YAKPJ;QAJnB,MAAMK,gBAAYP,iBAAAA,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,6 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * @internal
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
5
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
6
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
@@ -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 | null>;\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
+ {"version":3,"sources":["../src/components/CalendarMonth/CalendarMonth.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { 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 | null>;\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":[],"mappings":"AAsHA;;CAEC,GACD,WAAoE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useCalendarMonthStyles.styles.js"],"sourcesContent":["'use client';\nimport { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\n/**\n * @internal\n *\n * Apply styling to the CalendarMonth slots based on the state\n */ export const useCalendarMonthStyles_unstable = (props)=>{\n 'use no memo';\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarPickerStyles_unstable","useCalendarMonthStyles_unstable","props"],"mappings":"AAAA,YAAY;;;;;;;;;;;+CACqC,kDAAkD;AAKxF,MAAMC,+BAA+B,IAAIC,KAAK,IAAG;IACxD,aAAa;IACb,WAAOF,+DAAgC,EAACE,KAAK,CAAC;AAClD,CAAC"}
1
+ {"version":3,"sources":["useCalendarMonthStyles.styles.js"],"sourcesContent":["'use client';\nimport { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\n/**\n * Apply styling to the CalendarMonth slots based on the state\n *\n * @internal\n */ export const useCalendarMonthStyles_unstable = (props)=>{\n 'use no memo';\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarPickerStyles_unstable","useCalendarMonthStyles_unstable","props"],"mappings":"AAAA,YAAY;;;;;;;;;;;+CACqC,kDAAkD;AAKxF,MAAMC,+BAA+B,IAAIC,KAAK,IAAG;IACxD,aAAa;IACb,WAAOF,+DAAgC,EAACE,KAAK,CAAC;AAClD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CalendarMonth/useCalendarMonthStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\nimport type { CalendarMonthStyleProps, CalendarMonthStyles } from './CalendarMonth.types';\n\n/**\n * @internal\n *\n * Apply styling to the CalendarMonth slots based on the state\n */\nexport const useCalendarMonthStyles_unstable = (props: CalendarMonthStyleProps): CalendarMonthStyles => {\n 'use no memo';\n\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarPickerStyles_unstable","useCalendarMonthStyles_unstable","props"],"mappings":"AAAA;;;;;;;;;;;+CAEiD,mDAAmD;AAQ7F,MAAMC,kCAAkC,CAACC;IAC9C;IAEA,WAAOF,+DAAAA,EAAiCE;AAC1C,EAAE"}
1
+ {"version":3,"sources":["../src/components/CalendarMonth/useCalendarMonthStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\nimport type { CalendarMonthStyleProps, CalendarMonthStyles } from './CalendarMonth.types';\n\n/**\n * Apply styling to the CalendarMonth slots based on the state\n *\n * @internal\n */\nexport const useCalendarMonthStyles_unstable = (props: CalendarMonthStyleProps): CalendarMonthStyles => {\n 'use no memo';\n\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarPickerStyles_unstable","useCalendarMonthStyles_unstable","props"],"mappings":"AAAA;;;;;;;;;;;+CAEiD,mDAAmD;AAQ7F,MAAMC,kCAAkC,CAACC;IAC9C;IAEA,WAAOF,+DAAAA,EAAiCE;AAC1C,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../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
+ {"version":3,"sources":["../src/components/CalendarPicker/CalendarPicker.types.ts"],"sourcesContent":["import type { 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":["useCalendarPickerStyles.styles.js"],"sourcesContent":["'use client';\nimport { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { DURATION_2, DURATION_3, EASING_FUNCTION_1, EASING_FUNCTION_2, FADE_IN, SLIDE_DOWN_IN20, SLIDE_LEFT_IN20, SLIDE_RIGHT_IN20, SLIDE_UP_IN20 } from '../../utils/animations';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\n/**\n * @internal\n */ export const calendarPickerClassNames = {\n root: 'fui-CalendarPicker',\n headerContainer: 'fui-CalendarPicker__headerContainer',\n currentItemButton: 'fui-CalendarPicker__currentItemButton',\n navigationButtonsContainer: 'fui-CalendarPicker__navigationButtonsContainer',\n navigationButton: 'fui-CalendarPicker__navigationButton',\n gridContainer: 'fui-CalendarPicker__gridContainer',\n buttonRow: 'fui-CalendarPicker__buttonRow',\n itemButton: 'fui-CalendarPicker__itemButton',\n current: 'fui-CalendarPicker__current',\n selected: 'fui-CalendarPicker__selected',\n disabled: 'fui-CalendarPicker__disabled'\n};\nconst useRootStyles = makeStyles({\n base: {\n boxSizing: 'content-box',\n overflow: 'hidden',\n padding: '12px',\n width: '196px'\n },\n normalize: {\n boxShadow: 'none',\n boxSizing: 'border-box',\n margin: '0',\n padding: '0'\n }\n});\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex'\n }\n});\nconst useCurrentItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n borderRadius: tokens.borderRadiusMedium,\n color: 'inherit',\n flexGrow: 1,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n overflow: 'visible',\n padding: '0 4px 0 10px',\n textAlign: 'left'\n },\n animation: {\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2\n },\n hasHeaderClickCallback: {\n // If this is updated, make sure to update headerIsClickable in useCalendarDayStyles as well\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n }\n }\n});\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex'\n }\n});\nconst useNavigationButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground1,\n display: 'block',\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '28px',\n lineHeight: '28px',\n minHeight: '28px',\n minWidth: '28px',\n overflow: 'visible',\n padding: '0',\n position: 'relative',\n textAlign: 'center',\n width: '28px',\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed\n }\n }\n});\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px'\n }\n});\nconst useButtonRowStyles = makeStyles({\n base: {\n marginBottom: '16px',\n '&:last-of-type': {\n marginBottom: 0\n }\n },\n animation: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationTimingFunction: EASING_FUNCTION_1\n },\n horizontalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_RIGHT_IN20\n ]\n },\n horizontalForward: {\n animationName: [\n FADE_IN,\n SLIDE_LEFT_IN20\n ]\n },\n verticalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_DOWN_IN20\n ]\n },\n verticalForward: {\n animationName: [\n FADE_IN,\n SLIDE_UP_IN20\n ]\n }\n});\nconst useItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground3,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '40px',\n lineHeight: '40px',\n minHeight: '40px',\n minWidth: '40px',\n margin: '0 12px 0 0',\n overflow: 'visible',\n padding: '0',\n width: '40px',\n '&:nth-child(4n + 4)': {\n marginRight: 0\n },\n '&:nth-child(n + 9)': {\n marginBottom: 0\n },\n '& div': {\n fontWeight: tokens.fontWeightRegular\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorNeutralForeground1Static,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n forcedColorAdjust: 'none',\n outline: '1px solid Highlight'\n }\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n },\n '&:hover, &:hover:active': {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none'\n },\n '& div': {\n fontWeight: tokens.fontWeightSemibold\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed\n }\n }\n});\nconst useDisabledStyles = makeStyles({\n base: {\n '&, &:disabled, & button': {\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none'\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n forcedColorAdjust: 'none'\n }\n }\n});\n/**\n * @internal\n *\n * Apply styling to the CalendarPicker slots based on the state\n */ export const useCalendarPickerStyles_unstable = (props)=>{\n 'use no memo';\n const rootStyles = useRootStyles();\n const headerContainerStyles = useHeaderContainerStyles();\n const currentItemButtonStyles = useCurrentItemButtonStyles();\n const navigationButtonsContainerStyles = useNavigationButtonsContainerStyles();\n const navigationButtonStyles = useNavigationButtonStyles();\n const gridContainerStyles = useGridContainerStyles();\n const buttonRowStyles = useButtonRowStyles();\n const itemButtonStyles = useItemButtonStyles();\n const currentStyles = useCurrentStyles();\n const selectedStyles = useSelectedStyles();\n const disabledStyles = useDisabledStyles();\n const { animateBackwards, animationDirection, className, hasHeaderClickCallback, highlightCurrent, highlightSelected } = props;\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(calendarPickerClassNames.currentItemButton, currentItemButtonStyles.base, animateBackwards !== undefined && currentItemButtonStyles.animation, hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback),\n navigationButtonsContainer: mergeClasses(calendarPickerClassNames.navigationButtonsContainer, navigationButtonsContainerStyles.base),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(calendarPickerClassNames.buttonRow, buttonRowStyles.base, buttonRowStyles.animation, animateBackwards !== undefined && (animationDirection === AnimationDirection.Horizontal ? animateBackwards ? buttonRowStyles.horizontalBackward : buttonRowStyles.horizontalForward : animateBackwards ? buttonRowStyles.verticalBackward : buttonRowStyles.verticalForward)),\n itemButton: mergeClasses(calendarPickerClassNames.itemButton, itemButtonStyles.base),\n selected: mergeClasses(calendarPickerClassNames.selected, highlightSelected && selectedStyles.highlightSelected),\n current: mergeClasses(calendarPickerClassNames.current, highlightCurrent && currentStyles.highlightCurrent),\n disabled: mergeClasses(calendarPickerClassNames.disabled, disabledStyles.base)\n };\n};\n"],"names":["tokens","__styles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","AnimationDirection","calendarPickerClassNames","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","base","B7ck84d","B68tc82","Bmxbyg5","Bpg54ce","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","a9b677","normalize","E5pizo","jrapky","Frg6f3","t21cq0","B6of3ja","B74szlk","d","p","useHeaderContainerStyles","mc9l5x","useCurrentItemButtonStyles","De3pzq","icvyot","vrafjx","oivjwe","wvpqe5","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","sj55zd","Bh6795r","Bahqtrf","Be2twd7","Bhrd7zp","fsow6f","animation","vin17d","Bf5fcs","Bv12yb3","Ezkn3b","hasHeaderClickCallback","Jwef8y","Bi91k9c","eoavqd","pugfm4","ukgb2i","Dwtyhm","Biisq0s","iro3zm","B2d53fq","c3iz72","mghro0","Bx68yb","syojd9","E5hylx","k","h","useNavigationButtonsContainerStyles","Bt984gj","useNavigationButtonStyles","Bgfg5da","B9xav0g","Bn0qgzm","B4g9neb","zhjwy3","ibv6hh","u1mtju","h3c5rm","Bekrc4i","i8vvqc","g2u3we","B4j52fo","irswps","Bqenvij","Bg96gwp","sshi5w","Bf4jedk","qhf8xq","useGridContainerStyles","useButtonRowStyles","sw9gdo","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","Btgfwho","xrote9","Bja5ulm","Bbkh6qg","Bahaeuw","fmph8g","Bv6y5q5","uq1ffc","Bokaozi","Bfrni1f","rxnm8d","Dcq74g","Bs60fxl","m","useCurrentStyles","highlightCurrent","By8wz76","B7iucu3","B8gzw0y","mk428o","B1lrsqs","B1piyhd","of3gr0","hvfrz3","useSelectedStyles","highlightSelected","useDisabledStyles","Bg33ivm","t69wg0","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAOKc,wBAAwB;;;IAiQxBoI,gCAAgC;;;;uBAtQI,gBAAgB;+BAElC,4BAA4B;AAGpD,iCAAiC;IACxCnI,IAAI,EAAE,oBAAoB;IAC1BC,eAAe,EAAE,qCAAqC;IACtDC,iBAAiB,EAAE,uCAAuC;IAC1DC,0BAA0B,EAAE,gDAAgD;IAC5EC,gBAAgB,EAAE,sCAAsC;IACxDC,aAAa,EAAE,mCAAmC;IAClDC,SAAS,EAAE,+BAA+B;IAC1CC,UAAU,EAAE,gCAAgC;IAC5CC,OAAO,EAAE,6BAA6B;IACtCC,QAAQ,EAAE,8BAA8B;IACxCC,QAAQ,EAAE;AACd,CAAC;AACD,MAAMC,aAAa,GAAA,WAAA,OAAGzB,eAAA,EAAA;IAAA0B,IAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,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CAAChI,IAAI,CAAC;QACpFH,QAAQ,MAAEtB,mBAAY,EAACY,wBAAwB,CAACU,QAAQ,EAAEsH,iBAAiB,IAAIe,cAAc,CAACf,iBAAiB,CAAC;QAChHvH,OAAO,MAAErB,mBAAY,EAACY,wBAAwB,CAACS,OAAO,EAAE6G,gBAAgB,IAAIwB,aAAa,CAACxB,gBAAgB,CAAC;QAC3G3G,QAAQ,MAAEvB,mBAAY,EAACY,wBAAwB,CAACW,QAAQ,EAAEqI,cAAc,CAACnI,IAAI;IACjF,CAAC;AACL,CAAC"}
1
+ {"version":3,"sources":["useCalendarPickerStyles.styles.js"],"sourcesContent":["'use client';\nimport { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { DURATION_2, DURATION_3, EASING_FUNCTION_1, EASING_FUNCTION_2, FADE_IN, SLIDE_DOWN_IN20, SLIDE_LEFT_IN20, SLIDE_RIGHT_IN20, SLIDE_UP_IN20 } from '../../utils/animations';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\n/**\n * @internal\n */ export const calendarPickerClassNames = {\n root: 'fui-CalendarPicker',\n headerContainer: 'fui-CalendarPicker__headerContainer',\n currentItemButton: 'fui-CalendarPicker__currentItemButton',\n navigationButtonsContainer: 'fui-CalendarPicker__navigationButtonsContainer',\n navigationButton: 'fui-CalendarPicker__navigationButton',\n gridContainer: 'fui-CalendarPicker__gridContainer',\n buttonRow: 'fui-CalendarPicker__buttonRow',\n itemButton: 'fui-CalendarPicker__itemButton',\n current: 'fui-CalendarPicker__current',\n selected: 'fui-CalendarPicker__selected',\n disabled: 'fui-CalendarPicker__disabled'\n};\nconst useRootStyles = makeStyles({\n base: {\n boxSizing: 'content-box',\n overflow: 'hidden',\n padding: '12px',\n width: '196px'\n },\n normalize: {\n boxShadow: 'none',\n boxSizing: 'border-box',\n margin: '0',\n padding: '0'\n }\n});\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex'\n }\n});\nconst useCurrentItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n borderRadius: tokens.borderRadiusMedium,\n color: 'inherit',\n flexGrow: 1,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n overflow: 'visible',\n padding: '0 4px 0 10px',\n textAlign: 'left'\n },\n animation: {\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2\n },\n hasHeaderClickCallback: {\n // If this is updated, make sure to update headerIsClickable in useCalendarDayStyles as well\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n }\n }\n});\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex'\n }\n});\nconst useNavigationButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground1,\n display: 'block',\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '28px',\n lineHeight: '28px',\n minHeight: '28px',\n minWidth: '28px',\n overflow: 'visible',\n padding: '0',\n position: 'relative',\n textAlign: 'center',\n width: '28px',\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed\n }\n }\n});\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px'\n }\n});\nconst useButtonRowStyles = makeStyles({\n base: {\n marginBottom: '16px',\n '&:last-of-type': {\n marginBottom: 0\n }\n },\n animation: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationTimingFunction: EASING_FUNCTION_1\n },\n horizontalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_RIGHT_IN20\n ]\n },\n horizontalForward: {\n animationName: [\n FADE_IN,\n SLIDE_LEFT_IN20\n ]\n },\n verticalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_DOWN_IN20\n ]\n },\n verticalForward: {\n animationName: [\n FADE_IN,\n SLIDE_UP_IN20\n ]\n }\n});\nconst useItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground3,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '40px',\n lineHeight: '40px',\n minHeight: '40px',\n minWidth: '40px',\n margin: '0 12px 0 0',\n overflow: 'visible',\n padding: '0',\n width: '40px',\n '&:nth-child(4n + 4)': {\n marginRight: 0\n },\n '&:nth-child(n + 9)': {\n marginBottom: 0\n },\n '& div': {\n fontWeight: tokens.fontWeightRegular\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorNeutralForeground1Static,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n forcedColorAdjust: 'none',\n outline: '1px solid Highlight'\n }\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n },\n '&:hover, &:hover:active': {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none'\n },\n '& div': {\n fontWeight: tokens.fontWeightSemibold\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed\n }\n }\n});\nconst useDisabledStyles = makeStyles({\n base: {\n '&, &:disabled, & button': {\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none'\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n forcedColorAdjust: 'none'\n }\n }\n});\n/**\n * Apply styling to the CalendarPicker slots based on the state\n *\n * @internal\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","Bbkh6qg","Bahaeuw","fmph8g","Bv6y5q5","uq1ffc","Bokaozi","Bfrni1f","rxnm8d","Dcq74g","Bs60fxl","m","useCurrentStyles","highlightCurrent","By8wz76","B7iucu3","B8gzw0y","mk428o","B1lrsqs","B1piyhd","of3gr0","hvfrz3","useSelectedStyles","highlightSelected","useDisabledStyles","Bg33ivm","t69wg0","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAOKc,wBAAwB;;;IAiQxBoI,gCAAgC;;;;uBAtQI,gBAAgB;+BAElC,4BAA4B;AAGpD,iCAAiC;IACxCnI,IAAI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AY,EAACY,wBAAwB,CAACM,aAAa,EAAEqI,mBAAmB,CAAC9H,IAAI,CAAC;QAC7FN,SAAS,MAAEnB,mBAAY,EAACY,wBAAwB,CAACO,SAAS,EAAEqI,eAAe,CAAC/H,IAAI,EAAE+H,eAAe,CAACxF,SAAS,EAAE6F,gBAAgB,KAAKG,SAAS,KAAKF,kBAAkB,KAAKnJ,iCAAkB,CAACsJ,UAAU,GAAGJ,gBAAgB,GAAGL,eAAe,CAAC1C,kBAAkB,GAAG0C,eAAe,CAACzC,iBAAiB,GAAG8C,gBAAgB,GAAGL,eAAe,CAACxC,gBAAgB,GAAGwC,eAAe,CAACvC,eAAAA,AAAe,CAAC,CAAC;QAC1X7F,UAAU,MAAEpB,mBAAY,EAACY,wBAAwB,CAACQ,UAAU,EAAEqI,gBAAgB,CAAChI,IAAI,CAAC;QACpFH,QAAQ,MAAEtB,mBAAY,EAACY,wBAAwB,CAACU,QAAQ,EAAEsH,iBAAiB,IAAIe,cAAc,CAACf,iBAAiB,CAAC;QAChHvH,OAAO,MAAErB,mBAAY,EAACY,wBAAwB,CAACS,OAAO,EAAE6G,gBAAgB,IAAIwB,aAAa,CAACxB,gBAAgB,CAAC;QAC3G3G,QAAQ,MAAEvB,mBAAY,EAACY,wBAAwB,CAACW,QAAQ,EAAEqI,cAAc,CAACnI,IAAI;IACjF,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CalendarPicker/useCalendarPickerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport {\n DURATION_2,\n DURATION_3,\n EASING_FUNCTION_1,\n EASING_FUNCTION_2,\n FADE_IN,\n SLIDE_DOWN_IN20,\n SLIDE_LEFT_IN20,\n SLIDE_RIGHT_IN20,\n SLIDE_UP_IN20,\n} from '../../utils/animations';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CalendarPickerStyles, CalendarPickerStyleProps } from './CalendarPicker.types';\n\n/**\n * @internal\n */\nexport const calendarPickerClassNames: SlotClassNames<CalendarPickerStyles> = {\n root: 'fui-CalendarPicker',\n headerContainer: 'fui-CalendarPicker__headerContainer',\n currentItemButton: 'fui-CalendarPicker__currentItemButton',\n navigationButtonsContainer: 'fui-CalendarPicker__navigationButtonsContainer',\n navigationButton: 'fui-CalendarPicker__navigationButton',\n gridContainer: 'fui-CalendarPicker__gridContainer',\n buttonRow: 'fui-CalendarPicker__buttonRow',\n itemButton: 'fui-CalendarPicker__itemButton',\n current: 'fui-CalendarPicker__current',\n selected: 'fui-CalendarPicker__selected',\n disabled: 'fui-CalendarPicker__disabled',\n};\n\nconst useRootStyles = makeStyles({\n base: {\n boxSizing: 'content-box',\n overflow: 'hidden',\n padding: '12px',\n width: '196px',\n },\n normalize: {\n boxShadow: 'none',\n boxSizing: 'border-box',\n margin: '0',\n padding: '0',\n },\n});\n\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex',\n },\n});\n\nconst useCurrentItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n borderRadius: tokens.borderRadiusMedium,\n color: 'inherit',\n flexGrow: 1,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n overflow: 'visible',\n padding: '0 4px 0 10px',\n textAlign: 'left',\n },\n animation: {\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2,\n },\n hasHeaderClickCallback: {\n // If this is updated, make sure to update headerIsClickable in useCalendarDayStyles as well\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n },\n },\n});\n\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex',\n },\n});\n\nconst useNavigationButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground1,\n display: 'block',\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '28px',\n lineHeight: '28px',\n minHeight: '28px',\n minWidth: '28px',\n overflow: 'visible',\n padding: '0',\n position: 'relative',\n textAlign: 'center',\n width: '28px',\n\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n },\n\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n },\n },\n});\n\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px',\n },\n});\n\nconst useButtonRowStyles = makeStyles({\n base: {\n marginBottom: '16px',\n '&:last-of-type': {\n marginBottom: 0,\n },\n },\n animation: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationTimingFunction: EASING_FUNCTION_1,\n },\n horizontalBackward: {\n animationName: [FADE_IN, SLIDE_RIGHT_IN20],\n },\n horizontalForward: {\n animationName: [FADE_IN, SLIDE_LEFT_IN20],\n },\n verticalBackward: {\n animationName: [FADE_IN, SLIDE_DOWN_IN20],\n },\n verticalForward: {\n animationName: [FADE_IN, SLIDE_UP_IN20],\n },\n});\n\nconst useItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground3,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '40px',\n lineHeight: '40px',\n minHeight: '40px',\n minWidth: '40px',\n margin: '0 12px 0 0',\n overflow: 'visible',\n padding: '0',\n width: '40px',\n\n '&:nth-child(4n + 4)': {\n marginRight: 0,\n },\n '&:nth-child(n + 9)': {\n marginBottom: 0,\n },\n '& div': {\n fontWeight: tokens.fontWeightRegular,\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorNeutralForeground1Static,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n forcedColorAdjust: 'none',\n outline: '1px solid Highlight',\n },\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n '&:hover, &:hover:active': {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n '& div': {\n fontWeight: tokens.fontWeightSemibold,\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n },\n },\n});\n\nconst useDisabledStyles = makeStyles({\n base: {\n '&, &:disabled, & button': {\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none',\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n forcedColorAdjust: 'none',\n },\n },\n});\n\n/**\n * @internal\n *\n * Apply styling to the CalendarPicker slots based on the state\n */\nexport const useCalendarPickerStyles_unstable = (props: CalendarPickerStyleProps): CalendarPickerStyles => {\n 'use no memo';\n\n const rootStyles = useRootStyles();\n const headerContainerStyles = useHeaderContainerStyles();\n const currentItemButtonStyles = useCurrentItemButtonStyles();\n const navigationButtonsContainerStyles = useNavigationButtonsContainerStyles();\n const navigationButtonStyles = useNavigationButtonStyles();\n const gridContainerStyles = useGridContainerStyles();\n const buttonRowStyles = useButtonRowStyles();\n const itemButtonStyles = useItemButtonStyles();\n const currentStyles = useCurrentStyles();\n const selectedStyles = useSelectedStyles();\n const disabledStyles = useDisabledStyles();\n\n const {\n animateBackwards,\n animationDirection,\n className,\n hasHeaderClickCallback,\n highlightCurrent,\n highlightSelected,\n } = props;\n\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(\n calendarPickerClassNames.currentItemButton,\n currentItemButtonStyles.base,\n animateBackwards !== undefined && currentItemButtonStyles.animation,\n hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback,\n ),\n navigationButtonsContainer: mergeClasses(\n calendarPickerClassNames.navigationButtonsContainer,\n navigationButtonsContainerStyles.base,\n ),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(\n calendarPickerClassNames.buttonRow,\n buttonRowStyles.base,\n buttonRowStyles.animation,\n animateBackwards !== undefined &&\n (animationDirection === AnimationDirection.Horizontal\n ? animateBackwards\n ? buttonRowStyles.horizontalBackward\n : buttonRowStyles.horizontalForward\n : animateBackwards\n ? buttonRowStyles.verticalBackward\n : buttonRowStyles.verticalForward),\n ),\n itemButton: mergeClasses(calendarPickerClassNames.itemButton, itemButtonStyles.base),\n selected: mergeClasses(calendarPickerClassNames.selected, highlightSelected && selectedStyles.highlightSelected),\n current: mergeClasses(calendarPickerClassNames.current, highlightCurrent && currentStyles.highlightCurrent),\n disabled: mergeClasses(calendarPickerClassNames.disabled, disabledStyles.base),\n };\n};\n"],"names":["tokens","makeStyles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","AnimationDirection","calendarPickerClassNames","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","base","boxSizing","overflow","padding","width","normalize","boxShadow","margin","useHeaderContainerStyles","display","useCurrentItemButtonStyles","backgroundColor","colorTransparentBackground","borderStyle","borderRadius","borderRadiusMedium","color","flexGrow","fontFamily","fontSize","fontSizeBase300","fontWeight","fontWeightSemibold","textAlign","animation","animationDuration","animationFillMode","animationName","animationTimingFunction","hasHeaderClickCallback","colorBrandBackgroundInvertedHover","colorBrandForegroundOnLightHover","cursor","outline","colorTransparentStroke","colorBrandBackgroundInvertedPressed","colorBrandForegroundOnLightPressed","useNavigationButtonsContainerStyles","alignItems","useNavigationButtonStyles","border","colorNeutralForeground1","fontSizeBase200","height","lineHeight","minHeight","minWidth","position","useGridContainerStyles","marginTop","useButtonRowStyles","marginBottom","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","colorNeutralForeground3","marginRight","fontWeightRegular","colorNeutralForeground1Static","forcedColorAdjust","useCurrentStyles","highlightCurrent","colorBrandBackground","colorNeutralForegroundOnBrand","useSelectedStyles","highlightSelected","colorBrandBackgroundInvertedSelected","useDisabledStyles","colorNeutralForegroundDisabled","pointerEvents","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"mappings":"AAAA;;;;;;;;;;;;IAsBac,wBAAAA;;;oCA2QAqF;eAAAA;;;4BA/RU,wBAAwB;uBACM,iBAAiB;4BAW/D,yBAAyB;+BACG,6BAA6B;AAOzD,iCAAuE;IAC5EpF,MAAM;IACNC,iBAAiB;IACjBC,mBAAmB;IACnBC,4BAA4B;IAC5BC,kBAAkB;IAClBC,eAAe;IACfC,WAAW;IACXC,YAAY;IACZC,SAAS;IACTC,UAAU;IACVC,UAAU;AACZ,EAAE;AAEF,MAAMC,oBAAgBzB,iBAAAA,EAAW;IAC/B0B,MAAM;QACJC,WAAW;QACXC,UAAU;QACVC,SAAS;QACTC,OAAO;IACT;IACAC,WAAW;QACTC,WAAW;QACXL,WAAW;QACXM,QAAQ;QACRJ,SAAS;IACX;AACF;AAEA,MAAMK,+BAA2BlC,iBAAAA,EAAW;IAC1C0B,MAAM;QACJS,SAAS;IACX;AACF;AAEA,MAAMC,iCAA6BpC,iBAAAA,EAAW;IAC5C0B,MAAM;QACJW,iBAAiBtC,kBAAAA,CAAOuC,0BAA0B;QAClD,GAAGpC,iBAAAA,CAAWqC,WAAW,CAAC,OAAO;QACjCC,cAAczC,kBAAAA,CAAO0C,kBAAkB;QACvCC,OAAO;QACPC,UAAU;QACVC,YAAY;QACZC,UAAU9C,kBAAAA,CAAO+C,eAAe;QAChCC,YAAYhD,kBAAAA,CAAOiD,kBAAkB;Q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Aa,EAAEsF,oBAAoB/E,IAAI;QAC5FN,WAAWnB,uBAAAA,EACTY,yBAAyBO,SAAS,EAClCsF,gBAAgBhF,IAAI,EACpBgF,gBAAgBxD,SAAS,EACzB6D,qBAAqBG,aAClBF,CAAAA,uBAAuBpG,iCAAAA,CAAmBuG,UAAU,GACjDJ,mBACEL,gBAAgB5B,kBAAkB,GAClC4B,gBAAgB3B,iBAAiB,GACnCgC,mBACAL,gBAAgB1B,gBAAgB,GAChC0B,gBAAgBzB,eAAAA,AAAc;QAEtC5D,gBAAYpB,mBAAAA,EAAaY,yBAAyBQ,UAAU,EAAEsF,iBAAiBjF,IAAI;QACnFH,cAAUtB,mBAAAA,EAAaY,yBAAyBU,QAAQ,EAAEsE,qBAAqBgB,eAAehB,iBAAiB;QAC/GvE,aAASrB,mBAAAA,EAAaY,yBAAyBS,OAAO,EAAEmE,oBAAoBmB,cAAcnB,gBAAgB;QAC1GjE,cAAUvB,mBAAAA,EAAaY,yBAAyBW,QAAQ,EAAEsF,eAAepF,IAAI;IAC/E;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/CalendarPicker/useCalendarPickerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport {\n DURATION_2,\n DURATION_3,\n EASING_FUNCTION_1,\n EASING_FUNCTION_2,\n FADE_IN,\n SLIDE_DOWN_IN20,\n SLIDE_LEFT_IN20,\n SLIDE_RIGHT_IN20,\n SLIDE_UP_IN20,\n} from '../../utils/animations';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CalendarPickerStyles, CalendarPickerStyleProps } from './CalendarPicker.types';\n\n/**\n * @internal\n */\nexport const calendarPickerClassNames: SlotClassNames<CalendarPickerStyles> = {\n root: 'fui-CalendarPicker',\n headerContainer: 'fui-CalendarPicker__headerContainer',\n currentItemButton: 'fui-CalendarPicker__currentItemButton',\n navigationButtonsContainer: 'fui-CalendarPicker__navigationButtonsContainer',\n navigationButton: 'fui-CalendarPicker__navigationButton',\n gridContainer: 'fui-CalendarPicker__gridContainer',\n buttonRow: 'fui-CalendarPicker__buttonRow',\n itemButton: 'fui-CalendarPicker__itemButton',\n current: 'fui-CalendarPicker__current',\n selected: 'fui-CalendarPicker__selected',\n disabled: 'fui-CalendarPicker__disabled',\n};\n\nconst useRootStyles = makeStyles({\n base: {\n boxSizing: 'content-box',\n overflow: 'hidden',\n padding: '12px',\n width: '196px',\n },\n normalize: {\n boxShadow: 'none',\n boxSizing: 'border-box',\n margin: '0',\n padding: '0',\n },\n});\n\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex',\n },\n});\n\nconst useCurrentItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n borderRadius: tokens.borderRadiusMedium,\n color: 'inherit',\n flexGrow: 1,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n overflow: 'visible',\n padding: '0 4px 0 10px',\n textAlign: 'left',\n },\n animation: {\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2,\n },\n hasHeaderClickCallback: {\n // If this is updated, make sure to update headerIsClickable in useCalendarDayStyles as well\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n },\n },\n});\n\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex',\n },\n});\n\nconst useNavigationButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground1,\n display: 'block',\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '28px',\n lineHeight: '28px',\n minHeight: '28px',\n minWidth: '28px',\n overflow: 'visible',\n padding: '0',\n position: 'relative',\n textAlign: 'center',\n width: '28px',\n\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n },\n\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n },\n },\n});\n\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px',\n },\n});\n\nconst useButtonRowStyles = makeStyles({\n base: {\n marginBottom: '16px',\n '&:last-of-type': {\n marginBottom: 0,\n },\n },\n animation: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationTimingFunction: EASING_FUNCTION_1,\n },\n horizontalBackward: {\n animationName: [FADE_IN, SLIDE_RIGHT_IN20],\n },\n horizontalForward: {\n animationName: [FADE_IN, SLIDE_LEFT_IN20],\n },\n verticalBackward: {\n animationName: [FADE_IN, SLIDE_DOWN_IN20],\n },\n verticalForward: {\n animationName: [FADE_IN, SLIDE_UP_IN20],\n },\n});\n\nconst useItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground3,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '40px',\n lineHeight: '40px',\n minHeight: '40px',\n minWidth: '40px',\n margin: '0 12px 0 0',\n overflow: 'visible',\n padding: '0',\n width: '40px',\n\n '&:nth-child(4n + 4)': {\n marginRight: 0,\n },\n '&:nth-child(n + 9)': {\n marginBottom: 0,\n },\n '& div': {\n fontWeight: tokens.fontWeightRegular,\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorNeutralForeground1Static,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n forcedColorAdjust: 'none',\n outline: '1px solid Highlight',\n },\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n '&:hover, &:hover:active': {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n '& div': {\n fontWeight: tokens.fontWeightSemibold,\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n },\n },\n});\n\nconst useDisabledStyles = makeStyles({\n base: {\n '&, &:disabled, & button': {\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none',\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n forcedColorAdjust: 'none',\n },\n },\n});\n\n/**\n * Apply styling to the CalendarPicker slots based on the state\n *\n * @internal\n */\nexport const useCalendarPickerStyles_unstable = (props: CalendarPickerStyleProps): CalendarPickerStyles => {\n 'use no memo';\n\n const rootStyles = useRootStyles();\n const headerContainerStyles = useHeaderContainerStyles();\n const currentItemButtonStyles = useCurrentItemButtonStyles();\n const navigationButtonsContainerStyles = useNavigationButtonsContainerStyles();\n const navigationButtonStyles = useNavigationButtonStyles();\n const gridContainerStyles = useGridContainerStyles();\n const buttonRowStyles = useButtonRowStyles();\n const itemButtonStyles = useItemButtonStyles();\n const currentStyles = useCurrentStyles();\n const selectedStyles = useSelectedStyles();\n const disabledStyles = useDisabledStyles();\n\n const {\n animateBackwards,\n animationDirection,\n className,\n hasHeaderClickCallback,\n highlightCurrent,\n highlightSelected,\n } = props;\n\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(\n calendarPickerClassNames.currentItemButton,\n currentItemButtonStyles.base,\n animateBackwards !== undefined && currentItemButtonStyles.animation,\n hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback,\n ),\n navigationButtonsContainer: mergeClasses(\n calendarPickerClassNames.navigationButtonsContainer,\n navigationButtonsContainerStyles.base,\n ),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(\n calendarPickerClassNames.buttonRow,\n buttonRowStyles.base,\n buttonRowStyles.animation,\n animateBackwards !== undefined &&\n (animationDirection === AnimationDirection.Horizontal\n ? animateBackwards\n ? buttonRowStyles.horizontalBackward\n : buttonRowStyles.horizontalForward\n : animateBackwards\n ? buttonRowStyles.verticalBackward\n : buttonRowStyles.verticalForward),\n ),\n itemButton: mergeClasses(calendarPickerClassNames.itemButton, itemButtonStyles.base),\n selected: mergeClasses(calendarPickerClassNames.selected, highlightSelected && selectedStyles.highlightSelected),\n current: mergeClasses(calendarPickerClassNames.current, highlightCurrent && currentStyles.highlightCurrent),\n disabled: mergeClasses(calendarPickerClassNames.disabled, disabledStyles.base),\n };\n};\n"],"names":["tokens","makeStyles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","AnimationDirection","calendarPickerClassNames","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","base","boxSizing","overflow","padding","width","normalize","boxShadow","margin","useHeaderContainerStyles","display","useCurrentItemButtonStyles","backgroundColor","colorTransparentBackground","borderStyle","borderRadius","borderRadiusMedium","color","flexGrow","fontFamily","fontSize","fontSizeBase300","fontWeight","fontWeightSemibold","textAlign","animation","animationDuration","animationFillMode","animationName","animationTimingFunction","hasHeaderClickCallback","colorBrandBackgroundInvertedHover","colorBrandForegroundOnLightHover","cursor","outline","colorTransparentStroke","colorBrandBackgroundInvertedPressed","colorBrandForegroundOnLightPressed","useNavigationButtonsContainerStyles","alignItems","useNavigationButtonStyles","border","colorNeutralForeground1","fontSizeBase200","height","lineHeight","minHeight","minWidth","position","useGridContainerStyles","marginTop","useButtonRowStyles","marginBottom","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","colorNeutralForeground3","marginRight","fontWeightRegular","colorNeutralForeground1Static","forcedColorAdjust","useCurrentStyles","highlightCurrent","colorBrandBackground","colorNeutralForegroundOnBrand","useSelectedStyles","highlightSelected","colorBrandBackgroundInvertedSelected","useDisabledStyles","colorNeutralForegroundDisabled","pointerEvents","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"mappings":"AAAA;;;;;;;;;;;;IAsBac,wBAAAA;;;oCA2QAqF;eAAAA;;;4BA/RU,wBAAwB;uBACM,iBAAiB;4BAW/D,yBAAyB;+BACG,6BAA6B;AAOzD,iCAAuE;IAC5EpF,MAAM;IACNC,iBAAiB;IACjBC,mBAAmB;IACnBC,4BAA4B;IAC5BC,kBAAkB;IAClBC,eAAe;IACfC,WAAW;IACXC,YAAY;IACZC,SAAS;IACTC,UAAU;IACVC,UAAU;AACZ,EAAE;AAEF,MAAMC,oBAAgBzB,iBAAAA,EAAW;IAC/B0B,MAAM;QACJC,WAAW;QACXC,UAAU;QACVC,SAAS;QACTC,OAAO;IACT;IACAC,WAAW;QACTC,WAAW;QACXL,WAAW;QACXM,QAAQ;QACRJ,SAAS;IACX;AACF;AAEA,MAAMK,+BAA2BlC,iBAAAA,EAAW;IAC1C0B,MAAM;QACJS,SAAS;IACX;AACF;AAEA,MAAMC,iCAA6BpC,iBAAAA,EAAW;IAC5C0B,MAAM;QACJW,iBAAiBtC,kBAAAA,CAAOuC,0BAA0B;QAClD,GAAGpC,iBAAAA,CAAWqC,WAAW,CAAC,OAAO;QACjCC,cAAczC,kBAAAA,CAAO0C,kBAAkB;QACvCC,OAAO;QACPC,UAAU;QACVC,YAAY;QACZC,UAAU9C,kBAAAA,CAAO+C,eAAe;QAChCC,YAAYhD,kBAAAA,CAAOiD,kBAAkB;QACrCpB,UAAU;QACVC,SAAS;QACToB,WAAW;IACb;IACAC,WAAW;QACTC,mBAAmBhD,sBAAAA;QACnBiD,mBAAmB;QACnBC,eAAe9C,mBAAAA;QACf+C,yBAAyBhD,6BAAAA;IAC3B;IACAiD,wBAAwB;QACtB,4FAA4F;QAC5F,WAAW;YACTlB,i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EL,gBAAgB5B,kBAAkB,GAClC4B,gBAAgB3B,iBAAiB,GACnCgC,mBACAL,gBAAgB1B,gBAAgB,GAChC0B,gBAAgBzB,eAAAA,AAAc;QAEtC5D,gBAAYpB,mBAAAA,EAAaY,yBAAyBQ,UAAU,EAAEsF,iBAAiBjF,IAAI;QACnFH,cAAUtB,mBAAAA,EAAaY,yBAAyBU,QAAQ,EAAEsE,qBAAqBgB,eAAehB,iBAAiB;QAC/GvE,aAASrB,mBAAAA,EAAaY,yBAAyBS,OAAO,EAAEmE,oBAAoBmB,cAAcnB,gBAAgB;QAC1GjE,cAAUvB,mBAAAA,EAAaY,yBAAyBW,QAAQ,EAAEsF,eAAepF,IAAI;IAC/E;AACF,EAAE"}
@@ -243,7 +243,7 @@ function useAnimateBackwards({ selectedYear, navigatedYear }) {
243
243
  return false;
244
244
  }
245
245
  }
246
- function useYearRangeState({ selectedYear, navigatedYear }) {
246
+ function useYearRangeState({ selectedYear, navigatedYear, onNavigateDate }) {
247
247
  const rangeYear = _react.useMemo(()=>{
248
248
  return selectedYear || navigatedYear || Math.floor(new Date().getFullYear() / 10) * 10;
249
249
  }, [
@@ -252,10 +252,14 @@ function useYearRangeState({ selectedYear, navigatedYear }) {
252
252
  ]);
253
253
  const [fromYear, setFromYear] = _react.useState(rangeYear);
254
254
  const onNavNext = ()=>{
255
- setFromYear((year)=>year + CELL_COUNT);
255
+ const newFromYear = fromYear + CELL_COUNT;
256
+ setFromYear(newFromYear);
257
+ onNavigateDate === null || onNavigateDate === void 0 ? void 0 : onNavigateDate(newFromYear);
256
258
  };
257
259
  const onNavPrevious = ()=>{
258
- setFromYear((year)=>year - CELL_COUNT);
260
+ const newFromYear = fromYear - CELL_COUNT;
261
+ setFromYear(newFromYear);
262
+ onNavigateDate === null || onNavigateDate === void 0 ? void 0 : onNavigateDate(newFromYear);
259
263
  };
260
264
  _react.useEffect(()=>{
261
265
  setFromYear(rangeYear);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CalendarYear/CalendarYear.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { mergeClasses } from '@griffel/react';\nimport { useCalendarYearStyles_unstable } from './useCalendarYearStyles.styles';\nimport type {\n CalendarYearStrings,\n CalendarYearProps,\n CalendarYearRange,\n CalendarYearHeaderProps,\n} from './CalendarYear.types';\n\nconst CELL_COUNT = 12;\nconst CELLS_PER_ROW = 4;\n\nconst DefaultCalendarYearStrings: CalendarYearStrings = {\n prevRangeAriaLabel: undefined,\n nextRangeAriaLabel: undefined,\n};\ninterface CalendarYearGrid {\n focus(): void;\n}\n\ninterface CalendarYearGridCellProps extends CalendarYearProps {\n year: number;\n current?: boolean;\n selected?: boolean;\n disabled?: boolean;\n onSelectYear?: (year: number) => void;\n onRenderYear?: (year: number) => React.ReactNode;\n}\n\ninterface CalendarYearGridProps extends CalendarYearProps, CalendarYearRange {\n selectedYear?: number;\n animateBackwards?: boolean;\n componentRef?: React.RefObject<CalendarYearGridCell | null>;\n}\n\ninterface CalendarYearGridCell {\n focus(): void;\n}\n\nconst CalendarYearGridCell: React.FunctionComponent<CalendarYearGridCellProps> = props => {\n const {\n className,\n highlightCurrentYear,\n highlightSelectedYear,\n year,\n selected,\n disabled,\n componentRef,\n onSelectYear,\n onRenderYear,\n } = props;\n\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n\n React.useImperativeHandle(\n componentRef,\n () => ({\n focus() {\n buttonRef.current?.focus?.();\n },\n }),\n [],\n );\n\n const onClick = () => {\n onSelectYear?.(year);\n };\n\n const onKeyDown = (ev: React.KeyboardEvent<HTMLElement>) => {\n if (ev.key === Enter) {\n onSelectYear?.(year);\n }\n };\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n highlightCurrent: highlightCurrentYear,\n highlightSelected: highlightSelectedYear,\n });\n\n return (\n <button\n className={mergeClasses(classNames.itemButton, selected && classNames.selected, disabled && classNames.disabled)}\n type=\"button\"\n role=\"gridcell\"\n onClick={!disabled ? onClick : undefined}\n onKeyDown={!disabled ? onKeyDown : undefined}\n disabled={disabled}\n aria-selected={selected}\n ref={buttonRef}\n >\n {onRenderYear?.(year) ?? year}\n </button>\n );\n};\nCalendarYearGridCell.displayName = 'CalendarYearGridCell';\n\nconst CalendarYearGrid: React.FunctionComponent<CalendarYearGridProps> = props => {\n const {\n className,\n fromYear,\n toYear,\n animationDirection,\n animateBackwards,\n minYear,\n maxYear,\n onSelectYear,\n selectedYear,\n componentRef,\n } = props;\n\n const selectedCellRef = React.useRef<CalendarYearGridCell>(null);\n\n const currentCellRef = React.useRef<CalendarYearGridCell>(null);\n\n React.useImperativeHandle(\n componentRef,\n () => ({\n focus() {\n (selectedCellRef.current || currentCellRef.current)?.focus?.();\n },\n }),\n [],\n );\n\n const renderCell = (yearToRender: number): React.ReactNode => {\n const selected = yearToRender === selectedYear;\n const disabled =\n (minYear !== undefined && yearToRender < minYear) || (maxYear !== undefined && yearToRender > maxYear);\n const current = yearToRender === new Date().getFullYear();\n\n return (\n <CalendarYearGridCell\n {...props}\n key={yearToRender}\n year={yearToRender}\n selected={selected}\n current={current}\n disabled={disabled}\n onSelectYear={onSelectYear}\n componentRef={selected ? selectedCellRef : current ? currentCellRef : undefined}\n />\n );\n };\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n animateBackwards,\n animationDirection,\n });\n\n const onRenderYear = (value: number) => {\n return props.onRenderYear?.(value) ?? value;\n };\n\n const gridAriaLabel = `${onRenderYear(fromYear)} - ${onRenderYear(toYear)}`;\n\n let year = fromYear;\n const cells: React.ReactNode[][] = [];\n\n for (let i = 0; i < (toYear - fromYear + 1) / CELLS_PER_ROW; i++) {\n cells.push([]);\n for (let j = 0; j < CELLS_PER_ROW; j++) {\n cells[i].push(renderCell(year));\n year++;\n }\n }\n\n const arrowNavigationAttributes = useArrowNavigationGroup({ axis: 'grid' });\n\n return (\n <div {...arrowNavigationAttributes} className={classNames.gridContainer} role=\"grid\" aria-label={gridAriaLabel}>\n {cells.map((cellRow: React.ReactNode[], index: number) => {\n return (\n <div key={'yearPickerRow_' + index + '_' + fromYear} role=\"row\" className={classNames.buttonRow}>\n {cellRow}\n </div>\n );\n })}\n </div>\n );\n};\nCalendarYearGrid.displayName = 'CalendarYearGrid';\n\nconst CalendarYearNavDirection = {\n Previous: 0 as const,\n Next: 1 as const,\n};\n\ninterface CalendarYearNavArrowProps extends CalendarYearHeaderProps {\n direction: (typeof CalendarYearNavDirection)[keyof typeof CalendarYearNavDirection];\n}\n\nconst CalendarYearNavArrow: React.FunctionComponent<CalendarYearNavArrowProps> = props => {\n const {\n className,\n strings = DefaultCalendarYearStrings,\n direction,\n onSelectPrev,\n onSelectNext,\n fromYear,\n toYear,\n maxYear,\n minYear,\n navigationIcons,\n } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n });\n\n const ariaLabel =\n direction === CalendarYearNavDirection.Previous ? strings.prevRangeAriaLabel : strings.nextRangeAriaLabel;\n const newRangeOffset = direction === CalendarYearNavDirection.Previous ? -CELL_COUNT : CELL_COUNT;\n const newRange = { fromYear: fromYear + newRangeOffset, toYear: toYear + newRangeOffset };\n const ariaLabelString = ariaLabel ? (typeof ariaLabel === 'string' ? ariaLabel : ariaLabel(newRange)) : undefined;\n const disabled =\n direction === CalendarYearNavDirection.Previous\n ? minYear !== undefined && fromYear < minYear\n : maxYear !== undefined && props.fromYear + CELL_COUNT > maxYear;\n\n const onNavigate = () => {\n direction === CalendarYearNavDirection.Previous ? onSelectPrev?.() : onSelectNext?.();\n };\n\n const onKeyDown = (ev: React.KeyboardEvent<HTMLElement>) => {\n if (ev.key === Enter) {\n onNavigate();\n }\n };\n\n return (\n <button\n className={mergeClasses(classNames.navigationButton, disabled && classNames.disabled)}\n onClick={!disabled ? onNavigate : undefined}\n onKeyDown={!disabled ? onKeyDown : undefined}\n type=\"button\"\n title={ariaLabelString}\n disabled={disabled}\n >\n {direction === CalendarYearNavDirection.Previous ? navigationIcons.upNavigation : navigationIcons.downNavigation}\n </button>\n );\n};\nCalendarYearNavArrow.displayName = 'CalendarYearNavArrow';\n\nconst CalendarYearNav: React.FunctionComponent<CalendarYearHeaderProps> = props => {\n const { className } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n });\n\n return (\n <div className={classNames.navigationButtonsContainer}>\n <CalendarYearNavArrow {...props} direction={CalendarYearNavDirection.Previous} />\n <CalendarYearNavArrow {...props} direction={CalendarYearNavDirection.Next} />\n </div>\n );\n};\nCalendarYearNav.displayName = 'CalendarYearNav';\n\nconst CalendarYearTitle: React.FunctionComponent<CalendarYearHeaderProps> = props => {\n const {\n className,\n fromYear,\n toYear,\n strings = DefaultCalendarYearStrings,\n animateBackwards,\n animationDirection,\n } = props;\n\n const onHeaderSelect = () => {\n props.onHeaderSelect?.(true);\n };\n\n const onHeaderKeyDown = (ev: React.KeyboardEvent<HTMLElement>) => {\n if (ev.key === Enter || ev.key === Space) {\n onHeaderSelect();\n }\n };\n\n const onRenderYear = (year: number) => {\n return props.onRenderYear?.(year) ?? year;\n };\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n hasHeaderClickCallback: !!props.onHeaderSelect,\n animateBackwards,\n animationDirection,\n });\n\n if (props.onHeaderSelect) {\n const rangeAriaLabel = strings.rangeAriaLabel;\n const headerAriaLabelFormatString = strings.headerAriaLabelFormatString;\n const currentDateRange = rangeAriaLabel\n ? typeof rangeAriaLabel === 'string'\n ? rangeAriaLabel\n : rangeAriaLabel(props)\n : undefined;\n\n const ariaLabel = headerAriaLabelFormatString\n ? headerAriaLabelFormatString.replace('{0}', currentDateRange ?? '')\n : currentDateRange;\n\n return (\n <button\n className={classNames.currentItemButton}\n onClick={onHeaderSelect}\n onKeyDown={onHeaderKeyDown}\n aria-label={ariaLabel}\n role=\"button\"\n type=\"button\"\n >\n <span aria-live=\"assertive\" aria-atomic=\"true\">\n {onRenderYear(fromYear)} - {onRenderYear(toYear)}\n </span>\n </button>\n );\n }\n\n return (\n <div className={classNames.current}>\n {onRenderYear(fromYear)} - {onRenderYear(toYear)}\n </div>\n );\n};\nCalendarYearTitle.displayName = 'CalendarYearTitle';\n\nconst CalendarYearHeader: React.FunctionComponent<CalendarYearHeaderProps> = props => {\n const { className, animateBackwards, animationDirection, onRenderTitle } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n hasHeaderClickCallback: !!props.onHeaderSelect,\n animateBackwards,\n animationDirection,\n });\n\n return (\n <div className={classNames.headerContainer}>\n {onRenderTitle?.(props) ?? <CalendarYearTitle {...props} />}\n <CalendarYearNav {...props} />\n </div>\n );\n};\nCalendarYearHeader.displayName = 'CalendarYearHeader';\n\nfunction useAnimateBackwards({ selectedYear, navigatedYear }: CalendarYearProps) {\n const rangeYear = selectedYear || navigatedYear || new Date().getFullYear();\n const fromYear = Math.floor(rangeYear / 10) * 10;\n\n const previousFromYearRef = React.useRef<number | undefined>(fromYear);\n React.useRef(() => {\n previousFromYearRef.current = fromYear;\n });\n const previousFromYear = previousFromYearRef.current;\n\n if (!previousFromYear || previousFromYear === fromYear) {\n return undefined;\n } else if (previousFromYear > fromYear) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction useYearRangeState({ selectedYear, navigatedYear }: CalendarYearProps) {\n const rangeYear = React.useMemo(() => {\n return selectedYear || navigatedYear || Math.floor(new Date().getFullYear() / 10) * 10;\n }, [navigatedYear, selectedYear]);\n\n const [fromYear, setFromYear] = React.useState<number>(rangeYear);\n\n const onNavNext = () => {\n setFromYear(year => year + CELL_COUNT);\n };\n\n const onNavPrevious = () => {\n setFromYear(year => year - CELL_COUNT);\n };\n\n React.useEffect(() => {\n setFromYear(rangeYear);\n }, [rangeYear]);\n\n const toYear = fromYear + CELL_COUNT - 1;\n\n return [fromYear, toYear, onNavNext, onNavPrevious] as const;\n}\n\n/**\n * @internal\n */\nexport const CalendarYear: React.FunctionComponent<CalendarYearProps> = props => {\n const animateBackwards = useAnimateBackwards(props);\n const [fromYear, toYear, onNavNext, onNavPrevious] = useYearRangeState(props);\n\n const gridRef = React.useRef<CalendarYearGrid>(null);\n\n React.useImperativeHandle(props.componentRef, () => ({\n focus() {\n gridRef.current?.focus?.();\n },\n }));\n\n const { className } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n });\n\n return (\n <div className={classNames.root}>\n <CalendarYearHeader\n {...props}\n fromYear={fromYear}\n toYear={toYear}\n onSelectPrev={onNavPrevious}\n onSelectNext={onNavNext}\n animateBackwards={animateBackwards}\n />\n <CalendarYearGrid\n {...props}\n fromYear={fromYear}\n toYear={toYear}\n animateBackwards={animateBackwards}\n componentRef={gridRef}\n />\n </div>\n );\n};\nCalendarYear.displayName = 'CalendarYear';\n"],"names":["React","Enter","Space","useArrowNavigationGroup","mergeClasses","useCalendarYearStyles_unstable","CELL_COUNT","CELLS_PER_ROW","DefaultCalendarYearStrings","prevRangeAriaLabel","undefined","nextRangeAriaLabel","CalendarYearGridCell","props","className","highlightCurrentYear","highlightSelectedYear","year","selected","disabled","componentRef","onSelectYear","onRenderYear","buttonRef","useRef","useImperativeHandle","focus","current","onClick","onKeyDown","ev","key","classNames","highlightCurrent","highlightSelected","button","itemButton","type","role","aria-selected","ref","displayName","CalendarYearGrid","fromYear","toYear","animationDirection","animateBackwards","minYear","maxYear","selectedYear","selectedCellRef","currentCellRef","renderCell","yearToRender","Date","getFullYear","value","gridAriaLabel","cells","i","push","j","arrowNavigationAttributes","axis","div","gridContainer","aria-label","map","cellRow","index","buttonRow","CalendarYearNavDirection","Previous","Next","CalendarYearNavArrow","strings","direction","onSelectPrev","onSelectNext","navigationIcons","ariaLabel","newRangeOffset","newRange","ariaLabelString","onNavigate","navigationButton","title","upNavigation","downNavigation","CalendarYearNav","navigationButtonsContainer","CalendarYearTitle","onHeaderSelect","onHeaderKeyDown","hasHeaderClickCallback","rangeAriaLabel","headerAriaLabelFormatString","currentDateRange","replace","currentItemButton","span","aria-live","aria-atomic","CalendarYearHeader","onRenderTitle","headerContainer","useAnimateBackwards","navigatedYear","rangeYear","Math","floor","previousFromYearRef","previousFromYear","useYearRangeState","useMemo","setFromYear","useState","onNavNext","onNavPrevious","useEffect","CalendarYear","gridRef","root"],"mappings":"AAAA;;;;;;;;eAgZawH;;;;iEA9YU,QAAQ;8BACF,0BAA0B;8BACf,0BAA0B;wBACrC,iBAAiB;6CACC,iCAAiC;AAQhF,MAAMlH,aAAa;AACnB,MAAMC,gBAAgB;AAEtB,MAAMC,6BAAkD;IACtDC,oBAAoBC;IACpBC,oBAAoBD;AACtB;AAwBA,MAAME,uBAA2EC,CAAAA;IAC/E,MAAM,EACJC,SAAS,EACTC,oBAAoB,EACpBC,qBAAqB,EACrBC,IAAI,EACJC,QAAQ,EACRC,QAAQ,EACRC,YAAY,EACZC,YAAY,EACZC,YAAY,EACb,GAAGT;IAEJ,MAAMU,YAAYvB,OAAMwB,MAAM,CAAoB;IAElDxB,OAAMyB,mBAAmB,CACvBL,cACA,IAAO,CAAA;YACLM;oBACEH,0BAAAA;iBAAAA,qBAAAA,UAAUI,OAAAA,AAAO,MAAA,QAAjBJ,uBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,2BAAAA,mBAAmBG,KAAK,AAALA,MAAK,QAAxBH,6BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,yBAAAA,IAAAA,CAAAA;YACF;SACF,CAAA,EACA,EAAE;IAGJ,MAAMK,UAAU;QACdP,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,aAAeJ;IACjB;IAEA,MAAMY,YAAY,CAACC;QACjB,IAAIA,GAAGC,GAAG,KAAK9B,mBAAAA,EAAO;YACpBoB,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,aAAeJ;QACjB;IACF;IAEA,MAAMe,iBAAa3B,2DAAAA,EAA+B;QAChDS;QACAmB,kBAAkBlB;QAClBmB,mBAAmBlB;IACrB;QAaKM;IAXL,OAAA,WAAA,GACE,OAAA,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dJ,YAAYP;IACd,GAAG;QAACA;KAAU;IAEd,MAAMhE,SAASD,WAAWrC,aAAa;IAEvC,OAAO;QAACqC;QAAUC;QAAQyE;QAAWC;KAAc;AACrD;AAKO,qBAAiEzG,CAAAA;IACtE,MAAMiC,mBAAmB4D,oBAAoB7F;IAC7C,MAAM,CAAC8B,UAAUC,QAAQyE,WAAWC,cAAc,GAAGL,kBAAkBpG;IAEvE,MAAM4G,UAAUzH,OAAMwB,MAAM,CAAmB;IAE/CxB,OAAMyB,mBAAmB,CAACZ,MAAMO,YAAY,EAAE,IAAO,CAAA;YACnDM;oBACE+F,wBAAAA;iBAAAA,mBAAAA,QAAQ9F,OAAAA,AAAO,MAAA,QAAf8F,qBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,yBAAAA,iBAAiB/F,KAAAA,AAAK,MAAA,QAAtB+F,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAAA,IAAAA,CAAAA;YACF;SACF,CAAA;IAEA,MAAM,EAAE3G,SAAS,EAAE,GAAGD;IAEtB,MAAMmB,iBAAa3B,2DAAAA,EAA+B;QAChDS;IACF;IAEA,OAAA,WAAA,GACE,OAAA,aAAA,CAACkD,OAAAA;QAAIlD,WAAWkB,WAAW0F,IAAI;qBAC7B,OAAA,aAAA,CAACnB,oBAAAA;QACE,GAAG1F,KAAK;QACT8B,UAAUA;QACVC,QAAQA;QACRiC,cAAcyC;QACdxC,cAAcuC;QACdvE,kBAAkBA;sBAEpB,OAAA,aAAA,CAACJ,kBAAAA;QACE,GAAG7B,KAAK;QACT8B,UAAUA;QACVC,QAAQA;QACRE,kBAAkBA;QAClB1B,cAAcqG;;AAItB,EAAE;AACFD,aAAa/E,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/CalendarYear/CalendarYear.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { mergeClasses } from '@griffel/react';\nimport { useCalendarYearStyles_unstable } from './useCalendarYearStyles.styles';\nimport type {\n CalendarYearStrings,\n CalendarYearProps,\n CalendarYearRange,\n CalendarYearHeaderProps,\n} from './CalendarYear.types';\n\nconst CELL_COUNT = 12;\nconst CELLS_PER_ROW = 4;\n\nconst DefaultCalendarYearStrings: CalendarYearStrings = {\n prevRangeAriaLabel: undefined,\n nextRangeAriaLabel: undefined,\n};\ninterface CalendarYearGrid {\n focus(): void;\n}\n\ninterface CalendarYearGridCellProps extends CalendarYearProps {\n year: number;\n current?: boolean;\n selected?: boolean;\n disabled?: boolean;\n onSelectYear?: (year: number) => void;\n onRenderYear?: (year: number) => React.ReactNode;\n}\n\ninterface CalendarYearGridProps extends CalendarYearProps, CalendarYearRange {\n selectedYear?: number;\n animateBackwards?: boolean;\n componentRef?: React.RefObject<CalendarYearGridCell | null>;\n}\n\ninterface CalendarYearGridCell {\n focus(): void;\n}\n\nconst CalendarYearGridCell: React.FunctionComponent<CalendarYearGridCellProps> = props => {\n const {\n className,\n highlightCurrentYear,\n highlightSelectedYear,\n year,\n selected,\n disabled,\n componentRef,\n onSelectYear,\n onRenderYear,\n } = props;\n\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n\n React.useImperativeHandle(\n componentRef,\n () => ({\n focus() {\n buttonRef.current?.focus?.();\n },\n }),\n [],\n );\n\n const onClick = () => {\n onSelectYear?.(year);\n };\n\n const onKeyDown = (ev: React.KeyboardEvent<HTMLElement>) => {\n if (ev.key === Enter) {\n onSelectYear?.(year);\n }\n };\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n highlightCurrent: highlightCurrentYear,\n highlightSelected: highlightSelectedYear,\n });\n\n return (\n <button\n className={mergeClasses(classNames.itemButton, selected && classNames.selected, disabled && classNames.disabled)}\n type=\"button\"\n role=\"gridcell\"\n onClick={!disabled ? onClick : undefined}\n onKeyDown={!disabled ? onKeyDown : undefined}\n disabled={disabled}\n aria-selected={selected}\n ref={buttonRef}\n >\n {onRenderYear?.(year) ?? year}\n </button>\n );\n};\nCalendarYearGridCell.displayName = 'CalendarYearGridCell';\n\nconst CalendarYearGrid: React.FunctionComponent<CalendarYearGridProps> = props => {\n const {\n className,\n fromYear,\n toYear,\n animationDirection,\n animateBackwards,\n minYear,\n maxYear,\n onSelectYear,\n selectedYear,\n componentRef,\n } = props;\n\n const selectedCellRef = React.useRef<CalendarYearGridCell>(null);\n\n const currentCellRef = React.useRef<CalendarYearGridCell>(null);\n\n React.useImperativeHandle(\n componentRef,\n () => ({\n focus() {\n (selectedCellRef.current || currentCellRef.current)?.focus?.();\n },\n }),\n [],\n );\n\n const renderCell = (yearToRender: number): React.ReactNode => {\n const selected = yearToRender === selectedYear;\n const disabled =\n (minYear !== undefined && yearToRender < minYear) || (maxYear !== undefined && yearToRender > maxYear);\n const current = yearToRender === new Date().getFullYear();\n\n return (\n <CalendarYearGridCell\n {...props}\n key={yearToRender}\n year={yearToRender}\n selected={selected}\n current={current}\n disabled={disabled}\n onSelectYear={onSelectYear}\n componentRef={selected ? selectedCellRef : current ? currentCellRef : undefined}\n />\n );\n };\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n animateBackwards,\n animationDirection,\n });\n\n const onRenderYear = (value: number) => {\n return props.onRenderYear?.(value) ?? value;\n };\n\n const gridAriaLabel = `${onRenderYear(fromYear)} - ${onRenderYear(toYear)}`;\n\n let year = fromYear;\n const cells: React.ReactNode[][] = [];\n\n for (let i = 0; i < (toYear - fromYear + 1) / CELLS_PER_ROW; i++) {\n cells.push([]);\n for (let j = 0; j < CELLS_PER_ROW; j++) {\n cells[i].push(renderCell(year));\n year++;\n }\n }\n\n const arrowNavigationAttributes = useArrowNavigationGroup({ axis: 'grid' });\n\n return (\n <div {...arrowNavigationAttributes} className={classNames.gridContainer} role=\"grid\" aria-label={gridAriaLabel}>\n {cells.map((cellRow: React.ReactNode[], index: number) => {\n return (\n <div key={'yearPickerRow_' + index + '_' + fromYear} role=\"row\" className={classNames.buttonRow}>\n {cellRow}\n </div>\n );\n })}\n </div>\n );\n};\nCalendarYearGrid.displayName = 'CalendarYearGrid';\n\nconst CalendarYearNavDirection = {\n Previous: 0 as const,\n Next: 1 as const,\n};\n\ninterface CalendarYearNavArrowProps extends CalendarYearHeaderProps {\n direction: (typeof CalendarYearNavDirection)[keyof typeof CalendarYearNavDirection];\n}\n\nconst CalendarYearNavArrow: React.FunctionComponent<CalendarYearNavArrowProps> = props => {\n const {\n className,\n strings = DefaultCalendarYearStrings,\n direction,\n onSelectPrev,\n onSelectNext,\n fromYear,\n toYear,\n maxYear,\n minYear,\n navigationIcons,\n } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n });\n\n const ariaLabel =\n direction === CalendarYearNavDirection.Previous ? strings.prevRangeAriaLabel : strings.nextRangeAriaLabel;\n const newRangeOffset = direction === CalendarYearNavDirection.Previous ? -CELL_COUNT : CELL_COUNT;\n const newRange = { fromYear: fromYear + newRangeOffset, toYear: toYear + newRangeOffset };\n const ariaLabelString = ariaLabel ? (typeof ariaLabel === 'string' ? ariaLabel : ariaLabel(newRange)) : undefined;\n const disabled =\n direction === CalendarYearNavDirection.Previous\n ? minYear !== undefined && fromYear < minYear\n : maxYear !== undefined && props.fromYear + CELL_COUNT > maxYear;\n\n const onNavigate = () => {\n direction === CalendarYearNavDirection.Previous ? onSelectPrev?.() : onSelectNext?.();\n };\n\n const onKeyDown = (ev: React.KeyboardEvent<HTMLElement>) => {\n if (ev.key === Enter) {\n onNavigate();\n }\n };\n\n return (\n <button\n className={mergeClasses(classNames.navigationButton, disabled && classNames.disabled)}\n onClick={!disabled ? onNavigate : undefined}\n onKeyDown={!disabled ? onKeyDown : undefined}\n type=\"button\"\n title={ariaLabelString}\n disabled={disabled}\n >\n {direction === CalendarYearNavDirection.Previous ? navigationIcons.upNavigation : navigationIcons.downNavigation}\n </button>\n );\n};\nCalendarYearNavArrow.displayName = 'CalendarYearNavArrow';\n\nconst CalendarYearNav: React.FunctionComponent<CalendarYearHeaderProps> = props => {\n const { className } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n });\n\n return (\n <div className={classNames.navigationButtonsContainer}>\n <CalendarYearNavArrow {...props} direction={CalendarYearNavDirection.Previous} />\n <CalendarYearNavArrow {...props} direction={CalendarYearNavDirection.Next} />\n </div>\n );\n};\nCalendarYearNav.displayName = 'CalendarYearNav';\n\nconst CalendarYearTitle: React.FunctionComponent<CalendarYearHeaderProps> = props => {\n const {\n className,\n fromYear,\n toYear,\n strings = DefaultCalendarYearStrings,\n animateBackwards,\n animationDirection,\n } = props;\n\n const onHeaderSelect = () => {\n props.onHeaderSelect?.(true);\n };\n\n const onHeaderKeyDown = (ev: React.KeyboardEvent<HTMLElement>) => {\n if (ev.key === Enter || ev.key === Space) {\n onHeaderSelect();\n }\n };\n\n const onRenderYear = (year: number) => {\n return props.onRenderYear?.(year) ?? year;\n };\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n hasHeaderClickCallback: !!props.onHeaderSelect,\n animateBackwards,\n animationDirection,\n });\n\n if (props.onHeaderSelect) {\n const rangeAriaLabel = strings.rangeAriaLabel;\n const headerAriaLabelFormatString = strings.headerAriaLabelFormatString;\n const currentDateRange = rangeAriaLabel\n ? typeof rangeAriaLabel === 'string'\n ? rangeAriaLabel\n : rangeAriaLabel(props)\n : undefined;\n\n const ariaLabel = headerAriaLabelFormatString\n ? headerAriaLabelFormatString.replace('{0}', currentDateRange ?? '')\n : currentDateRange;\n\n return (\n <button\n className={classNames.currentItemButton}\n onClick={onHeaderSelect}\n onKeyDown={onHeaderKeyDown}\n aria-label={ariaLabel}\n role=\"button\"\n type=\"button\"\n >\n <span aria-live=\"assertive\" aria-atomic=\"true\">\n {onRenderYear(fromYear)} - {onRenderYear(toYear)}\n </span>\n </button>\n );\n }\n\n return (\n <div className={classNames.current}>\n {onRenderYear(fromYear)} - {onRenderYear(toYear)}\n </div>\n );\n};\nCalendarYearTitle.displayName = 'CalendarYearTitle';\n\nconst CalendarYearHeader: React.FunctionComponent<CalendarYearHeaderProps> = props => {\n const { className, animateBackwards, animationDirection, onRenderTitle } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n hasHeaderClickCallback: !!props.onHeaderSelect,\n animateBackwards,\n animationDirection,\n });\n\n return (\n <div className={classNames.headerContainer}>\n {onRenderTitle?.(props) ?? <CalendarYearTitle {...props} />}\n <CalendarYearNav {...props} />\n </div>\n );\n};\nCalendarYearHeader.displayName = 'CalendarYearHeader';\n\nfunction useAnimateBackwards({ selectedYear, navigatedYear }: CalendarYearProps) {\n const rangeYear = selectedYear || navigatedYear || new Date().getFullYear();\n const fromYear = Math.floor(rangeYear / 10) * 10;\n\n const previousFromYearRef = React.useRef<number | undefined>(fromYear);\n React.useRef(() => {\n previousFromYearRef.current = fromYear;\n });\n const previousFromYear = previousFromYearRef.current;\n\n if (!previousFromYear || previousFromYear === fromYear) {\n return undefined;\n } else if (previousFromYear > fromYear) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction useYearRangeState({ selectedYear, navigatedYear, onNavigateDate }: CalendarYearProps) {\n const rangeYear = React.useMemo(() => {\n return selectedYear || navigatedYear || Math.floor(new Date().getFullYear() / 10) * 10;\n }, [navigatedYear, selectedYear]);\n\n const [fromYear, setFromYear] = React.useState<number>(rangeYear);\n\n const onNavNext = () => {\n const newFromYear = fromYear + CELL_COUNT;\n setFromYear(newFromYear);\n onNavigateDate?.(newFromYear);\n };\n\n const onNavPrevious = () => {\n const newFromYear = fromYear - CELL_COUNT;\n setFromYear(newFromYear);\n onNavigateDate?.(newFromYear);\n };\n\n React.useEffect(() => {\n setFromYear(rangeYear);\n }, [rangeYear]);\n\n const toYear = fromYear + CELL_COUNT - 1;\n\n return [fromYear, toYear, onNavNext, onNavPrevious] as const;\n}\n\n/**\n * @internal\n */\nexport const CalendarYear: React.FunctionComponent<CalendarYearProps> = props => {\n const animateBackwards = useAnimateBackwards(props);\n const [fromYear, toYear, onNavNext, onNavPrevious] = useYearRangeState(props);\n\n const gridRef = React.useRef<CalendarYearGrid>(null);\n\n React.useImperativeHandle(props.componentRef, () => ({\n focus() {\n gridRef.current?.focus?.();\n },\n }));\n\n const { className } = props;\n\n const classNames = useCalendarYearStyles_unstable({\n className,\n });\n\n return (\n <div className={classNames.root}>\n <CalendarYearHeader\n {...props}\n fromYear={fromYear}\n toYear={toYear}\n onSelectPrev={onNavPrevious}\n onSelectNext={onNavNext}\n animateBackwards={animateBackwards}\n />\n <CalendarYearGrid\n {...props}\n fromYear={fromYear}\n toYear={toYear}\n animateBackwards={animateBackwards}\n componentRef={gridRef}\n />\n </div>\n );\n};\nCalendarYear.displayName = 'CalendarYear';\n"],"names":["React","Enter","Space","useArrowNavigationGroup","mergeClasses","useCalendarYearStyles_unstable","CELL_COUNT","CELLS_PER_ROW","DefaultCalendarYearStrings","prevRangeAriaLabel","undefined","nextRangeAriaLabel","CalendarYearGridCell","props","className","highlightCurrentYear","highlightSelectedYear","year","selected","disabled","componentRef","onSelectYear","onRenderYear","buttonRef","useRef","useImperativeHandle","focus","current","onClick","onKeyDown","ev","key","classNames","highlightCurrent","highlightSelected","button","itemButton","type","role","aria-selected","ref","displayName","CalendarYearGrid","fromYear","toYear","animationDirection","animateBackwards","minYear","maxYear","selectedYear","selectedCellRef","currentCellRef","renderCell","yearToRender","Date","getFullYear","value","gridAriaLabel","cells","i","push","j","arrowNavigationAttributes","axis","div","gridContainer","aria-label","map","cellRow","index","buttonRow","CalendarYearNavDirection","Previous","Next","CalendarYearNavArrow","strings","direction","onSelectPrev","onSelectNext","navigationIcons","ariaLabel","newRangeOffset","newRange","ariaLabelString","onNavigate","navigationButton","title","upNavigation","downNavigation","CalendarYearNav","navigationButtonsContainer","CalendarYearTitle","onHeaderSelect","onHeaderKeyDown","hasHeaderClickCallback","rangeAriaLabel","headerAriaLabelFormatString","currentDateRange","replace","currentItemButton","span","aria-live","aria-atomic","CalendarYearHeader","onRenderTitle","headerContainer","useAnimateBackwards","navigatedYear","rangeYear","Math","floor","previousFromYearRef","previousFromYear","useYearRangeState","onNavigateDate","useMemo","setFromYear","useState","onNavNext","newFromYear","onNavPrevious","useEffect","CalendarYear","gridRef","root"],"mappings":"AAAA;;;;;;;;eAoZa0H;;;;iEAlZU,QAAQ;8BACF,0BAA0B;8BACf,0BAA0B;wBACrC,iBAAiB;6CACC,iCAAiC;AAQhF,MAAMpH,aAAa;AACnB,MAAMC,gBAAgB;AAEtB,MAAMC,6BAAkD;IACtDC,oBAAoBC;IACpBC,oBAAoBD;AACtB;AAwBA,MAAME,uBAA2EC,CAAAA;IAC/E,MAAM,EACJC,SAAS,EACTC,oBAAoB,EACpBC,qBAAqB,EACrBC,IAAI,EACJC,QAAQ,EACRC,QAAQ,EACRC,YAAY,EACZC,YAAY,EACZC,YAAY,EACb,GAAGT;IAEJ,MAAMU,YAAYvB,OAAMwB,MAAM,CAAoB;IAElDxB,OAAMyB,mBAAmB,CACvBL,cACA,IAAO,CAAA;YACLM;oBACEH,0BAAAA;iBAAAA,qBAAAA,UAAUI,OAAAA,AAAO,MAAA,QAAjBJ,uBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,2BAAAA,mBAAmBG,KAAK,AAALA,MAAK,QAAxBH,6BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,yBAAAA,IAAAA,CAAAA;YACF;SACF,CAAA,EACA,EAAE;IAGJ,MAAMK,UAAU;QACdP,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,aAAeJ;IACjB;IAEA,MAAMY,YAAY,CAACC;QACjB,IAAIA,GAAGC,GAAG,KAAK9B,mBAAAA,EAAO;YACpBoB,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,aAAeJ;QACjB;IACF;IAEA,MAAMe,iBAAa3B,2DAAAA,EAA+B;QAChDS;QACAmB,kBAAkBlB;QAClBmB,mBAAmBlB;IACrB;QAaKM;IAXL,OAAA,WAAA,GACE,OAAA,aAAA,CAACa,UAAAA;QACCrB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
1
+ /**
2
+ * @internal
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
5
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
6
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CalendarYear/CalendarYear.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { CalendarNavigationIcons } from '../Calendar/calendarNavigationIcons';\nimport type { CalendarPickerStyleProps, CalendarPickerStyles } from '../CalendarPicker/CalendarPicker.types';\n\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ICalendarYear {\n focus(): void;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearRange {\n fromYear: number;\n toYear: number;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearRangeToString {\n (range: CalendarYearRange): string;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearStrings {\n rangeAriaLabel?: string | CalendarYearRangeToString;\n prevRangeAriaLabel?: string | CalendarYearRangeToString;\n nextRangeAriaLabel?: string | CalendarYearRangeToString;\n headerAriaLabelFormatString?: string;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearProps {\n /**\n * Optional callback to access the ICalendarYear interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<ICalendarYear | null>;\n\n /**\n * Localized strings to use in the Calendar\n */\n strings?: CalendarYearStrings;\n\n /**\n * The currently selected year\n */\n selectedYear?: number;\n\n /**\n * The currently navigated year\n */\n navigatedYear?: number;\n\n /**\n * Callback action when a year is selected\n * @param year - The year the user selected\n */\n onSelectYear?: (year: number) => void;\n\n /**\n * Callback action when the header is selected\n */\n onHeaderSelect?: (focus: boolean) => void;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a year earlier than this value.\n */\n minYear?: number;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a year later than this value.\n */\n maxYear?: number;\n\n /**\n * Whether the year picker should highlight the current year\n * @default false\n */\n highlightCurrentYear?: boolean;\n\n /**\n * Whether the year picker should highlight the selected year\n * @default false\n */\n highlightSelectedYear?: boolean;\n\n /**\n * Accept custom classNames\n */\n className?: string;\n\n /**\n * Custom renderer for the title\n */\n onRenderTitle?: (props: CalendarYearHeaderProps) => React.ReactNode;\n\n /**\n * Custom renderer for the year\n */\n onRenderYear?: (year: number) => React.ReactNode;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or veritcal\n */\n animationDirection?: AnimationDirection;\n\n /**\n * Custom navigation icons.\n */\n navigationIcons: CalendarNavigationIcons;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearStyleProps extends CalendarPickerStyleProps {}\n\n/**\n * @internal\n */\nexport interface CalendarYearStyles extends CalendarPickerStyles {}\n\n/**\n * @internal\n */\nexport interface CalendarYearHeaderProps extends CalendarYearProps, CalendarYearRange {\n /**\n * Callback action when the 'previous' navigation button is selected\n */\n onSelectPrev?: () => void;\n\n /**\n * Callback action when the 'next' navigation button is selected\n */\n onSelectNext?: () => void;\n\n /**\n * Whether title entering animation should be forwards or backwards\n */\n animateBackwards?: boolean;\n}\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
1
+ {"version":3,"sources":["../src/components/CalendarYear/CalendarYear.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { CalendarNavigationIcons } from '../Calendar/calendarNavigationIcons';\nimport type { CalendarPickerStyleProps, CalendarPickerStyles } from '../CalendarPicker/CalendarPicker.types';\n\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ICalendarYear {\n focus(): void;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearRange {\n fromYear: number;\n toYear: number;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearRangeToString {\n (range: CalendarYearRange): string;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearStrings {\n rangeAriaLabel?: string | CalendarYearRangeToString;\n prevRangeAriaLabel?: string | CalendarYearRangeToString;\n nextRangeAriaLabel?: string | CalendarYearRangeToString;\n headerAriaLabelFormatString?: string;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearProps {\n /**\n * Optional callback to access the ICalendarYear interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<ICalendarYear | null>;\n\n /**\n * Localized strings to use in the Calendar\n */\n strings?: CalendarYearStrings;\n\n /**\n * The currently selected year\n */\n selectedYear?: number;\n\n /**\n * The currently navigated year\n */\n navigatedYear?: number;\n\n /**\n * Callback action when a year is selected\n * @param year - The year the user selected\n */\n onSelectYear?: (year: number) => void;\n\n /**\n * Callback action when the decade is navigated\n * @param year - The year at the start of the new decade range being navigated to\n */\n onNavigateDate?: (year: number) => void;\n\n /**\n * Callback action when the header is selected\n */\n onHeaderSelect?: (focus: boolean) => void;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a year earlier than this value.\n */\n minYear?: number;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a year later than this value.\n */\n maxYear?: number;\n\n /**\n * Whether the year picker should highlight the current year\n * @default false\n */\n highlightCurrentYear?: boolean;\n\n /**\n * Whether the year picker should highlight the selected year\n * @default false\n */\n highlightSelectedYear?: boolean;\n\n /**\n * Accept custom classNames\n */\n className?: string;\n\n /**\n * Custom renderer for the title\n */\n onRenderTitle?: (props: CalendarYearHeaderProps) => React.ReactNode;\n\n /**\n * Custom renderer for the year\n */\n onRenderYear?: (year: number) => React.ReactNode;\n\n /**\n * The cardinal directions for animation to occur during transitions, either horizontal or veritcal\n */\n animationDirection?: AnimationDirection;\n\n /**\n * Custom navigation icons.\n */\n navigationIcons: CalendarNavigationIcons;\n}\n\n/**\n * @internal\n */\nexport interface CalendarYearStyleProps extends CalendarPickerStyleProps {}\n\n/**\n * @internal\n */\nexport interface CalendarYearStyles extends CalendarPickerStyles {}\n\n/**\n * @internal\n */\nexport interface CalendarYearHeaderProps extends CalendarYearProps, CalendarYearRange {\n /**\n * Callback action when the 'previous' navigation button is selected\n */\n onSelectPrev?: () => void;\n\n /**\n * Callback action when the 'next' navigation button is selected\n */\n onSelectNext?: () => void;\n\n /**\n * Whether title entering animation should be forwards or backwards\n */\n animateBackwards?: boolean;\n}\n"],"names":[],"mappings":"AA0IA;;CAEC,GACD,WAeC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useCalendarYearStyles.styles.js"],"sourcesContent":["'use client';\nimport { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\n/**\n * @internal\n *\n * Apply styling to the CalendarYear slots based on the state\n */ export const useCalendarYearStyles_unstable = (props)=>{\n 'use no memo';\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarPickerStyles_unstable","useCalendarYearStyles_unstable","props"],"mappings":"AAAA,YAAY;;;;;;;;;;;+CACqC,kDAAkD;AAKxF,MAAMC,8BAA8B,IAAIC,KAAK,IAAG;IACvD,aAAa;IACb,WAAOF,+DAAgC,EAACE,KAAK,CAAC;AAClD,CAAC"}
1
+ {"version":3,"sources":["useCalendarYearStyles.styles.js"],"sourcesContent":["'use client';\nimport { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\n/**\n * Apply styling to the CalendarYear slots based on the state\n *\n * @internal\n */ export const useCalendarYearStyles_unstable = (props)=>{\n 'use no memo';\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarPickerStyles_unstable","useCalendarYearStyles_unstable","props"],"mappings":"AAAA,YAAY;;;;;;;;;;;+CACqC,kDAAkD;AAKxF,MAAMC,8BAA8B,IAAIC,KAAK,IAAG;IACvD,aAAa;IACb,WAAOF,+DAAgC,EAACE,KAAK,CAAC;AAClD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CalendarYear/useCalendarYearStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\nimport type { CalendarYearStyleProps, CalendarYearStyles } from './CalendarYear.types';\n\n/**\n * @internal\n *\n * Apply styling to the CalendarYear slots based on the state\n */\nexport const useCalendarYearStyles_unstable = (props: CalendarYearStyleProps): CalendarYearStyles => {\n 'use no memo';\n\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarPickerStyles_unstable","useCalendarYearStyles_unstable","props"],"mappings":"AAAA;;;;;;;;;;;+CAEiD,mDAAmD;AAQ7F,MAAMC,iCAAiC,CAACC;IAC7C;IAEA,WAAOF,+DAAAA,EAAiCE;AAC1C,EAAE"}
1
+ {"version":3,"sources":["../src/components/CalendarYear/useCalendarYearStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\nimport type { CalendarYearStyleProps, CalendarYearStyles } from './CalendarYear.types';\n\n/**\n * Apply styling to the CalendarYear slots based on the state\n *\n * @internal\n */\nexport const useCalendarYearStyles_unstable = (props: CalendarYearStyleProps): CalendarYearStyles => {\n 'use no memo';\n\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarPickerStyles_unstable","useCalendarYearStyles_unstable","props"],"mappings":"AAAA;;;;;;;;;;;+CAEiD,mDAAmD;AAQ7F,MAAMC,iCAAiC,CAACC;IAC7C;IAEA,WAAOF,+DAAAA,EAAiCE;AAC1C,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/dateGrid/dateGrid.types.ts"],"sourcesContent":["import { DayOfWeek, DateRangeType, FirstWeekOfYear } from '../constants';\n\nexport interface Day {\n /** `Date.toString()` value of current date */\n key: string;\n /** `Date.getDate()` value of current date */\n date: string;\n /** `Date` object of current date */\n originalDate: Date;\n /** Is current date is in the same month as \"today\" date */\n isInMonth: boolean;\n /** Is current date is \"today\" date */\n isToday: boolean;\n /** Is current date is selected in range */\n isSelected: boolean;\n /** Is current date is selected */\n isSingleSelected: boolean;\n /** Is current date within restriction boundaries */\n isInBounds: boolean;\n /** Is current date marked */\n isMarked: boolean;\n}\n\nexport interface AvailableDateOptions extends RestrictedDatesOptions {\n /** Date from which we start the search */\n initialDate: Date;\n /** Ideal available date */\n targetDate: Date;\n /** Direction of search (`1` - search in future / `-1` search in past) */\n direction: number;\n}\n\nexport interface RestrictedDatesOptions {\n /**\n * If set the Calendar will not allow navigation to or selection of a date earlier than this value.\n */\n minDate?: Date;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date later than this value.\n */\n maxDate?: Date;\n\n /**\n * If set the Calendar will not allow selection of dates in this array.\n */\n restrictedDates?: Date[];\n}\n\nexport interface DayGridOptions extends RestrictedDatesOptions {\n /**\n * The first day of the week for your locale.\n */\n firstDayOfWeek: DayOfWeek;\n\n /**\n * Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,\n * FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values\n */\n firstWeekOfYear: FirstWeekOfYear;\n\n /**\n * The date range type indicating how many days should be selected as the user\n * selects days\n */\n dateRangeType: DateRangeType;\n\n /**\n * The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day\n * views.\n */\n daysToSelectInDayView?: number;\n\n /**\n * Value of today. If unspecified, current time in client machine will be used.\n */\n today?: Date;\n\n /**\n * Whether the calendar should show the week number (weeks 1 to 53) before each week row\n */\n showWeekNumbers?: boolean;\n\n /**\n * The days that are selectable when `dateRangeType` is WorkWeek.\n * If `dateRangeType` is not WorkWeek this property does nothing.\n */\n workWeekDays?: DayOfWeek[];\n\n /**\n * Which days in the generated grid should be marked.\n */\n markedDays?: Date[];\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 * How many weeks to show by default. If not provided, will show enough weeks to display the current\n * month, between 4 and 6 depending\n */\n weeksToShow?: number;\n}\n"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../src/utils/dateGrid/dateGrid.types.ts"],"sourcesContent":["import type { DayOfWeek, DateRangeType, FirstWeekOfYear } from '../constants';\n\nexport interface Day {\n /** `Date.toString()` value of current date */\n key: string;\n /** `Date.getDate()` value of current date */\n date: string;\n /** `Date` object of current date */\n originalDate: Date;\n /** Is current date is in the same month as \"today\" date */\n isInMonth: boolean;\n /** Is current date is \"today\" date */\n isToday: boolean;\n /** Is current date is selected in range */\n isSelected: boolean;\n /** Is current date is selected */\n isSingleSelected: boolean;\n /** Is current date within restriction boundaries */\n isInBounds: boolean;\n /** Is current date marked */\n isMarked: boolean;\n}\n\nexport interface AvailableDateOptions extends RestrictedDatesOptions {\n /** Date from which we start the search */\n initialDate: Date;\n /** Ideal available date */\n targetDate: Date;\n /** Direction of search (`1` - search in future / `-1` search in past) */\n direction: number;\n}\n\nexport interface RestrictedDatesOptions {\n /**\n * If set the Calendar will not allow navigation to or selection of a date earlier than this value.\n */\n minDate?: Date;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date later than this value.\n */\n maxDate?: Date;\n\n /**\n * If set the Calendar will not allow selection of dates in this array.\n */\n restrictedDates?: Date[];\n}\n\nexport interface DayGridOptions extends RestrictedDatesOptions {\n /**\n * The first day of the week for your locale.\n */\n firstDayOfWeek: DayOfWeek;\n\n /**\n * Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,\n * FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values\n */\n firstWeekOfYear: FirstWeekOfYear;\n\n /**\n * The date range type indicating how many days should be selected as the user\n * selects days\n */\n dateRangeType: DateRangeType;\n\n /**\n * The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day\n * views.\n */\n daysToSelectInDayView?: number;\n\n /**\n * Value of today. If unspecified, current time in client machine will be used.\n */\n today?: Date;\n\n /**\n * Whether the calendar should show the week number (weeks 1 to 53) before each week row\n */\n showWeekNumbers?: boolean;\n\n /**\n * The days that are selectable when `dateRangeType` is WorkWeek.\n * If `dateRangeType` is not WorkWeek this property does nothing.\n */\n workWeekDays?: DayOfWeek[];\n\n /**\n * Which days in the generated grid should be marked.\n */\n markedDays?: Date[];\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 * How many weeks to show by default. If not provided, will show enough weeks to display the current\n * month, between 4 and 6 depending\n */\n weeksToShow?: number;\n}\n"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/dateGrid/findAvailableDate.ts"],"sourcesContent":["import { AvailableDateOptions } from './dateGrid.types';\n\nimport { isRestrictedDate } from './isRestrictedDate';\n\nimport { isAfterMaxDate } from './isAfterMaxDate';\n\nimport { isBeforeMinDate } from './isBeforeMinDate';\nimport { compareDatePart, addDays } from '../dateMath/dateMath';\n\n/**\n * Returns closest available date given the restriction `options`, or undefined otherwise\n * @param options - list of search options\n */\nexport const findAvailableDate = (options: AvailableDateOptions): Date | undefined => {\n const { targetDate, initialDate, direction, ...restrictedDateOptions } = options;\n let availableDate = targetDate;\n // if the target date is available, return it immediately\n if (!isRestrictedDate(targetDate, restrictedDateOptions)) {\n return targetDate;\n }\n\n while (\n compareDatePart(initialDate, availableDate) !== 0 &&\n isRestrictedDate(availableDate, restrictedDateOptions) &&\n !isAfterMaxDate(availableDate, restrictedDateOptions) &&\n !isBeforeMinDate(availableDate, restrictedDateOptions)\n ) {\n availableDate = addDays(availableDate, direction);\n }\n\n if (compareDatePart(initialDate, availableDate) !== 0 && !isRestrictedDate(availableDate, restrictedDateOptions)) {\n return availableDate;\n }\n\n return undefined;\n};\n"],"names":["isRestrictedDate","isAfterMaxDate","isBeforeMinDate","compareDatePart","addDays","findAvailableDate","options","targetDate","initialDate","direction","restrictedDateOptions","availableDate","undefined"],"mappings":";;;;+BAaaK;;;;;;kCAXoB,qBAAqB;gCAEvB,mBAAmB;iCAElB,oBAAoB;0BACX,uBAAuB;AAMzD,0BAA0B,CAACC;IAChC,MAAM,EAAEC,UAAU,EAAEC,WAAW,EAAEC,SAAS,EAAE,GAAGC,uBAAuB,GAAGJ;IACzE,IAAIK,gBAAgBJ;IACpB,yDAAyD;IACzD,IAAI,KAACP,kCAAAA,EAAiBO,YAAYG,wBAAwB;QACxD,OAAOH;IACT;IAEA,UACEJ,yBAAAA,EAAgBK,aAAaG,mBAAmB,SAChDX,kCAAAA,EAAiBW,eAAeD,0BAChC,KAACT,8BAAAA,EAAeU,eAAeD,0BAC/B,KAACR,gCAAAA,EAAgBS,eAAeD,uBAChC;QACAC,oBAAgBP,iBAAAA,EAAQO,eAAeF;IACzC;IAEA,QAAIN,yBAAAA,EAAgBK,aAAaG,mBAAmB,KAAK,KAACX,kCAAAA,EAAiBW,eAAeD,wBAAwB;QAChH,OAAOC;IACT;IAEA,OAAOC;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/utils/dateGrid/findAvailableDate.ts"],"sourcesContent":["import type { AvailableDateOptions } from './dateGrid.types';\n\nimport { isRestrictedDate } from './isRestrictedDate';\n\nimport { isAfterMaxDate } from './isAfterMaxDate';\n\nimport { isBeforeMinDate } from './isBeforeMinDate';\nimport { compareDatePart, addDays } from '../dateMath/dateMath';\n\n/**\n * Returns closest available date given the restriction `options`, or undefined otherwise\n * @param options - list of search options\n */\nexport const findAvailableDate = (options: AvailableDateOptions): Date | undefined => {\n const { targetDate, initialDate, direction, ...restrictedDateOptions } = options;\n let availableDate = targetDate;\n // if the target date is available, return it immediately\n if (!isRestrictedDate(targetDate, restrictedDateOptions)) {\n return targetDate;\n }\n\n while (\n compareDatePart(initialDate, availableDate) !== 0 &&\n isRestrictedDate(availableDate, restrictedDateOptions) &&\n !isAfterMaxDate(availableDate, restrictedDateOptions) &&\n !isBeforeMinDate(availableDate, restrictedDateOptions)\n ) {\n availableDate = addDays(availableDate, direction);\n }\n\n if (compareDatePart(initialDate, availableDate) !== 0 && !isRestrictedDate(availableDate, restrictedDateOptions)) {\n return availableDate;\n }\n\n return undefined;\n};\n"],"names":["isRestrictedDate","isAfterMaxDate","isBeforeMinDate","compareDatePart","addDays","findAvailableDate","options","targetDate","initialDate","direction","restrictedDateOptions","availableDate","undefined"],"mappings":";;;;+BAaaK;;;;;;kCAXoB,qBAAqB;gCAEvB,mBAAmB;iCAElB,oBAAoB;0BACX,uBAAuB;AAMzD,0BAA0B,CAACC;IAChC,MAAM,EAAEC,UAAU,EAAEC,WAAW,EAAEC,SAAS,EAAE,GAAGC,uBAAuB,GAAGJ;IACzE,IAAIK,gBAAgBJ;IACpB,yDAAyD;IACzD,IAAI,KAACP,kCAAAA,EAAiBO,YAAYG,wBAAwB;QACxD,OAAOH;IACT;IAEA,UACEJ,yBAAAA,EAAgBK,aAAaG,mBAAmB,SAChDX,kCAAAA,EAAiBW,eAAeD,0BAChC,KAACT,8BAAAA,EAAeU,eAAeD,0BAC/B,KAACR,gCAAAA,EAAgBS,eAAeD,uBAChC;QACAC,oBAAgBP,iBAAAA,EAAQO,eAAeF;IACzC;IAEA,QAAIN,yBAAAA,EAAgBK,aAAaG,mBAAmB,KAAK,KAACX,kCAAAA,EAAiBW,eAAeD,wBAAwB;QAChH,OAAOC;IACT;IAEA,OAAOC;AACT,EAAE"}