@fluentui/react-datepicker-compat 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +169 -1
- package/CHANGELOG.md +43 -2
- package/dist/index.d.ts +4 -1
- package/lib/Calendar.js +0 -1
- package/lib/Calendar.js.map +1 -1
- package/lib/CalendarDay.js +0 -1
- package/lib/CalendarDay.js.map +1 -1
- package/lib/CalendarDayGrid.js +0 -1
- package/lib/CalendarDayGrid.js.map +1 -1
- package/lib/CalendarMonth.js +0 -1
- package/lib/CalendarMonth.js.map +1 -1
- package/lib/CalendarPicker.js +0 -1
- package/lib/CalendarPicker.js.map +1 -1
- package/lib/CalendarYear.js +0 -1
- package/lib/CalendarYear.js.map +1 -1
- package/lib/DatePicker.js +0 -1
- package/lib/DatePicker.js.map +1 -1
- package/lib/components/Calendar/Calendar.js +278 -300
- package/lib/components/Calendar/Calendar.js.map +1 -1
- package/lib/components/Calendar/Calendar.types.js +7 -12
- package/lib/components/Calendar/Calendar.types.js.map +1 -1
- package/lib/components/Calendar/defaults.js +0 -1
- package/lib/components/Calendar/defaults.js.map +1 -1
- package/lib/components/Calendar/index.js +0 -1
- package/lib/components/Calendar/index.js.map +1 -1
- package/lib/components/Calendar/useCalendarStyles.styles.js.map +1 -1
- package/lib/components/CalendarDay/CalendarDay.js +100 -128
- package/lib/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib/components/CalendarDay/CalendarDay.types.js +0 -1
- package/lib/components/CalendarDay/CalendarDay.types.js.map +1 -1
- package/lib/components/CalendarDay/index.js +0 -1
- package/lib/components/CalendarDay/index.js.map +1 -1
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js +146 -159
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js +0 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +150 -179
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridRow.js +20 -34
- package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js +29 -39
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
- package/lib/components/CalendarDayGrid/index.js +0 -1
- package/lib/components/CalendarDayGrid/index.js.map +1 -1
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
- package/lib/components/CalendarDayGrid/useWeeks.js +34 -36
- package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -1
- package/lib/components/CalendarMonth/CalendarMonth.js +238 -258
- package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib/components/CalendarMonth/CalendarMonth.types.js +0 -1
- package/lib/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
- package/lib/components/CalendarMonth/index.js +0 -1
- package/lib/components/CalendarMonth/index.js.map +1 -1
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js +2 -4
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -1
- package/lib/components/CalendarPicker/CalendarPicker.types.js +1 -2
- package/lib/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
- package/lib/components/CalendarPicker/index.js +0 -1
- package/lib/components/CalendarPicker/index.js.map +1 -1
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
- package/lib/components/CalendarYear/CalendarYear.js +260 -312
- package/lib/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib/components/CalendarYear/CalendarYear.types.js +0 -1
- package/lib/components/CalendarYear/CalendarYear.types.js.map +1 -1
- package/lib/components/CalendarYear/index.js +0 -1
- package/lib/components/CalendarYear/index.js.map +1 -1
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
- package/lib/components/DatePicker/DatePicker.js +4 -5
- package/lib/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/components/DatePicker/DatePicker.types.js +0 -1
- package/lib/components/DatePicker/DatePicker.types.js.map +1 -1
- package/lib/components/DatePicker/defaults.js +9 -10
- package/lib/components/DatePicker/defaults.js.map +1 -1
- package/lib/components/DatePicker/index.js +0 -1
- package/lib/components/DatePicker/index.js.map +1 -1
- package/lib/components/DatePicker/renderDatePicker.js +5 -12
- package/lib/components/DatePicker/renderDatePicker.js.map +1 -1
- package/lib/components/DatePicker/useDatePicker.js +402 -354
- package/lib/components/DatePicker/useDatePicker.js.map +1 -1
- package/lib/components/DatePicker/useDatePickerStyles.styles.js.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/animations.js +72 -73
- package/lib/utils/animations.js.map +1 -1
- package/lib/utils/constants.js +50 -52
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/dateFormatting/dateFormatting.defaults.js +71 -34
- package/lib/utils/dateFormatting/dateFormatting.defaults.js.map +1 -1
- package/lib/utils/dateFormatting/dateFormatting.types.js +1 -2
- package/lib/utils/dateFormatting/dateFormatting.types.js.map +1 -1
- package/lib/utils/dateFormatting/index.js +0 -1
- package/lib/utils/dateFormatting/index.js.map +1 -1
- package/lib/utils/dateGrid/dateGrid.types.js +1 -2
- package/lib/utils/dateGrid/dateGrid.types.js.map +1 -1
- package/lib/utils/dateGrid/findAvailableDate.js +14 -21
- package/lib/utils/dateGrid/findAvailableDate.js.map +1 -1
- package/lib/utils/dateGrid/getBoundedDateRange.js +11 -11
- package/lib/utils/dateGrid/getBoundedDateRange.js.map +1 -1
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js +6 -8
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
- package/lib/utils/dateGrid/getDayGrid.js +59 -73
- package/lib/utils/dateGrid/getDayGrid.js.map +1 -1
- package/lib/utils/dateGrid/index.js +0 -1
- package/lib/utils/dateGrid/index.js.map +1 -1
- package/lib/utils/dateGrid/isAfterMaxDate.js +3 -7
- package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -1
- package/lib/utils/dateGrid/isBeforeMinDate.js +3 -7
- package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -1
- package/lib/utils/dateGrid/isContiguous.js +11 -12
- package/lib/utils/dateGrid/isContiguous.js.map +1 -1
- package/lib/utils/dateGrid/isRestrictedDate.js +7 -13
- package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -1
- package/lib/utils/dateMath/dateMath.js +179 -198
- package/lib/utils/dateMath/dateMath.js.map +1 -1
- package/lib/utils/dateMath/index.js +0 -1
- package/lib/utils/dateMath/index.js.map +1 -1
- package/lib/utils/dom.js +5 -6
- package/lib/utils/dom.js.map +1 -1
- package/lib/utils/focus.js +17 -19
- package/lib/utils/focus.js.map +1 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/usePopupPositioning.js +12 -16
- package/lib/utils/usePopupPositioning.js.map +1 -1
- package/lib-commonjs/Calendar.js +0 -3
- package/lib-commonjs/Calendar.js.map +1 -1
- package/lib-commonjs/CalendarDay.js +0 -3
- package/lib-commonjs/CalendarDay.js.map +1 -1
- package/lib-commonjs/CalendarDayGrid.js +0 -3
- package/lib-commonjs/CalendarDayGrid.js.map +1 -1
- package/lib-commonjs/CalendarMonth.js +0 -3
- package/lib-commonjs/CalendarMonth.js.map +1 -1
- package/lib-commonjs/CalendarPicker.js +0 -3
- package/lib-commonjs/CalendarPicker.js.map +1 -1
- package/lib-commonjs/CalendarYear.js +0 -3
- package/lib-commonjs/CalendarYear.js.map +1 -1
- package/lib-commonjs/DatePicker.js +0 -3
- package/lib-commonjs/DatePicker.js.map +1 -1
- package/lib-commonjs/components/Calendar/Calendar.js +1 -3
- package/lib-commonjs/components/Calendar/Calendar.js.map +1 -1
- package/lib-commonjs/components/Calendar/Calendar.types.js +5 -7
- package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -1
- package/lib-commonjs/components/Calendar/defaults.js +1 -3
- package/lib-commonjs/components/Calendar/defaults.js.map +1 -1
- package/lib-commonjs/components/Calendar/index.js +0 -3
- package/lib-commonjs/components/Calendar/index.js.map +1 -1
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js +0 -2
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/CalendarDay.js +1 -3
- package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js +0 -3
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/index.js +0 -3
- package/lib-commonjs/components/CalendarDay/index.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js +0 -2
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js +7 -9
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js +0 -3
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +1 -3
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js +1 -3
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js +1 -3
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/index.js +0 -3
- package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +0 -2
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js +0 -2
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js +9 -11
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js +1 -3
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js +0 -3
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/index.js +0 -3
- package/lib-commonjs/components/CalendarMonth/index.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js +1 -3
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js +0 -3
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/index.js +0 -3
- package/lib-commonjs/components/CalendarPicker/index.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js +0 -2
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/CalendarYear.js +1 -3
- package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js +0 -3
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/index.js +0 -3
- package/lib-commonjs/components/CalendarYear/index.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js +0 -2
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DatePicker/DatePicker.js +1 -3
- package/lib-commonjs/components/DatePicker/DatePicker.js.map +1 -1
- package/lib-commonjs/components/DatePicker/DatePicker.types.js +0 -3
- package/lib-commonjs/components/DatePicker/DatePicker.types.js.map +1 -1
- package/lib-commonjs/components/DatePicker/defaults.js +1 -3
- package/lib-commonjs/components/DatePicker/defaults.js.map +1 -1
- package/lib-commonjs/components/DatePicker/index.js +0 -3
- package/lib-commonjs/components/DatePicker/index.js.map +1 -1
- package/lib-commonjs/components/DatePicker/renderDatePicker.js +1 -3
- package/lib-commonjs/components/DatePicker/renderDatePicker.js.map +1 -1
- package/lib-commonjs/components/DatePicker/useDatePicker.js +14 -17
- package/lib-commonjs/components/DatePicker/useDatePicker.js.map +1 -1
- package/lib-commonjs/components/DatePicker/useDatePickerStyles.styles.js +0 -2
- package/lib-commonjs/components/DatePicker/useDatePickerStyles.styles.js.map +1 -1
- package/lib-commonjs/index.js +0 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/animations.js +4 -6
- package/lib-commonjs/utils/animations.js.map +1 -1
- package/lib-commonjs/utils/constants.js +7 -9
- package/lib-commonjs/utils/constants.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js +1 -3
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js +0 -3
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/index.js +0 -3
- package/lib-commonjs/utils/dateFormatting/index.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js +0 -3
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js +1 -3
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js +1 -3
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js +1 -3
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getDayGrid.js +1 -3
- package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/index.js +0 -3
- package/lib-commonjs/utils/dateGrid/index.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js +1 -3
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js +1 -3
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isContiguous.js +1 -3
- package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js +1 -3
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -1
- package/lib-commonjs/utils/dateMath/dateMath.js +1 -3
- package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -1
- package/lib-commonjs/utils/dateMath/index.js +0 -3
- package/lib-commonjs/utils/dateMath/index.js.map +1 -1
- package/lib-commonjs/utils/dom.js +1 -3
- package/lib-commonjs/utils/dom.js.map +1 -1
- package/lib-commonjs/utils/focus.js +1 -3
- package/lib-commonjs/utils/focus.js.map +1 -1
- package/lib-commonjs/utils/index.js +0 -3
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/usePopupPositioning.js +1 -3
- package/lib-commonjs/utils/usePopupPositioning.js.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './CalendarDayGrid';\nexport * from './CalendarDayGrid.types';\nexport * from './useCalendarDayGridStyles.styles';\nexport { calendarDayGridClassNames, extraCalendarDayGridClassNames } from './useCalendarDayGridStyles.styles';\nexport type { WeekCorners } from './useWeekCornerStyles.styles';\n"],"names":["calendarDayGridClassNames","extraCalendarDayGridClassNames"],"mappings":"AAAA,cAAc,oBAAoB;AAClC,cAAc,0BAA0B;AACxC,cAAc,oCAAoC;AAClD,SAASA,yBAAyB,EAAEC,8BAA8B,QAAQ,oCAAoC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["tokens","__styles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","FADE_OUT","SLIDE_DOWN_IN20","SLIDE_DOWN_OUT20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","SLIDE_UP_OUT20","TRANSITION_ROW_DISAPPEARANCE","AnimationDirection","weekCornersClassNames","calendarDayGridClassNames","wrapper","table","dayCell","daySelected","weekRow","weekDayLabelCell","weekNumberCell","dayOutsideBounds","dayOutsideNavigatedMonth","dayButton","dayIsToday","firstTransitionWeek","lastTransitionWeek","dayMarker","extraCalendarDayGridClassNames","hoverStyle","pressedStyle","useWrapperStyles","base","Byoj8tv","d","useTableStyles","po53p8","Bxjg3zr","Be2twd7","B6of3ja","qhf8xq","B73mfa3","fsow6f","a9b677","showWeekNumbers","useDayCellStyles","sj55zd","Bceei9c","Bhrd7zp","Bqenvij","Bg96gwp","t21cq0","jrapky","Frg6f3","z8tnut","z189sj","uwmqm3","Bsw6fvg","Bbusuzp","cvlxnx","Bweudez","hzfqlu","Bb91d7d","dua3dm","z1p9vi","Bsnevi5","xnb59o","Bj67fi1","B2gfgcj","B6cqqer","fpurfy","Fioj4w","Bq9yiu4","cpbo2x","Bq268z6","m","useDaySelectedStyles","De3pzq","Bjwas2f","Bn1d65q","Bxeuatn","n51gp8","ycbfsm","a3nq4f","Bnf3alp","H2c3sd","qu8ld","Bg4iunc","h","useWeekRowStyles","vin17d","Bf5fcs","Ezkn3b","horizontalBackward","Bv12yb3","horizontalForward","verticalBackward","verticalForward","k","useWeekDayLabelCellStyles","useWeekNumberCellStyles","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bekrc4i","vrafjx","B7ck84d","useDayOutsideBoundsStyles","x734em","B0ssf13","B8h8h5z","useDayOutsideNavigatedMonthStyles","lightenDaysOutsideNavigatedMonth","useDayButtonStyles","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","icvyot","oivjwe","wvpqe5","B68tc82","Bmxbyg5","Bx0yju7","l98f4w","useDayIsTodayStyles","jxbfoe","useFirstTransitionWeekStyles","abs64n","useLastTransitionWeekStyles","useDayMarkerStyles","B5kzvoi","oyh7mz","j35jbq","useCornerBorderAndRadiusStyles","corners","Cy64m2","Bnn43bw","feanbc","B4268ip","useCalendarDayGridStyles_unstable","props","wrapperStyles","tableStyles","dayCellStyles","daySelectedStyles","weekRowStyles","weekDayLabelCellStyles","weekNumberCellStyles","dayOutsideBoundsStyles","dayOutsideNavigatedMonthStyles","dayButtonStyles","dayIsTodayStyles","firstTransitionWeekStyles","lastTransitionWeekStyles","dayMarkerStyles","cornerBorderAndRadiusStyles","animateBackwards","animationDirection","undefined","Horizontal"],"sources":["../../../src/components/CalendarDayGrid/useCalendarDayGridStyles.styles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport {\n DURATION_2,\n DURATION_3,\n EASING_FUNCTION_1,\n EASING_FUNCTION_2,\n FADE_IN,\n FADE_OUT,\n SLIDE_DOWN_IN20,\n SLIDE_DOWN_OUT20,\n SLIDE_LEFT_IN20,\n SLIDE_RIGHT_IN20,\n SLIDE_UP_IN20,\n SLIDE_UP_OUT20,\n TRANSITION_ROW_DISAPPEARANCE,\n} from '../../utils';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport { weekCornersClassNames } from './useWeekCornerStyles.styles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CalendarDayGridStyles, CalendarDayGridStyleProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport const calendarDayGridClassNames: SlotClassNames<CalendarDayGridStyles> = {\n wrapper: 'fui-CalendarDayGrid__wrapper',\n table: 'fui-CalendarDayGrid__table',\n dayCell: 'fui-CalendarDayGrid__dayCell',\n daySelected: 'fui-CalendarDayGrid__daySelected',\n weekRow: 'fui-CalendarDayGrid__weekRow',\n weekDayLabelCell: 'fui-CalendarDayGrid__weekDayLabelCell',\n weekNumberCell: 'fui-CalendarDayGrid__weekNumberCell',\n dayOutsideBounds: 'fui-CalendarDayGrid__dayOutsideBounds',\n dayOutsideNavigatedMonth: 'fui-CalendarDayGrid__dayOutsideNavigatedMonth',\n dayButton: 'fui-CalendarDayGrid__dayButton',\n dayIsToday: 'fui-CalendarDayGrid__dayIsToday',\n firstTransitionWeek: 'fui-CalendarDayGrid__firstTransitionWeek',\n lastTransitionWeek: 'fui-CalendarDayGrid__lastTransitionWeek',\n dayMarker: 'fui-CalendarDayGrid__dayMarker',\n};\n\n/**\n * @internal\n */\nexport const extraCalendarDayGridClassNames = {\n hoverStyle: 'fui-CalendarDayGrid__hoverStyle',\n pressedStyle: 'fui-CalendarDayGrid__pressedStyle',\n};\n\nconst useWrapperStyles = makeStyles({\n base: {\n paddingBottom: '10px',\n },\n});\n\nconst useTableStyles = makeStyles({\n base: {\n borderCollapse: 'collapse',\n borderSpacing: 0,\n fontSize: 'inherit',\n marginTop: '4px',\n paddingBottom: '10px',\n position: 'relative',\n tableLayout: 'fixed',\n textAlign: 'center',\n width: '196px',\n },\n showWeekNumbers: {\n width: '226px',\n },\n});\n\nconst useDayCellStyles = makeStyles({\n base: {\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n height: '28px',\n lineHeight: '28px',\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n position: 'relative',\n width: '28px',\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n },\n\n [`&.${extraCalendarDayGridClassNames.hoverStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n ...shorthands.outline('1px', 'solid', 'Highlight'),\n zIndex: 3,\n },\n },\n\n [`&.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n ...shorthands.borderColor('Highlight'),\n color: 'Highlight',\n },\n },\n },\n});\n\nconst useDaySelectedStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Highlight'),\n color: 'HighlightText',\n forcedColorAdjust: 'none',\n },\n\n [`&:hover, &.${extraCalendarDayGridClassNames.hoverStyle}, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n },\n },\n },\n});\n\nconst useWeekRowStyles = makeStyles({\n base: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationTimingFunction: EASING_FUNCTION_1,\n },\n horizontalBackward: {\n animationName: [FADE_IN, SLIDE_RIGHT_IN20],\n },\n horizontalForward: {\n animationName: [FADE_IN, SLIDE_LEFT_IN20],\n },\n verticalBackward: {\n animationName: [FADE_IN, SLIDE_DOWN_IN20],\n },\n verticalForward: {\n animationName: [FADE_IN, SLIDE_UP_IN20],\n },\n});\n\nconst useWeekDayLabelCellStyles = makeStyles({\n base: {\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2,\n },\n});\n\nconst useWeekNumberCellStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n ...shorthands.borderRight('1px', 'solid'),\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground4,\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n height: '28px',\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n width: '28px',\n },\n});\n\nconst useDayOutsideBoundsStyles = makeStyles({\n base: {\n [`&, &:disabled, & button, &.${extraCalendarDayGridClassNames.hoverStyle}` +\n `, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none',\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\nconst useDayOutsideNavigatedMonthStyles = makeStyles({\n lightenDaysOutsideNavigatedMonth: {\n color: tokens.colorNeutralForeground4,\n fontWeight: tokens.fontWeightRegular,\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\nconst useDayButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderRadius('2px'),\n ...shorthands.borderStyle('none'),\n color: 'inherit',\n cursor: 'pointer',\n fontSize: tokens.fontSizeBase200,\n fontWeight: 'inherit',\n height: '24px',\n lineHeight: '24px',\n ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n width: '24px',\n\n '&span': {\n height: 'inherit',\n lineHeight: 'inherit',\n },\n },\n});\n\nconst useDayIsTodayStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandBackground,\n ...shorthands.borderRadius('100%'),\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n ...shorthands.borderColor('WindowText'),\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n },\n },\n },\n});\n\nconst useFirstTransitionWeekStyles = makeStyles({\n base: {\n height: 0,\n opacity: 0,\n ...shorthands.overflow('hidden'),\n position: 'absolute',\n width: 0,\n },\n verticalForward: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationName: [FADE_OUT, SLIDE_UP_OUT20, TRANSITION_ROW_DISAPPEARANCE],\n animationTimingFunction: EASING_FUNCTION_1,\n },\n});\n\nconst useLastTransitionWeekStyles = makeStyles({\n base: {\n height: 0,\n marginTop: '-28px',\n opacity: 0,\n ...shorthands.overflow('hidden'),\n position: 'absolute',\n width: 0,\n },\n verticalBackward: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationName: [FADE_OUT, SLIDE_DOWN_OUT20, TRANSITION_ROW_DISAPPEARANCE],\n animationTimingFunction: EASING_FUNCTION_1,\n },\n});\n\nconst useDayMarkerStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandForeground2,\n ...shorthands.borderRadius('100%'),\n bottom: '1px',\n height: '4px',\n left: 0,\n ...shorthands.margin('auto'),\n position: 'absolute',\n right: 0,\n width: '4px',\n\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n forcedColorAdjust: 'none',\n },\n },\n});\n\nconst useCornerBorderAndRadiusStyles = makeStyles({\n corners: {\n [`&.${weekCornersClassNames.topRightCornerDate}`]: {\n borderTopRightRadius: '2px',\n },\n [`&.${weekCornersClassNames.topLeftCornerDate}`]: {\n borderTopLeftRadius: '2px',\n },\n [`&.${weekCornersClassNames.bottomRightCornerDate}`]: {\n borderBottomRightRadius: '2px',\n },\n [`&.${weekCornersClassNames.bottomLeftCornerDate}`]: {\n borderBottomLeftRadius: '2px',\n },\n },\n});\n\n/**\n * @internal\n *\n * Apply styling to the CalendarDayGrid slots based on the state\n */\nexport const useCalendarDayGridStyles_unstable = (props: CalendarDayGridStyleProps): CalendarDayGridStyles => {\n const wrapperStyles = useWrapperStyles();\n const tableStyles = useTableStyles();\n const dayCellStyles = useDayCellStyles();\n const daySelectedStyles = useDaySelectedStyles();\n const weekRowStyles = useWeekRowStyles();\n const weekDayLabelCellStyles = useWeekDayLabelCellStyles();\n const weekNumberCellStyles = useWeekNumberCellStyles();\n const dayOutsideBoundsStyles = useDayOutsideBoundsStyles();\n const dayOutsideNavigatedMonthStyles = useDayOutsideNavigatedMonthStyles();\n const dayButtonStyles = useDayButtonStyles();\n const dayIsTodayStyles = useDayIsTodayStyles();\n const firstTransitionWeekStyles = useFirstTransitionWeekStyles();\n const lastTransitionWeekStyles = useLastTransitionWeekStyles();\n const dayMarkerStyles = useDayMarkerStyles();\n const cornerBorderAndRadiusStyles = useCornerBorderAndRadiusStyles();\n\n const { animateBackwards, animationDirection, lightenDaysOutsideNavigatedMonth, showWeekNumbers } = props;\n\n return {\n wrapper: mergeClasses(calendarDayGridClassNames.wrapper, wrapperStyles.base),\n table: mergeClasses(\n calendarDayGridClassNames.table,\n tableStyles.base,\n showWeekNumbers && tableStyles.showWeekNumbers,\n ),\n dayCell: mergeClasses(calendarDayGridClassNames.dayCell, dayCellStyles.base, cornerBorderAndRadiusStyles.corners),\n daySelected: mergeClasses(calendarDayGridClassNames.daySelected, daySelectedStyles.base),\n weekRow: mergeClasses(\n calendarDayGridClassNames.weekRow,\n animateBackwards !== undefined && weekRowStyles.base,\n animateBackwards !== undefined &&\n (animationDirection === AnimationDirection.Horizontal\n ? animateBackwards\n ? weekRowStyles.horizontalBackward\n : weekRowStyles.horizontalForward\n : animateBackwards\n ? weekRowStyles.verticalBackward\n : weekRowStyles.verticalForward),\n ),\n weekDayLabelCell: mergeClasses(calendarDayGridClassNames.weekDayLabelCell, weekDayLabelCellStyles.base),\n weekNumberCell: mergeClasses(calendarDayGridClassNames.weekNumberCell, weekNumberCellStyles.base),\n dayOutsideBounds: mergeClasses(calendarDayGridClassNames.dayOutsideBounds, dayOutsideBoundsStyles.base),\n dayOutsideNavigatedMonth: mergeClasses(\n calendarDayGridClassNames.dayOutsideNavigatedMonth,\n lightenDaysOutsideNavigatedMonth && dayOutsideNavigatedMonthStyles.lightenDaysOutsideNavigatedMonth,\n ),\n dayButton: mergeClasses(calendarDayGridClassNames.dayButton, dayButtonStyles.base),\n dayIsToday: mergeClasses(calendarDayGridClassNames.dayIsToday, dayIsTodayStyles.base),\n firstTransitionWeek: mergeClasses(\n calendarDayGridClassNames.firstTransitionWeek,\n firstTransitionWeekStyles.base,\n animateBackwards !== undefined &&\n animationDirection !== AnimationDirection.Horizontal &&\n !animateBackwards &&\n firstTransitionWeekStyles.verticalForward,\n ),\n lastTransitionWeek: mergeClasses(\n calendarDayGridClassNames.lastTransitionWeek,\n lastTransitionWeekStyles.base,\n animateBackwards !== undefined &&\n animationDirection !== AnimationDirection.Horizontal &&\n animateBackwards &&\n lastTransitionWeekStyles.verticalBackward,\n ),\n dayMarker: mergeClasses(calendarDayGridClassNames.dayMarker, dayMarkerStyles.base),\n };\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ;AACvB,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AACrD,SACEC,UAAU,EACVC,UAAU,EACVC,iBAAiB,EACjBC,iBAAiB,EACjBC,OAAO,EACPC,QAAQ,EACRC,eAAe,EACfC,gBAAgB,EAChBC,eAAe,EACfC,gBAAgB,EAChBC,aAAa,EACbC,cAAc,EACdC,4BAA4B,QACvB;AACP,SAASC,kBAAkB,QAAQ;AACnC,SAASC,qBAAqB,QAAQ;AAItC;;;AAGA,OAAO,MAAMC,yBAAA,GAAmE;EAC9EC,OAAA,EAAS;EACTC,KAAA,EAA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,UAAU,IACpD,CAACH,gBAAA,IACDJ,yBAAA,CAA0BzD,eAAe;IAE7CvE,kBAAA,EAAoB9B,YAAA,CAClBiB,yBAAA,CAA0Ba,kBAAkB,EAC5CiI,wBAAA,CAAyB3H,IAAI,EAC7B8H,gBAAA,KAAqBE,SAAA,IACnBD,kBAAA,KAAuBpJ,kBAAA,CAAmBsJ,UAAU,IACpDH,gBAAA,IACAH,wBAAA,CAAyB3D,gBAAgB;IAE7CrE,SAAA,EAAW/B,YAAA,CAAaiB,yBAAA,CAA0Bc,SAAS,EAAEiI,eAAA,CAAgB5H,IAAI;EACnF;AACF"}
|
|
1
|
+
{"version":3,"names":["tokens","__styles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","FADE_OUT","SLIDE_DOWN_IN20","SLIDE_DOWN_OUT20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","SLIDE_UP_OUT20","TRANSITION_ROW_DISAPPEARANCE","AnimationDirection","weekCornersClassNames","calendarDayGridClassNames","wrapper","table","dayCell","daySelected","weekRow","weekDayLabelCell","weekNumberCell","dayOutsideBounds","dayOutsideNavigatedMonth","dayButton","dayIsToday","firstTransitionWeek","lastTransitionWeek","dayMarker","extraCalendarDayGridClassNames","hoverStyle","pressedStyle","useWrapperStyles","base","Byoj8tv","d","useTableStyles","po53p8","Bxjg3zr","Be2twd7","B6of3ja","qhf8xq","B73mfa3","fsow6f","a9b677","showWeekNumbers","useDayCellStyles","sj55zd","Bceei9c","Bhrd7zp","Bqenvij","Bg96gwp","t21cq0","jrapky","Frg6f3","z8tnut","z189sj","uwmqm3","Bsw6fvg","Bbusuzp","cvlxnx","Bweudez","hzfqlu","Bb91d7d","dua3dm","z1p9vi","Bsnevi5","xnb59o","Bj67fi1","B2gfgcj","B6cqqer","fpurfy","Fioj4w","Bq9yiu4","cpbo2x","Bq268z6","m","useDaySelectedStyles","De3pzq","Bjwas2f","Bn1d65q","Bxeuatn","n51gp8","ycbfsm","a3nq4f","Bnf3alp","H2c3sd","qu8ld","Bg4iunc","h","useWeekRowStyles","vin17d","Bf5fcs","Ezkn3b","horizontalBackward","Bv12yb3","horizontalForward","verticalBackward","verticalForward","k","useWeekDayLabelCellStyles","useWeekNumberCellStyles","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bekrc4i","vrafjx","B7ck84d","useDayOutsideBoundsStyles","x734em","B0ssf13","B8h8h5z","useDayOutsideNavigatedMonthStyles","lightenDaysOutsideNavigatedMonth","useDayButtonStyles","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","icvyot","oivjwe","wvpqe5","B68tc82","Bmxbyg5","Bx0yju7","l98f4w","useDayIsTodayStyles","jxbfoe","useFirstTransitionWeekStyles","abs64n","useLastTransitionWeekStyles","useDayMarkerStyles","B5kzvoi","oyh7mz","j35jbq","useCornerBorderAndRadiusStyles","corners","Cy64m2","Bnn43bw","feanbc","B4268ip","useCalendarDayGridStyles_unstable","props","wrapperStyles","tableStyles","dayCellStyles","daySelectedStyles","weekRowStyles","weekDayLabelCellStyles","weekNumberCellStyles","dayOutsideBoundsStyles","dayOutsideNavigatedMonthStyles","dayButtonStyles","dayIsTodayStyles","firstTransitionWeekStyles","lastTransitionWeekStyles","dayMarkerStyles","cornerBorderAndRadiusStyles","animateBackwards","animationDirection","undefined","Horizontal"],"sources":["useCalendarDayGridStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { DURATION_2, DURATION_3, EASING_FUNCTION_1, EASING_FUNCTION_2, FADE_IN, FADE_OUT, SLIDE_DOWN_IN20, SLIDE_DOWN_OUT20, SLIDE_LEFT_IN20, SLIDE_RIGHT_IN20, SLIDE_UP_IN20, SLIDE_UP_OUT20, TRANSITION_ROW_DISAPPEARANCE } from '../../utils';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport { weekCornersClassNames } from './useWeekCornerStyles.styles';\n/**\n * @internal\n */ export const calendarDayGridClassNames = {\n wrapper: 'fui-CalendarDayGrid__wrapper',\n table: 'fui-CalendarDayGrid__table',\n dayCell: 'fui-CalendarDayGrid__dayCell',\n daySelected: 'fui-CalendarDayGrid__daySelected',\n weekRow: 'fui-CalendarDayGrid__weekRow',\n weekDayLabelCell: 'fui-CalendarDayGrid__weekDayLabelCell',\n weekNumberCell: 'fui-CalendarDayGrid__weekNumberCell',\n dayOutsideBounds: 'fui-CalendarDayGrid__dayOutsideBounds',\n dayOutsideNavigatedMonth: 'fui-CalendarDayGrid__dayOutsideNavigatedMonth',\n dayButton: 'fui-CalendarDayGrid__dayButton',\n dayIsToday: 'fui-CalendarDayGrid__dayIsToday',\n firstTransitionWeek: 'fui-CalendarDayGrid__firstTransitionWeek',\n lastTransitionWeek: 'fui-CalendarDayGrid__lastTransitionWeek',\n dayMarker: 'fui-CalendarDayGrid__dayMarker'\n};\n/**\n * @internal\n */ export const extraCalendarDayGridClassNames = {\n hoverStyle: 'fui-CalendarDayGrid__hoverStyle',\n pressedStyle: 'fui-CalendarDayGrid__pressedStyle'\n};\nconst useWrapperStyles = makeStyles({\n base: {\n paddingBottom: '10px'\n }\n});\nconst useTableStyles = makeStyles({\n base: {\n borderCollapse: 'collapse',\n borderSpacing: 0,\n fontSize: 'inherit',\n marginTop: '4px',\n paddingBottom: '10px',\n position: 'relative',\n tableLayout: 'fixed',\n textAlign: 'center',\n width: '196px'\n },\n showWeekNumbers: {\n width: '226px'\n }\n});\nconst useDayCellStyles = makeStyles({\n base: {\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n height: '28px',\n lineHeight: '28px',\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n position: 'relative',\n width: '28px',\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText'\n },\n [`&.${extraCalendarDayGridClassNames.hoverStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n ...shorthands.outline('1px', 'solid', 'Highlight'),\n zIndex: 3\n }\n },\n [`&.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n ...shorthands.borderColor('Highlight'),\n color: 'Highlight'\n }\n }\n }\n});\nconst useDaySelectedStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Highlight'),\n color: 'HighlightText',\n forcedColorAdjust: 'none'\n },\n [`&:hover, &.${extraCalendarDayGridClassNames.hoverStyle}, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText'\n }\n },\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n '@media (forced-colors: active)': {\n backgroundColor: 'Window'\n }\n }\n }\n});\nconst useWeekRowStyles = makeStyles({\n base: {\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 useWeekDayLabelCellStyles = makeStyles({\n base: {\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2\n }\n});\nconst useWeekNumberCellStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n ...shorthands.borderRight('1px', 'solid'),\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground4,\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n height: '28px',\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n width: '28px'\n }\n});\nconst useDayOutsideBoundsStyles = makeStyles({\n base: {\n [`&, &:disabled, & button, &.${extraCalendarDayGridClassNames.hoverStyle}` + `, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none'\n },\n '@media (forced-colors: active)': {\n color: 'GrayText'\n }\n }\n});\nconst useDayOutsideNavigatedMonthStyles = makeStyles({\n lightenDaysOutsideNavigatedMonth: {\n color: tokens.colorNeutralForeground4,\n fontWeight: tokens.fontWeightRegular,\n '@media (forced-colors: active)': {\n color: 'GrayText'\n }\n }\n});\nconst useDayButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderRadius('2px'),\n ...shorthands.borderStyle('none'),\n color: 'inherit',\n cursor: 'pointer',\n fontSize: tokens.fontSizeBase200,\n fontWeight: 'inherit',\n height: '24px',\n lineHeight: '24px',\n ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n width: '24px',\n '&span': {\n height: 'inherit',\n lineHeight: 'inherit'\n }\n }\n});\nconst useDayIsTodayStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandBackground,\n ...shorthands.borderRadius('100%'),\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n ...shorthands.borderColor('WindowText'),\n color: 'Window',\n forcedColorAdjust: 'none'\n },\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window'\n }\n }\n }\n});\nconst useFirstTransitionWeekStyles = makeStyles({\n base: {\n height: 0,\n opacity: 0,\n ...shorthands.overflow('hidden'),\n position: 'absolute',\n width: 0\n },\n verticalForward: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationName: [\n FADE_OUT,\n SLIDE_UP_OUT20,\n TRANSITION_ROW_DISAPPEARANCE\n ],\n animationTimingFunction: EASING_FUNCTION_1\n }\n});\nconst useLastTransitionWeekStyles = makeStyles({\n base: {\n height: 0,\n marginTop: '-28px',\n opacity: 0,\n ...shorthands.overflow('hidden'),\n position: 'absolute',\n width: 0\n },\n verticalBackward: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationName: [\n FADE_OUT,\n SLIDE_DOWN_OUT20,\n TRANSITION_ROW_DISAPPEARANCE\n ],\n animationTimingFunction: EASING_FUNCTION_1\n }\n});\nconst useDayMarkerStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandForeground2,\n ...shorthands.borderRadius('100%'),\n bottom: '1px',\n height: '4px',\n left: 0,\n ...shorthands.margin('auto'),\n position: 'absolute',\n right: 0,\n width: '4px',\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n forcedColorAdjust: 'none'\n }\n }\n});\nconst useCornerBorderAndRadiusStyles = makeStyles({\n corners: {\n [`&.${weekCornersClassNames.topRightCornerDate}`]: {\n borderTopRightRadius: '2px'\n },\n [`&.${weekCornersClassNames.topLeftCornerDate}`]: {\n borderTopLeftRadius: '2px'\n },\n [`&.${weekCornersClassNames.bottomRightCornerDate}`]: {\n borderBottomRightRadius: '2px'\n },\n [`&.${weekCornersClassNames.bottomLeftCornerDate}`]: {\n borderBottomLeftRadius: '2px'\n }\n }\n});\n/**\n * @internal\n *\n * Apply styling to the CalendarDayGrid slots based on the state\n */ export const useCalendarDayGridStyles_unstable = (props)=>{\n const wrapperStyles = useWrapperStyles();\n const tableStyles = useTableStyles();\n const dayCellStyles = useDayCellStyles();\n const daySelectedStyles = useDaySelectedStyles();\n const weekRowStyles = useWeekRowStyles();\n const weekDayLabelCellStyles = useWeekDayLabelCellStyles();\n const weekNumberCellStyles = useWeekNumberCellStyles();\n const dayOutsideBoundsStyles = useDayOutsideBoundsStyles();\n const dayOutsideNavigatedMonthStyles = useDayOutsideNavigatedMonthStyles();\n const dayButtonStyles = useDayButtonStyles();\n const dayIsTodayStyles = useDayIsTodayStyles();\n const firstTransitionWeekStyles = useFirstTransitionWeekStyles();\n const lastTransitionWeekStyles = useLastTransitionWeekStyles();\n const dayMarkerStyles = useDayMarkerStyles();\n const cornerBorderAndRadiusStyles = useCornerBorderAndRadiusStyles();\n const { animateBackwards , animationDirection , lightenDaysOutsideNavigatedMonth , showWeekNumbers } = props;\n return {\n wrapper: mergeClasses(calendarDayGridClassNames.wrapper, wrapperStyles.base),\n table: mergeClasses(calendarDayGridClassNames.table, tableStyles.base, showWeekNumbers && tableStyles.showWeekNumbers),\n dayCell: mergeClasses(calendarDayGridClassNames.dayCell, dayCellStyles.base, cornerBorderAndRadiusStyles.corners),\n daySelected: mergeClasses(calendarDayGridClassNames.daySelected, daySelectedStyles.base),\n weekRow: mergeClasses(calendarDayGridClassNames.weekRow, animateBackwards !== undefined && weekRowStyles.base, animateBackwards !== undefined && (animationDirection === AnimationDirection.Horizontal ? animateBackwards ? weekRowStyles.horizontalBackward : weekRowStyles.horizontalForward : animateBackwards ? weekRowStyles.verticalBackward : weekRowStyles.verticalForward)),\n weekDayLabelCell: mergeClasses(calendarDayGridClassNames.weekDayLabelCell, weekDayLabelCellStyles.base),\n weekNumberCell: mergeClasses(calendarDayGridClassNames.weekNumberCell, weekNumberCellStyles.base),\n dayOutsideBounds: mergeClasses(calendarDayGridClassNames.dayOutsideBounds, dayOutsideBoundsStyles.base),\n dayOutsideNavigatedMonth: mergeClasses(calendarDayGridClassNames.dayOutsideNavigatedMonth, lightenDaysOutsideNavigatedMonth && dayOutsideNavigatedMonthStyles.lightenDaysOutsideNavigatedMonth),\n dayButton: mergeClasses(calendarDayGridClassNames.dayButton, dayButtonStyles.base),\n dayIsToday: mergeClasses(calendarDayGridClassNames.dayIsToday, dayIsTodayStyles.base),\n firstTransitionWeek: mergeClasses(calendarDayGridClassNames.firstTransitionWeek, firstTransitionWeekStyles.base, animateBackwards !== undefined && animationDirection !== AnimationDirection.Horizontal && !animateBackwards && firstTransitionWeekStyles.verticalForward),\n lastTransitionWeek: mergeClasses(calendarDayGridClassNames.lastTransitionWeek, lastTransitionWeekStyles.base, animateBackwards !== undefined && animationDirection !== AnimationDirection.Horizontal && animateBackwards && lastTransitionWeekStyles.verticalBackward),\n dayMarker: mergeClasses(calendarDayGridClassNames.dayMarker, dayMarkerStyles.base)\n };\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,UAAU,EAAEC,UAAU,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,eAAe,EAAEC,gBAAgB,EAAEC,eAAe,EAAEC,gBAAgB,EAAEC,aAAa,EAAEC,cAAc,EAAEC,4BAA4B,QAAQ,aAAa;AAChP,SAASC,kBAAkB,QAAQ,4BAA4B;AAC/D,SAASC,qBAAqB,QAAQ,8BAA8B;AACpE;AACA;AACA;AAAI,OAAO,MAAMC,yBAAyB,GAAG;EACzCC,OAAO,EAAE,8BAA8B;EACvCC,KAAK,EAAE,4BAA4B;EACnCC,OAAO,EAAE,8BAA8B;EACvCC,WAAW,EAAE,kCAAkC;EAC/CC,OAAO,EAAE,8BAA8B;EACvCC,gBAAgB,EAAE,uCAAuC;EACzDC,cAAc,EAAE,qCAAqC;EACrDC,gBAAgB,EAAE,uCAAuC;EACzDC,wBAAwB,EAAE,+CAA+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,YAAY,CAACiB,yBAAyB,CAACW,UAAU,EAAEiI,gBAAgB,CAACzH,IAAI,CAAC;IACrFP,mBAAmB,EAAE7B,YAAY,CAACiB,yBAAyB,CAACY,mBAAmB,EAAEiI,yBAAyB,CAAC1H,IAAI,EAAE8H,gBAAgB,KAAKE,SAAS,IAAID,kBAAkB,KAAKpJ,kBAAkB,CAACsJ,UAAU,IAAI,CAACH,gBAAgB,IAAIJ,yBAAyB,CAACzD,eAAe,CAAC;IAC1QvE,kBAAkB,EAAE9B,YAAY,CAACiB,yBAAyB,CAACa,kBAAkB,EAAEiI,wBAAwB,CAAC3H,IAAI,EAAE8H,gBAAgB,KAAKE,SAAS,IAAID,kBAAkB,KAAKpJ,kBAAkB,CAACsJ,UAAU,IAAIH,gBAAgB,IAAIH,wBAAwB,CAAC3D,gBAAgB,CAAC;IACtQrE,SAAS,EAAE/B,YAAY,CAACiB,yBAAyB,CAACc,SAAS,EAAEiI,eAAe,CAAC5H,IAAI;EACrF,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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"],"sources":["
|
|
1
|
+
{"version":3,"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"],"sources":["useWeekCornerStyles.styles.js"],"sourcesContent":["import { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { mergeClasses } from '@griffel/react';\nimport { DateRangeType } from '../../utils/constants';\nimport { getDateRangeArray } from '../../utils/index';\n/**\n * @internal\n */ export const weekCornersClassNames = {\n topRightCornerDate: 'fui-CalendarDayGrid__topRightCornerDate',\n topLeftCornerDate: 'fui-CalendarDayGrid__topLeftCornerDate',\n bottomRightCornerDate: 'fui-CalendarDayGrid__bottomRightCornerDate',\n bottomLeftCornerDate: 'fui-CalendarDayGrid__bottomLeftCornerDate'\n};\n/**\n * @internal\n */ export function useWeekCornerStyles(props) {\n const { dir } = useFluent_unstable();\n /**\n *\n * Section for setting the rounded corner styles on individual day cells. Individual day cells need different\n * corners to be rounded depending on which date range type and where the cell is located in the current grid.\n * If we just round all of the corners, there isn't a good overlap and we get gaps between contiguous day boxes\n * in Edge browser.\n *\n */ const getWeekCornerStyles = (initialWeeks)=>{\n const weekCornersStyled = {};\n /* need to handle setting all of the corners on arbitrarily shaped blobs\n __\n __|A |\n |B |C |__\n |D |E |F |\n\n in this case, A needs top left rounded, top right rounded\n B needs top left rounded\n C doesn't need any rounding\n D needs bottom left rounded\n E doesn't need any rounding\n F needs top right rounding\n */ // cut off the animation transition weeks\n const weeks = initialWeeks.slice(1, initialWeeks.length - 1);\n // if there's an item above, lose both top corners. Item below, lose both bottom corners, etc.\n weeks.forEach((week, weekIndex)=>{\n week.forEach((day, dayIndex)=>{\n const above = weeks[weekIndex - 1] && weeks[weekIndex - 1][dayIndex] && isInSameHoverRange(weeks[weekIndex - 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex - 1][dayIndex].isSelected, day.isSelected);\n const below = weeks[weekIndex + 1] && weeks[weekIndex + 1][dayIndex] && isInSameHoverRange(weeks[weekIndex + 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex + 1][dayIndex].isSelected, day.isSelected);\n const left = weeks[weekIndex][dayIndex - 1] && isInSameHoverRange(weeks[weekIndex][dayIndex - 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex - 1].isSelected, day.isSelected);\n const right = weeks[weekIndex][dayIndex + 1] && isInSameHoverRange(weeks[weekIndex][dayIndex + 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex + 1].isSelected, day.isSelected);\n weekCornersStyled[weekIndex + '_' + dayIndex] = calculateRoundedStyles(above, below, left, right);\n });\n });\n return weekCornersStyled;\n };\n const calculateRoundedStyles = (above, below, left, right)=>{\n const style = [];\n const roundedTopLeft = !above && !left;\n const roundedTopRight = !above && !right;\n const roundedBottomLeft = !below && !left;\n const roundedBottomRight = !below && !right;\n if (roundedTopLeft) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topRightCornerDate : weekCornersClassNames.topLeftCornerDate);\n }\n if (roundedTopRight) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topLeftCornerDate : weekCornersClassNames.topRightCornerDate);\n }\n if (roundedBottomLeft) {\n style.push(dir === 'rtl' ? weekCornersClassNames.bottomRightCornerDate : weekCornersClassNames.bottomLeftCornerDate);\n }\n if (roundedBottomRight) {\n style.push(dir === 'rtl' ? weekCornersClassNames.bottomLeftCornerDate : weekCornersClassNames.bottomRightCornerDate);\n }\n return mergeClasses(...style);\n };\n const isInSameHoverRange = (date1, date2, date1Selected, date2Selected)=>{\n const { dateRangeType , firstDayOfWeek , workWeekDays } = props;\n // The hover state looks weird with non-contiguous days in work week view. In work week, show week hover state\n const dateRangeHoverType = dateRangeType === DateRangeType.WorkWeek ? DateRangeType.Week : dateRangeType;\n // we do not pass daysToSelectInDayView because we handle setting those styles dyanamically in onMouseOver\n const dateRange = getDateRangeArray(date1, dateRangeHoverType, firstDayOfWeek, workWeekDays);\n if (date1Selected !== date2Selected) {\n // if one is selected and the other is not, they can't be in the same range\n return false;\n } else if (date1Selected && date2Selected) {\n // if they're both selected at the same time they must be in the same range\n return true;\n }\n // otherwise, both must be unselected, so check the dateRange\n return dateRange.filter((date)=>date.getTime() === date2.getTime()).length > 0;\n };\n return [\n getWeekCornerStyles,\n calculateRoundedStyles\n ];\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,iCAAiC;AACpE,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,iBAAiB,QAAQ,mBAAmB;AACrD;AACA;AACA;AAAI,OAAO,MAAMC,qBAAqB,GAAG;EACrCC,kBAAkB,EAAE,yCAAyC;EAC7DC,iBAAiB,EAAE,wCAAwC;EAC3DC,qBAAqB,EAAE,4CAA4C;EACnEC,oBAAoB,EAAE;AAC1B,CAAC;AACD;AACA;AACA;AAAI,OAAO,SAASC,mBAAmBA,CAACC,KAAK,EAAE;EAC3C,MAAM;IAAEC;EAAK,CAAC,GAAGX,kBAAkB,CAAC,CAAC;EACrC;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;EAAM,MAAMY,mBAAmB,GAAIC,YAAY,IAAG;IAC1C,MAAMC,iBAAiB,GAAG,CAAC,CAAC;IAC5B;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAXQ,CAYD;IACC,MAAMC,KAAK,GAAGF,YAAY,CAACG,KAAK,CAAC,CAAC,EAAEH,YAAY,CAACI,MAAM,GAAG,CAAC,CAAC;IAC5D;IACAF,KAAK,CAACG,OAAO,CAAC,CAACC,IAAI,EAAEC,SAAS,KAAG;MAC7BD,IAAI,CAACD,OAAO,CAAC,CAACG,GAAG,EAAEC,QAAQ,KAAG;QAC1B,MAAMC,KAAK,GAAGR,KAAK,CAACK,SAAS,GAAG,CAAC,CAAC,IAAIL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CAACa,KAAK,EAAEC,KAAK,EAAEC,aAAa,EAAEC,aAAa,KAAG;IACrE,MAAM;MAAEC,aAAa;MAAGC,cAAc;MAAGC;IAAc,CAAC,GAAGjC,KAAK;IAChE;IACA,MAAMkC,kBAAkB,GAAGH,aAAa,KAAKvC,aAAa,CAAC2C,QAAQ,GAAG3C,aAAa,CAAC4C,IAAI,GAAGL,aAAa;IACxG;IACA,MAAMM,SAAS,GAAG5C,iBAAiB,CAACkC,KAAK,EAAEO,kBAAkB,EAAEF,cAAc,EAAEC,YAAY,CAAC;IAC5F,IAAIJ,aAAa,KAAKC,aAAa,EAAE;MACjC;MACA,OAAO,KAAK;IAChB,CAAC,MAAM,IAAID,aAAa,IAAIC,aAAa,EAAE;MACvC;MACA,OAAO,IAAI;IACf;IACA;IACA,OAAOO,SAAS,CAACC,MAAM,CAAEC,IAAI,IAAGA,IAAI,CAACC,OAAO,CAAC,CAAC,KAAKZ,KAAK,CAACY,OAAO,CAAC,CAAC,CAAC,CAACjC,MAAM,GAAG,CAAC;EAClF,CAAC;EACD,OAAO,CACHL,mBAAmB,EACnBkB,sBAAsB,CACzB;AACL"}
|
|
@@ -2,46 +2,44 @@ import * as React from 'react';
|
|
|
2
2
|
import { compareDates, DAYS_IN_WEEK, getDayGrid } from '../../utils/index';
|
|
3
3
|
/**
|
|
4
4
|
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export function useWeeks(props, onSelectDate, getSetRefCallback) {
|
|
7
|
-
/**
|
|
8
|
-
* Initial parsing of the given props to generate IDayInfo two dimensional array, which contains a representation
|
|
9
|
-
* of every day in the grid. Convenient for helping with conversions between day refs and Date objects in callbacks.
|
|
10
|
-
*/
|
|
11
|
-
const weeks = React.useMemo(() => {
|
|
12
|
-
var _props_getMarkedDays;
|
|
13
|
-
const weeksGrid = getDayGrid(props);
|
|
14
|
-
const firstVisibleDay = weeksGrid[1][0].originalDate;
|
|
15
|
-
const lastVisibleDay = weeksGrid[weeksGrid.length - 1][6].originalDate;
|
|
16
|
-
const markedDays = ((_props_getMarkedDays = props.getMarkedDays) === null || _props_getMarkedDays === void 0 ? void 0 : _props_getMarkedDays.call(props, firstVisibleDay, lastVisibleDay)) || [];
|
|
5
|
+
*/ export function useWeeks(props, onSelectDate, getSetRefCallback) {
|
|
17
6
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
7
|
+
* Initial parsing of the given props to generate IDayInfo two dimensional array, which contains a representation
|
|
8
|
+
* of every day in the grid. Convenient for helping with conversions between day refs and Date objects in callbacks.
|
|
9
|
+
*/ const weeks = React.useMemo(()=>{
|
|
10
|
+
var _props_getMarkedDays;
|
|
11
|
+
const weeksGrid = getDayGrid(props);
|
|
12
|
+
const firstVisibleDay = weeksGrid[1][0].originalDate;
|
|
13
|
+
const lastVisibleDay = weeksGrid[weeksGrid.length - 1][6].originalDate;
|
|
14
|
+
const markedDays = ((_props_getMarkedDays = props.getMarkedDays) === null || _props_getMarkedDays === void 0 ? void 0 : _props_getMarkedDays.call(props, firstVisibleDay, lastVisibleDay)) || [];
|
|
15
|
+
/**
|
|
16
|
+
* Weeks is a 2D array. Weeks[0] contains the last week of the prior range,
|
|
17
|
+
* Weeks[weeks.length - 1] contains first week of next range. These are for transition states.
|
|
18
|
+
*
|
|
19
|
+
* Weeks[1... weeks.length - 2] contains the actual visible data
|
|
20
|
+
*/ const returnValue = [];
|
|
21
|
+
for(let weekIndex = 0; weekIndex < weeksGrid.length; weekIndex++){
|
|
22
|
+
const week = [];
|
|
23
|
+
for(let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++){
|
|
24
|
+
const day = weeksGrid[weekIndex][dayIndex];
|
|
25
|
+
const dayInfo = {
|
|
26
|
+
onSelected: ()=>onSelectDate(day.originalDate),
|
|
27
|
+
setRef: getSetRefCallback(day.key),
|
|
28
|
+
...day,
|
|
29
|
+
isMarked: day.isMarked || (markedDays === null || markedDays === void 0 ? void 0 : markedDays.some((markedDay)=>compareDates(day.originalDate, markedDay)))
|
|
30
|
+
};
|
|
31
|
+
week.push(dayInfo);
|
|
32
|
+
}
|
|
33
|
+
returnValue.push(week);
|
|
34
|
+
}
|
|
35
|
+
return returnValue;
|
|
39
36
|
// TODO: this is missing deps on getSetRefCallback and onSelectDate (and depending on the entire
|
|
40
37
|
// props object may not be a good idea due to likely frequent mutation). It would be easy to
|
|
41
38
|
// fix getSetRefCallback to not mutate every render, but onSelectDate is passed down from
|
|
42
39
|
// Calendar and trying to fix it requires a huge cascade of changes.
|
|
43
40
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
}, [
|
|
42
|
+
props
|
|
43
|
+
]);
|
|
44
|
+
return weeks;
|
|
46
45
|
}
|
|
47
|
-
//# sourceMappingURL=useWeeks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["useWeeks.ts"],"sourcesContent":["import * as React from 'react';\nimport { compareDates, DAYS_IN_WEEK, getDayGrid } from '../../utils/index';\nimport { DayInfo } from './CalendarDayGrid';\nimport { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport function useWeeks(\n props: CalendarDayGridProps,\n onSelectDate: (date: Date) => void,\n getSetRefCallback: (dayKey: string) => (element: HTMLElement | null) => void,\n): DayInfo[][] {\n /**\n * Initial parsing of the given props to generate IDayInfo two dimensional array, which contains a representation\n * of every day in the grid. Convenient for helping with conversions between day refs and Date objects in callbacks.\n */\n const weeks = React.useMemo((): DayInfo[][] => {\n const weeksGrid = getDayGrid(props);\n\n const firstVisibleDay = weeksGrid[1][0].originalDate;\n const lastVisibleDay = weeksGrid[weeksGrid.length - 1][6].originalDate;\n const markedDays = props.getMarkedDays?.(firstVisibleDay, lastVisibleDay) || [];\n\n /**\n * Weeks is a 2D array. Weeks[0] contains the last week of the prior range,\n * Weeks[weeks.length - 1] contains first week of next range. These are for transition states.\n *\n * Weeks[1... weeks.length - 2] contains the actual visible data\n */\n const returnValue: DayInfo[][] = [];\n\n for (let weekIndex = 0; weekIndex < weeksGrid.length; weekIndex++) {\n const week: DayInfo[] = [];\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const day = weeksGrid[weekIndex][dayIndex];\n const dayInfo: DayInfo = {\n onSelected: () => onSelectDate(day.originalDate),\n setRef: getSetRefCallback(day.key),\n ...day,\n isMarked: day.isMarked || markedDays?.some(markedDay => compareDates(day.originalDate, markedDay)),\n };\n\n week.push(dayInfo);\n }\n returnValue.push(week);\n }\n\n return returnValue;\n // TODO: this is missing deps on getSetRefCallback and onSelectDate (and depending on the entire\n // props object may not be a good idea due to likely frequent mutation). It would be easy to\n // fix getSetRefCallback to not mutate every render, but onSelectDate is passed down from\n // Calendar and trying to fix it requires a huge cascade of changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n\n return weeks;\n}\n"],"names":["React","compareDates","DAYS_IN_WEEK","getDayGrid","useWeeks","props","onSelectDate","getSetRefCallback","weeks","useMemo","weeksGrid","firstVisibleDay","originalDate","lastVisibleDay","length","markedDays","getMarkedDays","returnValue","weekIndex","week","dayIndex","day","dayInfo","onSelected","setRef","key","isMarked","some","markedDay","push"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,EAAEC,YAAY,EAAEC,UAAU,QAAQ,oBAAoB;AAI3E;;CAEC,GACD,OAAO,SAASC,SACdC,KAA2B,EAC3BC,YAAkC,EAClCC,iBAA4E,EAC/D;IACb;;;GAGC,GACD,MAAMC,QAAQR,MAAMS,OAAO,CAAC,IAAmB;YAK1BJ;QAJnB,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