@mxenabled/connect-widget 0.19.3 → 0.19.5

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
@@ -70116,7 +70116,14 @@ const buildFormSchema = (loginFields) => {
70116
70116
  const CREDENTIAL_FIELD_TYPES = {
70117
70117
  PASSWORD: 1};
70118
70118
 
70119
+ const preventDefaultAndStopAllPropagation = (event) => {
70120
+ event.preventDefault();
70121
+ event.stopPropagation();
70122
+ event.nativeEvent.stopImmediatePropagation();
70123
+ };
70124
+
70119
70125
  const usePasswordInputValidation = () => {
70126
+ const showHideButtonRef = React__default.useRef(null);
70120
70127
  const [isCapsLockOn, setIsCapsLockOn] = useState(false);
70121
70128
  const handleKeyPress = (event) => "getModifierState" in event && setIsCapsLockOn(event.getModifierState("CapsLock"));
70122
70129
  const handleFocus = (event) => event.target?.addEventListener("keydown", handleKeyPress);
@@ -70125,7 +70132,11 @@ const usePasswordInputValidation = () => {
70125
70132
  setIsCapsLockOn(false);
70126
70133
  };
70127
70134
  const [showPassword, setShowPassword] = useState(false);
70128
- const handleTogglePassword = () => setShowPassword((show) => !show);
70135
+ const handleTogglePassword = (e) => {
70136
+ preventDefaultAndStopAllPropagation(e);
70137
+ setShowPassword((show) => !show);
70138
+ setTimeout(() => showHideButtonRef.current && showHideButtonRef.current.focus(), 0);
70139
+ };
70129
70140
  const [validateSpaceState, setValidateSpaceState] = useState(DEFAULT_VALIDATION_STATE);
70130
70141
  const [validateSpaceMessage, setValidateSpaceMessage] = useState("");
70131
70142
  const handleSpaceValidation = (e) => {
@@ -70182,6 +70193,7 @@ const usePasswordInputValidation = () => {
70182
70193
  "aria-label": showPassword ? __("Hide password") : __("Show password"),
70183
70194
  edge: "end",
70184
70195
  onClick: handleTogglePassword,
70196
+ ref: showHideButtonRef,
70185
70197
  children: showPassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(M, { className: "material-symbols-rounded", name: "visibility_off" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(M, { className: "material-symbols-rounded", name: "visibility" })
70186
70198
  }
70187
70199
  ) })
@@ -73684,7 +73696,7 @@ const RoutingNumber = (props) => {
73684
73696
  }
73685
73697
  ) }) }),
73686
73698
  /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit: (e) => e.preventDefault(), children: [
73687
- /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.inputStyle, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
73699
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
73688
73700
  ProtectedTextField,
73689
73701
  {
73690
73702
  autoComplete: "off",
@@ -73701,9 +73713,15 @@ const RoutingNumber = (props) => {
73701
73713
  label: __("Routing number"),
73702
73714
  name: "routingNumber",
73703
73715
  onChange: handleTextInputChange,
73716
+ required: true,
73704
73717
  value: values.routingNumber
73705
73718
  }
73706
73719
  ) }) }),
73720
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginTop: 16, marginBottom: 32 }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: { color: "#666", fontSize: 13 }, children: [
73721
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#E32727", fontSize: 13 }, children: "*" }),
73722
+ " ",
73723
+ __("Required")
73724
+ ] }) }),
73707
73725
  /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
73708
73726
  Button$2,
73709
73727
  {
@@ -73739,9 +73757,6 @@ const getStyles$r = (tokens) => ({
73739
73757
  title: {
73740
73758
  marginBottom: tokens.Spacing.Large
73741
73759
  },
73742
- inputStyle: {
73743
- marginBottom: tokens.Spacing.XLarge
73744
- },
73745
73760
  button: {
73746
73761
  marginBottom: "12px"
73747
73762
  }