@tesouro/embedded-components-react 0.10.9 → 0.10.10

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 (56) hide show
  1. package/dist/index.css +9 -0
  2. package/dist/index.d.ts +46 -7
  3. package/dist/index.js +4 -4
  4. package/dist/lib/BankAccountOnboardingWidget.d.ts +46 -7
  5. package/dist/lib/BankAccountOnboardingWidget.js +4 -4
  6. package/dist/lib/WidgetSuite.d.ts +46 -7
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +175 -98
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +365 -343
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +3 -9
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/ReviewStep.js +24 -23
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/TermsStep.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/apiMapping.js +15 -10
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicantOwnerSummary.js +11 -0
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js +2 -2
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/draftApplicationMapping.js +3 -3
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +3 -26
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/stepSchemas.js +2 -6
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +3 -1
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +20 -20
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +5 -340
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +422 -58
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +50 -30
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +39 -6
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +6 -58
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +62 -31
  30. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +31 -38
  31. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +27 -26
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +34 -91
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +96 -12
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +12 -276
  35. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +294 -25
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +28 -23
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +23 -53
  38. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +46 -343
  39. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +268 -26
  40. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +29 -29
  41. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +29 -59
  42. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +53 -118
  43. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +123 -5
  44. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +5 -80
  45. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +80 -10
  46. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index32.js +10 -64
  47. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index33.js +64 -6
  48. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index34.js +6 -44
  49. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index35.js +45 -0
  50. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +110 -2
  51. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js +2 -77
  52. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +89 -5
  53. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  54. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +67 -61
  55. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellStepper.js +16 -19
  56. package/package.json +1 -1
@@ -1,6 +1,124 @@
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
4
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js
2
- var e = {
3
- editButton: "Edit",
4
- emptySection: "None"
5
- };
6
- export { e as APPLICATION_REVIEW_LABELS_EN };
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,
22
+ companyStructureOptions: {
23
+ ...n.companyStructureOptions,
24
+ ...d?.companyStructureOptions ?? {}
25
+ }
26
+ }, y = (e, t) => c({
27
+ ...o,
28
+ [e]: t
29
+ }), b = u && o.isAuthorized !== !0, x = u && !o.isCheckboxChecked;
30
+ return /* @__PURE__ */ a("div", {
31
+ 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]
69
+ })]
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]
119
+ })]
120
+ })]
121
+ })]
122
+ });
123
+ }
124
+ export { c as BusinessDisclosuresSection };
@@ -1,81 +1,6 @@
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 "./index29.js";
3
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
4
- import { Pen as s } from "lucide-react";
5
1
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js
6
- function c({ sections: n, isDisabled: c, labels: u, testIds: d }) {
7
- let f = {
8
- ...r,
9
- ...u
10
- };
11
- return /* @__PURE__ */ a("div", {
12
- className: "ttw:flex ttw:flex-col ttw:gap-8",
13
- "data-testid": d?.root,
14
- children: n.map((n) => {
15
- let { rows: r } = n, u = d?.sections?.[n.id];
16
- return /* @__PURE__ */ o("section", {
17
- "data-testid": u?.root,
18
- className: "ttw:min-w-0",
19
- children: [
20
- /* @__PURE__ */ o("div", {
21
- 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
27
- }), /* @__PURE__ */ o(e, {
28
- type: "button",
29
- variant: "outline",
30
- size: "sm",
31
- onClick: n.onEdit,
32
- disabled: c,
33
- "aria-label": n.editAriaLabel,
34
- "data-testid": u?.editButton,
35
- children: [/* @__PURE__ */ a(s, {
36
- className: "ttw:size-4",
37
- "aria-hidden": !0
38
- }), f.editButton]
39
- })]
40
- }),
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, {
46
- variant: "body2",
47
- className: "ttw:text-muted-foreground",
48
- 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}`))]
62
- })
63
- ]
64
- }, n.id);
65
- })
66
- });
67
- }
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 };
2
+ var e = {
3
+ editButton: "Edit",
4
+ emptySection: "None"
5
+ };
6
+ export { e as APPLICATION_REVIEW_LABELS_EN };
@@ -1,11 +1,81 @@
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
5
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js
2
- var e = {
3
- title: "Delete this application?",
4
- descriptionBeforeEmphasis: "Everything you've entered so far will be permanently removed. If you'd rather come back later, use ",
5
- descriptionEmphasis: "Save and continue later",
6
- descriptionAfterEmphasis: " instead.",
7
- keepEditingButton: "Keep editing",
8
- deleteButton: "Delete application",
9
- close: "Close"
10
- };
11
- export { e as DELETE_APPLICATION_DIALOG_LABELS_EN };
6
+ function c({ sections: n, isDisabled: c, labels: u, testIds: d }) {
7
+ let f = {
8
+ ...r,
9
+ ...u
10
+ };
11
+ return /* @__PURE__ */ a("div", {
12
+ className: "ttw:flex ttw:flex-col ttw:gap-8",
13
+ "data-testid": d?.root,
14
+ children: n.map((n) => {
15
+ let { rows: r } = n, u = d?.sections?.[n.id];
16
+ return /* @__PURE__ */ o("section", {
17
+ "data-testid": u?.root,
18
+ className: "ttw:min-w-0",
19
+ children: [
20
+ /* @__PURE__ */ o("div", {
21
+ 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
27
+ }), /* @__PURE__ */ o(e, {
28
+ type: "button",
29
+ variant: "outline",
30
+ size: "sm",
31
+ onClick: n.onEdit,
32
+ disabled: c,
33
+ "aria-label": n.editAriaLabel,
34
+ "data-testid": u?.editButton,
35
+ children: [/* @__PURE__ */ a(s, {
36
+ className: "ttw:size-4",
37
+ "aria-hidden": !0
38
+ }), f.editButton]
39
+ })]
40
+ }),
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, {
46
+ variant: "body2",
47
+ className: "ttw:text-muted-foreground",
48
+ 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}`))]
62
+ })
63
+ ]
64
+ }, n.id);
65
+ })
66
+ });
67
+ }
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 };
@@ -1,65 +1,11 @@
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 "./index31.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";
6
1
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index32.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,
14
- onOpenChange: (e) => {
15
- !e && !h && m();
16
- },
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
- })
63
- });
64
- }
65
- export { s as DELETE_APPLICATION_DIALOG_LABELS_EN, f as DeleteApplicationDialog };
2
+ var e = {
3
+ title: "Delete this application?",
4
+ descriptionBeforeEmphasis: "Everything you've entered so far will be permanently removed. If you'd rather come back later, use ",
5
+ descriptionEmphasis: "Save and continue later",
6
+ descriptionAfterEmphasis: " instead.",
7
+ keepEditingButton: "Keep editing",
8
+ deleteButton: "Delete application",
9
+ close: "Close"
10
+ };
11
+ export { e as DELETE_APPLICATION_DIALOG_LABELS_EN };
@@ -1,7 +1,65 @@
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
6
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index33.js
2
- var e = {
3
- title: "Application deleted",
4
- body: "Your application and everything you entered have been permanently removed. You can start a new application whenever you're ready.",
5
- startNewApplicationButton: "Start a new application"
6
- };
7
- export { e as APPLICATION_DELETED_SCREEN_LABELS_EN };
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,
14
+ onOpenChange: (e) => {
15
+ !e && !h && m();
16
+ },
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
+ })
63
+ });
64
+ }
65
+ export { s as DELETE_APPLICATION_DIALOG_LABELS_EN, f as DeleteApplicationDialog };
@@ -1,45 +1,7 @@
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 "./index33.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";
6
1
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index34.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
- ]
43
- });
44
- }
45
- export { n as APPLICATION_DELETED_SCREEN_LABELS_EN, c as ApplicationDeletedScreen };
2
+ var e = {
3
+ title: "Application deleted",
4
+ body: "Everything you entered has been removed. You can start a new application whenever you're ready.",
5
+ startNewApplicationButton: "Start a new application"
6
+ };
7
+ export { e as APPLICATION_DELETED_SCREEN_LABELS_EN };
@@ -0,0 +1,45 @@
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";
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
+ ]
43
+ });
44
+ }
45
+ export { n as APPLICATION_DELETED_SCREEN_LABELS_EN, c as ApplicationDeletedScreen };
@@ -1,3 +1,111 @@
1
+ import { Badge as e, Button as t, InputGroup as n, InputGroupAddon as r, InputGroupInput as i, Label as a, Typography as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { FieldError as s, fieldErrorAria as c } from "./index3.js";
3
+ import { useId as l } from "react";
4
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
+ import { PencilIcon as f } from "lucide-react";
1
6
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js
2
- var e = (e) => `Ending in ${e}. Leave blank to keep it, or enter it again to change it.`;
3
- export { e as IDENTIFIER_ON_FILE_TEMPLATE_EN };
7
+ function p({ applicantName: p, editor: m, onEditPersonalDetails: h, isDisabled: g, labels: _, testIds: v }) {
8
+ let y = l(), b = l();
9
+ return /* @__PURE__ */ d("section", {
10
+ "aria-labelledby": y,
11
+ "data-testid": v?.root,
12
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-md ttw:border ttw:border-primary ttw:bg-background ttw:p-4",
13
+ children: [
14
+ /* @__PURE__ */ d("div", {
15
+ className: "ttw:flex ttw:items-center ttw:gap-2",
16
+ children: [
17
+ /* @__PURE__ */ u(f, {
18
+ "aria-hidden": !0,
19
+ className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground"
20
+ }),
21
+ /* @__PURE__ */ u(o, {
22
+ component: "h4",
23
+ variant: "h6",
24
+ id: y,
25
+ tabIndex: -1,
26
+ "data-owner-panel-heading": "",
27
+ "data-needs-attention": "",
28
+ className: "ttw:font-semibold ttw:text-foreground",
29
+ children: _.inlineEditHeadingTemplate(p)
30
+ }),
31
+ /* @__PURE__ */ u(e, {
32
+ variant: "secondary",
33
+ children: _.applicantBadge
34
+ })
35
+ ]
36
+ }),
37
+ /* @__PURE__ */ d("div", { children: [
38
+ /* @__PURE__ */ d(a, {
39
+ htmlFor: b,
40
+ className: "ttw:mb-1 ttw:block ttw:text-sm ttw:font-medium",
41
+ children: [_.applicantOwnershipPercentage, _.requiredFieldMarker]
42
+ }),
43
+ /* @__PURE__ */ d(n, {
44
+ className: "ttw:w-32",
45
+ children: [/* @__PURE__ */ u(i, {
46
+ id: b,
47
+ type: "number",
48
+ min: 25,
49
+ max: 100,
50
+ "data-has-end-addon": "",
51
+ placeholder: _.ownershipPercentagePlaceholder,
52
+ value: m.share.value ?? "",
53
+ onChange: (e) => m.share.onValueChange(e.target.value === "" ? null : Number(e.target.value)),
54
+ onBlur: m.share.onBlur,
55
+ ...c(b, m.share.error),
56
+ disabled: g,
57
+ required: !0
58
+ }), /* @__PURE__ */ u(r, {
59
+ align: "inline-end",
60
+ "aria-hidden": !0,
61
+ children: _.percentSuffix
62
+ })]
63
+ }),
64
+ /* @__PURE__ */ u(s, {
65
+ fieldId: b,
66
+ error: m.share.error
67
+ })
68
+ ] }),
69
+ /* @__PURE__ */ d("div", {
70
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
71
+ children: [/* @__PURE__ */ u(o, {
72
+ variant: "body2",
73
+ className: "ttw:text-foreground",
74
+ children: m.summary
75
+ }), /* @__PURE__ */ d(o, {
76
+ variant: "body2",
77
+ className: "ttw:text-muted-foreground",
78
+ children: [
79
+ _.applicantDetailsSourceNote,
80
+ " ",
81
+ /* @__PURE__ */ u(t, {
82
+ type: "button",
83
+ variant: "link",
84
+ onClick: h,
85
+ disabled: g,
86
+ className: "ttw:h-auto ttw:p-0 ttw:align-baseline",
87
+ children: _.editPersonalDetails
88
+ })
89
+ ]
90
+ })]
91
+ }),
92
+ /* @__PURE__ */ d("div", {
93
+ className: "ttw:flex ttw:justify-end ttw:gap-3",
94
+ children: [/* @__PURE__ */ u(t, {
95
+ type: "button",
96
+ variant: "outline",
97
+ onClick: m.onCancel,
98
+ disabled: g,
99
+ children: _.cancel
100
+ }), /* @__PURE__ */ u(t, {
101
+ type: "button",
102
+ onClick: m.onSave,
103
+ disabled: g || !m.isValid,
104
+ "data-testid": v?.saveButton,
105
+ children: _.saveOwnerSubmit
106
+ })]
107
+ })
108
+ ]
109
+ });
110
+ }
111
+ export { p as ApplicantOwnerInlineEditor };