@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,333 +1,278 @@
1
- import { Button as e, DatePicker as t, Input as n, InputGroup as r, InputGroupAddon as i, InputGroupInput as a, Label as o, Select as s, SelectContent as c, SelectItem as l, SelectTrigger as u, SelectValue as d, Separator as f } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { OnboardingShellOverlayPortal as p } from "../../../shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js";
3
- import "../../../shared/ui/dist/index.js";
4
- import { FieldError as m, fieldErrorAria as h, onCompositeBlur as g, selectBlurHandlers as _ } from "./index3.js";
5
- import * as v from "react";
6
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
7
- import { EyeIcon as x, EyeOffIcon as S, PlusIcon as C, UserPlusIcon as w, XIcon as T } 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, Select as s, SelectContent as c, SelectItem as l, SelectTrigger as u, SelectValue as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { FieldError as f, fieldErrorAria as p, onCompositeBlur as m, selectBlurHandlers as h } from "./index3.js";
3
+ import * as g from "react";
4
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
5
+ import { EyeIcon as b, EyeOffIcon as x } from "lucide-react";
8
6
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js
9
- function E({ htmlFor: e, children: t }) {
10
- return /* @__PURE__ */ y(o, {
7
+ function S({ htmlFor: e, children: t }) {
8
+ return /* @__PURE__ */ v(o, {
11
9
  htmlFor: e,
12
10
  className: "ttw:mb-1 ttw:block ttw:text-sm ttw:font-medium",
13
11
  children: t
14
12
  });
15
13
  }
16
- var D = "ttw:w-full";
17
- function O({ fields: o, display: O, isExisting: k, isValid: A, isDisabled: j, labels: M, onCancel: N, onSubmit: P, onClose: F, ssnRevealed: I, ssnToggleAriaLabel: L, onToggleSsnVisibility: R, testIds: z }) {
18
- let [B, V] = v.useState(!1), H = !I && !B, U = _(o.state.onBlur), W = k ? M.saveOwnerSubmit : M.addOwnerSubmit;
19
- return /* @__PURE__ */ y(p, {
20
- expandContainer: !0,
21
- testIds: z?.overlay,
22
- children: /* @__PURE__ */ b("div", {
23
- className: "ttw:flex ttw:h-full ttw:w-full ttw:min-h-0 ttw:flex-col ttw:px-8 ttw:pb-8 ttw:pt-8",
24
- role: "dialog",
25
- "aria-modal": "true",
26
- "aria-labelledby": "additional-owner-form-title",
14
+ var C = "ttw:w-full";
15
+ function w({ fields: o, display: w, isDisabled: T, labels: E, ssnRevealed: D, ssnToggleAriaLabel: O, onToggleSsnVisibility: k }) {
16
+ let [A, j] = g.useState(!1), M = !D && !A, N = h(o.state.onBlur);
17
+ return /* @__PURE__ */ y(_, { children: [
18
+ /* @__PURE__ */ y("div", {
19
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-3",
20
+ children: [/* @__PURE__ */ y("div", { children: [
21
+ /* @__PURE__ */ y(S, {
22
+ htmlFor: "owner-first-name",
23
+ children: [E.firstName, E.requiredFieldMarker]
24
+ }),
25
+ /* @__PURE__ */ v(n, {
26
+ id: "owner-first-name",
27
+ value: o.firstName.value,
28
+ onChange: (e) => o.firstName.onValueChange(e.target.value),
29
+ onBlur: o.firstName.onBlur,
30
+ ...p("owner-first-name", o.firstName.error),
31
+ disabled: T,
32
+ required: !0
33
+ }),
34
+ /* @__PURE__ */ v(f, {
35
+ fieldId: "owner-first-name",
36
+ error: o.firstName.error
37
+ })
38
+ ] }), /* @__PURE__ */ y("div", { children: [
39
+ /* @__PURE__ */ y(S, {
40
+ htmlFor: "owner-last-name",
41
+ children: [E.lastName, E.requiredFieldMarker]
42
+ }),
43
+ /* @__PURE__ */ v(n, {
44
+ id: "owner-last-name",
45
+ value: o.lastName.value,
46
+ onChange: (e) => o.lastName.onValueChange(e.target.value),
47
+ onBlur: o.lastName.onBlur,
48
+ ...p("owner-last-name", o.lastName.error),
49
+ disabled: T,
50
+ required: !0
51
+ }),
52
+ /* @__PURE__ */ v(f, {
53
+ fieldId: "owner-last-name",
54
+ error: o.lastName.error
55
+ })
56
+ ] })]
57
+ }),
58
+ /* @__PURE__ */ y("div", { children: [
59
+ /* @__PURE__ */ y(S, {
60
+ htmlFor: "owner-dob",
61
+ children: [E.dateOfBirth, E.requiredFieldMarker]
62
+ }),
63
+ /* @__PURE__ */ v(t, {
64
+ id: "owner-dob",
65
+ value: o.dateOfBirth.value,
66
+ onChange: o.dateOfBirth.onValueChange,
67
+ placeholder: E.dateOfBirthPlaceholder,
68
+ disabled: T,
69
+ onBlur: o.dateOfBirth.onBlur,
70
+ required: !0,
71
+ ...p("owner-dob", o.dateOfBirth.error, o.dateOfBirth.error ? void 0 : "owner-dob-hint")
72
+ }),
73
+ o.dateOfBirth.error ? null : /* @__PURE__ */ v("p", {
74
+ id: "owner-dob-hint",
75
+ className: "ttw:mt-1 ttw:text-xs ttw:text-muted-foreground",
76
+ children: E.dateOfBirthHint
77
+ }),
78
+ /* @__PURE__ */ v(f, {
79
+ fieldId: "owner-dob",
80
+ error: o.dateOfBirth.error
81
+ })
82
+ ] }),
83
+ /* @__PURE__ */ y("div", { children: [
84
+ /* @__PURE__ */ y(S, {
85
+ htmlFor: "owner-ssn",
86
+ children: [E.ssn, w.ssnRequired ? E.requiredFieldMarker : null]
87
+ }),
88
+ /* @__PURE__ */ y("div", {
89
+ className: "ttw:flex ttw:gap-2",
90
+ onBlur: m(o.ssn.onBlur),
91
+ children: [/* @__PURE__ */ v(n, {
92
+ id: "owner-ssn",
93
+ className: "ttw:flex-1 ttw:font-mono ttw:tracking-wider",
94
+ type: "text",
95
+ value: M ? w.ssnMaskedDisplay : w.ssnFormattedDisplay,
96
+ onChange: (e) => o.ssn.onValueChange(e.target.value),
97
+ onFocus: () => j(!0),
98
+ onBlur: () => j(!1),
99
+ disabled: T,
100
+ autoComplete: "off",
101
+ inputMode: "numeric",
102
+ maxLength: 11,
103
+ required: w.ssnRequired,
104
+ placeholder: w.ssnPlaceholder,
105
+ ...p("owner-ssn", o.ssn.error, w.ssnHelpText ? "owner-ssn-on-file" : void 0)
106
+ }), /* @__PURE__ */ v(e, {
107
+ type: "button",
108
+ variant: "outline",
109
+ size: "icon",
110
+ onClick: k,
111
+ disabled: T,
112
+ "aria-label": O,
113
+ children: v(D ? x : b, { className: "ttw:size-4" })
114
+ })]
115
+ }),
116
+ w.ssnHelpText ? /* @__PURE__ */ v("p", {
117
+ id: "owner-ssn-on-file",
118
+ className: "ttw:mt-1 ttw:text-xs ttw:text-muted-foreground",
119
+ children: w.ssnHelpText
120
+ }) : null,
121
+ /* @__PURE__ */ v(f, {
122
+ fieldId: "owner-ssn",
123
+ error: o.ssn.error
124
+ })
125
+ ] }),
126
+ /* @__PURE__ */ y("div", { children: [
127
+ /* @__PURE__ */ y(S, {
128
+ htmlFor: "owner-home-address",
129
+ children: [E.homeAddress, E.requiredFieldMarker]
130
+ }),
131
+ /* @__PURE__ */ v(n, {
132
+ id: "owner-home-address",
133
+ value: o.homeAddress.value,
134
+ onChange: (e) => o.homeAddress.onValueChange(e.target.value),
135
+ onBlur: o.homeAddress.onBlur,
136
+ ...p("owner-home-address", o.homeAddress.error),
137
+ disabled: T,
138
+ required: !0
139
+ }),
140
+ /* @__PURE__ */ v(f, {
141
+ fieldId: "owner-home-address",
142
+ error: o.homeAddress.error
143
+ })
144
+ ] }),
145
+ /* @__PURE__ */ y("div", {
146
+ className: "ttw:grid ttw:grid-cols-3 ttw:gap-3",
27
147
  children: [
28
- /* @__PURE__ */ b("div", {
29
- className: "ttw:relative ttw:shrink-0",
148
+ /* @__PURE__ */ y("div", {
149
+ className: "ttw:min-w-0",
30
150
  children: [
31
- /* @__PURE__ */ y(e, {
32
- type: "button",
33
- variant: "ghost",
34
- size: "icon-sm",
35
- onClick: F,
36
- disabled: j,
37
- "aria-label": M.close,
38
- className: "ttw:absolute ttw:top-0 ttw:right-0",
39
- children: /* @__PURE__ */ y(T, { className: "ttw:size-4" })
151
+ /* @__PURE__ */ y(S, {
152
+ htmlFor: "owner-city",
153
+ children: [E.city, E.requiredFieldMarker]
40
154
  }),
41
- /* @__PURE__ */ y("div", {
42
- className: "ttw:mb-3 ttw:flex ttw:size-10 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-primary/10",
43
- "aria-hidden": !0,
44
- children: /* @__PURE__ */ y(w, { className: "ttw:size-5 ttw:text-primary" })
155
+ /* @__PURE__ */ v(n, {
156
+ id: "owner-city",
157
+ value: o.city.value,
158
+ onChange: (e) => o.city.onValueChange(e.target.value),
159
+ onBlur: o.city.onBlur,
160
+ ...p("owner-city", o.city.error),
161
+ disabled: T,
162
+ required: !0
45
163
  }),
46
- /* @__PURE__ */ y("h2", {
47
- id: "additional-owner-form-title",
48
- className: "ttw:pr-10 ttw:text-xl ttw:font-semibold ttw:tracking-tight",
49
- children: k ? M.formHeadingEdit : M.formHeadingAdd
164
+ /* @__PURE__ */ v(f, {
165
+ fieldId: "owner-city",
166
+ error: o.city.error
50
167
  })
51
168
  ]
52
169
  }),
53
- /* @__PURE__ */ y(f, { className: "ttw:my-4 ttw:shrink-0" }),
54
- /* @__PURE__ */ b("div", {
55
- className: "ttw:flex ttw:min-h-0 ttw:flex-1 ttw:flex-col ttw:gap-3 ttw:overflow-y-auto ttw:pb-4",
170
+ /* @__PURE__ */ y("div", {
171
+ className: "ttw:min-w-0",
56
172
  children: [
57
- /* @__PURE__ */ b("div", {
58
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-3",
59
- children: [/* @__PURE__ */ b("div", { children: [
60
- /* @__PURE__ */ b(E, {
61
- htmlFor: "owner-first-name",
62
- children: [M.firstName, M.requiredFieldMarker]
63
- }),
64
- /* @__PURE__ */ y(n, {
65
- id: "owner-first-name",
66
- value: o.firstName.value,
67
- onChange: (e) => o.firstName.onValueChange(e.target.value),
68
- onBlur: o.firstName.onBlur,
69
- ...h("owner-first-name", o.firstName.error),
70
- disabled: j,
71
- required: !0
72
- }),
73
- /* @__PURE__ */ y(m, {
74
- fieldId: "owner-first-name",
75
- error: o.firstName.error
76
- })
77
- ] }), /* @__PURE__ */ b("div", { children: [
78
- /* @__PURE__ */ b(E, {
79
- htmlFor: "owner-last-name",
80
- children: [M.lastName, M.requiredFieldMarker]
81
- }),
82
- /* @__PURE__ */ y(n, {
83
- id: "owner-last-name",
84
- value: o.lastName.value,
85
- onChange: (e) => o.lastName.onValueChange(e.target.value),
86
- onBlur: o.lastName.onBlur,
87
- ...h("owner-last-name", o.lastName.error),
88
- disabled: j,
89
- required: !0
90
- }),
91
- /* @__PURE__ */ y(m, {
92
- fieldId: "owner-last-name",
93
- error: o.lastName.error
94
- })
95
- ] })]
173
+ /* @__PURE__ */ y(S, {
174
+ htmlFor: "owner-state",
175
+ children: [E.state, E.requiredFieldMarker]
96
176
  }),
97
- /* @__PURE__ */ b("div", { children: [
98
- /* @__PURE__ */ b(E, {
99
- htmlFor: "owner-dob",
100
- children: [M.dateOfBirth, M.requiredFieldMarker]
101
- }),
102
- /* @__PURE__ */ y(t, {
103
- id: "owner-dob",
104
- value: o.dateOfBirth.value,
105
- onChange: o.dateOfBirth.onValueChange,
106
- placeholder: M.dateOfBirthPlaceholder,
107
- disabled: j,
108
- maxDate: O.maxBirthDate,
109
- onBlur: o.dateOfBirth.onBlur,
110
- ...h("owner-dob", o.dateOfBirth.error)
111
- }),
112
- /* @__PURE__ */ y(m, {
113
- fieldId: "owner-dob",
114
- error: o.dateOfBirth.error
115
- })
116
- ] }),
117
- /* @__PURE__ */ b("div", { children: [
118
- /* @__PURE__ */ b(E, {
119
- htmlFor: "owner-ssn",
120
- children: [M.ssn, O.ssnRequired ? M.requiredFieldMarker : null]
121
- }),
122
- /* @__PURE__ */ b("div", {
123
- className: "ttw:flex ttw:gap-2",
124
- onBlur: g(o.ssn.onBlur),
125
- children: [/* @__PURE__ */ y(n, {
126
- id: "owner-ssn",
127
- className: "ttw:flex-1 ttw:font-mono ttw:tracking-wider",
128
- type: "text",
129
- value: H ? O.ssnMaskedDisplay : O.ssnFormattedDisplay,
130
- onChange: (e) => o.ssn.onValueChange(e.target.value),
131
- onFocus: () => V(!0),
132
- onBlur: () => V(!1),
133
- disabled: j,
134
- autoComplete: "off",
135
- inputMode: "numeric",
136
- maxLength: 11,
137
- required: O.ssnRequired,
138
- placeholder: O.ssnPlaceholder,
139
- ...h("owner-ssn", o.ssn.error, O.ssnHelpText ? "owner-ssn-on-file" : void 0)
140
- }), /* @__PURE__ */ y(e, {
141
- type: "button",
142
- variant: "outline",
143
- size: "icon",
144
- onClick: R,
145
- disabled: j,
146
- "aria-label": L,
147
- children: y(I ? S : x, { className: "ttw:size-4" })
148
- })]
149
- }),
150
- O.ssnHelpText ? /* @__PURE__ */ y("p", {
151
- id: "owner-ssn-on-file",
152
- className: "ttw:mt-1 ttw:text-xs ttw:text-muted-foreground",
153
- children: O.ssnHelpText
154
- }) : null,
155
- /* @__PURE__ */ y(m, {
156
- fieldId: "owner-ssn",
157
- error: o.ssn.error
158
- })
159
- ] }),
160
- /* @__PURE__ */ b("div", { children: [
161
- /* @__PURE__ */ b(E, {
162
- htmlFor: "owner-home-address",
163
- children: [M.homeAddress, M.requiredFieldMarker]
164
- }),
165
- /* @__PURE__ */ y(n, {
166
- id: "owner-home-address",
167
- value: o.homeAddress.value,
168
- onChange: (e) => o.homeAddress.onValueChange(e.target.value),
169
- onBlur: o.homeAddress.onBlur,
170
- ...h("owner-home-address", o.homeAddress.error),
171
- disabled: j,
172
- required: !0
173
- }),
174
- /* @__PURE__ */ y(m, {
175
- fieldId: "owner-home-address",
176
- error: o.homeAddress.error
177
- })
178
- ] }),
179
- /* @__PURE__ */ b("div", {
180
- className: "ttw:grid ttw:grid-cols-3 ttw:gap-3",
181
- children: [
182
- /* @__PURE__ */ b("div", {
183
- className: "ttw:min-w-0",
184
- children: [
185
- /* @__PURE__ */ b(E, {
186
- htmlFor: "owner-city",
187
- children: [M.city, M.requiredFieldMarker]
188
- }),
189
- /* @__PURE__ */ y(n, {
190
- id: "owner-city",
191
- value: o.city.value,
192
- onChange: (e) => o.city.onValueChange(e.target.value),
193
- onBlur: o.city.onBlur,
194
- ...h("owner-city", o.city.error),
195
- disabled: j,
196
- required: !0
197
- }),
198
- /* @__PURE__ */ y(m, {
199
- fieldId: "owner-city",
200
- error: o.city.error
201
- })
202
- ]
203
- }),
204
- /* @__PURE__ */ b("div", {
205
- className: "ttw:min-w-0",
206
- children: [
207
- /* @__PURE__ */ b(E, {
208
- htmlFor: "owner-state",
209
- children: [M.state, M.requiredFieldMarker]
210
- }),
211
- /* @__PURE__ */ b(s, {
212
- value: o.state.value,
213
- onValueChange: o.state.onValueChange,
214
- onOpenChange: U.onOpenChange,
215
- disabled: j,
216
- children: [/* @__PURE__ */ y(u, {
217
- id: "owner-state",
218
- className: D,
219
- onBlur: U.onTriggerBlur,
220
- ...h("owner-state", o.state.error),
221
- children: /* @__PURE__ */ y(d, { placeholder: M.statePlaceholder })
222
- }), /* @__PURE__ */ y(c, { children: o.state.options.map((e) => /* @__PURE__ */ y(l, {
223
- value: e.value,
224
- children: e.label
225
- }, e.value)) })]
226
- }),
227
- /* @__PURE__ */ y(m, {
228
- fieldId: "owner-state",
229
- error: o.state.error
230
- })
231
- ]
232
- }),
233
- /* @__PURE__ */ b("div", {
234
- className: "ttw:min-w-0",
235
- children: [
236
- /* @__PURE__ */ b(E, {
237
- htmlFor: "owner-zip",
238
- children: [M.zipCode, M.requiredFieldMarker]
239
- }),
240
- /* @__PURE__ */ y(n, {
241
- id: "owner-zip",
242
- value: o.zipCode.value,
243
- onChange: (e) => o.zipCode.onValueChange(e.target.value),
244
- onBlur: o.zipCode.onBlur,
245
- ...h("owner-zip", o.zipCode.error),
246
- disabled: j,
247
- required: !0,
248
- inputMode: "numeric"
249
- }),
250
- /* @__PURE__ */ y(m, {
251
- fieldId: "owner-zip",
252
- error: o.zipCode.error
253
- })
254
- ]
255
- })
256
- ]
177
+ /* @__PURE__ */ y(s, {
178
+ value: o.state.value,
179
+ onValueChange: o.state.onValueChange,
180
+ onOpenChange: N.onOpenChange,
181
+ disabled: T,
182
+ children: [/* @__PURE__ */ v(u, {
183
+ id: "owner-state",
184
+ className: C,
185
+ onBlur: N.onTriggerBlur,
186
+ ...p("owner-state", o.state.error),
187
+ children: /* @__PURE__ */ v(d, { placeholder: E.statePlaceholder })
188
+ }), /* @__PURE__ */ v(c, { children: o.state.options.map((e) => /* @__PURE__ */ v(l, {
189
+ value: e.value,
190
+ children: e.label
191
+ }, e.value)) })]
257
192
  }),
258
- /* @__PURE__ */ b("div", { children: [
259
- /* @__PURE__ */ b(E, {
260
- htmlFor: "owner-phone",
261
- children: [M.mobilePhoneNumber, M.requiredFieldMarker]
262
- }),
263
- /* @__PURE__ */ y(n, {
264
- id: "owner-phone",
265
- type: "tel",
266
- value: o.mobilePhoneNumber.value,
267
- onChange: (e) => o.mobilePhoneNumber.onValueChange(e.target.value),
268
- onBlur: o.mobilePhoneNumber.onBlur,
269
- ...h("owner-phone", o.mobilePhoneNumber.error),
270
- disabled: j,
271
- required: !0
272
- }),
273
- /* @__PURE__ */ y(m, {
274
- fieldId: "owner-phone",
275
- error: o.mobilePhoneNumber.error
276
- })
277
- ] }),
278
- /* @__PURE__ */ b("div", { children: [
279
- /* @__PURE__ */ b(E, {
280
- htmlFor: "owner-ownership",
281
- children: [M.ownershipPercentage, M.requiredFieldMarker]
282
- }),
283
- /* @__PURE__ */ b(r, {
284
- className: "ttw:w-32",
285
- children: [/* @__PURE__ */ y(a, {
286
- id: "owner-ownership",
287
- type: "number",
288
- min: 25,
289
- max: 100,
290
- "data-has-end-addon": "",
291
- placeholder: M.ownershipPercentagePlaceholder,
292
- value: o.ownershipPercentage.value ?? "",
293
- onChange: (e) => o.ownershipPercentage.onValueChange(e.target.value === "" ? null : Number(e.target.value)),
294
- onBlur: o.ownershipPercentage.onBlur,
295
- ...h("owner-ownership", o.ownershipPercentage.error),
296
- disabled: j,
297
- required: !0
298
- }), /* @__PURE__ */ y(i, {
299
- align: "inline-end",
300
- "aria-hidden": !0,
301
- children: M.percentSuffix
302
- })]
303
- }),
304
- /* @__PURE__ */ y(m, {
305
- fieldId: "owner-ownership",
306
- error: o.ownershipPercentage.error
307
- })
308
- ] })
193
+ /* @__PURE__ */ v(f, {
194
+ fieldId: "owner-state",
195
+ error: o.state.error
196
+ })
309
197
  ]
310
198
  }),
311
- /* @__PURE__ */ y(f, { className: "ttw:my-4 ttw:shrink-0" }),
312
- /* @__PURE__ */ b("div", {
313
- className: "ttw:flex ttw:shrink-0 ttw:justify-end ttw:gap-3",
314
- children: [/* @__PURE__ */ y(e, {
315
- type: "button",
316
- variant: "outline",
317
- onClick: N,
318
- disabled: j,
319
- children: M.cancel
320
- }), /* @__PURE__ */ b(e, {
321
- type: "button",
322
- onClick: P,
323
- disabled: j || !A,
324
- className: "ttw:gap-1.5",
325
- children: [W, /* @__PURE__ */ y(C, { className: "ttw:size-4" })]
326
- })]
199
+ /* @__PURE__ */ y("div", {
200
+ className: "ttw:min-w-0",
201
+ children: [
202
+ /* @__PURE__ */ y(S, {
203
+ htmlFor: "owner-zip",
204
+ children: [E.zipCode, E.requiredFieldMarker]
205
+ }),
206
+ /* @__PURE__ */ v(n, {
207
+ id: "owner-zip",
208
+ value: o.zipCode.value,
209
+ onChange: (e) => o.zipCode.onValueChange(e.target.value),
210
+ onBlur: o.zipCode.onBlur,
211
+ ...p("owner-zip", o.zipCode.error),
212
+ disabled: T,
213
+ required: !0,
214
+ inputMode: "numeric"
215
+ }),
216
+ /* @__PURE__ */ v(f, {
217
+ fieldId: "owner-zip",
218
+ error: o.zipCode.error
219
+ })
220
+ ]
327
221
  })
328
222
  ]
329
- })
330
- });
223
+ }),
224
+ /* @__PURE__ */ y("div", { children: [
225
+ /* @__PURE__ */ y(S, {
226
+ htmlFor: "owner-phone",
227
+ children: [E.mobilePhoneNumber, E.requiredFieldMarker]
228
+ }),
229
+ /* @__PURE__ */ v(n, {
230
+ id: "owner-phone",
231
+ type: "tel",
232
+ value: o.mobilePhoneNumber.value,
233
+ onChange: (e) => o.mobilePhoneNumber.onValueChange(e.target.value),
234
+ onBlur: o.mobilePhoneNumber.onBlur,
235
+ ...p("owner-phone", o.mobilePhoneNumber.error),
236
+ disabled: T,
237
+ required: !0
238
+ }),
239
+ /* @__PURE__ */ v(f, {
240
+ fieldId: "owner-phone",
241
+ error: o.mobilePhoneNumber.error
242
+ })
243
+ ] }),
244
+ /* @__PURE__ */ y("div", { children: [
245
+ /* @__PURE__ */ y(S, {
246
+ htmlFor: "owner-ownership",
247
+ children: [E.ownershipPercentage, E.requiredFieldMarker]
248
+ }),
249
+ /* @__PURE__ */ y(r, {
250
+ className: "ttw:w-32",
251
+ children: [/* @__PURE__ */ v(a, {
252
+ id: "owner-ownership",
253
+ type: "number",
254
+ min: 25,
255
+ max: 100,
256
+ "data-has-end-addon": "",
257
+ placeholder: E.ownershipPercentagePlaceholder,
258
+ value: o.ownershipPercentage.value ?? "",
259
+ onChange: (e) => o.ownershipPercentage.onValueChange(e.target.value === "" ? null : Number(e.target.value)),
260
+ onBlur: o.ownershipPercentage.onBlur,
261
+ ...p("owner-ownership", o.ownershipPercentage.error),
262
+ disabled: T,
263
+ required: !0
264
+ }), /* @__PURE__ */ v(i, {
265
+ align: "inline-end",
266
+ "aria-hidden": !0,
267
+ children: E.percentSuffix
268
+ })]
269
+ }),
270
+ /* @__PURE__ */ v(f, {
271
+ fieldId: "owner-ownership",
272
+ error: o.ownershipPercentage.error
273
+ })
274
+ ] })
275
+ ] });
331
276
  }
332
277
  //#endregion
333
- export { O as AdditionalOwnerFormOverlay };
278
+ export { w as AdditionalOwnerFieldsGrid };
@@ -1,4 +1,83 @@
1
+ import { Button as e, Typography as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { AdditionalOwnerFieldsGrid as n } from "./index4.js";
3
+ import { useId as r } from "react";
4
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ import { CircleAlertIcon as o, Trash2Icon as s } from "lucide-react";
1
6
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js
2
- var e = (e) => `Ending in ${e}. Leave blank to keep it, or enter it again to change it.`;
7
+ function c({ heading: c, submitLabel: l, editor: u, isDisabled: d, labels: f, onDelete: p, testIds: m }) {
8
+ let h = r();
9
+ return /* @__PURE__ */ a("section", {
10
+ "aria-labelledby": h,
11
+ "data-testid": m?.root,
12
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-md ttw:border ttw:border-primary ttw:bg-background ttw:p-4",
13
+ children: [
14
+ /* @__PURE__ */ i(t, {
15
+ component: "h4",
16
+ variant: "h6",
17
+ id: h,
18
+ tabIndex: -1,
19
+ "data-owner-panel-heading": "",
20
+ "data-needs-attention": "",
21
+ className: "ttw:font-semibold ttw:text-foreground",
22
+ children: c
23
+ }),
24
+ /* @__PURE__ */ i(t, {
25
+ variant: "body2",
26
+ className: "ttw:text-muted-foreground",
27
+ children: f.allFieldsRequiredNote
28
+ }),
29
+ u.showMissingFieldsAlert ? /* @__PURE__ */ a("div", {
30
+ role: "alert",
31
+ className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-xl ttw:border ttw:border-destructive/30 ttw:bg-destructive/15 ttw:px-6 ttw:py-4 ttw:text-sm ttw:text-destructive",
32
+ children: [/* @__PURE__ */ i(o, {
33
+ "aria-hidden": !0,
34
+ className: "ttw:size-5 ttw:shrink-0"
35
+ }), /* @__PURE__ */ i("span", { children: f.missingFieldsAlert })]
36
+ }) : null,
37
+ /* @__PURE__ */ i("div", {
38
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
39
+ children: /* @__PURE__ */ i(n, {
40
+ fields: u.fields,
41
+ display: u.display,
42
+ isDisabled: d,
43
+ labels: f,
44
+ ssnRevealed: u.ssnRevealed,
45
+ ssnToggleAriaLabel: u.ssnToggleAriaLabel,
46
+ onToggleSsnVisibility: u.onToggleSsnVisibility
47
+ })
48
+ }),
49
+ /* @__PURE__ */ a("div", {
50
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
51
+ children: [p ? /* @__PURE__ */ a(e, {
52
+ type: "button",
53
+ variant: "ghost",
54
+ onClick: p,
55
+ disabled: d,
56
+ "data-owner-delete-trigger": "",
57
+ className: "ttw:gap-1.5 ttw:text-foreground ttw:hover:text-foreground",
58
+ children: [/* @__PURE__ */ i(s, {
59
+ className: "ttw:size-4",
60
+ "aria-hidden": !0
61
+ }), f.deleteOwner]
62
+ }) : /* @__PURE__ */ i("span", {}), /* @__PURE__ */ a("div", {
63
+ className: "ttw:flex ttw:gap-3",
64
+ children: [/* @__PURE__ */ i(e, {
65
+ type: "button",
66
+ variant: "outline",
67
+ onClick: u.onCancel,
68
+ disabled: d,
69
+ children: f.cancel
70
+ }), /* @__PURE__ */ i(e, {
71
+ type: "button",
72
+ onClick: u.onSubmit,
73
+ disabled: d || !u.isValid,
74
+ "data-testid": m?.saveButton,
75
+ children: l
76
+ })]
77
+ })]
78
+ })
79
+ ]
80
+ });
81
+ }
3
82
  //#endregion
4
- export { e as IDENTIFIER_ON_FILE_TEMPLATE_EN };
83
+ export { c as AdditionalOwnerInlineEditor };