@fluentui/react-datepicker-compat 0.0.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +191 -5
- package/CHANGELOG.md +49 -6
- package/README.md +1 -1
- package/dist/index.d.ts +13 -8
- package/lib/components/Calendar/Calendar.js +1 -1
- package/lib/components/Calendar/Calendar.js.map +1 -1
- package/lib/components/Calendar/index.js +1 -1
- package/lib/components/Calendar/index.js.map +1 -1
- package/lib/components/Calendar/{useCalendarStyles.js → useCalendarStyles.styles.js} +1 -1
- package/lib/components/Calendar/useCalendarStyles.styles.js.map +1 -0
- package/lib/components/CalendarDay/CalendarDay.js +1 -1
- package/lib/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib/components/CalendarDay/index.js +1 -1
- package/lib/components/CalendarDay/index.js.map +1 -1
- package/lib/components/CalendarDay/{useCalendarDayStyles.js → useCalendarDayStyles.styles.js} +1 -1
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js +2 -2
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +2 -2
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
- package/lib/components/CalendarDayGrid/index.js +2 -2
- package/lib/components/CalendarDayGrid/index.js.map +1 -1
- package/lib/components/CalendarDayGrid/{useCalendarDayGridStyles.js → useCalendarDayGridStyles.styles.js} +2 -2
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -0
- package/lib/components/CalendarDayGrid/{useWeekCornerStyles.js → useWeekCornerStyles.styles.js} +1 -1
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -0
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js +1 -1
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -1
- package/lib/components/CalendarPicker/index.js +1 -1
- package/lib/components/CalendarPicker/index.js.map +1 -1
- package/lib/components/CalendarPicker/{useCalendarPickerStyles.js → useCalendarPickerStyles.styles.js} +1 -1
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -0
- package/lib/components/CalendarYear/CalendarYear.js +1 -1
- package/lib/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib/components/CalendarYear/index.js +1 -1
- package/lib/components/CalendarYear/index.js.map +1 -1
- package/lib/components/CalendarYear/{useCalendarYearStyles.js → useCalendarYearStyles.styles.js} +2 -2
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -0
- package/lib/components/DatePicker/DatePicker.js +1 -1
- package/lib/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/components/DatePicker/DatePicker.types.js.map +1 -1
- package/lib/components/DatePicker/defaults.js.map +1 -1
- package/lib/components/DatePicker/index.js +1 -1
- package/lib/components/DatePicker/index.js.map +1 -1
- package/lib/components/DatePicker/useDatePicker.js +10 -14
- package/lib/components/DatePicker/useDatePicker.js.map +1 -1
- package/lib/components/DatePicker/{useDatePickerStyles.js → useDatePickerStyles.styles.js} +1 -1
- package/lib/components/DatePicker/useDatePickerStyles.styles.js.map +1 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Calendar/Calendar.js +2 -2
- package/lib-commonjs/components/Calendar/Calendar.js.map +1 -1
- package/lib-commonjs/components/Calendar/index.js +1 -1
- package/lib-commonjs/components/Calendar/index.js.map +1 -1
- package/lib-commonjs/components/Calendar/{useCalendarStyles.js → useCalendarStyles.styles.js} +2 -2
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.js +2 -2
- package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/index.js +1 -1
- package/lib-commonjs/components/CalendarDay/index.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/{useCalendarDayStyles.js → useCalendarDayStyles.styles.js} +2 -2
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js +4 -4
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +8 -8
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/index.js +3 -3
- package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/{useCalendarDayGridStyles.js → useCalendarDayGridStyles.styles.js} +2 -2
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/{useWeekCornerStyles.js → useWeekCornerStyles.styles.js} +2 -2
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js +2 -2
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/index.js +1 -1
- package/lib-commonjs/components/CalendarPicker/index.js.map +1 -1
- package/lib-commonjs/components/CalendarPicker/{useCalendarPickerStyles.js → useCalendarPickerStyles.styles.js} +2 -2
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.js +8 -8
- package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/index.js +1 -1
- package/lib-commonjs/components/CalendarYear/index.js.map +1 -1
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js +14 -0
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DatePicker/DatePicker.js +2 -2
- package/lib-commonjs/components/DatePicker/DatePicker.js.map +1 -1
- package/lib-commonjs/components/DatePicker/index.js +1 -1
- package/lib-commonjs/components/DatePicker/index.js.map +1 -1
- package/lib-commonjs/components/DatePicker/useDatePicker.js +10 -14
- package/lib-commonjs/components/DatePicker/useDatePicker.js.map +1 -1
- package/lib-commonjs/components/DatePicker/{useDatePickerStyles.js → useDatePickerStyles.styles.js} +2 -2
- package/lib-commonjs/components/DatePicker/useDatePickerStyles.styles.js.map +1 -0
- package/package.json +15 -14
- package/.swcrc +0 -30
- package/lib/components/Calendar/useCalendarStyles.js.map +0 -1
- package/lib/components/CalendarDay/useCalendarDayStyles.js.map +0 -1
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.js.map +0 -1
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.js.map +0 -1
- package/lib/components/CalendarPicker/useCalendarPickerStyles.js.map +0 -1
- package/lib/components/CalendarYear/useCalendarYearStyles.js.map +0 -1
- package/lib/components/DatePicker/useDatePickerStyles.js.map +0 -1
- package/lib-commonjs/components/Calendar/useCalendarStyles.js.map +0 -1
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.js.map +0 -1
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.js.map +0 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.js.map +0 -1
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.js.map +0 -1
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.js +0 -14
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.js.map +0 -1
- package/lib-commonjs/components/DatePicker/useDatePickerStyles.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,193 @@
|
|
|
2
2
|
"name": "@fluentui/react-datepicker-compat",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 18 May 2023 00:35:36 GMT",
|
|
6
|
+
"tag": "@fluentui/react-datepicker-compat_v0.1.1",
|
|
7
|
+
"version": "0.1.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"author": "olfedias@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
13
|
+
"commit": "06cd515eda59a3078bfe32f9cc7c1f281cd20208",
|
|
14
|
+
"comment": "chore: add test-ssr script to v9 packages"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"patch": [
|
|
18
|
+
{
|
|
19
|
+
"author": "beachball",
|
|
20
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
21
|
+
"comment": "Bump @fluentui/react-field to v9.1.3",
|
|
22
|
+
"commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"author": "beachball",
|
|
26
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
27
|
+
"comment": "Bump @fluentui/react-input to v9.4.13",
|
|
28
|
+
"commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"author": "beachball",
|
|
32
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
33
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.4",
|
|
34
|
+
"commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"author": "beachball",
|
|
38
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
39
|
+
"comment": "Bump @fluentui/react-popover to v9.5.12",
|
|
40
|
+
"commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"author": "beachball",
|
|
44
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
45
|
+
"comment": "Bump @fluentui/react-portal to v9.2.8",
|
|
46
|
+
"commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"author": "beachball",
|
|
50
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
51
|
+
"comment": "Bump @fluentui/react-positioning to v9.5.12",
|
|
52
|
+
"commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"author": "beachball",
|
|
56
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
57
|
+
"comment": "Bump @fluentui/react-tabster to v9.7.1",
|
|
58
|
+
"commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"author": "beachball",
|
|
62
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
63
|
+
"comment": "Bump @fluentui/react-utilities to v9.9.0",
|
|
64
|
+
"commit": "c496a1cf1ec82c08753df72c9061e84b77b7daeb"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"date": "Fri, 12 May 2023 20:28:26 GMT",
|
|
71
|
+
"tag": "@fluentui/react-datepicker-compat_v0.1.0",
|
|
72
|
+
"version": "0.1.0",
|
|
73
|
+
"comments": {
|
|
74
|
+
"none": [
|
|
75
|
+
{
|
|
76
|
+
"author": "esteban.230@hotmail.com",
|
|
77
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
78
|
+
"commit": "66f1e1d23e4e6cf93bd513c69751740621d67894",
|
|
79
|
+
"comment": "chore: Add description to README."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"author": "martinhochel@microsoft.com",
|
|
83
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
84
|
+
"commit": "dbda7fa69e3000aaf8dd4a061e254ebd35198b8e",
|
|
85
|
+
"comment": "fix: update npmignore files to fix npm8/node16 regression how npm publish works"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"patch": [
|
|
89
|
+
{
|
|
90
|
+
"author": "olfedias@microsoft.com",
|
|
91
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
92
|
+
"commit": "871192b67e1bc8a68da1b4c55b4e0ee2aed0b604",
|
|
93
|
+
"comment": "chore: move makeStyles() calls to .styles.ts files"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"author": "olfedias@microsoft.com",
|
|
97
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
98
|
+
"commit": "c28decb23d191a0daaaf6d5d1832429715102129",
|
|
99
|
+
"comment": "chore: exclude .swcrc from being published"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"author": "olfedias@microsoft.com",
|
|
103
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
104
|
+
"commit": "6c236e60a1a0def5418dc8d930df1e16dbad70d4",
|
|
105
|
+
"comment": "chore: update version"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"minor": [
|
|
109
|
+
{
|
|
110
|
+
"author": "esteban.230@hotmail.com",
|
|
111
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
112
|
+
"commit": "ae2b1a097d0dc2e53699f600d1d5d96110e99a5f",
|
|
113
|
+
"comment": "fix: Make onValidationError onValidationResult so the error is updated when there's no longer an error."
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"author": "beachball",
|
|
117
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
118
|
+
"comment": "Bump @fluentui/keyboard-keys to v9.0.3",
|
|
119
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"author": "beachball",
|
|
123
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
124
|
+
"comment": "Bump @fluentui/react-field to v9.1.2",
|
|
125
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"author": "beachball",
|
|
129
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
130
|
+
"comment": "Bump @fluentui/react-input to v9.4.12",
|
|
131
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"author": "beachball",
|
|
135
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
136
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.3",
|
|
137
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"author": "beachball",
|
|
141
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
142
|
+
"comment": "Bump @fluentui/react-popover to v9.5.11",
|
|
143
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"author": "beachball",
|
|
147
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
148
|
+
"comment": "Bump @fluentui/react-portal to v9.2.7",
|
|
149
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"author": "beachball",
|
|
153
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
154
|
+
"comment": "Bump @fluentui/react-positioning to v9.5.11",
|
|
155
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"author": "beachball",
|
|
159
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
160
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.4.0",
|
|
161
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"author": "beachball",
|
|
165
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
166
|
+
"comment": "Bump @fluentui/react-tabster to v9.7.0",
|
|
167
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"author": "beachball",
|
|
171
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
172
|
+
"comment": "Bump @fluentui/react-theme to v9.1.8",
|
|
173
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"author": "beachball",
|
|
177
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
178
|
+
"comment": "Bump @fluentui/react-utilities to v9.8.1",
|
|
179
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"author": "beachball",
|
|
183
|
+
"package": "@fluentui/react-datepicker-compat",
|
|
184
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.21",
|
|
185
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"date": "Mon, 24 Apr 2023 08:12:34 GMT",
|
|
6
192
|
"tag": "@fluentui/react-datepicker-compat_v0.0.0",
|
|
7
193
|
"version": "0.0.0",
|
|
8
194
|
"comments": {
|
|
@@ -29,25 +215,25 @@
|
|
|
29
215
|
"author": "beachball",
|
|
30
216
|
"package": "@fluentui/react-datepicker-compat",
|
|
31
217
|
"comment": "Bump @fluentui/react-field to v9.1.1",
|
|
32
|
-
"commit": "
|
|
218
|
+
"commit": "505433ac64f144c9cca456097413d6af4582e5ee"
|
|
33
219
|
},
|
|
34
220
|
{
|
|
35
221
|
"author": "beachball",
|
|
36
222
|
"package": "@fluentui/react-datepicker-compat",
|
|
37
223
|
"comment": "Bump @fluentui/react-input to v9.4.11",
|
|
38
|
-
"commit": "
|
|
224
|
+
"commit": "505433ac64f144c9cca456097413d6af4582e5ee"
|
|
39
225
|
},
|
|
40
226
|
{
|
|
41
227
|
"author": "beachball",
|
|
42
228
|
"package": "@fluentui/react-datepicker-compat",
|
|
43
229
|
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.2",
|
|
44
|
-
"commit": "
|
|
230
|
+
"commit": "505433ac64f144c9cca456097413d6af4582e5ee"
|
|
45
231
|
},
|
|
46
232
|
{
|
|
47
233
|
"author": "beachball",
|
|
48
234
|
"package": "@fluentui/react-datepicker-compat",
|
|
49
235
|
"comment": "Bump @fluentui/react-popover to v9.5.10",
|
|
50
|
-
"commit": "
|
|
236
|
+
"commit": "505433ac64f144c9cca456097413d6af4582e5ee"
|
|
51
237
|
}
|
|
52
238
|
],
|
|
53
239
|
"patch": [
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,55 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-datepicker-compat
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 18 May 2023 00:35:36 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [0.1.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-datepicker-compat_v0.1.1)
|
|
8
|
+
|
|
9
|
+
Thu, 18 May 2023 00:35:36 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-datepicker-compat_v0.1.0..@fluentui/react-datepicker-compat_v0.1.1)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-field to v9.1.3 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
|
|
15
|
+
- Bump @fluentui/react-input to v9.4.13 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.4 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
|
|
17
|
+
- Bump @fluentui/react-popover to v9.5.12 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
|
|
18
|
+
- Bump @fluentui/react-portal to v9.2.8 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
|
|
19
|
+
- Bump @fluentui/react-positioning to v9.5.12 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
|
|
20
|
+
- Bump @fluentui/react-tabster to v9.7.1 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
|
|
21
|
+
- Bump @fluentui/react-utilities to v9.9.0 ([PR #27834](https://github.com/microsoft/fluentui/pull/27834) by beachball)
|
|
22
|
+
|
|
23
|
+
## [0.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-datepicker-compat_v0.1.0)
|
|
24
|
+
|
|
25
|
+
Fri, 12 May 2023 20:28:26 GMT
|
|
26
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-datepicker-compat_v0.0.0..@fluentui/react-datepicker-compat_v0.1.0)
|
|
27
|
+
|
|
28
|
+
### Minor changes
|
|
29
|
+
|
|
30
|
+
- fix: Make onValidationError onValidationResult so the error is updated when there's no longer an error. ([PR #27655](https://github.com/microsoft/fluentui/pull/27655) by esteban.230@hotmail.com)
|
|
31
|
+
- Bump @fluentui/keyboard-keys to v9.0.3 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
32
|
+
- Bump @fluentui/react-field to v9.1.2 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
33
|
+
- Bump @fluentui/react-input to v9.4.12 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
34
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.3 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
35
|
+
- Bump @fluentui/react-popover to v9.5.11 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
36
|
+
- Bump @fluentui/react-portal to v9.2.7 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
37
|
+
- Bump @fluentui/react-positioning to v9.5.11 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
38
|
+
- Bump @fluentui/react-shared-contexts to v9.4.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
39
|
+
- Bump @fluentui/react-tabster to v9.7.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
40
|
+
- Bump @fluentui/react-theme to v9.1.8 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
41
|
+
- Bump @fluentui/react-utilities to v9.8.1 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
42
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.21 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
|
43
|
+
|
|
44
|
+
### Patches
|
|
45
|
+
|
|
46
|
+
- chore: move makeStyles() calls to .styles.ts files ([PR #27710](https://github.com/microsoft/fluentui/pull/27710) by olfedias@microsoft.com)
|
|
47
|
+
- chore: exclude .swcrc from being published ([PR #27740](https://github.com/microsoft/fluentui/pull/27740) by olfedias@microsoft.com)
|
|
48
|
+
- chore: update version ([PR #27666](https://github.com/microsoft/fluentui/pull/27666) by olfedias@microsoft.com)
|
|
49
|
+
|
|
7
50
|
## [0.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-datepicker-compat_v0.0.0)
|
|
8
51
|
|
|
9
|
-
Mon, 24 Apr 2023 08:
|
|
52
|
+
Mon, 24 Apr 2023 08:12:34 GMT
|
|
10
53
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-datepicker-compat_v0.0.0-beta.2..@fluentui/react-datepicker-compat_v0.0.0)
|
|
11
54
|
|
|
12
55
|
### Minor changes
|
|
@@ -14,10 +57,10 @@ Mon, 24 Apr 2023 08:09:08 GMT
|
|
|
14
57
|
- feat: Add error handling to DatePicker. ([PR #27637](https://github.com/microsoft/fluentui/pull/27637) by esteban.230@hotmail.com)
|
|
15
58
|
- feat: Move DatePicker compat to stable. ([PR #27378](https://github.com/microsoft/fluentui/pull/27378) by esteban.230@hotmail.com)
|
|
16
59
|
- feat: Refactor DatePicker to remove Field and error handling logic. ([PR #27509](https://github.com/microsoft/fluentui/pull/27509) by esteban.230@hotmail.com)
|
|
17
|
-
- Bump @fluentui/react-field to v9.1.1 ([
|
|
18
|
-
- Bump @fluentui/react-input to v9.4.11 ([
|
|
19
|
-
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.2 ([
|
|
20
|
-
- Bump @fluentui/react-popover to v9.5.10 ([
|
|
60
|
+
- Bump @fluentui/react-field to v9.1.1 ([commit](https://github.com/microsoft/fluentui/commit/505433ac64f144c9cca456097413d6af4582e5ee) by beachball)
|
|
61
|
+
- Bump @fluentui/react-input to v9.4.11 ([commit](https://github.com/microsoft/fluentui/commit/505433ac64f144c9cca456097413d6af4582e5ee) by beachball)
|
|
62
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.2 ([commit](https://github.com/microsoft/fluentui/commit/505433ac64f144c9cca456097413d6af4582e5ee) by beachball)
|
|
63
|
+
- Bump @fluentui/react-popover to v9.5.10 ([commit](https://github.com/microsoft/fluentui/commit/505433ac64f144c9cca456097413d6af4582e5ee) by beachball)
|
|
21
64
|
|
|
22
65
|
### Patches
|
|
23
66
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**React Datepicker components for [Fluent UI React](https://react.fluentui.dev/)**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Picking a date can be tough without context. A date picker (DatePicker) offers a popup control that’s optimized for picking a single date from a calendar view where contextual information like the day of the week or fullness of the calendar is important. You can modify the calendar to provide additional context or to limit available dates.
|
|
6
6
|
|
|
7
7
|
## Usage
|
|
8
8
|
|
package/dist/index.d.ts
CHANGED
|
@@ -669,12 +669,9 @@ export declare const DatePicker: ForwardRefComponent<DatePickerProps>;
|
|
|
669
669
|
export declare const datePickerClassNames: SlotClassNames<DatePickerSlots>;
|
|
670
670
|
|
|
671
671
|
/**
|
|
672
|
-
*
|
|
672
|
+
* Error types returned by the `onValidationResult` callback.
|
|
673
673
|
*/
|
|
674
|
-
export declare type
|
|
675
|
-
/** The error found when validating the input. */
|
|
676
|
-
error: 'invalid-input' | 'out-of-bounds' | 'required-input';
|
|
677
|
-
};
|
|
674
|
+
export declare type DatePickerErrorType = 'invalid-input' | 'out-of-bounds' | 'required-input';
|
|
678
675
|
|
|
679
676
|
export declare type DatePickerProps = Omit<ComponentProps<Partial<DatePickerSlots>>, 'defaultValue' | 'value'> & {
|
|
680
677
|
/**
|
|
@@ -744,9 +741,9 @@ export declare type DatePickerProps = Omit<ComponentProps<Partial<DatePickerSlot
|
|
|
744
741
|
*/
|
|
745
742
|
onOpenChange?: (open: boolean) => void;
|
|
746
743
|
/**
|
|
747
|
-
* Callback to run
|
|
744
|
+
* Callback to run after the DatePicker's input has been validated
|
|
748
745
|
*/
|
|
749
|
-
|
|
746
|
+
onValidationResult?: (data: DatePickerValidationResultData) => void;
|
|
750
747
|
/**
|
|
751
748
|
* Whether the DatePicker should render the popup as inline or in a portal
|
|
752
749
|
*
|
|
@@ -861,6 +858,14 @@ declare type DatePickerState = ComponentState<DatePickerSlots> & {
|
|
|
861
858
|
inlinePopup: boolean;
|
|
862
859
|
};
|
|
863
860
|
|
|
861
|
+
/**
|
|
862
|
+
* Data passed to the `onValidationResult` callback.
|
|
863
|
+
*/
|
|
864
|
+
export declare type DatePickerValidationResultData = {
|
|
865
|
+
/** The error found when validating the input. */
|
|
866
|
+
error?: DatePickerErrorType;
|
|
867
|
+
};
|
|
868
|
+
|
|
864
869
|
/**
|
|
865
870
|
* The supported date range types
|
|
866
871
|
*/
|
|
@@ -938,7 +943,7 @@ export declare enum DayOfWeek {
|
|
|
938
943
|
|
|
939
944
|
export declare const DAYS_IN_WEEK = 7;
|
|
940
945
|
|
|
941
|
-
export declare const defaultDatePickerErrorStrings: Record<
|
|
946
|
+
export declare const defaultDatePickerErrorStrings: Record<DatePickerErrorType, string>;
|
|
942
947
|
|
|
943
948
|
export declare const defaultDatePickerStrings: CalendarStrings;
|
|
944
949
|
|
|
@@ -4,7 +4,7 @@ import { useControllableState } from '@fluentui/react-utilities';
|
|
|
4
4
|
import { addMonths, addYears, DateRangeType, DayOfWeek, DEFAULT_CALENDAR_STRINGS, DEFAULT_DATE_FORMATTING, FirstWeekOfYear, focusAsync, getWindow } from '../../utils';
|
|
5
5
|
import { CalendarDay } from '../CalendarDay/CalendarDay';
|
|
6
6
|
import { CalendarMonth } from '../CalendarMonth/CalendarMonth';
|
|
7
|
-
import { useCalendarStyles_unstable } from './useCalendarStyles';
|
|
7
|
+
import { useCalendarStyles_unstable } from './useCalendarStyles.styles';
|
|
8
8
|
const MIN_SIZE_FORCE_OVERLAY = 440;
|
|
9
9
|
const defaultWorkWeekDays = [DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday];
|
|
10
10
|
function useDateState({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Backspace","Enter","Escape","PageDown","PageUp","Space","useControllableState","addMonths","addYears","DateRangeType","DayOfWeek","DEFAULT_CALENDAR_STRINGS","DEFAULT_DATE_FORMATTING","FirstWeekOfYear","focusAsync","getWindow","CalendarDay","CalendarMonth","useCalendarStyles_unstable","MIN_SIZE_FORCE_OVERLAY","defaultWorkWeekDays","Monday","Tuesday","Wednesday","Thursday","Friday","useDateState","value","today","Date","onSelectDate","selectedDate","setSelectedDate","defaultState","initialState","state","navigatedDay","setNavigatedDay","useState","navigatedMonth","setNavigatedMonth","lastSelectedDate","setLastSelectedDate","valueOf","navigateMonth","date","navigateDay","onDateSelected","selectedDateRangeArray","useVisibilityState","isDayPickerVisible","isDayPickerVisibleProp","isMonthPickerVisible","isMonthPickerVisibleProp","showMonthPickerAsOverlay","setIsMonthPickerVisible","getShowMonthPickerAsOverlay","undefined","setIsDayPickerVisible","toggleDayMonthPickerVisibility","useFocusLogic","componentRef","dayPicker","useRef","monthPicker","focusOnUpdate","focus","useCallback","current","useImperativeHandle","useEffect","focusOnNextUpdate","Calendar","forwardRef","props","forwardedRef","allFocusable","calendarDayProps","calendarMonthProps","className","dateRangeType","Day","dateTimeFormatter","firstDayOfWeek","Sunday","firstWeekOfYear","FirstDay","highlightCurrentMonth","highlightSelectedMonth","id","maxDate","minDate","onDismiss","restrictedDates","showCloseButton","showGoToToday","showMonthPickerAsOverlayProp","showSixWeeksByDefault","showWeekNumbers","strings","workWeekDays","renderGoToTodayButton","goTodayEnabled","getFullYear","getMonth","createElement","classes","goTodayButton","onClick","onGotoToday","onKeyDown","onButtonKeyDown","type","disabled","goToToday","onNavigateDayDate","focusOnNavigatedDay","onNavigateMonthDate","monthPickerOnly","onHeaderSelect","callback","ev","key","onDatePickerPopupKeyDown","preventDefault","ctrlKey","todayDateString","selectedDateString","todayDateFormatString","replace","formatMonthDayYear","selectedDateFormatString","selectionAndTodayString","ref","role","root","liveRegion","navigatedDate","onNavigateDate","divider","monthPickerWrapper","displayName","win","innerWidth"],"sources":["../../../src/components/Calendar/Calendar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Backspace, Enter, Escape, PageDown, PageUp, Space } from '@fluentui/keyboard-keys';\nimport { useControllableState } from '@fluentui/react-utilities';\nimport {\n addMonths,\n addYears,\n DateRangeType,\n DayOfWeek,\n DEFAULT_CALENDAR_STRINGS,\n DEFAULT_DATE_FORMATTING,\n FirstWeekOfYear,\n focusAsync,\n getWindow,\n} from '../../utils';\nimport { CalendarDay } from '../CalendarDay/CalendarDay';\nimport { CalendarMonth } from '../CalendarMonth/CalendarMonth';\nimport { useCalendarStyles_unstable } from './useCalendarStyles';\nimport type { ICalendarDay } from '../CalendarDay/CalendarDay.types';\nimport type { ICalendarMonth } from '../CalendarMonth/CalendarMonth.types';\nimport type { CalendarProps } from './Calendar.types';\n\nconst MIN_SIZE_FORCE_OVERLAY = 440;\n\nconst defaultWorkWeekDays: DayOfWeek[] = [\n DayOfWeek.Monday,\n DayOfWeek.Tuesday,\n DayOfWeek.Wednesday,\n DayOfWeek.Thursday,\n DayOfWeek.Friday,\n];\n\nfunction useDateState({ value, today = new Date(), onSelectDate }: CalendarProps) {\n /** The currently selected date in the calendar */\n const [selectedDate, setSelectedDate] = useControllableState({\n defaultState: today,\n initialState: today,\n state: value,\n });\n\n /** The currently focused date in the day picker, but not necessarily selected */\n const [navigatedDay = today, setNavigatedDay] = React.useState(value);\n\n /** The currently focused date in the month picker, but not necessarily selected */\n const [navigatedMonth = today, setNavigatedMonth] = React.useState(value);\n\n /** If using a controlled value, when that value changes, navigate to that date */\n const [lastSelectedDate = today, setLastSelectedDate] = React.useState(value);\n if (value && lastSelectedDate.valueOf() !== value.valueOf()) {\n setNavigatedDay(value);\n setNavigatedMonth(value);\n setLastSelectedDate(value);\n }\n\n const navigateMonth = (date: Date) => {\n setNavigatedMonth(date);\n };\n\n const navigateDay = (date: Date) => {\n setNavigatedMonth(date);\n setNavigatedDay(date);\n };\n\n const onDateSelected = (date: Date, selectedDateRangeArray?: Date[]) => {\n setNavigatedMonth(date);\n setNavigatedDay(date);\n setSelectedDate(date);\n onSelectDate?.(date, selectedDateRangeArray);\n };\n\n return [selectedDate, navigatedDay, navigatedMonth, onDateSelected, navigateDay, navigateMonth] as const;\n}\n\nfunction useVisibilityState({\n isDayPickerVisible: isDayPickerVisibleProp,\n isMonthPickerVisible: isMonthPickerVisibleProp,\n showMonthPickerAsOverlay,\n}: CalendarProps) {\n /** State used to show/hide month picker */\n const [isMonthPickerVisible, setIsMonthPickerVisible] = useControllableState({\n defaultState: false,\n initialState: true,\n state: getShowMonthPickerAsOverlay({ isDayPickerVisible: isDayPickerVisibleProp, showMonthPickerAsOverlay })\n ? undefined\n : isMonthPickerVisibleProp,\n });\n /** State used to show/hide day picker */\n const [isDayPickerVisible, setIsDayPickerVisible] = useControllableState({\n defaultState: true,\n initialState: true,\n state: getShowMonthPickerAsOverlay({ isDayPickerVisible: isDayPickerVisibleProp, showMonthPickerAsOverlay })\n ? undefined\n : isDayPickerVisibleProp,\n });\n\n const toggleDayMonthPickerVisibility = () => {\n setIsMonthPickerVisible(!isMonthPickerVisible);\n setIsDayPickerVisible(!isDayPickerVisible);\n };\n\n return [isMonthPickerVisible, isDayPickerVisible, toggleDayMonthPickerVisibility] as const;\n}\n\nfunction useFocusLogic({ componentRef }: CalendarProps, isDayPickerVisible: boolean, isMonthPickerVisible: boolean) {\n const dayPicker = React.useRef<ICalendarDay>(null);\n const monthPicker = React.useRef<ICalendarMonth>(null);\n const focusOnUpdate = React.useRef(false);\n\n const focus = React.useCallback(() => {\n if (isDayPickerVisible && dayPicker.current) {\n focusAsync(dayPicker.current);\n } else if (isMonthPickerVisible && monthPicker.current) {\n focusAsync(monthPicker.current);\n }\n }, [isDayPickerVisible, isMonthPickerVisible]);\n\n React.useImperativeHandle(componentRef, () => ({ focus }), [focus]);\n\n React.useEffect(() => {\n if (focusOnUpdate.current) {\n focus();\n focusOnUpdate.current = false;\n }\n });\n\n const focusOnNextUpdate = () => {\n focusOnUpdate.current = true;\n };\n\n return [dayPicker, monthPicker, focusOnNextUpdate] as const;\n}\n\n/**\n * @internal\n */\nexport const Calendar: React.FunctionComponent<CalendarProps> = React.forwardRef<HTMLDivElement, CalendarProps>(\n (props, forwardedRef) => {\n const {\n allFocusable = false,\n calendarDayProps,\n calendarMonthProps,\n className,\n componentRef,\n dateRangeType = DateRangeType.Day,\n dateTimeFormatter = DEFAULT_DATE_FORMATTING,\n firstDayOfWeek = DayOfWeek.Sunday,\n firstWeekOfYear = FirstWeekOfYear.FirstDay,\n highlightCurrentMonth = false,\n highlightSelectedMonth = false,\n id,\n isDayPickerVisible: isDayPickerVisibleProp = true,\n isMonthPickerVisible: isMonthPickerVisibleProp = true,\n maxDate,\n minDate,\n onDismiss,\n onSelectDate,\n restrictedDates,\n showCloseButton = false,\n showGoToToday = true,\n showMonthPickerAsOverlay: showMonthPickerAsOverlayProp = false,\n showSixWeeksByDefault = false,\n showWeekNumbers = false,\n strings = DEFAULT_CALENDAR_STRINGS,\n today = new Date(),\n value,\n workWeekDays = defaultWorkWeekDays,\n } = props;\n\n const [selectedDate, navigatedDay, navigatedMonth, onDateSelected, navigateDay, navigateMonth] = useDateState({\n onSelectDate,\n value,\n today,\n });\n const [isMonthPickerVisible, isDayPickerVisible, toggleDayMonthPickerVisibility] = useVisibilityState({\n isDayPickerVisible: isDayPickerVisibleProp,\n isMonthPickerVisible: isMonthPickerVisibleProp,\n showMonthPickerAsOverlay: showMonthPickerAsOverlayProp,\n });\n const [dayPicker, monthPicker, focusOnNextUpdate] = useFocusLogic(\n { componentRef },\n isDayPickerVisible,\n isMonthPickerVisible,\n );\n\n const renderGoToTodayButton = () => {\n let goTodayEnabled = showGoToToday;\n\n if (goTodayEnabled && today) {\n goTodayEnabled =\n navigatedDay.getFullYear() !== today.getFullYear() ||\n navigatedDay.getMonth() !== today.getMonth() ||\n navigatedMonth.getFullYear() !== today.getFullYear() ||\n navigatedMonth.getMonth() !== today.getMonth();\n }\n\n return (\n showGoToToday && (\n <button\n className={classes.goTodayButton}\n onClick={onGotoToday}\n onKeyDown={onButtonKeyDown(onGotoToday)}\n type=\"button\"\n disabled={!goTodayEnabled}\n >\n {strings!.goToToday}\n </button>\n )\n );\n };\n\n const onNavigateDayDate = (date: Date, focusOnNavigatedDay: boolean): void => {\n navigateDay(date);\n if (focusOnNavigatedDay) {\n focusOnNextUpdate();\n }\n };\n\n const onNavigateMonthDate = (date: Date, focusOnNavigatedDay: boolean): void => {\n if (focusOnNavigatedDay) {\n focusOnNextUpdate();\n }\n\n if (!focusOnNavigatedDay) {\n navigateMonth(date);\n return;\n }\n\n if (monthPickerOnly) {\n onDateSelected(date);\n }\n\n navigateDay(date);\n };\n\n const onHeaderSelect = getShowMonthPickerAsOverlay({\n isDayPickerVisible: isDayPickerVisibleProp,\n showMonthPickerAsOverlay: showMonthPickerAsOverlayProp,\n })\n ? (): void => {\n toggleDayMonthPickerVisibility();\n\n focusOnNextUpdate();\n }\n : undefined;\n\n const onGotoToday = (): void => {\n navigateDay(today!);\n focusOnNextUpdate();\n };\n\n const onButtonKeyDown = (callback: () => void): ((ev: React.KeyboardEvent<HTMLButtonElement>) => void) => {\n return (ev: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (ev.key) {\n case Enter:\n case Space:\n callback();\n break;\n }\n };\n };\n\n const onDatePickerPopupKeyDown = (ev: React.KeyboardEvent<HTMLElement>): void => {\n switch (ev.key) {\n case Enter:\n ev.preventDefault();\n break;\n\n case Backspace:\n ev.preventDefault();\n break;\n\n case Escape:\n onDismiss?.();\n break;\n\n case PageUp:\n if (ev.ctrlKey) {\n // go to next year\n navigateDay(addYears(navigatedDay, 1));\n } else {\n // go to next month\n navigateDay(addMonths(navigatedDay, 1));\n }\n ev.preventDefault();\n break;\n case PageDown:\n if (ev.ctrlKey) {\n // go to previous year\n navigateDay(addYears(navigatedDay, -1));\n } else {\n // go to previous month\n navigateDay(addMonths(navigatedDay, -1));\n }\n ev.preventDefault();\n break;\n default:\n break;\n }\n };\n const showMonthPickerAsOverlay = getShowMonthPickerAsOverlay(props);\n\n const monthPickerOnly = !showMonthPickerAsOverlay && !isDayPickerVisible;\n\n const classes = useCalendarStyles_unstable({\n className,\n isDayPickerVisible,\n isMonthPickerVisible,\n showWeekNumbers,\n });\n\n let todayDateString: string = '';\n let selectedDateString: string = '';\n if (dateTimeFormatter && strings!.todayDateFormatString) {\n todayDateString = strings!.todayDateFormatString.replace(\n '{0}',\n dateTimeFormatter.formatMonthDayYear(today, strings!),\n );\n }\n if (dateTimeFormatter && strings!.selectedDateFormatString) {\n selectedDateString = strings!.selectedDateFormatString.replace(\n '{0}',\n dateTimeFormatter.formatMonthDayYear(selectedDate, strings!),\n );\n }\n const selectionAndTodayString = selectedDateString + ', ' + todayDateString;\n\n return (\n <div\n id={id}\n ref={forwardedRef}\n role=\"group\"\n aria-label={selectionAndTodayString}\n className={classes.root}\n onKeyDown={onDatePickerPopupKeyDown}\n >\n <div className={classes.liveRegion} aria-live=\"polite\" aria-atomic=\"true\">\n <span>{selectedDateString}</span>\n </div>\n {isDayPickerVisible && (\n <CalendarDay\n selectedDate={selectedDate!}\n navigatedDate={navigatedDay!}\n today={today}\n onSelectDate={onDateSelected}\n // eslint-disable-next-line react/jsx-no-bind\n onNavigateDate={onNavigateDayDate}\n onDismiss={onDismiss}\n firstDayOfWeek={firstDayOfWeek!}\n dateRangeType={dateRangeType!}\n strings={strings!}\n // eslint-disable-next-line react/jsx-no-bind\n onHeaderSelect={onHeaderSelect}\n showWeekNumbers={showWeekNumbers}\n firstWeekOfYear={firstWeekOfYear!}\n dateTimeFormatter={dateTimeFormatter!}\n showSixWeeksByDefault={showSixWeeksByDefault}\n minDate={minDate}\n maxDate={maxDate}\n restrictedDates={restrictedDates}\n workWeekDays={workWeekDays}\n componentRef={dayPicker}\n showCloseButton={showCloseButton}\n allFocusable={allFocusable}\n {...calendarDayProps} // at end of list so consumer's custom functions take precedence\n />\n )}\n {isDayPickerVisible && isMonthPickerVisible && <div className={classes.divider} />}\n {isMonthPickerVisible ? (\n <div className={classes.monthPickerWrapper}>\n <CalendarMonth\n navigatedDate={navigatedMonth}\n selectedDate={navigatedDay}\n strings={strings!}\n // eslint-disable-next-line react/jsx-no-bind\n onNavigateDate={onNavigateMonthDate}\n today={today}\n highlightCurrentMonth={highlightCurrentMonth!}\n highlightSelectedMonth={highlightSelectedMonth!}\n // eslint-disable-next-line react/jsx-no-bind\n onHeaderSelect={onHeaderSelect}\n dateTimeFormatter={dateTimeFormatter!}\n minDate={minDate}\n maxDate={maxDate}\n componentRef={monthPicker}\n {...calendarMonthProps} // at end of list so consumer's custom functions take precedence\n />\n {renderGoToTodayButton()}\n </div>\n ) : (\n renderGoToTodayButton()\n )}\n </div>\n );\n },\n);\nCalendar.displayName = 'Calendar';\n\nfunction getShowMonthPickerAsOverlay({ isDayPickerVisible, showMonthPickerAsOverlay }: CalendarProps) {\n const win = getWindow();\n return showMonthPickerAsOverlay || (isDayPickerVisible && win && win.innerWidth <= MIN_SIZE_FORCE_OVERLAY);\n}\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,SAAS,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,QAAQ;AAClE,SAASC,oBAAoB,QAAQ;AACrC,SACEC,SAAS,EACTC,QAAQ,EACRC,aAAa,EACbC,SAAS,EACTC,wBAAwB,EACxBC,uBAAuB,EACvBC,eAAe,EACfC,UAAU,EACVC,SAAS,QACJ;AACP,SAASC,WAAW,QAAQ;AAC5B,SAASC,aAAa,QAAQ;AAC9B,SAASC,0BAA0B,QAAQ;AAK3C,MAAMC,sBAAA,GAAyB;AAE/B,MAAMC,mBAAA,GAAmC,CACvCV,SAAA,CAAUW,MAAM,EAChBX,SAAA,CAAUY,OAAO,EACjBZ,SAAA,CAAUa,SAAS,EACnBb,SAAA,CAAUc,QAAQ,EAClBd,SAAA,CAAUe,MAAM,CACjB;AAED,SAASC,aAAa;EAAEC,KAAA;EAAOC,KAAA,GAAQ,IAAIC,IAAA;EAAQC;AAAY,CAAiB,EAAE;EAChF,kDACA,MAAM,CAACC,YAAA,EAAcC,eAAA,CAAgB,GAAG1B,oBAAA,CAAqB;IAC3D2B,YAAA,EAAcL,KAAA;IACdM,YAAA,EAAcN,KAAA;IACdO,KAAA,EAAOR;EACT;EAEA;EACA,MAAM,CAACS,YAAA,GAAeR,KAAK,EAAES,eAAA,CAAgB,GAAGtC,KAAA,CAAMuC,QAAQ,CAACX,KAAA;EAE/D;EACA,MAAM,CAACY,cAAA,GAAiBX,KAAK,EAAEY,iBAAA,CAAkB,GAAGzC,KAAA,CAAMuC,QAAQ,CA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ace","Enter","Escape","PageDown","PageUp","Space","useControllableState","addMonths","addYears","DateRangeType","DayOfWeek","DEFAULT_CALENDAR_STRINGS","DEFAULT_DATE_FORMATTING","FirstWeekOfYear","focusAsync","getWindow","CalendarDay","CalendarMonth","useCalendarStyles_unstable","MIN_SIZE_FORCE_OVERLAY","defaultWorkWeekDays","Monday","Tuesday","Wednesday","Thursday","Friday","useDateState","value","today","Date","onSelectDate","selectedDate","setSelectedDate","defaultState","initialState","state","navigatedDay","setNavigatedDay","useState","navigatedMonth","setNavigatedMonth","lastSelectedDate","setLastSelectedDate","valueOf","navigateMonth","date","navigateDay","onDateSelected","selectedDateRangeArray","useVisibilityState","isDayPickerVisible","isDayPickerVisibleProp","isMonthPickerVisible","isMonthPickerVisibleProp","showMonthPickerAsOverlay","setIsMonthPickerVisible","getShowMonthPickerAsOverlay","undefined","setIsDayPickerVisible","toggleDayMonthPickerVisibility","useFocusLogic","componentRef","dayPicker","useRef","monthPicker","focusOnUpdate","focus","useCallback","current","useImperativeHandle","useEffect","focusOnNextUpdate","Calendar","forwardRef","props","forwardedRef","allFocusable","calendarDayProps","calendarMonthProps","className","dateRangeType","Day","dateTimeFormatter","firstDayOfWeek","Sunday","firstWeekOfYear","FirstDay","highlightCurrentMonth","highlightSelectedMonth","id","maxDate","minDate","onDismiss","restrictedDates","showCloseButton","showGoToToday","showMonthPickerAsOverlayProp","showSixWeeksByDefault","showWeekNumbers","strings","workWeekDays","renderGoToTodayButton","goTodayEnabled","getFullYear","getMonth","createElement","classes","goTodayButton","onClick","onGotoToday","onKeyDown","onButtonKeyDown","type","disabled","goToToday","onNavigateDayDate","focusOnNavigatedDay","onNavigateMonthDate","monthPickerOnly","onHeaderSelect","callback","ev","key","onDatePickerPopupKeyDown","preventDefault","ctrlKey","todayDateString","selectedDateString","todayDateFormatString","replace","formatMonthDayYear","selectedDateFormatString","selectionAndTodayString","ref","role","root","liveRegion","navigatedDate","onNavigateDate","divider","monthPickerWrapper","displayName","win","innerWidth"],"sources":["../../../src/components/Calendar/Calendar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Backspace, Enter, Escape, PageDown, PageUp, Space } from '@fluentui/keyboard-keys';\nimport { useControllableState } from '@fluentui/react-utilities';\nimport {\n addMonths,\n addYears,\n DateRangeType,\n DayOfWeek,\n DEFAULT_CALENDAR_STRINGS,\n DEFAULT_DATE_FORMATTING,\n FirstWeekOfYear,\n focusAsync,\n getWindow,\n} from '../../utils';\nimport { CalendarDay } from '../CalendarDay/CalendarDay';\nimport { CalendarMonth } from '../CalendarMonth/CalendarMonth';\nimport { useCalendarStyles_unstable } from './useCalendarStyles.styles';\nimport type { ICalendarDay } from '../CalendarDay/CalendarDay.types';\nimport type { ICalendarMonth } from '../CalendarMonth/CalendarMonth.types';\nimport type { CalendarProps } from './Calendar.types';\n\nconst MIN_SIZE_FORCE_OVERLAY = 440;\n\nconst defaultWorkWeekDays: DayOfWeek[] = [\n DayOfWeek.Monday,\n DayOfWeek.Tuesday,\n DayOfWeek.Wednesday,\n DayOfWeek.Thursday,\n DayOfWeek.Friday,\n];\n\nfunction useDateState({ value, today = new Date(), onSelectDate }: CalendarProps) {\n /** The currently selected date in the calendar */\n const [selectedDate, setSelectedDate] = useControllableState({\n defaultState: today,\n initialState: today,\n state: value,\n });\n\n /** The currently focused date in the day picker, but not necessarily selected */\n const [navigatedDay = today, setNavigatedDay] = React.useState(value);\n\n /** The currently focused date in the month picker, but not necessarily selected */\n const [navigatedMonth = today, setNavigatedMonth] = React.useState(value);\n\n /** If using a controlled value, when that value changes, navigate to that date */\n const [lastSelectedDate = today, setLastSelectedDate] = React.useState(value);\n if (value && lastSelectedDate.valueOf() !== value.valueOf()) {\n setNavigatedDay(value);\n setNavigatedMonth(value);\n setLastSelectedDate(value);\n }\n\n const navigateMonth = (date: Date) => {\n setNavigatedMonth(date);\n };\n\n const navigateDay = (date: Date) => {\n setNavigatedMonth(date);\n setNavigatedDay(date);\n };\n\n const onDateSelected = (date: Date, selectedDateRangeArray?: Date[]) => {\n setNavigatedMonth(date);\n setNavigatedDay(date);\n setSelectedDate(date);\n onSelectDate?.(date, selectedDateRangeArray);\n };\n\n return [selectedDate, navigatedDay, navigatedMonth, onDateSelected, navigateDay, navigateMonth] as const;\n}\n\nfunction useVisibilityState({\n isDayPickerVisible: isDayPickerVisibleProp,\n isMonthPickerVisible: isMonthPickerVisibleProp,\n showMonthPickerAsOverlay,\n}: CalendarProps) {\n /** State used to show/hide month picker */\n const [isMonthPickerVisible, setIsMonthPickerVisible] = useControllableState({\n defaultState: false,\n initialState: true,\n state: getShowMonthPickerAsOverlay({ isDayPickerVisible: isDayPickerVisibleProp, showMonthPickerAsOverlay })\n ? undefined\n : isMonthPickerVisibleProp,\n });\n /** State used to show/hide day picker */\n const [isDayPickerVisible, setIsDayPickerVisible] = useControllableState({\n defaultState: true,\n initialState: true,\n state: getShowMonthPickerAsOverlay({ isDayPickerVisible: isDayPickerVisibleProp, showMonthPickerAsOverlay })\n ? undefined\n : isDayPickerVisibleProp,\n });\n\n const toggleDayMonthPickerVisibility = () => {\n setIsMonthPickerVisible(!isMonthPickerVisible);\n setIsDayPickerVisible(!isDayPickerVisible);\n };\n\n return [isMonthPickerVisible, isDayPickerVisible, toggleDayMonthPickerVisibility] as const;\n}\n\nfunction useFocusLogic({ componentRef }: CalendarProps, isDayPickerVisible: boolean, isMonthPickerVisible: boolean) {\n const dayPicker = React.useRef<ICalendarDay>(null);\n const monthPicker = React.useRef<ICalendarMonth>(null);\n const focusOnUpdate = React.useRef(false);\n\n const focus = React.useCallback(() => {\n if (isDayPickerVisible && dayPicker.current) {\n focusAsync(dayPicker.current);\n } else if (isMonthPickerVisible && monthPicker.current) {\n focusAsync(monthPicker.current);\n }\n }, [isDayPickerVisible, isMonthPickerVisible]);\n\n React.useImperativeHandle(componentRef, () => ({ focus }), [focus]);\n\n React.useEffect(() => {\n if (focusOnUpdate.current) {\n focus();\n focusOnUpdate.current = false;\n }\n });\n\n const focusOnNextUpdate = () => {\n focusOnUpdate.current = true;\n };\n\n return [dayPicker, monthPicker, focusOnNextUpdate] as const;\n}\n\n/**\n * @internal\n */\nexport const Calendar: React.FunctionComponent<CalendarProps> = React.forwardRef<HTMLDivElement, CalendarProps>(\n (props, forwardedRef) => {\n const {\n allFocusable = false,\n calendarDayProps,\n calendarMonthProps,\n className,\n componentRef,\n dateRangeType = DateRangeType.Day,\n dateTimeFormatter = DEFAULT_DATE_FORMATTING,\n firstDayOfWeek = DayOfWeek.Sunday,\n firstWeekOfYear = FirstWeekOfYear.FirstDay,\n highlightCurrentMonth = false,\n highlightSelectedMonth = false,\n id,\n isDayPickerVisible: isDayPickerVisibleProp = true,\n isMonthPickerVisible: isMonthPickerVisibleProp = true,\n maxDate,\n minDate,\n onDismiss,\n onSelectDate,\n restrictedDates,\n showCloseButton = false,\n showGoToToday = true,\n showMonthPickerAsOverlay: showMonthPickerAsOverlayProp = false,\n showSixWeeksByDefault = false,\n showWeekNumbers = false,\n strings = DEFAULT_CALENDAR_STRINGS,\n today = new Date(),\n value,\n workWeekDays = defaultWorkWeekDays,\n } = props;\n\n const [selectedDate, navigatedDay, navigatedMonth, onDateSelected, navigateDay, navigateMonth] = useDateState({\n onSelectDate,\n value,\n today,\n });\n const [isMonthPickerVisible, isDayPickerVisible, toggleDayMonthPickerVisibility] = useVisibilityState({\n isDayPickerVisible: isDayPickerVisibleProp,\n isMonthPickerVisible: isMonthPickerVisibleProp,\n showMonthPickerAsOverlay: showMonthPickerAsOverlayProp,\n });\n const [dayPicker, monthPicker, focusOnNextUpdate] = useFocusLogic(\n { componentRef },\n isDayPickerVisible,\n isMonthPickerVisible,\n );\n\n const renderGoToTodayButton = () => {\n let goTodayEnabled = showGoToToday;\n\n if (goTodayEnabled && today) {\n goTodayEnabled =\n navigatedDay.getFullYear() !== today.getFullYear() ||\n navigatedDay.getMonth() !== today.getMonth() ||\n navigatedMonth.getFullYear() !== today.getFullYear() ||\n navigatedMonth.getMonth() !== today.getMonth();\n }\n\n return (\n showGoToToday && (\n <button\n className={classes.goTodayButton}\n onClick={onGotoToday}\n onKeyDown={onButtonKeyDown(onGotoToday)}\n type=\"button\"\n disabled={!goTodayEnabled}\n >\n {strings!.goToToday}\n </button>\n )\n );\n };\n\n const onNavigateDayDate = (date: Date, focusOnNavigatedDay: boolean): void => {\n navigateDay(date);\n if (focusOnNavigatedDay) {\n focusOnNextUpdate();\n }\n };\n\n const onNavigateMonthDate = (date: Date, focusOnNavigatedDay: boolean): void => {\n if (focusOnNavigatedDay) {\n focusOnNextUpdate();\n }\n\n if (!focusOnNavigatedDay) {\n navigateMonth(date);\n return;\n }\n\n if (monthPickerOnly) {\n onDateSelected(date);\n }\n\n navigateDay(date);\n };\n\n const onHeaderSelect = getShowMonthPickerAsOverlay({\n isDayPickerVisible: isDayPickerVisibleProp,\n showMonthPickerAsOverlay: showMonthPickerAsOverlayProp,\n })\n ? (): void => {\n toggleDayMonthPickerVisibility();\n\n focusOnNextUpdate();\n }\n : undefined;\n\n const onGotoToday = (): void => {\n navigateDay(today!);\n focusOnNextUpdate();\n };\n\n const onButtonKeyDown = (callback: () => void): ((ev: React.KeyboardEvent<HTMLButtonElement>) => void) => {\n return (ev: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (ev.key) {\n case Enter:\n case Space:\n callback();\n break;\n }\n };\n };\n\n const onDatePickerPopupKeyDown = (ev: React.KeyboardEvent<HTMLElement>): void => {\n switch (ev.key) {\n case Enter:\n ev.preventDefault();\n break;\n\n case Backspace:\n ev.preventDefault();\n break;\n\n case Escape:\n onDismiss?.();\n break;\n\n case PageUp:\n if (ev.ctrlKey) {\n // go to next year\n navigateDay(addYears(navigatedDay, 1));\n } else {\n // go to next month\n navigateDay(addMonths(navigatedDay, 1));\n }\n ev.preventDefault();\n break;\n case PageDown:\n if (ev.ctrlKey) {\n // go to previous year\n navigateDay(addYears(navigatedDay, -1));\n } else {\n // go to previous month\n navigateDay(addMonths(navigatedDay, -1));\n }\n ev.preventDefault();\n break;\n default:\n break;\n }\n };\n const showMonthPickerAsOverlay = getShowMonthPickerAsOverlay(props);\n\n const monthPickerOnly = !showMonthPickerAsOverlay && !isDayPickerVisible;\n\n const classes = useCalendarStyles_unstable({\n className,\n isDayPickerVisible,\n isMonthPickerVisible,\n showWeekNumbers,\n });\n\n let todayDateString: string = '';\n let selectedDateString: string = '';\n if (dateTimeFormatter && strings!.todayDateFormatString) {\n todayDateString = strings!.todayDateFormatString.replace(\n '{0}',\n dateTimeFormatter.formatMonthDayYear(today, strings!),\n );\n }\n if (dateTimeFormatter && strings!.selectedDateFormatString) {\n selectedDateString = strings!.selectedDateFormatString.replace(\n '{0}',\n dateTimeFormatter.formatMonthDayYear(selectedDate, strings!),\n );\n }\n const selectionAndTodayString = selectedDateString + ', ' + todayDateString;\n\n return (\n <div\n id={id}\n ref={forwardedRef}\n role=\"group\"\n aria-label={selectionAndTodayString}\n className={classes.root}\n onKeyDown={onDatePickerPopupKeyDown}\n >\n <div className={classes.liveRegion} aria-live=\"polite\" aria-atomic=\"true\">\n <span>{selectedDateString}</span>\n </div>\n {isDayPickerVisible && (\n <CalendarDay\n selectedDate={selectedDate!}\n navigatedDate={navigatedDay!}\n today={today}\n onSelectDate={onDateSelected}\n // eslint-disable-next-line react/jsx-no-bind\n onNavigateDate={onNavigateDayDate}\n onDismiss={onDismiss}\n firstDayOfWeek={firstDayOfWeek!}\n dateRangeType={dateRangeType!}\n strings={strings!}\n // eslint-disable-next-line react/jsx-no-bind\n onHeaderSelect={onHeaderSelect}\n showWeekNumbers={showWeekNumbers}\n firstWeekOfYear={firstWeekOfYear!}\n dateTimeFormatter={dateTimeFormatter!}\n showSixWeeksByDefault={showSixWeeksByDefault}\n minDate={minDate}\n maxDate={maxDate}\n restrictedDates={restrictedDates}\n workWeekDays={workWeekDays}\n componentRef={dayPicker}\n showCloseButton={showCloseButton}\n allFocusable={allFocusable}\n {...calendarDayProps} // at end of list so consumer's custom functions take precedence\n />\n )}\n {isDayPickerVisible && isMonthPickerVisible && <div className={classes.divider} />}\n {isMonthPickerVisible ? (\n <div className={classes.monthPickerWrapper}>\n <CalendarMonth\n navigatedDate={navigatedMonth}\n selectedDate={navigatedDay}\n strings={strings!}\n // eslint-disable-next-line react/jsx-no-bind\n onNavigateDate={onNavigateMonthDate}\n today={today}\n highlightCurrentMonth={highlightCurrentMonth!}\n highlightSelectedMonth={highlightSelectedMonth!}\n // eslint-disable-next-line react/jsx-no-bind\n onHeaderSelect={onHeaderSelect}\n dateTimeFormatter={dateTimeFormatter!}\n minDate={minDate}\n maxDate={maxDate}\n componentRef={monthPicker}\n {...calendarMonthProps} // at end of list so consumer's custom functions take precedence\n />\n {renderGoToTodayButton()}\n </div>\n ) : (\n renderGoToTodayButton()\n )}\n </div>\n );\n },\n);\nCalendar.displayName = 'Calendar';\n\nfunction getShowMonthPickerAsOverlay({ isDayPickerVisible, showMonthPickerAsOverlay }: CalendarProps) {\n const win = getWindow();\n return showMonthPickerAsOverlay || (isDayPickerVisible && win && win.innerWidth <= MIN_SIZE_FORCE_OVERLAY);\n}\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,SAAS,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,QAAQ;AAClE,SAASC,oBAAoB,QAAQ;AACrC,SACEC,SAAS,EACTC,QAAQ,EACRC,aAAa,EACbC,SAAS,EACTC,wBAAwB,EACxBC,uBAAuB,EACvBC,eAAe,EACfC,UAAU,EACVC,SAAS,QACJ;AACP,SAASC,WAAW,QAAQ;AAC5B,SAASC,aAAa,QAAQ;AAC9B,SAASC,0BAA0B,QAAQ;AAK3C,MAAMC,sBAAA,GAAyB;AAE/B,MAAMC,mBAAA,GAAmC,CACvCV,SAAA,CAAUW,MAAM,EAChBX,SAAA,CAAUY,OAAO,EACjBZ,SAAA,CAAUa,SAAS,EACnBb,SAAA,CAAUc,QAAQ,EAClBd,SAAA,CAAUe,MAAM,CACjB;AAED,SAASC,aAAa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IAChBrC,iBAAA,EAAmBA,iBAAA;IACnBS,OAAA,EAASA,OAAA;IACTD,OAAA,EAASA,OAAA;IACT7B,YAAA,EAAcG,WAAA;IACb,GAAGc;MAELuB,qBAAA,MAGHA,qBAAA,EACD;AAGP;AAEF7B,QAAA,CAASqE,WAAW,GAAG;AAEvB,SAASrF,4BAA4B;EAAEN,kBAAA;EAAoBI;AAAwB,CAAiB,EAAE;EACpG,MAAMwF,GAAA,GAAM/H,SAAA;EACZ,OAAOuC,wBAAA,IAA6BJ,kBAAA,IAAsB4F,GAAA,IAAOA,GAAA,CAAIC,UAAU,IAAI5H,sBAAA;AACrF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defaultCalendarStrings"],"sources":["../../../src/components/Calendar/index.ts"],"sourcesContent":["export * from './Calendar';\nexport * from './Calendar.types';\nexport * from './useCalendarStyles';\nexport { defaultCalendarStrings } from './defaults';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAASA,sBAAsB,QAAQ"}
|
|
1
|
+
{"version":3,"names":["defaultCalendarStrings"],"sources":["../../../src/components/Calendar/index.ts"],"sourcesContent":["export * from './Calendar';\nexport * from './Calendar.types';\nexport * from './useCalendarStyles.styles';\nexport { defaultCalendarStrings } from './defaults';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAASA,sBAAsB,QAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["tokens","__styles","mergeClasses","shorthands","calendarClassNames","root","divider","goTodayButton","monthPickerWrapper","liveRegion","useRootStyles","base","mc9l5x","a9b677","normalize","E5pizo","B7ck84d","B6of3ja","t21cq0","jrapky","Frg6f3","z8tnut","z189sj","Byoj8tv","uwmqm3","monthPickerNotVisible","Beiy3e4","dayAndMonthPickersVisible","dayPickerVisibleAndWeekNumbersShown","dayAndMonthPickersVisibleAndWeekNumbersShown","d","useDividerStyles","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bekrc4i","vrafjx","Bhzewxz","useMonthPickerWrapperStyles","useGoTodayButtonStyles","qb2dma","De3pzq","icvyot","oivjwe","wvpqe5","B5kzvoi","sj55zd","Bahqtrf","Be2twd7","Bqenvij","Bg96gwp","B68tc82","Bmxbyg5","seuwu7","Jwef8y","Bi91k9c","eoavqd","B2d53fq","Dyrjrp","Be90el1","h","useLiveRegionStyles","B4j52fo","Bn0qgzm","ibv6hh","qhf8xq","useCalendarStyles_unstable","props","rootStyles","dividerStyles","monthPickerWrapperStyles","goTodayButtonStyles","liveRegionStyles","className","isDayPickerVisible","isMonthPickerVisible","showWeekNumbers"],"sources":["../../../src/components/Calendar/useCalendarStyles.styles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CalendarStyles, CalendarStyleProps } from './Calendar.types';\n\n/**\n * @internal\n */\nexport const calendarClassNames: SlotClassNames<CalendarStyles> = {\n root: 'fui-Calendar',\n divider: 'fui-Calendar__divider',\n goTodayButton: 'fui-Calendar__goTodayButton',\n monthPickerWrapper: 'fui-Calendar__monthPickerWrapper',\n liveRegion: 'fui-Calendar__liveRegion',\n};\n\nconst useRootStyles = makeStyles({\n base: {\n display: 'flex',\n width: '220px',\n },\n normalize: {\n boxShadow: 'none',\n boxSizing: 'border-box',\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n },\n monthPickerNotVisible: {\n flexDirection: 'column',\n },\n dayAndMonthPickersVisible: {\n width: '440px',\n },\n dayPickerVisibleAndWeekNumbersShown: {\n width: '250px',\n },\n dayAndMonthPickersVisibleAndWeekNumbersShown: {\n width: '470px',\n },\n});\n\nconst useDividerStyles = makeStyles({\n base: {\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n ...shorthands.borderRight('1px', 'solid'),\n top: 0,\n },\n});\n\nconst useMonthPickerWrapperStyles = makeStyles({\n base: {\n display: 'flex',\n flexDirection: 'column',\n },\n});\n\nconst useGoTodayButtonStyles = makeStyles({\n base: {\n alignSelf: 'flex-end',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n bottom: 0,\n boxSizing: 'content-box',\n color: tokens.colorNeutralForeground1,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '30px',\n lineHeight: '30px',\n marginRight: '16px',\n marginTop: '3px',\n ...shorthands.overflow('visible'),\n ...shorthands.padding(0, '4px'),\n\n '& div': {\n fontSize: tokens.fontSizeBase200,\n },\n '&:hover': {\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorBrandForeground1,\n cursor: 'pointer',\n },\n '&:hover:active': {\n color: tokens.colorBrandForeground2,\n },\n '&:disabled': {\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none',\n },\n },\n});\n\nconst useLiveRegionStyles = makeStyles({\n base: {\n ...shorthands.border(0),\n height: '1px',\n ...shorthands.margin('-1px'),\n ...shorthands.overflow('hidden'),\n ...shorthands.padding(0),\n position: 'absolute',\n width: '1px',\n },\n});\n\n/**\n * @internal\n *\n * Apply styling to the Calendar slots based on the state\n */\nexport const useCalendarStyles_unstable = (props: CalendarStyleProps): CalendarStyles => {\n const rootStyles = useRootStyles();\n const dividerStyles = useDividerStyles();\n const monthPickerWrapperStyles = useMonthPickerWrapperStyles();\n const goTodayButtonStyles = useGoTodayButtonStyles();\n const liveRegionStyles = useLiveRegionStyles();\n\n const { className, isDayPickerVisible, isMonthPickerVisible, showWeekNumbers } = props;\n\n return {\n root: mergeClasses(\n calendarClassNames.root,\n rootStyles.base,\n rootStyles.normalize,\n !isMonthPickerVisible && rootStyles.monthPickerNotVisible,\n isDayPickerVisible && isMonthPickerVisible && !showWeekNumbers && rootStyles.dayAndMonthPickersVisible,\n isDayPickerVisible && !isMonthPickerVisible && showWeekNumbers && rootStyles.dayPickerVisibleAndWeekNumbersShown,\n isDayPickerVisible &&\n isMonthPickerVisible &&\n showWeekNumbers &&\n rootStyles.dayAndMonthPickersVisibleAndWeekNumbersShown,\n className,\n ),\n divider: mergeClasses(calendarClassNames.divider, dividerStyles.base),\n monthPickerWrapper: mergeClasses(calendarClassNames.monthPickerWrapper, monthPickerWrapperStyles.base),\n goTodayButton: mergeClasses(calendarClassNames.goTodayButton, goTodayButtonStyles.base),\n liveRegion: mergeClasses(calendarClassNames.liveRegion, liveRegionStyles.base),\n };\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ;AACvB,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAIrD;;;AAGA,OAAO,MAAMC,kBAAA,GAAqD;EAChEC,IAAA,EAAM;EACNC,OAAA,EAAS;EACTC,aAAA,EAAe;EACfC,kBAAA,EAAoB;EACpBC,UAAA,EAAY;AACd;AAEA,MAAMC,aAAA,gBAAgBT,QAAA;EAAAU,IAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,SAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,qBAAA;IAAAC,OAAA;EAAA;EAAAC,yBAAA;IAAAd,MAAA;EAAA;EAAAe,mCAAA;IAAAf,MAAA;EAAA;EAAAgB,4CAAA;IAAAhB,MAAA;EAAA;AAAA;EAAAiB,CAAA;AAAA,EAuBtB;AAEA,MAAMC,gBAAA,gBAAmB9B,QAAA;EAAAU,IAAA;IAAAqB,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAR,CAAA;AAAA,EAMzB;AAEA,MAAMS,2BAAA,gBAA8BtC,QAAA;EAAAU,IAAA;IAAAC,MAAA;IAAAc,OAAA;EAAA;AAAA;EAAAI,CAAA;AAAA,EAKpC;AAEA,MAAMU,sBAAA,gBAAyBvC,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SAAS,EACpB,CAAC8D,oBAAA,IAAwBP,UAAA,CAAW5C,qBAAqB,EACzDkD,kBAAA,IAAsBC,oBAAA,IAAwB,CAACC,eAAA,IAAmBR,UAAA,CAAW1C,yBAAyB,EACtGgD,kBAAA,IAAsB,CAACC,oBAAA,IAAwBC,eAAA,IAAmBR,UAAA,CAAWzC,mCAAmC,EAChH+C,kBAAA,IACEC,oBAAA,IACAC,eAAA,IACAR,UAAA,CAAWxC,4CAA4C,EACzD6C,SAAA;IAEFpE,OAAA,EAASJ,YAAA,CAAaE,kBAAA,CAAmBE,OAAO,EAAEgE,aAAA,CAAc3D,IAAI;IACpEH,kBAAA,EAAoBN,YAAA,CAAaE,kBAAA,CAAmBI,kBAAkB,EAAE+D,wBAAA,CAAyB5D,IAAI;IACrGJ,aAAA,EAAeL,YAAA,CAAaE,kBAAA,CAAmBG,aAAa,EAAEiE,mBAAA,CAAoB7D,IAAI;IACtFF,UAAA,EAAYP,YAAA,CAAaE,kBAAA,CAAmBK,UAAU,EAAEgE,gBAAA,CAAiB9D,IAAI;EAC/E;AACF"}
|
|
@@ -5,7 +5,7 @@ import { useId } from '@fluentui/react-utilities';
|
|
|
5
5
|
import { mergeClasses } from '@griffel/react';
|
|
6
6
|
import { addMonths, compareDatePart, getMonthEnd, getMonthStart } from '../../utils';
|
|
7
7
|
import { CalendarDayGrid } from '../CalendarDayGrid/CalendarDayGrid';
|
|
8
|
-
import { useCalendarDayStyles_unstable } from './useCalendarDayStyles';
|
|
8
|
+
import { useCalendarDayStyles_unstable } from './useCalendarDayStyles.styles';
|
|
9
9
|
/**
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Enter","ArrowDownRegular","ArrowUpRegular","DismissRegular","useId","mergeClasses","addMonths","compareDatePart","getMonthEnd","getMonthStart","CalendarDayGrid","useCalendarDayStyles_unstable","CalendarDay","props","dayGrid","useRef","useImperativeHandle","componentRef","focus","_dayGrid_current","_dayGrid_current_focus","current","call","strings","navigatedDate","dateTimeFormatter","className","onHeaderSelect","showSixWeeksByDefault","minDate","maxDate","restrictedDates","onNavigateDate","showWeekNumbers","dateRangeType","animationDirection","monthAndYearId","classNames","headerIsClickable","monthAndYear","formatMonthYear","HeaderButtonComponentType","headerAriaLabel","yearPickerHeaderAriaLabel","replace","propsWithoutStyles","createElement","root","header","undefined","onClick","tabIndex","onKeyDown","onButtonKeyDown","type","id","CalendarDayNavigationButtons","weeksToShow","labelledBy","displayName","allFocusable","showCloseButton","onDismiss","onSelectNextMonth","onSelectPrevMonth","prevMonthInBounds","nextMonthInBounds","monthComponents","headerIconButton","disabledStyle","title","prevMonthAriaLabel","months","getMonth","nextMonthAriaLabel","closeButtonAriaLabel","callback","ev","key"],"sources":["../../../src/components/CalendarDay/CalendarDay.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Enter } from '@fluentui/keyboard-keys';\nimport { ArrowDownRegular, ArrowUpRegular, DismissRegular } from '@fluentui/react-icons';\nimport { useId } from '@fluentui/react-utilities';\nimport { mergeClasses } from '@griffel/react';\nimport { addMonths, compareDatePart, getMonthEnd, getMonthStart } from '../../utils';\nimport { CalendarDayGrid } from '../CalendarDayGrid/CalendarDayGrid';\nimport { useCalendarDayStyles_unstable } from './useCalendarDayStyles';\nimport type { ICalendarDayGrid } from '../CalendarDayGrid/CalendarDayGrid.types';\nimport type { CalendarDayProps, CalendarDayStyles } from './CalendarDay.types';\n\n/**\n * @internal\n */\nexport const CalendarDay: React.FunctionComponent<CalendarDayProps> = props => {\n const dayGrid = React.useRef<ICalendarDayGrid>(null);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n focus() {\n dayGrid.current?.focus?.();\n },\n }),\n [],\n );\n\n const {\n strings,\n navigatedDate,\n dateTimeFormatter,\n className,\n onHeaderSelect,\n showSixWeeksByDefault,\n minDate,\n maxDate,\n restrictedDates,\n onNavigateDate,\n showWeekNumbers,\n dateRangeType,\n animationDirection,\n } = props;\n const monthAndYearId = useId();\n\n const classNames = useCalendarDayStyles_unstable({\n className,\n headerIsClickable: !!onHeaderSelect,\n showWeekNumbers,\n animationDirection,\n });\n\n const monthAndYear = dateTimeFormatter.formatMonthYear(navigatedDate, strings);\n const HeaderButtonComponentType = onHeaderSelect ? 'button' : 'div';\n const headerAriaLabel = strings.yearPickerHeaderAriaLabel\n ? strings.yearPickerHeaderAriaLabel.replace('{0}', monthAndYear)\n : monthAndYear;\n\n const { ...propsWithoutStyles } = props;\n\n return (\n <div className={classNames.root}>\n <div className={classNames.header}>\n <HeaderButtonComponentType\n aria-label={onHeaderSelect ? headerAriaLabel : undefined}\n className={classNames.monthAndYear}\n onClick={onHeaderSelect}\n tabIndex={onHeaderSelect ? 0 : -1} // prevent focus if there's no action for the button\n onKeyDown={onButtonKeyDown(onHeaderSelect)}\n type=\"button\"\n >\n <span id={monthAndYearId} aria-live=\"polite\" aria-atomic=\"true\">\n {monthAndYear}\n </span>\n </HeaderButtonComponentType>\n <CalendarDayNavigationButtons {...props} classNames={classNames} />\n </div>\n <CalendarDayGrid\n {...propsWithoutStyles}\n componentRef={dayGrid}\n strings={strings}\n navigatedDate={navigatedDate!}\n weeksToShow={showSixWeeksByDefault ? 6 : undefined}\n dateTimeFormatter={dateTimeFormatter!}\n minDate={minDate}\n maxDate={maxDate}\n restrictedDates={restrictedDates}\n onNavigateDate={onNavigateDate}\n labelledBy={monthAndYearId}\n dateRangeType={dateRangeType}\n />\n </div>\n );\n};\nCalendarDay.displayName = 'CalendarDay';\n\ninterface CalendarDayNavigationButtonsProps extends CalendarDayProps {\n classNames: Record<keyof CalendarDayStyles, string>;\n}\n\nconst CalendarDayNavigationButtons = (props: CalendarDayNavigationButtonsProps): JSX.Element => {\n const {\n minDate,\n maxDate,\n navigatedDate,\n allFocusable,\n strings,\n showCloseButton,\n classNames,\n onNavigateDate,\n onDismiss,\n } = props;\n\n const onSelectNextMonth = (): void => {\n onNavigateDate(addMonths(navigatedDate, 1), false);\n };\n\n const onSelectPrevMonth = (): void => {\n onNavigateDate(addMonths(navigatedDate, -1), false);\n };\n\n // determine if previous/next months are in bounds\n const prevMonthInBounds = minDate ? compareDatePart(minDate, getMonthStart(navigatedDate)) < 0 : true;\n const nextMonthInBounds = maxDate ? compareDatePart(getMonthEnd(navigatedDate), maxDate) < 0 : true;\n\n // use aria-disabled instead of disabled so focus is not lost\n // when a prev/next button becomes disabled after being clicked\n return (\n <div className={classNames.monthComponents}>\n <button\n className={mergeClasses(classNames.headerIconButton, !prevMonthInBounds && classNames.disabledStyle)}\n tabIndex={prevMonthInBounds ? undefined : allFocusable ? 0 : -1}\n aria-disabled={!prevMonthInBounds}\n onClick={prevMonthInBounds ? onSelectPrevMonth : undefined}\n onKeyDown={prevMonthInBounds ? onButtonKeyDown(onSelectPrevMonth) : undefined}\n title={\n strings.prevMonthAriaLabel\n ? strings.prevMonthAriaLabel + ' ' + strings.months[addMonths(navigatedDate, -1).getMonth()]\n : undefined\n }\n type=\"button\"\n >\n <ArrowUpRegular />\n </button>\n <button\n className={mergeClasses(classNames.headerIconButton, !nextMonthInBounds && classNames.disabledStyle)}\n tabIndex={nextMonthInBounds ? undefined : allFocusable ? 0 : -1}\n aria-disabled={!nextMonthInBounds}\n onClick={nextMonthInBounds ? onSelectNextMonth : undefined}\n onKeyDown={nextMonthInBounds ? onButtonKeyDown(onSelectNextMonth) : undefined}\n title={\n strings.nextMonthAriaLabel\n ? strings.nextMonthAriaLabel + ' ' + strings.months[addMonths(navigatedDate, 1).getMonth()]\n : undefined\n }\n type=\"button\"\n >\n <ArrowDownRegular />\n </button>\n {showCloseButton && (\n <button\n className={classNames.headerIconButton}\n onClick={onDismiss}\n onKeyDown={onButtonKeyDown(onDismiss)}\n title={strings.closeButtonAriaLabel}\n type=\"button\"\n >\n <DismissRegular />\n </button>\n )}\n </div>\n );\n};\nCalendarDayNavigationButtons.displayName = 'CalendarDayNavigationButtons';\n\nconst onButtonKeyDown =\n (callback?: () => void): ((ev: React.KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => void) =>\n (ev: React.KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => {\n switch (ev.key) {\n case Enter:\n callback?.();\n break;\n }\n };\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,KAAK,QAAQ;AACtB,SAASC,gBAAgB,EAAEC,cAAc,EAAEC,cAAc,QAAQ;AACjE,SAASC,KAAK,QAAQ;AACtB,SAASC,YAAY,QAAQ;AAC7B,SAASC,SAAS,EAAEC,eAAe,EAAEC,WAAW,EAAEC,aAAa,QAAQ;AACvE,SAASC,eAAe,QAAQ;AAChC,SAASC,6BAA6B,QAAQ;AAI9C;;;AAGA,OAAO,MAAMC,WAAA,GAAyDC,KAAA,IAAS;EAC7E,MAAMC,OAAA,GAAUf,KAAA,CAAMgB,MAAM,CAAmB,IAAI;EAEnDhB,KAAA,CAAMiB,mBAAmB,CACvBH,KAAA,CAAMI,YAAY,EAClB;IAAO;MACLC,MAAA,EAAQ;YACNC,gBAAA,EAAAC,sBAAA;QAAA,CAAAD,gBAAA,GAAAL,OAAA,CAAQO,OAAO,cAAfF,gBAAA,wBAAAC,sBAAA,GAAAD,gBAAA,CAAiBD,KAAA,cAAAE,sBAAA,cAAjB,SAAAA,sBAAA,CAAAE,IAAA,CAAAH,gBAAA;MACF;IACF;KACA,EAAE;EAGJ,MAAM;IACJI,OAAA;IACAC,aAAA;IACAC,iBAAA;IACAC,SAAA;IACAC,cAAA;IACAC,qBAAA;IACAC,OAAA;IACAC,OAAA;IACAC,eAAA;IACAC,cAAA;IACAC,eAAA;IACAC,aAAA;IACAC;EAAkB,CACnB,GAAGtB,KAAA;EACJ,MAAMuB,cAAA,GAAiBhC,KAAA;EAEvB,MAAMiC,UAAA,GAAa1B,6BAAA,CAA8B;IAC/Ce,SAAA;IACAY,iBAAA,EAAmB,CAAC,CAACX,cAAA;IACrBM,eAAA;IACAE;EACF;EAEA,MAAMI,YAAA,GAAed,iBAAA,CAAkBe,e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ACZ,KAAK9E,KAAA;QACH4E,QAAA,aAAAA,QAAA,uBAAAA,QAAA;QACA;IAAM;EAEZ"}
|
|
1
|
+
{"version":3,"names":["React","Enter","ArrowDownRegular","ArrowUpRegular","DismissRegular","useId","mergeClasses","addMonths","compareDatePart","getMonthEnd","getMonthStart","CalendarDayGrid","useCalendarDayStyles_unstable","CalendarDay","props","dayGrid","useRef","useImperativeHandle","componentRef","focus","_dayGrid_current","_dayGrid_current_focus","current","call","strings","navigatedDate","dateTimeFormatter","className","onHeaderSelect","showSixWeeksByDefault","minDate","maxDate","restrictedDates","onNavigateDate","showWeekNumbers","dateRangeType","animationDirection","monthAndYearId","classNames","headerIsClickable","monthAndYear","formatMonthYear","HeaderButtonComponentType","headerAriaLabel","yearPickerHeaderAriaLabel","replace","propsWithoutStyles","createElement","root","header","undefined","onClick","tabIndex","onKeyDown","onButtonKeyDown","type","id","CalendarDayNavigationButtons","weeksToShow","labelledBy","displayName","allFocusable","showCloseButton","onDismiss","onSelectNextMonth","onSelectPrevMonth","prevMonthInBounds","nextMonthInBounds","monthComponents","headerIconButton","disabledStyle","title","prevMonthAriaLabel","months","getMonth","nextMonthAriaLabel","closeButtonAriaLabel","callback","ev","key"],"sources":["../../../src/components/CalendarDay/CalendarDay.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Enter } from '@fluentui/keyboard-keys';\nimport { ArrowDownRegular, ArrowUpRegular, DismissRegular } from '@fluentui/react-icons';\nimport { useId } from '@fluentui/react-utilities';\nimport { mergeClasses } from '@griffel/react';\nimport { addMonths, compareDatePart, getMonthEnd, getMonthStart } from '../../utils';\nimport { CalendarDayGrid } from '../CalendarDayGrid/CalendarDayGrid';\nimport { useCalendarDayStyles_unstable } from './useCalendarDayStyles.styles';\nimport type { ICalendarDayGrid } from '../CalendarDayGrid/CalendarDayGrid.types';\nimport type { CalendarDayProps, CalendarDayStyles } from './CalendarDay.types';\n\n/**\n * @internal\n */\nexport const CalendarDay: React.FunctionComponent<CalendarDayProps> = props => {\n const dayGrid = React.useRef<ICalendarDayGrid>(null);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n focus() {\n dayGrid.current?.focus?.();\n },\n }),\n [],\n );\n\n const {\n strings,\n navigatedDate,\n dateTimeFormatter,\n className,\n onHeaderSelect,\n showSixWeeksByDefault,\n minDate,\n maxDate,\n restrictedDates,\n onNavigateDate,\n showWeekNumbers,\n dateRangeType,\n animationDirection,\n } = props;\n const monthAndYearId = useId();\n\n const classNames = useCalendarDayStyles_unstable({\n className,\n headerIsClickable: !!onHeaderSelect,\n showWeekNumbers,\n animationDirection,\n });\n\n const monthAndYear = dateTimeFormatter.formatMonthYear(navigatedDate, strings);\n const HeaderButtonComponentType = onHeaderSelect ? 'button' : 'div';\n const headerAriaLabel = strings.yearPickerHeaderAriaLabel\n ? strings.yearPickerHeaderAriaLabel.replace('{0}', monthAndYear)\n : monthAndYear;\n\n const { ...propsWithoutStyles } = props;\n\n return (\n <div className={classNames.root}>\n <div className={classNames.header}>\n <HeaderButtonComponentType\n aria-label={onHeaderSelect ? headerAriaLabel : undefined}\n className={classNames.monthAndYear}\n onClick={onHeaderSelect}\n tabIndex={onHeaderSelect ? 0 : -1} // prevent focus if there's no action for the button\n onKeyDown={onButtonKeyDown(onHeaderSelect)}\n type=\"button\"\n >\n <span id={monthAndYearId} aria-live=\"polite\" aria-atomic=\"true\">\n {monthAndYear}\n </span>\n </HeaderButtonComponentType>\n <CalendarDayNavigationButtons {...props} classNames={classNames} />\n </div>\n <CalendarDayGrid\n {...propsWithoutStyles}\n componentRef={dayGrid}\n strings={strings}\n navigatedDate={navigatedDate!}\n weeksToShow={showSixWeeksByDefault ? 6 : undefined}\n dateTimeFormatter={dateTimeFormatter!}\n minDate={minDate}\n maxDate={maxDate}\n restrictedDates={restrictedDates}\n onNavigateDate={onNavigateDate}\n labelledBy={monthAndYearId}\n dateRangeType={dateRangeType}\n />\n </div>\n );\n};\nCalendarDay.displayName = 'CalendarDay';\n\ninterface CalendarDayNavigationButtonsProps extends CalendarDayProps {\n classNames: Record<keyof CalendarDayStyles, string>;\n}\n\nconst CalendarDayNavigationButtons = (props: CalendarDayNavigationButtonsProps): JSX.Element => {\n const {\n minDate,\n maxDate,\n navigatedDate,\n allFocusable,\n strings,\n showCloseButton,\n classNames,\n onNavigateDate,\n onDismiss,\n } = props;\n\n const onSelectNextMonth = (): void => {\n onNavigateDate(addMonths(navigatedDate, 1), false);\n };\n\n const onSelectPrevMonth = (): void => {\n onNavigateDate(addMonths(navigatedDate, -1), false);\n };\n\n // determine if previous/next months are in bounds\n const prevMonthInBounds = minDate ? compareDatePart(minDate, getMonthStart(navigatedDate)) < 0 : true;\n const nextMonthInBounds = maxDate ? compareDatePart(getMonthEnd(navigatedDate), maxDate) < 0 : true;\n\n // use aria-disabled instead of disabled so focus is not lost\n // when a prev/next button becomes disabled after being clicked\n return (\n <div className={classNames.monthComponents}>\n <button\n className={mergeClasses(classNames.headerIconButton, !prevMonthInBounds && classNames.disabledStyle)}\n tabIndex={prevMonthInBounds ? undefined : allFocusable ? 0 : -1}\n aria-disabled={!prevMonthInBounds}\n onClick={prevMonthInBounds ? onSelectPrevMonth : undefined}\n onKeyDown={prevMonthInBounds ? onButtonKeyDown(onSelectPrevMonth) : undefined}\n title={\n strings.prevMonthAriaLabel\n ? strings.prevMonthAriaLabel + ' ' + strings.months[addMonths(navigatedDate, -1).getMonth()]\n : undefined\n }\n type=\"button\"\n >\n <ArrowUpRegular />\n </button>\n <button\n className={mergeClasses(classNames.headerIconButton, !nextMonthInBounds && classNames.disabledStyle)}\n tabIndex={nextMonthInBounds ? undefined : allFocusable ? 0 : -1}\n aria-disabled={!nextMonthInBounds}\n onClick={nextMonthInBounds ? onSelectNextMonth : undefined}\n onKeyDown={nextMonthInBounds ? onButtonKeyDown(onSelectNextMonth) : undefined}\n title={\n strings.nextMonthAriaLabel\n ? strings.nextMonthAriaLabel + ' ' + strings.months[addMonths(navigatedDate, 1).getMonth()]\n : undefined\n }\n type=\"button\"\n >\n <ArrowDownRegular />\n </button>\n {showCloseButton && (\n <button\n className={classNames.headerIconButton}\n onClick={onDismiss}\n onKeyDown={onButtonKeyDown(onDismiss)}\n title={strings.closeButtonAriaLabel}\n type=\"button\"\n >\n <DismissRegular />\n </button>\n )}\n </div>\n );\n};\nCalendarDayNavigationButtons.displayName = 'CalendarDayNavigationButtons';\n\nconst onButtonKeyDown =\n (callback?: () => void): ((ev: React.KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => void) =>\n (ev: React.KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => {\n switch (ev.key) {\n case Enter:\n callback?.();\n break;\n }\n };\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,KAAK,QAAQ;AACtB,SAASC,gBAAgB,EAAEC,cAAc,EAAEC,cAAc,QAAQ;AACjE,SAASC,KAAK,QAAQ;AACtB,SAASC,YAAY,QAAQ;AAC7B,SAASC,SAAS,EAAEC,eAAe,EAAEC,WAAW,EAAEC,aAAa,QAAQ;AACvE,SAASC,eAAe,QAAQ;AAChC,SAASC,6BAA6B,QAAQ;AAI9C;;;AAGA,OAAO,MAAMC,WAAA,GAAyDC,KAAA,IAAS;EAC7E,MAAMC,OAAA,GAAUf,KAAA,CAAMgB,MAAM,CAAmB,IAAI;EAEnDhB,KAAA,CAAMiB,mBAAmB,CACvBH,KAAA,CAAMI,YAAY,EAClB;IAAO;MACLC,MAAA,EAAQ;YACNC,gBAAA,EAAAC,sBAAA;QAAA,CAAAD,gBAAA,GAAAL,OAAA,CAAQO,OAAO,cAAfF,gBAAA,wBAAAC,sBAAA,GAAAD,gBAAA,CAAiBD,KAAA,cAAAE,sBAAA,cAAjB,SAAAA,sBAAA,CAAAE,IAAA,CAAAH,gBAAA;MACF;IACF;KACA,EAAE;EAGJ,MAAM;IACJI,OAAA;IACAC,aAAA;IACAC,iBAAA;IACAC,SAAA;IACAC,cAAA;IACAC,qBAAA;IACAC,OAAA;IACAC,OAAA;IACAC,eAA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