@tesouro/embedded-components-react 0.7.74 → 0.8.0

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 +14 -17
  2. package/dist/index.css +18 -17
  3. package/dist/index.d.ts +178 -49
  4. package/dist/index.js +51 -50
  5. package/dist/lib/BankAccountOnboardingWidget.d.ts +178 -49
  6. package/dist/lib/BankAccountOnboardingWidget.js +8 -7
  7. package/dist/lib/WidgetSuite.d.ts +177 -48
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +5 -4
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +131 -96
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +509 -496
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +47 -78
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +47 -49
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/ReviewStep.js +103 -0
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/TermsStep.js +35 -0
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +49 -28
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/apiMapping.js +35 -42
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js +2 -3
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/buildOnboardingPrefill.js +4 -10
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +4 -2
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/draftApplicationMapping.js +3 -3
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/formatPhoneNumberInput.js +6 -2
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/maxBirthDate.js +4 -1
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +22 -9
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +8 -5
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/stepSchemas.js +59 -60
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +17 -9
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +19 -18
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +344 -6
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +59 -58
  30. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +40 -33
  31. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +7 -40
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +57 -37
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +30 -93
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +40 -12
  35. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +36 -269
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +93 -25
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +10 -19
  38. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index2.js +61 -78
  39. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +270 -61
  40. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +25 -338
  41. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +23 -29
  42. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +53 -26
  43. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +342 -66
  44. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +26 -82
  45. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +27 -6
  46. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +56 -54
  47. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +123 -9
  48. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +5 -62
  49. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +82 -0
  50. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +11 -0
  51. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index32.js +64 -0
  52. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +256 -311
  53. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +81 -2
  54. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js +83 -53
  55. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +2 -147
  56. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js +69 -46
  57. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +5 -35
  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 +4 -4
  60. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +122 -165
  61. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +12 -27
  62. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js +0 -1
  63. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuite.js +0 -1
  64. package/dist/packages/shared-ui-shadcn/dist/index.js +81 -23
  65. package/package.json +1 -1
@@ -1,76 +1,352 @@
1
- import { Button as e, Tooltip as t, TooltipContent as n, TooltipProvider as r, TooltipTrigger as i, Typography as a } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ABOUT_YOU_PANEL_LABELS_EN as o } from "./index23.js";
3
- import { AboutYouEditForm as s } from "./index21.js";
4
- import { AboutYouSummary as c } from "./index22.js";
5
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
- import { Pen as d } from "lucide-react";
1
+ import { Button as e, DateInput as t, Input as n, InputGroup as r, InputGroupAddon as i, InputGroupInput as a, Label as o, RadioGroup as s, RadioGroupItem as c, Select as l, SelectContent as u, SelectItem as d, SelectTrigger as f, SelectValue as p } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { FieldError as m, fieldErrorAria as h, onCompositeBlur as g, selectBlurHandlers as _ } from "./index3.js";
3
+ import { useState as v } from "react";
4
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
5
+ import { EyeIcon as x, EyeOffIcon as S } from "lucide-react";
7
6
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js
8
- function f({ isEditing: f, onEditClick: p, summaryRows: m, editFields: h, labels: g, isDisabled: _, ssnRevealed: v, ssnToggleAriaLabel: y, onToggleSsnVisibility: b, showOwnershipPercentage: x, maxBirthDate: S, ssnMaskedDisplay: C, ssnFormattedDisplay: w, ssnRequired: T, ssnPlaceholder: E, ssnHelpText: D, testIds: O }) {
9
- let k = {
10
- ...o,
11
- ...g
12
- };
13
- return f ? /* @__PURE__ */ l(s, {
14
- fields: h,
15
- labels: k,
16
- isDisabled: _,
17
- ssnRevealed: v,
18
- ssnToggleAriaLabel: y,
19
- onToggleSsnVisibility: b,
20
- showOwnershipPercentage: x,
21
- maxBirthDate: S,
22
- ssnMaskedDisplay: C,
23
- ssnFormattedDisplay: w,
24
- ssnRequired: T,
25
- ssnPlaceholder: E,
26
- ssnHelpText: D,
27
- testIds: O?.editForm
28
- }) : /* @__PURE__ */ u("section", {
29
- "data-testid": O?.root,
30
- className: "ttw:relative ttw:min-w-0 ttw:rounded-lg ttw:bg-surface-subtle ttw:p-4",
7
+ function C({ htmlFor: e, children: t }) {
8
+ return /* @__PURE__ */ y(o, {
9
+ htmlFor: e,
10
+ className: "ttw:mb-1 ttw:block ttw:text-sm ttw:font-medium",
11
+ children: t
12
+ });
13
+ }
14
+ var w = "ttw:w-full";
15
+ function T({ fields: T, testIds: E, labels: D, isDisabled: O, ssnRevealed: k, ssnToggleAriaLabel: A, onToggleSsnVisibility: j, showOwnershipPercentage: M, ssnMaskedDisplay: N, ssnFormattedDisplay: P, ssnRequired: F, ssnPlaceholder: I, ssnHelpText: L }) {
16
+ let [R, z] = v(!1), B = !k && !R, V = _(T.state.onBlur);
17
+ return /* @__PURE__ */ b("section", {
18
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
19
+ "data-testid": E?.root,
31
20
  children: [
32
- /* @__PURE__ */ u("div", {
33
- className: "ttw:mb-3 ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
34
- children: [/* @__PURE__ */ l(a, {
35
- component: "h3",
36
- variant: "h6",
37
- className: "ttw:font-semibold ttw:text-foreground",
38
- children: k.panelTitle
39
- }), /* @__PURE__ */ l(r, { children: /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l(i, {
40
- asChild: !0,
41
- onFocus: (e) => {
42
- e.preventDefault();
43
- },
44
- children: /* @__PURE__ */ l(e, {
21
+ /* @__PURE__ */ y("p", {
22
+ className: "ttw:text-sm ttw:text-muted-foreground",
23
+ children: D.requiredFieldsNote
24
+ }),
25
+ /* @__PURE__ */ b("div", { children: [
26
+ /* @__PURE__ */ b(C, {
27
+ htmlFor: "firstName",
28
+ children: [D.firstName, D.requiredFieldMarker]
29
+ }),
30
+ /* @__PURE__ */ y(n, {
31
+ id: "firstName",
32
+ value: T.firstName.value,
33
+ onChange: (e) => T.firstName.onValueChange(e.target.value),
34
+ onBlur: T.firstName.onBlur,
35
+ ...h("firstName", T.firstName.error),
36
+ disabled: O,
37
+ required: !0
38
+ }),
39
+ /* @__PURE__ */ y(m, {
40
+ fieldId: "firstName",
41
+ error: T.firstName.error
42
+ })
43
+ ] }),
44
+ /* @__PURE__ */ b("div", { children: [
45
+ /* @__PURE__ */ b(C, {
46
+ htmlFor: "lastName",
47
+ children: [D.lastName, D.requiredFieldMarker]
48
+ }),
49
+ /* @__PURE__ */ y(n, {
50
+ id: "lastName",
51
+ value: T.lastName.value,
52
+ onChange: (e) => T.lastName.onValueChange(e.target.value),
53
+ onBlur: T.lastName.onBlur,
54
+ ...h("lastName", T.lastName.error),
55
+ disabled: O,
56
+ required: !0
57
+ }),
58
+ /* @__PURE__ */ y(m, {
59
+ fieldId: "lastName",
60
+ error: T.lastName.error
61
+ })
62
+ ] }),
63
+ /* @__PURE__ */ b("div", { children: [
64
+ /* @__PURE__ */ b(C, {
65
+ htmlFor: "dateOfBirth",
66
+ children: [D.dateOfBirth, D.requiredFieldMarker]
67
+ }),
68
+ /* @__PURE__ */ y(t, {
69
+ id: "dateOfBirth",
70
+ value: T.dateOfBirth.value,
71
+ onChange: T.dateOfBirth.onValueChange,
72
+ placeholder: D.dateOfBirthPlaceholder,
73
+ disabled: O,
74
+ onBlur: T.dateOfBirth.onBlur,
75
+ required: !0,
76
+ ...h("dateOfBirth", T.dateOfBirth.error, T.dateOfBirth.error ? void 0 : "dateOfBirth-hint")
77
+ }),
78
+ T.dateOfBirth.error ? null : /* @__PURE__ */ y("p", {
79
+ id: "dateOfBirth-hint",
80
+ className: "ttw:mt-1 ttw:text-xs ttw:text-muted-foreground",
81
+ children: D.dateOfBirthHint
82
+ }),
83
+ /* @__PURE__ */ y(m, {
84
+ fieldId: "dateOfBirth",
85
+ error: T.dateOfBirth.error
86
+ })
87
+ ] }),
88
+ /* @__PURE__ */ b("div", { children: [
89
+ /* @__PURE__ */ b(C, {
90
+ htmlFor: "ssn",
91
+ children: [D.ssn, F ? D.requiredFieldMarker : null]
92
+ }),
93
+ /* @__PURE__ */ b("div", {
94
+ className: "ttw:flex ttw:gap-2",
95
+ onBlur: g(T.ssn.onBlur),
96
+ children: [/* @__PURE__ */ y(n, {
97
+ id: "ssn",
98
+ className: "ttw:flex-1 ttw:font-mono ttw:tracking-wider",
99
+ type: "text",
100
+ value: B ? N : P,
101
+ onChange: (e) => T.ssn.onValueChange(e.target.value),
102
+ onFocus: () => z(!0),
103
+ onBlur: () => z(!1),
104
+ disabled: O,
105
+ autoComplete: "off",
106
+ inputMode: "numeric",
107
+ maxLength: 11,
108
+ required: F,
109
+ placeholder: I,
110
+ ...h("ssn", T.ssn.error, L ? "ssn-on-file" : void 0)
111
+ }), /* @__PURE__ */ y(e, {
45
112
  type: "button",
46
- variant: "ghost",
47
- size: "icon-sm",
48
- onClick: p,
49
- disabled: _,
50
- "aria-label": k.editButtonAriaLabel,
51
- "data-testid": O?.editButton,
52
- className: "ttw:rounded-lg ttw:bg-muted ttw:text-foreground ttw:hover:bg-primary/10 ttw:hover:text-foreground",
53
- children: /* @__PURE__ */ l(d, {
54
- className: "ttw:size-5",
55
- "aria-hidden": !0
56
- })
113
+ variant: "outline",
114
+ size: "icon",
115
+ onClick: j,
116
+ disabled: O,
117
+ "aria-label": A,
118
+ children: y(k ? S : x, { className: "ttw:size-4" })
119
+ })]
120
+ }),
121
+ L ? /* @__PURE__ */ y("p", {
122
+ id: "ssn-on-file",
123
+ className: "ttw:mt-1 ttw:text-xs ttw:text-muted-foreground",
124
+ children: L
125
+ }) : null,
126
+ /* @__PURE__ */ y(m, {
127
+ fieldId: "ssn",
128
+ error: T.ssn.error
129
+ })
130
+ ] }),
131
+ /* @__PURE__ */ b("div", { children: [
132
+ /* @__PURE__ */ b(C, {
133
+ htmlFor: "homeAddress",
134
+ children: [D.homeAddress, D.requiredFieldMarker]
135
+ }),
136
+ /* @__PURE__ */ y(n, {
137
+ id: "homeAddress",
138
+ value: T.homeAddress.value,
139
+ onChange: (e) => T.homeAddress.onValueChange(e.target.value),
140
+ onBlur: T.homeAddress.onBlur,
141
+ ...h("homeAddress", T.homeAddress.error),
142
+ disabled: O,
143
+ required: !0
144
+ }),
145
+ /* @__PURE__ */ y(m, {
146
+ fieldId: "homeAddress",
147
+ error: T.homeAddress.error
148
+ })
149
+ ] }),
150
+ /* @__PURE__ */ b("div", {
151
+ className: "ttw:grid ttw:grid-cols-3 ttw:gap-4",
152
+ children: [
153
+ /* @__PURE__ */ b("div", {
154
+ className: "ttw:min-w-0",
155
+ children: [
156
+ /* @__PURE__ */ b(C, {
157
+ htmlFor: "city",
158
+ children: [D.city, D.requiredFieldMarker]
159
+ }),
160
+ /* @__PURE__ */ y(n, {
161
+ id: "city",
162
+ value: T.city.value,
163
+ onChange: (e) => T.city.onValueChange(e.target.value),
164
+ onBlur: T.city.onBlur,
165
+ ...h("city", T.city.error),
166
+ disabled: O,
167
+ required: !0
168
+ }),
169
+ /* @__PURE__ */ y(m, {
170
+ fieldId: "city",
171
+ error: T.city.error
172
+ })
173
+ ]
174
+ }),
175
+ /* @__PURE__ */ b("div", {
176
+ className: "ttw:min-w-0",
177
+ children: [
178
+ /* @__PURE__ */ b(C, {
179
+ htmlFor: "state",
180
+ children: [D.state, D.requiredFieldMarker]
181
+ }),
182
+ /* @__PURE__ */ b(l, {
183
+ value: T.state.value,
184
+ onValueChange: T.state.onValueChange,
185
+ onOpenChange: V.onOpenChange,
186
+ disabled: O,
187
+ children: [/* @__PURE__ */ y(f, {
188
+ id: "state",
189
+ className: w,
190
+ onBlur: V.onTriggerBlur,
191
+ ...h("state", T.state.error),
192
+ children: /* @__PURE__ */ y(p, { placeholder: D.statePlaceholder })
193
+ }), /* @__PURE__ */ y(u, { children: T.state.options.map((e) => /* @__PURE__ */ y(d, {
194
+ value: e.value,
195
+ children: e.label
196
+ }, e.value)) })]
197
+ }),
198
+ /* @__PURE__ */ y(m, {
199
+ fieldId: "state",
200
+ error: T.state.error
201
+ })
202
+ ]
203
+ }),
204
+ /* @__PURE__ */ b("div", {
205
+ className: "ttw:min-w-0",
206
+ children: [
207
+ /* @__PURE__ */ b(C, {
208
+ htmlFor: "zipCode",
209
+ children: [D.zipCode, D.requiredFieldMarker]
210
+ }),
211
+ /* @__PURE__ */ y(n, {
212
+ id: "zipCode",
213
+ value: T.zipCode.value,
214
+ onChange: (e) => T.zipCode.onValueChange(e.target.value),
215
+ onBlur: T.zipCode.onBlur,
216
+ ...h("zipCode", T.zipCode.error),
217
+ disabled: O,
218
+ required: !0,
219
+ inputMode: "numeric"
220
+ }),
221
+ /* @__PURE__ */ y(m, {
222
+ fieldId: "zipCode",
223
+ error: T.zipCode.error
224
+ })
225
+ ]
57
226
  })
58
- }), /* @__PURE__ */ l(n, {
59
- side: "top",
60
- sideOffset: 4,
61
- children: k.editTooltip
62
- })] }) })]
227
+ ]
63
228
  }),
64
- /* @__PURE__ */ l("div", {
65
- className: "ttw:mb-3 ttw:border-b ttw:border-border",
66
- "aria-hidden": !0
229
+ /* @__PURE__ */ b("div", { children: [
230
+ /* @__PURE__ */ b(C, {
231
+ htmlFor: "mobilePhoneNumber",
232
+ children: [D.mobilePhoneNumber, D.requiredFieldMarker]
233
+ }),
234
+ /* @__PURE__ */ y(n, {
235
+ id: "mobilePhoneNumber",
236
+ type: "tel",
237
+ value: T.mobilePhoneNumber.value,
238
+ onChange: (e) => T.mobilePhoneNumber.onValueChange(e.target.value),
239
+ onBlur: T.mobilePhoneNumber.onBlur,
240
+ ...h("mobilePhoneNumber", T.mobilePhoneNumber.error),
241
+ disabled: O,
242
+ required: !0
243
+ }),
244
+ /* @__PURE__ */ y(m, {
245
+ fieldId: "mobilePhoneNumber",
246
+ error: T.mobilePhoneNumber.error
247
+ })
248
+ ] }),
249
+ /* @__PURE__ */ b("div", { children: [
250
+ /* @__PURE__ */ b(C, {
251
+ htmlFor: "workEmail",
252
+ children: [D.workEmail, D.requiredFieldMarker]
253
+ }),
254
+ /* @__PURE__ */ y(n, {
255
+ id: "workEmail",
256
+ type: "email",
257
+ value: T.workEmail.value,
258
+ onChange: (e) => T.workEmail.onValueChange(e.target.value),
259
+ onBlur: T.workEmail.onBlur,
260
+ ...h("workEmail", T.workEmail.error),
261
+ disabled: O,
262
+ required: !0
263
+ }),
264
+ /* @__PURE__ */ y(m, {
265
+ fieldId: "workEmail",
266
+ error: T.workEmail.error
267
+ })
268
+ ] }),
269
+ /* @__PURE__ */ b("fieldset", {
270
+ "data-testid": E?.ownsOver25Question,
271
+ children: [
272
+ /* @__PURE__ */ b("legend", {
273
+ id: "ownsOver25Legend",
274
+ className: "ttw:mb-2 ttw:text-sm ttw:font-medium",
275
+ children: [D.ownsOver25Question, D.requiredFieldMarker]
276
+ }),
277
+ /* @__PURE__ */ b(s, {
278
+ value: T.ownsOver25Percent.value,
279
+ onValueChange: T.ownsOver25Percent.onValueChange,
280
+ className: "ttw:flex ttw:gap-4",
281
+ disabled: O,
282
+ "aria-labelledby": "ownsOver25Legend",
283
+ "aria-describedby": h("ownsOver25", T.ownsOver25Percent.error)["aria-describedby"],
284
+ onBlur: g(T.ownsOver25Percent.onBlur),
285
+ children: [/* @__PURE__ */ b("div", {
286
+ className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
287
+ children: [/* @__PURE__ */ y(c, {
288
+ value: "yes",
289
+ id: "ownsOver25Yes",
290
+ "aria-invalid": T.ownsOver25Percent.error ? !0 : void 0,
291
+ className: "ttw:cursor-pointer"
292
+ }), /* @__PURE__ */ y(o, {
293
+ htmlFor: "ownsOver25Yes",
294
+ className: "ttw:cursor-pointer",
295
+ children: D.ownsOver25Yes
296
+ })]
297
+ }), /* @__PURE__ */ b("div", {
298
+ className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
299
+ children: [/* @__PURE__ */ y(c, {
300
+ value: "no",
301
+ id: "ownsOver25No",
302
+ "aria-invalid": T.ownsOver25Percent.error ? !0 : void 0,
303
+ className: "ttw:cursor-pointer"
304
+ }), /* @__PURE__ */ y(o, {
305
+ htmlFor: "ownsOver25No",
306
+ className: "ttw:cursor-pointer",
307
+ children: D.ownsOver25No
308
+ })]
309
+ })]
310
+ }),
311
+ /* @__PURE__ */ y(m, {
312
+ fieldId: "ownsOver25",
313
+ error: T.ownsOver25Percent.error
314
+ })
315
+ ]
67
316
  }),
68
- /* @__PURE__ */ l(c, {
69
- rows: m,
70
- testIds: O?.summary
71
- })
317
+ M ? /* @__PURE__ */ b("div", { children: [
318
+ /* @__PURE__ */ b(C, {
319
+ htmlFor: "ownershipPercentage",
320
+ children: [D.ownershipPercentage, D.requiredFieldMarker]
321
+ }),
322
+ /* @__PURE__ */ b(r, {
323
+ className: "ttw:w-32",
324
+ children: [/* @__PURE__ */ y(a, {
325
+ id: "ownershipPercentage",
326
+ type: "number",
327
+ min: 25,
328
+ max: 100,
329
+ "data-has-end-addon": "",
330
+ placeholder: D.ownershipPercentagePlaceholder,
331
+ value: T.ownershipPercentage.value ?? "",
332
+ onChange: (e) => T.ownershipPercentage.onValueChange(e.target.value === "" ? null : Number(e.target.value)),
333
+ onBlur: T.ownershipPercentage.onBlur,
334
+ ...h("ownershipPercentage", T.ownershipPercentage.error),
335
+ disabled: O,
336
+ required: !0
337
+ }), /* @__PURE__ */ y(i, {
338
+ align: "inline-end",
339
+ "aria-hidden": !0,
340
+ children: "%"
341
+ })]
342
+ }),
343
+ /* @__PURE__ */ y(m, {
344
+ fieldId: "ownershipPercentage",
345
+ error: T.ownershipPercentage.error
346
+ })
347
+ ] }) : null
72
348
  ]
73
349
  });
74
350
  }
75
351
  //#endregion
76
- export { o as ABOUT_YOU_PANEL_LABELS_EN, f as AboutYouPanel };
352
+ export { T as AboutYouEditForm };
@@ -1,87 +1,31 @@
1
- import { Checkbox as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BUSINESS_DETAILS_LABELS_EN as t, interpolateBankName as n } from "./index8.js";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
1
+ import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
4
3
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js
5
- var a = "ttw:cursor-pointer ttw:text-primary ttw:underline ttw:underline-offset-2";
6
- function o({ href: e, children: t }) {
7
- return e ? /* @__PURE__ */ r("a", {
8
- href: e,
9
- target: "_blank",
10
- rel: "noopener noreferrer",
11
- className: a,
12
- children: t
13
- }) : /* @__PURE__ */ r("span", {
14
- className: a,
15
- children: t
16
- });
4
+ function i({ label: i, value: a, testId: o, valueMonospace: s }) {
5
+ return a ? /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(e, {
6
+ component: "span",
7
+ variant: "body2",
8
+ className: "ttw:text-muted-foreground",
9
+ children: i
10
+ }), /* @__PURE__ */ n(e, {
11
+ component: "span",
12
+ variant: "body2",
13
+ "data-testid": o,
14
+ className: `ttw:min-w-0 ttw:wrap-break-word ttw:whitespace-pre-line ttw:text-left ttw:font-medium ttw:text-foreground ${s ? "ttw:font-mono ttw:tracking-wider" : ""}`,
15
+ children: a
16
+ })] }) : null;
17
17
  }
18
- function s({ value: a, onChange: s, isSubmitting: c, labels: l, bankName: u, termsHref: d, privacyHref: f, electronicCommunicationHref: p, patriotActHref: m, testIds: h }) {
19
- let g = {
20
- ...t,
21
- ...l,
22
- companyStructureOptions: {
23
- ...t.companyStructureOptions,
24
- ...l?.companyStructureOptions ?? {}
25
- }
26
- }, _ = (e, t) => s({
27
- ...a,
28
- [e]: t
29
- });
30
- return /* @__PURE__ */ i("div", {
31
- className: "ttw:flex ttw:flex-col ttw:gap-4",
32
- children: [/* @__PURE__ */ i("div", {
33
- className: "ttw:flex ttw:items-start ttw:gap-2",
34
- children: [/* @__PURE__ */ r(e, {
35
- id: "isAuthorized",
36
- "data-testid": h?.authorizationCheckbox,
37
- checked: a.isAuthorized === !0,
38
- onCheckedChange: (e) => _("isAuthorized", e === !0 || null),
39
- disabled: c,
40
- className: "ttw:mt-0.5",
41
- "aria-labelledby": "bank-account-onboarding-authorization-text"
42
- }), /* @__PURE__ */ r("p", {
43
- id: "bank-account-onboarding-authorization-text",
44
- className: "ttw:text-sm ttw:font-normal ttw:leading-snug",
45
- children: g.isAuthorizedQuestion
46
- })]
47
- }), /* @__PURE__ */ i("div", {
48
- className: "ttw:flex ttw:items-start ttw:gap-2",
49
- children: [/* @__PURE__ */ r(e, {
50
- id: "isCheckboxChecked",
51
- "data-testid": h?.disclosureCheckbox,
52
- checked: a.isCheckboxChecked,
53
- onCheckedChange: (e) => _("isCheckboxChecked", e === !0),
54
- disabled: c,
55
- className: "ttw:mt-0.5",
56
- "aria-labelledby": "bank-account-onboarding-disclosure-text"
57
- }), /* @__PURE__ */ i("p", {
58
- id: "bank-account-onboarding-disclosure-text",
59
- className: "ttw:text-sm ttw:font-normal ttw:leading-snug",
60
- children: [
61
- n(g.acceptDisclosuresPrefix, u),
62
- /* @__PURE__ */ r(o, {
63
- href: d,
64
- children: g.termsOfUse
65
- }),
66
- g.acceptDisclosuresTermsPrivacyJoin,
67
- /* @__PURE__ */ r(o, {
68
- href: f,
69
- children: g.privacyPolicy
70
- }),
71
- n(g.acceptDisclosuresAfterPrivacy, u),
72
- /* @__PURE__ */ r(o, {
73
- href: p,
74
- children: g.electronicCommunication
75
- }),
76
- n(g.acceptDisclosuresAfterElectronic, u),
77
- /* @__PURE__ */ r(o, {
78
- href: m,
79
- children: g.patriotAct
80
- })
81
- ]
82
- })]
83
- })]
18
+ function a({ rows: e, testIds: t }) {
19
+ return /* @__PURE__ */ n("div", {
20
+ className: "ttw:grid ttw:grid-cols-[max-content_1fr] ttw:gap-x-4 ttw:gap-y-2",
21
+ "data-testid": t?.root,
22
+ children: e.map((e) => /* @__PURE__ */ n(i, {
23
+ label: e.label,
24
+ value: e.value,
25
+ testId: e.testId,
26
+ valueMonospace: e.valueMonospace
27
+ }, e.testId ?? e.label))
84
28
  });
85
29
  }
86
30
  //#endregion
87
- export { s as BusinessDisclosuresSection };
31
+ export { a as AboutYouSummary };
@@ -1,10 +1,31 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js
2
2
  var e = {
3
- title: "Save changes to application",
4
- description: "This application has changes that have not been saved. Save it to finish later, or discard the changes.",
5
- saveDraftButton: "Save changes",
6
- discardButton: "Discard changes",
7
- closeButton: "Close"
3
+ panelTitle: "Personal details",
4
+ editButtonAriaLabel: "Edit personal details",
5
+ editButton: "Edit personal details",
6
+ requiredFieldsNote: "Required fields are marked with an asterisk *",
7
+ requiredFieldMarker: " *",
8
+ firstName: "First name",
9
+ lastName: "Last name",
10
+ dateOfBirth: "Date of birth",
11
+ dateOfBirthPlaceholder: "MM/DD/YYYY",
12
+ dateOfBirthHint: "For example, 04/23/1985",
13
+ ssn: "SSN",
14
+ ssnShow: "Show",
15
+ ssnHide: "Hide",
16
+ homeAddress: "Home address",
17
+ city: "City",
18
+ state: "State",
19
+ statePlaceholder: "Select state",
20
+ zipCode: "Postal code",
21
+ mobilePhoneNumber: "Phone",
22
+ workEmail: "Work email",
23
+ ownsOver25Question: "Do you own 25% or more of the business?",
24
+ ownsOver25SummaryLabel: "Owns 25% or more of the business",
25
+ ownsOver25Yes: "Yes",
26
+ ownsOver25No: "No",
27
+ ownershipPercentage: "Ownership share (minimum 25%)",
28
+ ownershipPercentagePlaceholder: "e.g., 25"
8
29
  };
9
30
  //#endregion
10
- export { e as UNSAVED_APPLICATION_DIALOG_LABELS_EN };
31
+ export { e as ABOUT_YOU_PANEL_LABELS_EN };