@mxenabled/connect-widget 0.18.3 → 0.18.4

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
@@ -66478,52 +66478,71 @@ const MFAOptions = (props) => {
66478
66478
  const tokens = useTokens();
66479
66479
  const styles = getStyles$Z(tokens);
66480
66480
  const mfaLabel = mfaCredentials.map((credential) => credential.label);
66481
- const dynamicLabel = mfaLabel[0] ? mfaLabel[0] : __("Choose an authentication method.");
66481
+ const dynamicMFALabel = mfaLabel[0] ? mfaLabel[0] : __("Choose an authentication method.");
66482
+ const dynamicLabel = isSAS ? __("Select an account to connect") : dynamicMFALabel;
66482
66483
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
66483
- !isSAS && /* @__PURE__ */ jsxRuntimeExports.jsx(x, { component: "p", style: styles.label, truncate: false, variant: "Paragraph", children: dynamicLabel }),
66484
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(FormLabel$1, { sx: { display: "flex" }, children: [
66485
+ /* @__PURE__ */ jsxRuntimeExports.jsx(x, { component: "p", style: styles.label, truncate: false, variant: "Paragraph", children: dynamicLabel }),
66486
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#E32727", fontSize: 15 }, children: "*" })
66487
+ ] }),
66484
66488
  mfaCredentials.map((credential) => {
66485
66489
  return credential.options.map((option, i) => {
66486
66490
  const isSelected = selectedOption.guid === option.guid;
66487
- return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { "data-test": option.label.replace(/\s/g, "-"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
66488
- ProtectedSelectionBox,
66491
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
66492
+ "span",
66489
66493
  {
66490
- autoFocus: i === 0,
66491
- checked: isSelected,
66492
- disabled: isSubmitting,
66493
- id: `${option.guid}`,
66494
- label: /* @__PURE__ */ jsxRuntimeExports.jsx(
66495
- x,
66494
+ "aria-checked": isSelected,
66495
+ "aria-required": "true",
66496
+ "data-test": option.label.replace(/\s/g, "-"),
66497
+ role: "radio",
66498
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
66499
+ ProtectedSelectionBox,
66496
66500
  {
66497
- bold: true,
66498
- "data-test": option.label.replace(/\s/g, "-"),
66499
- truncate: false,
66500
- variant: "Paragraph",
66501
- children: option.label
66502
- }
66503
- ),
66504
- name: "options-selection-box",
66505
- onChange: () => {
66506
- setSelectedOption({ guid: option.guid });
66507
- setCredentials(
66508
- credentialsToSubmit.map(
66509
- (cred) => credential.guid === option.credential_guid ? { guid: option.credential_guid, value: option.guid } : cred
66510
- )
66511
- );
66512
- sendPosthogEvent(AnalyticEvents.MFA_SELECTED_OPTION, {
66513
- institution_guid: institution.guid,
66514
- institution_name: institution.name,
66515
- selectedOption: option.value,
66516
- member_guid: sha256Exports.sha256(currentMember.guid)
66517
- });
66518
- },
66519
- style: styles.card,
66520
- value: option.label,
66521
- variant: "radio"
66501
+ autoFocus: i === 0,
66502
+ checked: isSelected,
66503
+ disabled: isSubmitting,
66504
+ id: `${option.guid}`,
66505
+ label: /* @__PURE__ */ jsxRuntimeExports.jsx(
66506
+ x,
66507
+ {
66508
+ bold: true,
66509
+ "data-test": option.label.replace(/\s/g, "-"),
66510
+ truncate: false,
66511
+ variant: "Paragraph",
66512
+ children: option.label
66513
+ }
66514
+ ),
66515
+ name: "options-selection-box",
66516
+ onChange: () => {
66517
+ setSelectedOption({ guid: option.guid });
66518
+ setCredentials(
66519
+ credentialsToSubmit.map(
66520
+ (cred) => credential.guid === option.credential_guid ? { guid: option.credential_guid, value: option.guid } : cred
66521
+ )
66522
+ );
66523
+ sendPosthogEvent(AnalyticEvents.MFA_SELECTED_OPTION, {
66524
+ institution_guid: institution.guid,
66525
+ institution_name: institution.name,
66526
+ selectedOption: option.value,
66527
+ member_guid: sha256Exports.sha256(currentMember.guid)
66528
+ });
66529
+ },
66530
+ style: styles.card,
66531
+ value: option.label,
66532
+ variant: "radio"
66533
+ },
66534
+ `${option.guid}`
66535
+ )
66522
66536
  },
66523
66537
  `${option.guid}`
66524
- ) }, `${option.guid}`);
66538
+ );
66525
66539
  });
66526
66540
  }),
66541
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: { color: "#666", fontSize: 13, marginBottom: 12 }, children: [
66542
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#E32727", fontSize: 13 }, children: "*" }),
66543
+ " ",
66544
+ __("Required")
66545
+ ] }),
66527
66546
  isSubmitted && _isEmpty(selectedOption) && /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { role: "alert", style: styles.errorContent, children: [
66528
66547
  /* @__PURE__ */ jsxRuntimeExports.jsx(AttentionFilled, { color: tokens.Color.Error300 }),
66529
66548
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { style: styles.errorMessage, children: isSAS ? __("Account selection is required.") : __("Choose an option") })