@tesouro/embedded-components-react 0.5.36 → 0.5.38

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 (50) hide show
  1. package/README.md +14 -14
  2. package/dist/index.d.ts +41 -3
  3. package/dist/index.js +5 -5
  4. package/dist/lib/BankAccountOnboardingWidget.d.ts +41 -3
  5. package/dist/lib/BankAccountOnboardingWidget.js +5 -5
  6. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index10.js +184 -109
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +29 -174
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +117 -67
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +137 -44
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +77 -107
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +84 -87
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +116 -88
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +99 -5
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +100 -28
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index19.js +5 -5
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index20.js +26 -383
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js +19 -0
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +407 -0
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index6.js +2 -10
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index7.js +22 -6
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index8.js +11 -182
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index9.js +8 -29
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +12 -12
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +27 -26
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +34 -91
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +96 -12
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +14 -2
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +0 -2
  30. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +4 -175
  31. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +180 -28
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +31 -21
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +21 -65
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +60 -215
  35. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +230 -29
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +32 -26
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +26 -71
  38. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +71 -82
  39. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +87 -0
  40. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +38 -28
  41. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +2 -46
  42. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +48 -139
  43. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js +138 -48
  44. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +47 -26
  45. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js +32 -33
  46. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +31 -38
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +20 -8
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +1 -0
  49. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  50. package/package.json +1 -1
@@ -1,34 +1,235 @@
1
- import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
1
+ import { Button as e, DatePicker 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 { useState as m } from "react";
3
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
4
+ import { EyeIcon as _, EyeOffIcon as v } from "lucide-react";
3
5
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js
4
- function r({ label: r, value: i, testId: a, valueMonospace: o }) {
5
- return i ? /* @__PURE__ */ n("div", {
6
- className: "ttw:grid ttw:min-w-0 ttw:grid-cols-2 ttw:gap-4",
7
- "data-testid": a,
8
- children: [/* @__PURE__ */ t(e, {
9
- component: "span",
10
- variant: "body2",
11
- className: "ttw:min-w-0 ttw:text-muted-foreground",
12
- children: r
13
- }), /* @__PURE__ */ t(e, {
14
- component: "span",
15
- variant: "body2",
16
- className: `ttw:min-w-0 ttw:wrap-break-word ttw:whitespace-pre-line ttw:text-left ttw:font-medium ttw:text-foreground ${o ? "ttw:font-mono ttw:tracking-wider" : ""}`,
17
- children: i
18
- })]
19
- }) : null;
6
+ function y({ htmlFor: e, children: t }) {
7
+ return /* @__PURE__ */ h(o, {
8
+ htmlFor: e,
9
+ className: "ttw:mb-1 ttw:block ttw:text-sm ttw:font-medium",
10
+ children: t
11
+ });
20
12
  }
21
- function i({ rows: e, testIds: n }) {
22
- return /* @__PURE__ */ t("div", {
23
- className: "ttw:flex ttw:flex-col ttw:gap-2",
24
- "data-testid": n?.root,
25
- children: e.map((e) => /* @__PURE__ */ t(r, {
26
- label: e.label,
27
- value: e.value,
28
- testId: e.testId,
29
- valueMonospace: e.valueMonospace
30
- }, e.testId ?? e.label))
13
+ var b = "ttw:w-full";
14
+ function x({ fields: x, testIds: S, labels: C, isDisabled: w, ssnRevealed: T, ssnToggleAriaLabel: E, onToggleSsnVisibility: D, showOwnershipPercentage: O, maxBirthDate: k, ssnMaskedDisplay: A, ssnFormattedDisplay: j, ssnRequired: M, ssnPlaceholder: N, ssnHelpText: P }) {
15
+ let [F, I] = m(!1), L = !T && !F;
16
+ return /* @__PURE__ */ g("section", {
17
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
18
+ "data-testid": S?.root,
19
+ children: [
20
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
21
+ htmlFor: "firstName",
22
+ children: C.firstName
23
+ }), /* @__PURE__ */ h(n, {
24
+ id: "firstName",
25
+ value: x.firstName.value,
26
+ onChange: (e) => x.firstName.onValueChange(e.target.value),
27
+ disabled: w,
28
+ required: !0
29
+ })] }),
30
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
31
+ htmlFor: "lastName",
32
+ children: C.lastName
33
+ }), /* @__PURE__ */ h(n, {
34
+ id: "lastName",
35
+ value: x.lastName.value,
36
+ onChange: (e) => x.lastName.onValueChange(e.target.value),
37
+ disabled: w,
38
+ required: !0
39
+ })] }),
40
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
41
+ htmlFor: "dateOfBirth",
42
+ children: C.dateOfBirth
43
+ }), /* @__PURE__ */ h(t, {
44
+ id: "dateOfBirth",
45
+ value: x.dateOfBirth.value,
46
+ onChange: x.dateOfBirth.onValueChange,
47
+ placeholder: C.dateOfBirthPlaceholder,
48
+ disabled: w,
49
+ maxDate: k
50
+ })] }),
51
+ /* @__PURE__ */ g("div", { children: [
52
+ /* @__PURE__ */ h(y, {
53
+ htmlFor: "ssn",
54
+ children: C.ssn
55
+ }),
56
+ /* @__PURE__ */ g("div", {
57
+ className: "ttw:flex ttw:gap-2",
58
+ children: [/* @__PURE__ */ h(n, {
59
+ id: "ssn",
60
+ className: "ttw:flex-1 ttw:font-mono ttw:tracking-wider",
61
+ type: "text",
62
+ value: L ? A : j,
63
+ onChange: (e) => x.ssn.onValueChange(e.target.value),
64
+ onFocus: () => I(!0),
65
+ onBlur: () => I(!1),
66
+ disabled: w,
67
+ autoComplete: "off",
68
+ inputMode: "numeric",
69
+ maxLength: 11,
70
+ required: M,
71
+ placeholder: N,
72
+ "aria-describedby": P ? "ssn-on-file" : void 0
73
+ }), /* @__PURE__ */ h(e, {
74
+ type: "button",
75
+ variant: "outline",
76
+ size: "icon",
77
+ onClick: D,
78
+ disabled: w,
79
+ "aria-label": E,
80
+ children: h(T ? v : _, { className: "ttw:size-4" })
81
+ })]
82
+ }),
83
+ P ? /* @__PURE__ */ h("p", {
84
+ id: "ssn-on-file",
85
+ className: "ttw:mt-1 ttw:text-xs ttw:text-muted-foreground",
86
+ children: P
87
+ }) : null
88
+ ] }),
89
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
90
+ htmlFor: "homeAddress",
91
+ children: C.homeAddress
92
+ }), /* @__PURE__ */ h(n, {
93
+ id: "homeAddress",
94
+ value: x.homeAddress.value,
95
+ onChange: (e) => x.homeAddress.onValueChange(e.target.value),
96
+ disabled: w,
97
+ required: !0
98
+ })] }),
99
+ /* @__PURE__ */ g("div", {
100
+ className: "ttw:grid ttw:grid-cols-3 ttw:gap-4",
101
+ children: [
102
+ /* @__PURE__ */ g("div", {
103
+ className: "ttw:min-w-0",
104
+ children: [/* @__PURE__ */ h(y, {
105
+ htmlFor: "city",
106
+ children: C.city
107
+ }), /* @__PURE__ */ h(n, {
108
+ id: "city",
109
+ value: x.city.value,
110
+ onChange: (e) => x.city.onValueChange(e.target.value),
111
+ disabled: w,
112
+ required: !0
113
+ })]
114
+ }),
115
+ /* @__PURE__ */ g("div", {
116
+ className: "ttw:min-w-0",
117
+ children: [/* @__PURE__ */ h(y, {
118
+ htmlFor: "state",
119
+ children: C.state
120
+ }), /* @__PURE__ */ g(l, {
121
+ value: x.state.value,
122
+ onValueChange: x.state.onValueChange,
123
+ disabled: w,
124
+ children: [/* @__PURE__ */ h(f, {
125
+ id: "state",
126
+ className: b,
127
+ children: /* @__PURE__ */ h(p, { placeholder: C.statePlaceholder })
128
+ }), /* @__PURE__ */ h(u, { children: x.state.options.map((e) => /* @__PURE__ */ h(d, {
129
+ value: e.value,
130
+ children: e.label
131
+ }, e.value)) })]
132
+ })]
133
+ }),
134
+ /* @__PURE__ */ g("div", {
135
+ className: "ttw:min-w-0",
136
+ children: [/* @__PURE__ */ h(y, {
137
+ htmlFor: "zipCode",
138
+ children: C.zipCode
139
+ }), /* @__PURE__ */ h(n, {
140
+ id: "zipCode",
141
+ value: x.zipCode.value,
142
+ onChange: (e) => x.zipCode.onValueChange(e.target.value),
143
+ disabled: w,
144
+ required: !0,
145
+ inputMode: "numeric"
146
+ })]
147
+ })
148
+ ]
149
+ }),
150
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
151
+ htmlFor: "mobilePhoneNumber",
152
+ children: C.mobilePhoneNumber
153
+ }), /* @__PURE__ */ h(n, {
154
+ id: "mobilePhoneNumber",
155
+ type: "tel",
156
+ value: x.mobilePhoneNumber.value,
157
+ onChange: (e) => x.mobilePhoneNumber.onValueChange(e.target.value),
158
+ disabled: w,
159
+ required: !0
160
+ })] }),
161
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
162
+ htmlFor: "workEmail",
163
+ children: C.workEmail
164
+ }), /* @__PURE__ */ h(n, {
165
+ id: "workEmail",
166
+ type: "email",
167
+ value: x.workEmail.value,
168
+ onChange: (e) => x.workEmail.onValueChange(e.target.value),
169
+ disabled: w,
170
+ required: !0
171
+ })] }),
172
+ /* @__PURE__ */ g("fieldset", {
173
+ "data-testid": S?.ownsOver25Question,
174
+ children: [/* @__PURE__ */ h("legend", {
175
+ id: "ownsOver25Legend",
176
+ className: "ttw:mb-2 ttw:text-sm ttw:font-medium",
177
+ children: C.ownsOver25Question
178
+ }), /* @__PURE__ */ g(s, {
179
+ value: x.ownsOver25Percent.value,
180
+ onValueChange: x.ownsOver25Percent.onValueChange,
181
+ className: "ttw:flex ttw:gap-4",
182
+ disabled: w,
183
+ "aria-labelledby": "ownsOver25Legend",
184
+ children: [/* @__PURE__ */ g("div", {
185
+ className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
186
+ children: [/* @__PURE__ */ h(c, {
187
+ value: "yes",
188
+ id: "ownsOver25Yes",
189
+ className: "ttw:cursor-pointer"
190
+ }), /* @__PURE__ */ h(o, {
191
+ htmlFor: "ownsOver25Yes",
192
+ className: "ttw:cursor-pointer",
193
+ children: C.ownsOver25Yes
194
+ })]
195
+ }), /* @__PURE__ */ g("div", {
196
+ className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
197
+ children: [/* @__PURE__ */ h(c, {
198
+ value: "no",
199
+ id: "ownsOver25No",
200
+ className: "ttw:cursor-pointer"
201
+ }), /* @__PURE__ */ h(o, {
202
+ htmlFor: "ownsOver25No",
203
+ className: "ttw:cursor-pointer",
204
+ children: C.ownsOver25No
205
+ })]
206
+ })]
207
+ })]
208
+ }),
209
+ O ? /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
210
+ htmlFor: "ownershipPercentage",
211
+ children: C.ownershipPercentage
212
+ }), /* @__PURE__ */ g(r, {
213
+ className: "ttw:w-32",
214
+ children: [/* @__PURE__ */ h(a, {
215
+ id: "ownershipPercentage",
216
+ type: "number",
217
+ min: 25,
218
+ max: 100,
219
+ "data-has-end-addon": "",
220
+ placeholder: C.ownershipPercentagePlaceholder,
221
+ value: x.ownershipPercentage.value ?? "",
222
+ onChange: (e) => x.ownershipPercentage.onValueChange(e.target.value === "" ? null : Number(e.target.value)),
223
+ disabled: w,
224
+ required: !0
225
+ }), /* @__PURE__ */ h(i, {
226
+ align: "inline-end",
227
+ "aria-hidden": !0,
228
+ children: "%"
229
+ })]
230
+ })] }) : null
231
+ ]
31
232
  });
32
233
  }
33
234
  //#endregion
34
- export { i as AboutYouSummary };
235
+ export { x as AboutYouEditForm };
@@ -1,28 +1,34 @@
1
+ import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
1
3
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js
2
- var e = {
3
- panelTitle: "Personal Details",
4
- editButtonAriaLabel: "Edit personal details",
5
- editTooltip: "Edit personal details",
6
- firstName: "First name",
7
- lastName: "Last name",
8
- dateOfBirth: "Date of birth",
9
- dateOfBirthPlaceholder: "Pick a date",
10
- ssn: "SSN",
11
- ssnShow: "Show",
12
- ssnHide: "Hide",
13
- homeAddress: "Home address",
14
- city: "City",
15
- state: "State",
16
- statePlaceholder: "Select state",
17
- zipCode: "ZIP code",
18
- mobilePhoneNumber: "Mobile phone number",
19
- workEmail: "Work email",
20
- ownsOver25Question: "Do you own 25% or more of the business?",
21
- ownsOver25SummaryLabel: "Owns 25% or more of the business",
22
- ownsOver25Yes: "Yes",
23
- ownsOver25No: "No",
24
- ownershipPercentage: "Ownership share (minimum 25%)",
25
- ownershipPercentagePlaceholder: "e.g., 25"
26
- };
4
+ function r({ label: r, value: i, testId: a, valueMonospace: o }) {
5
+ return i ? /* @__PURE__ */ n("div", {
6
+ className: "ttw:grid ttw:min-w-0 ttw:grid-cols-2 ttw:gap-4",
7
+ "data-testid": a,
8
+ children: [/* @__PURE__ */ t(e, {
9
+ component: "span",
10
+ variant: "body2",
11
+ className: "ttw:min-w-0 ttw:text-muted-foreground",
12
+ children: r
13
+ }), /* @__PURE__ */ t(e, {
14
+ component: "span",
15
+ variant: "body2",
16
+ className: `ttw:min-w-0 ttw:wrap-break-word ttw:whitespace-pre-line ttw:text-left ttw:font-medium ttw:text-foreground ${o ? "ttw:font-mono ttw:tracking-wider" : ""}`,
17
+ children: i
18
+ })]
19
+ }) : null;
20
+ }
21
+ function i({ rows: e, testIds: n }) {
22
+ return /* @__PURE__ */ t("div", {
23
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
24
+ "data-testid": n?.root,
25
+ children: e.map((e) => /* @__PURE__ */ t(r, {
26
+ label: e.label,
27
+ value: e.value,
28
+ testId: e.testId,
29
+ valueMonospace: e.valueMonospace
30
+ }, e.testId ?? e.label))
31
+ });
32
+ }
27
33
  //#endregion
28
- export { e as ABOUT_YOU_PANEL_LABELS_EN };
34
+ export { i as AboutYouSummary };
@@ -1,73 +1,28 @@
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 "./index21.js";
3
- import { AboutYouEditForm as s } from "./index19.js";
4
- import { AboutYouSummary as c } from "./index20.js";
5
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
- import { Pen as d } from "lucide-react";
7
1
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.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, testIds: T }) {
9
- let E = {
10
- ...o,
11
- ...g
12
- };
13
- return f ? /* @__PURE__ */ l(s, {
14
- fields: h,
15
- labels: E,
16
- isDisabled: _,
17
- ssnRevealed: v,
18
- ssnToggleAriaLabel: y,
19
- onToggleSsnVisibility: b,
20
- showOwnershipPercentage: x,
21
- maxBirthDate: S,
22
- ssnMaskedDisplay: C,
23
- ssnFormattedDisplay: w,
24
- testIds: T?.editForm
25
- }) : /* @__PURE__ */ u("section", {
26
- "data-testid": T?.root,
27
- className: "ttw:relative ttw:min-w-0 ttw:rounded-lg ttw:bg-surface-subtle ttw:p-4",
28
- children: [
29
- /* @__PURE__ */ u("div", {
30
- className: "ttw:mb-3 ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
31
- children: [/* @__PURE__ */ l(a, {
32
- component: "h3",
33
- variant: "h6",
34
- className: "ttw:font-semibold ttw:text-foreground",
35
- children: E.panelTitle
36
- }), /* @__PURE__ */ l(r, { children: /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l(i, {
37
- asChild: !0,
38
- onFocus: (e) => {
39
- e.preventDefault();
40
- },
41
- children: /* @__PURE__ */ l(e, {
42
- type: "button",
43
- variant: "ghost",
44
- size: "icon-sm",
45
- onClick: p,
46
- disabled: _,
47
- "aria-label": E.editButtonAriaLabel,
48
- "data-testid": T?.editButton,
49
- className: "ttw:rounded-lg ttw:bg-muted ttw:text-foreground ttw:hover:bg-primary/10 ttw:hover:text-foreground",
50
- children: /* @__PURE__ */ l(d, {
51
- className: "ttw:size-5",
52
- "aria-hidden": !0
53
- })
54
- })
55
- }), /* @__PURE__ */ l(n, {
56
- side: "top",
57
- sideOffset: 4,
58
- children: E.editTooltip
59
- })] }) })]
60
- }),
61
- /* @__PURE__ */ l("div", {
62
- className: "ttw:mb-3 ttw:border-b ttw:border-border",
63
- "aria-hidden": !0
64
- }),
65
- /* @__PURE__ */ l(c, {
66
- rows: m,
67
- testIds: T?.summary
68
- })
69
- ]
70
- });
71
- }
2
+ var e = {
3
+ panelTitle: "Personal Details",
4
+ editButtonAriaLabel: "Edit personal details",
5
+ editTooltip: "Edit personal details",
6
+ firstName: "First name",
7
+ lastName: "Last name",
8
+ dateOfBirth: "Date of birth",
9
+ dateOfBirthPlaceholder: "Pick a date",
10
+ ssn: "SSN",
11
+ ssnShow: "Show",
12
+ ssnHide: "Hide",
13
+ homeAddress: "Home address",
14
+ city: "City",
15
+ state: "State",
16
+ statePlaceholder: "Select state",
17
+ zipCode: "ZIP code",
18
+ mobilePhoneNumber: "Mobile phone number",
19
+ workEmail: "Work email",
20
+ ownsOver25Question: "Do you own 25% or more of the business?",
21
+ ownsOver25SummaryLabel: "Owns 25% or more of the business",
22
+ ownsOver25Yes: "Yes",
23
+ ownsOver25No: "No",
24
+ ownershipPercentage: "Ownership share (minimum 25%)",
25
+ ownershipPercentagePlaceholder: "e.g., 25"
26
+ };
72
27
  //#endregion
73
- export { o as ABOUT_YOU_PANEL_LABELS_EN, f as AboutYouPanel };
28
+ export { e as ABOUT_YOU_PANEL_LABELS_EN };
@@ -1,87 +1,76 @@
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 "./index6.js";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
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 "./index22.js";
3
+ import { AboutYouEditForm as s } from "./index20.js";
4
+ import { AboutYouSummary as c } from "./index21.js";
5
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
+ import { Pen as d } from "lucide-react";
4
7
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.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
- });
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
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",
31
+ 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, {
45
+ 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
+ })
80
57
  })
81
- ]
82
- })]
83
- })]
58
+ }), /* @__PURE__ */ l(n, {
59
+ side: "top",
60
+ sideOffset: 4,
61
+ children: k.editTooltip
62
+ })] }) })]
63
+ }),
64
+ /* @__PURE__ */ l("div", {
65
+ className: "ttw:mb-3 ttw:border-b ttw:border-border",
66
+ "aria-hidden": !0
67
+ }),
68
+ /* @__PURE__ */ l(c, {
69
+ rows: m,
70
+ testIds: O?.summary
71
+ })
72
+ ]
84
73
  });
85
74
  }
86
75
  //#endregion
87
- export { s as BusinessDisclosuresSection };
76
+ export { o as ABOUT_YOU_PANEL_LABELS_EN, f as AboutYouPanel };