@mxenabled/connect-widget 0.13.1 → 0.13.2

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/index.es.js CHANGED
@@ -78674,6 +78674,7 @@ const RoutingNumber = (props) => {
78674
78674
  }
78675
78675
  };
78676
78676
  const containerRef = useRef(null);
78677
+ const routingNumberInputRef = useRef(null);
78677
78678
  useAnalyticsPath(...PageviewInfo.CONNECT_MICRODEPOSITS_ROUTING_NUMBER);
78678
78679
  const tokens = useTokens();
78679
78680
  const styles = getStyles$r(tokens);
@@ -78746,6 +78747,11 @@ const RoutingNumber = (props) => {
78746
78747
  useEffect(() => {
78747
78748
  if (institutions.length > 0) props.setShowSharedRoutingNumber(true);
78748
78749
  }, [institutions.length]);
78750
+ useEffect(() => {
78751
+ if (errors.routingNumber) {
78752
+ routingNumberInputRef.current.focus();
78753
+ }
78754
+ }, [errors]);
78749
78755
  const handleContinue = (newAccountDetails) => fadeOut(containerRef.current, "up", 300).then(() => onContinue(newAccountDetails));
78750
78756
  if (showFindDetails) {
78751
78757
  return /* @__PURE__ */ jsxRuntimeExports.jsx(FindAccountInfo, { onClose: () => setShowFindDetails(false), step: "routingNumber" });
@@ -78793,7 +78799,11 @@ const RoutingNumber = (props) => {
78793
78799
  error: !!errors.routingNumber || !!routingBlocked,
78794
78800
  fullWidth: true,
78795
78801
  helperText: errors.routingNumber ?? routingBlocked,
78796
- inputProps: { "data-test": "routing-number-input" },
78802
+ inputProps: {
78803
+ "data-test": "routing-number-input",
78804
+ "aria-describedby": errors.routingNumber ? "routingNumber-error" : void 0
78805
+ },
78806
+ inputRef: routingNumberInputRef,
78797
78807
  label: __("Routing number"),
78798
78808
  name: "routingNumber",
78799
78809
  onChange: handleTextInputChange,