@react-aria/calendar 3.5.7 → 3.5.9
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/dist/ar-AE.mjs +1 -1
- package/dist/bg-BG.mjs +1 -1
- package/dist/cs-CZ.mjs +1 -1
- package/dist/da-DK.mjs +1 -1
- package/dist/de-DE.mjs +1 -1
- package/dist/el-GR.mjs +1 -1
- package/dist/en-US.mjs +1 -1
- package/dist/es-ES.mjs +1 -1
- package/dist/et-EE.mjs +1 -1
- package/dist/fi-FI.mjs +1 -1
- package/dist/fr-FR.mjs +1 -1
- package/dist/he-IL.mjs +1 -1
- package/dist/hr-HR.mjs +1 -1
- package/dist/hu-HU.mjs +1 -1
- package/dist/intlStrings.mjs +1 -1
- package/dist/it-IT.mjs +1 -1
- package/dist/ja-JP.mjs +1 -1
- package/dist/ko-KR.mjs +1 -1
- package/dist/lt-LT.mjs +1 -1
- package/dist/lv-LV.mjs +1 -1
- package/dist/nb-NO.mjs +1 -1
- package/dist/nl-NL.mjs +1 -1
- package/dist/pl-PL.mjs +1 -1
- package/dist/pt-BR.mjs +1 -1
- package/dist/pt-PT.mjs +1 -1
- package/dist/ro-RO.mjs +1 -1
- package/dist/ru-RU.mjs +1 -1
- package/dist/sk-SK.mjs +1 -1
- package/dist/sl-SI.mjs +1 -1
- package/dist/sr-SP.mjs +1 -1
- package/dist/sv-SE.mjs +1 -1
- package/dist/tr-TR.mjs +1 -1
- package/dist/types.d.ts +3 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/uk-UA.mjs +1 -1
- package/dist/useCalendar.mjs +1 -1
- package/dist/useCalendarBase.main.js +13 -13
- package/dist/useCalendarBase.mjs +14 -14
- package/dist/useCalendarBase.module.js +13 -13
- package/dist/useCalendarCell.main.js +41 -41
- package/dist/useCalendarCell.main.js.map +1 -1
- package/dist/useCalendarCell.mjs +42 -42
- package/dist/useCalendarCell.module.js +41 -41
- package/dist/useCalendarCell.module.js.map +1 -1
- package/dist/useCalendarGrid.main.js +23 -23
- package/dist/useCalendarGrid.mjs +24 -24
- package/dist/useCalendarGrid.module.js +23 -23
- package/dist/useRangeCalendar.main.js +5 -5
- package/dist/useRangeCalendar.main.js.map +1 -1
- package/dist/useRangeCalendar.mjs +6 -6
- package/dist/useRangeCalendar.module.js +5 -5
- package/dist/useRangeCalendar.module.js.map +1 -1
- package/dist/utils.main.js +22 -22
- package/dist/utils.mjs +23 -23
- package/dist/utils.module.js +22 -22
- package/dist/zh-CN.mjs +1 -1
- package/dist/zh-TW.mjs +1 -1
- package/package.json +13 -13
- package/src/useCalendarCell.ts +3 -3
- package/src/useRangeCalendar.ts +3 -3
package/dist/ar-AE.mjs
CHANGED
package/dist/bg-BG.mjs
CHANGED
package/dist/cs-CZ.mjs
CHANGED
package/dist/da-DK.mjs
CHANGED
package/dist/de-DE.mjs
CHANGED
package/dist/el-GR.mjs
CHANGED
package/dist/en-US.mjs
CHANGED
package/dist/es-ES.mjs
CHANGED
package/dist/et-EE.mjs
CHANGED
package/dist/fi-FI.mjs
CHANGED
package/dist/fr-FR.mjs
CHANGED
package/dist/he-IL.mjs
CHANGED
package/dist/hr-HR.mjs
CHANGED
package/dist/hu-HU.mjs
CHANGED
package/dist/intlStrings.mjs
CHANGED
package/dist/it-IT.mjs
CHANGED
package/dist/ja-JP.mjs
CHANGED
package/dist/ko-KR.mjs
CHANGED
package/dist/lt-LT.mjs
CHANGED
package/dist/lv-LV.mjs
CHANGED
package/dist/nb-NO.mjs
CHANGED
package/dist/nl-NL.mjs
CHANGED
package/dist/pl-PL.mjs
CHANGED
package/dist/pt-BR.mjs
CHANGED
package/dist/pt-PT.mjs
CHANGED
package/dist/ro-RO.mjs
CHANGED
package/dist/ru-RU.mjs
CHANGED
package/dist/sk-SK.mjs
CHANGED
package/dist/sl-SI.mjs
CHANGED
package/dist/sr-SP.mjs
CHANGED
package/dist/sv-SE.mjs
CHANGED
package/dist/tr-TR.mjs
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { AriaButtonProps } from "@react-types/button";
|
|
2
|
-
import { DOMAttributes, FocusableElement } from "@react-types/shared";
|
|
2
|
+
import { DOMAttributes, FocusableElement, RefObject } from "@react-types/shared";
|
|
3
3
|
import { AriaCalendarProps, DateValue, AriaRangeCalendarProps } from "@react-types/calendar";
|
|
4
4
|
import { CalendarState, RangeCalendarState } from "@react-stately/calendar";
|
|
5
|
-
import { RefObject } from "react";
|
|
6
5
|
import { CalendarDate } from "@internationalized/date";
|
|
7
6
|
export interface CalendarAria {
|
|
8
7
|
/** Props for the calendar grouping element. */
|
|
@@ -25,7 +24,7 @@ export function useCalendar<T extends DateValue>(props: AriaCalendarProps<T>, st
|
|
|
25
24
|
* Provides the behavior and accessibility implementation for a range calendar component.
|
|
26
25
|
* A range calendar displays one or more date grids and allows users to select a contiguous range of dates.
|
|
27
26
|
*/
|
|
28
|
-
export function useRangeCalendar<T extends DateValue>(props: AriaRangeCalendarProps<T>, state: RangeCalendarState, ref: RefObject<FocusableElement>): CalendarAria;
|
|
27
|
+
export function useRangeCalendar<T extends DateValue>(props: AriaRangeCalendarProps<T>, state: RangeCalendarState, ref: RefObject<FocusableElement | null>): CalendarAria;
|
|
29
28
|
export interface AriaCalendarGridProps {
|
|
30
29
|
/**
|
|
31
30
|
* The first date displayed in the calendar grid.
|
|
@@ -109,7 +108,7 @@ export interface CalendarCellAria {
|
|
|
109
108
|
* Provides the behavior and accessibility implementation for a calendar cell component.
|
|
110
109
|
* A calendar cell displays a date cell within a calendar grid which can be selected by the user.
|
|
111
110
|
*/
|
|
112
|
-
export function useCalendarCell(props: AriaCalendarCellProps, state: CalendarState | RangeCalendarState, ref: RefObject<HTMLElement>): CalendarCellAria;
|
|
111
|
+
export function useCalendarCell(props: AriaCalendarCellProps, state: CalendarState | RangeCalendarState, ref: RefObject<HTMLElement | null>): CalendarCellAria;
|
|
113
112
|
export type { AriaCalendarProps, AriaRangeCalendarProps, CalendarProps, DateValue, RangeCalendarProps } from '@react-types/calendar';
|
|
114
113
|
|
|
115
114
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;ACwBA;IACE,+CAA+C;IAC/C,aAAa,EAAE,aAAa,CAAC;IAC7B,iCAAiC;IACjC,eAAe,EAAE,eAAe,CAAC;IACjC,qCAAqC;IACrC,eAAe,EAAE,eAAe,CAAC;IACjC,mDAAmD;IACnD,iBAAiB,EAAE,aAAa,CAAC;IACjC,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAA;CACd;ACnBD;;;GAGG;AACH,4BAA4B,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CAEhH;ACHD;;;GAGG;AACH,iCAAiC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,uBAAuB,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAAG,YAAY,CA0DxK;AC7DD;IACE;;;;OAIG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;;;OAIG;IACH,YAAY,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;CAC3C;AAED;IACE,wDAAwD;IACxD,SAAS,EAAE,aAAa,CAAC;IACzB,0DAA0D;IAC1D,WAAW,EAAE,aAAa,CAAC;IAC3B,2GAA2G;IAC3G,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;GAIG;AACH,gCAAgC,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,aAAa,GAAG,kBAAkB,GAAG,gBAAgB,CA6GzH;AC7ID;IACE,0CAA0C;IAC1C,IAAI,EAAE,YAAY,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;IACE,qDAAqD;IACrD,SAAS,EAAE,aAAa,CAAC;IACzB,oDAAoD;IACpD,WAAW,EAAE,aAAa,CAAC;IAC3B,mDAAmD;IACnD,SAAS,EAAE,OAAO,CAAC;IACnB,oCAAoC;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,mCAAmC;IACnC,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;;;OAOG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wDAAwD;IACxD,SAAS,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,aAAa,EAAE,MAAM,CAAA;CACtB;AAED;;;GAGG;AACH,gCAAgC,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,aAAa,GAAG,kBAAkB,EAAE,GAAG,EAAE,UAAU,WAAW,GAAG,IAAI,CAAC,GAAG,gBAAgB,CAsR7J;AC/UD,YAAY,EAAC,iBAAiB,EAAE,sBAAsB,EAAE,aAAa,EAAE,SAAS,EAAE,kBAAkB,EAAC,MAAM,uBAAuB,CAAC","sources":["packages/@react-aria/calendar/src/packages/@react-aria/calendar/src/utils.ts","packages/@react-aria/calendar/src/packages/@react-aria/calendar/src/useCalendarBase.ts","packages/@react-aria/calendar/src/packages/@react-aria/calendar/src/useCalendar.ts","packages/@react-aria/calendar/src/packages/@react-aria/calendar/src/useRangeCalendar.ts","packages/@react-aria/calendar/src/packages/@react-aria/calendar/src/useCalendarGrid.ts","packages/@react-aria/calendar/src/packages/@react-aria/calendar/src/useCalendarCell.ts","packages/@react-aria/calendar/src/packages/@react-aria/calendar/src/index.ts","packages/@react-aria/calendar/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useCalendar} from './useCalendar';\nexport {useRangeCalendar} from './useRangeCalendar';\nexport {useCalendarGrid} from './useCalendarGrid';\nexport {useCalendarCell} from './useCalendarCell';\n\nexport type {AriaCalendarProps, AriaRangeCalendarProps, CalendarProps, DateValue, RangeCalendarProps} from '@react-types/calendar';\nexport type {CalendarAria} from './useCalendarBase';\nexport type {AriaCalendarGridProps, CalendarGridAria} from './useCalendarGrid';\nexport type {AriaCalendarCellProps, CalendarCellAria} from './useCalendarCell';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/dist/uk-UA.mjs
CHANGED
package/dist/useCalendar.mjs
CHANGED
|
@@ -32,7 +32,7 @@ $parcel$export(module.exports, "useCalendarBase", () => $02ef492a56b91cb2$export
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
function $02ef492a56b91cb2$export$d652b3ea2d672d5b(props, state) {
|
|
35
|
-
let stringFormatter = (0, $dPWPO$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($bd6dc95a3c5ee5cd$exports))),
|
|
35
|
+
let stringFormatter = (0, $dPWPO$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($bd6dc95a3c5ee5cd$exports))), '@react-aria/calendar');
|
|
36
36
|
let domProps = (0, $dPWPO$reactariautils.filterDOMProps)(props);
|
|
37
37
|
let title = (0, $df1d8e967e73ec8e$exports.useVisibleRangeDescription)(state.visibleRange.start, state.visibleRange.end, state.timeZone, false);
|
|
38
38
|
let visibleRangeDescription = (0, $df1d8e967e73ec8e$exports.useVisibleRangeDescription)(state.visibleRange.start, state.visibleRange.end, state.timeZone, true);
|
|
@@ -46,7 +46,7 @@ function $02ef492a56b91cb2$export$d652b3ea2d672d5b(props, state) {
|
|
|
46
46
|
// Announce when the selected value changes
|
|
47
47
|
let selectedDateDescription = (0, $df1d8e967e73ec8e$exports.useSelectedDateDescription)(state);
|
|
48
48
|
(0, $dPWPO$reactariautils.useUpdateEffect)(()=>{
|
|
49
|
-
if (selectedDateDescription) (0, $dPWPO$reactarialiveannouncer.announce)(selectedDateDescription,
|
|
49
|
+
if (selectedDateDescription) (0, $dPWPO$reactarialiveannouncer.announce)(selectedDateDescription, 'polite', 4000);
|
|
50
50
|
// handle an update to the caption that describes the currently selected range, to announce the new value
|
|
51
51
|
}, [
|
|
52
52
|
selectedDateDescription
|
|
@@ -58,8 +58,8 @@ function $02ef492a56b91cb2$export$d652b3ea2d672d5b(props, state) {
|
|
|
58
58
|
]);
|
|
59
59
|
// Pass the label to the child grid elements.
|
|
60
60
|
(0, $df1d8e967e73ec8e$exports.hookData).set(state, {
|
|
61
|
-
ariaLabel: props[
|
|
62
|
-
ariaLabelledBy: props[
|
|
61
|
+
ariaLabel: props['aria-label'],
|
|
62
|
+
ariaLabelledBy: props['aria-labelledby'],
|
|
63
63
|
errorMessageId: errorMessageId,
|
|
64
64
|
selectedDateDescription: selectedDateDescription
|
|
65
65
|
});
|
|
@@ -77,27 +77,27 @@ function $02ef492a56b91cb2$export$d652b3ea2d672d5b(props, state) {
|
|
|
77
77
|
state.setFocused(true);
|
|
78
78
|
}
|
|
79
79
|
let labelProps = (0, $dPWPO$reactariautils.useLabels)({
|
|
80
|
-
id: props[
|
|
81
|
-
|
|
82
|
-
props[
|
|
80
|
+
id: props['id'],
|
|
81
|
+
'aria-label': [
|
|
82
|
+
props['aria-label'],
|
|
83
83
|
visibleRangeDescription
|
|
84
|
-
].filter(Boolean).join(
|
|
85
|
-
|
|
84
|
+
].filter(Boolean).join(', '),
|
|
85
|
+
'aria-labelledby': props['aria-labelledby']
|
|
86
86
|
});
|
|
87
87
|
return {
|
|
88
88
|
calendarProps: (0, $dPWPO$reactariautils.mergeProps)(domProps, labelProps, {
|
|
89
|
-
role:
|
|
90
|
-
|
|
89
|
+
role: 'application',
|
|
90
|
+
'aria-describedby': props['aria-describedby'] || undefined
|
|
91
91
|
}),
|
|
92
92
|
nextButtonProps: {
|
|
93
93
|
onPress: ()=>state.focusNextPage(),
|
|
94
|
-
|
|
94
|
+
'aria-label': stringFormatter.format('next'),
|
|
95
95
|
isDisabled: nextDisabled,
|
|
96
96
|
onFocusChange: setNextFocused
|
|
97
97
|
},
|
|
98
98
|
prevButtonProps: {
|
|
99
99
|
onPress: ()=>state.focusPreviousPage(),
|
|
100
|
-
|
|
100
|
+
'aria-label': stringFormatter.format('previous'),
|
|
101
101
|
isDisabled: previousDisabled,
|
|
102
102
|
onFocusChange: setPreviousFocused
|
|
103
103
|
},
|
package/dist/useCalendarBase.mjs
CHANGED
|
@@ -26,7 +26,7 @@ function $parcel$interopDefault(a) {
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
function $c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state) {
|
|
29
|
-
let stringFormatter = (0, $g2t6q$useLocalizedStringFormatter)((0, ($parcel$interopDefault($g2t6q$intlStringsmodulejs))),
|
|
29
|
+
let stringFormatter = (0, $g2t6q$useLocalizedStringFormatter)((0, ($parcel$interopDefault($g2t6q$intlStringsmodulejs))), '@react-aria/calendar');
|
|
30
30
|
let domProps = (0, $g2t6q$filterDOMProps)(props);
|
|
31
31
|
let title = (0, $a074e1e2d0f0a665$export$31afe65d91ef6e8)(state.visibleRange.start, state.visibleRange.end, state.timeZone, false);
|
|
32
32
|
let visibleRangeDescription = (0, $a074e1e2d0f0a665$export$31afe65d91ef6e8)(state.visibleRange.start, state.visibleRange.end, state.timeZone, true);
|
|
@@ -40,7 +40,7 @@ function $c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state) {
|
|
|
40
40
|
// Announce when the selected value changes
|
|
41
41
|
let selectedDateDescription = (0, $a074e1e2d0f0a665$export$b6df97c887c38e1a)(state);
|
|
42
42
|
(0, $g2t6q$useUpdateEffect)(()=>{
|
|
43
|
-
if (selectedDateDescription) (0, $g2t6q$announce)(selectedDateDescription,
|
|
43
|
+
if (selectedDateDescription) (0, $g2t6q$announce)(selectedDateDescription, 'polite', 4000);
|
|
44
44
|
// handle an update to the caption that describes the currently selected range, to announce the new value
|
|
45
45
|
}, [
|
|
46
46
|
selectedDateDescription
|
|
@@ -52,8 +52,8 @@ function $c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state) {
|
|
|
52
52
|
]);
|
|
53
53
|
// Pass the label to the child grid elements.
|
|
54
54
|
(0, $a074e1e2d0f0a665$export$653eddfc964b0f8a).set(state, {
|
|
55
|
-
ariaLabel: props[
|
|
56
|
-
ariaLabelledBy: props[
|
|
55
|
+
ariaLabel: props['aria-label'],
|
|
56
|
+
ariaLabelledBy: props['aria-labelledby'],
|
|
57
57
|
errorMessageId: errorMessageId,
|
|
58
58
|
selectedDateDescription: selectedDateDescription
|
|
59
59
|
});
|
|
@@ -71,27 +71,27 @@ function $c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state) {
|
|
|
71
71
|
state.setFocused(true);
|
|
72
72
|
}
|
|
73
73
|
let labelProps = (0, $g2t6q$useLabels)({
|
|
74
|
-
id: props[
|
|
75
|
-
|
|
76
|
-
props[
|
|
74
|
+
id: props['id'],
|
|
75
|
+
'aria-label': [
|
|
76
|
+
props['aria-label'],
|
|
77
77
|
visibleRangeDescription
|
|
78
|
-
].filter(Boolean).join(
|
|
79
|
-
|
|
78
|
+
].filter(Boolean).join(', '),
|
|
79
|
+
'aria-labelledby': props['aria-labelledby']
|
|
80
80
|
});
|
|
81
81
|
return {
|
|
82
82
|
calendarProps: (0, $g2t6q$mergeProps)(domProps, labelProps, {
|
|
83
|
-
role:
|
|
84
|
-
|
|
83
|
+
role: 'application',
|
|
84
|
+
'aria-describedby': props['aria-describedby'] || undefined
|
|
85
85
|
}),
|
|
86
86
|
nextButtonProps: {
|
|
87
87
|
onPress: ()=>state.focusNextPage(),
|
|
88
|
-
|
|
88
|
+
'aria-label': stringFormatter.format('next'),
|
|
89
89
|
isDisabled: nextDisabled,
|
|
90
90
|
onFocusChange: setNextFocused
|
|
91
91
|
},
|
|
92
92
|
prevButtonProps: {
|
|
93
93
|
onPress: ()=>state.focusPreviousPage(),
|
|
94
|
-
|
|
94
|
+
'aria-label': stringFormatter.format('previous'),
|
|
95
95
|
isDisabled: previousDisabled,
|
|
96
96
|
onFocusChange: setPreviousFocused
|
|
97
97
|
},
|
|
@@ -104,4 +104,4 @@ function $c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state) {
|
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
export {$c4acc1de3ab169cf$export$d652b3ea2d672d5b as useCalendarBase};
|
|
107
|
-
//# sourceMappingURL=useCalendarBase.
|
|
107
|
+
//# sourceMappingURL=useCalendarBase.module.js.map
|
|
@@ -26,7 +26,7 @@ function $parcel$interopDefault(a) {
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
function $c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state) {
|
|
29
|
-
let stringFormatter = (0, $g2t6q$useLocalizedStringFormatter)((0, ($parcel$interopDefault($g2t6q$intlStringsmodulejs))),
|
|
29
|
+
let stringFormatter = (0, $g2t6q$useLocalizedStringFormatter)((0, ($parcel$interopDefault($g2t6q$intlStringsmodulejs))), '@react-aria/calendar');
|
|
30
30
|
let domProps = (0, $g2t6q$filterDOMProps)(props);
|
|
31
31
|
let title = (0, $a074e1e2d0f0a665$export$31afe65d91ef6e8)(state.visibleRange.start, state.visibleRange.end, state.timeZone, false);
|
|
32
32
|
let visibleRangeDescription = (0, $a074e1e2d0f0a665$export$31afe65d91ef6e8)(state.visibleRange.start, state.visibleRange.end, state.timeZone, true);
|
|
@@ -40,7 +40,7 @@ function $c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state) {
|
|
|
40
40
|
// Announce when the selected value changes
|
|
41
41
|
let selectedDateDescription = (0, $a074e1e2d0f0a665$export$b6df97c887c38e1a)(state);
|
|
42
42
|
(0, $g2t6q$useUpdateEffect)(()=>{
|
|
43
|
-
if (selectedDateDescription) (0, $g2t6q$announce)(selectedDateDescription,
|
|
43
|
+
if (selectedDateDescription) (0, $g2t6q$announce)(selectedDateDescription, 'polite', 4000);
|
|
44
44
|
// handle an update to the caption that describes the currently selected range, to announce the new value
|
|
45
45
|
}, [
|
|
46
46
|
selectedDateDescription
|
|
@@ -52,8 +52,8 @@ function $c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state) {
|
|
|
52
52
|
]);
|
|
53
53
|
// Pass the label to the child grid elements.
|
|
54
54
|
(0, $a074e1e2d0f0a665$export$653eddfc964b0f8a).set(state, {
|
|
55
|
-
ariaLabel: props[
|
|
56
|
-
ariaLabelledBy: props[
|
|
55
|
+
ariaLabel: props['aria-label'],
|
|
56
|
+
ariaLabelledBy: props['aria-labelledby'],
|
|
57
57
|
errorMessageId: errorMessageId,
|
|
58
58
|
selectedDateDescription: selectedDateDescription
|
|
59
59
|
});
|
|
@@ -71,27 +71,27 @@ function $c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state) {
|
|
|
71
71
|
state.setFocused(true);
|
|
72
72
|
}
|
|
73
73
|
let labelProps = (0, $g2t6q$useLabels)({
|
|
74
|
-
id: props[
|
|
75
|
-
|
|
76
|
-
props[
|
|
74
|
+
id: props['id'],
|
|
75
|
+
'aria-label': [
|
|
76
|
+
props['aria-label'],
|
|
77
77
|
visibleRangeDescription
|
|
78
|
-
].filter(Boolean).join(
|
|
79
|
-
|
|
78
|
+
].filter(Boolean).join(', '),
|
|
79
|
+
'aria-labelledby': props['aria-labelledby']
|
|
80
80
|
});
|
|
81
81
|
return {
|
|
82
82
|
calendarProps: (0, $g2t6q$mergeProps)(domProps, labelProps, {
|
|
83
|
-
role:
|
|
84
|
-
|
|
83
|
+
role: 'application',
|
|
84
|
+
'aria-describedby': props['aria-describedby'] || undefined
|
|
85
85
|
}),
|
|
86
86
|
nextButtonProps: {
|
|
87
87
|
onPress: ()=>state.focusNextPage(),
|
|
88
|
-
|
|
88
|
+
'aria-label': stringFormatter.format('next'),
|
|
89
89
|
isDisabled: nextDisabled,
|
|
90
90
|
onFocusChange: setNextFocused
|
|
91
91
|
},
|
|
92
92
|
prevButtonProps: {
|
|
93
93
|
onPress: ()=>state.focusPreviousPage(),
|
|
94
|
-
|
|
94
|
+
'aria-label': stringFormatter.format('previous'),
|
|
95
95
|
isDisabled: previousDisabled,
|
|
96
96
|
onFocusChange: setPreviousFocused
|
|
97
97
|
},
|