@tesouro/embedded-components-react 0.11.116 → 0.11.119

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.
Files changed (48) hide show
  1. package/dist/index.css +81 -120
  2. package/dist/index.d.ts +4 -0
  3. package/dist/lib/AcceptDisclosuresWidget.d.ts +4 -0
  4. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +91 -88
  5. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +41 -59
  6. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js +2 -0
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +7 -5
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +163 -160
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +18 -18
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +25 -25
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +34 -31
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/maxBirthDate.js +3 -2
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +21 -18
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +3 -0
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +382 -275
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +2 -2
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +37 -42
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +56 -50
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index2.js +32 -69
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +3 -3
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +14 -25
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +36 -39
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +120 -116
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +14 -26
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +2 -2
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +41 -44
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +96 -115
  30. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +14 -14
  31. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +35 -57
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index33.js +37 -60
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index35.js +28 -42
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +266 -259
  35. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +51 -55
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js +42 -48
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +69 -70
  38. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +2 -2
  39. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +3 -2
  41. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js +51 -0
  42. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmptyState/EmptyState.js +5 -3
  43. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js +1 -1
  44. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +84 -87
  45. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellStepper.js +35 -21
  47. package/dist/packages/shared-ui-shadcn/dist/index.js +29 -85
  48. package/package.json +1 -1
@@ -1,124 +1,105 @@
1
- import { Checkbox as e, Typography as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BUSINESS_DETAILS_LABELS_EN as n, interpolateBankName as r } from "./index12.js";
3
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
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";
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
6
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js
5
- var o = "ttw:cursor-pointer ttw:text-foreground ttw:underline ttw:underline-offset-2 ttw:hover:text-primary";
6
- function s({ href: e, children: t }) {
7
- return e ? /* @__PURE__ */ i("a", {
8
- href: e,
9
- target: "_blank",
10
- rel: "noopener noreferrer",
11
- className: o,
12
- children: t
13
- }) : /* @__PURE__ */ i("span", {
14
- className: o,
15
- children: t
16
- });
17
- }
18
- function c({ value: o, onChange: c, isSubmitting: l, showErrors: u = !1, labels: d, bankName: f, termsHref: p, privacyHref: m, electronicCommunicationHref: h, patriotActHref: g, testIds: _ }) {
19
- let v = {
20
- ...n,
21
- ...d,
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,
22
11
  companyStructureOptions: {
23
- ...n.companyStructureOptions,
24
- ...d?.companyStructureOptions ?? {}
12
+ ...a.companyStructureOptions,
13
+ ...m?.companyStructureOptions ?? {}
25
14
  }
26
- }, y = (e, t) => c({
27
- ...o,
15
+ }, S = (e, t) => d({
16
+ ...u,
28
17
  [e]: t
29
- }), b = u && o.isAuthorized !== !0, x = u && !o.isCheckboxChecked;
30
- return /* @__PURE__ */ a("div", {
18
+ }), C = p && u.isAuthorized !== !0, w = p && !u.isCheckboxChecked;
19
+ return /* @__PURE__ */ l("div", {
31
20
  className: "ttw:flex ttw:flex-col ttw:gap-6",
32
- children: [/* @__PURE__ */ a("div", {
33
- className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:border-b ttw:border-border ttw:pb-6",
34
- children: [/* @__PURE__ */ i(t, {
35
- component: "h3",
36
- variant: "h6",
37
- className: "ttw:font-semibold ttw:text-foreground",
38
- children: v.disclosuresHeading
39
- }), /* @__PURE__ */ i(t, {
40
- variant: "body2",
41
- className: "ttw:text-muted-foreground",
42
- children: v.disclosuresSubheading
43
- })]
44
- }), /* @__PURE__ */ a("div", {
45
- className: "ttw:flex ttw:flex-col ttw:gap-4",
46
- children: [/* @__PURE__ */ a("div", {
47
- className: "ttw:flex ttw:items-start ttw:gap-2",
48
- children: [/* @__PURE__ */ i(e, {
49
- id: "isAuthorized",
50
- "data-testid": _?.authorizationCheckbox,
51
- checked: o.isAuthorized === !0,
52
- onCheckedChange: (e) => y("isAuthorized", e === !0 || null),
53
- disabled: l,
54
- className: "ttw:mt-0.5",
55
- "aria-labelledby": "bank-account-onboarding-authorization-text",
56
- "aria-invalid": b || void 0,
57
- "aria-describedby": b ? "bank-account-onboarding-authorization-error" : void 0
58
- }), /* @__PURE__ */ a("div", {
59
- className: "ttw:flex ttw:flex-col ttw:gap-1",
60
- children: [/* @__PURE__ */ i("p", {
61
- id: "bank-account-onboarding-authorization-text",
62
- className: "ttw:text-sm ttw:font-normal ttw:leading-relaxed ttw:text-foreground",
63
- children: v.isAuthorizedQuestion
64
- }), b ? /* @__PURE__ */ i("p", {
65
- id: "bank-account-onboarding-authorization-error",
66
- className: "ttw:text-sm ttw:text-destructive",
67
- children: v.consentRequiredError
68
- }) : null]
21
+ children: [
22
+ /* @__PURE__ */ l("div", {
23
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
24
+ children: [/* @__PURE__ */ c(t, {
25
+ variant: "section",
26
+ level: 3,
27
+ children: x.disclosuresHeading
28
+ }), /* @__PURE__ */ c(r, {
29
+ variant: "body2",
30
+ className: "ttw:text-muted-foreground",
31
+ children: x.disclosuresSubheading
69
32
  })]
70
- }), /* @__PURE__ */ a("div", {
71
- className: "ttw:flex ttw:items-start ttw:gap-2",
72
- children: [/* @__PURE__ */ i(e, {
73
- id: "isCheckboxChecked",
74
- "data-testid": _?.disclosureCheckbox,
75
- checked: o.isCheckboxChecked,
76
- onCheckedChange: (e) => y("isCheckboxChecked", e === !0),
77
- disabled: l,
78
- className: "ttw:mt-0.5",
79
- "aria-labelledby": "bank-account-onboarding-disclosure-text",
80
- "aria-invalid": x || void 0,
81
- "aria-describedby": x ? "bank-account-onboarding-disclosure-error" : void 0
82
- }), /* @__PURE__ */ a("div", {
83
- className: "ttw:flex ttw:flex-col ttw:gap-1",
84
- children: [/* @__PURE__ */ a("p", {
85
- id: "bank-account-onboarding-disclosure-text",
86
- className: "ttw:max-w-3xl ttw:text-sm ttw:font-normal ttw:leading-relaxed ttw:text-foreground",
87
- children: [
88
- /* @__PURE__ */ i("span", {
89
- className: "ttw:font-semibold",
90
- children: v.disclosureAgreementLead
91
- }),
92
- " ",
93
- r(v.acceptDisclosuresPrefix, f),
94
- /* @__PURE__ */ i(s, {
95
- href: p,
96
- children: v.termsOfUse
97
- }),
98
- v.acceptDisclosuresTermsPrivacyJoin,
99
- /* @__PURE__ */ i(s, {
100
- href: m,
101
- children: v.privacyPolicy
102
- }),
103
- r(v.acceptDisclosuresAfterPrivacy, f),
104
- /* @__PURE__ */ i(s, {
105
- href: h,
106
- children: v.electronicCommunication
107
- }),
108
- r(v.acceptDisclosuresAfterElectronic, f),
109
- /* @__PURE__ */ i(s, {
110
- href: g,
111
- children: v.patriotAct
112
- })
113
- ]
114
- }), x ? /* @__PURE__ */ i("p", {
115
- id: "bank-account-onboarding-disclosure-error",
116
- className: "ttw:text-sm ttw:text-destructive",
117
- children: v.consentRequiredError
118
- }) : null]
33
+ }),
34
+ /* @__PURE__ */ c(n, {}),
35
+ /* @__PURE__ */ l("div", {
36
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
37
+ children: [/* @__PURE__ */ l("div", {
38
+ className: "ttw:flex ttw:items-start ttw:gap-2",
39
+ children: [/* @__PURE__ */ c(e, {
40
+ id: "isAuthorized",
41
+ "data-testid": b?.authorizationCheckbox,
42
+ checked: u.isAuthorized === !0,
43
+ onCheckedChange: (e) => S("isAuthorized", e === !0 || null),
44
+ disabled: f,
45
+ className: "ttw:mt-0.5",
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", {
50
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
51
+ children: [/* @__PURE__ */ c("p", {
52
+ id: "bank-account-onboarding-authorization-text",
53
+ className: "ttw:text-sm ttw:font-normal ttw:leading-relaxed ttw:text-foreground",
54
+ children: x.isAuthorizedQuestion
55
+ }), C ? /* @__PURE__ */ c("p", {
56
+ id: "bank-account-onboarding-authorization-error",
57
+ className: "ttw:text-sm ttw:text-destructive",
58
+ children: x.consentRequiredError
59
+ }) : null]
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", {
82
+ className: "ttw:font-semibold",
83
+ children: x.disclosureAgreementLead
84
+ }),
85
+ " ",
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
94
+ ] }),
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 }
119
100
  })]
120
- })]
121
- })]
101
+ })
102
+ ]
122
103
  });
123
104
  }
124
- export { c as BusinessDisclosuresSection };
105
+ export { u as BusinessDisclosuresSection };
@@ -1,24 +1,24 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { FieldError as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as t } from "react/jsx-runtime";
2
3
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js
3
- function t(e) {
4
+ function n(e) {
4
5
  return `${e}-error`;
5
6
  }
6
- function n(e, n, r) {
7
- let i = [r, n ? t(e) : void 0].filter(Boolean);
7
+ function r(e, t, r) {
8
+ let i = [r, t ? n(e) : void 0].filter(Boolean);
8
9
  return {
9
- "aria-invalid": n ? !0 : void 0,
10
+ "aria-invalid": t ? !0 : void 0,
10
11
  "aria-describedby": i.length > 0 ? i.join(" ") : void 0
11
12
  };
12
13
  }
13
- function r({ fieldId: n, error: r }) {
14
- return r ? /* @__PURE__ */ e("p", {
15
- id: t(n),
16
- className: "ttw:mt-1 ttw:text-sm ttw:text-destructive",
17
- role: "alert",
18
- children: r
14
+ function i({ fieldId: r, error: i }) {
15
+ return i ? /* @__PURE__ */ t(e, {
16
+ id: n(r),
17
+ className: "ttw:mt-1",
18
+ children: i
19
19
  }) : null;
20
20
  }
21
- function i(e) {
21
+ function a(e) {
22
22
  return {
23
23
  onOpenChange: (t) => {
24
24
  t || e?.();
@@ -28,10 +28,10 @@ function i(e) {
28
28
  }
29
29
  };
30
30
  }
31
- function a(e) {
31
+ function o(e) {
32
32
  return (t) => {
33
33
  let n = t.relatedTarget;
34
34
  n instanceof Node && t.currentTarget.contains(n) || e?.();
35
35
  };
36
36
  }
37
- export { r as FieldError, n as fieldErrorAria, t as fieldErrorId, a as onCompositeBlur, i as selectBlurHandlers };
37
+ export { i as FieldError, r as fieldErrorAria, n as fieldErrorId, o as onCompositeBlur, a as selectBlurHandlers };
@@ -1,81 +1,59 @@
1
- import { Button as e, Typography as t, cn as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { APPLICATION_REVIEW_LABELS_EN as r } from "./index30.js";
3
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
4
- import { Pen as s } from "lucide-react";
1
+ import { Button as e, DescriptionList as t, Heading as n, Separator as r, Typography as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { APPLICATION_REVIEW_LABELS_EN as a } from "./index30.js";
3
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
4
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js
6
- function c({ sections: n, isDisabled: c, labels: u, testIds: d }) {
5
+ function c({ sections: c, isDisabled: l, labels: u, testIds: d }) {
7
6
  let f = {
8
- ...r,
7
+ ...a,
9
8
  ...u
10
9
  };
11
- return /* @__PURE__ */ a("div", {
10
+ return /* @__PURE__ */ o("div", {
12
11
  className: "ttw:flex ttw:flex-col ttw:gap-8",
13
12
  "data-testid": d?.root,
14
- children: n.map((n) => {
15
- let { rows: r } = n, u = d?.sections?.[n.id];
16
- return /* @__PURE__ */ o("section", {
13
+ children: c.map((a) => {
14
+ let { rows: c } = a, u = d?.sections?.[a.id];
15
+ return /* @__PURE__ */ s("section", {
17
16
  "data-testid": u?.root,
18
17
  className: "ttw:min-w-0",
19
18
  children: [
20
- /* @__PURE__ */ o("div", {
19
+ /* @__PURE__ */ s("div", {
21
20
  className: "ttw:mb-3 ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
22
- children: [/* @__PURE__ */ a(t, {
23
- component: "h3",
24
- variant: "h6",
25
- className: "ttw:font-semibold ttw:text-foreground",
26
- children: n.title
21
+ children: [/* @__PURE__ */ o(n, {
22
+ variant: "section",
23
+ level: 3,
24
+ children: a.title
27
25
  }), /* @__PURE__ */ o(e, {
28
26
  type: "button",
29
- variant: "outline",
27
+ variant: "secondary",
30
28
  size: "sm",
31
- onClick: n.onEdit,
32
- disabled: c,
33
- "aria-label": n.editAriaLabel,
29
+ onClick: a.onEdit,
30
+ disabled: l,
31
+ "aria-label": a.editAriaLabel,
34
32
  "data-testid": u?.editButton,
35
- children: [/* @__PURE__ */ a(s, {
36
- className: "ttw:size-4",
37
- "aria-hidden": !0
38
- }), f.editButton]
33
+ children: f.editButton
39
34
  })]
40
35
  }),
41
- /* @__PURE__ */ a("div", {
42
- className: "ttw:mb-3 ttw:border-b ttw:border-border",
43
- "aria-hidden": !0
44
- }),
45
- r.length === 0 ? /* @__PURE__ */ a(t, {
36
+ /* @__PURE__ */ o(r, { className: "ttw:mb-3" }),
37
+ c.length === 0 ? /* @__PURE__ */ o(i, {
46
38
  variant: "body2",
47
39
  className: "ttw:text-muted-foreground",
48
40
  children: f.emptySection
49
- }) : /* @__PURE__ */ o("div", {
50
- className: "ttw:grid ttw:grid-cols-[max-content_1fr] ttw:gap-x-4 ttw:gap-y-2",
51
- children: [n.columnHeaders ? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(t, {
52
- component: "span",
53
- variant: "body2",
54
- className: "ttw:font-semibold ttw:text-foreground",
55
- children: n.columnHeaders.label
56
- }), /* @__PURE__ */ a(t, {
57
- component: "span",
58
- variant: "body2",
59
- className: "ttw:font-semibold ttw:text-foreground",
60
- children: n.columnHeaders.value
61
- })] }) : null, r.map((e, t) => /* @__PURE__ */ a(l, { row: e }, `${t}-${e.label}`))]
41
+ }) : /* @__PURE__ */ o(t, {
42
+ variant: "form-review",
43
+ items: [...a.columnHeaders ? [{
44
+ label: a.columnHeaders.label,
45
+ value: a.columnHeaders.value
46
+ }] : [], ...c.map((e) => ({
47
+ label: e.label,
48
+ value: /* @__PURE__ */ o("span", {
49
+ className: e.valueMonospace ? "ttw:font-mono ttw:whitespace-pre-line" : "ttw:whitespace-pre-line",
50
+ children: e.value
51
+ })
52
+ }))]
62
53
  })
63
54
  ]
64
- }, n.id);
55
+ }, a.id);
65
56
  })
66
57
  });
67
58
  }
68
- function l({ row: e }) {
69
- return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(t, {
70
- component: "span",
71
- variant: "body2",
72
- className: "ttw:text-muted-foreground",
73
- children: e.label
74
- }), /* @__PURE__ */ a(t, {
75
- component: "span",
76
- variant: "body2",
77
- className: n("ttw:min-w-0 ttw:wrap-break-word ttw:whitespace-pre-line ttw:text-left ttw:font-medium ttw:text-foreground", e.valueMonospace && "ttw:font-mono"),
78
- children: e.value
79
- })] });
80
- }
81
- export { r as APPLICATION_REVIEW_LABELS_EN, c as ApplicationReview };
59
+ export { a as APPLICATION_REVIEW_LABELS_EN, c as ApplicationReview };
@@ -1,65 +1,42 @@
1
- import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { DELETE_APPLICATION_DIALOG_LABELS_EN as s } from "./index32.js";
3
- import { useRef as c } from "react";
4
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
5
- import { Trash2Icon as d } from "lucide-react";
1
+ import { ConfirmDialog as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { DELETE_APPLICATION_DIALOG_LABELS_EN as t } from "./index32.js";
3
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { Trash2Icon as a } from "lucide-react";
6
5
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index33.js
7
- function f({ open: f, onConfirm: p, onCancel: m, isDeleting: h = !1, labels: g, testIds: _ }) {
8
- let v = {
9
- ...s,
10
- ...g
11
- }, y = c(null);
12
- return /* @__PURE__ */ l(e, {
13
- open: f,
6
+ function o({ open: o, onConfirm: s, onCancel: c, isDeleting: l = !1, labels: u, testIds: d }) {
7
+ let f = {
8
+ ...t,
9
+ ...u
10
+ };
11
+ return /* @__PURE__ */ r(e, {
12
+ open: o,
14
13
  onOpenChange: (e) => {
15
- !e && !h && m();
14
+ !e && !l && c();
16
15
  },
17
- children: /* @__PURE__ */ u(t, {
18
- closeDisabled: h,
19
- labels: { close: v.close },
20
- "data-testid": _?.root,
21
- onOpenAutoFocus: (e) => {
22
- e.preventDefault(), y.current?.focus();
23
- },
24
- children: [/* @__PURE__ */ u(i, {
25
- className: "ttw:items-center ttw:text-center ttw:sm:items-center ttw:sm:text-center",
26
- children: [
27
- /* @__PURE__ */ l("div", {
28
- className: "ttw:flex ttw:size-14 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-destructive/10",
29
- "aria-hidden": !0,
30
- children: /* @__PURE__ */ l(d, { className: "ttw:size-6 ttw:text-destructive" })
31
- }),
32
- /* @__PURE__ */ l(a, { children: v.title }),
33
- /* @__PURE__ */ u(n, { children: [
34
- v.descriptionBeforeEmphasis,
35
- /* @__PURE__ */ l("strong", {
36
- className: "ttw:font-semibold ttw:text-foreground",
37
- children: v.descriptionEmphasis
38
- }),
39
- v.descriptionAfterEmphasis
40
- ] })
41
- ]
42
- }), /* @__PURE__ */ u(r, {
43
- className: "ttw:sm:justify-center",
44
- children: [/* @__PURE__ */ l(o, {
45
- ref: y,
46
- type: "button",
47
- variant: "outline",
48
- onClick: m,
49
- disabled: h,
50
- "data-testid": _?.cancel,
51
- children: v.keepEditingButton
52
- }), /* @__PURE__ */ l(o, {
53
- type: "button",
54
- variant: "destructive",
55
- loading: h,
56
- disabled: h,
57
- onClick: p,
58
- "data-testid": _?.confirm,
59
- children: v.deleteButton
60
- })]
61
- })]
62
- })
16
+ title: f.title,
17
+ description: /* @__PURE__ */ i(n, { children: [
18
+ f.descriptionBeforeEmphasis,
19
+ /* @__PURE__ */ r("strong", {
20
+ className: "ttw:font-semibold ttw:text-foreground",
21
+ children: f.descriptionEmphasis
22
+ }),
23
+ f.descriptionAfterEmphasis
24
+ ] }),
25
+ icon: /* @__PURE__ */ r(a, {}),
26
+ destructive: !0,
27
+ loading: l,
28
+ confirmDisabled: l,
29
+ onConfirm: s,
30
+ labels: {
31
+ confirm: f.deleteButton,
32
+ cancel: f.keepEditingButton,
33
+ close: f.close
34
+ },
35
+ testIds: {
36
+ content: d?.root,
37
+ cancel: d?.cancel,
38
+ confirm: d?.confirm
39
+ }
63
40
  });
64
41
  }
65
- export { s as DELETE_APPLICATION_DIALOG_LABELS_EN, f as DeleteApplicationDialog };
42
+ export { t as DELETE_APPLICATION_DIALOG_LABELS_EN, o as DeleteApplicationDialog };
@@ -1,45 +1,31 @@
1
- import { Button as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { APPLICATION_DELETED_SCREEN_LABELS_EN as n } from "./index34.js";
3
- import { useEffect as r, useRef as i } from "react";
4
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
- import { CircleCheckIcon as s } from "lucide-react";
1
+ import { ResultScreen as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { APPLICATION_DELETED_SCREEN_LABELS_EN as t } from "./index34.js";
3
+ import { useEffect as n, useRef as r } from "react";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ import { CircleCheckIcon as a } from "lucide-react";
6
6
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index35.js
7
- function c({ onStartNewApplication: c, labels: l, className: u, testIds: d }) {
8
- let f = {
9
- ...n,
10
- ...l
11
- }, p = i(null);
12
- return r(() => {
13
- p.current?.focus();
14
- }, []), /* @__PURE__ */ o("section", {
15
- "data-testid": d?.root,
16
- "aria-label": f.title,
17
- className: t("ttw:flex ttw:w-full ttw:flex-col ttw:items-center ttw:gap-4 ttw:p-6 ttw:text-center ttw:text-foreground", u),
18
- children: [
19
- /* @__PURE__ */ a("div", {
20
- className: "ttw:flex ttw:size-14 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-primary/10",
21
- "aria-hidden": !0,
22
- children: /* @__PURE__ */ a(s, { className: "ttw:size-6 ttw:text-primary" })
23
- }),
24
- /* @__PURE__ */ o("div", {
25
- className: "ttw:flex ttw:flex-col ttw:gap-2",
26
- children: [/* @__PURE__ */ a("p", {
27
- ref: p,
28
- tabIndex: -1,
29
- className: "ttw:text-xl ttw:font-semibold ttw:outline-none",
30
- children: f.title
31
- }), /* @__PURE__ */ a("p", {
32
- className: "ttw:text-sm ttw:text-muted-foreground",
33
- children: f.body
34
- })]
35
- }),
36
- /* @__PURE__ */ a(e, {
37
- type: "button",
38
- onClick: c,
39
- "data-testid": d?.startNewApplication,
40
- children: f.startNewApplicationButton
41
- })
42
- ]
7
+ function o({ onStartNewApplication: o, labels: s, className: c, testIds: l }) {
8
+ let u = {
9
+ ...t,
10
+ ...s
11
+ }, d = r(null);
12
+ return n(() => {
13
+ let e = d.current?.querySelector("h2");
14
+ e?.setAttribute("tabindex", "-1"), e?.focus();
15
+ }, []), /* @__PURE__ */ i("div", {
16
+ ref: d,
17
+ role: "region",
18
+ "aria-label": u.title,
19
+ "data-testid": l?.root,
20
+ className: c,
21
+ children: /* @__PURE__ */ i(e, {
22
+ icon: /* @__PURE__ */ i(a, {}),
23
+ title: u.title,
24
+ description: u.body,
25
+ onDone: o,
26
+ labels: { done: u.startNewApplicationButton },
27
+ testIds: { done: l?.startNewApplication }
28
+ })
43
29
  });
44
30
  }
45
- export { n as APPLICATION_DELETED_SCREEN_LABELS_EN, c as ApplicationDeletedScreen };
31
+ export { t as APPLICATION_DELETED_SCREEN_LABELS_EN, o as ApplicationDeletedScreen };