@transferwise/components 46.156.0 → 46.157.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/build/Calendar/Calendar.constants.js +10 -0
- package/build/Calendar/Calendar.constants.js.map +1 -0
- package/build/Calendar/Calendar.constants.mjs +8 -0
- package/build/Calendar/Calendar.constants.mjs.map +1 -0
- package/build/Calendar/Calendar.js +121 -17
- package/build/Calendar/Calendar.js.map +1 -1
- package/build/Calendar/Calendar.messages.js +12 -0
- package/build/Calendar/Calendar.messages.js.map +1 -1
- package/build/Calendar/Calendar.messages.mjs +12 -0
- package/build/Calendar/Calendar.messages.mjs.map +1 -1
- package/build/Calendar/Calendar.mjs +122 -18
- package/build/Calendar/Calendar.mjs.map +1 -1
- package/build/Calendar/DateHeader/DateHeader.js +5 -1
- package/build/Calendar/DateHeader/DateHeader.js.map +1 -1
- package/build/Calendar/DateHeader/DateHeader.mjs +5 -1
- package/build/Calendar/DateHeader/DateHeader.mjs.map +1 -1
- package/build/Calendar/DayCalendar/DayCalendar.js +20 -2
- package/build/Calendar/DayCalendar/DayCalendar.js.map +1 -1
- package/build/Calendar/DayCalendar/DayCalendar.mjs +20 -2
- package/build/Calendar/DayCalendar/DayCalendar.mjs.map +1 -1
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.js +60 -19
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.js.map +1 -1
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.mjs +60 -19
- package/build/Calendar/DayCalendar/Table/DayCalendarTable.mjs.map +1 -1
- package/build/Calendar/MonthCalendar/MonthCalendar.js +6 -0
- package/build/Calendar/MonthCalendar/MonthCalendar.js.map +1 -1
- package/build/Calendar/MonthCalendar/MonthCalendar.mjs +6 -0
- package/build/Calendar/MonthCalendar/MonthCalendar.mjs.map +1 -1
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.js +8 -3
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.js.map +1 -1
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.mjs +8 -3
- package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.mjs.map +1 -1
- package/build/Calendar/TableLink/TableLink.js +95 -0
- package/build/Calendar/TableLink/TableLink.js.map +1 -0
- package/build/Calendar/TableLink/TableLink.mjs +91 -0
- package/build/Calendar/TableLink/TableLink.mjs.map +1 -0
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.js +8 -3
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.js.map +1 -1
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.mjs +8 -3
- package/build/Calendar/YearCalendar/Table/YearCalendarTable.mjs.map +1 -1
- package/build/Calendar/YearCalendar/YearCalendar.js +7 -0
- package/build/Calendar/YearCalendar/YearCalendar.js.map +1 -1
- package/build/Calendar/YearCalendar/YearCalendar.mjs +7 -0
- package/build/Calendar/YearCalendar/YearCalendar.mjs.map +1 -1
- package/build/Calendar/_helpers/clampToDayViewBoundary/clampToDayViewBoundary.js +24 -0
- package/build/Calendar/_helpers/clampToDayViewBoundary/clampToDayViewBoundary.js.map +1 -0
- package/build/Calendar/_helpers/clampToDayViewBoundary/clampToDayViewBoundary.mjs +22 -0
- package/build/Calendar/_helpers/clampToDayViewBoundary/clampToDayViewBoundary.mjs.map +1 -0
- package/build/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.js +33 -0
- package/build/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.js.map +1 -0
- package/build/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.mjs +31 -0
- package/build/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.mjs.map +1 -0
- package/build/Calendar/_helpers/isDateDisabled/isDateDisabled.js +40 -0
- package/build/Calendar/_helpers/isDateDisabled/isDateDisabled.js.map +1 -0
- package/build/Calendar/_helpers/isDateDisabled/isDateDisabled.mjs +38 -0
- package/build/Calendar/_helpers/isDateDisabled/isDateDisabled.mjs.map +1 -0
- package/build/DateLookup/DateLookup.js +20 -9
- package/build/DateLookup/DateLookup.js.map +1 -1
- package/build/DateLookup/DateLookup.mjs +20 -9
- package/build/DateLookup/DateLookup.mjs.map +1 -1
- package/build/ExpressiveMoneyInput/CurrencySelector/CurrencySelector.js +3 -5
- package/build/ExpressiveMoneyInput/CurrencySelector/CurrencySelector.js.map +1 -1
- package/build/ExpressiveMoneyInput/CurrencySelector/CurrencySelector.mjs +3 -5
- package/build/ExpressiveMoneyInput/CurrencySelector/CurrencySelector.mjs.map +1 -1
- package/build/Inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js.map +1 -1
- package/build/Inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs.map +1 -1
- package/build/Typeahead/Typeahead.js +53 -27
- package/build/Typeahead/Typeahead.js.map +1 -1
- package/build/Typeahead/Typeahead.messages.js +3 -0
- package/build/Typeahead/Typeahead.messages.js.map +1 -1
- package/build/Typeahead/Typeahead.messages.mjs +3 -0
- package/build/Typeahead/Typeahead.messages.mjs.map +1 -1
- package/build/Typeahead/Typeahead.mjs +53 -27
- package/build/Typeahead/Typeahead.mjs.map +1 -1
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.js +2 -2
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.js.map +1 -1
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs +2 -2
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs.map +1 -1
- package/build/Typeahead/TypeaheadOption/TypeaheadOption.js +3 -1
- package/build/Typeahead/TypeaheadOption/TypeaheadOption.js.map +1 -1
- package/build/Typeahead/TypeaheadOption/TypeaheadOption.mjs +3 -1
- package/build/Typeahead/TypeaheadOption/TypeaheadOption.mjs.map +1 -1
- package/build/i18n/en.json +5 -0
- package/build/i18n/en.json.js +5 -0
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +5 -0
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/index.js +2 -2
- package/build/index.mjs +1 -1
- package/build/main.css +133 -43
- package/build/styles/Calendar/Calendar.css +112 -37
- package/build/styles/Calendar/TableLink/TableLink.css +115 -0
- package/build/styles/Typeahead/Typeahead.css +4 -0
- package/build/styles/Typeahead/TypeaheadOption/TypeaheadOption.css +5 -0
- package/build/styles/main.css +133 -43
- package/build/types/Body/Body.d.ts +2 -2
- package/build/types/Calendar/Calendar.constants.d.ts +2 -0
- package/build/types/Calendar/Calendar.constants.d.ts.map +1 -0
- package/build/types/Calendar/Calendar.d.ts +16 -3
- package/build/types/Calendar/Calendar.d.ts.map +1 -1
- package/build/types/Calendar/Calendar.messages.d.ts +20 -0
- package/build/types/Calendar/Calendar.messages.d.ts.map +1 -1
- package/build/types/Calendar/Calendar.types.d.ts +32 -0
- package/build/types/Calendar/Calendar.types.d.ts.map +1 -0
- package/build/types/Calendar/DateHeader/DateHeader.d.ts +2 -0
- package/build/types/Calendar/DateHeader/DateHeader.d.ts.map +1 -1
- package/build/types/Calendar/DayCalendar/DayCalendar.d.ts +7 -1
- package/build/types/Calendar/DayCalendar/DayCalendar.d.ts.map +1 -1
- package/build/types/Calendar/DayCalendar/Table/DayCalendarTable.d.ts +6 -0
- package/build/types/Calendar/DayCalendar/Table/DayCalendarTable.d.ts.map +1 -1
- package/build/types/Calendar/MonthCalendar/MonthCalendar.d.ts +1 -0
- package/build/types/Calendar/MonthCalendar/MonthCalendar.d.ts.map +1 -1
- package/build/types/Calendar/MonthCalendar/Table/MonthCalendarTable.d.ts +2 -1
- package/build/types/Calendar/MonthCalendar/Table/MonthCalendarTable.d.ts.map +1 -1
- package/build/types/Calendar/{tableLink → TableLink}/TableLink.d.ts +5 -1
- package/build/types/Calendar/TableLink/TableLink.d.ts.map +1 -0
- package/build/types/Calendar/TableLink/index.d.ts.map +1 -0
- package/build/types/Calendar/YearCalendar/Table/YearCalendarTable.d.ts +2 -1
- package/build/types/Calendar/YearCalendar/Table/YearCalendarTable.d.ts.map +1 -1
- package/build/types/Calendar/YearCalendar/YearCalendar.d.ts +1 -0
- package/build/types/Calendar/YearCalendar/YearCalendar.d.ts.map +1 -1
- package/build/types/Calendar/_helpers/clampToDayViewBoundary/clampToDayViewBoundary.d.ts +8 -0
- package/build/types/Calendar/_helpers/clampToDayViewBoundary/clampToDayViewBoundary.d.ts.map +1 -0
- package/build/types/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.d.ts +3 -0
- package/build/types/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.d.ts.map +1 -0
- package/build/types/Calendar/_helpers/index.d.ts +4 -0
- package/build/types/Calendar/_helpers/index.d.ts.map +1 -0
- package/build/types/Calendar/_helpers/isDateDisabled/isDateDisabled.d.ts +3 -0
- package/build/types/Calendar/_helpers/isDateDisabled/isDateDisabled.d.ts.map +1 -0
- package/build/types/Calendar/index.d.ts +1 -0
- package/build/types/Calendar/index.d.ts.map +1 -1
- package/build/types/DateLookup/DateLookup.d.ts +24 -5
- package/build/types/DateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/DateLookup/index.d.ts +1 -0
- package/build/types/DateLookup/index.d.ts.map +1 -1
- package/build/types/ExpressiveMoneyInput/CurrencySelector/CurrencySelector.d.ts +6 -4
- package/build/types/ExpressiveMoneyInput/CurrencySelector/CurrencySelector.d.ts.map +1 -1
- package/build/types/IconButton/IconButton.d.ts +1 -1
- package/build/types/Inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts +1 -1
- package/build/types/Inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts.map +1 -1
- package/build/types/MoneyInput/MoneyInput.d.ts +1 -1
- package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/Title/Title.d.ts +2 -2
- package/build/types/Typeahead/Typeahead.d.ts.map +1 -1
- package/build/types/Typeahead/Typeahead.messages.d.ts +5 -0
- package/build/types/Typeahead/Typeahead.messages.d.ts.map +1 -1
- package/build/types/Typeahead/TypeaheadInput/TypeaheadInput.d.ts.map +1 -1
- package/build/types/Typeahead/TypeaheadOption/TypeaheadOption.d.ts +1 -0
- package/build/types/Typeahead/TypeaheadOption/TypeaheadOption.d.ts.map +1 -1
- package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
- package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
- package/build/types/index.d.ts +3 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +10 -0
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Calendar/Calendar.constants.ts +5 -0
- package/src/Calendar/Calendar.css +112 -37
- package/src/Calendar/Calendar.disabledDates.test.tsx +610 -0
- package/src/Calendar/Calendar.less +5 -35
- package/src/Calendar/Calendar.messages.ts +21 -0
- package/src/Calendar/Calendar.test.tsx +342 -32
- package/src/Calendar/Calendar.tsx +169 -19
- package/src/Calendar/Calendar.types.ts +35 -0
- package/src/Calendar/DateHeader/DateHeader.tsx +6 -0
- package/src/Calendar/DayCalendar/DayCalendar.tsx +39 -1
- package/src/Calendar/DayCalendar/Table/DayCalendarTable.tsx +67 -27
- package/src/Calendar/MonthCalendar/MonthCalendar.tsx +8 -0
- package/src/Calendar/MonthCalendar/Table/MonthCalendarTable.tsx +15 -3
- package/src/Calendar/TableLink/TableLink.css +115 -0
- package/src/Calendar/TableLink/TableLink.less +68 -0
- package/src/Calendar/TableLink/TableLink.tsx +117 -0
- package/src/Calendar/YearCalendar/Table/YearCalendarTable.tsx +15 -3
- package/src/Calendar/YearCalendar/YearCalendar.tsx +9 -0
- package/src/Calendar/_helpers/clampToDayViewBoundary/clampToDayViewBoundary.test.ts +90 -0
- package/src/Calendar/_helpers/clampToDayViewBoundary/clampToDayViewBoundary.ts +25 -0
- package/src/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.test.ts +98 -0
- package/src/Calendar/_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.ts +45 -0
- package/src/Calendar/_helpers/index.ts +3 -0
- package/src/Calendar/_helpers/isDateDisabled/isDateDisabled.test.ts +169 -0
- package/src/Calendar/_helpers/isDateDisabled/isDateDisabled.ts +59 -0
- package/src/Calendar/_stories/Calendar.accessibility.docs.mdx +118 -0
- package/src/Calendar/_stories/Calendar.story.tsx +144 -4
- package/src/Calendar/_stories/Calendar.test.story.tsx +114 -0
- package/src/Calendar/index.ts +7 -0
- package/src/DateLookup/DateLookup.disabledDates.test.tsx +312 -0
- package/src/DateLookup/DateLookup.test.tsx +34 -37
- package/src/DateLookup/DateLookup.tsx +37 -13
- package/src/DateLookup/_stories/DateLookup.accessibility.docs.mdx +108 -0
- package/src/DateLookup/_stories/DateLookup.story.tsx +126 -2
- package/src/DateLookup/index.ts +6 -0
- package/src/ExpressiveMoneyInput/CurrencySelector/CurrencySelector.tsx +12 -13
- package/src/Inputs/SelectInput/SelectInput.test.tsx +37 -0
- package/src/Inputs/SelectInput/TriggerButton/SelectInputTriggerButton.tsx +1 -1
- package/src/Typeahead/Typeahead.css +4 -0
- package/src/Typeahead/Typeahead.less +2 -0
- package/src/Typeahead/Typeahead.messages.ts +5 -0
- package/src/Typeahead/Typeahead.test.tsx +80 -3
- package/src/Typeahead/Typeahead.tsx +50 -27
- package/src/Typeahead/TypeaheadInput/TypeaheadInput.tsx +2 -6
- package/src/Typeahead/TypeaheadOption/TypeaheadOption.css +5 -0
- package/src/Typeahead/TypeaheadOption/TypeaheadOption.less +9 -0
- package/src/Typeahead/TypeaheadOption/TypeaheadOption.tsx +4 -2
- package/src/i18n/en.json +4 -0
- package/src/index.ts +3 -2
- package/src/main.css +133 -43
- package/build/Calendar/tableLink/TableLink.js +0 -61
- package/build/Calendar/tableLink/TableLink.js.map +0 -1
- package/build/Calendar/tableLink/TableLink.mjs +0 -57
- package/build/Calendar/tableLink/TableLink.mjs.map +0 -1
- package/build/types/Calendar/tableLink/TableLink.d.ts.map +0 -1
- package/build/types/Calendar/tableLink/index.d.ts.map +0 -1
- package/src/Calendar/tableLink/TableLink.tsx +0 -77
- /package/build/types/Calendar/{tableLink → TableLink}/index.d.ts +0 -0
- /package/src/Calendar/{tableLink → TableLink}/index.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calendar.constants.js","sources":["../../src/Calendar/Calendar.constants.ts"],"sourcesContent":["export const LONG_DAY_FORMAT: Intl.DateTimeFormatOptions = {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n};\n"],"names":["LONG_DAY_FORMAT","day","month","year"],"mappings":";;AAAO,MAAMA,eAAe,GAA+B;AACzDC,EAAAA,GAAG,EAAE,SAAS;AACdC,EAAAA,KAAK,EAAE,MAAM;AACbC,EAAAA,IAAI,EAAE;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calendar.constants.mjs","sources":["../../src/Calendar/Calendar.constants.ts"],"sourcesContent":["export const LONG_DAY_FORMAT: Intl.DateTimeFormatOptions = {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n};\n"],"names":["LONG_DAY_FORMAT","day","month","year"],"mappings":"AAAO,MAAMA,eAAe,GAA+B;AACzDC,EAAAA,GAAG,EAAE,SAAS;AACdC,EAAAA,KAAK,EAAE,MAAM;AACbC,EAAAA,IAAI,EAAE;;;;;"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var reactIntl = require('react-intl');
|
|
7
|
+
var formatting = require('@transferwise/formatting');
|
|
6
8
|
require('../common/theme.js');
|
|
7
9
|
require('../common/direction.js');
|
|
8
10
|
require('@transferwise/neptune-tokens');
|
|
@@ -22,37 +24,66 @@ require('../common/PropsValues/variant.js');
|
|
|
22
24
|
require('../common/PropsValues/scroll.js');
|
|
23
25
|
require('../common/PropsValues/markdownNodeType.js');
|
|
24
26
|
require('../common/fileType.js');
|
|
25
|
-
require('@transferwise/formatting');
|
|
26
27
|
require('@transferwise/icons');
|
|
27
28
|
require('clsx');
|
|
28
|
-
require('react-intl');
|
|
29
29
|
require('../common/CloseButton/CloseButton.messages.js');
|
|
30
30
|
var jsxRuntime = require('react/jsx-runtime');
|
|
31
31
|
var moveToWithinRange = require('../common/DateUtils/moveToWithinRange/moveToWithinRange.js');
|
|
32
32
|
var isWithinRange = require('../common/DateUtils/isWithinRange/isWithinRange.js');
|
|
33
33
|
var getDateView = require('../common/DateUtils/getDateView/getDateView.js');
|
|
34
|
+
var clampToDayViewBoundary = require('./_helpers/clampToDayViewBoundary/clampToDayViewBoundary.js');
|
|
35
|
+
var isDateDisabled = require('./_helpers/isDateDisabled/isDateDisabled.js');
|
|
36
|
+
var hasDisabledDatesInMonth = require('./_helpers/hasDisabledDatesInMonth/hasDisabledDatesInMonth.js');
|
|
37
|
+
var Calendar_constants = require('./Calendar.constants.js');
|
|
38
|
+
var InlinePrompt = require('../Prompt/InlinePrompt/InlinePrompt.js');
|
|
34
39
|
var DayCalendar = require('./DayCalendar/DayCalendar.js');
|
|
35
40
|
var GetStartOfDay = require('./GetStartOfDay/GetStartOfDay.js');
|
|
41
|
+
var Calendar_messages = require('./Calendar.messages.js');
|
|
36
42
|
var MonthCalendar = require('./MonthCalendar/MonthCalendar.js');
|
|
37
43
|
var YearCalendar = require('./YearCalendar/YearCalendar.js');
|
|
38
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Inline calendar for selecting a single date. Powers [DateLookup](?path=/docs/forms-datelookup--docs).
|
|
47
|
+
*/
|
|
39
48
|
const Calendar = ({
|
|
40
49
|
value,
|
|
41
50
|
min: minProp = null,
|
|
42
51
|
max: maxProp = null,
|
|
43
52
|
monthFormat: monthFormat$1 = monthFormat.MonthFormat.LONG,
|
|
44
53
|
placeholder,
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
disabledRules,
|
|
55
|
+
onDateFocus,
|
|
56
|
+
onChange
|
|
47
57
|
}) => {
|
|
58
|
+
const intl = reactIntl.useIntl();
|
|
48
59
|
const selectedDate = GetStartOfDay.getStartOfDay(value);
|
|
49
60
|
const min = GetStartOfDay.getStartOfDay(minProp);
|
|
50
61
|
const max = GetStartOfDay.getStartOfDay(maxProp);
|
|
62
|
+
const disabledReasonId = React.useId();
|
|
63
|
+
const disabledRulesRef = React.useRef(disabledRules);
|
|
64
|
+
React.useEffect(() => {
|
|
65
|
+
disabledRulesRef.current = disabledRules;
|
|
66
|
+
});
|
|
67
|
+
const [hasInteracted, setHasInteracted] = React.useState(false);
|
|
68
|
+
const [focusedDate, setFocusedDate] = React.useState(selectedDate);
|
|
69
|
+
React.useEffect(() => {
|
|
70
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
71
|
+
setFocusedDate(selectedDate);
|
|
72
|
+
}, [selectedDate?.getTime()]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
73
|
+
const checkIsEnabled = date => {
|
|
74
|
+
if (!date) return true;
|
|
75
|
+
return isWithinRange.isWithinRange(date, min, max) && !isDateDisabled.isDateDisabled(date, disabledRulesRef.current);
|
|
76
|
+
};
|
|
77
|
+
const focusedDateDisabled = focusedDate ? !isWithinRange.isWithinRange(focusedDate, min, max) || isDateDisabled.isDateDisabled(focusedDate, disabledRules) : false;
|
|
51
78
|
React.useEffect(() => {
|
|
52
79
|
if (selectedDate && !isWithinRange.isWithinRange(selectedDate, min, max)) {
|
|
53
|
-
|
|
80
|
+
const clamped = moveToWithinRange.moveToWithinRange(selectedDate, min, max);
|
|
81
|
+
setFocusedDate(clamped); // eslint-disable-line react-hooks/set-state-in-effect
|
|
82
|
+
onDateFocus?.(clamped, {
|
|
83
|
+
isEnabled: checkIsEnabled(clamped)
|
|
84
|
+
});
|
|
54
85
|
}
|
|
55
|
-
}, [selectedDate?.getTime(), min?.getTime(), max?.getTime(),
|
|
86
|
+
}, [selectedDate?.getTime(), min?.getTime(), max?.getTime(), onDateFocus]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
56
87
|
const dateView = getDateView.returnDateView(selectedDate, min, max);
|
|
57
88
|
const [viewMonth, setViewMonth] = React.useState(dateView.getMonth());
|
|
58
89
|
const [viewYear, setViewYear] = React.useState(dateView.getFullYear());
|
|
@@ -63,6 +94,13 @@ const Calendar = ({
|
|
|
63
94
|
setViewMonth(view.getMonth());
|
|
64
95
|
setViewYear(view.getFullYear());
|
|
65
96
|
}, [selectedDate?.getTime(), min?.getTime(), max?.getTime()]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
97
|
+
React.useEffect(() => {
|
|
98
|
+
if (focusedDate) {
|
|
99
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
100
|
+
setViewMonth(focusedDate.getMonth());
|
|
101
|
+
setViewYear(focusedDate.getFullYear());
|
|
102
|
+
}
|
|
103
|
+
}, [focusedDate?.getTime()]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
66
104
|
const handleViewDateUpdate = React.useCallback(
|
|
67
105
|
// eslint-disable-next-line react-hooks/preserve-manual-memoization
|
|
68
106
|
({
|
|
@@ -71,29 +109,56 @@ const Calendar = ({
|
|
|
71
109
|
}) => {
|
|
72
110
|
if (month !== undefined) setViewMonth(month);
|
|
73
111
|
if (year !== undefined) setViewYear(year);
|
|
112
|
+
setHasInteracted(false);
|
|
74
113
|
}, []);
|
|
75
114
|
const switchToDays = React.useCallback(() => setMode('day'), []);
|
|
76
115
|
const switchToMonths = React.useCallback(() => setMode('month'), []);
|
|
77
116
|
const switchToYears = React.useCallback(() => setMode('year'), []);
|
|
78
117
|
const handleSelectedDateUpdate = React.useCallback(date => {
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
-
|
|
118
|
+
if (!hasInteracted) setHasInteracted(true);
|
|
119
|
+
const isEnabled = checkIsEnabled(date);
|
|
120
|
+
setFocusedDate(date);
|
|
121
|
+
onDateFocus?.(date, {
|
|
122
|
+
isEnabled
|
|
123
|
+
});
|
|
124
|
+
if (isEnabled && onChange) {
|
|
82
125
|
onChange(date);
|
|
83
126
|
}
|
|
84
|
-
}, [
|
|
127
|
+
}, [onDateFocus, onChange]);
|
|
85
128
|
const adjustDate = React.useCallback((daysToAdd, monthsToAdd, yearsToAdd) => {
|
|
129
|
+
const base = focusedDate ?? selectedDate;
|
|
86
130
|
let date;
|
|
87
|
-
if (
|
|
88
|
-
date = new Date(mode === 'year' ?
|
|
131
|
+
if (base) {
|
|
132
|
+
date = new Date(mode === 'year' ? base.getFullYear() + yearsToAdd : base.getFullYear(), mode === 'month' ? base.getMonth() + monthsToAdd : base.getMonth(), mode === 'day' ? base.getDate() + daysToAdd : base.getDate());
|
|
89
133
|
} else {
|
|
90
134
|
date = GetStartOfDay.getStartOfDay(new Date());
|
|
91
135
|
}
|
|
92
|
-
date &&= moveToWithinRange.moveToWithinRange(date, min, max);
|
|
93
|
-
if (date?.getTime() !==
|
|
94
|
-
|
|
136
|
+
date &&= mode !== 'day' ? moveToWithinRange.moveToWithinRange(date, min, max) : clampToDayViewBoundary.clampToDayViewBoundary(date, min, max);
|
|
137
|
+
if (date?.getTime() !== focusedDate?.getTime()) {
|
|
138
|
+
const monthChanged = date ? date.getMonth() !== focusedDate?.getMonth() || date.getFullYear() !== focusedDate?.getFullYear() : false;
|
|
139
|
+
setFocusedDate(date);
|
|
140
|
+
if (date) {
|
|
141
|
+
setViewMonth(date.getMonth());
|
|
142
|
+
setViewYear(date.getFullYear());
|
|
143
|
+
}
|
|
144
|
+
if (monthChanged) {
|
|
145
|
+
setHasInteracted(false);
|
|
146
|
+
} else if (!hasInteracted) {
|
|
147
|
+
setHasInteracted(true);
|
|
148
|
+
}
|
|
149
|
+
onDateFocus?.(date, {
|
|
150
|
+
isEnabled: checkIsEnabled(date)
|
|
151
|
+
});
|
|
95
152
|
}
|
|
96
|
-
}, [selectedDate, min, max, mode,
|
|
153
|
+
}, [focusedDate, selectedDate, min, max, mode, onDateFocus]);
|
|
154
|
+
const handleDayFocus = React.useCallback(date => {
|
|
155
|
+
if (date.getTime() !== focusedDate?.getTime()) {
|
|
156
|
+
setFocusedDate(date);
|
|
157
|
+
onDateFocus?.(date, {
|
|
158
|
+
isEnabled: checkIsEnabled(date)
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}, [focusedDate, onDateFocus]);
|
|
97
162
|
const handleKeyDown = React.useCallback(event => {
|
|
98
163
|
switch (event.key) {
|
|
99
164
|
case 'ArrowLeft':
|
|
@@ -112,8 +177,34 @@ const Calendar = ({
|
|
|
112
177
|
adjustDate(7, 4, 4);
|
|
113
178
|
event.preventDefault();
|
|
114
179
|
break;
|
|
180
|
+
case 'Enter':
|
|
181
|
+
case ' ':
|
|
182
|
+
if (mode === 'day' && focusedDate && event.target.hasAttribute('data-calendar-cell')) {
|
|
183
|
+
handleSelectedDateUpdate(focusedDate);
|
|
184
|
+
event.preventDefault();
|
|
185
|
+
}
|
|
186
|
+
break;
|
|
115
187
|
}
|
|
116
|
-
}, [adjustDate]);
|
|
188
|
+
}, [adjustDate, focusedDate, mode, handleSelectedDateUpdate]);
|
|
189
|
+
const focusedDateOutOfRange = focusedDate ? !isWithinRange.isWithinRange(focusedDate, min, max) : false;
|
|
190
|
+
const formatDateForPrompt = date => formatting.formatDate(date, intl.locale, Calendar_constants.LONG_DAY_FORMAT);
|
|
191
|
+
const outOfRangePromptText = min && max ? intl.formatMessage(Calendar_messages.default.outOfRangeBetween, {
|
|
192
|
+
min: formatDateForPrompt(min),
|
|
193
|
+
max: formatDateForPrompt(max)
|
|
194
|
+
}) : min ? intl.formatMessage(Calendar_messages.default.outOfRangeAfter, {
|
|
195
|
+
min: formatDateForPrompt(min)
|
|
196
|
+
}) : max ? intl.formatMessage(Calendar_messages.default.outOfRangeBefore, {
|
|
197
|
+
max: formatDateForPrompt(max)
|
|
198
|
+
}) : '';
|
|
199
|
+
const hasOutOfRangeDates = mode === 'day' && !!(min || max);
|
|
200
|
+
const showRulesPrompt = mode === 'day' && !!disabledRules && hasDisabledDatesInMonth.hasDisabledDatesInMonth(viewMonth, viewYear, disabledRules, min, max);
|
|
201
|
+
const showOutOfRangePrompt = mode === 'day' && focusedDateOutOfRange;
|
|
202
|
+
const showPrompt = hasOutOfRangeDates || showRulesPrompt;
|
|
203
|
+
const promptText = showOutOfRangePrompt ? outOfRangePromptText : disabledRules?.reason ?? outOfRangePromptText;
|
|
204
|
+
const promptSentiment = showOutOfRangePrompt || focusedDateDisabled ? 'negative' : 'neutral';
|
|
205
|
+
// Visible when there's an actionable message; sr-only when only hasOutOfRangeDates is true
|
|
206
|
+
// (prompt exists for aria-describedby but no visual cue needed until an out-of-range date is focused)
|
|
207
|
+
const promptClassName = showOutOfRangePrompt || showRulesPrompt ? 'm-t-1' : 'sr-only';
|
|
117
208
|
return (
|
|
118
209
|
/*#__PURE__*/
|
|
119
210
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
@@ -121,16 +212,22 @@ const Calendar = ({
|
|
|
121
212
|
onKeyDown: handleKeyDown,
|
|
122
213
|
children: [mode === 'day' && /*#__PURE__*/jsxRuntime.jsx(DayCalendar.default, {
|
|
123
214
|
selectedDate: selectedDate,
|
|
215
|
+
focusedDate: focusedDate,
|
|
124
216
|
min: min,
|
|
125
217
|
max: max,
|
|
126
218
|
viewMonth: viewMonth,
|
|
127
219
|
viewYear: viewYear,
|
|
128
220
|
monthFormat: monthFormat$1,
|
|
221
|
+
disabledRules: disabledRules,
|
|
222
|
+
disabledReasonId: showPrompt ? disabledReasonId : undefined,
|
|
223
|
+
announceReasonOnFocus: !hasInteracted,
|
|
129
224
|
onSelect: handleSelectedDateUpdate,
|
|
225
|
+
onDayFocus: handleDayFocus,
|
|
130
226
|
onLabelClick: switchToYears,
|
|
131
227
|
onViewDateUpdate: handleViewDateUpdate
|
|
132
228
|
}), mode === 'month' && /*#__PURE__*/jsxRuntime.jsx(MonthCalendar.default, {
|
|
133
229
|
selectedDate: selectedDate,
|
|
230
|
+
focusedDate: focusedDate,
|
|
134
231
|
min: min,
|
|
135
232
|
max: max,
|
|
136
233
|
viewYear: viewYear,
|
|
@@ -142,6 +239,7 @@ const Calendar = ({
|
|
|
142
239
|
onViewDateUpdate: handleViewDateUpdate
|
|
143
240
|
}), mode === 'year' && /*#__PURE__*/jsxRuntime.jsx(YearCalendar.default, {
|
|
144
241
|
selectedDate: selectedDate,
|
|
242
|
+
focusedDate: focusedDate,
|
|
145
243
|
min: min,
|
|
146
244
|
max: max,
|
|
147
245
|
viewYear: viewYear,
|
|
@@ -150,6 +248,12 @@ const Calendar = ({
|
|
|
150
248
|
}),
|
|
151
249
|
onSelect: switchToMonths,
|
|
152
250
|
onViewDateUpdate: handleViewDateUpdate
|
|
251
|
+
}), showPrompt && /*#__PURE__*/jsxRuntime.jsx(InlinePrompt.InlinePrompt, {
|
|
252
|
+
sentiment: promptSentiment,
|
|
253
|
+
width: "full",
|
|
254
|
+
id: disabledReasonId,
|
|
255
|
+
className: promptClassName,
|
|
256
|
+
children: promptText
|
|
153
257
|
})]
|
|
154
258
|
})
|
|
155
259
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.js","sources":["../../src/Calendar/Calendar.tsx"],"sourcesContent":["import { useState, useCallback, useEffect, KeyboardEvent } from 'react';\n\nimport { MonthFormat } from '../common';\nimport { isWithinRange, moveToWithinRange, returnDateView } from '../common/DateUtils';\nimport DayCalendar from './DayCalendar';\nimport { getStartOfDay } from './GetStartOfDay';\nimport MonthCalendar from './MonthCalendar';\nimport YearCalendar from './YearCalendar';\n\nexport interface CalendarProps {\n value: Date | null;\n min?: Date | null;\n max?: Date | null;\n monthFormat?: `${MonthFormat}`;\n placeholder?: string;\n onChange: (date: Date | null) => void;\n onSelect?: (date: Date) => void;\n}\n\nconst Calendar = ({\n value,\n min: minProp = null,\n max: maxProp = null,\n monthFormat = MonthFormat.LONG,\n placeholder,\n onChange,\n onSelect,\n}: CalendarProps) => {\n const selectedDate = getStartOfDay(value);\n const min = getStartOfDay(minProp);\n const max = getStartOfDay(maxProp);\n\n useEffect(() => {\n if (selectedDate && !isWithinRange(selectedDate, min, max)) {\n onChange(moveToWithinRange(selectedDate, min, max));\n }\n }, [selectedDate?.getTime(), min?.getTime(), max?.getTime(), onChange]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const dateView = returnDateView(selectedDate, min, max);\n const [viewMonth, setViewMonth] = useState(dateView.getMonth());\n const [viewYear, setViewYear] = useState(dateView.getFullYear());\n const [mode, setMode] = useState<'day' | 'month' | 'year'>('day');\n\n useEffect(() => {\n const view = returnDateView(selectedDate, min, max);\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setViewMonth(view.getMonth());\n\n setViewYear(view.getFullYear());\n }, [selectedDate?.getTime(), min?.getTime(), max?.getTime()]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleViewDateUpdate = useCallback(\n // eslint-disable-next-line react-hooks/preserve-manual-memoization\n ({ month, year }: { month?: number; year?: number }) => {\n if (month !== undefined) setViewMonth(month);\n if (year !== undefined) setViewYear(year);\n },\n [],\n );\n\n const switchToDays = useCallback(() => setMode('day'), []);\n const switchToMonths = useCallback(() => setMode('month'), []);\n const switchToYears = useCallback(() => setMode('year'), []);\n\n const handleSelectedDateUpdate = useCallback(\n (date: Date) => {\n if (onSelect) {\n onSelect(date);\n } else {\n onChange(date);\n }\n },\n [onChange, onSelect],\n );\n\n const adjustDate = useCallback(\n (daysToAdd: number, monthsToAdd: number, yearsToAdd: number) => {\n let date: Date | null;\n if (selectedDate) {\n date = new Date(\n mode === 'year' ? selectedDate.getFullYear() + yearsToAdd : selectedDate.getFullYear(),\n mode === 'month' ? selectedDate.getMonth() + monthsToAdd : selectedDate.getMonth(),\n mode === 'day' ? selectedDate.getDate() + daysToAdd : selectedDate.getDate(),\n );\n } else {\n date = getStartOfDay(new Date());\n }\n date &&= moveToWithinRange(date, min, max);\n if (date?.getTime() !== selectedDate?.getTime()) {\n onChange(date);\n }\n },\n [selectedDate, min, max, mode, onChange],\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n switch (event.key) {\n case 'ArrowLeft':\n adjustDate(-1, -1, -1);\n event.preventDefault();\n break;\n case 'ArrowUp':\n adjustDate(-7, -4, -4);\n event.preventDefault();\n break;\n case 'ArrowRight':\n adjustDate(1, 1, 1);\n event.preventDefault();\n break;\n case 'ArrowDown':\n adjustDate(7, 4, 4);\n event.preventDefault();\n break;\n default:\n break;\n }\n },\n [adjustDate],\n );\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div onKeyDown={handleKeyDown}>\n {mode === 'day' && (\n <DayCalendar\n selectedDate={selectedDate}\n min={min}\n max={max}\n viewMonth={viewMonth}\n viewYear={viewYear}\n monthFormat={monthFormat}\n onSelect={handleSelectedDateUpdate}\n onLabelClick={switchToYears}\n onViewDateUpdate={handleViewDateUpdate}\n />\n )}\n {mode === 'month' && (\n <MonthCalendar\n selectedDate={selectedDate}\n min={min}\n max={max}\n viewYear={viewYear}\n {...(placeholder != null && { placeholder })}\n onSelect={switchToDays}\n onLabelClick={switchToYears}\n onViewDateUpdate={handleViewDateUpdate}\n />\n )}\n {mode === 'year' && (\n <YearCalendar\n selectedDate={selectedDate}\n min={min}\n max={max}\n viewYear={viewYear}\n {...(placeholder != null && { placeholder })}\n onSelect={switchToMonths}\n onViewDateUpdate={handleViewDateUpdate}\n />\n )}\n </div>\n );\n};\n\nexport default Calendar;\n"],"names":["Calendar","value","min","minProp","max","maxProp","monthFormat","MonthFormat","LONG","placeholder","onChange","onSelect","selectedDate","getStartOfDay","useEffect","isWithinRange","moveToWithinRange","getTime","dateView","returnDateView","viewMonth","setViewMonth","useState","getMonth","viewYear","setViewYear","getFullYear","mode","setMode","view","handleViewDateUpdate","useCallback","month","year","undefined","switchToDays","switchToMonths","switchToYears","handleSelectedDateUpdate","date","adjustDate","daysToAdd","monthsToAdd","yearsToAdd","Date","getDate","handleKeyDown","event","key","preventDefault","_jsxs","onKeyDown","children","_jsx","DayCalendar","onLabelClick","onViewDateUpdate","MonthCalendar","YearCalendar"],"mappings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ACToB,QAAAA,QAAQ,EAAEA,QAAS;QAAA,IACdf,WAAW,IAAI,IAAI,IAAI;AAAEA,UAAAA;SAAa,CAAA;AAC3CE,QAAAA,QAAQ,EAAEyB,cAAe;AACzBoB,QAAAA,gBAAgB,EAAE1B;AAAqB,OAAA,CAE1C;KACE;AAAC;AAEV;;;;"}
|
|
1
|
+
{"version":3,"file":"Calendar.js","sources":["../../src/Calendar/Calendar.tsx"],"sourcesContent":["import { useState, useCallback, useEffect, useId, useRef, KeyboardEvent } from 'react';\nimport { useIntl } from 'react-intl';\nimport { formatDate } from '@transferwise/formatting';\n\nimport { MonthFormat } from '../common';\nimport { isWithinRange, moveToWithinRange, returnDateView } from '../common/DateUtils';\nimport { clampToDayViewBoundary, isDateDisabled, hasDisabledDatesInMonth } from './_helpers';\nimport { LONG_DAY_FORMAT } from './Calendar.constants';\nimport { InlinePrompt } from '../Prompt/InlinePrompt';\nimport type { DateChangeMeta, DisabledRules } from './Calendar.types';\nimport DayCalendar from './DayCalendar';\nimport { getStartOfDay } from './GetStartOfDay';\nimport messages from './Calendar.messages';\nimport MonthCalendar from './MonthCalendar';\nimport YearCalendar from './YearCalendar';\n\nexport interface CalendarProps {\n /** The currently selected date, or `null` for no selection. */\n value: Date | null;\n /** Earliest selectable date (inclusive). Dates before this are interactive but not selectable, and show a boundary prompt. */\n min?: Date | null;\n /** Latest selectable date (inclusive). Dates after this are interactive but not selectable, and show a boundary prompt. */\n max?: Date | null;\n /** Month name format in the header. Defaults to `'long'` (e.g. \"January\"). */\n monthFormat?: `${MonthFormat}`;\n /** Placeholder text shown in the month/year cells when no date is selected. */\n placeholder?: string;\n /** Rules for disabling specific weekdays, individual dates, or date ranges. The required `reason` is shown in an inline prompt and linked to disabled cells via `aria-describedby` for screen reader accessibility. */\n disabledRules?: DisabledRules;\n /** Called whenever the focused date changes — including disabled and out-of-range dates. `meta.isEnabled` is `false` when the date is not selectable. */\n onDateFocus?: (date: Date | null, meta: DateChangeMeta) => void;\n /** Called when a date is confirmed (click or Enter). Only fires for enabled dates. */\n onChange?: (date: Date | null) => void;\n}\n\n/**\n * Temporary toggle — set `true` to restore strict min/max keyboard clamping.\n * @see https://transferwise.atlassian.net/browse/DS-8518\n */\nconst STRICT_KEYBOARD_CLAMPING = false;\n\n/**\n * Inline calendar for selecting a single date. Powers [DateLookup](?path=/docs/forms-datelookup--docs).\n */\nconst Calendar = ({\n value,\n min: minProp = null,\n max: maxProp = null,\n monthFormat = MonthFormat.LONG,\n placeholder,\n disabledRules,\n onDateFocus,\n onChange,\n}: CalendarProps) => {\n const intl = useIntl();\n const selectedDate = getStartOfDay(value);\n const min = getStartOfDay(minProp);\n const max = getStartOfDay(maxProp);\n const disabledReasonId = useId();\n const disabledRulesRef = useRef(disabledRules);\n useEffect(() => {\n disabledRulesRef.current = disabledRules;\n });\n\n const [hasInteracted, setHasInteracted] = useState(false);\n const [focusedDate, setFocusedDate] = useState<Date | null>(selectedDate);\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setFocusedDate(selectedDate);\n }, [selectedDate?.getTime()]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const checkIsEnabled = (date: Date | null) => {\n if (!date) return true;\n return isWithinRange(date, min, max) && !isDateDisabled(date, disabledRulesRef.current);\n };\n\n const focusedDateDisabled = focusedDate\n ? !isWithinRange(focusedDate, min, max) || isDateDisabled(focusedDate, disabledRules)\n : false;\n\n useEffect(() => {\n if (selectedDate && !isWithinRange(selectedDate, min, max)) {\n const clamped = moveToWithinRange(selectedDate, min, max);\n setFocusedDate(clamped); // eslint-disable-line react-hooks/set-state-in-effect\n onDateFocus?.(clamped, { isEnabled: checkIsEnabled(clamped) });\n }\n }, [selectedDate?.getTime(), min?.getTime(), max?.getTime(), onDateFocus]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const dateView = returnDateView(selectedDate, min, max);\n const [viewMonth, setViewMonth] = useState(dateView.getMonth());\n const [viewYear, setViewYear] = useState(dateView.getFullYear());\n const [mode, setMode] = useState<'day' | 'month' | 'year'>('day');\n\n useEffect(() => {\n const view = returnDateView(selectedDate, min, max);\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setViewMonth(view.getMonth());\n\n setViewYear(view.getFullYear());\n }, [selectedDate?.getTime(), min?.getTime(), max?.getTime()]); // eslint-disable-line react-hooks/exhaustive-deps\n\n useEffect(() => {\n if (focusedDate) {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setViewMonth(focusedDate.getMonth());\n setViewYear(focusedDate.getFullYear());\n }\n }, [focusedDate?.getTime()]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleViewDateUpdate = useCallback(\n // eslint-disable-next-line react-hooks/preserve-manual-memoization\n ({ month, year }: { month?: number; year?: number }) => {\n if (month !== undefined) setViewMonth(month);\n if (year !== undefined) setViewYear(year);\n setHasInteracted(false);\n },\n [],\n );\n\n const switchToDays = useCallback(() => setMode('day'), []);\n const switchToMonths = useCallback(() => setMode('month'), []);\n const switchToYears = useCallback(() => setMode('year'), []);\n\n const handleSelectedDateUpdate = useCallback(\n (date: Date) => {\n if (!hasInteracted) setHasInteracted(true);\n const isEnabled = checkIsEnabled(date);\n setFocusedDate(date);\n onDateFocus?.(date, { isEnabled });\n if (isEnabled && onChange) {\n onChange(date);\n }\n },\n [onDateFocus, onChange], // eslint-disable-line react-hooks/exhaustive-deps\n );\n\n const adjustDate = useCallback(\n (daysToAdd: number, monthsToAdd: number, yearsToAdd: number) => {\n const base = focusedDate ?? selectedDate;\n let date: Date | null;\n if (base) {\n date = new Date(\n mode === 'year' ? base.getFullYear() + yearsToAdd : base.getFullYear(),\n mode === 'month' ? base.getMonth() + monthsToAdd : base.getMonth(),\n mode === 'day' ? base.getDate() + daysToAdd : base.getDate(),\n );\n } else {\n date = getStartOfDay(new Date());\n }\n date &&=\n STRICT_KEYBOARD_CLAMPING || mode !== 'day'\n ? moveToWithinRange(date, min, max)\n : clampToDayViewBoundary(date, min, max);\n if (date?.getTime() !== focusedDate?.getTime()) {\n const monthChanged = date\n ? date.getMonth() !== focusedDate?.getMonth() ||\n date.getFullYear() !== focusedDate?.getFullYear()\n : false;\n setFocusedDate(date);\n if (date) {\n setViewMonth(date.getMonth());\n setViewYear(date.getFullYear());\n }\n if (monthChanged) {\n setHasInteracted(false);\n } else if (!hasInteracted) {\n setHasInteracted(true);\n }\n onDateFocus?.(date, { isEnabled: checkIsEnabled(date) });\n }\n },\n [focusedDate, selectedDate, min, max, mode, onDateFocus], // eslint-disable-line react-hooks/exhaustive-deps\n );\n\n const handleDayFocus = useCallback(\n (date: Date) => {\n if (date.getTime() !== focusedDate?.getTime()) {\n setFocusedDate(date);\n onDateFocus?.(date, { isEnabled: checkIsEnabled(date) });\n }\n },\n [focusedDate, onDateFocus], // eslint-disable-line react-hooks/exhaustive-deps\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n switch (event.key) {\n case 'ArrowLeft':\n adjustDate(-1, -1, -1);\n event.preventDefault();\n break;\n case 'ArrowUp':\n adjustDate(-7, -4, -4);\n event.preventDefault();\n break;\n case 'ArrowRight':\n adjustDate(1, 1, 1);\n event.preventDefault();\n break;\n case 'ArrowDown':\n adjustDate(7, 4, 4);\n event.preventDefault();\n break;\n case 'Enter':\n case ' ':\n if (\n mode === 'day' &&\n focusedDate &&\n (event.target as HTMLElement).hasAttribute('data-calendar-cell')\n ) {\n handleSelectedDateUpdate(focusedDate);\n event.preventDefault();\n }\n break;\n default:\n break;\n }\n },\n [adjustDate, focusedDate, mode, handleSelectedDateUpdate],\n );\n\n const focusedDateOutOfRange = focusedDate ? !isWithinRange(focusedDate, min, max) : false;\n\n const formatDateForPrompt = (date: Date) => formatDate(date, intl.locale, LONG_DAY_FORMAT);\n\n const outOfRangePromptText =\n min && max\n ? intl.formatMessage(messages.outOfRangeBetween, {\n min: formatDateForPrompt(min),\n max: formatDateForPrompt(max),\n })\n : min\n ? intl.formatMessage(messages.outOfRangeAfter, { min: formatDateForPrompt(min) })\n : max\n ? intl.formatMessage(messages.outOfRangeBefore, { max: formatDateForPrompt(max) })\n : '';\n\n const hasOutOfRangeDates = mode === 'day' && !!(min || max);\n const showRulesPrompt =\n mode === 'day' &&\n !!disabledRules &&\n hasDisabledDatesInMonth(viewMonth, viewYear, disabledRules, min, max);\n const showOutOfRangePrompt = mode === 'day' && focusedDateOutOfRange;\n const showPrompt = hasOutOfRangeDates || showRulesPrompt;\n\n const promptText = showOutOfRangePrompt\n ? outOfRangePromptText\n : (disabledRules?.reason ?? outOfRangePromptText);\n const promptSentiment = showOutOfRangePrompt || focusedDateDisabled ? 'negative' : 'neutral';\n // Visible when there's an actionable message; sr-only when only hasOutOfRangeDates is true\n // (prompt exists for aria-describedby but no visual cue needed until an out-of-range date is focused)\n const promptClassName = showOutOfRangePrompt || showRulesPrompt ? 'm-t-1' : 'sr-only';\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div onKeyDown={handleKeyDown}>\n {mode === 'day' && (\n <DayCalendar\n selectedDate={selectedDate}\n focusedDate={focusedDate}\n min={min}\n max={max}\n viewMonth={viewMonth}\n viewYear={viewYear}\n monthFormat={monthFormat}\n disabledRules={disabledRules}\n disabledReasonId={showPrompt ? disabledReasonId : undefined}\n announceReasonOnFocus={!hasInteracted}\n onSelect={handleSelectedDateUpdate}\n onDayFocus={handleDayFocus}\n onLabelClick={switchToYears}\n onViewDateUpdate={handleViewDateUpdate}\n />\n )}\n {mode === 'month' && (\n <MonthCalendar\n selectedDate={selectedDate}\n focusedDate={focusedDate}\n min={min}\n max={max}\n viewYear={viewYear}\n {...(placeholder != null && { placeholder })}\n onSelect={switchToDays}\n onLabelClick={switchToYears}\n onViewDateUpdate={handleViewDateUpdate}\n />\n )}\n {mode === 'year' && (\n <YearCalendar\n selectedDate={selectedDate}\n focusedDate={focusedDate}\n min={min}\n max={max}\n viewYear={viewYear}\n {...(placeholder != null && { placeholder })}\n onSelect={switchToMonths}\n onViewDateUpdate={handleViewDateUpdate}\n />\n )}\n {showPrompt && (\n <InlinePrompt\n sentiment={promptSentiment}\n width=\"full\"\n id={disabledReasonId}\n className={promptClassName}\n >\n {promptText}\n </InlinePrompt>\n )}\n </div>\n );\n};\n\nexport default Calendar;\n"],"names":["Calendar","value","min","minProp","max","maxProp","monthFormat","MonthFormat","LONG","placeholder","disabledRules","onDateFocus","onChange","intl","useIntl","selectedDate","getStartOfDay","disabledReasonId","useId","disabledRulesRef","useRef","useEffect","current","hasInteracted","setHasInteracted","useState","focusedDate","setFocusedDate","getTime","checkIsEnabled","date","isWithinRange","isDateDisabled","focusedDateDisabled","clamped","moveToWithinRange","isEnabled","dateView","returnDateView","viewMonth","setViewMonth","getMonth","viewYear","setViewYear","getFullYear","mode","setMode","view","handleViewDateUpdate","useCallback","month","year","undefined","switchToDays","switchToMonths","switchToYears","handleSelectedDateUpdate","adjustDate","daysToAdd","monthsToAdd","yearsToAdd","base","Date","getDate","clampToDayViewBoundary","monthChanged","handleDayFocus","handleKeyDown","event","key","preventDefault","target","hasAttribute","focusedDateOutOfRange","formatDateForPrompt","formatDate","locale","LONG_DAY_FORMAT","outOfRangePromptText","formatMessage","messages","outOfRangeBetween","outOfRangeAfter","outOfRangeBefore","hasOutOfRangeDates","showRulesPrompt","hasDisabledDatesInMonth","showOutOfRangePrompt","showPrompt","promptText","reason","promptSentiment","promptClassName","_jsxs","onKeyDown","children","_jsx","DayCalendar","announceReasonOnFocus","onSelect","onDayFocus","onLabelClick","onViewDateUpdate","MonthCalendar","YearCalendar","InlinePrompt","sentiment","width","id","className"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA;;AAEG;AACH,MAAMA,QAAQ,GAAGA,CAAC;EAChBC,KAAK;EACLC,GAAG,EAAEC,OAAO,GAAG,IAAI;EACnBC,GAAG,EAAEC,OAAO,GAAG,IAAI;eACnBC,aAAW,GAAGC,uBAAW,CAACC,IAAI;EAC9BC,WAAW;EACXC,aAAa;EACbC,WA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ected"
|
|
28
28
|
},
|
|
29
|
+
notAvailable: {
|
|
30
|
+
id: "neptune.DateLookup.notAvailable"
|
|
31
|
+
},
|
|
29
32
|
goTo20YearView: {
|
|
30
33
|
id: "neptune.DateLookup.goTo20YearView"
|
|
34
|
+
},
|
|
35
|
+
outOfRangeBetween: {
|
|
36
|
+
id: "neptune.DateLookup.outOfRangeBetween"
|
|
37
|
+
},
|
|
38
|
+
outOfRangeAfter: {
|
|
39
|
+
id: "neptune.DateLookup.outOfRangeAfter"
|
|
40
|
+
},
|
|
41
|
+
outOfRangeBefore: {
|
|
42
|
+
id: "neptune.DateLookup.outOfRangeBefore"
|
|
31
43
|
}
|
|
32
44
|
});
|
|
33
45
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.messages.js","sources":["../../src/Calendar/Calendar.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n next: {\n id: 'neptune.DateLookup.next',\n defaultMessage: 'next',\n description: 'Description of next button',\n },\n previous: {\n id: 'neptune.DateLookup.previous',\n defaultMessage: 'previous',\n description: 'Description of previous button',\n },\n day: {\n id: 'neptune.DateLookup.day',\n defaultMessage: 'day',\n description: 'Description of next/previous/selected day button',\n },\n month: {\n id: 'neptune.DateLookup.month',\n defaultMessage: 'month',\n description: 'Description of next/previous/selected month button',\n },\n year: {\n id: 'neptune.DateLookup.year',\n defaultMessage: 'year',\n description: 'Description of next/previous/selected year button',\n },\n twentyYears: {\n id: 'neptune.DateLookup.twentyYears',\n defaultMessage: '20 years',\n description: 'Description of next/previous 20 years button',\n },\n selected: {\n id: 'neptune.DateLookup.selected',\n defaultMessage: 'selected',\n description: 'Description of the selected day/month/year',\n },\n goTo20YearView: {\n id: 'neptune.DateLookup.goTo20YearView',\n defaultMessage: 'Go to 20 year view',\n description: 'Description of the button to go to 20 year view',\n },\n});\n"],"names":["defineMessages","next","id","previous","day","month","year","twentyYears","selected","goTo20YearView"],"mappings":";;;;;;AAEA,eAAeA,wBAAc,CAAC;AAC5BC,EAAAA,IAAI,EAAE;IACJC,EAAE,EAAA;GAGH;AACDC,EAAAA,QAAQ,EAAE;IACRD,EAAE,EAAA;GAGH;AACDE,EAAAA,GAAG,EAAE;IACHF,EAAE,EAAA;GAGH;AACDG,EAAAA,KAAK,EAAE;IACLH,EAAE,EAAA;GAGH;AACDI,EAAAA,IAAI,EAAE;IACJJ,EAAE,EAAA;GAGH;AACDK,EAAAA,WAAW,EAAE;IACXL,EAAE,EAAA;GAGH;AACDM,EAAAA,QAAQ,EAAE;IACRN,EAAE,EAAA;GAGH;AACDO,EAAAA,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"Calendar.messages.js","sources":["../../src/Calendar/Calendar.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n next: {\n id: 'neptune.DateLookup.next',\n defaultMessage: 'next',\n description: 'Description of next button',\n },\n previous: {\n id: 'neptune.DateLookup.previous',\n defaultMessage: 'previous',\n description: 'Description of previous button',\n },\n day: {\n id: 'neptune.DateLookup.day',\n defaultMessage: 'day',\n description: 'Description of next/previous/selected day button',\n },\n month: {\n id: 'neptune.DateLookup.month',\n defaultMessage: 'month',\n description: 'Description of next/previous/selected month button',\n },\n year: {\n id: 'neptune.DateLookup.year',\n defaultMessage: 'year',\n description: 'Description of next/previous/selected year button',\n },\n twentyYears: {\n id: 'neptune.DateLookup.twentyYears',\n defaultMessage: '20 years',\n description: 'Description of next/previous 20 years button',\n },\n selected: {\n id: 'neptune.DateLookup.selected',\n defaultMessage: 'selected',\n description: 'Description of the selected day/month/year',\n },\n notAvailable: {\n id: 'neptune.DateLookup.notAvailable',\n defaultMessage: 'not available',\n description: 'Announces that a date is disabled/unavailable',\n },\n goTo20YearView: {\n id: 'neptune.DateLookup.goTo20YearView',\n defaultMessage: 'Go to 20 year view',\n description: 'Description of the button to go to 20 year view',\n },\n outOfRangeBetween: {\n id: 'neptune.DateLookup.outOfRangeBetween',\n defaultMessage: 'Please select a date between {min} and {max}.',\n description:\n 'Inline prompt when a date outside min/max boundaries is focused and both min and max are set',\n },\n outOfRangeAfter: {\n id: 'neptune.DateLookup.outOfRangeAfter',\n defaultMessage: 'Please enter {min} or a later date.',\n description: 'Inline prompt when a date before min is focused and only min is set',\n },\n outOfRangeBefore: {\n id: 'neptune.DateLookup.outOfRangeBefore',\n defaultMessage: 'Please enter {max} or an earlier date.',\n description: 'Inline prompt when a date after max is focused and only max is set',\n },\n});\n"],"names":["defineMessages","next","id","previous","day","month","year","twentyYears","selected","notAvailable","goTo20YearView","outOfRangeBetween","outOfRangeAfter","outOfRangeBefore"],"mappings":";;;;;;AAEA,eAAeA,wBAAc,CAAC;AAC5BC,EAAAA,IAAI,EAAE;IACJC,EAAE,EAAA;GAGH;AACDC,EAAAA,QAAQ,EAAE;IACRD,EAAE,EAAA;GAGH;AACDE,EAAAA,GAAG,EAAE;IACHF,EAAE,EAAA;GAGH;AACDG,EAAAA,KAAK,EAAE;IACLH,EAAE,EAAA;GAGH;AACDI,EAAAA,IAAI,EAAE;IACJJ,EAAE,EAAA;GAGH;AACDK,EAAAA,WAAW,EAAE;IACXL,EAAE,EAAA;GAGH;AACDM,EAAAA,QAAQ,EAAE;IACRN,EAAE,EAAA;GAGH;AACDO,EAAAA,YAAY,EAAE;IACZP,EAAE,EAAA;GAGH;AACDQ,EAAAA,cAAc,EAAE;IACdR,EAAE,EAAA;GAGH;AACDS,EAAAA,iBAAiB,EAAE;IACjBT,EAAE,EAAA;GAIH;AACDU,EAAAA,eAAe,EAAE;IACfV,EAAE,EAAA;GAGH;AACDW,EAAAA,gBAAgB,EAAE;IAChBX,EAAE,EAAA;AAGH;AACF,CAAA,CAAC;;;;"}
|
|
@@ -22,8 +22,20 @@ var messages = defineMessages({
|
|
|
22
22
|
selected: {
|
|
23
23
|
id: "neptune.DateLookup.selected"
|
|
24
24
|
},
|
|
25
|
+
notAvailable: {
|
|
26
|
+
id: "neptune.DateLookup.notAvailable"
|
|
27
|
+
},
|
|
25
28
|
goTo20YearView: {
|
|
26
29
|
id: "neptune.DateLookup.goTo20YearView"
|
|
30
|
+
},
|
|
31
|
+
outOfRangeBetween: {
|
|
32
|
+
id: "neptune.DateLookup.outOfRangeBetween"
|
|
33
|
+
},
|
|
34
|
+
outOfRangeAfter: {
|
|
35
|
+
id: "neptune.DateLookup.outOfRangeAfter"
|
|
36
|
+
},
|
|
37
|
+
outOfRangeBefore: {
|
|
38
|
+
id: "neptune.DateLookup.outOfRangeBefore"
|
|
27
39
|
}
|
|
28
40
|
});
|
|
29
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.messages.mjs","sources":["../../src/Calendar/Calendar.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n next: {\n id: 'neptune.DateLookup.next',\n defaultMessage: 'next',\n description: 'Description of next button',\n },\n previous: {\n id: 'neptune.DateLookup.previous',\n defaultMessage: 'previous',\n description: 'Description of previous button',\n },\n day: {\n id: 'neptune.DateLookup.day',\n defaultMessage: 'day',\n description: 'Description of next/previous/selected day button',\n },\n month: {\n id: 'neptune.DateLookup.month',\n defaultMessage: 'month',\n description: 'Description of next/previous/selected month button',\n },\n year: {\n id: 'neptune.DateLookup.year',\n defaultMessage: 'year',\n description: 'Description of next/previous/selected year button',\n },\n twentyYears: {\n id: 'neptune.DateLookup.twentyYears',\n defaultMessage: '20 years',\n description: 'Description of next/previous 20 years button',\n },\n selected: {\n id: 'neptune.DateLookup.selected',\n defaultMessage: 'selected',\n description: 'Description of the selected day/month/year',\n },\n goTo20YearView: {\n id: 'neptune.DateLookup.goTo20YearView',\n defaultMessage: 'Go to 20 year view',\n description: 'Description of the button to go to 20 year view',\n },\n});\n"],"names":["defineMessages","next","id","previous","day","month","year","twentyYears","selected","goTo20YearView"],"mappings":";;AAEA,eAAeA,cAAc,CAAC;AAC5BC,EAAAA,IAAI,EAAE;IACJC,EAAE,EAAA;GAGH;AACDC,EAAAA,QAAQ,EAAE;IACRD,EAAE,EAAA;GAGH;AACDE,EAAAA,GAAG,EAAE;IACHF,EAAE,EAAA;GAGH;AACDG,EAAAA,KAAK,EAAE;IACLH,EAAE,EAAA;GAGH;AACDI,EAAAA,IAAI,EAAE;IACJJ,EAAE,EAAA;GAGH;AACDK,EAAAA,WAAW,EAAE;IACXL,EAAE,EAAA;GAGH;AACDM,EAAAA,QAAQ,EAAE;IACRN,EAAE,EAAA;GAGH;AACDO,EAAAA,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"Calendar.messages.mjs","sources":["../../src/Calendar/Calendar.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n next: {\n id: 'neptune.DateLookup.next',\n defaultMessage: 'next',\n description: 'Description of next button',\n },\n previous: {\n id: 'neptune.DateLookup.previous',\n defaultMessage: 'previous',\n description: 'Description of previous button',\n },\n day: {\n id: 'neptune.DateLookup.day',\n defaultMessage: 'day',\n description: 'Description of next/previous/selected day button',\n },\n month: {\n id: 'neptune.DateLookup.month',\n defaultMessage: 'month',\n description: 'Description of next/previous/selected month button',\n },\n year: {\n id: 'neptune.DateLookup.year',\n defaultMessage: 'year',\n description: 'Description of next/previous/selected year button',\n },\n twentyYears: {\n id: 'neptune.DateLookup.twentyYears',\n defaultMessage: '20 years',\n description: 'Description of next/previous 20 years button',\n },\n selected: {\n id: 'neptune.DateLookup.selected',\n defaultMessage: 'selected',\n description: 'Description of the selected day/month/year',\n },\n notAvailable: {\n id: 'neptune.DateLookup.notAvailable',\n defaultMessage: 'not available',\n description: 'Announces that a date is disabled/unavailable',\n },\n goTo20YearView: {\n id: 'neptune.DateLookup.goTo20YearView',\n defaultMessage: 'Go to 20 year view',\n description: 'Description of the button to go to 20 year view',\n },\n outOfRangeBetween: {\n id: 'neptune.DateLookup.outOfRangeBetween',\n defaultMessage: 'Please select a date between {min} and {max}.',\n description:\n 'Inline prompt when a date outside min/max boundaries is focused and both min and max are set',\n },\n outOfRangeAfter: {\n id: 'neptune.DateLookup.outOfRangeAfter',\n defaultMessage: 'Please enter {min} or a later date.',\n description: 'Inline prompt when a date before min is focused and only min is set',\n },\n outOfRangeBefore: {\n id: 'neptune.DateLookup.outOfRangeBefore',\n defaultMessage: 'Please enter {max} or an earlier date.',\n description: 'Inline prompt when a date after max is focused and only max is set',\n },\n});\n"],"names":["defineMessages","next","id","previous","day","month","year","twentyYears","selected","notAvailable","goTo20YearView","outOfRangeBetween","outOfRangeAfter","outOfRangeBefore"],"mappings":";;AAEA,eAAeA,cAAc,CAAC;AAC5BC,EAAAA,IAAI,EAAE;IACJC,EAAE,EAAA;GAGH;AACDC,EAAAA,QAAQ,EAAE;IACRD,EAAE,EAAA;GAGH;AACDE,EAAAA,GAAG,EAAE;IACHF,EAAE,EAAA;GAGH;AACDG,EAAAA,KAAK,EAAE;IACLH,EAAE,EAAA;GAGH;AACDI,EAAAA,IAAI,EAAE;IACJJ,EAAE,EAAA;GAGH;AACDK,EAAAA,WAAW,EAAE;IACXL,EAAE,EAAA;GAGH;AACDM,EAAAA,QAAQ,EAAE;IACRN,EAAE,EAAA;GAGH;AACDO,EAAAA,YAAY,EAAE;IACZP,EAAE,EAAA;GAGH;AACDQ,EAAAA,cAAc,EAAE;IACdR,EAAE,EAAA;GAGH;AACDS,EAAAA,iBAAiB,EAAE;IACjBT,EAAE,EAAA;GAIH;AACDU,EAAAA,eAAe,EAAE;IACfV,EAAE,EAAA;GAGH;AACDW,EAAAA,gBAAgB,EAAE;IAChBX,EAAE,EAAA;AAGH;AACF,CAAA,CAAC;;;;"}
|