@fluentui/react-calendar-compat 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -2
- package/lib/Calendar.js.map +1 -1
- package/lib/CalendarDay.js.map +1 -1
- package/lib/CalendarDayGrid.js.map +1 -1
- package/lib/CalendarMonth.js.map +1 -1
- package/lib/CalendarPicker.js.map +1 -1
- package/lib/CalendarYear.js.map +1 -1
- package/lib/components/Calendar/Calendar.js.map +1 -1
- package/lib/components/Calendar/Calendar.types.js +3 -3
- package/lib/components/Calendar/Calendar.types.js.map +1 -1
- package/lib/components/Calendar/calendarNavigationIcons.js.map +1 -1
- package/lib/components/Calendar/defaults.js.map +1 -1
- package/lib/components/Calendar/index.js.map +1 -1
- package/lib/components/Calendar/useCalendarStyles.styles.raw.js +115 -0
- package/lib/components/Calendar/useCalendarStyles.styles.raw.js.map +1 -0
- package/lib/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib/components/CalendarDay/CalendarDay.types.js.map +1 -1
- package/lib/components/CalendarDay/index.js.map +1 -1
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.raw.js +142 -0
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
- package/lib/components/CalendarDayGrid/index.js.map +1 -1
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js +395 -0
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +1 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js +92 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +1 -0
- package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -1
- package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
- package/lib/components/CalendarMonth/index.js.map +1 -1
- package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js +9 -0
- package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +1 -0
- package/lib/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
- package/lib/components/CalendarPicker/index.js.map +1 -1
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js +291 -0
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +1 -0
- package/lib/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib/components/CalendarYear/CalendarYear.types.js.map +1 -1
- package/lib/components/CalendarYear/index.js.map +1 -1
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.raw.js +9 -0
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +1 -0
- package/lib/index.js.map +1 -1
- package/lib/utils/animations.js.map +1 -1
- package/lib/utils/constants.js +18 -12
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/dateFormatting/dateFormatting.defaults.js.map +1 -1
- package/lib/utils/dateFormatting/dateFormatting.types.js.map +1 -1
- package/lib/utils/dateFormatting/index.js.map +1 -1
- package/lib/utils/dateGrid/dateGrid.types.js.map +1 -1
- package/lib/utils/dateGrid/findAvailableDate.js.map +1 -1
- package/lib/utils/dateGrid/getBoundedDateRange.js.map +1 -1
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
- package/lib/utils/dateGrid/getDayGrid.js.map +1 -1
- package/lib/utils/dateGrid/index.js.map +1 -1
- package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -1
- package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -1
- package/lib/utils/dateGrid/isContiguous.js.map +1 -1
- package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -1
- package/lib/utils/dateMath/dateMath.js.map +1 -1
- package/lib/utils/dateMath/index.js.map +1 -1
- package/lib/utils/focus.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib-commonjs/Calendar.js.map +1 -1
- package/lib-commonjs/CalendarDay.js.map +1 -1
- package/lib-commonjs/CalendarDayGrid.js.map +1 -1
- package/lib-commonjs/CalendarMonth.js.map +1 -1
- package/lib-commonjs/CalendarPicker.js.map +1 -1
- package/lib-commonjs/CalendarYear.js.map +1 -1
- package/lib-commonjs/components/Calendar/Calendar.js.map +1 -1
- package/lib-commonjs/components/Calendar/Calendar.types.js +3 -3
- package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -1
- package/lib-commonjs/components/Calendar/calendarNavigationIcons.js.map +1 -1
- package/lib-commonjs/components/Calendar/defaults.js.map +1 -1
- package/lib-commonjs/components/Calendar/index.js.map +1 -1
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.raw.js +127 -0
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/index.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.raw.js +154 -0
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js +408 -0
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js +106 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/index.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js +15 -0
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/index.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js +303 -0
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/index.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.raw.js +15 -0
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/animations.js.map +1 -1
- package/lib-commonjs/utils/constants.js +12 -12
- package/lib-commonjs/utils/constants.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js.map +1 -1
- package/lib-commonjs/utils/dateFormatting/index.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/index.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -1
- package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -1
- package/lib-commonjs/utils/dateMath/index.js.map +1 -1
- package/lib-commonjs/utils/focus.js.map +1 -1
- package/lib-commonjs/utils/index.js.map +1 -1
- package/package.json +4 -4
@@ -0,0 +1,395 @@
|
|
1
|
+
import { tokens } from '@fluentui/react-theme';
|
2
|
+
import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
|
3
|
+
import { 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';
|
4
|
+
import { AnimationDirection } from '../Calendar/Calendar.types';
|
5
|
+
import { weekCornersClassNames } from './useWeekCornerStyles.styles';
|
6
|
+
import { createFocusOutlineStyle } from '@fluentui/react-tabster';
|
7
|
+
/**
|
8
|
+
* @internal
|
9
|
+
*/ export const calendarDayGridClassNames = {
|
10
|
+
wrapper: 'fui-CalendarDayGrid__wrapper',
|
11
|
+
table: 'fui-CalendarDayGrid__table',
|
12
|
+
dayCell: 'fui-CalendarDayGrid__dayCell',
|
13
|
+
daySelected: 'fui-CalendarDayGrid__daySelected',
|
14
|
+
daySingleSelected: 'fui-CalendarDayGrid__daySingleSelected',
|
15
|
+
weekRow: 'fui-CalendarDayGrid__weekRow',
|
16
|
+
weekDayLabelCell: 'fui-CalendarDayGrid__weekDayLabelCell',
|
17
|
+
weekNumberCell: 'fui-CalendarDayGrid__weekNumberCell',
|
18
|
+
dayOutsideBounds: 'fui-CalendarDayGrid__dayOutsideBounds',
|
19
|
+
dayOutsideNavigatedMonth: 'fui-CalendarDayGrid__dayOutsideNavigatedMonth',
|
20
|
+
dayButton: 'fui-CalendarDayGrid__dayButton',
|
21
|
+
dayIsToday: 'fui-CalendarDayGrid__dayIsToday',
|
22
|
+
firstTransitionWeek: 'fui-CalendarDayGrid__firstTransitionWeek',
|
23
|
+
lastTransitionWeek: 'fui-CalendarDayGrid__lastTransitionWeek',
|
24
|
+
dayMarker: 'fui-CalendarDayGrid__dayMarker',
|
25
|
+
dayTodayMarker: 'fui-CalendarDayGrid__dayTodayMarker'
|
26
|
+
};
|
27
|
+
/**
|
28
|
+
* @internal
|
29
|
+
*/ export const extraCalendarDayGridClassNames = {
|
30
|
+
hoverStyle: 'fui-CalendarDayGrid__hoverStyle',
|
31
|
+
pressedStyle: 'fui-CalendarDayGrid__pressedStyle'
|
32
|
+
};
|
33
|
+
const useWrapperStyles = makeStyles({
|
34
|
+
base: {
|
35
|
+
paddingBottom: '10px'
|
36
|
+
}
|
37
|
+
});
|
38
|
+
const useTableStyles = makeStyles({
|
39
|
+
base: {
|
40
|
+
borderCollapse: 'collapse',
|
41
|
+
borderSpacing: 0,
|
42
|
+
fontSize: 'inherit',
|
43
|
+
marginTop: '4px',
|
44
|
+
paddingBottom: '10px',
|
45
|
+
position: 'relative',
|
46
|
+
tableLayout: 'fixed',
|
47
|
+
textAlign: 'center',
|
48
|
+
width: '196px'
|
49
|
+
},
|
50
|
+
showWeekNumbers: {
|
51
|
+
width: '226px'
|
52
|
+
}
|
53
|
+
});
|
54
|
+
const useDayCellStyles = makeStyles({
|
55
|
+
base: {
|
56
|
+
color: tokens.colorNeutralForeground1,
|
57
|
+
cursor: 'pointer',
|
58
|
+
fontSize: tokens.fontSizeBase200,
|
59
|
+
fontWeight: tokens.fontWeightRegular,
|
60
|
+
margin: '0',
|
61
|
+
padding: '2px',
|
62
|
+
position: 'relative',
|
63
|
+
'@media (forced-colors: active)': {
|
64
|
+
backgroundColor: 'Window',
|
65
|
+
color: 'WindowText'
|
66
|
+
},
|
67
|
+
[`&.${extraCalendarDayGridClassNames.hoverStyle}`]: {
|
68
|
+
color: tokens.colorNeutralForeground1Static,
|
69
|
+
backgroundColor: tokens.colorBrandBackgroundInvertedHover,
|
70
|
+
'@media (forced-colors: active)': {
|
71
|
+
outline: '1px solid Highlight',
|
72
|
+
zIndex: 3,
|
73
|
+
[`& .${calendarDayGridClassNames.dayTodayMarker}`]: {
|
74
|
+
backgroundColor: 'Highlight'
|
75
|
+
}
|
76
|
+
}
|
77
|
+
},
|
78
|
+
[`&.${extraCalendarDayGridClassNames.pressedStyle}`]: {
|
79
|
+
color: tokens.colorNeutralForeground1Static,
|
80
|
+
backgroundColor: tokens.colorBrandBackgroundInvertedPressed,
|
81
|
+
'@media (forced-colors: active)': {
|
82
|
+
backgroundColor: 'Window',
|
83
|
+
...shorthands.borderColor('Highlight'),
|
84
|
+
color: 'Highlight'
|
85
|
+
}
|
86
|
+
}
|
87
|
+
},
|
88
|
+
focusIndicator: createFocusOutlineStyle({
|
89
|
+
style: {
|
90
|
+
outlineWidth: tokens.strokeWidthThick,
|
91
|
+
...shorthands.borderWidth(tokens.strokeWidthThick)
|
92
|
+
}
|
93
|
+
})
|
94
|
+
});
|
95
|
+
const useDaySelectedStyles = makeStyles({
|
96
|
+
base: {
|
97
|
+
backgroundColor: tokens.colorBrandBackgroundInvertedSelected,
|
98
|
+
color: tokens.colorNeutralForeground1Static,
|
99
|
+
'@media (forced-colors: active)': {
|
100
|
+
backgroundColor: 'Highlight',
|
101
|
+
...shorthands.borderColor('Highlight'),
|
102
|
+
color: 'HighlightText',
|
103
|
+
forcedColorAdjust: 'none'
|
104
|
+
},
|
105
|
+
[`&:hover, &.${extraCalendarDayGridClassNames.hoverStyle}, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {
|
106
|
+
color: tokens.colorNeutralForeground1Static,
|
107
|
+
backgroundColor: tokens.colorBrandBackgroundInvertedSelected,
|
108
|
+
'@media (forced-colors: active)': {
|
109
|
+
backgroundColor: 'Highlight',
|
110
|
+
color: 'HighlightText'
|
111
|
+
}
|
112
|
+
},
|
113
|
+
[`& > .${calendarDayGridClassNames.dayMarker}`]: {
|
114
|
+
'@media (forced-colors: active)': {
|
115
|
+
backgroundColor: 'Window'
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
});
|
120
|
+
const useDaySingleSelectedStyles = makeStyles({
|
121
|
+
base: {
|
122
|
+
color: tokens.colorNeutralForeground1Static,
|
123
|
+
[`& > .${calendarDayGridClassNames.dayMarker}`]: {
|
124
|
+
'@media (forced-colors: active)': {
|
125
|
+
backgroundColor: 'Window'
|
126
|
+
}
|
127
|
+
},
|
128
|
+
[`& > .${calendarDayGridClassNames.dayButton}`]: {
|
129
|
+
backgroundColor: tokens.colorBrandBackgroundInvertedSelected,
|
130
|
+
borderRadius: tokens.borderRadiusMedium,
|
131
|
+
...shorthands.border('1px', 'solid', tokens.colorBrandStroke1),
|
132
|
+
'@media (forced-colors: active)': {
|
133
|
+
backgroundColor: 'Highlight',
|
134
|
+
...shorthands.borderColor('Highlight'),
|
135
|
+
color: 'HighlightText',
|
136
|
+
forcedColorAdjust: 'none'
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}
|
140
|
+
});
|
141
|
+
const useWeekRowStyles = makeStyles({
|
142
|
+
base: {
|
143
|
+
position: 'relative',
|
144
|
+
':focus-within': {
|
145
|
+
zIndex: 1
|
146
|
+
}
|
147
|
+
},
|
148
|
+
animation: {
|
149
|
+
animationDuration: DURATION_3,
|
150
|
+
animationFillMode: 'both',
|
151
|
+
animationTimingFunction: EASING_FUNCTION_1
|
152
|
+
},
|
153
|
+
horizontalBackward: {
|
154
|
+
animationName: [
|
155
|
+
FADE_IN,
|
156
|
+
SLIDE_RIGHT_IN20
|
157
|
+
]
|
158
|
+
},
|
159
|
+
horizontalForward: {
|
160
|
+
animationName: [
|
161
|
+
FADE_IN,
|
162
|
+
SLIDE_LEFT_IN20
|
163
|
+
]
|
164
|
+
},
|
165
|
+
verticalBackward: {
|
166
|
+
animationName: [
|
167
|
+
FADE_IN,
|
168
|
+
SLIDE_DOWN_IN20
|
169
|
+
]
|
170
|
+
},
|
171
|
+
verticalForward: {
|
172
|
+
animationName: [
|
173
|
+
FADE_IN,
|
174
|
+
SLIDE_UP_IN20
|
175
|
+
]
|
176
|
+
}
|
177
|
+
});
|
178
|
+
const useWeekDayLabelCellStyles = makeStyles({
|
179
|
+
base: {
|
180
|
+
userSelect: 'none',
|
181
|
+
animationDuration: DURATION_2,
|
182
|
+
animationFillMode: 'both',
|
183
|
+
animationName: FADE_IN,
|
184
|
+
animationTimingFunction: EASING_FUNCTION_2
|
185
|
+
}
|
186
|
+
});
|
187
|
+
const useWeekNumberCellStyles = makeStyles({
|
188
|
+
base: {
|
189
|
+
backgroundColor: tokens.colorTransparentBackground,
|
190
|
+
borderRight: `1px solid ${tokens.colorNeutralStroke2}`,
|
191
|
+
boxSizing: 'border-box',
|
192
|
+
color: tokens.colorNeutralForeground4,
|
193
|
+
fontSize: tokens.fontSizeBase200,
|
194
|
+
fontWeight: tokens.fontWeightRegular,
|
195
|
+
height: '28px',
|
196
|
+
margin: '0',
|
197
|
+
padding: '0',
|
198
|
+
width: '28px'
|
199
|
+
}
|
200
|
+
});
|
201
|
+
const useDayOutsideBoundsStyles = makeStyles({
|
202
|
+
base: {
|
203
|
+
[`&, &:disabled, & button, &.${extraCalendarDayGridClassNames.hoverStyle}` + `, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {
|
204
|
+
backgroundColor: tokens.colorTransparentBackground,
|
205
|
+
color: tokens.colorNeutralForegroundDisabled,
|
206
|
+
pointerEvents: 'none'
|
207
|
+
},
|
208
|
+
'@media (forced-colors: active)': {
|
209
|
+
color: 'GrayText'
|
210
|
+
}
|
211
|
+
}
|
212
|
+
});
|
213
|
+
const useDayOutsideNavigatedMonthStyles = makeStyles({
|
214
|
+
lightenDaysOutsideNavigatedMonth: {
|
215
|
+
color: tokens.colorNeutralForeground4,
|
216
|
+
fontWeight: tokens.fontWeightRegular,
|
217
|
+
'@media (forced-colors: active)': {
|
218
|
+
color: 'GrayText'
|
219
|
+
}
|
220
|
+
}
|
221
|
+
});
|
222
|
+
const useDayButtonStyles = makeStyles({
|
223
|
+
base: {
|
224
|
+
backgroundColor: tokens.colorTransparentBackground,
|
225
|
+
border: 'none',
|
226
|
+
color: 'inherit',
|
227
|
+
cursor: 'pointer',
|
228
|
+
fontSize: tokens.fontSizeBase200,
|
229
|
+
fontWeight: 'inherit',
|
230
|
+
height: '24px',
|
231
|
+
lineHeight: '24px',
|
232
|
+
overflow: 'visible',
|
233
|
+
padding: '0',
|
234
|
+
width: '24px',
|
235
|
+
'&span': {
|
236
|
+
height: 'inherit',
|
237
|
+
lineHeight: 'inherit'
|
238
|
+
},
|
239
|
+
':hover': {
|
240
|
+
backgroundColor: tokens.colorBrandBackgroundInvertedHover,
|
241
|
+
borderRadius: tokens.borderRadiusMedium
|
242
|
+
},
|
243
|
+
':active': {
|
244
|
+
backgroundColor: tokens.colorBrandBackgroundInvertedPressed
|
245
|
+
}
|
246
|
+
}
|
247
|
+
});
|
248
|
+
const useDayIsTodayStyles = makeStyles({
|
249
|
+
base: {
|
250
|
+
display: 'flex',
|
251
|
+
justifyContent: 'center',
|
252
|
+
alignItems: 'center',
|
253
|
+
color: tokens.colorNeutralForegroundOnBrand,
|
254
|
+
fontWeight: tokens.fontWeightSemibold,
|
255
|
+
[`& > .${calendarDayGridClassNames.dayMarker}`]: {
|
256
|
+
backgroundColor: tokens.colorNeutralForegroundOnBrand,
|
257
|
+
'@media (forced-colors: active)': {
|
258
|
+
backgroundColor: 'Window'
|
259
|
+
}
|
260
|
+
}
|
261
|
+
}
|
262
|
+
});
|
263
|
+
const useDayTodayMarkerStyles = makeStyles({
|
264
|
+
base: {
|
265
|
+
display: 'flex',
|
266
|
+
justifyContent: 'center',
|
267
|
+
alignItems: 'center',
|
268
|
+
backgroundColor: tokens.colorBrandBackground,
|
269
|
+
borderRadius: '100%',
|
270
|
+
width: '20px',
|
271
|
+
height: '20px',
|
272
|
+
lineHeight: '20px',
|
273
|
+
'@media (forced-colors: active)': {
|
274
|
+
backgroundColor: 'WindowText',
|
275
|
+
...shorthands.borderColor('WindowText'),
|
276
|
+
color: 'Window',
|
277
|
+
forcedColorAdjust: 'none'
|
278
|
+
}
|
279
|
+
}
|
280
|
+
});
|
281
|
+
const useFirstTransitionWeekStyles = makeStyles({
|
282
|
+
base: {
|
283
|
+
height: 0,
|
284
|
+
opacity: 0,
|
285
|
+
overflow: 'hidden',
|
286
|
+
position: 'absolute',
|
287
|
+
width: 0
|
288
|
+
},
|
289
|
+
verticalForward: {
|
290
|
+
animationDuration: DURATION_3,
|
291
|
+
animationFillMode: 'both',
|
292
|
+
animationName: [
|
293
|
+
FADE_OUT,
|
294
|
+
SLIDE_UP_OUT20,
|
295
|
+
TRANSITION_ROW_DISAPPEARANCE
|
296
|
+
],
|
297
|
+
animationTimingFunction: EASING_FUNCTION_1
|
298
|
+
}
|
299
|
+
});
|
300
|
+
const useLastTransitionWeekStyles = makeStyles({
|
301
|
+
base: {
|
302
|
+
height: 0,
|
303
|
+
marginTop: '-28px',
|
304
|
+
opacity: 0,
|
305
|
+
overflow: 'hidden',
|
306
|
+
position: 'absolute',
|
307
|
+
width: 0
|
308
|
+
},
|
309
|
+
verticalBackward: {
|
310
|
+
animationDuration: DURATION_3,
|
311
|
+
animationFillMode: 'both',
|
312
|
+
animationName: [
|
313
|
+
FADE_OUT,
|
314
|
+
SLIDE_DOWN_OUT20,
|
315
|
+
TRANSITION_ROW_DISAPPEARANCE
|
316
|
+
],
|
317
|
+
animationTimingFunction: EASING_FUNCTION_1
|
318
|
+
}
|
319
|
+
});
|
320
|
+
const useDayMarkerStyles = makeStyles({
|
321
|
+
base: {
|
322
|
+
backgroundColor: tokens.colorBrandForeground2,
|
323
|
+
borderRadius: '100%',
|
324
|
+
bottom: '1px',
|
325
|
+
height: '4px',
|
326
|
+
left: 0,
|
327
|
+
margin: 'auto',
|
328
|
+
position: 'absolute',
|
329
|
+
right: 0,
|
330
|
+
width: '4px',
|
331
|
+
'@media (forced-colors: active)': {
|
332
|
+
backgroundColor: 'WindowText',
|
333
|
+
forcedColorAdjust: 'none'
|
334
|
+
}
|
335
|
+
}
|
336
|
+
});
|
337
|
+
const useCornerBorderAndRadiusStyles = makeStyles({
|
338
|
+
corners: {
|
339
|
+
[`&.${weekCornersClassNames.topRightCornerDate}`]: {
|
340
|
+
borderTopRightRadius: tokens.borderRadiusMedium
|
341
|
+
},
|
342
|
+
[`&.${weekCornersClassNames.topLeftCornerDate}`]: {
|
343
|
+
borderTopLeftRadius: tokens.borderRadiusMedium
|
344
|
+
},
|
345
|
+
[`&.${weekCornersClassNames.bottomRightCornerDate}`]: {
|
346
|
+
borderBottomRightRadius: tokens.borderRadiusMedium
|
347
|
+
},
|
348
|
+
[`&.${weekCornersClassNames.bottomLeftCornerDate}`]: {
|
349
|
+
borderBottomLeftRadius: tokens.borderRadiusMedium
|
350
|
+
}
|
351
|
+
}
|
352
|
+
});
|
353
|
+
/**
|
354
|
+
* @internal
|
355
|
+
*
|
356
|
+
* Apply styling to the CalendarDayGrid slots based on the state
|
357
|
+
*/ export const useCalendarDayGridStyles_unstable = (props)=>{
|
358
|
+
'use no memo';
|
359
|
+
const wrapperStyles = useWrapperStyles();
|
360
|
+
const tableStyles = useTableStyles();
|
361
|
+
const dayCellStyles = useDayCellStyles();
|
362
|
+
const daySelectedStyles = useDaySelectedStyles();
|
363
|
+
const daySingleSelectedStyles = useDaySingleSelectedStyles();
|
364
|
+
const weekRowStyles = useWeekRowStyles();
|
365
|
+
const weekDayLabelCellStyles = useWeekDayLabelCellStyles();
|
366
|
+
const weekNumberCellStyles = useWeekNumberCellStyles();
|
367
|
+
const dayOutsideBoundsStyles = useDayOutsideBoundsStyles();
|
368
|
+
const dayOutsideNavigatedMonthStyles = useDayOutsideNavigatedMonthStyles();
|
369
|
+
const dayButtonStyles = useDayButtonStyles();
|
370
|
+
const dayIsTodayStyles = useDayIsTodayStyles();
|
371
|
+
const firstTransitionWeekStyles = useFirstTransitionWeekStyles();
|
372
|
+
const lastTransitionWeekStyles = useLastTransitionWeekStyles();
|
373
|
+
const dayMarkerStyles = useDayMarkerStyles();
|
374
|
+
const cornerBorderAndRadiusStyles = useCornerBorderAndRadiusStyles();
|
375
|
+
const dayTodayMarkerStyles = useDayTodayMarkerStyles();
|
376
|
+
const { animateBackwards, animationDirection, lightenDaysOutsideNavigatedMonth, showWeekNumbers } = props;
|
377
|
+
return {
|
378
|
+
wrapper: mergeClasses(calendarDayGridClassNames.wrapper, wrapperStyles.base),
|
379
|
+
table: mergeClasses(calendarDayGridClassNames.table, tableStyles.base, showWeekNumbers && tableStyles.showWeekNumbers),
|
380
|
+
dayCell: mergeClasses(calendarDayGridClassNames.dayCell, dayCellStyles.base, dayCellStyles.focusIndicator, cornerBorderAndRadiusStyles.corners),
|
381
|
+
daySelected: mergeClasses(calendarDayGridClassNames.daySelected, daySelectedStyles.base),
|
382
|
+
daySingleSelected: mergeClasses(calendarDayGridClassNames.daySingleSelected, daySingleSelectedStyles.base),
|
383
|
+
weekRow: mergeClasses(calendarDayGridClassNames.weekRow, weekRowStyles.base, animateBackwards !== undefined && weekRowStyles.animation, animateBackwards !== undefined && (animationDirection === AnimationDirection.Horizontal ? animateBackwards ? weekRowStyles.horizontalBackward : weekRowStyles.horizontalForward : animateBackwards ? weekRowStyles.verticalBackward : weekRowStyles.verticalForward)),
|
384
|
+
weekDayLabelCell: mergeClasses(calendarDayGridClassNames.weekDayLabelCell, weekDayLabelCellStyles.base),
|
385
|
+
weekNumberCell: mergeClasses(calendarDayGridClassNames.weekNumberCell, weekNumberCellStyles.base),
|
386
|
+
dayOutsideBounds: mergeClasses(calendarDayGridClassNames.dayOutsideBounds, dayOutsideBoundsStyles.base),
|
387
|
+
dayOutsideNavigatedMonth: mergeClasses(calendarDayGridClassNames.dayOutsideNavigatedMonth, lightenDaysOutsideNavigatedMonth && dayOutsideNavigatedMonthStyles.lightenDaysOutsideNavigatedMonth),
|
388
|
+
dayButton: mergeClasses(calendarDayGridClassNames.dayButton, dayButtonStyles.base),
|
389
|
+
dayIsToday: mergeClasses(calendarDayGridClassNames.dayIsToday, dayIsTodayStyles.base),
|
390
|
+
firstTransitionWeek: mergeClasses(calendarDayGridClassNames.firstTransitionWeek, firstTransitionWeekStyles.base, animateBackwards !== undefined && animationDirection !== AnimationDirection.Horizontal && !animateBackwards && firstTransitionWeekStyles.verticalForward),
|
391
|
+
lastTransitionWeek: mergeClasses(calendarDayGridClassNames.lastTransitionWeek, lastTransitionWeekStyles.base, animateBackwards !== undefined && animationDirection !== AnimationDirection.Horizontal && animateBackwards && lastTransitionWeekStyles.verticalBackward),
|
392
|
+
dayMarker: mergeClasses(calendarDayGridClassNames.dayMarker, dayMarkerStyles.base),
|
393
|
+
dayTodayMarker: mergeClasses(calendarDayGridClassNames.dayTodayMarker, dayTodayMarkerStyles.base)
|
394
|
+
};
|
395
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/useCalendarDayGridStyles.styles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport {\n DURATION_2,\n DURATION_3,\n EASING_FUNCTION_1,\n EASING_FUNCTION_2,\n FADE_IN,\n FADE_OUT,\n SLIDE_DOWN_IN20,\n SLIDE_DOWN_OUT20,\n SLIDE_LEFT_IN20,\n SLIDE_RIGHT_IN20,\n SLIDE_UP_IN20,\n SLIDE_UP_OUT20,\n TRANSITION_ROW_DISAPPEARANCE,\n} from '../../utils';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport { weekCornersClassNames } from './useWeekCornerStyles.styles';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CalendarDayGridStyles, CalendarDayGridStyleProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport const calendarDayGridClassNames: SlotClassNames<CalendarDayGridStyles> = {\n wrapper: 'fui-CalendarDayGrid__wrapper',\n table: 'fui-CalendarDayGrid__table',\n dayCell: 'fui-CalendarDayGrid__dayCell',\n daySelected: 'fui-CalendarDayGrid__daySelected',\n daySingleSelected: 'fui-CalendarDayGrid__daySingleSelected',\n weekRow: 'fui-CalendarDayGrid__weekRow',\n weekDayLabelCell: 'fui-CalendarDayGrid__weekDayLabelCell',\n weekNumberCell: 'fui-CalendarDayGrid__weekNumberCell',\n dayOutsideBounds: 'fui-CalendarDayGrid__dayOutsideBounds',\n dayOutsideNavigatedMonth: 'fui-CalendarDayGrid__dayOutsideNavigatedMonth',\n dayButton: 'fui-CalendarDayGrid__dayButton',\n dayIsToday: 'fui-CalendarDayGrid__dayIsToday',\n firstTransitionWeek: 'fui-CalendarDayGrid__firstTransitionWeek',\n lastTransitionWeek: 'fui-CalendarDayGrid__lastTransitionWeek',\n dayMarker: 'fui-CalendarDayGrid__dayMarker',\n dayTodayMarker: 'fui-CalendarDayGrid__dayTodayMarker',\n};\n\n/**\n * @internal\n */\nexport const extraCalendarDayGridClassNames = {\n hoverStyle: 'fui-CalendarDayGrid__hoverStyle',\n pressedStyle: 'fui-CalendarDayGrid__pressedStyle',\n};\n\nconst useWrapperStyles = makeStyles({\n base: {\n paddingBottom: '10px',\n },\n});\n\nconst useTableStyles = makeStyles({\n base: {\n borderCollapse: 'collapse',\n borderSpacing: 0,\n fontSize: 'inherit',\n marginTop: '4px',\n paddingBottom: '10px',\n position: 'relative',\n tableLayout: 'fixed',\n textAlign: 'center',\n width: '196px',\n },\n showWeekNumbers: {\n width: '226px',\n },\n});\n\nconst useDayCellStyles = makeStyles({\n base: {\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n margin: '0',\n padding: '2px',\n position: 'relative',\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n },\n\n [`&.${extraCalendarDayGridClassNames.hoverStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n '@media (forced-colors: active)': {\n outline: '1px solid Highlight',\n zIndex: 3,\n [`& .${calendarDayGridClassNames.dayTodayMarker}`]: {\n backgroundColor: 'Highlight',\n },\n },\n },\n\n [`&.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n ...shorthands.borderColor('Highlight'),\n color: 'Highlight',\n },\n },\n },\n focusIndicator: createFocusOutlineStyle({\n style: {\n outlineWidth: tokens.strokeWidthThick,\n ...shorthands.borderWidth(tokens.strokeWidthThick),\n },\n }),\n});\n\nconst useDaySelectedStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Highlight'),\n color: 'HighlightText',\n forcedColorAdjust: 'none',\n },\n\n [`&:hover, &.${extraCalendarDayGridClassNames.hoverStyle}, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n color: tokens.colorNeutralForeground1Static,\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n },\n },\n },\n});\n\nconst useDaySingleSelectedStyles = makeStyles({\n base: {\n color: tokens.colorNeutralForeground1Static,\n\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n },\n },\n\n [`& > .${calendarDayGridClassNames.dayButton}`]: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n borderRadius: tokens.borderRadiusMedium,\n ...shorthands.border('1px', 'solid', tokens.colorBrandStroke1),\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Highlight'),\n color: 'HighlightText',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useWeekRowStyles = makeStyles({\n base: {\n position: 'relative',\n ':focus-within': {\n zIndex: 1,\n },\n },\n animation: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationTimingFunction: EASING_FUNCTION_1,\n },\n horizontalBackward: {\n animationName: [FADE_IN, SLIDE_RIGHT_IN20],\n },\n horizontalForward: {\n animationName: [FADE_IN, SLIDE_LEFT_IN20],\n },\n verticalBackward: {\n animationName: [FADE_IN, SLIDE_DOWN_IN20],\n },\n verticalForward: {\n animationName: [FADE_IN, SLIDE_UP_IN20],\n },\n});\n\nconst useWeekDayLabelCellStyles = makeStyles({\n base: {\n userSelect: 'none',\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2,\n },\n});\n\nconst useWeekNumberCellStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n borderRight: `1px solid ${tokens.colorNeutralStroke2}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground4,\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n height: '28px',\n margin: '0',\n padding: '0',\n width: '28px',\n },\n});\n\nconst useDayOutsideBoundsStyles = makeStyles({\n base: {\n [`&, &:disabled, & button, &.${extraCalendarDayGridClassNames.hoverStyle}` +\n `, &.${extraCalendarDayGridClassNames.pressedStyle}`]: {\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none',\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\nconst useDayOutsideNavigatedMonthStyles = makeStyles({\n lightenDaysOutsideNavigatedMonth: {\n color: tokens.colorNeutralForeground4,\n fontWeight: tokens.fontWeightRegular,\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\nconst useDayButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n fontSize: tokens.fontSizeBase200,\n fontWeight: 'inherit',\n height: '24px',\n lineHeight: '24px',\n overflow: 'visible',\n padding: '0',\n width: '24px',\n\n '&span': {\n height: 'inherit',\n lineHeight: 'inherit',\n },\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n borderRadius: tokens.borderRadiusMedium,\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n },\n },\n});\n\nconst useDayIsTodayStyles = makeStyles({\n base: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n\n [`& > .${calendarDayGridClassNames.dayMarker}`]: {\n backgroundColor: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n },\n },\n },\n});\n\nconst useDayTodayMarkerStyles = makeStyles({\n base: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: tokens.colorBrandBackground,\n borderRadius: '100%',\n width: '20px',\n height: '20px',\n lineHeight: '20px',\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n ...shorthands.borderColor('WindowText'),\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n },\n});\n\nconst useFirstTransitionWeekStyles = makeStyles({\n base: {\n height: 0,\n opacity: 0,\n overflow: 'hidden',\n\n position: 'absolute',\n width: 0,\n },\n verticalForward: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationName: [FADE_OUT, SLIDE_UP_OUT20, TRANSITION_ROW_DISAPPEARANCE],\n animationTimingFunction: EASING_FUNCTION_1,\n },\n});\n\nconst useLastTransitionWeekStyles = makeStyles({\n base: {\n height: 0,\n marginTop: '-28px',\n opacity: 0,\n overflow: 'hidden',\n position: 'absolute',\n width: 0,\n },\n verticalBackward: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationName: [FADE_OUT, SLIDE_DOWN_OUT20, TRANSITION_ROW_DISAPPEARANCE],\n animationTimingFunction: EASING_FUNCTION_1,\n },\n});\n\nconst useDayMarkerStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorBrandForeground2,\n borderRadius: '100%',\n bottom: '1px',\n height: '4px',\n left: 0,\n margin: 'auto',\n\n position: 'absolute',\n right: 0,\n width: '4px',\n\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n forcedColorAdjust: 'none',\n },\n },\n});\n\nconst useCornerBorderAndRadiusStyles = makeStyles({\n corners: {\n [`&.${weekCornersClassNames.topRightCornerDate}`]: {\n borderTopRightRadius: tokens.borderRadiusMedium,\n },\n [`&.${weekCornersClassNames.topLeftCornerDate}`]: {\n borderTopLeftRadius: tokens.borderRadiusMedium,\n },\n [`&.${weekCornersClassNames.bottomRightCornerDate}`]: {\n borderBottomRightRadius: tokens.borderRadiusMedium,\n },\n [`&.${weekCornersClassNames.bottomLeftCornerDate}`]: {\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n },\n },\n});\n\n/**\n * @internal\n *\n * Apply styling to the CalendarDayGrid slots based on the state\n */\nexport const useCalendarDayGridStyles_unstable = (props: CalendarDayGridStyleProps): CalendarDayGridStyles => {\n 'use no memo';\n\n const wrapperStyles = useWrapperStyles();\n const tableStyles = useTableStyles();\n const dayCellStyles = useDayCellStyles();\n const daySelectedStyles = useDaySelectedStyles();\n const daySingleSelectedStyles = useDaySingleSelectedStyles();\n const weekRowStyles = useWeekRowStyles();\n const weekDayLabelCellStyles = useWeekDayLabelCellStyles();\n const weekNumberCellStyles = useWeekNumberCellStyles();\n const dayOutsideBoundsStyles = useDayOutsideBoundsStyles();\n const dayOutsideNavigatedMonthStyles = useDayOutsideNavigatedMonthStyles();\n const dayButtonStyles = useDayButtonStyles();\n const dayIsTodayStyles = useDayIsTodayStyles();\n const firstTransitionWeekStyles = useFirstTransitionWeekStyles();\n const lastTransitionWeekStyles = useLastTransitionWeekStyles();\n const dayMarkerStyles = useDayMarkerStyles();\n const cornerBorderAndRadiusStyles = useCornerBorderAndRadiusStyles();\n const dayTodayMarkerStyles = useDayTodayMarkerStyles();\n\n const { animateBackwards, animationDirection, lightenDaysOutsideNavigatedMonth, showWeekNumbers } = props;\n\n return {\n wrapper: mergeClasses(calendarDayGridClassNames.wrapper, wrapperStyles.base),\n table: mergeClasses(\n calendarDayGridClassNames.table,\n tableStyles.base,\n showWeekNumbers && tableStyles.showWeekNumbers,\n ),\n dayCell: mergeClasses(\n calendarDayGridClassNames.dayCell,\n dayCellStyles.base,\n dayCellStyles.focusIndicator,\n cornerBorderAndRadiusStyles.corners,\n ),\n daySelected: mergeClasses(calendarDayGridClassNames.daySelected, daySelectedStyles.base),\n daySingleSelected: mergeClasses(calendarDayGridClassNames.daySingleSelected, daySingleSelectedStyles.base),\n weekRow: mergeClasses(\n calendarDayGridClassNames.weekRow,\n weekRowStyles.base,\n animateBackwards !== undefined && weekRowStyles.animation,\n animateBackwards !== undefined &&\n (animationDirection === AnimationDirection.Horizontal\n ? animateBackwards\n ? weekRowStyles.horizontalBackward\n : weekRowStyles.horizontalForward\n : animateBackwards\n ? weekRowStyles.verticalBackward\n : weekRowStyles.verticalForward),\n ),\n weekDayLabelCell: mergeClasses(calendarDayGridClassNames.weekDayLabelCell, weekDayLabelCellStyles.base),\n weekNumberCell: mergeClasses(calendarDayGridClassNames.weekNumberCell, weekNumberCellStyles.base),\n dayOutsideBounds: mergeClasses(calendarDayGridClassNames.dayOutsideBounds, dayOutsideBoundsStyles.base),\n dayOutsideNavigatedMonth: mergeClasses(\n calendarDayGridClassNames.dayOutsideNavigatedMonth,\n lightenDaysOutsideNavigatedMonth && dayOutsideNavigatedMonthStyles.lightenDaysOutsideNavigatedMonth,\n ),\n dayButton: mergeClasses(calendarDayGridClassNames.dayButton, dayButtonStyles.base),\n dayIsToday: mergeClasses(calendarDayGridClassNames.dayIsToday, dayIsTodayStyles.base),\n firstTransitionWeek: mergeClasses(\n calendarDayGridClassNames.firstTransitionWeek,\n firstTransitionWeekStyles.base,\n animateBackwards !== undefined &&\n animationDirection !== AnimationDirection.Horizontal &&\n !animateBackwards &&\n firstTransitionWeekStyles.verticalForward,\n ),\n lastTransitionWeek: mergeClasses(\n calendarDayGridClassNames.lastTransitionWeek,\n lastTransitionWeekStyles.base,\n animateBackwards !== undefined &&\n animationDirection !== AnimationDirection.Horizontal &&\n animateBackwards &&\n lastTransitionWeekStyles.verticalBackward,\n ),\n dayMarker: mergeClasses(calendarDayGridClassNames.dayMarker, dayMarkerStyles.base),\n dayTodayMarker: mergeClasses(calendarDayGridClassNames.dayTodayMarker, dayTodayMarkerStyles.base),\n };\n};\n"],"names":["tokens","makeStyles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","FADE_OUT","SLIDE_DOWN_IN20","SLIDE_DOWN_OUT20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","SLIDE_UP_OUT20","TRANSITION_ROW_DISAPPEARANCE","AnimationDirection","weekCornersClassNames","createFocusOutlineStyle","calendarDayGridClassNames","wrapper","table","dayCell","daySelected","daySingleSelected","weekRow","weekDayLabelCell","weekNumberCell","dayOutsideBounds","dayOutsideNavigatedMonth","dayButton","dayIsToday","firstTransitionWeek","lastTransitionWeek","dayMarker","dayTodayMarker","extraCalendarDayGridClassNames","hoverStyle","pressedStyle","useWrapperStyles","base","paddingBottom","useTableStyles","borderCollapse","borderSpacing","fontSize","marginTop","position","tableLayout","textAlign","width","showWeekNumbers","useDayCellStyles","color","colorNeutralForeground1","cursor","fontSizeBase200","fontWeight","fontWeightRegular","margin","padding","backgroundColor","colorNeutralForeground1Static","colorBrandBackgroundInvertedHover","outline","zIndex","colorBrandBackgroundInvertedPressed","borderColor","focusIndicator","style","outlineWidth","strokeWidthThick","borderWidth","useDaySelectedStyles","colorBrandBackgroundInvertedSelected","forcedColorAdjust","useDaySingleSelectedStyles","borderRadius","borderRadiusMedium","border","colorBrandStroke1","useWeekRowStyles","animation","animationDuration","animationFillMode","animationTimingFunction","horizontalBackward","animationName","horizontalForward","verticalBackward","verticalForward","useWeekDayLabelCellStyles","userSelect","useWeekNumberCellStyles","colorTransparentBackground","borderRight","colorNeutralStroke2","boxSizing","colorNeutralForeground4","height","useDayOutsideBoundsStyles","colorNeutralForegroundDisabled","pointerEvents","useDayOutsideNavigatedMonthStyles","lightenDaysOutsideNavigatedMonth","useDayButtonStyles","lineHeight","overflow","useDayIsTodayStyles","display","justifyContent","alignItems","colorNeutralForegroundOnBrand","fontWeightSemibold","useDayTodayMarkerStyles","colorBrandBackground","useFirstTransitionWeekStyles","opacity","useLastTransitionWeekStyles","useDayMarkerStyles","colorBrandForeground2","bottom","left","right","useCornerBorderAndRadiusStyles","corners","topRightCornerDate","borderTopRightRadius","topLeftCornerDate","borderTopLeftRadius","bottomRightCornerDate","borderBottomRightRadius","bottomLeftCornerDate","borderBottomLeftRadius","useCalendarDayGridStyles_unstable","props","wrapperStyles","tableStyles","dayCellStyles","daySelectedStyles","daySingleSelectedStyles","weekRowStyles","weekDayLabelCellStyles","weekNumberCellStyles","dayOutsideBoundsStyles","dayOutsideNavigatedMonthStyles","dayButtonStyles","dayIsTodayStyles","firstTransitionWeekStyles","lastTransitionWeekStyles","dayMarkerStyles","cornerBorderAndRadiusStyles","dayTodayMarkerStyles","animateBackwards","animationDirection","undefined","Horizontal"],"mappings":"AAAA,SAASA,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AACtE,SACEC,UAAU,EACVC,UAAU,EACVC,iBAAiB,EACjBC,iBAAiB,EACjBC,OAAO,EACPC,QAAQ,EACRC,eAAe,EACfC,gBAAgB,EAChBC,eAAe,EACfC,gBAAgB,EAChBC,aAAa,EACbC,cAAc,EACdC,4BAA4B,QACvB,cAAc;AACrB,SAASC,kBAAkB,QAAQ,6BAA6B;AAChE,SAASC,qBAAqB,QAAQ,+BAA+B;AACrE,SAASC,uBAAuB,QAAQ,0BAA0B;AAIlE;;CAEC,GACD,OAAO,MAAMC,4BAAmE;IAC9EC,SAAS;IACTC,OAAO;IACPC,SAAS;IACTC,aAAa;IACbC,mBAAmB;IACnBC,SAAS;IACTC,kBAAkB;IAClBC,gBAAgB;IAChBC,kBAAkB;IAClBC,0BAA0B;IAC1BC,WAAW;IACXC,YAAY;IACZC,qBAAqB;IACrBC,oBAAoB;IACpBC,WAAW;IACXC,gBAAgB;AAClB,EAAE;AAEF;;CAEC,GACD,OAAO,MAAMC,iCAAiC;IAC5CC,YAAY;IACZC,cAAc;AAChB,EAAE;AAEF,MAAMC,mBAAmBvC,WAAW;IAClCw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H,gBAAgB1G,IAAI;QACjFT,YAAY9B,aAAakB,0BAA0BY,UAAU,EAAEoH,iBAAiB3G,IAAI;QACpFR,qBAAqB/B,aACnBkB,0BAA0Ba,mBAAmB,EAC7CoH,0BAA0B5G,IAAI,EAC9BiH,qBAAqBE,aACnBD,uBAAuB1I,mBAAmB4I,UAAU,IACpD,CAACH,oBACDL,0BAA0B1D,eAAe;QAE7CzD,oBAAoBhC,aAClBkB,0BAA0Bc,kBAAkB,EAC5CoH,yBAAyB7G,IAAI,EAC7BiH,qBAAqBE,aACnBD,uBAAuB1I,mBAAmB4I,UAAU,IACpDH,oBACAJ,yBAAyB5D,gBAAgB;QAE7CvD,WAAWjC,aAAakB,0BAA0Be,SAAS,EAAEoH,gBAAgB9G,IAAI;QACjFL,gBAAgBlC,aAAakB,0BAA0BgB,cAAc,EAAEqH,qBAAqBhH,IAAI;IAClG;AACF,EAAE"}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
import { useFluent_unstable } from '@fluentui/react-shared-contexts';
|
2
|
+
import { mergeClasses } from '@griffel/react';
|
3
|
+
import { DateRangeType } from '../../utils/constants';
|
4
|
+
import { getDateRangeArray } from '../../utils/index';
|
5
|
+
/**
|
6
|
+
* @internal
|
7
|
+
*/ export const weekCornersClassNames = {
|
8
|
+
topRightCornerDate: 'fui-CalendarDayGrid__topRightCornerDate',
|
9
|
+
topLeftCornerDate: 'fui-CalendarDayGrid__topLeftCornerDate',
|
10
|
+
bottomRightCornerDate: 'fui-CalendarDayGrid__bottomRightCornerDate',
|
11
|
+
bottomLeftCornerDate: 'fui-CalendarDayGrid__bottomLeftCornerDate'
|
12
|
+
};
|
13
|
+
/**
|
14
|
+
* @internal
|
15
|
+
*/ export function useWeekCornerStyles(props) {
|
16
|
+
const { dir } = useFluent_unstable();
|
17
|
+
/**
|
18
|
+
*
|
19
|
+
* Section for setting the rounded corner styles on individual day cells. Individual day cells need different
|
20
|
+
* corners to be rounded depending on which date range type and where the cell is located in the current grid.
|
21
|
+
* If we just round all of the corners, there isn't a good overlap and we get gaps between contiguous day boxes
|
22
|
+
* in Edge browser.
|
23
|
+
*
|
24
|
+
*/ const getWeekCornerStyles = (initialWeeks)=>{
|
25
|
+
const weekCornersStyled = {};
|
26
|
+
/* need to handle setting all of the corners on arbitrarily shaped blobs
|
27
|
+
__
|
28
|
+
__|A |
|
29
|
+
|B |C |__
|
30
|
+
|D |E |F |
|
31
|
+
|
32
|
+
in this case, A needs top left rounded, top right rounded
|
33
|
+
B needs top left rounded
|
34
|
+
C doesn't need any rounding
|
35
|
+
D needs bottom left rounded
|
36
|
+
E doesn't need any rounding
|
37
|
+
F needs top right rounding
|
38
|
+
*/ // cut off the animation transition weeks
|
39
|
+
const weeks = initialWeeks.slice(1, initialWeeks.length - 1);
|
40
|
+
// if there's an item above, lose both top corners. Item below, lose both bottom corners, etc.
|
41
|
+
weeks.forEach((week, weekIndex)=>{
|
42
|
+
week.forEach((day, dayIndex)=>{
|
43
|
+
const above = weeks[weekIndex - 1] && weeks[weekIndex - 1][dayIndex] && isInSameHoverRange(weeks[weekIndex - 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex - 1][dayIndex].isSelected, day.isSelected);
|
44
|
+
const below = weeks[weekIndex + 1] && weeks[weekIndex + 1][dayIndex] && isInSameHoverRange(weeks[weekIndex + 1][dayIndex].originalDate, day.originalDate, weeks[weekIndex + 1][dayIndex].isSelected, day.isSelected);
|
45
|
+
const left = weeks[weekIndex][dayIndex - 1] && isInSameHoverRange(weeks[weekIndex][dayIndex - 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex - 1].isSelected, day.isSelected);
|
46
|
+
const right = weeks[weekIndex][dayIndex + 1] && isInSameHoverRange(weeks[weekIndex][dayIndex + 1].originalDate, day.originalDate, weeks[weekIndex][dayIndex + 1].isSelected, day.isSelected);
|
47
|
+
weekCornersStyled[weekIndex + '_' + dayIndex] = calculateRoundedStyles(above, below, left, right);
|
48
|
+
});
|
49
|
+
});
|
50
|
+
return weekCornersStyled;
|
51
|
+
};
|
52
|
+
const calculateRoundedStyles = (above, below, left, right)=>{
|
53
|
+
const style = [];
|
54
|
+
const roundedTopLeft = !above && !left;
|
55
|
+
const roundedTopRight = !above && !right;
|
56
|
+
const roundedBottomLeft = !below && !left;
|
57
|
+
const roundedBottomRight = !below && !right;
|
58
|
+
if (roundedTopLeft) {
|
59
|
+
style.push(dir === 'rtl' ? weekCornersClassNames.topRightCornerDate : weekCornersClassNames.topLeftCornerDate);
|
60
|
+
}
|
61
|
+
if (roundedTopRight) {
|
62
|
+
style.push(dir === 'rtl' ? weekCornersClassNames.topLeftCornerDate : weekCornersClassNames.topRightCornerDate);
|
63
|
+
}
|
64
|
+
if (roundedBottomLeft) {
|
65
|
+
style.push(dir === 'rtl' ? weekCornersClassNames.bottomRightCornerDate : weekCornersClassNames.bottomLeftCornerDate);
|
66
|
+
}
|
67
|
+
if (roundedBottomRight) {
|
68
|
+
style.push(dir === 'rtl' ? weekCornersClassNames.bottomLeftCornerDate : weekCornersClassNames.bottomRightCornerDate);
|
69
|
+
}
|
70
|
+
return mergeClasses(...style);
|
71
|
+
};
|
72
|
+
const isInSameHoverRange = (date1, date2, date1Selected, date2Selected)=>{
|
73
|
+
const { dateRangeType, firstDayOfWeek, workWeekDays } = props;
|
74
|
+
// The hover state looks weird with non-contiguous days in work week view. In work week, show week hover state
|
75
|
+
const dateRangeHoverType = dateRangeType === DateRangeType.WorkWeek ? DateRangeType.Week : dateRangeType;
|
76
|
+
// we do not pass daysToSelectInDayView because we handle setting those styles dyanamically in onMouseOver
|
77
|
+
const dateRange = getDateRangeArray(date1, dateRangeHoverType, firstDayOfWeek, workWeekDays);
|
78
|
+
if (date1Selected !== date2Selected) {
|
79
|
+
// if one is selected and the other is not, they can't be in the same range
|
80
|
+
return false;
|
81
|
+
} else if (date1Selected && date2Selected) {
|
82
|
+
// if they're both selected at the same time they must be in the same range
|
83
|
+
return true;
|
84
|
+
}
|
85
|
+
// otherwise, both must be unselected, so check the dateRange
|
86
|
+
return dateRange.filter((date)=>date.getTime() === date2.getTime()).length > 0;
|
87
|
+
};
|
88
|
+
return [
|
89
|
+
getWeekCornerStyles,
|
90
|
+
calculateRoundedStyles
|
91
|
+
];
|
92
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/useWeekCornerStyles.styles.ts"],"sourcesContent":["import { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { mergeClasses } from '@griffel/react';\nimport { DateRangeType } from '../../utils/constants';\nimport { getDateRangeArray } from '../../utils/index';\nimport { DayInfo } from './CalendarDayGrid';\nimport { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport const weekCornersClassNames = {\n topRightCornerDate: 'fui-CalendarDayGrid__topRightCornerDate',\n topLeftCornerDate: 'fui-CalendarDayGrid__topLeftCornerDate',\n bottomRightCornerDate: 'fui-CalendarDayGrid__bottomRightCornerDate',\n bottomLeftCornerDate: 'fui-CalendarDayGrid__bottomLeftCornerDate',\n};\n\n/**\n * @internal\n */\nexport interface WeekCorners {\n [key: string]: string;\n}\n\n/**\n * @internal\n */\nexport function useWeekCornerStyles(props: CalendarDayGridProps) {\n const { dir } = useFluent_unstable();\n\n /**\n *\n * Section for setting the rounded corner styles on individual day cells. Individual day cells need different\n * corners to be rounded depending on which date range type and where the cell is located in the current grid.\n * If we just round all of the corners, there isn't a good overlap and we get gaps between contiguous day boxes\n * in Edge browser.\n *\n */\n const getWeekCornerStyles = (initialWeeks: DayInfo[][]): WeekCorners => {\n const weekCornersStyled: { [key: string]: string } = {};\n /* need to handle setting all of the corners on arbitrarily shaped blobs\n __\n __|A |\n |B |C |__\n |D |E |F |\n\n in this case, A needs top left rounded, top right rounded\n B needs top left rounded\n C doesn't need any rounding\n D needs bottom left rounded\n E doesn't need any rounding\n F needs top right rounding\n */\n\n // cut off the animation transition weeks\n const weeks = initialWeeks.slice(1, initialWeeks.length - 1);\n\n // if there's an item above, lose both top corners. Item below, lose both bottom corners, etc.\n weeks.forEach((week: DayInfo[], weekIndex: number) => {\n week.forEach((day: DayInfo, dayIndex: number) => {\n const above =\n weeks[weekIndex - 1] &&\n weeks[weekIndex - 1][dayIndex] &&\n isInSameHoverRange(\n weeks[weekIndex - 1][dayIndex].originalDate,\n day.originalDate,\n weeks[weekIndex - 1][dayIndex].isSelected,\n day.isSelected,\n );\n const below =\n weeks[weekIndex + 1] &&\n weeks[weekIndex + 1][dayIndex] &&\n isInSameHoverRange(\n weeks[weekIndex + 1][dayIndex].originalDate,\n day.originalDate,\n weeks[weekIndex + 1][dayIndex].isSelected,\n day.isSelected,\n );\n const left =\n weeks[weekIndex][dayIndex - 1] &&\n isInSameHoverRange(\n weeks[weekIndex][dayIndex - 1].originalDate,\n day.originalDate,\n weeks[weekIndex][dayIndex - 1].isSelected,\n day.isSelected,\n );\n const right =\n weeks[weekIndex][dayIndex + 1] &&\n isInSameHoverRange(\n weeks[weekIndex][dayIndex + 1].originalDate,\n day.originalDate,\n weeks[weekIndex][dayIndex + 1].isSelected,\n day.isSelected,\n );\n\n weekCornersStyled[weekIndex + '_' + dayIndex] = calculateRoundedStyles(above, below, left, right);\n });\n });\n\n return weekCornersStyled;\n };\n\n const calculateRoundedStyles = (above: boolean, below: boolean, left: boolean, right: boolean): string => {\n const style = [];\n const roundedTopLeft = !above && !left;\n const roundedTopRight = !above && !right;\n const roundedBottomLeft = !below && !left;\n const roundedBottomRight = !below && !right;\n\n if (roundedTopLeft) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topRightCornerDate : weekCornersClassNames.topLeftCornerDate);\n }\n if (roundedTopRight) {\n style.push(dir === 'rtl' ? weekCornersClassNames.topLeftCornerDate : weekCornersClassNames.topRightCornerDate);\n }\n if (roundedBottomLeft) {\n style.push(\n dir === 'rtl' ? weekCornersClassNames.bottomRightCornerDate : weekCornersClassNames.bottomLeftCornerDate,\n );\n }\n if (roundedBottomRight) {\n style.push(\n dir === 'rtl' ? weekCornersClassNames.bottomLeftCornerDate : weekCornersClassNames.bottomRightCornerDate,\n );\n }\n\n return mergeClasses(...style);\n };\n\n const isInSameHoverRange = (date1: Date, date2: Date, date1Selected: boolean, date2Selected: boolean): boolean => {\n const { dateRangeType, firstDayOfWeek, workWeekDays } = props;\n\n // The hover state looks weird with non-contiguous days in work week view. In work week, show week hover state\n const dateRangeHoverType = dateRangeType === DateRangeType.WorkWeek ? DateRangeType.Week : dateRangeType;\n\n // we do not pass daysToSelectInDayView because we handle setting those styles dyanamically in onMouseOver\n const dateRange = getDateRangeArray(date1, dateRangeHoverType, firstDayOfWeek, workWeekDays);\n\n if (date1Selected !== date2Selected) {\n // if one is selected and the other is not, they can't be in the same range\n return false;\n } else if (date1Selected && date2Selected) {\n // if they're both selected at the same time they must be in the same range\n return true;\n }\n\n // otherwise, both must be unselected, so check the dateRange\n return dateRange.filter((date: Date) => date.getTime() === date2.getTime()).length > 0;\n };\n\n return [getWeekCornerStyles, calculateRoundedStyles] as const;\n}\n"],"names":["useFluent_unstable","mergeClasses","DateRangeType","getDateRangeArray","weekCornersClassNames","topRightCornerDate","topLeftCornerDate","bottomRightCornerDate","bottomLeftCornerDate","useWeekCornerStyles","props","dir","getWeekCornerStyles","initialWeeks","weekCornersStyled","weeks","slice","length","forEach","week","weekIndex","day","dayIndex","above","isInSameHoverRange","originalDate","isSelected","below","left","right","calculateRoundedStyles","style","roundedTopLeft","roundedTopRight","roundedBottomLeft","roundedBottomRight","push","date1","date2","date1Selected","date2Selected","dateRangeType","firstDayOfWeek","workWeekDays","dateRangeHoverType","WorkWeek","Week","dateRange","filter","date","getTime"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,iBAAiB,QAAQ,oBAAoB;AAItD;;CAEC,GACD,OAAO,MAAMC,wBAAwB;IACnCC,oBAAoB;IACpBC,mBAAmB;IACnBC,uBAAu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IAAIJ,kBAAkBC,eAAe;YACnC,2EAA2E;YAC3E,OAAO;QACT,OAAO,IAAID,iBAAiBC,eAAe;YACzC,2EAA2E;YAC3E,OAAO;QACT;QAEA,6DAA6D;QAC7D,OAAOO,UAAUC,MAAM,CAAC,CAACC,OAAeA,KAAKC,OAAO,OAAOZ,MAAMY,OAAO,IAAIjC,MAAM,GAAG;IACvF;IAEA,OAAO;QAACL;QAAqBkB;KAAuB;AACtD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/CalendarDayGrid/useWeeks.ts"],"sourcesContent":["import * as React from 'react';\nimport { compareDates, DAYS_IN_WEEK, getDayGrid } from '../../utils/index';\nimport { DayInfo } from './CalendarDayGrid';\nimport { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport function useWeeks(\n props: CalendarDayGridProps,\n onSelectDate: (date: Date) => void,\n getSetRefCallback: (dayKey: string) => (element: HTMLElement | null) => void,\n): DayInfo[][] {\n 'use no memo';\n\n /**\n * Initial parsing of the given props to generate IDayInfo two dimensional array, which contains a representation\n * of every day in the grid. Convenient for helping with conversions between day refs and Date objects in callbacks.\n */\n const weeks = React.useMemo((): DayInfo[][] => {\n const weeksGrid = getDayGrid(props);\n\n const firstVisibleDay = weeksGrid[1][0].originalDate;\n const lastVisibleDay = weeksGrid[weeksGrid.length - 1][6].originalDate;\n const markedDays = props.getMarkedDays?.(firstVisibleDay, lastVisibleDay) || [];\n\n /**\n * Weeks is a 2D array. Weeks[0] contains the last week of the prior range,\n * Weeks[weeks.length - 1] contains first week of next range. These are for transition states.\n *\n * Weeks[1... weeks.length - 2] contains the actual visible data\n */\n const returnValue: DayInfo[][] = [];\n\n for (let weekIndex = 0; weekIndex < weeksGrid.length; weekIndex++) {\n const week: DayInfo[] = [];\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const day = weeksGrid[weekIndex][dayIndex];\n const dayInfo: DayInfo = {\n onSelected: () => onSelectDate(day.originalDate),\n setRef: getSetRefCallback(day.key),\n ...day,\n isMarked: day.isMarked || markedDays?.some(markedDay => compareDates(day.originalDate, markedDay)),\n };\n\n week.push(dayInfo);\n }\n returnValue.push(week);\n }\n\n return returnValue;\n // TODO: this is missing deps on getSetRefCallback and onSelectDate (and depending on the entire\n // props object may not be a good idea due to likely frequent mutation). It would be easy to\n // fix getSetRefCallback to not mutate every render, but onSelectDate is passed down from\n // Calendar and trying to fix it requires a huge cascade of changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n\n return weeks;\n}\n"],"names":["React","compareDates","DAYS_IN_WEEK","getDayGrid","useWeeks","props","onSelectDate","getSetRefCallback","weeks","useMemo","weeksGrid","firstVisibleDay","originalDate","lastVisibleDay","length","markedDays","getMarkedDays","returnValue","weekIndex","week","dayIndex","day","dayInfo","onSelected","setRef","key","isMarked","some","markedDay","push"],"
|
1
|
+
{"version":3,"sources":["../src/components/CalendarDayGrid/useWeeks.ts"],"sourcesContent":["import * as React from 'react';\nimport { compareDates, DAYS_IN_WEEK, getDayGrid } from '../../utils/index';\nimport { DayInfo } from './CalendarDayGrid';\nimport { CalendarDayGridProps } from './CalendarDayGrid.types';\n\n/**\n * @internal\n */\nexport function useWeeks(\n props: CalendarDayGridProps,\n onSelectDate: (date: Date) => void,\n getSetRefCallback: (dayKey: string) => (element: HTMLElement | null) => void,\n): DayInfo[][] {\n 'use no memo';\n\n /**\n * Initial parsing of the given props to generate IDayInfo two dimensional array, which contains a representation\n * of every day in the grid. Convenient for helping with conversions between day refs and Date objects in callbacks.\n */\n const weeks = React.useMemo((): DayInfo[][] => {\n const weeksGrid = getDayGrid(props);\n\n const firstVisibleDay = weeksGrid[1][0].originalDate;\n const lastVisibleDay = weeksGrid[weeksGrid.length - 1][6].originalDate;\n const markedDays = props.getMarkedDays?.(firstVisibleDay, lastVisibleDay) || [];\n\n /**\n * Weeks is a 2D array. Weeks[0] contains the last week of the prior range,\n * Weeks[weeks.length - 1] contains first week of next range. These are for transition states.\n *\n * Weeks[1... weeks.length - 2] contains the actual visible data\n */\n const returnValue: DayInfo[][] = [];\n\n for (let weekIndex = 0; weekIndex < weeksGrid.length; weekIndex++) {\n const week: DayInfo[] = [];\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const day = weeksGrid[weekIndex][dayIndex];\n const dayInfo: DayInfo = {\n onSelected: () => onSelectDate(day.originalDate),\n setRef: getSetRefCallback(day.key),\n ...day,\n isMarked: day.isMarked || markedDays?.some(markedDay => compareDates(day.originalDate, markedDay)),\n };\n\n week.push(dayInfo);\n }\n returnValue.push(week);\n }\n\n return returnValue;\n // TODO: this is missing deps on getSetRefCallback and onSelectDate (and depending on the entire\n // props object may not be a good idea due to likely frequent mutation). It would be easy to\n // fix getSetRefCallback to not mutate every render, but onSelectDate is passed down from\n // Calendar and trying to fix it requires a huge cascade of changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n\n return weeks;\n}\n"],"names":["React","compareDates","DAYS_IN_WEEK","getDayGrid","useWeeks","props","onSelectDate","getSetRefCallback","weeks","useMemo","weeksGrid","firstVisibleDay","originalDate","lastVisibleDay","length","markedDays","getMarkedDays","returnValue","weekIndex","week","dayIndex","day","dayInfo","onSelected","setRef","key","isMarked","some","markedDay","push"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,EAAEC,YAAY,EAAEC,UAAU,QAAQ,oBAAoB;AAI3E;;CAEC,GACD,OAAO,SAASC,SACdC,KAA2B,EAC3BC,YAAkC,EAClCC,iBAA4E;IAE5E;IAEA;;;GAGC,GACD,MAAMC,QAAQR,MAAMS,OAAO,CAAC;YAKPJ;QAJnB,MAAMK,YAAYP,WAAWE;QAE7B,MAAMM,kBAAkBD,SAAS,CAAC,EAAE,CAAC,EAAE,CAACE,YAAY;QACpD,MAAMC,iBAAiBH,SAAS,CAACA,UAAUI,MAAM,GAAG,EAAE,CAAC,EAAE,CAACF,YAAY;Q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