@tesouro/embedded-components-react 0.11.131 → 0.11.132

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.
@@ -13,7 +13,7 @@ var h = "ttw:w-full";
13
13
  function g({ fields: n, testIds: g, labels: _, isDisabled: v, taxIdRequired: y, taxIdPlaceholder: b, taxIdHelpText: x }) {
14
14
  let S = d(n.state.onBlur), C = d(n.companyStructure.onBlur);
15
15
  return /* @__PURE__ */ p("section", {
16
- className: "ttw:@container/form ttw:flex ttw:max-w-[720px] ttw:flex-col ttw:gap-3",
16
+ className: "ttw:@container/form ttw:flex ttw:w-[720px] ttw:max-w-full ttw:flex-col ttw:gap-3",
17
17
  "data-testid": g?.root,
18
18
  children: [/* @__PURE__ */ f("p", {
19
19
  className: "ttw:text-sm ttw:text-muted-foreground",
@@ -15,7 +15,7 @@ var C = "ttw:w-full";
15
15
  function w({ fields: r, testIds: w, labels: T, isDisabled: E, ssnRevealed: D, ssnToggleAriaLabel: O, onToggleSsnVisibility: k, ssnMaskedDisplay: A, ssnFormattedDisplay: j, ssnRequired: M, ssnPlaceholder: N, ssnHelpText: P }) {
16
16
  let [F, I] = _(!1), L = !D && !F, R = g(r.state.onBlur);
17
17
  return /* @__PURE__ */ y("section", {
18
- className: "ttw:@container/form ttw:max-w-[720px] ttw:flex ttw:flex-col ttw:gap-3",
18
+ className: "ttw:@container/form ttw:flex ttw:w-[720px] ttw:max-w-full ttw:flex-col ttw:gap-3",
19
19
  "data-testid": w?.root,
20
20
  children: [
21
21
  /* @__PURE__ */ v("p", {
@@ -1,105 +1,100 @@
1
1
  import { Checkbox as e, Heading as t, Separator as n, Typography as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ConsentBlock as i } from "../../../shared/ui/dist/lib/ConsentBlock/ConsentBlock.js";
2
+ import { ConsentBlock as i, ConsentLink as a } from "../../../shared/ui/dist/lib/ConsentBlock/ConsentBlock.js";
3
3
  import "../../../shared/ui/dist/index.js";
4
- import { BUSINESS_DETAILS_LABELS_EN as a, interpolateBankName as o } from "./index12.js";
5
- import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ import { BUSINESS_DETAILS_LABELS_EN as o, interpolateBankName as s } from "./index12.js";
5
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
6
6
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js
7
- function u({ value: u, onChange: d, isSubmitting: f, showErrors: p = !1, labels: m, bankName: h, termsHref: g, privacyHref: _, electronicCommunicationHref: v, patriotActHref: y, testIds: b }) {
8
- let x = {
9
- ...a,
10
- ...m,
7
+ function d({ value: d, onChange: f, isSubmitting: p, showErrors: m = !1, labels: h, bankName: g, termsHref: _, privacyHref: v, electronicCommunicationHref: y, patriotActHref: b, testIds: x }) {
8
+ let S = {
9
+ ...o,
10
+ ...h,
11
11
  companyStructureOptions: {
12
- ...a.companyStructureOptions,
13
- ...m?.companyStructureOptions ?? {}
12
+ ...o.companyStructureOptions,
13
+ ...h?.companyStructureOptions ?? {}
14
14
  }
15
- }, S = (e, t) => d({
16
- ...u,
15
+ }, C = (e, t) => f({
16
+ ...d,
17
17
  [e]: t
18
- }), C = p && u.isAuthorized !== !0, w = p && !u.isCheckboxChecked;
19
- return /* @__PURE__ */ l("div", {
18
+ }), w = m && d.isAuthorized !== !0, T = m && !d.isCheckboxChecked;
19
+ return /* @__PURE__ */ u("div", {
20
20
  className: "ttw:flex ttw:flex-col ttw:gap-6",
21
21
  children: [
22
- /* @__PURE__ */ l("div", {
22
+ /* @__PURE__ */ u("div", {
23
23
  className: "ttw:flex ttw:flex-col ttw:gap-1",
24
- children: [/* @__PURE__ */ c(t, {
24
+ children: [/* @__PURE__ */ l(t, {
25
25
  variant: "section",
26
26
  level: 3,
27
- children: x.disclosuresHeading
28
- }), /* @__PURE__ */ c(r, {
27
+ children: S.disclosuresHeading
28
+ }), /* @__PURE__ */ l(r, {
29
29
  variant: "body2",
30
30
  className: "ttw:text-muted-foreground",
31
- children: x.disclosuresSubheading
31
+ children: S.disclosuresSubheading
32
32
  })]
33
33
  }),
34
- /* @__PURE__ */ c(n, {}),
35
- /* @__PURE__ */ l("div", {
34
+ /* @__PURE__ */ l(n, {}),
35
+ /* @__PURE__ */ u("div", {
36
36
  className: "ttw:flex ttw:flex-col ttw:gap-4",
37
- children: [/* @__PURE__ */ l("div", {
37
+ children: [/* @__PURE__ */ u("div", {
38
38
  className: "ttw:flex ttw:items-start ttw:gap-2",
39
- children: [/* @__PURE__ */ c(e, {
39
+ children: [/* @__PURE__ */ l(e, {
40
40
  id: "isAuthorized",
41
- "data-testid": b?.authorizationCheckbox,
42
- checked: u.isAuthorized === !0,
43
- onCheckedChange: (e) => S("isAuthorized", e === !0 || null),
44
- disabled: f,
41
+ "data-testid": x?.authorizationCheckbox,
42
+ checked: d.isAuthorized === !0,
43
+ onCheckedChange: (e) => C("isAuthorized", e === !0 || null),
44
+ disabled: p,
45
45
  className: "ttw:mt-0.5",
46
46
  "aria-labelledby": "bank-account-onboarding-authorization-text",
47
- "aria-invalid": C || void 0,
48
- "aria-describedby": C ? "bank-account-onboarding-authorization-error" : void 0
49
- }), /* @__PURE__ */ l("div", {
47
+ "aria-invalid": w || void 0,
48
+ "aria-describedby": w ? "bank-account-onboarding-authorization-error" : void 0
49
+ }), /* @__PURE__ */ u("div", {
50
50
  className: "ttw:flex ttw:flex-col ttw:gap-1",
51
- children: [/* @__PURE__ */ c("p", {
51
+ children: [/* @__PURE__ */ l("p", {
52
52
  id: "bank-account-onboarding-authorization-text",
53
53
  className: "ttw:text-sm ttw:font-normal ttw:leading-relaxed ttw:text-foreground",
54
- children: x.isAuthorizedQuestion
55
- }), C ? /* @__PURE__ */ c("p", {
54
+ children: S.isAuthorizedQuestion
55
+ }), w ? /* @__PURE__ */ l("p", {
56
56
  id: "bank-account-onboarding-authorization-error",
57
57
  className: "ttw:text-sm ttw:text-destructive",
58
- children: x.consentRequiredError
58
+ children: S.consentRequiredError
59
59
  }) : null]
60
60
  })]
61
- }), /* @__PURE__ */ c(i, {
62
- links: [
63
- {
64
- label: x.termsOfUse,
65
- href: g
66
- },
67
- {
68
- label: x.privacyPolicy,
69
- href: _
70
- },
71
- {
72
- label: x.electronicCommunication,
73
- href: v
74
- },
75
- {
76
- label: x.patriotAct.replace(/\.\s*$/, ""),
77
- href: y
78
- }
79
- ],
80
- agreement: /* @__PURE__ */ l(s, { children: [
81
- /* @__PURE__ */ c("span", {
61
+ }), /* @__PURE__ */ l(i, {
62
+ links: [],
63
+ agreement: /* @__PURE__ */ u(c, { children: [
64
+ /* @__PURE__ */ l("span", {
82
65
  className: "ttw:font-semibold",
83
- children: x.disclosureAgreementLead
66
+ children: S.disclosureAgreementLead
84
67
  }),
85
68
  " ",
86
- o(x.acceptDisclosuresPrefix, h),
87
- x.termsOfUse,
88
- x.acceptDisclosuresTermsPrivacyJoin,
89
- x.privacyPolicy,
90
- o(x.acceptDisclosuresAfterPrivacy, h),
91
- x.electronicCommunication,
92
- o(x.acceptDisclosuresAfterElectronic, h),
93
- x.patriotAct
69
+ s(S.acceptDisclosuresPrefix, g),
70
+ /* @__PURE__ */ l(a, {
71
+ href: _,
72
+ children: S.termsOfUse
73
+ }),
74
+ S.acceptDisclosuresTermsPrivacyJoin,
75
+ /* @__PURE__ */ l(a, {
76
+ href: v,
77
+ children: S.privacyPolicy
78
+ }),
79
+ s(S.acceptDisclosuresAfterPrivacy, g),
80
+ /* @__PURE__ */ l(a, {
81
+ href: y,
82
+ children: S.electronicCommunication
83
+ }),
84
+ s(S.acceptDisclosuresAfterElectronic, g),
85
+ /* @__PURE__ */ l(a, {
86
+ href: b,
87
+ children: S.patriotAct
88
+ })
94
89
  ] }),
95
- checked: u.isCheckboxChecked,
96
- onCheckedChange: (e) => S("isCheckboxChecked", e),
97
- disabled: f,
98
- error: w ? x.consentRequiredError : void 0,
99
- testIds: { checkbox: b?.disclosureCheckbox }
90
+ checked: d.isCheckboxChecked,
91
+ onCheckedChange: (e) => C("isCheckboxChecked", e),
92
+ disabled: p,
93
+ error: T ? S.consentRequiredError : void 0,
94
+ testIds: { checkbox: x?.disclosureCheckbox }
100
95
  })]
101
96
  })
102
97
  ]
103
98
  });
104
99
  }
105
- export { u as BusinessDisclosuresSection };
100
+ export { d as BusinessDisclosuresSection };
@@ -15,7 +15,7 @@ var E = "ttw:w-full";
15
15
  function D({ fields: o, display: D, isDisabled: O, labels: k, ssnRevealed: A, ssnToggleAriaLabel: j, onToggleSsnVisibility: M }) {
16
16
  let [N, P] = b.useState(!1), F = !A && !N, I = y(o.state.onBlur);
17
17
  return /* @__PURE__ */ S("div", {
18
- className: "ttw:@container/form ttw:flex ttw:max-w-[720px] ttw:flex-col ttw:gap-3",
18
+ className: "ttw:@container/form ttw:flex ttw:w-[720px] ttw:max-w-full ttw:flex-col ttw:gap-3",
19
19
  children: [
20
20
  /* @__PURE__ */ S("div", {
21
21
  className: "ttw:grid ttw:grid-cols-1 ttw:gap-3 ttw:@md/form:grid-cols-2",
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.131", n = "b25b566c6ae47bb53e3475cbfe3c7b2508142dff", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.132", n = "29c1336e945ad2b15bde47f2500233d70f3859ce", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -30,8 +30,8 @@ import "./lib/OnboardingShell/OnboardingShellStepper.js";
30
30
  import "./lib/OnboardingShell/OnboardingShellOverlayPortal.js";
31
31
  import { OnboardingShell as T } from "./lib/OnboardingShell/OnboardingShell.js";
32
32
  import { SectionHeading as E } from "./lib/SectionHeading/SectionHeading.js";
33
- import { ConsentBlock as D } from "./lib/ConsentBlock/ConsentBlock.js";
34
- import { FileDropZone as O } from "./lib/FileDropZone/FileDropZone.js";
35
- import { CopyAddress as k } from "./lib/CopyAddress/CopyAddress.js";
36
- import { UploadTray as A } from "./lib/UploadTray/UploadTray.js";
37
- export { p as AddTile, y as AmountInput, D as ConsentBlock, k as CopyAddress, g as ERROR_STATE_ID, e as EmbeddedToaster, h as EmptyState, _ as ErrorState, O as FileDropZone, l as HostIsolationScope, S as InlineErrorAlert, u as Link, b as LoadingRegion, x as MaskedAccountNumber, v as NoAccessState, T as OnboardingShell, C as PAGINATION_FOOTER_LABELS_EN, w as PaginationFooter, E as SectionHeading, m as StatePanel, t as ToastNameMessage, n as UIFramework, i as UIProvider, A as UploadTray, f as WidgetContainer, d as WidgetFrame, a as registerDesignSystemEnsurer, o as registerUIRenderers, r as resolveUIFramework, s as useDesignSystemEnsurer, c as useFrameworkRenderer };
33
+ import { ConsentBlock as D, ConsentLink as O } from "./lib/ConsentBlock/ConsentBlock.js";
34
+ import { FileDropZone as k } from "./lib/FileDropZone/FileDropZone.js";
35
+ import { CopyAddress as A } from "./lib/CopyAddress/CopyAddress.js";
36
+ import { UploadTray as j } from "./lib/UploadTray/UploadTray.js";
37
+ export { p as AddTile, y as AmountInput, D as ConsentBlock, O as ConsentLink, A as CopyAddress, g as ERROR_STATE_ID, e as EmbeddedToaster, h as EmptyState, _ as ErrorState, k as FileDropZone, l as HostIsolationScope, S as InlineErrorAlert, u as Link, b as LoadingRegion, x as MaskedAccountNumber, v as NoAccessState, T as OnboardingShell, C as PAGINATION_FOOTER_LABELS_EN, w as PaginationFooter, E as SectionHeading, m as StatePanel, t as ToastNameMessage, n as UIFramework, i as UIProvider, j as UploadTray, f as WidgetContainer, d as WidgetFrame, a as registerDesignSystemEnsurer, o as registerUIRenderers, r as resolveUIFramework, s as useDesignSystemEnsurer, c as useFrameworkRenderer };
@@ -1,27 +1,36 @@
1
1
  import { Checkbox as e, FieldError as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
2
  import { useId as n } from "react";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
3
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
4
4
  // ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js
5
- function a({ links: a, agreement: o, checked: s, onCheckedChange: c, disabled: l, error: u, checkboxAriaLabel: d, testIds: f }) {
5
+ function o({ href: e, children: t }) {
6
+ return e ? /* @__PURE__ */ i("a", {
7
+ href: e,
8
+ target: "_blank",
9
+ rel: "noopener noreferrer",
10
+ className: "ttw:text-foreground ttw:underline ttw:underline-offset-2 ttw:hover:text-primary",
11
+ children: t
12
+ }) : /* @__PURE__ */ i(r, { children: t });
13
+ }
14
+ function s({ links: r, agreement: o, checked: s, onCheckedChange: c, disabled: l, error: u, checkboxAriaLabel: d, testIds: f }) {
6
15
  let p = n(), m = `${p}-agreement`, h = `${p}-error`;
7
- return /* @__PURE__ */ i("div", {
16
+ return /* @__PURE__ */ a("div", {
8
17
  className: "ttw:flex ttw:flex-col ttw:gap-4",
9
- children: [a.length > 0 ? /* @__PURE__ */ r("ul", {
18
+ children: [r.length > 0 ? /* @__PURE__ */ i("ul", {
10
19
  "data-testid": f?.links,
11
20
  className: "ttw:list-disc ttw:space-y-2 ttw:pl-5",
12
- children: a.map((e, t) => /* @__PURE__ */ r("li", { children: e.href ? /* @__PURE__ */ r("a", {
21
+ children: r.map((e, t) => /* @__PURE__ */ i("li", { children: e.href ? /* @__PURE__ */ i("a", {
13
22
  href: e.href,
14
23
  target: "_blank",
15
24
  rel: "noopener noreferrer",
16
25
  className: "ttw:text-sm ttw:text-primary ttw:underline ttw:underline-offset-2",
17
26
  children: e.label
18
- }) : /* @__PURE__ */ r("span", {
27
+ }) : /* @__PURE__ */ i("span", {
19
28
  className: "ttw:text-sm",
20
29
  children: e.label
21
30
  }) }, `${e.label}-${t}`))
22
- }) : null, /* @__PURE__ */ i("div", {
31
+ }) : null, /* @__PURE__ */ a("div", {
23
32
  className: "ttw:flex ttw:items-start ttw:gap-2",
24
- children: [/* @__PURE__ */ r(e, {
33
+ children: [/* @__PURE__ */ i(e, {
25
34
  id: p,
26
35
  "data-testid": f?.checkbox,
27
36
  checked: s,
@@ -32,15 +41,15 @@ function a({ links: a, agreement: o, checked: s, onCheckedChange: c, disabled: l
32
41
  "aria-describedby": [d ? m : void 0, u ? h : void 0].filter(Boolean).join(" ") || void 0,
33
42
  "aria-invalid": u ? !0 : void 0,
34
43
  className: "ttw:mt-1 ttw:shrink-0"
35
- }), /* @__PURE__ */ i("div", {
44
+ }), /* @__PURE__ */ a("div", {
36
45
  className: "ttw:flex ttw:flex-col ttw:gap-1",
37
- children: [/* @__PURE__ */ r("label", {
46
+ children: [/* @__PURE__ */ i("label", {
38
47
  htmlFor: p,
39
48
  id: m,
40
49
  "data-testid": f?.agreement,
41
50
  className: "ttw:text-sm ttw:leading-relaxed ttw:text-foreground",
42
51
  children: o
43
- }), u ? /* @__PURE__ */ r(t, {
52
+ }), u ? /* @__PURE__ */ i(t, {
44
53
  id: h,
45
54
  children: u
46
55
  }) : null]
@@ -48,4 +57,4 @@ function a({ links: a, agreement: o, checked: s, onCheckedChange: c, disabled: l
48
57
  })]
49
58
  });
50
59
  }
51
- export { a as ConsentBlock };
60
+ export { s as ConsentBlock, o as ConsentLink };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.11.131",
3
+ "version": "0.11.132",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [