@react-aria/datepicker 3.2.1 → 3.4.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/dist/import.mjs +1628 -0
- package/dist/main.js +7 -1
- package/dist/main.js.map +1 -1
- package/dist/module.js +8 -2
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +4 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +22 -17
- package/src/index.ts +2 -2
- package/src/useDateField.ts +3 -3
- package/src/useDatePicker.ts +3 -0
- package/src/useDateRangePicker.ts +1 -0
- package/src/useDateSegment.ts +2 -2
package/dist/main.js
CHANGED
|
@@ -992,6 +992,7 @@ function $4acc2f407c169e55$export$4c842f6a241dc825(props, state, ref) {
|
|
|
992
992
|
function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
993
993
|
let buttonId = (0, $IwcIq$reactariautils.useId)();
|
|
994
994
|
let dialogId = (0, $IwcIq$reactariautils.useId)();
|
|
995
|
+
let fieldId = (0, $IwcIq$reactariautils.useId)();
|
|
995
996
|
let stringFormatter = (0, $IwcIq$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($c7d0e80b992ca68a$exports))));
|
|
996
997
|
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $IwcIq$reactarialabel.useField)({
|
|
997
998
|
...props,
|
|
@@ -1045,6 +1046,7 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
|
1045
1046
|
},
|
|
1046
1047
|
fieldProps: {
|
|
1047
1048
|
...fieldProps,
|
|
1049
|
+
id: fieldId,
|
|
1048
1050
|
[(0, $4acc2f407c169e55$export$300019f83c56d282)]: "presentation",
|
|
1049
1051
|
"aria-describedby": ariaDescribedBy,
|
|
1050
1052
|
value: state.value,
|
|
@@ -1070,6 +1072,7 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
|
1070
1072
|
"aria-label": stringFormatter.format("calendar"),
|
|
1071
1073
|
"aria-labelledby": `${labelledBy} ${buttonId}`,
|
|
1072
1074
|
"aria-describedby": ariaDescribedBy,
|
|
1075
|
+
"aria-expanded": state.isOpen || undefined,
|
|
1073
1076
|
onPress: ()=>state.setOpen(true)
|
|
1074
1077
|
},
|
|
1075
1078
|
dialogProps: {
|
|
@@ -1351,7 +1354,9 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
1351
1354
|
};
|
|
1352
1355
|
let onFocus = ()=>{
|
|
1353
1356
|
enteredKeys.current = "";
|
|
1354
|
-
(0, $IwcIq$reactariautils.
|
|
1357
|
+
(0, $IwcIq$reactariautils.scrollIntoViewport)(ref.current, {
|
|
1358
|
+
containingElement: (0, $IwcIq$reactariautils.getScrollParent)(ref.current)
|
|
1359
|
+
});
|
|
1355
1360
|
// Collapse selection to start or Chrome won't fire input events.
|
|
1356
1361
|
let selection = window.getSelection();
|
|
1357
1362
|
selection.collapse(ref.current);
|
|
@@ -1586,6 +1591,7 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
1586
1591
|
"aria-label": stringFormatter.format("calendar"),
|
|
1587
1592
|
"aria-labelledby": `${labelledBy} ${buttonId}`,
|
|
1588
1593
|
"aria-describedby": ariaDescribedBy,
|
|
1594
|
+
"aria-expanded": state.isOpen || undefined,
|
|
1589
1595
|
onPress: ()=>state.setOpen(true)
|
|
1590
1596
|
},
|
|
1591
1597
|
dialogProps: {
|