@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/module.js CHANGED
@@ -34,7 +34,7 @@ function $parcel$interopDefault(a) {
34
34
  * governing permissions and limitations under the License.
35
35
  */
36
36
 
37
- var $204383cf4f6b0d06$exports = {};
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
- $204383cf4f6b0d06$exports = {
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($204383cf4f6b0d06$exports))));
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
- props["aria-labelledby"],
928
- labelProps.id
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($204383cf4f6b0d06$exports))));
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": `${labelledBy} ${buttonId}`,
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": `${labelledBy} ${buttonId}`
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($204383cf4f6b0d06$exports))));
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": (ariaLabel ? ariaLabel + " " : "") + name,
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($204383cf4f6b0d06$exports))));
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": `${labelledBy} ${buttonId}`,
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": `${labelledBy} ${buttonId}`
1591
+ "aria-labelledby": `${buttonId} ${labelledBy}`
1590
1592
  },
1591
1593
  startFieldProps: {
1592
1594
  ...startFieldProps,