@react-aria/datepicker 3.7.0 → 3.8.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
@@ -808,7 +808,7 @@ $dfb4eba373ed9493$exports = {
808
808
 
809
809
 
810
810
  function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref, disableArrowNavigation) {
811
- let { direction: direction } = (0, $cIPI0$useLocale)();
811
+ let { direction: direction } = (0, $cIPI0$useLocale)();
812
812
  let focusManager = (0, $cIPI0$useMemo)(()=>(0, $cIPI0$createFocusManager)(ref), [
813
813
  ref
814
814
  ]);
@@ -864,7 +864,7 @@ function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref, disableArrowNavig
864
864
  }
865
865
  if (target) target.focus();
866
866
  };
867
- let { pressProps: pressProps } = (0, $cIPI0$usePress)({
867
+ let { pressProps: pressProps } = (0, $cIPI0$usePress)({
868
868
  preventFocusOnPress: true,
869
869
  allowTextSelectionOnPress: true,
870
870
  onPressStart (e) {
@@ -888,11 +888,11 @@ const $16f0b7bb276bc17e$export$300019f83c56d282 = "__role_" + Date.now();
888
888
  const $16f0b7bb276bc17e$export$7b3062cd49e80452 = "__focusManager_" + Date.now();
889
889
  function $16f0b7bb276bc17e$export$5591b0b878c1a989(props, state, ref) {
890
890
  var _state_value;
891
- let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $cIPI0$useField)({
891
+ let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $cIPI0$useField)({
892
892
  ...props,
893
893
  labelElementType: "span"
894
894
  });
895
- let { focusWithinProps: focusWithinProps } = (0, $cIPI0$useFocusWithin)({
895
+ let { focusWithinProps: focusWithinProps } = (0, $cIPI0$useFocusWithin)({
896
896
  ...props,
897
897
  onBlurWithin: (e)=>{
898
898
  state.confirmPlaceholder();
@@ -995,13 +995,13 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
995
995
  let dialogId = (0, $cIPI0$useId)();
996
996
  let fieldId = (0, $cIPI0$useId)();
997
997
  let stringFormatter = (0, $cIPI0$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($dfb4eba373ed9493$exports))));
998
- let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $cIPI0$useField)({
998
+ let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $cIPI0$useField)({
999
999
  ...props,
1000
1000
  labelElementType: "span"
1001
1001
  });
1002
1002
  let groupProps = (0, $3dfb0f96be0d6a08$export$4a931266a3838b86)(state, ref);
1003
1003
  let labelledBy = fieldProps["aria-labelledby"] || fieldProps.id;
1004
- let { locale: locale } = (0, $cIPI0$useLocale)();
1004
+ let { locale: locale } = (0, $cIPI0$useLocale)();
1005
1005
  let date = state.formatValue(locale, {
1006
1006
  month: "long"
1007
1007
  });
@@ -1017,7 +1017,7 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
1017
1017
  let focusManager = (0, $cIPI0$useMemo)(()=>(0, $cIPI0$createFocusManager)(ref), [
1018
1018
  ref
1019
1019
  ]);
1020
- let { focusWithinProps: focusWithinProps } = (0, $cIPI0$useFocusWithin)({
1020
+ let { focusWithinProps: focusWithinProps } = (0, $cIPI0$useFocusWithin)({
1021
1021
  ...props,
1022
1022
  isDisabled: state.isOpen,
1023
1023
  onBlurWithin: props.onBlur,
@@ -1075,7 +1075,7 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
1075
1075
  "aria-label": stringFormatter.format("calendar"),
1076
1076
  "aria-labelledby": `${buttonId} ${labelledBy}`,
1077
1077
  "aria-describedby": ariaDescribedBy,
1078
- "aria-expanded": state.isOpen || undefined,
1078
+ "aria-expanded": state.isOpen,
1079
1079
  onPress: ()=>state.setOpen(true)
1080
1080
  },
1081
1081
  dialogProps: {
@@ -1131,7 +1131,7 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
1131
1131
 
1132
1132
 
1133
1133
  function $3aeceb3a64eb8358$export$d42c60378c8168f8() {
1134
- let { locale: locale } = (0, $cIPI0$useLocale)();
1134
+ let { locale: locale } = (0, $cIPI0$useLocale)();
1135
1135
  return (0, $cIPI0$useMemo)(()=>{
1136
1136
  // Try to use Intl.DisplayNames if possible. It may be supported in browsers, but not support the dateTimeField
1137
1137
  // type as that was only added in v2. https://github.com/tc39/intl-displaynames-v2
@@ -1161,9 +1161,9 @@ class $3aeceb3a64eb8358$var$DisplayNamesPolyfill {
1161
1161
 
1162
1162
  function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
1163
1163
  let enteredKeys = (0, $cIPI0$useRef)("");
1164
- let { locale: locale } = (0, $cIPI0$useLocale)();
1164
+ let { locale: locale } = (0, $cIPI0$useLocale)();
1165
1165
  let displayNames = (0, $3aeceb3a64eb8358$export$d42c60378c8168f8)();
1166
- let { ariaLabel: ariaLabel , ariaLabelledBy: ariaLabelledBy , ariaDescribedBy: ariaDescribedBy , focusManager: focusManager } = (0, $16f0b7bb276bc17e$export$653eddfc964b0f8a).get(state);
1166
+ let { ariaLabel: ariaLabel, ariaLabelledBy: ariaLabelledBy, ariaDescribedBy: ariaDescribedBy, focusManager: focusManager } = (0, $16f0b7bb276bc17e$export$653eddfc964b0f8a).get(state);
1167
1167
  let textValue = segment.isPlaceholder ? "" : segment.text;
1168
1168
  let options = (0, $cIPI0$useMemo)(()=>state.dateFormatter.resolvedOptions(), [
1169
1169
  state.dateFormatter
@@ -1181,7 +1181,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
1181
1181
  let monthTextValue = monthDateFormatter.format(state.dateValue);
1182
1182
  textValue = monthTextValue !== textValue ? `${textValue} – ${monthTextValue}` : monthTextValue;
1183
1183
  } else if (segment.type === "hour" && !segment.isPlaceholder) textValue = hourDateFormatter.format(state.dateValue);
1184
- let { spinButtonProps: spinButtonProps } = (0, $cIPI0$useSpinButton)({
1184
+ let { spinButtonProps: spinButtonProps } = (0, $cIPI0$useSpinButton)({
1185
1185
  // The ARIA spec says aria-valuenow is optional if there's no value, but aXe seems to require it.
1186
1186
  // This doesn't seem to have any negative effects with real AT since we also use aria-valuetext.
1187
1187
  // https://github.com/dequelabs/axe-core/issues/3505
@@ -1247,7 +1247,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
1247
1247
  }
1248
1248
  };
1249
1249
  // Safari dayPeriod option doesn't work...
1250
- let { startsWith: startsWith } = (0, $cIPI0$useFilter)({
1250
+ let { startsWith: startsWith } = (0, $cIPI0$useFilter)({
1251
1251
  sensitivity: "base"
1252
1252
  });
1253
1253
  let amPmFormatter = (0, $cIPI0$useDateFormatter)({
@@ -1387,7 +1387,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
1387
1387
  }
1388
1388
  });
1389
1389
  (0, $cIPI0$useEvent)(ref, "input", (e)=>{
1390
- let { inputType: inputType , data: data } = e;
1390
+ let { inputType: inputType, data: data } = e;
1391
1391
  switch(inputType){
1392
1392
  case "insertCompositionText":
1393
1393
  // Reset the DOM to how it was in the beforeinput event.
@@ -1508,12 +1508,12 @@ function $32489daedd52963e$var$commonPrefixLength(strings) {
1508
1508
  function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
1509
1509
  var _state_value, _state_value1;
1510
1510
  let stringFormatter = (0, $cIPI0$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($dfb4eba373ed9493$exports))));
1511
- let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $cIPI0$useField)({
1511
+ let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $cIPI0$useField)({
1512
1512
  ...props,
1513
1513
  labelElementType: "span"
1514
1514
  });
1515
1515
  let labelledBy = fieldProps["aria-labelledby"] || fieldProps.id;
1516
- let { locale: locale } = (0, $cIPI0$useLocale)();
1516
+ let { locale: locale } = (0, $cIPI0$useLocale)();
1517
1517
  let range = state.formatValue(locale, {
1518
1518
  month: "long"
1519
1519
  });
@@ -1561,7 +1561,7 @@ function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
1561
1561
  isInvalid: state.isInvalid
1562
1562
  };
1563
1563
  let domProps = (0, $cIPI0$filterDOMProps)(props);
1564
- let { focusWithinProps: focusWithinProps } = (0, $cIPI0$useFocusWithin)({
1564
+ let { focusWithinProps: focusWithinProps } = (0, $cIPI0$useFocusWithin)({
1565
1565
  ...props,
1566
1566
  isDisabled: state.isOpen,
1567
1567
  onBlurWithin: props.onBlur,
@@ -1595,7 +1595,7 @@ function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
1595
1595
  "aria-label": stringFormatter.format("calendar"),
1596
1596
  "aria-labelledby": `${buttonId} ${labelledBy}`,
1597
1597
  "aria-describedby": ariaDescribedBy,
1598
- "aria-expanded": state.isOpen || undefined,
1598
+ "aria-expanded": state.isOpen,
1599
1599
  onPress: ()=>state.setOpen(true)
1600
1600
  },
1601
1601
  dialogProps: {