@tesouro/embedded-components-react 0.11.60 → 0.11.61

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 (65) hide show
  1. package/README.md +21 -21
  2. package/dist/index.css +37 -160
  3. package/dist/index.d.ts +50 -17
  4. package/dist/lib/BankAccountsWidget.d.ts +20 -7
  5. package/dist/lib/LinkedAccountsWidget.d.ts +30 -10
  6. package/dist/lib/WidgetSuite.d.ts +50 -17
  7. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index.js +5 -5
  8. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +21 -26
  9. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +18 -16
  10. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index5.js +22 -35
  11. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index6.js +29 -14
  12. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index7.js +20 -24
  13. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index8.js +31 -0
  14. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index.js +2 -2
  15. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index10.js +296 -0
  16. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index12.js +1 -0
  17. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index5.js +5 -10
  18. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +42 -281
  19. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index.js +5 -3
  20. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index10.js +180 -0
  21. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index2.js +16 -184
  22. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index3.js +9 -93
  23. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index4.js +136 -81
  24. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index5.js +64 -101
  25. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index6.js +54 -81
  26. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index7.js +90 -65
  27. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +108 -183
  28. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index9.js +76 -0
  29. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/BankAccountsWidget/BankAccountsWidget.js +1 -1
  30. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/labels.js +6 -8
  31. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +137 -120
  32. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/mocks/labels.js +5 -5
  33. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js +47 -60
  34. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +71 -72
  35. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankingHeader.js +22 -37
  36. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/CreateAccountDialog.js +119 -133
  37. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +12 -8
  38. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/LinkedAccountsWidget.js +1 -1
  39. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/labels.js +9 -7
  40. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/rows.js +46 -27
  41. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useAdminEligibleUserIds.js +3 -2
  42. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +248 -224
  43. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/mocks/labels.js +5 -5
  44. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index.js +2 -2
  45. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index10.js +22 -36
  46. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index11.js +23 -70
  47. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index12.js +91 -27
  48. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index13.js +80 -63
  49. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js +145 -125
  50. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index2.js +61 -9
  51. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index3.js +77 -50
  52. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index4.js +180 -65
  53. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index5.js +22 -178
  54. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index6.js +6 -75
  55. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index7.js +48 -11
  56. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index8.js +45 -7
  57. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index9.js +8 -82
  58. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  59. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +15 -14
  60. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AddTile/AddTile.js +17 -0
  61. package/dist/packages/shared-ui-shadcn/dist/index.js +3603 -3518
  62. package/package.json +1 -1
  63. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index11.js +0 -1
  64. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index15.js +0 -67
  65. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index16.js +0 -138
@@ -1,79 +1,194 @@
1
- import { Skeleton as e, Switch as t, Tooltip as n, TooltipContent as r, TooltipProvider as i, TooltipTrigger as a } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { InlineErrorAlert as o } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
3
- import "../../../shared/ui/dist/index.js";
1
+ import { FieldRequirement as e, Heading as t, Input as n, Label as r, RadioGroup as i, RadioGroupItem as a, cn as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
4
2
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
5
- import { HelpCircleIcon as l } from "lucide-react";
6
3
  // ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index4.js
7
- function u({ labels: u, rows: d, grantedCount: f, isLoading: p, isError: m }) {
4
+ function l({ id: e, message: t }) {
5
+ return t ? /* @__PURE__ */ s("p", {
6
+ id: e,
7
+ className: "ttw:text-sm ttw:text-destructive",
8
+ children: t
9
+ }) : null;
10
+ }
11
+ function u({ id: t, label: n, value: u, options: d, disabled: f, error: p, onValueChange: m }) {
12
+ let h = `${t}-label`, g = `${t}-error`, _ = d.every((e) => e.description);
13
+ return /* @__PURE__ */ c("div", {
14
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
15
+ children: [
16
+ /* @__PURE__ */ s(r, {
17
+ id: h,
18
+ requirement: e.Required,
19
+ children: n
20
+ }),
21
+ /* @__PURE__ */ s(i, {
22
+ "aria-labelledby": h,
23
+ "aria-describedby": p ? g : void 0,
24
+ "aria-required": !0,
25
+ "aria-invalid": p ? !0 : void 0,
26
+ value: u,
27
+ disabled: f,
28
+ onValueChange: (e) => m(e),
29
+ className: _ ? "ttw:grid ttw:grid-cols-2 ttw:gap-3" : "ttw:flex ttw:flex-wrap ttw:gap-6",
30
+ children: d.map((e) => {
31
+ let n = `${t}-${e.value}`, i = u === e.value;
32
+ return /* @__PURE__ */ c(r, {
33
+ htmlFor: n,
34
+ className: o("ttw:flex ttw:cursor-pointer ttw:items-start ttw:gap-3 ttw:font-normal", _ && "ttw:h-full ttw:rounded-lg ttw:border ttw:p-4", _ && (p ? "ttw:border-destructive ttw:bg-card" : i ? "ttw:border-primary ttw:bg-primary/10" : "ttw:border-border ttw:bg-card")),
35
+ children: [/* @__PURE__ */ s(a, {
36
+ id: n,
37
+ value: e.value,
38
+ "aria-invalid": p ? !0 : void 0
39
+ }), /* @__PURE__ */ c("span", {
40
+ className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-1",
41
+ children: [/* @__PURE__ */ s("span", {
42
+ className: o("ttw:text-sm ttw:text-foreground", _ && "ttw:font-semibold"),
43
+ children: e.title
44
+ }), e.description ? /* @__PURE__ */ s("span", {
45
+ className: "ttw:text-sm ttw:text-muted-foreground",
46
+ children: e.description
47
+ }) : null]
48
+ })]
49
+ }, e.value);
50
+ })
51
+ }),
52
+ /* @__PURE__ */ s(l, {
53
+ id: g,
54
+ message: p
55
+ })
56
+ ]
57
+ });
58
+ }
59
+ function d({ id: t, label: i, value: a, disabled: o, placeholder: u, error: d, maxLength: f, inputMode: p, onChange: m }) {
60
+ let h = `${t}-error`;
61
+ return /* @__PURE__ */ c("div", {
62
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
63
+ children: [
64
+ /* @__PURE__ */ s(r, {
65
+ htmlFor: t,
66
+ requirement: e.Required,
67
+ children: i
68
+ }),
69
+ /* @__PURE__ */ s(n, {
70
+ id: t,
71
+ value: a,
72
+ disabled: o,
73
+ required: !0,
74
+ placeholder: u,
75
+ "aria-invalid": d ? !0 : void 0,
76
+ "aria-describedby": d ? h : void 0,
77
+ maxLength: f,
78
+ inputMode: p,
79
+ onChange: (e) => m(e.target.value)
80
+ }),
81
+ /* @__PURE__ */ s(l, {
82
+ id: h,
83
+ message: d
84
+ })
85
+ ]
86
+ });
87
+ }
88
+ function f({ labels: e, connectForm: n, disabled: r, routingNumberError: i = !1, isRequiredErrorVisible: a = !1, onConnectFormChange: o }) {
89
+ let l = (e, t) => a && e.trim() === "" ? t : void 0, f = [{
90
+ value: "personal",
91
+ title: e.personalOption,
92
+ description: e.personalOptionDescription
93
+ }, {
94
+ value: "business",
95
+ title: e.businessOption,
96
+ description: e.businessOptionDescription
97
+ }], p = [{
98
+ value: "CHECKING",
99
+ title: e.checkingOption
100
+ }, {
101
+ value: "SAVINGS",
102
+ title: e.savingsOption
103
+ }];
8
104
  return /* @__PURE__ */ c("div", {
9
- className: "ttw:space-y-4",
105
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
10
106
  children: [
11
107
  /* @__PURE__ */ c("div", {
12
- className: "ttw:space-y-1",
13
- children: [/* @__PURE__ */ s("h3", {
14
- className: "ttw:text-base ttw:font-semibold ttw:text-primary",
15
- children: `${u.connectStep2Heading} (${f})`
108
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
109
+ children: [/* @__PURE__ */ s(t, {
110
+ variant: "subsection",
111
+ level: 3,
112
+ children: e.connectStep1Heading
16
113
  }), /* @__PURE__ */ s("p", {
17
114
  className: "ttw:text-sm ttw:text-muted-foreground",
18
- children: u.connectStep2Description
115
+ children: e.connectStep1Description
19
116
  })]
20
117
  }),
21
- p && /* @__PURE__ */ c("div", {
22
- "aria-label": u.teamMembersLoadingLabel,
23
- className: "ttw:space-y-3",
24
- children: [
25
- /* @__PURE__ */ s(e, {
26
- height: 40,
27
- width: "100%"
28
- }),
29
- /* @__PURE__ */ s(e, {
30
- height: 40,
31
- width: "100%"
32
- }),
33
- /* @__PURE__ */ s(e, {
34
- height: 40,
35
- width: "100%"
36
- })
37
- ]
118
+ /* @__PURE__ */ s(u, {
119
+ id: "linked-account-holder-type",
120
+ label: e.holderTypeLabel,
121
+ value: n.accountHolderType,
122
+ options: f,
123
+ disabled: r,
124
+ error: l(n.accountHolderType, e.holderTypeRequiredError),
125
+ onValueChange: (e) => o({
126
+ ...n,
127
+ accountHolderType: e
128
+ })
38
129
  }),
39
- !p && m && /* @__PURE__ */ s(o, { children: u.teamMembersErrorTitle }),
40
- !p && !m && d.length === 0 && /* @__PURE__ */ s("p", {
41
- className: "ttw:text-sm ttw:text-muted-foreground",
42
- children: u.teamMembersEmptyLabel
130
+ /* @__PURE__ */ s(u, {
131
+ id: "linked-account-type",
132
+ label: e.typeLabel,
133
+ value: n.type,
134
+ options: p,
135
+ disabled: r,
136
+ error: l(n.type, e.accountTypeRequiredError),
137
+ onValueChange: (e) => o({
138
+ ...n,
139
+ type: e
140
+ })
43
141
  }),
44
- !p && !m && d.length > 0 && /* @__PURE__ */ s(i, { children: /* @__PURE__ */ s("ul", {
45
- className: "ttw:-mr-2 ttw:max-h-72 ttw:space-y-1 ttw:overflow-y-auto ttw:pr-2",
46
- children: d.map((e) => /* @__PURE__ */ c("li", {
47
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:py-2",
48
- children: [/* @__PURE__ */ c("div", {
49
- className: "ttw:min-w-0",
50
- children: [/* @__PURE__ */ s("p", {
51
- className: "ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
52
- children: e.name
53
- }), /* @__PURE__ */ c("div", {
54
- className: "ttw:flex ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-muted-foreground",
55
- children: [/* @__PURE__ */ s("span", {
56
- className: "ttw:truncate",
57
- children: e.role
58
- }), /* @__PURE__ */ c(n, { children: [/* @__PURE__ */ s(a, {
59
- type: "button",
60
- className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-help ttw:text-muted-foreground",
61
- "aria-label": e.roleTooltip,
62
- children: /* @__PURE__ */ s(l, { className: "ttw:size-4" })
63
- }), /* @__PURE__ */ s(r, {
64
- className: "ttw:max-w-60",
65
- children: e.roleTooltip
66
- })] })]
67
- })]
68
- }), /* @__PURE__ */ s(t, {
69
- checked: e.checked,
70
- disabled: e.disabled,
71
- "aria-label": e.name,
72
- onCheckedChange: (t) => e.onToggle(t)
73
- })]
74
- }, e.key))
75
- }) })
142
+ /* @__PURE__ */ s(d, {
143
+ id: "linked-account-name-on-account",
144
+ label: e.nameOnAccountLabel,
145
+ value: n.nameOnAccount,
146
+ disabled: r,
147
+ error: l(n.nameOnAccount, e.legalNameRequiredError),
148
+ onChange: (e) => o({
149
+ ...n,
150
+ nameOnAccount: e
151
+ })
152
+ }),
153
+ /* @__PURE__ */ s(d, {
154
+ id: "linked-account-nickname",
155
+ label: e.nicknameLabel,
156
+ value: n.nickname,
157
+ placeholder: e.nicknamePlaceholder,
158
+ disabled: r,
159
+ error: l(n.nickname, e.nicknameRequiredError),
160
+ onChange: (e) => o({
161
+ ...n,
162
+ nickname: e
163
+ })
164
+ }),
165
+ /* @__PURE__ */ c("div", {
166
+ className: "ttw:grid ttw:grid-cols-2 ttw:items-start ttw:gap-3",
167
+ children: [/* @__PURE__ */ s(d, {
168
+ id: "linked-account-routing",
169
+ label: e.routingNumberLabel,
170
+ value: n.routingNumber,
171
+ disabled: r,
172
+ error: i ? e.routingNumberError : l(n.routingNumber, e.routingNumberRequiredError),
173
+ maxLength: 9,
174
+ inputMode: "numeric",
175
+ onChange: (e) => o({
176
+ ...n,
177
+ routingNumber: e
178
+ })
179
+ }), /* @__PURE__ */ s(d, {
180
+ id: "linked-account-number",
181
+ label: e.accountNumberLabel,
182
+ value: n.accountNumber,
183
+ disabled: r,
184
+ error: l(n.accountNumber, e.accountNumberRequiredError),
185
+ onChange: (e) => o({
186
+ ...n,
187
+ accountNumber: e
188
+ })
189
+ })]
190
+ })
76
191
  ]
77
192
  });
78
193
  }
79
- export { u as ConnectStepAccess };
194
+ export { f as ConnectStepDetails };
@@ -1,182 +1,26 @@
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";
1
+ import { ResultScreen as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ import { CircleCheckIcon as r } from "lucide-react";
3
4
  // ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index5.js
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
- })
47
- })]
48
- });
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
- });
5
+ function i({ parts: e }) {
6
+ return e.map((e, r) => /* @__PURE__ */ n("span", {
7
+ className: t(e.emphasized && "ttw:font-semibold ttw:text-foreground"),
8
+ children: e.text
9
+ }, r));
80
10
  }
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-name-on-account",
134
- label: e.nameOnAccountLabel,
135
- value: t.nameOnAccount,
136
- disabled: n,
137
- onChange: (e) => i({
138
- ...t,
139
- nameOnAccount: e
140
- })
141
- }),
142
- /* @__PURE__ */ a(l, {
143
- id: "linked-account-nickname",
144
- label: e.nicknameLabel,
145
- value: t.nickname,
146
- placeholder: e.nicknamePlaceholder,
147
- disabled: n,
148
- onChange: (e) => i({
149
- ...t,
150
- nickname: e
151
- })
152
- }),
153
- /* @__PURE__ */ o("div", {
154
- className: "ttw:grid ttw:grid-cols-2 ttw:items-start ttw:gap-3",
155
- children: [/* @__PURE__ */ a(l, {
156
- id: "linked-account-routing",
157
- label: e.routingNumberLabel,
158
- value: t.routingNumber,
159
- disabled: n,
160
- error: r,
161
- errorMessage: e.routingNumberError,
162
- maxLength: 9,
163
- inputMode: "numeric",
164
- onChange: (e) => i({
165
- ...t,
166
- routingNumber: e
167
- })
168
- }), /* @__PURE__ */ a(l, {
169
- id: "linked-account-number",
170
- label: e.accountNumberLabel,
171
- value: t.accountNumber,
172
- disabled: n,
173
- onChange: (e) => i({
174
- ...t,
175
- accountNumber: e
176
- })
177
- })]
178
- })
179
- ]
11
+ function a({ labels: t, summary: a, onDone: o }) {
12
+ return /* @__PURE__ */ n(e, {
13
+ icon: /* @__PURE__ */ n(r, {}),
14
+ tone: "success",
15
+ title: a.variant === "deposits-sent" ? t.summaryTitle : t.summaryAccountAddedTitle,
16
+ description: /* @__PURE__ */ n(i, { parts: a.description }),
17
+ steps: a.nextSteps.map((e) => ({
18
+ key: e.key,
19
+ title: e.title,
20
+ description: /* @__PURE__ */ n(i, { parts: e.description })
21
+ })),
22
+ onDone: o,
23
+ labels: { done: t.doneButton }
180
24
  });
181
25
  }
182
- export { u as ConnectStepDetails };
26
+ export { a as ConnectStepSummary };
@@ -1,76 +1,7 @@
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
1
  // ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index6.js
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, {
28
- className: "ttw:text-sm ttw:text-muted-foreground",
29
- children: /* @__PURE__ */ s(u, { parts: f.description })
30
- })]
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
- })]
60
- })]
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
72
- })
73
- })
74
- ] });
75
- }
76
- export { d as ConnectStepSummary };
2
+ var e = {
3
+ connectAccountButton: "linked-accounts-widget-connect-account-button",
4
+ emptyState: "linked-accounts-widget-empty-state",
5
+ connectAccountDialog: "linked-accounts-widget-connect-account-dialog"
6
+ };
7
+ export { e as linkedAccountsWidgetUiTestIds };
@@ -1,14 +1,51 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { FlowDialog as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { linkedAccountsWidgetUiTestIds as t } from "./index6.js";
3
+ import { ConnectStepAccess as n } from "./index3.js";
4
+ import { ConnectStepDetails as r } from "./index4.js";
5
+ import { ConnectStepSummary as i } from "./index5.js";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
7
  // ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index7.js
3
- var t = {
4
- default: "ttw:bg-primary ttw:text-primary-foreground ttw:ring-primary/20",
5
- destructive: "ttw:bg-destructive ttw:text-destructive-foreground ttw:ring-destructive/20",
6
- success: "ttw:bg-emerald-100 ttw:text-emerald-600 ttw:ring-emerald-500/20"
7
- };
8
- function n({ children: n, variant: r = "default" }) {
9
- return /* @__PURE__ */ e("span", {
10
- className: `ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:ring-8 ${t[r]}`,
11
- children: n
8
+ var s = 2;
9
+ function c({ open: c, labels: l, connectStep: u, connectForm: d, accessRows: f, accessGrantedCount: p, connectSummary: m, isTeamMembersLoading: h, isTeamMembersError: g, isSubmitting: _, isActionDisabled: v, canConnect: y, isConnectError: b, isConnectRequiredErrorVisible: x, isConnectRoutingNumberInvalid: S, connectErrorMessage: C, onOpenChange: w, onConnectFormChange: T, onConnectNext: E, onConnectBack: D, onTeamMembersRetry: O }) {
10
+ let k = v || !y, A = u === 3 && m ? /* @__PURE__ */ a(i, {
11
+ labels: l,
12
+ summary: m,
13
+ onDone: () => w(!1)
14
+ }) : void 0, j = l.stepIndicator.replace("{current}", String(u)).replace("{total}", String(s));
15
+ return /* @__PURE__ */ a(e, {
16
+ submitError: b ? C ?? l.connectErrorTitle : void 0,
17
+ open: c,
18
+ onOpenChange: w,
19
+ title: l.connectTitle,
20
+ stepLabel: j,
21
+ result: A,
22
+ nextLoading: _ || u === 2 && h,
23
+ onNext: E,
24
+ onBack: u === 2 ? D : void 0,
25
+ labels: {
26
+ next: l.nextButton,
27
+ back: l.backButton,
28
+ close: l.closeButton
29
+ },
30
+ testIds: { content: t.connectAccountDialog },
31
+ children: /* @__PURE__ */ o("div", {
32
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
33
+ children: [u === 1 ? /* @__PURE__ */ a(r, {
34
+ labels: l,
35
+ connectForm: d,
36
+ disabled: k,
37
+ routingNumberError: S,
38
+ isRequiredErrorVisible: x,
39
+ onConnectFormChange: T
40
+ }) : null, u === 2 ? /* @__PURE__ */ a(n, {
41
+ labels: l,
42
+ rows: f,
43
+ grantedCount: p,
44
+ isLoading: h,
45
+ isError: g,
46
+ onRetry: O
47
+ }) : null]
48
+ })
12
49
  });
13
50
  }
14
- export { n as DialogFeaturedIcon };
51
+ export { c as ConnectAccountDialog };
@@ -1,8 +1,46 @@
1
+ import { DescriptionList as e, FieldRequirement as t, FormDialog as n, Input as r, Label as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
1
3
  // ../../libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index8.js
2
- var e = {
3
- connectAccountButton: "linked-accounts-widget-connect-account-button",
4
- emptyState: "linked-accounts-widget-empty-state",
5
- connectAccountDialog: "linked-accounts-widget-connect-account-dialog",
6
- verifySuccessTitle: "linked-accounts-widget-verify-success-title"
7
- };
8
- export { e as linkedAccountsWidgetUiTestIds };
4
+ var s = "linked-account-edit-nickname";
5
+ function c({ open: c, labels: l, editForm: u, isSubmitting: d, isAuthPending: f = !1, isActionDisabled: p, isEditError: m, onOpenChange: h, onEditFormChange: g, onEditSubmit: _ }) {
6
+ return /* @__PURE__ */ a(n, {
7
+ submitError: m ? l.actionErrorTitle : void 0,
8
+ open: c,
9
+ onOpenChange: h,
10
+ title: l.editTitle,
11
+ submitting: d || f,
12
+ onSubmit: _,
13
+ labels: {
14
+ submit: l.saveButton,
15
+ cancel: l.cancelButton,
16
+ close: l.closeButton
17
+ },
18
+ children: /* @__PURE__ */ o("div", {
19
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
20
+ children: [/* @__PURE__ */ o("div", {
21
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
22
+ children: [/* @__PURE__ */ a(i, {
23
+ htmlFor: s,
24
+ requirement: t.Required,
25
+ children: l.nicknameLabel
26
+ }), /* @__PURE__ */ a(r, {
27
+ id: s,
28
+ value: u.nickname,
29
+ required: !0,
30
+ disabled: p,
31
+ onChange: (e) => g({
32
+ ...u,
33
+ nickname: e.target.value
34
+ })
35
+ })]
36
+ }), /* @__PURE__ */ a(e, { items: [{
37
+ label: l.accountNumberLabel,
38
+ value: u.accountNumber
39
+ }, {
40
+ label: l.routingNumberLabel,
41
+ value: u.routingNumber
42
+ }] })]
43
+ })
44
+ });
45
+ }
46
+ export { c as EditAccountDialog };