@react-aria/datepicker 3.0.0-nightly.2388 → 3.0.0-nightly.2390

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 CHANGED
@@ -1062,7 +1062,7 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
1062
1062
  isDisabled: props.isDisabled,
1063
1063
  isReadOnly: props.isReadOnly,
1064
1064
  isRequired: props.isRequired,
1065
- validationState: state.validationState,
1065
+ isInvalid: state.isInvalid,
1066
1066
  autoFocus: props.autoFocus,
1067
1067
  name: props.name
1068
1068
  },
@@ -1092,7 +1092,7 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
1092
1092
  isReadOnly: props.isReadOnly,
1093
1093
  isDateUnavailable: props.isDateUnavailable,
1094
1094
  defaultFocusedValue: state.dateValue ? undefined : props.placeholderValue,
1095
- validationState: state.validationState,
1095
+ isInvalid: state.isInvalid,
1096
1096
  errorMessage: props.errorMessage
1097
1097
  }
1098
1098
  };
@@ -1424,7 +1424,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
1424
1424
  let firstSegment = (0, $cIPI0$useMemo)(()=>state.segments.find((s)=>s.isEditable), [
1425
1425
  state.segments
1426
1426
  ]);
1427
- if (segment !== firstSegment && state.validationState !== "invalid") ariaDescribedBy = undefined;
1427
+ if (segment !== firstSegment && !state.isInvalid) ariaDescribedBy = undefined;
1428
1428
  let id = (0, $cIPI0$useId)();
1429
1429
  let isEditable = !state.isDisabled && !state.isReadOnly && segment.isEditable;
1430
1430
  // Prepend the label passed from the field to each segment name.
@@ -1445,7 +1445,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
1445
1445
  segmentProps: (0, $cIPI0$mergeProps)(spinButtonProps, labelProps, {
1446
1446
  id: id,
1447
1447
  ...touchPropOverrides,
1448
- "aria-invalid": state.validationState === "invalid" ? "true" : undefined,
1448
+ "aria-invalid": state.isInvalid ? "true" : undefined,
1449
1449
  "aria-describedby": ariaDescribedBy,
1450
1450
  "aria-readonly": state.isReadOnly || !segment.isEditable ? "true" : undefined,
1451
1451
  "data-placeholder": segment.isPlaceholder || undefined,
@@ -1558,7 +1558,7 @@ function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
1558
1558
  isDisabled: props.isDisabled,
1559
1559
  isReadOnly: props.isReadOnly,
1560
1560
  isRequired: props.isRequired,
1561
- validationState: state.validationState
1561
+ isInvalid: state.isInvalid
1562
1562
  };
1563
1563
  let domProps = (0, $cIPI0$filterDOMProps)(props);
1564
1564
  let { focusWithinProps: focusWithinProps } = (0, $cIPI0$useFocusWithin)({
@@ -1630,7 +1630,7 @@ function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
1630
1630
  isDateUnavailable: props.isDateUnavailable,
1631
1631
  allowsNonContiguousRanges: props.allowsNonContiguousRanges,
1632
1632
  defaultFocusedValue: state.dateRange ? undefined : props.placeholderValue,
1633
- validationState: state.validationState,
1633
+ isInvalid: state.isInvalid,
1634
1634
  errorMessage: props.errorMessage
1635
1635
  }
1636
1636
  };
package/dist/main.js CHANGED
@@ -1072,7 +1072,7 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
1072
1072
  isDisabled: props.isDisabled,
1073
1073
  isReadOnly: props.isReadOnly,
1074
1074
  isRequired: props.isRequired,
1075
- validationState: state.validationState,
1075
+ isInvalid: state.isInvalid,
1076
1076
  autoFocus: props.autoFocus,
1077
1077
  name: props.name
1078
1078
  },
@@ -1102,7 +1102,7 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
1102
1102
  isReadOnly: props.isReadOnly,
1103
1103
  isDateUnavailable: props.isDateUnavailable,
1104
1104
  defaultFocusedValue: state.dateValue ? undefined : props.placeholderValue,
1105
- validationState: state.validationState,
1105
+ isInvalid: state.isInvalid,
1106
1106
  errorMessage: props.errorMessage
1107
1107
  }
1108
1108
  };
@@ -1434,7 +1434,7 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
1434
1434
  let firstSegment = (0, $IwcIq$react.useMemo)(()=>state.segments.find((s)=>s.isEditable), [
1435
1435
  state.segments
1436
1436
  ]);
1437
- if (segment !== firstSegment && state.validationState !== "invalid") ariaDescribedBy = undefined;
1437
+ if (segment !== firstSegment && !state.isInvalid) ariaDescribedBy = undefined;
1438
1438
  let id = (0, $IwcIq$reactariautils.useId)();
1439
1439
  let isEditable = !state.isDisabled && !state.isReadOnly && segment.isEditable;
1440
1440
  // Prepend the label passed from the field to each segment name.
@@ -1455,7 +1455,7 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
1455
1455
  segmentProps: (0, $IwcIq$reactariautils.mergeProps)(spinButtonProps, labelProps, {
1456
1456
  id: id,
1457
1457
  ...touchPropOverrides,
1458
- "aria-invalid": state.validationState === "invalid" ? "true" : undefined,
1458
+ "aria-invalid": state.isInvalid ? "true" : undefined,
1459
1459
  "aria-describedby": ariaDescribedBy,
1460
1460
  "aria-readonly": state.isReadOnly || !segment.isEditable ? "true" : undefined,
1461
1461
  "data-placeholder": segment.isPlaceholder || undefined,
@@ -1568,7 +1568,7 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
1568
1568
  isDisabled: props.isDisabled,
1569
1569
  isReadOnly: props.isReadOnly,
1570
1570
  isRequired: props.isRequired,
1571
- validationState: state.validationState
1571
+ isInvalid: state.isInvalid
1572
1572
  };
1573
1573
  let domProps = (0, $IwcIq$reactariautils.filterDOMProps)(props);
1574
1574
  let { focusWithinProps: focusWithinProps } = (0, $IwcIq$reactariainteractions.useFocusWithin)({
@@ -1640,7 +1640,7 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
1640
1640
  isDateUnavailable: props.isDateUnavailable,
1641
1641
  allowsNonContiguousRanges: props.allowsNonContiguousRanges,
1642
1642
  defaultFocusedValue: state.dateRange ? undefined : props.placeholderValue,
1643
- validationState: state.validationState,
1643
+ isInvalid: state.isInvalid,
1644
1644
  errorMessage: props.errorMessage
1645
1645
  }
1646
1646
  };