@fluentui/react-datepicker-compat 0.0.0-nightly-20230512-0423.1 → 0.1.0
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 +65 -31
- package/CHANGELOG.md +24 -18
- package/dist/index.d.ts +1165 -0
- package/lib/Calendar.js +2 -0
- package/lib/Calendar.js.map +1 -0
- package/lib/CalendarDay.js +2 -0
- package/lib/CalendarDay.js.map +1 -0
- package/lib/CalendarDayGrid.js +2 -0
- package/lib/CalendarDayGrid.js.map +1 -0
- package/lib/CalendarMonth.js +2 -0
- package/lib/CalendarMonth.js.map +1 -0
- package/lib/CalendarPicker.js +2 -0
- package/lib/CalendarPicker.js.map +1 -0
- package/lib/CalendarYear.js +2 -0
- package/lib/CalendarYear.js.map +1 -0
- package/lib/DatePicker.js +2 -0
- package/lib/DatePicker.js.map +1 -0
- package/lib/components/Calendar/Calendar.js +319 -0
- package/lib/components/Calendar/Calendar.js.map +1 -0
- package/lib/components/Calendar/Calendar.types.js +15 -0
- package/lib/components/Calendar/Calendar.types.js.map +1 -0
- package/lib/components/Calendar/defaults.js +3 -0
- package/lib/components/Calendar/defaults.js.map +1 -0
- package/lib/components/Calendar/index.js +5 -0
- package/lib/components/Calendar/index.js.map +1 -0
- package/lib/components/Calendar/useCalendarStyles.styles.js +149 -0
- package/lib/components/Calendar/useCalendarStyles.styles.js.map +1 -0
- package/lib/components/CalendarDay/CalendarDay.js +143 -0
- package/lib/components/CalendarDay/CalendarDay.js.map +1 -0
- package/lib/components/CalendarDay/CalendarDay.types.js +2 -0
- package/lib/components/CalendarDay/CalendarDay.types.js.map +1 -0
- package/lib/components/CalendarDay/index.js +4 -0
- package/lib/components/CalendarDay/index.js.map +1 -0
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js +180 -0
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js +183 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js +2 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +193 -0
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarGridRow.js +40 -0
- package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js +46 -0
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -0
- package/lib/components/CalendarDayGrid/index.js +5 -0
- package/lib/components/CalendarDayGrid/index.js.map +1 -0
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +443 -0
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js +98 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -0
- package/lib/components/CalendarDayGrid/useWeeks.js +47 -0
- package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -0
- package/lib/components/CalendarMonth/CalendarMonth.js +282 -0
- package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -0
- package/lib/components/CalendarMonth/CalendarMonth.types.js +2 -0
- package/lib/components/CalendarMonth/CalendarMonth.types.js.map +1 -0
- package/lib/components/CalendarMonth/index.js +4 -0
- package/lib/components/CalendarMonth/index.js.map +1 -0
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js +10 -0
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -0
- package/lib/components/CalendarPicker/CalendarPicker.types.js +2 -0
- package/lib/components/CalendarPicker/CalendarPicker.types.js.map +1 -0
- package/lib/components/CalendarPicker/index.js +3 -0
- package/lib/components/CalendarPicker/index.js.map +1 -0
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js +371 -0
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -0
- package/lib/components/CalendarYear/CalendarYear.js +350 -0
- package/lib/components/CalendarYear/CalendarYear.js.map +1 -0
- package/lib/components/CalendarYear/CalendarYear.types.js +2 -0
- package/lib/components/CalendarYear/CalendarYear.types.js.map +1 -0
- package/lib/components/CalendarYear/index.js +4 -0
- package/lib/components/CalendarYear/index.js.map +1 -0
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js +10 -0
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -0
- package/lib/components/DatePicker/DatePicker.js +11 -0
- package/lib/components/DatePicker/DatePicker.js.map +1 -0
- package/lib/components/DatePicker/DatePicker.types.js +2 -0
- package/lib/components/DatePicker/DatePicker.types.js.map +1 -0
- package/lib/components/DatePicker/defaults.js +15 -0
- package/lib/components/DatePicker/defaults.js.map +1 -0
- package/lib/components/DatePicker/index.js +7 -0
- package/lib/components/DatePicker/index.js.map +1 -0
- package/lib/components/DatePicker/renderDatePicker.js +18 -0
- package/lib/components/DatePicker/renderDatePicker.js.map +1 -0
- package/lib/components/DatePicker/useDatePicker.js +395 -0
- package/lib/components/DatePicker/useDatePicker.js.map +1 -0
- package/lib/components/DatePicker/useDatePickerStyles.styles.js +38 -0
- package/lib/components/DatePicker/useDatePickerStyles.styles.js.map +1 -0
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -0
- package/lib/utils/animations.js +98 -0
- package/lib/utils/animations.js.map +1 -0
- package/lib/utils/constants.js +64 -0
- package/lib/utils/constants.js.map +1 -0
- package/lib/utils/dateFormatting/dateFormatting.defaults.js +58 -0
- package/lib/utils/dateFormatting/dateFormatting.defaults.js.map +1 -0
- package/lib/utils/dateFormatting/dateFormatting.types.js +2 -0
- package/lib/utils/dateFormatting/dateFormatting.types.js.map +1 -0
- package/lib/utils/dateFormatting/index.js +3 -0
- package/lib/utils/dateFormatting/index.js.map +1 -0
- package/lib/utils/dateGrid/dateGrid.types.js +2 -0
- package/lib/utils/dateGrid/dateGrid.types.js.map +1 -0
- package/lib/utils/dateGrid/findAvailableDate.js +29 -0
- package/lib/utils/dateGrid/findAvailableDate.js.map +1 -0
- package/lib/utils/dateGrid/getBoundedDateRange.js +18 -0
- package/lib/utils/dateGrid/getBoundedDateRange.js.map +1 -0
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js +18 -0
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -0
- package/lib/utils/dateGrid/getDayGrid.js +85 -0
- package/lib/utils/dateGrid/getDayGrid.js.map +1 -0
- package/lib/utils/dateGrid/index.js +6 -0
- package/lib/utils/dateGrid/index.js.map +1 -0
- package/lib/utils/dateGrid/isAfterMaxDate.js +13 -0
- package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -0
- package/lib/utils/dateGrid/isBeforeMinDate.js +13 -0
- package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -0
- package/lib/utils/dateGrid/isContiguous.js +19 -0
- package/lib/utils/dateGrid/isContiguous.js.map +1 -0
- package/lib/utils/dateGrid/isRestrictedDate.js +21 -0
- package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -0
- package/lib/utils/dateMath/dateMath.js +358 -0
- package/lib/utils/dateMath/dateMath.js.map +1 -0
- package/lib/utils/dateMath/index.js +2 -0
- package/lib/utils/dateMath/index.js.map +1 -0
- package/lib/utils/dom.js +9 -0
- package/lib/utils/dom.js.map +1 -0
- package/lib/utils/focus.js +28 -0
- package/lib/utils/focus.js.map +1 -0
- package/lib/utils/index.js +8 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/usePopupPositioning.js +25 -0
- package/lib/utils/usePopupPositioning.js.map +1 -0
- package/lib-commonjs/Calendar.js +9 -0
- package/lib-commonjs/Calendar.js.map +1 -0
- package/lib-commonjs/CalendarDay.js +9 -0
- package/lib-commonjs/CalendarDay.js.map +1 -0
- package/lib-commonjs/CalendarDayGrid.js +9 -0
- package/lib-commonjs/CalendarDayGrid.js.map +1 -0
- package/lib-commonjs/CalendarMonth.js +9 -0
- package/lib-commonjs/CalendarMonth.js.map +1 -0
- package/lib-commonjs/CalendarPicker.js +9 -0
- package/lib-commonjs/CalendarPicker.js.map +1 -0
- package/lib-commonjs/CalendarYear.js +9 -0
- package/lib-commonjs/CalendarYear.js.map +1 -0
- package/lib-commonjs/DatePicker.js +9 -0
- package/lib-commonjs/DatePicker.js.map +1 -0
- package/lib-commonjs/components/Calendar/Calendar.js +306 -0
- package/lib-commonjs/components/Calendar/Calendar.js.map +1 -0
- package/lib-commonjs/components/Calendar/Calendar.types.js +21 -0
- package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -0
- package/lib-commonjs/components/Calendar/defaults.js +12 -0
- package/lib-commonjs/components/Calendar/defaults.js.map +1 -0
- package/lib-commonjs/components/Calendar/index.js +16 -0
- package/lib-commonjs/components/Calendar/index.js.map +1 -0
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js +286 -0
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.js +124 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js +9 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/index.js +11 -0
- package/lib-commonjs/components/CalendarDay/index.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js +356 -0
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js +181 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js +9 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +173 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js +35 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js +45 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/index.js +21 -0
- package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +916 -0
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js +103 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js +54 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js +271 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js +9 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/index.js +11 -0
- package/lib-commonjs/components/CalendarMonth/index.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js +14 -0
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -0
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js +7 -0
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +1 -0
- package/lib-commonjs/components/CalendarPicker/index.js +10 -0
- package/lib-commonjs/components/CalendarPicker/index.js.map +1 -0
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js +746 -0
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.js +307 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js +9 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/index.js +11 -0
- package/lib-commonjs/components/CalendarYear/index.js.map +1 -0
- 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 +21 -0
- package/lib-commonjs/components/DatePicker/DatePicker.js.map +1 -0
- package/lib-commonjs/components/DatePicker/DatePicker.types.js +9 -0
- package/lib-commonjs/components/DatePicker/DatePicker.types.js.map +1 -0
- package/lib-commonjs/components/DatePicker/defaults.js +30 -0
- package/lib-commonjs/components/DatePicker/defaults.js.map +1 -0
- package/lib-commonjs/components/DatePicker/index.js +14 -0
- package/lib-commonjs/components/DatePicker/index.js.map +1 -0
- package/lib-commonjs/components/DatePicker/renderDatePicker.js +20 -0
- package/lib-commonjs/components/DatePicker/renderDatePicker.js.map +1 -0
- package/lib-commonjs/components/DatePicker/useDatePicker.js +440 -0
- package/lib-commonjs/components/DatePicker/useDatePicker.js.map +1 -0
- package/lib-commonjs/components/DatePicker/useDatePickerStyles.styles.js +55 -0
- package/lib-commonjs/components/DatePicker/useDatePickerStyles.styles.js.map +1 -0
- package/lib-commonjs/index.js +50 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/utils/animations.js +126 -0
- package/lib-commonjs/utils/animations.js.map +1 -0
- package/lib-commonjs/utils/constants.js +82 -0
- package/lib-commonjs/utils/constants.js.map +1 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js +102 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +1 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js +7 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js.map +1 -0
- package/lib-commonjs/utils/dateFormatting/index.js +10 -0
- package/lib-commonjs/utils/dateFormatting/index.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js +7 -0
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js +29 -0
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js +23 -0
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js +20 -0
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/getDayGrid.js +76 -0
- package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/index.js +13 -0
- package/lib-commonjs/utils/dateGrid/index.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js +15 -0
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js +15 -0
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isContiguous.js +28 -0
- package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js +21 -0
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -0
- package/lib-commonjs/utils/dateMath/dateMath.js +274 -0
- package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -0
- package/lib-commonjs/utils/dateMath/index.js +9 -0
- package/lib-commonjs/utils/dateMath/index.js.map +1 -0
- package/lib-commonjs/utils/dom.js +18 -0
- package/lib-commonjs/utils/dom.js.map +1 -0
- package/lib-commonjs/utils/focus.js +31 -0
- package/lib-commonjs/utils/focus.js.map +1 -0
- package/lib-commonjs/utils/index.js +15 -0
- package/lib-commonjs/utils/index.js.map +1 -0
- package/lib-commonjs/utils/usePopupPositioning.js +26 -0
- package/lib-commonjs/utils/usePopupPositioning.js.map +1 -0
- package/package.json +19 -14
package/lib/Calendar.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/Calendar.ts"],"sourcesContent":["export * from './components/Calendar/index';\n"],"mappings":"AAAA,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/CalendarDay.ts"],"sourcesContent":["export * from './components/CalendarDay/index';\n"],"mappings":"AAAA,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/CalendarDayGrid.ts"],"sourcesContent":["export * from './components/CalendarDayGrid/index';\n"],"mappings":"AAAA,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/CalendarMonth.ts"],"sourcesContent":["export * from './components/CalendarMonth/index';\n"],"mappings":"AAAA,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/CalendarPicker.ts"],"sourcesContent":["export * from './components/CalendarPicker/index';\n"],"mappings":"AAAA,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/CalendarYear.ts"],"sourcesContent":["export * from './components/CalendarYear/index';\n"],"mappings":"AAAA,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/DatePicker.ts"],"sourcesContent":["export * from './components/DatePicker/index';\n"],"mappings":"AAAA,cAAc"}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Backspace, Enter, Escape, PageDown, PageUp, Space } from '@fluentui/keyboard-keys';
|
|
3
|
+
import { useControllableState } from '@fluentui/react-utilities';
|
|
4
|
+
import { addMonths, addYears, DateRangeType, DayOfWeek, DEFAULT_CALENDAR_STRINGS, DEFAULT_DATE_FORMATTING, FirstWeekOfYear, focusAsync, getWindow } from '../../utils';
|
|
5
|
+
import { CalendarDay } from '../CalendarDay/CalendarDay';
|
|
6
|
+
import { CalendarMonth } from '../CalendarMonth/CalendarMonth';
|
|
7
|
+
import { useCalendarStyles_unstable } from './useCalendarStyles.styles';
|
|
8
|
+
const MIN_SIZE_FORCE_OVERLAY = 440;
|
|
9
|
+
const defaultWorkWeekDays = [DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday];
|
|
10
|
+
function useDateState({
|
|
11
|
+
value,
|
|
12
|
+
today = new Date(),
|
|
13
|
+
onSelectDate
|
|
14
|
+
}) {
|
|
15
|
+
/** The currently selected date in the calendar */const [selectedDate, setSelectedDate] = useControllableState({
|
|
16
|
+
defaultState: today,
|
|
17
|
+
initialState: today,
|
|
18
|
+
state: value
|
|
19
|
+
});
|
|
20
|
+
/** The currently focused date in the day picker, but not necessarily selected */
|
|
21
|
+
const [navigatedDay = today, setNavigatedDay] = React.useState(value);
|
|
22
|
+
/** The currently focused date in the month picker, but not necessarily selected */
|
|
23
|
+
const [navigatedMonth = today, setNavigatedMonth] = React.useState(value);
|
|
24
|
+
/** If using a controlled value, when that value changes, navigate to that date */
|
|
25
|
+
const [lastSelectedDate = today, setLastSelectedDate] = React.useState(value);
|
|
26
|
+
if (value && lastSelectedDate.valueOf() !== value.valueOf()) {
|
|
27
|
+
setNavigatedDay(value);
|
|
28
|
+
setNavigatedMonth(value);
|
|
29
|
+
setLastSelectedDate(value);
|
|
30
|
+
}
|
|
31
|
+
const navigateMonth = date => {
|
|
32
|
+
setNavigatedMonth(date);
|
|
33
|
+
};
|
|
34
|
+
const navigateDay = date => {
|
|
35
|
+
setNavigatedMonth(date);
|
|
36
|
+
setNavigatedDay(date);
|
|
37
|
+
};
|
|
38
|
+
const onDateSelected = (date, selectedDateRangeArray) => {
|
|
39
|
+
setNavigatedMonth(date);
|
|
40
|
+
setNavigatedDay(date);
|
|
41
|
+
setSelectedDate(date);
|
|
42
|
+
onSelectDate === null || onSelectDate === void 0 ? void 0 : onSelectDate(date, selectedDateRangeArray);
|
|
43
|
+
};
|
|
44
|
+
return [selectedDate, navigatedDay, navigatedMonth, onDateSelected, navigateDay, navigateMonth];
|
|
45
|
+
}
|
|
46
|
+
function useVisibilityState({
|
|
47
|
+
isDayPickerVisible: isDayPickerVisibleProp,
|
|
48
|
+
isMonthPickerVisible: isMonthPickerVisibleProp,
|
|
49
|
+
showMonthPickerAsOverlay
|
|
50
|
+
}) {
|
|
51
|
+
/** State used to show/hide month picker */const [isMonthPickerVisible, setIsMonthPickerVisible] = useControllableState({
|
|
52
|
+
defaultState: false,
|
|
53
|
+
initialState: true,
|
|
54
|
+
state: getShowMonthPickerAsOverlay({
|
|
55
|
+
isDayPickerVisible: isDayPickerVisibleProp,
|
|
56
|
+
showMonthPickerAsOverlay
|
|
57
|
+
}) ? undefined : isMonthPickerVisibleProp
|
|
58
|
+
});
|
|
59
|
+
/** State used to show/hide day picker */
|
|
60
|
+
const [isDayPickerVisible, setIsDayPickerVisible] = useControllableState({
|
|
61
|
+
defaultState: true,
|
|
62
|
+
initialState: true,
|
|
63
|
+
state: getShowMonthPickerAsOverlay({
|
|
64
|
+
isDayPickerVisible: isDayPickerVisibleProp,
|
|
65
|
+
showMonthPickerAsOverlay
|
|
66
|
+
}) ? undefined : isDayPickerVisibleProp
|
|
67
|
+
});
|
|
68
|
+
const toggleDayMonthPickerVisibility = () => {
|
|
69
|
+
setIsMonthPickerVisible(!isMonthPickerVisible);
|
|
70
|
+
setIsDayPickerVisible(!isDayPickerVisible);
|
|
71
|
+
};
|
|
72
|
+
return [isMonthPickerVisible, isDayPickerVisible, toggleDayMonthPickerVisibility];
|
|
73
|
+
}
|
|
74
|
+
function useFocusLogic({
|
|
75
|
+
componentRef
|
|
76
|
+
}, isDayPickerVisible, isMonthPickerVisible) {
|
|
77
|
+
const dayPicker = React.useRef(null);
|
|
78
|
+
const monthPicker = React.useRef(null);
|
|
79
|
+
const focusOnUpdate = React.useRef(false);
|
|
80
|
+
const focus = React.useCallback(() => {
|
|
81
|
+
if (isDayPickerVisible && dayPicker.current) {
|
|
82
|
+
focusAsync(dayPicker.current);
|
|
83
|
+
} else if (isMonthPickerVisible && monthPicker.current) {
|
|
84
|
+
focusAsync(monthPicker.current);
|
|
85
|
+
}
|
|
86
|
+
}, [isDayPickerVisible, isMonthPickerVisible]);
|
|
87
|
+
React.useImperativeHandle(componentRef, () => ({
|
|
88
|
+
focus
|
|
89
|
+
}), [focus]);
|
|
90
|
+
React.useEffect(() => {
|
|
91
|
+
if (focusOnUpdate.current) {
|
|
92
|
+
focus();
|
|
93
|
+
focusOnUpdate.current = false;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
const focusOnNextUpdate = () => {
|
|
97
|
+
focusOnUpdate.current = true;
|
|
98
|
+
};
|
|
99
|
+
return [dayPicker, monthPicker, focusOnNextUpdate];
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
export const Calendar = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
105
|
+
const {
|
|
106
|
+
allFocusable = false,
|
|
107
|
+
calendarDayProps,
|
|
108
|
+
calendarMonthProps,
|
|
109
|
+
className,
|
|
110
|
+
componentRef,
|
|
111
|
+
dateRangeType = DateRangeType.Day,
|
|
112
|
+
dateTimeFormatter = DEFAULT_DATE_FORMATTING,
|
|
113
|
+
firstDayOfWeek = DayOfWeek.Sunday,
|
|
114
|
+
firstWeekOfYear = FirstWeekOfYear.FirstDay,
|
|
115
|
+
highlightCurrentMonth = false,
|
|
116
|
+
highlightSelectedMonth = false,
|
|
117
|
+
id,
|
|
118
|
+
isDayPickerVisible: isDayPickerVisibleProp = true,
|
|
119
|
+
isMonthPickerVisible: isMonthPickerVisibleProp = true,
|
|
120
|
+
maxDate,
|
|
121
|
+
minDate,
|
|
122
|
+
onDismiss,
|
|
123
|
+
onSelectDate,
|
|
124
|
+
restrictedDates,
|
|
125
|
+
showCloseButton = false,
|
|
126
|
+
showGoToToday = true,
|
|
127
|
+
showMonthPickerAsOverlay: showMonthPickerAsOverlayProp = false,
|
|
128
|
+
showSixWeeksByDefault = false,
|
|
129
|
+
showWeekNumbers = false,
|
|
130
|
+
strings = DEFAULT_CALENDAR_STRINGS,
|
|
131
|
+
today = new Date(),
|
|
132
|
+
value,
|
|
133
|
+
workWeekDays = defaultWorkWeekDays
|
|
134
|
+
} = props;
|
|
135
|
+
const [selectedDate, navigatedDay, navigatedMonth, onDateSelected, navigateDay, navigateMonth] = useDateState({
|
|
136
|
+
onSelectDate,
|
|
137
|
+
value,
|
|
138
|
+
today
|
|
139
|
+
});
|
|
140
|
+
const [isMonthPickerVisible, isDayPickerVisible, toggleDayMonthPickerVisibility] = useVisibilityState({
|
|
141
|
+
isDayPickerVisible: isDayPickerVisibleProp,
|
|
142
|
+
isMonthPickerVisible: isMonthPickerVisibleProp,
|
|
143
|
+
showMonthPickerAsOverlay: showMonthPickerAsOverlayProp
|
|
144
|
+
});
|
|
145
|
+
const [dayPicker, monthPicker, focusOnNextUpdate] = useFocusLogic({
|
|
146
|
+
componentRef
|
|
147
|
+
}, isDayPickerVisible, isMonthPickerVisible);
|
|
148
|
+
const renderGoToTodayButton = () => {
|
|
149
|
+
let goTodayEnabled = showGoToToday;
|
|
150
|
+
if (goTodayEnabled && today) {
|
|
151
|
+
goTodayEnabled = navigatedDay.getFullYear() !== today.getFullYear() || navigatedDay.getMonth() !== today.getMonth() || navigatedMonth.getFullYear() !== today.getFullYear() || navigatedMonth.getMonth() !== today.getMonth();
|
|
152
|
+
}
|
|
153
|
+
return showGoToToday && /*#__PURE__*/React.createElement("button", {
|
|
154
|
+
className: classes.goTodayButton,
|
|
155
|
+
onClick: onGotoToday,
|
|
156
|
+
onKeyDown: onButtonKeyDown(onGotoToday),
|
|
157
|
+
type: "button",
|
|
158
|
+
disabled: !goTodayEnabled
|
|
159
|
+
}, strings.goToToday);
|
|
160
|
+
};
|
|
161
|
+
const onNavigateDayDate = (date, focusOnNavigatedDay) => {
|
|
162
|
+
navigateDay(date);
|
|
163
|
+
if (focusOnNavigatedDay) {
|
|
164
|
+
focusOnNextUpdate();
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
const onNavigateMonthDate = (date, focusOnNavigatedDay) => {
|
|
168
|
+
if (focusOnNavigatedDay) {
|
|
169
|
+
focusOnNextUpdate();
|
|
170
|
+
}
|
|
171
|
+
if (!focusOnNavigatedDay) {
|
|
172
|
+
navigateMonth(date);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (monthPickerOnly) {
|
|
176
|
+
onDateSelected(date);
|
|
177
|
+
}
|
|
178
|
+
navigateDay(date);
|
|
179
|
+
};
|
|
180
|
+
const onHeaderSelect = getShowMonthPickerAsOverlay({
|
|
181
|
+
isDayPickerVisible: isDayPickerVisibleProp,
|
|
182
|
+
showMonthPickerAsOverlay: showMonthPickerAsOverlayProp
|
|
183
|
+
}) ? () => {
|
|
184
|
+
toggleDayMonthPickerVisibility();
|
|
185
|
+
focusOnNextUpdate();
|
|
186
|
+
} : undefined;
|
|
187
|
+
const onGotoToday = () => {
|
|
188
|
+
navigateDay(today);
|
|
189
|
+
focusOnNextUpdate();
|
|
190
|
+
};
|
|
191
|
+
const onButtonKeyDown = callback => {
|
|
192
|
+
return ev => {
|
|
193
|
+
switch (ev.key) {
|
|
194
|
+
case Enter:
|
|
195
|
+
case Space:
|
|
196
|
+
callback();
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
const onDatePickerPopupKeyDown = ev => {
|
|
202
|
+
switch (ev.key) {
|
|
203
|
+
case Enter:
|
|
204
|
+
ev.preventDefault();
|
|
205
|
+
break;
|
|
206
|
+
case Backspace:
|
|
207
|
+
ev.preventDefault();
|
|
208
|
+
break;
|
|
209
|
+
case Escape:
|
|
210
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
211
|
+
break;
|
|
212
|
+
case PageUp:
|
|
213
|
+
if (ev.ctrlKey) {
|
|
214
|
+
// go to next year
|
|
215
|
+
navigateDay(addYears(navigatedDay, 1));
|
|
216
|
+
} else {
|
|
217
|
+
// go to next month
|
|
218
|
+
navigateDay(addMonths(navigatedDay, 1));
|
|
219
|
+
}
|
|
220
|
+
ev.preventDefault();
|
|
221
|
+
break;
|
|
222
|
+
case PageDown:
|
|
223
|
+
if (ev.ctrlKey) {
|
|
224
|
+
// go to previous year
|
|
225
|
+
navigateDay(addYears(navigatedDay, -1));
|
|
226
|
+
} else {
|
|
227
|
+
// go to previous month
|
|
228
|
+
navigateDay(addMonths(navigatedDay, -1));
|
|
229
|
+
}
|
|
230
|
+
ev.preventDefault();
|
|
231
|
+
break;
|
|
232
|
+
default:
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
const showMonthPickerAsOverlay = getShowMonthPickerAsOverlay(props);
|
|
237
|
+
const monthPickerOnly = !showMonthPickerAsOverlay && !isDayPickerVisible;
|
|
238
|
+
const classes = useCalendarStyles_unstable({
|
|
239
|
+
className,
|
|
240
|
+
isDayPickerVisible,
|
|
241
|
+
isMonthPickerVisible,
|
|
242
|
+
showWeekNumbers
|
|
243
|
+
});
|
|
244
|
+
let todayDateString = '';
|
|
245
|
+
let selectedDateString = '';
|
|
246
|
+
if (dateTimeFormatter && strings.todayDateFormatString) {
|
|
247
|
+
todayDateString = strings.todayDateFormatString.replace('{0}', dateTimeFormatter.formatMonthDayYear(today, strings));
|
|
248
|
+
}
|
|
249
|
+
if (dateTimeFormatter && strings.selectedDateFormatString) {
|
|
250
|
+
selectedDateString = strings.selectedDateFormatString.replace('{0}', dateTimeFormatter.formatMonthDayYear(selectedDate, strings));
|
|
251
|
+
}
|
|
252
|
+
const selectionAndTodayString = selectedDateString + ', ' + todayDateString;
|
|
253
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
254
|
+
id: id,
|
|
255
|
+
ref: forwardedRef,
|
|
256
|
+
role: "group",
|
|
257
|
+
"aria-label": selectionAndTodayString,
|
|
258
|
+
className: classes.root,
|
|
259
|
+
onKeyDown: onDatePickerPopupKeyDown
|
|
260
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
261
|
+
className: classes.liveRegion,
|
|
262
|
+
"aria-live": "polite",
|
|
263
|
+
"aria-atomic": "true"
|
|
264
|
+
}, /*#__PURE__*/React.createElement("span", null, selectedDateString)), isDayPickerVisible && /*#__PURE__*/React.createElement(CalendarDay, {
|
|
265
|
+
selectedDate: selectedDate,
|
|
266
|
+
navigatedDate: navigatedDay,
|
|
267
|
+
today: today,
|
|
268
|
+
onSelectDate: onDateSelected,
|
|
269
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
270
|
+
onNavigateDate: onNavigateDayDate,
|
|
271
|
+
onDismiss: onDismiss,
|
|
272
|
+
firstDayOfWeek: firstDayOfWeek,
|
|
273
|
+
dateRangeType: dateRangeType,
|
|
274
|
+
strings: strings,
|
|
275
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
276
|
+
onHeaderSelect: onHeaderSelect,
|
|
277
|
+
showWeekNumbers: showWeekNumbers,
|
|
278
|
+
firstWeekOfYear: firstWeekOfYear,
|
|
279
|
+
dateTimeFormatter: dateTimeFormatter,
|
|
280
|
+
showSixWeeksByDefault: showSixWeeksByDefault,
|
|
281
|
+
minDate: minDate,
|
|
282
|
+
maxDate: maxDate,
|
|
283
|
+
restrictedDates: restrictedDates,
|
|
284
|
+
workWeekDays: workWeekDays,
|
|
285
|
+
componentRef: dayPicker,
|
|
286
|
+
showCloseButton: showCloseButton,
|
|
287
|
+
allFocusable: allFocusable,
|
|
288
|
+
...calendarDayProps
|
|
289
|
+
}), isDayPickerVisible && isMonthPickerVisible && /*#__PURE__*/React.createElement("div", {
|
|
290
|
+
className: classes.divider
|
|
291
|
+
}), isMonthPickerVisible ? /*#__PURE__*/React.createElement("div", {
|
|
292
|
+
className: classes.monthPickerWrapper
|
|
293
|
+
}, /*#__PURE__*/React.createElement(CalendarMonth, {
|
|
294
|
+
navigatedDate: navigatedMonth,
|
|
295
|
+
selectedDate: navigatedDay,
|
|
296
|
+
strings: strings,
|
|
297
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
298
|
+
onNavigateDate: onNavigateMonthDate,
|
|
299
|
+
today: today,
|
|
300
|
+
highlightCurrentMonth: highlightCurrentMonth,
|
|
301
|
+
highlightSelectedMonth: highlightSelectedMonth,
|
|
302
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
303
|
+
onHeaderSelect: onHeaderSelect,
|
|
304
|
+
dateTimeFormatter: dateTimeFormatter,
|
|
305
|
+
minDate: minDate,
|
|
306
|
+
maxDate: maxDate,
|
|
307
|
+
componentRef: monthPicker,
|
|
308
|
+
...calendarMonthProps
|
|
309
|
+
}), renderGoToTodayButton()) : renderGoToTodayButton());
|
|
310
|
+
});
|
|
311
|
+
Calendar.displayName = 'Calendar';
|
|
312
|
+
function getShowMonthPickerAsOverlay({
|
|
313
|
+
isDayPickerVisible,
|
|
314
|
+
showMonthPickerAsOverlay
|
|
315
|
+
}) {
|
|
316
|
+
const win = getWindow();
|
|
317
|
+
return showMonthPickerAsOverlay || isDayPickerVisible && win && win.innerWidth <= MIN_SIZE_FORCE_OVERLAY;
|
|
318
|
+
}
|
|
319
|
+
//# sourceMappingURL=Calendar.js.map
|
|
@@ -0,0 +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.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;EAAEC,KAAA;EAAOC,KAAA,GAAQ,IAAIC,IAAA;EAAQC;AAAY,CAAiB,EAAE;EAChF,kDACA,MAAM,CAACC,YAAA,EAAcC,eAAA,CAAgB,GA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BAAA,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export var AnimationDirection;
|
|
3
|
+
(function (AnimationDirection) {
|
|
4
|
+
AnimationDirection[AnimationDirection[
|
|
5
|
+
/**
|
|
6
|
+
* Grid will transition out and in horizontally
|
|
7
|
+
*/
|
|
8
|
+
"Horizontal"] = 0] = "Horizontal";
|
|
9
|
+
AnimationDirection[AnimationDirection[
|
|
10
|
+
/**
|
|
11
|
+
* Grid will transition out and in vertically
|
|
12
|
+
*/
|
|
13
|
+
"Vertical"] = 1] = "Vertical";
|
|
14
|
+
})(AnimationDirection || (AnimationDirection = {}));
|
|
15
|
+
//# sourceMappingURL=Calendar.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","AnimationDirection"],"sources":["../../../src/components/Calendar/Calendar.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { CalendarStrings, DateFormatting, DateRangeType, DayOfWeek, FirstWeekOfYear } from '../../utils';\nimport type { CalendarDayProps } from '../CalendarDay/CalendarDay.types';\nimport type { CalendarMonthProps } from '../CalendarMonth/CalendarMonth.types';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ICalendar {\n /** Sets focus to the selected date. */\n focus: () => void;\n}\n\nexport interface CalendarProps extends React.RefAttributes<HTMLDivElement> {\n /**\n * Optional callback to access the ICalendar interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<ICalendar>;\n\n /**\n * Customized props for the calendar day\n */\n calendarDayProps?: Partial<CalendarDayProps>;\n\n /**\n * Customized props for the calendar month\n */\n calendarMonthProps?: Partial<CalendarMonthProps>;\n\n /**\n * Optional class name to add to the root element.\n */\n className?: string;\n\n /**\n * Callback for when a date is selected\n * @param date - The date the user selected\n * @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set\n * for the component.\n */\n onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;\n\n /**\n * Callback for when calendar is closed\n */\n onDismiss?: () => void;\n\n /**\n * ID for the calendar\n */\n id?: string;\n\n /**\n * Default value of the Calendar, if any\n */\n value?: Date;\n\n /**\n * Value of today. If unspecified, current time in client machine will be used.\n */\n today?: Date;\n\n /**\n * The date range type indicating how many days should be selected as the user\n * selects days\n * @default DateRangeType.Day\n */\n dateRangeType?: DateRangeType;\n\n /**\n * The first day of the week for your locale.\n * @default DayOfWeek.Sunday\n */\n firstDayOfWeek?: DayOfWeek;\n\n /**\n * Defines when the first week of the year should start.\n * @default FirstWeekOfYear.FirstDay\n */\n firstWeekOfYear?: FirstWeekOfYear;\n\n /**\n * Whether the month picker is shown beside the day picker or hidden.\n * @default true\n */\n isMonthPickerVisible?: boolean;\n\n /**\n * Whether the day picker is shown beside the month picker or hidden.\n * @default true\n */\n isDayPickerVisible?: boolean;\n\n /**\n * Show month picker on top of date picker when visible.\n * @default false\n */\n showMonthPickerAsOverlay?: boolean;\n\n /**\n * Whether the \"Go to today\" link should be shown or not\n */\n showGoToToday?: boolean;\n\n /**\n * Whether the calendar should show the week number (weeks 1 to 53) before each week row\n * @default false\n */\n showWeekNumbers?: boolean;\n\n /**\n * Localized strings to use in the Calendar\n */\n strings?: CalendarStrings;\n\n /**\n * Apply additional formatting to dates, for example localized date formatting.\n */\n dateTimeFormatter?: DateFormatting;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date earlier than this value.\n */\n minDate?: Date;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date later than this value.\n */\n maxDate?: Date;\n\n /**\n * If set the Calendar will not allow selection of dates in this array.\n */\n restrictedDates?: Date[];\n\n /**\n * Whether the calendar should show 6 weeks by default.\n * @default false\n */\n showSixWeeksByDefault?: boolean;\n\n /**\n * The days that are selectable when `dateRangeType` is `WorkWeek`.\n * If `dateRangeType` is not `WorkWeek` this property does nothing.\n * @default [Monday,Tuesday,Wednesday,Thursday,Friday]\n */\n workWeekDays?: DayOfWeek[];\n\n /**\n * Whether the month picker should highlight the current month\n * @default false\n */\n highlightCurrentMonth?: boolean;\n\n /**\n * Whether the month picker should highlight the selected month\n * @default false\n */\n highlightSelectedMonth?: boolean;\n\n /**\n * Whether the close button should be shown or not\n * @default false\n */\n showCloseButton?: boolean;\n\n /**\n * Allows all dates and buttons to be focused, including disabled ones\n * @default false\n */\n allFocusable?: boolean;\n}\n\n/**\n * @internal\n */\nexport interface CalendarStyleProps {\n /**\n * Custom CSS class for the calendar.\n */\n className?: string;\n\n /**\n * Whether the month picker is visible\n */\n isMonthPickerVisible?: boolean;\n\n /**\n * Whether the day picker is visible\n */\n isDayPickerVisible?: boolean;\n\n /**\n * Whether only month picker is shown\n */\n monthPickerOnly?: boolean;\n\n /**\n * Whether the month picker is overlaid on the day picker\n */\n showMonthPickerAsOverlay?: boolean;\n\n /**\n * @deprecated Use `overlaidWithButton`\n */\n overlayedWithButton?: boolean;\n\n /**\n * Whether the month and day picker are overlaid and the 'go to today' button is shown\n */\n overlaidWithButton?: boolean;\n\n /**\n * Whether the go to today button is shown\n */\n showGoToToday?: boolean;\n\n /**\n * Whether the week numbers are shown\n */\n showWeekNumbers?: boolean;\n}\n\n/**\n * @internal\n */\nexport interface CalendarStyles {\n /**\n * Style for the root element.\n */\n root: string;\n\n divider: string;\n\n goTodayButton: string;\n\n monthPickerWrapper: string;\n\n liveRegion: string;\n}\n\nexport enum AnimationDirection {\n /**\n * Grid will transition out and in horizontally\n */\n Horizontal,\n\n /**\n * Grid will transition out and in vertically\n */\n Vertical,\n}\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;WAgPhBC,kBAAA;WAAKA,kBAAkB;EAAlBA,kBAAA,CAAAA,kBAAA;EACV;;;EAGA;EAJUA,kBAAA,CAAAA,kBAAA;EAMV;;;EAGA;GATUA,kBAAA,KAAAA,kBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_CALENDAR_STRINGS","defaultCalendarStrings"],"sources":["../../../src/components/Calendar/defaults.ts"],"sourcesContent":["import { DEFAULT_CALENDAR_STRINGS } from '../../utils';\nimport type { CalendarStrings } from '../../utils';\n\nexport const defaultCalendarStrings: CalendarStrings = DEFAULT_CALENDAR_STRINGS;\n"],"mappings":"AAAA,SAASA,wBAAwB,QAAQ;AAGzC,OAAO,MAAMC,sBAAA,GAA0CD,wBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
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,149 @@
|
|
|
1
|
+
import { tokens } from '@fluentui/react-theme';
|
|
2
|
+
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export const calendarClassNames = {
|
|
7
|
+
root: 'fui-Calendar',
|
|
8
|
+
divider: 'fui-Calendar__divider',
|
|
9
|
+
goTodayButton: 'fui-Calendar__goTodayButton',
|
|
10
|
+
monthPickerWrapper: 'fui-Calendar__monthPickerWrapper',
|
|
11
|
+
liveRegion: 'fui-Calendar__liveRegion'
|
|
12
|
+
};
|
|
13
|
+
const useRootStyles = /*#__PURE__*/__styles({
|
|
14
|
+
base: {
|
|
15
|
+
mc9l5x: "f22iagw",
|
|
16
|
+
a9b677: "f13dwy2t"
|
|
17
|
+
},
|
|
18
|
+
normalize: {
|
|
19
|
+
E5pizo: "f1couhl3",
|
|
20
|
+
B7ck84d: "f1ewtqcl",
|
|
21
|
+
B6of3ja: "f1hu3pq6",
|
|
22
|
+
t21cq0: ["f11qmguv", "f1tyq0we"],
|
|
23
|
+
jrapky: "f19f4twv",
|
|
24
|
+
Frg6f3: ["f1tyq0we", "f11qmguv"],
|
|
25
|
+
z8tnut: "f1g0x7ka",
|
|
26
|
+
z189sj: ["fhxju0i", "f1cnd47f"],
|
|
27
|
+
Byoj8tv: "f1qch9an",
|
|
28
|
+
uwmqm3: ["f1cnd47f", "fhxju0i"]
|
|
29
|
+
},
|
|
30
|
+
monthPickerNotVisible: {
|
|
31
|
+
Beiy3e4: "f1vx9l62"
|
|
32
|
+
},
|
|
33
|
+
dayAndMonthPickersVisible: {
|
|
34
|
+
a9b677: "fcy5b15"
|
|
35
|
+
},
|
|
36
|
+
dayPickerVisibleAndWeekNumbersShown: {
|
|
37
|
+
a9b677: "fhsg0in"
|
|
38
|
+
},
|
|
39
|
+
dayAndMonthPickersVisibleAndWeekNumbersShown: {
|
|
40
|
+
a9b677: "fcarq7f"
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f13dwy2t{width:220px;}", ".f1couhl3{box-shadow:none;}", ".f1ewtqcl{box-sizing:border-box;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".fcy5b15{width:440px;}", ".fhsg0in{width:250px;}", ".fcarq7f{width:470px;}"]
|
|
44
|
+
});
|
|
45
|
+
const useDividerStyles = /*#__PURE__*/__styles({
|
|
46
|
+
base: {
|
|
47
|
+
g2u3we: "f68mrw8",
|
|
48
|
+
h3c5rm: ["f7pw515", "fw35ms5"],
|
|
49
|
+
B9xav0g: "frpde29",
|
|
50
|
+
zhjwy3: ["fw35ms5", "f7pw515"],
|
|
51
|
+
Bekrc4i: ["f1hqa2wf", "finvdd3"],
|
|
52
|
+
vrafjx: ["fcdblym", "fjik90z"],
|
|
53
|
+
Bhzewxz: "f15twtuk"
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
d: [".f68mrw8{border-top-color:var(--colorNeutralStroke2);}", ".f7pw515{border-right-color:var(--colorNeutralStroke2);}", ".fw35ms5{border-left-color:var(--colorNeutralStroke2);}", ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".f15twtuk{top:0;}"]
|
|
57
|
+
});
|
|
58
|
+
const useMonthPickerWrapperStyles = /*#__PURE__*/__styles({
|
|
59
|
+
base: {
|
|
60
|
+
mc9l5x: "f22iagw",
|
|
61
|
+
Beiy3e4: "f1vx9l62"
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}"]
|
|
65
|
+
});
|
|
66
|
+
const useGoTodayButtonStyles = /*#__PURE__*/__styles({
|
|
67
|
+
base: {
|
|
68
|
+
qb2dma: "fpydfdc",
|
|
69
|
+
De3pzq: "f1c21dwh",
|
|
70
|
+
icvyot: "f1ern45e",
|
|
71
|
+
vrafjx: ["f1n71otn", "f1deefiw"],
|
|
72
|
+
oivjwe: "f1h8hb77",
|
|
73
|
+
wvpqe5: ["f1deefiw", "f1n71otn"],
|
|
74
|
+
B5kzvoi: "f1yab3r1",
|
|
75
|
+
B7ck84d: "f1e4lqlz",
|
|
76
|
+
sj55zd: "f19n0e5",
|
|
77
|
+
Bahqtrf: "f1mo0ibp",
|
|
78
|
+
Be2twd7: "fy9rknc",
|
|
79
|
+
Bqenvij: "f1tvdnth",
|
|
80
|
+
Bg96gwp: "fpfng1i",
|
|
81
|
+
t21cq0: ["f17vyym1", "fb5scp"],
|
|
82
|
+
B6of3ja: "f4gg0ds",
|
|
83
|
+
B68tc82: "f1mtd64y",
|
|
84
|
+
Bmxbyg5: "f1y7q3j9",
|
|
85
|
+
z8tnut: "f1g0x7ka",
|
|
86
|
+
z189sj: ["f8wuabp", "fycuoez"],
|
|
87
|
+
Byoj8tv: "f1qch9an",
|
|
88
|
+
uwmqm3: ["fycuoez", "f8wuabp"],
|
|
89
|
+
seuwu7: "fvy6vk6",
|
|
90
|
+
Jwef8y: "f9ql6rf",
|
|
91
|
+
Bi91k9c: "f1f1pb61",
|
|
92
|
+
eoavqd: "f8491dx",
|
|
93
|
+
B2d53fq: "fc9d3oc",
|
|
94
|
+
Dyrjrp: "f1cqwcg4",
|
|
95
|
+
Be90el1: "fmjaa5u"
|
|
96
|
+
}
|
|
97
|
+
}, {
|
|
98
|
+
d: [".fpydfdc{-webkit-align-self:flex-end;-ms-flex-item-align:flex-end;align-self:flex-end;}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f1yab3r1{bottom:0;}", ".f1e4lqlz{box-sizing:content-box;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1mo0ibp{font-family:inherit;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".f1tvdnth{height:30px;}", ".fpfng1i{line-height:30px;}", ".f17vyym1{margin-right:16px;}", ".fb5scp{margin-left:16px;}", ".f4gg0ds{margin-top:3px;}", ".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".f1g0x7ka{padding-top:0;}", ".f8wuabp{padding-right:4px;}", ".fycuoez{padding-left:4px;}", ".f1qch9an{padding-bottom:0;}", ".fvy6vk6 div{font-size:var(--fontSizeBase200);}", ".f1cqwcg4:disabled{color:var(--colorNeutralForegroundDisabled);}", ".fmjaa5u:disabled{pointer-events:none;}"],
|
|
99
|
+
h: [".f9ql6rf:hover{background-color:var(--colorTransparentBackground);}", ".f1f1pb61:hover{color:var(--colorBrandForeground1);}", ".f8491dx:hover{cursor:pointer;}", ".fc9d3oc:hover:active{color:var(--colorBrandForeground2);}"]
|
|
100
|
+
});
|
|
101
|
+
const useLiveRegionStyles = /*#__PURE__*/__styles({
|
|
102
|
+
base: {
|
|
103
|
+
B4j52fo: "fre7gi1",
|
|
104
|
+
Bekrc4i: ["f1358rze", "f1rvrf73"],
|
|
105
|
+
Bn0qgzm: "fqdk4by",
|
|
106
|
+
ibv6hh: ["f1rvrf73", "f1358rze"],
|
|
107
|
+
Bqenvij: "f1mpe4l3",
|
|
108
|
+
B6of3ja: "fkrn0sh",
|
|
109
|
+
t21cq0: ["f179hvsh", "f1538868"],
|
|
110
|
+
jrapky: "fmxx68s",
|
|
111
|
+
Frg6f3: ["f1538868", "f179hvsh"],
|
|
112
|
+
B68tc82: "f1p9o1ba",
|
|
113
|
+
Bmxbyg5: "f1sil6mw",
|
|
114
|
+
z8tnut: "f1g0x7ka",
|
|
115
|
+
z189sj: ["fhxju0i", "f1cnd47f"],
|
|
116
|
+
Byoj8tv: "f1qch9an",
|
|
117
|
+
uwmqm3: ["f1cnd47f", "fhxju0i"],
|
|
118
|
+
qhf8xq: "f1euv43f",
|
|
119
|
+
a9b677: "frkrog8"
|
|
120
|
+
}
|
|
121
|
+
}, {
|
|
122
|
+
d: [".fre7gi1{border-top-width:0;}", ".f1358rze{border-right-width:0;}", ".f1rvrf73{border-left-width:0;}", ".fqdk4by{border-bottom-width:0;}", ".f1mpe4l3{height:1px;}", ".fkrn0sh{margin-top:-1px;}", ".f179hvsh{margin-right:-1px;}", ".f1538868{margin-left:-1px;}", ".fmxx68s{margin-bottom:-1px;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1euv43f{position:absolute;}", ".frkrog8{width:1px;}"]
|
|
123
|
+
});
|
|
124
|
+
/**
|
|
125
|
+
* @internal
|
|
126
|
+
*
|
|
127
|
+
* Apply styling to the Calendar slots based on the state
|
|
128
|
+
*/
|
|
129
|
+
export const useCalendarStyles_unstable = props => {
|
|
130
|
+
const rootStyles = useRootStyles();
|
|
131
|
+
const dividerStyles = useDividerStyles();
|
|
132
|
+
const monthPickerWrapperStyles = useMonthPickerWrapperStyles();
|
|
133
|
+
const goTodayButtonStyles = useGoTodayButtonStyles();
|
|
134
|
+
const liveRegionStyles = useLiveRegionStyles();
|
|
135
|
+
const {
|
|
136
|
+
className,
|
|
137
|
+
isDayPickerVisible,
|
|
138
|
+
isMonthPickerVisible,
|
|
139
|
+
showWeekNumbers
|
|
140
|
+
} = props;
|
|
141
|
+
return {
|
|
142
|
+
root: mergeClasses(calendarClassNames.root, rootStyles.base, rootStyles.normalize, !isMonthPickerVisible && rootStyles.monthPickerNotVisible, isDayPickerVisible && isMonthPickerVisible && !showWeekNumbers && rootStyles.dayAndMonthPickersVisible, isDayPickerVisible && !isMonthPickerVisible && showWeekNumbers && rootStyles.dayPickerVisibleAndWeekNumbersShown, isDayPickerVisible && isMonthPickerVisible && showWeekNumbers && rootStyles.dayAndMonthPickersVisibleAndWeekNumbersShown, className),
|
|
143
|
+
divider: mergeClasses(calendarClassNames.divider, dividerStyles.base),
|
|
144
|
+
monthPickerWrapper: mergeClasses(calendarClassNames.monthPickerWrapper, monthPickerWrapperStyles.base),
|
|
145
|
+
goTodayButton: mergeClasses(calendarClassNames.goTodayButton, goTodayButtonStyles.base),
|
|
146
|
+
liveRegion: mergeClasses(calendarClassNames.liveRegion, liveRegionStyles.base)
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=useCalendarStyles.styles.js.map
|