@react-aria/datepicker 3.4.0 → 3.5.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 +15 -13
- package/dist/main.js +15 -13
- package/dist/main.js.map +1 -1
- package/dist/module.js +15 -13
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +18 -18
- package/src/useDateField.ts +1 -1
- package/src/useDatePicker.ts +3 -2
- package/src/useDateRangePicker.ts +3 -2
- package/src/useDateSegment.ts +1 -1
- package/src/useDisplayNames.ts +1 -1
package/dist/import.mjs
CHANGED
|
@@ -34,7 +34,7 @@ function $parcel$interopDefault(a) {
|
|
|
34
34
|
* governing permissions and limitations under the License.
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
-
var $
|
|
37
|
+
var $dfb4eba373ed9493$exports = {};
|
|
38
38
|
var $f23889fffbde9058$exports = {};
|
|
39
39
|
$f23889fffbde9058$exports = {
|
|
40
40
|
"calendar": `التقويم`,
|
|
@@ -749,7 +749,7 @@ $33fab8219207655a$exports = {
|
|
|
749
749
|
};
|
|
750
750
|
|
|
751
751
|
|
|
752
|
-
$
|
|
752
|
+
$dfb4eba373ed9493$exports = {
|
|
753
753
|
"ar-AE": $f23889fffbde9058$exports,
|
|
754
754
|
"bg-BG": $09d9badaa8903929$exports,
|
|
755
755
|
"cs-CZ": $151b77e0fd711730$exports,
|
|
@@ -899,7 +899,7 @@ function $16f0b7bb276bc17e$export$5591b0b878c1a989(props, state, ref) {
|
|
|
899
899
|
onFocusWithin: props.onFocus,
|
|
900
900
|
onFocusWithinChange: props.onFocusChange
|
|
901
901
|
});
|
|
902
|
-
let stringFormatter = (0, $cIPI0$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
902
|
+
let stringFormatter = (0, $cIPI0$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($dfb4eba373ed9493$exports))));
|
|
903
903
|
let message = state.maxGranularity === "hour" ? "selectedTimeDescription" : "selectedDateDescription";
|
|
904
904
|
let field = state.maxGranularity === "hour" ? "time" : "date";
|
|
905
905
|
let description = state.value ? stringFormatter.format(message, {
|
|
@@ -924,8 +924,8 @@ function $16f0b7bb276bc17e$export$5591b0b878c1a989(props, state, ref) {
|
|
|
924
924
|
$16f0b7bb276bc17e$export$653eddfc964b0f8a.set(state, {
|
|
925
925
|
ariaLabel: props["aria-label"],
|
|
926
926
|
ariaLabelledBy: [
|
|
927
|
-
|
|
928
|
-
|
|
927
|
+
labelProps.id,
|
|
928
|
+
props["aria-labelledby"]
|
|
929
929
|
].filter(Boolean).join(" ") || undefined,
|
|
930
930
|
ariaDescribedBy: describedBy,
|
|
931
931
|
focusManager: focusManager
|
|
@@ -983,7 +983,7 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
|
|
|
983
983
|
let buttonId = (0, $cIPI0$useId)();
|
|
984
984
|
let dialogId = (0, $cIPI0$useId)();
|
|
985
985
|
let fieldId = (0, $cIPI0$useId)();
|
|
986
|
-
let stringFormatter = (0, $cIPI0$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
986
|
+
let stringFormatter = (0, $cIPI0$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($dfb4eba373ed9493$exports))));
|
|
987
987
|
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $cIPI0$useField)({
|
|
988
988
|
...props,
|
|
989
989
|
labelElementType: "span"
|
|
@@ -1046,6 +1046,7 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
|
|
|
1046
1046
|
placeholderValue: props.placeholderValue,
|
|
1047
1047
|
hideTimeZone: props.hideTimeZone,
|
|
1048
1048
|
hourCycle: props.hourCycle,
|
|
1049
|
+
shouldForceLeadingZeros: props.shouldForceLeadingZeros,
|
|
1049
1050
|
granularity: props.granularity,
|
|
1050
1051
|
isDisabled: props.isDisabled,
|
|
1051
1052
|
isReadOnly: props.isReadOnly,
|
|
@@ -1060,14 +1061,14 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
|
|
|
1060
1061
|
id: buttonId,
|
|
1061
1062
|
"aria-haspopup": "dialog",
|
|
1062
1063
|
"aria-label": stringFormatter.format("calendar"),
|
|
1063
|
-
"aria-labelledby": `${
|
|
1064
|
+
"aria-labelledby": `${buttonId} ${labelledBy}`,
|
|
1064
1065
|
"aria-describedby": ariaDescribedBy,
|
|
1065
1066
|
"aria-expanded": state.isOpen || undefined,
|
|
1066
1067
|
onPress: ()=>state.setOpen(true)
|
|
1067
1068
|
},
|
|
1068
1069
|
dialogProps: {
|
|
1069
1070
|
id: dialogId,
|
|
1070
|
-
"aria-labelledby": `${
|
|
1071
|
+
"aria-labelledby": `${buttonId} ${labelledBy}`
|
|
1071
1072
|
},
|
|
1072
1073
|
calendarProps: {
|
|
1073
1074
|
autoFocus: true,
|
|
@@ -1140,7 +1141,7 @@ class $3aeceb3a64eb8358$var$DisplayNamesPolyfill {
|
|
|
1140
1141
|
}
|
|
1141
1142
|
constructor(locale){
|
|
1142
1143
|
this.locale = locale;
|
|
1143
|
-
this.dictionary = new (0, $cIPI0$LocalizedStringDictionary)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
1144
|
+
this.dictionary = new (0, $cIPI0$LocalizedStringDictionary)((0, (/*@__PURE__*/$parcel$interopDefault($dfb4eba373ed9493$exports))));
|
|
1144
1145
|
}
|
|
1145
1146
|
}
|
|
1146
1147
|
|
|
@@ -1418,7 +1419,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
1418
1419
|
// This is needed because VoiceOver on iOS does not announce groups.
|
|
1419
1420
|
let name = segment.type === "literal" ? "" : displayNames.of(segment.type);
|
|
1420
1421
|
let labelProps = (0, $cIPI0$useLabels)({
|
|
1421
|
-
"aria-label":
|
|
1422
|
+
"aria-label": `${name}${ariaLabel ? `, ${ariaLabel}` : ""}${ariaLabelledBy ? ", " : ""}`,
|
|
1422
1423
|
"aria-labelledby": ariaLabelledBy
|
|
1423
1424
|
});
|
|
1424
1425
|
// Literal segments should not be visible to screen readers. We don't really need any of the above,
|
|
@@ -1494,7 +1495,7 @@ function $32489daedd52963e$var$commonPrefixLength(strings) {
|
|
|
1494
1495
|
|
|
1495
1496
|
function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
1496
1497
|
var _state_value, _state_value1;
|
|
1497
|
-
let stringFormatter = (0, $cIPI0$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
1498
|
+
let stringFormatter = (0, $cIPI0$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($dfb4eba373ed9493$exports))));
|
|
1498
1499
|
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $cIPI0$useField)({
|
|
1499
1500
|
...props,
|
|
1500
1501
|
labelElementType: "span"
|
|
@@ -1541,6 +1542,7 @@ function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
1541
1542
|
hideTimeZone: props.hideTimeZone,
|
|
1542
1543
|
hourCycle: props.hourCycle,
|
|
1543
1544
|
granularity: props.granularity,
|
|
1545
|
+
shouldForceLeadingZeros: props.shouldForceLeadingZeros,
|
|
1544
1546
|
isDisabled: props.isDisabled,
|
|
1545
1547
|
isReadOnly: props.isReadOnly,
|
|
1546
1548
|
isRequired: props.isRequired,
|
|
@@ -1579,14 +1581,14 @@ function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
1579
1581
|
id: buttonId,
|
|
1580
1582
|
"aria-haspopup": "dialog",
|
|
1581
1583
|
"aria-label": stringFormatter.format("calendar"),
|
|
1582
|
-
"aria-labelledby": `${
|
|
1584
|
+
"aria-labelledby": `${buttonId} ${labelledBy}`,
|
|
1583
1585
|
"aria-describedby": ariaDescribedBy,
|
|
1584
1586
|
"aria-expanded": state.isOpen || undefined,
|
|
1585
1587
|
onPress: ()=>state.setOpen(true)
|
|
1586
1588
|
},
|
|
1587
1589
|
dialogProps: {
|
|
1588
1590
|
id: dialogId,
|
|
1589
|
-
"aria-labelledby": `${
|
|
1591
|
+
"aria-labelledby": `${buttonId} ${labelledBy}`
|
|
1590
1592
|
},
|
|
1591
1593
|
startFieldProps: {
|
|
1592
1594
|
...startFieldProps,
|
package/dist/main.js
CHANGED
|
@@ -44,7 +44,7 @@ $parcel$export(module.exports, "useDisplayNames", () => $934ac650a0aceb4b$export
|
|
|
44
44
|
* governing permissions and limitations under the License.
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
|
-
var $
|
|
47
|
+
var $c1905b78f6d2f5bf$exports = {};
|
|
48
48
|
var $aa344be62785b256$exports = {};
|
|
49
49
|
$aa344be62785b256$exports = {
|
|
50
50
|
"calendar": `التقويم`,
|
|
@@ -759,7 +759,7 @@ $0335c3ddb5f70cbe$exports = {
|
|
|
759
759
|
};
|
|
760
760
|
|
|
761
761
|
|
|
762
|
-
$
|
|
762
|
+
$c1905b78f6d2f5bf$exports = {
|
|
763
763
|
"ar-AE": $aa344be62785b256$exports,
|
|
764
764
|
"bg-BG": $615986c3475e7c8c$exports,
|
|
765
765
|
"cs-CZ": $6c6207692f1ab248$exports,
|
|
@@ -909,7 +909,7 @@ function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
|
|
|
909
909
|
onFocusWithin: props.onFocus,
|
|
910
910
|
onFocusWithinChange: props.onFocusChange
|
|
911
911
|
});
|
|
912
|
-
let stringFormatter = (0, $IwcIq$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
912
|
+
let stringFormatter = (0, $IwcIq$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($c1905b78f6d2f5bf$exports))));
|
|
913
913
|
let message = state.maxGranularity === "hour" ? "selectedTimeDescription" : "selectedDateDescription";
|
|
914
914
|
let field = state.maxGranularity === "hour" ? "time" : "date";
|
|
915
915
|
let description = state.value ? stringFormatter.format(message, {
|
|
@@ -934,8 +934,8 @@ function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
|
|
|
934
934
|
$4acc2f407c169e55$export$653eddfc964b0f8a.set(state, {
|
|
935
935
|
ariaLabel: props["aria-label"],
|
|
936
936
|
ariaLabelledBy: [
|
|
937
|
-
|
|
938
|
-
|
|
937
|
+
labelProps.id,
|
|
938
|
+
props["aria-labelledby"]
|
|
939
939
|
].filter(Boolean).join(" ") || undefined,
|
|
940
940
|
ariaDescribedBy: describedBy,
|
|
941
941
|
focusManager: focusManager
|
|
@@ -993,7 +993,7 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
|
993
993
|
let buttonId = (0, $IwcIq$reactariautils.useId)();
|
|
994
994
|
let dialogId = (0, $IwcIq$reactariautils.useId)();
|
|
995
995
|
let fieldId = (0, $IwcIq$reactariautils.useId)();
|
|
996
|
-
let stringFormatter = (0, $IwcIq$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
996
|
+
let stringFormatter = (0, $IwcIq$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($c1905b78f6d2f5bf$exports))));
|
|
997
997
|
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $IwcIq$reactarialabel.useField)({
|
|
998
998
|
...props,
|
|
999
999
|
labelElementType: "span"
|
|
@@ -1056,6 +1056,7 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
|
1056
1056
|
placeholderValue: props.placeholderValue,
|
|
1057
1057
|
hideTimeZone: props.hideTimeZone,
|
|
1058
1058
|
hourCycle: props.hourCycle,
|
|
1059
|
+
shouldForceLeadingZeros: props.shouldForceLeadingZeros,
|
|
1059
1060
|
granularity: props.granularity,
|
|
1060
1061
|
isDisabled: props.isDisabled,
|
|
1061
1062
|
isReadOnly: props.isReadOnly,
|
|
@@ -1070,14 +1071,14 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
|
1070
1071
|
id: buttonId,
|
|
1071
1072
|
"aria-haspopup": "dialog",
|
|
1072
1073
|
"aria-label": stringFormatter.format("calendar"),
|
|
1073
|
-
"aria-labelledby": `${
|
|
1074
|
+
"aria-labelledby": `${buttonId} ${labelledBy}`,
|
|
1074
1075
|
"aria-describedby": ariaDescribedBy,
|
|
1075
1076
|
"aria-expanded": state.isOpen || undefined,
|
|
1076
1077
|
onPress: ()=>state.setOpen(true)
|
|
1077
1078
|
},
|
|
1078
1079
|
dialogProps: {
|
|
1079
1080
|
id: dialogId,
|
|
1080
|
-
"aria-labelledby": `${
|
|
1081
|
+
"aria-labelledby": `${buttonId} ${labelledBy}`
|
|
1081
1082
|
},
|
|
1082
1083
|
calendarProps: {
|
|
1083
1084
|
autoFocus: true,
|
|
@@ -1150,7 +1151,7 @@ class $934ac650a0aceb4b$var$DisplayNamesPolyfill {
|
|
|
1150
1151
|
}
|
|
1151
1152
|
constructor(locale){
|
|
1152
1153
|
this.locale = locale;
|
|
1153
|
-
this.dictionary = new (0, $IwcIq$internationalizedstring.LocalizedStringDictionary)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
1154
|
+
this.dictionary = new (0, $IwcIq$internationalizedstring.LocalizedStringDictionary)((0, (/*@__PURE__*/$parcel$interopDefault($c1905b78f6d2f5bf$exports))));
|
|
1154
1155
|
}
|
|
1155
1156
|
}
|
|
1156
1157
|
|
|
@@ -1428,7 +1429,7 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
1428
1429
|
// This is needed because VoiceOver on iOS does not announce groups.
|
|
1429
1430
|
let name = segment.type === "literal" ? "" : displayNames.of(segment.type);
|
|
1430
1431
|
let labelProps = (0, $IwcIq$reactariautils.useLabels)({
|
|
1431
|
-
"aria-label":
|
|
1432
|
+
"aria-label": `${name}${ariaLabel ? `, ${ariaLabel}` : ""}${ariaLabelledBy ? ", " : ""}`,
|
|
1432
1433
|
"aria-labelledby": ariaLabelledBy
|
|
1433
1434
|
});
|
|
1434
1435
|
// Literal segments should not be visible to screen readers. We don't really need any of the above,
|
|
@@ -1504,7 +1505,7 @@ function $5c015c6316d1904d$var$commonPrefixLength(strings) {
|
|
|
1504
1505
|
|
|
1505
1506
|
function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
1506
1507
|
var _state_value, _state_value1;
|
|
1507
|
-
let stringFormatter = (0, $IwcIq$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
1508
|
+
let stringFormatter = (0, $IwcIq$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($c1905b78f6d2f5bf$exports))));
|
|
1508
1509
|
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $IwcIq$reactarialabel.useField)({
|
|
1509
1510
|
...props,
|
|
1510
1511
|
labelElementType: "span"
|
|
@@ -1551,6 +1552,7 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
1551
1552
|
hideTimeZone: props.hideTimeZone,
|
|
1552
1553
|
hourCycle: props.hourCycle,
|
|
1553
1554
|
granularity: props.granularity,
|
|
1555
|
+
shouldForceLeadingZeros: props.shouldForceLeadingZeros,
|
|
1554
1556
|
isDisabled: props.isDisabled,
|
|
1555
1557
|
isReadOnly: props.isReadOnly,
|
|
1556
1558
|
isRequired: props.isRequired,
|
|
@@ -1589,14 +1591,14 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
1589
1591
|
id: buttonId,
|
|
1590
1592
|
"aria-haspopup": "dialog",
|
|
1591
1593
|
"aria-label": stringFormatter.format("calendar"),
|
|
1592
|
-
"aria-labelledby": `${
|
|
1594
|
+
"aria-labelledby": `${buttonId} ${labelledBy}`,
|
|
1593
1595
|
"aria-describedby": ariaDescribedBy,
|
|
1594
1596
|
"aria-expanded": state.isOpen || undefined,
|
|
1595
1597
|
onPress: ()=>state.setOpen(true)
|
|
1596
1598
|
},
|
|
1597
1599
|
dialogProps: {
|
|
1598
1600
|
id: dialogId,
|
|
1599
|
-
"aria-labelledby": `${
|
|
1601
|
+
"aria-labelledby": `${buttonId} ${labelledBy}`
|
|
1600
1602
|
},
|
|
1601
1603
|
startFieldProps: {
|
|
1602
1604
|
...startFieldProps,
|