@tesouro/embedded-components-react 0.7.16 → 0.7.18

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 (46) hide show
  1. package/README.md +14 -14
  2. package/dist/index.css +9 -12
  3. package/dist/index.d.ts +70 -19
  4. package/dist/lib/CounterpartsWidget.d.ts +49 -6
  5. package/dist/lib/CounterpartsWidgetPublic.d.ts +49 -6
  6. package/dist/lib/CustomersWidget.d.ts +49 -6
  7. package/dist/lib/LinkedAccountsWidget.d.ts +20 -12
  8. package/dist/lib/WidgetSuite.d.ts +20 -12
  9. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +2 -1
  10. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +18 -13
  11. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +146 -137
  12. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsSheetView.js +56 -55
  13. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +108 -77
  14. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +181 -25
  15. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +50 -7
  17. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +127 -596
  18. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js +66 -0
  19. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index6.js +210 -0
  20. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +520 -0
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +2 -1
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useInvoicesFilter.js +10 -7
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +1 -0
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +141 -125
  26. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/forms.js +2 -1
  27. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/labels.js +11 -1
  28. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/summary.js +22 -0
  29. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +182 -162
  30. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/mocks/linkedAccounts.js +1 -0
  31. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index10.js +36 -86
  32. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index11.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index12.js +17 -23
  34. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js +6 -6
  35. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index15.js +14 -17
  36. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index16.js +3 -6
  37. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index5.js +168 -35
  38. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index6.js +70 -83
  39. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index7.js +11 -112
  40. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index8.js +6 -12
  41. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index9.js +82 -7
  42. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +11 -11
  43. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +7 -7
  44. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +1 -8
  45. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  46. package/package.json +1 -1
@@ -1,40 +1,34 @@
1
- import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { Link as t } from "../../../shared/ui/dist/lib/Link/Link.js";
1
+ import { Link as e } from "../../../shared/ui/dist/lib/Link/Link.js";
3
2
  import "../../../shared/ui/dist/index.js";
4
- import { FeaturedIcon as n } from "./index2.js";
5
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
- import { ArrowLeftRight as a, ExternalLink as o, PlusIcon as s } from "lucide-react";
3
+ import { FeaturedIcon as t } from "./index2.js";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { ArrowLeftRight as i, ExternalLink as a } from "lucide-react";
7
6
  //#region ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index12.js
8
- function c({ labels: c, learnMoreUrl: l, canConnect: u = !0, isActionDisabled: d, connectButtonTestId: f, onAdd: p }) {
9
- return /* @__PURE__ */ i("div", {
7
+ function o({ labels: o, learnMoreUrl: s, testId: c }) {
8
+ return /* @__PURE__ */ r("div", {
9
+ "data-testid": c,
10
10
  className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-3 ttw:p-8 ttw:text-center",
11
11
  children: [
12
- /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(a, { className: "ttw:size-5 ttw:text-foreground" }) }),
13
- /* @__PURE__ */ i("div", {
12
+ /* @__PURE__ */ n(t, { children: /* @__PURE__ */ n(i, { className: "ttw:size-5 ttw:text-foreground" }) }),
13
+ /* @__PURE__ */ r("div", {
14
14
  className: "ttw:flex ttw:max-w-150 ttw:flex-col ttw:items-center ttw:gap-1.5",
15
- children: [/* @__PURE__ */ r("p", {
15
+ children: [/* @__PURE__ */ n("p", {
16
16
  className: "ttw:text-lg ttw:font-semibold ttw:text-foreground",
17
- children: c.emptyTitle
18
- }), /* @__PURE__ */ r("p", {
17
+ children: o.emptyTitle
18
+ }), /* @__PURE__ */ n("p", {
19
19
  className: "ttw:text-sm ttw:text-muted-foreground",
20
- children: c.emptyDescription
20
+ children: o.emptyDescription
21
21
  })]
22
22
  }),
23
- u && /* @__PURE__ */ i(e, {
24
- disabled: d,
25
- "data-testid": f,
26
- onClick: p,
27
- children: [/* @__PURE__ */ r(s, {}), c.connectButton]
28
- }),
29
- l && /* @__PURE__ */ i(t, {
30
- href: l,
23
+ s && /* @__PURE__ */ r(e, {
24
+ href: s,
31
25
  target: "_blank",
32
26
  rel: "noopener noreferrer",
33
27
  className: "ttw:inline-flex ttw:items-center ttw:gap-1.5 ttw:text-sm ttw:font-medium ttw:text-foreground ttw:hover:underline ttw:hover:underline-offset-2 ttw:[&_svg]:size-4",
34
- children: [c.learnMoreButton, /* @__PURE__ */ r(o, {})]
28
+ children: [o.learnMoreButton, /* @__PURE__ */ n(a, {})]
35
29
  })
36
30
  ]
37
31
  });
38
32
  }
39
33
  //#endregion
40
- export { c as EmptyState };
34
+ export { o as EmptyState };
@@ -2,9 +2,9 @@ import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, D
2
2
  import { InlineErrorAlert as s } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
3
3
  import "../../../shared/ui/dist/index.js";
4
4
  import { FeaturedIcon as c } from "./index2.js";
5
- import { linkedAccountsWidgetUiTestIds as l } from "./index9.js";
6
- import { TextInput as u } from "./index5.js";
7
- import { DialogFeaturedIcon as d } from "./index8.js";
5
+ import { linkedAccountsWidgetUiTestIds as l } from "./index8.js";
6
+ import { DialogFeaturedIcon as u } from "./index7.js";
7
+ import { TextInput as d } from "./index10.js";
8
8
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
9
9
  import { ArrowLeftIcon as h, ArrowRightIcon as g, CheckIcon as _, LinkIcon as v } from "lucide-react";
10
10
  //#region ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js
@@ -19,7 +19,7 @@ function y({ open: y, labels: b, verifyForm: x, accountName: S, accountNumber: C
19
19
  children: w ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m(a, {
20
20
  className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-3 ttw:px-6 ttw:pb-6 ttw:pt-6 ttw:text-center",
21
21
  children: [
22
- /* @__PURE__ */ p(d, {
22
+ /* @__PURE__ */ p(u, {
23
23
  variant: "success",
24
24
  children: /* @__PURE__ */ p(_, { className: "ttw:size-5" })
25
25
  }),
@@ -81,7 +81,7 @@ function y({ open: y, labels: b, verifyForm: x, accountName: S, accountNumber: C
81
81
  b.verifyExampleText
82
82
  ]
83
83
  }),
84
- /* @__PURE__ */ p(u, {
84
+ /* @__PURE__ */ p(d, {
85
85
  id: "linked-account-first-amount",
86
86
  label: b.firstAmountLabel,
87
87
  value: x.firstAmount,
@@ -94,7 +94,7 @@ function y({ open: y, labels: b, verifyForm: x, accountName: S, accountNumber: C
94
94
  firstAmount: e
95
95
  })
96
96
  }),
97
- /* @__PURE__ */ p(u, {
97
+ /* @__PURE__ */ p(d, {
98
98
  id: "linked-account-second-amount",
99
99
  label: b.secondAmountLabel,
100
100
  value: x.secondAmount,
@@ -1,16 +1,21 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index15.js
2
2
  var e = {
3
- title: "Linked Accounts",
3
+ title: "Linked accounts",
4
4
  connectButton: "Add external account",
5
5
  verifyCtaButton: "Click here to verify",
6
6
  learnMoreButton: "Learn more about linked accounts",
7
7
  connectTitle: "Link Account",
8
8
  nicknameLabel: "Account nickname",
9
- accountNumberLabel: "Account Number",
10
- routingNumberLabel: "Routing Number",
9
+ accountNumberLabel: "Account number",
10
+ routingNumberLabel: "Routing number",
11
11
  routingNumberError: "Routing number must be a valid 9-digit ABA routing number.",
12
+ nicknamePlaceholder: "e.g. Operating account",
13
+ holderTypeLabel: "Who owns this account?",
14
+ personalOption: "Personal",
15
+ personalOptionDescription: "Owned by an individual",
16
+ businessOption: "Business",
17
+ businessOptionDescription: "Owned by a company or organization",
12
18
  typeLabel: "Account type",
13
- accountTypePlaceholder: "Select account type",
14
19
  checkingOption: "Checking",
15
20
  savingsOption: "Savings",
16
21
  cancelButton: "Cancel",
@@ -18,27 +23,19 @@ var e = {
18
23
  backButton: "Back",
19
24
  stepIndicator: "Step {current}/{total}",
20
25
  connectStep1Heading: "Enter your bank details",
21
- connectStep1Description: "To link your account, start by entering your account number and routing number below:",
26
+ connectStep1Description: "Tell us about the account you're linking, then enter its routing and account numbers.",
22
27
  connectStep2Heading: "Set team member access",
23
28
  connectStep2Description: "Who from your team should have access to manage/view this external account?",
24
29
  teamMemberAccessTooltip: "Members with access can view and manage this external account.",
25
30
  teamMembersLoadingLabel: "Loading team members",
26
31
  teamMembersErrorTitle: "Unable to load team members",
27
32
  teamMembersEmptyLabel: "No additional team members to add.",
28
- summaryCompletedHeading: "Completed items",
33
+ summaryTitle: "Verification deposits sent",
34
+ summaryAccountAddedTitle: "Account added",
29
35
  summaryNextStepsHeading: "Next steps",
30
36
  summaryAccountPrefix: "Account",
31
- summaryStep1Title: "Step 1: Enter your bank details",
32
- summaryStep1Description: "We will generate two small deposits to account:",
33
- summaryStep2Title: "Step 2: Configure user permissions",
34
- summaryStep2Description: "These users will have access to manage/view this external account.",
35
- summaryStep3Title: "Step 3: Wait for two small deposits",
36
- summaryStep3Description: "Please check that account in 1-2 business days to confirm the amounts of the two deposits.",
37
- summaryStep4Title: "Step 4: Verify your deposits",
38
- summaryStep4Description: "Verify the amounts of those two deposits in the Transfers section here to complete the linking process.",
39
- statusComplete: "Complete",
40
- statusTodo: "To Do",
41
37
  backToTransfersButton: "Back to Transfers",
38
+ doneButton: "Done",
42
39
  saveButton: "Save account",
43
40
  editButton: "Edit",
44
41
  verifyButton: "Verify this account",
@@ -63,7 +60,7 @@ var e = {
63
60
  errorTitle: "Unable to load linked accounts",
64
61
  actionErrorTitle: "Unable to update linked account",
65
62
  emptyTitle: "No Linked Accounts Yet",
66
- emptyDescription: "No external accounts have been linked yet. Click the Add External Account button to link your first account."
63
+ emptyDescription: "No external accounts have been linked yet."
67
64
  };
68
65
  //#endregion
69
66
  export { e as DEFAULT_LABELS };
@@ -7,8 +7,8 @@ import { WidgetTitleWithIconAndChildren as n } from "../../../shared/ui/dist/lib
7
7
  import "../../../shared/ui/dist/index.js";
8
8
  import { DEFAULT_LABELS as r } from "./index15.js";
9
9
  import { AccountRow as i } from "./index3.js";
10
- import { linkedAccountsWidgetUiTestIds as a } from "./index9.js";
11
- import { ConnectAccountDialog as o } from "./index10.js";
10
+ import { linkedAccountsWidgetUiTestIds as a } from "./index8.js";
11
+ import { ConnectAccountDialog as o } from "./index9.js";
12
12
  import { EditAccountDialog as s } from "./index11.js";
13
13
  import { EmptyState as c } from "./index12.js";
14
14
  import { UnlinkAccountDialog as l } from "./index13.js";
@@ -63,10 +63,7 @@ function h({ labels: h, rows: g, isLoading: _ = !1, isError: v = !1, isConnectOp
63
63
  !_ && !v && g.length === 0 && /* @__PURE__ */ f(c, {
64
64
  labels: $,
65
65
  learnMoreUrl: A,
66
- canConnect: T,
67
- isActionDisabled: w,
68
- connectButtonTestId: a.emptyStateConnectAccountButton,
69
- onAdd: () => Y(!0)
66
+ testId: a.emptyState
70
67
  }),
71
68
  !_ && !v && g.map((e, t) => /* @__PURE__ */ f(i, {
72
69
  row: e,
@@ -1,40 +1,173 @@
1
- import { Input as e, Label as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
1
+ import { Input as e, Label as t, RadioGroup as n, RadioGroupItem as r, cn as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
3
  //#region ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index5.js
4
- function i({ id: i, label: a, value: o, disabled: s = !1, readOnly: c = !1, required: l = !1, error: u = !1, errorMessage: d, maxLength: f, inputMode: p, onChange: m }) {
5
- let h = d ? `${i}-error` : void 0;
6
- return /* @__PURE__ */ r("div", {
7
- className: "ttw:space-y-1",
8
- children: [/* @__PURE__ */ r("div", {
9
- className: "ttw:relative",
10
- children: [/* @__PURE__ */ n(e, {
11
- id: i,
12
- placeholder: " ",
13
- disabled: s,
14
- readOnly: c,
15
- required: l,
16
- "aria-invalid": u || void 0,
17
- "aria-describedby": u ? h : void 0,
18
- value: o,
19
- maxLength: f,
20
- inputMode: p,
21
- onChange: (e) => m?.(e.target.value),
22
- className: "ttw:peer ttw:h-auto ttw:min-h-12 ttw:rounded-xl ttw:px-3 ttw:pt-5 ttw:pb-1 ttw:text-base ttw:leading-6 ttw:placeholder:text-transparent"
23
- }), /* @__PURE__ */ r(t, {
24
- htmlFor: i,
25
- className: `ttw:pointer-events-none ttw:absolute ttw:top-1.5 ttw:left-3 ttw:gap-0.5 ttw:font-normal ttw:text-xs ttw:transition-all ttw:peer-placeholder-shown:top-1/2 ttw:peer-placeholder-shown:-translate-y-1/2 ttw:peer-placeholder-shown:text-base ttw:peer-focus:top-1.5 ttw:peer-focus:translate-y-0 ttw:peer-focus:text-xs ${u ? "ttw:text-destructive" : "ttw:text-muted-foreground"}`,
26
- children: [a, l && /* @__PURE__ */ n("span", {
27
- className: "ttw:text-destructive",
28
- "aria-hidden": "true",
29
- children: "*"
30
- })]
31
- })]
32
- }), u && d && /* @__PURE__ */ n("p", {
33
- id: h,
34
- className: "ttw:text-xs ttw:text-destructive",
35
- children: d
4
+ function s() {
5
+ return /* @__PURE__ */ a("span", {
6
+ className: "ttw:text-destructive",
7
+ "aria-hidden": "true",
8
+ children: "*"
9
+ });
10
+ }
11
+ function c({ id: e, label: c, value: l, options: u, disabled: d, onValueChange: f }) {
12
+ let p = `${e}-label`;
13
+ return /* @__PURE__ */ o("div", {
14
+ className: "ttw:space-y-2",
15
+ children: [/* @__PURE__ */ o("p", {
16
+ id: p,
17
+ className: "ttw:flex ttw:gap-0.5 ttw:text-sm ttw:font-medium ttw:text-foreground",
18
+ children: [c, /* @__PURE__ */ a(s, {})]
19
+ }), /* @__PURE__ */ a(n, {
20
+ "aria-labelledby": p,
21
+ "aria-required": !0,
22
+ value: l,
23
+ disabled: d,
24
+ onValueChange: (e) => f(e),
25
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-3",
26
+ children: u.map((n) => {
27
+ let s = `${e}-${n.value}`, c = l === n.value;
28
+ return /* @__PURE__ */ o(t, {
29
+ htmlFor: s,
30
+ className: i("ttw:flex ttw:h-full ttw:cursor-pointer ttw:items-start ttw:gap-3 ttw:rounded-xl ttw:border ttw:p-4 ttw:font-normal", c ? "ttw:border-primary ttw:bg-primary/10" : "ttw:border-border ttw:bg-card"),
31
+ children: [/* @__PURE__ */ a(r, {
32
+ id: s,
33
+ value: n.value,
34
+ className: "ttw:mt-0.5"
35
+ }), /* @__PURE__ */ o("span", {
36
+ className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-0.5",
37
+ children: [/* @__PURE__ */ a("span", {
38
+ className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
39
+ children: n.title
40
+ }), n.description && /* @__PURE__ */ a("span", {
41
+ className: "ttw:text-sm ttw:leading-normal ttw:text-muted-foreground",
42
+ children: n.description
43
+ })]
44
+ })]
45
+ }, n.value);
46
+ })
36
47
  })]
37
48
  });
38
49
  }
50
+ function l({ id: n, label: r, value: c, disabled: l, placeholder: u, error: d = !1, errorMessage: f, maxLength: p, inputMode: m, onChange: h }) {
51
+ let g = `${n}-error`;
52
+ return /* @__PURE__ */ o("div", {
53
+ className: "ttw:space-y-2",
54
+ children: [
55
+ /* @__PURE__ */ o(t, {
56
+ htmlFor: n,
57
+ className: i("ttw:gap-0.5 ttw:text-sm ttw:font-medium", d ? "ttw:text-destructive" : "ttw:text-foreground"),
58
+ children: [r, /* @__PURE__ */ a(s, {})]
59
+ }),
60
+ /* @__PURE__ */ a(e, {
61
+ id: n,
62
+ value: c,
63
+ disabled: l,
64
+ required: !0,
65
+ placeholder: u,
66
+ "aria-invalid": d || void 0,
67
+ "aria-describedby": d && f ? g : void 0,
68
+ maxLength: p,
69
+ inputMode: m,
70
+ onChange: (e) => h(e.target.value),
71
+ className: "ttw:h-12 ttw:rounded-xl ttw:px-3 ttw:text-base"
72
+ }),
73
+ d && f && /* @__PURE__ */ a("p", {
74
+ id: g,
75
+ className: "ttw:text-xs ttw:text-destructive",
76
+ children: f
77
+ })
78
+ ]
79
+ });
80
+ }
81
+ function u({ labels: e, connectForm: t, disabled: n, routingNumberError: r = !1, onConnectFormChange: i }) {
82
+ let s = [{
83
+ value: "personal",
84
+ title: e.personalOption,
85
+ description: e.personalOptionDescription
86
+ }, {
87
+ value: "business",
88
+ title: e.businessOption,
89
+ description: e.businessOptionDescription
90
+ }], u = [{
91
+ value: "CHECKING",
92
+ title: e.checkingOption
93
+ }, {
94
+ value: "SAVINGS",
95
+ title: e.savingsOption
96
+ }];
97
+ return /* @__PURE__ */ o("div", {
98
+ className: "ttw:space-y-5",
99
+ children: [
100
+ /* @__PURE__ */ o("div", {
101
+ className: "ttw:space-y-1",
102
+ children: [/* @__PURE__ */ a("h3", {
103
+ className: "ttw:text-base ttw:font-semibold ttw:text-primary",
104
+ children: e.connectStep1Heading
105
+ }), /* @__PURE__ */ a("p", {
106
+ className: "ttw:text-sm ttw:text-muted-foreground",
107
+ children: e.connectStep1Description
108
+ })]
109
+ }),
110
+ /* @__PURE__ */ a(c, {
111
+ id: "linked-account-holder-type",
112
+ label: e.holderTypeLabel,
113
+ value: t.accountHolderType,
114
+ options: s,
115
+ disabled: n,
116
+ onValueChange: (e) => i({
117
+ ...t,
118
+ accountHolderType: e
119
+ })
120
+ }),
121
+ /* @__PURE__ */ a(c, {
122
+ id: "linked-account-type",
123
+ label: e.typeLabel,
124
+ value: t.type,
125
+ options: u,
126
+ disabled: n,
127
+ onValueChange: (e) => i({
128
+ ...t,
129
+ type: e
130
+ })
131
+ }),
132
+ /* @__PURE__ */ a(l, {
133
+ id: "linked-account-nickname",
134
+ label: e.nicknameLabel,
135
+ value: t.nickname,
136
+ placeholder: e.nicknamePlaceholder,
137
+ disabled: n,
138
+ onChange: (e) => i({
139
+ ...t,
140
+ nickname: e
141
+ })
142
+ }),
143
+ /* @__PURE__ */ o("div", {
144
+ className: "ttw:grid ttw:grid-cols-2 ttw:items-start ttw:gap-3",
145
+ children: [/* @__PURE__ */ a(l, {
146
+ id: "linked-account-routing",
147
+ label: e.routingNumberLabel,
148
+ value: t.routingNumber,
149
+ disabled: n,
150
+ error: r,
151
+ errorMessage: e.routingNumberError,
152
+ maxLength: 9,
153
+ inputMode: "numeric",
154
+ onChange: (e) => i({
155
+ ...t,
156
+ routingNumber: e
157
+ })
158
+ }), /* @__PURE__ */ a(l, {
159
+ id: "linked-account-number",
160
+ label: e.accountNumberLabel,
161
+ value: t.accountNumber,
162
+ disabled: n,
163
+ onChange: (e) => i({
164
+ ...t,
165
+ accountNumber: e
166
+ })
167
+ })]
168
+ })
169
+ ]
170
+ });
171
+ }
39
172
  //#endregion
40
- export { i as TextInput };
173
+ export { u as ConnectStepDetails };
@@ -1,90 +1,77 @@
1
- import { Label as e, Select as t, SelectContent as n, SelectItem as r, SelectTrigger as i, SelectValue as a } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { TextInput as o } from "./index5.js";
3
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
1
+ import { Button as e, DialogDescription as t, DialogFooter as n, DialogHeader as r, DialogTitle as i, cn as a } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
3
+ import { CheckIcon as l } from "lucide-react";
4
4
  //#region ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index6.js
5
- function l({ labels: l, connectForm: u, disabled: d, routingNumberError: f = !1, onConnectFormChange: p }) {
6
- return /* @__PURE__ */ c("div", {
7
- className: "ttw:space-y-4",
8
- children: [
9
- /* @__PURE__ */ c("div", {
10
- className: "ttw:space-y-1",
11
- children: [/* @__PURE__ */ s("h3", {
12
- className: "ttw:text-base ttw:font-semibold ttw:text-primary",
13
- children: l.connectStep1Heading
14
- }), /* @__PURE__ */ s("p", {
5
+ function u({ parts: e }) {
6
+ return e.map((e, t) => /* @__PURE__ */ s("span", {
7
+ className: a(e.emphasized && "ttw:font-semibold ttw:text-foreground"),
8
+ children: e.text
9
+ }, t));
10
+ }
11
+ function d({ labels: d, summary: f, onDone: p }) {
12
+ let { nextSteps: m } = f;
13
+ return /* @__PURE__ */ c(o, { children: [
14
+ /* @__PURE__ */ c(r, {
15
+ className: "ttw:flex ttw:flex-row ttw:items-start ttw:gap-4 ttw:px-6 ttw:pb-5 ttw:pt-6 ttw:pr-12 ttw:text-left",
16
+ children: [/* @__PURE__ */ s("div", {
17
+ className: "ttw:flex ttw:size-10 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-emerald-100 ttw:text-emerald-700",
18
+ children: /* @__PURE__ */ s(l, {
19
+ className: "ttw:size-5",
20
+ "aria-hidden": "true"
21
+ })
22
+ }), /* @__PURE__ */ c("div", {
23
+ className: "ttw:min-w-0 ttw:space-y-1",
24
+ children: [/* @__PURE__ */ s(i, {
25
+ className: "ttw:text-lg",
26
+ children: f.variant === "deposits-sent" ? d.summaryTitle : d.summaryAccountAddedTitle
27
+ }), /* @__PURE__ */ s(t, {
15
28
  className: "ttw:text-sm ttw:text-muted-foreground",
16
- children: l.connectStep1Description
29
+ children: /* @__PURE__ */ s(u, { parts: f.description })
17
30
  })]
18
- }),
19
- /* @__PURE__ */ c("div", {
20
- className: "ttw:relative",
21
- children: [/* @__PURE__ */ c(t, {
22
- value: u.type || void 0,
23
- disabled: d,
24
- onValueChange: (e) => p({
25
- ...u,
26
- type: e
27
- }),
28
- children: [/* @__PURE__ */ s(i, {
29
- id: "linked-account-type",
30
- className: "ttw:h-auto ttw:min-h-12 ttw:w-full ttw:rounded-xl ttw:px-3 ttw:pt-5 ttw:pb-1 ttw:text-base ttw:data-[size=default]:h-auto",
31
- children: /* @__PURE__ */ s(a, { placeholder: l.accountTypePlaceholder })
32
- }), /* @__PURE__ */ c(n, { children: [/* @__PURE__ */ s(r, {
33
- value: "CHECKING",
34
- children: l.checkingOption
35
- }), /* @__PURE__ */ s(r, {
36
- value: "SAVINGS",
37
- children: l.savingsOption
38
- })] })]
39
- }), /* @__PURE__ */ c(e, {
40
- htmlFor: "linked-account-type",
41
- className: "ttw:pointer-events-none ttw:absolute ttw:top-1.5 ttw:left-3 ttw:gap-0.5 ttw:font-normal ttw:text-xs ttw:text-muted-foreground",
42
- children: [l.typeLabel, /* @__PURE__ */ s("span", {
43
- className: "ttw:text-destructive",
44
- "aria-hidden": "true",
45
- children: "*"
31
+ })]
32
+ }),
33
+ m.length > 0 && /* @__PURE__ */ c("div", {
34
+ className: "ttw:min-h-0 ttw:flex-1 ttw:space-y-4 ttw:overflow-y-auto ttw:border-t ttw:border-border ttw:px-6 ttw:py-5",
35
+ children: [/* @__PURE__ */ s("h3", {
36
+ className: "ttw:text-xs ttw:font-semibold ttw:uppercase ttw:tracking-wide ttw:text-muted-foreground",
37
+ children: d.summaryNextStepsHeading
38
+ }), /* @__PURE__ */ s("ol", { children: m.map((e, t) => {
39
+ let n = t === m.length - 1;
40
+ return /* @__PURE__ */ c("li", {
41
+ className: "ttw:flex ttw:gap-3",
42
+ children: [/* @__PURE__ */ c("div", {
43
+ className: "ttw:flex ttw:flex-col ttw:items-center",
44
+ children: [/* @__PURE__ */ s("span", {
45
+ className: "ttw:flex ttw:size-6 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:border ttw:border-border ttw:bg-background ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
46
+ children: t + 1
47
+ }), !n && /* @__PURE__ */ s("span", {
48
+ className: "ttw:my-1 ttw:w-px ttw:flex-1 ttw:bg-border",
49
+ "aria-hidden": "true"
50
+ })]
51
+ }), /* @__PURE__ */ c("div", {
52
+ className: a("ttw:min-w-0 ttw:flex-1 ttw:space-y-0.5 ttw:pt-0.5", !n && "ttw:pb-5"),
53
+ children: [/* @__PURE__ */ s("p", {
54
+ className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
55
+ children: e.title
56
+ }), /* @__PURE__ */ s("p", {
57
+ className: "ttw:text-sm ttw:text-muted-foreground",
58
+ children: /* @__PURE__ */ s(u, { parts: e.description })
59
+ })]
46
60
  })]
47
- })]
48
- }),
49
- /* @__PURE__ */ s(o, {
50
- id: "linked-account-nickname",
51
- label: l.nicknameLabel,
52
- value: u.nickname,
53
- disabled: d,
54
- required: !0,
55
- onChange: (e) => p({
56
- ...u,
57
- nickname: e
58
- })
59
- }),
60
- /* @__PURE__ */ s(o, {
61
- id: "linked-account-number",
62
- label: l.accountNumberLabel,
63
- value: u.accountNumber,
64
- disabled: d,
65
- required: !0,
66
- onChange: (e) => p({
67
- ...u,
68
- accountNumber: e
69
- })
70
- }),
71
- /* @__PURE__ */ s(o, {
72
- id: "linked-account-routing",
73
- label: l.routingNumberLabel,
74
- value: u.routingNumber,
75
- disabled: d,
76
- required: !0,
77
- error: f,
78
- errorMessage: l.routingNumberError,
79
- maxLength: 9,
80
- inputMode: "numeric",
81
- onChange: (e) => p({
82
- ...u,
83
- routingNumber: e
84
- })
61
+ }, e.key);
62
+ }) })]
63
+ }),
64
+ /* @__PURE__ */ s(n, {
65
+ className: "ttw:border-t ttw:border-border ttw:px-6 ttw:pb-6 ttw:pt-4",
66
+ children: /* @__PURE__ */ s(e, {
67
+ type: "button",
68
+ variant: "outline",
69
+ className: "ttw:w-full",
70
+ onClick: p,
71
+ children: d.doneButton
85
72
  })
86
- ]
87
- });
73
+ })
74
+ ] });
88
75
  }
89
76
  //#endregion
90
- export { l as ConnectStepDetails };
77
+ export { d as ConnectStepSummary };