@tesouro/embedded-components-react 0.7.40 → 0.7.42

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 (47) hide show
  1. package/README.md +2 -2
  2. package/dist/index.css +11 -0
  3. package/dist/index.d.ts +16 -14
  4. package/dist/lib/CounterpartsWidget.d.ts +16 -14
  5. package/dist/lib/CounterpartsWidgetPublic.d.ts +16 -14
  6. package/dist/lib/CustomersWidget.d.ts +16 -14
  7. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/mocks/acceptDisclosures.js +33 -28
  8. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/mocks/labels.js +6 -2
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/mocks/bankAccountOnboarding.js +40 -22
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/mocks/labels.js +14 -2
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +8 -10
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +274 -2
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +30 -4
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +21 -272
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +65 -26
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +341 -21
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +27 -65
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +26 -341
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +72 -27
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +85 -26
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +8 -74
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +55 -83
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +7 -6
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +42 -37
  30. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +30 -29
  31. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/constants.js +6 -6
  32. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsTable.js +143 -95
  33. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +60 -48
  34. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/labels.js +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +4 -4
  36. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +22 -15
  37. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +137 -135
  38. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/mocks/expenseManagement.js +163 -140
  39. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/mocks/labels.js +22 -16
  40. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/labels.js +12 -0
  41. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/settings.js +255 -88
  42. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +106 -108
  43. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  44. package/dist/scenarios/index.d.ts +1 -1
  45. package/package.json +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +0 -11
  47. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +0 -64
@@ -1,30 +1,69 @@
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";
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 { BUSINESS_DETAILS_PANEL_LABELS_EN as o } from "./index19.js";
3
+ import { BusinessDetailsEditForm as s } from "./index17.js";
4
+ import { BusinessDetailsSummary as c } from "./index18.js";
5
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
+ import { Pen as d } from "lucide-react";
3
7
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js
4
- function i({ label: i, value: a, testId: o }) {
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",
15
- children: a
16
- })] }) : null;
17
- }
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
- }, e.testId ?? e.label))
8
+ function f({ isEditing: f, onEditClick: p, summaryRows: m, editFields: h, labels: g, isDisabled: _, taxIdRequired: v, taxIdPlaceholder: y, taxIdHelpText: b, testIds: x }) {
9
+ let S = {
10
+ ...o,
11
+ ...g
12
+ };
13
+ return f ? /* @__PURE__ */ l(s, {
14
+ fields: h,
15
+ labels: S,
16
+ isDisabled: _,
17
+ taxIdRequired: v,
18
+ taxIdPlaceholder: y,
19
+ taxIdHelpText: b,
20
+ testIds: x?.editForm
21
+ }) : /* @__PURE__ */ u("section", {
22
+ "data-testid": x?.root,
23
+ className: "ttw:relative ttw:min-w-0 ttw:rounded-lg ttw:bg-surface-subtle ttw:p-4",
24
+ children: [
25
+ /* @__PURE__ */ u("div", {
26
+ className: "ttw:mb-3 ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
27
+ children: [/* @__PURE__ */ l(a, {
28
+ component: "h3",
29
+ variant: "h6",
30
+ className: "ttw:font-semibold ttw:text-foreground",
31
+ children: S.panelTitle
32
+ }), /* @__PURE__ */ l(r, { children: /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l(i, {
33
+ asChild: !0,
34
+ onFocus: (e) => {
35
+ e.preventDefault();
36
+ },
37
+ children: /* @__PURE__ */ l(e, {
38
+ type: "button",
39
+ variant: "ghost",
40
+ size: "icon-sm",
41
+ onClick: p,
42
+ disabled: _,
43
+ "aria-label": S.editButtonAriaLabel,
44
+ "data-testid": x?.editButton,
45
+ className: "ttw:rounded-lg ttw:bg-muted ttw:text-foreground ttw:hover:bg-primary/10 ttw:hover:text-foreground",
46
+ children: /* @__PURE__ */ l(d, {
47
+ className: "ttw:size-5",
48
+ "aria-hidden": !0
49
+ })
50
+ })
51
+ }), /* @__PURE__ */ l(n, {
52
+ side: "top",
53
+ sideOffset: 4,
54
+ children: S.editTooltip
55
+ })] }) })]
56
+ }),
57
+ /* @__PURE__ */ l("div", {
58
+ className: "ttw:mb-3 ttw:border-b ttw:border-border",
59
+ "aria-hidden": !0
60
+ }),
61
+ /* @__PURE__ */ l(c, {
62
+ rows: m,
63
+ testIds: x?.summary
64
+ })
65
+ ]
27
66
  });
28
67
  }
29
68
  //#endregion
30
- export { a as BusinessDetailsSummary };
69
+ export { o as BUSINESS_DETAILS_PANEL_LABELS_EN, f as BusinessDetailsPanel };
@@ -1,23 +1,343 @@
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 { 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";
1
6
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js
2
- var e = {
3
- panelTitle: "Business Details",
4
- editButtonAriaLabel: "Edit business details",
5
- editTooltip: "Edit business details",
6
- companyLegalName: "Legal company name",
7
- companyDbaName: "Doing business as (optional)",
8
- businessAddress: "Business address",
9
- city: "City",
10
- state: "State",
11
- statePlaceholder: "Select state",
12
- zipCode: "Postal code",
13
- companyPhoneNumber: "Company phone number",
14
- companyStructure: "Company structure",
15
- companyStructurePlaceholder: "Select structure",
16
- website: "Website (optional)",
17
- websiteInvalid: "Enter a valid website URL (no spaces).",
18
- taxId: "Tax ID (EIN)",
19
- naicsCode: "Industry (NAICS code)",
20
- naicsCodePlaceholder: "Search by code or industry"
21
- };
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, maxBirthDate: N, ssnMaskedDisplay: P, ssnFormattedDisplay: F, ssnRequired: I, ssnPlaceholder: L, ssnHelpText: R }) {
16
+ let [z, B] = v(!1), V = !k && !z, H = _(T.state.onBlur);
17
+ return /* @__PURE__ */ b("section", {
18
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
19
+ "data-testid": E?.root,
20
+ children: [
21
+ /* @__PURE__ */ b("div", { children: [
22
+ /* @__PURE__ */ y(C, {
23
+ htmlFor: "firstName",
24
+ children: D.firstName
25
+ }),
26
+ /* @__PURE__ */ y(n, {
27
+ id: "firstName",
28
+ value: T.firstName.value,
29
+ onChange: (e) => T.firstName.onValueChange(e.target.value),
30
+ onBlur: T.firstName.onBlur,
31
+ ...h("firstName", T.firstName.error),
32
+ disabled: O,
33
+ required: !0
34
+ }),
35
+ /* @__PURE__ */ y(m, {
36
+ fieldId: "firstName",
37
+ error: T.firstName.error
38
+ })
39
+ ] }),
40
+ /* @__PURE__ */ b("div", { children: [
41
+ /* @__PURE__ */ y(C, {
42
+ htmlFor: "lastName",
43
+ children: D.lastName
44
+ }),
45
+ /* @__PURE__ */ y(n, {
46
+ id: "lastName",
47
+ value: T.lastName.value,
48
+ onChange: (e) => T.lastName.onValueChange(e.target.value),
49
+ onBlur: T.lastName.onBlur,
50
+ ...h("lastName", T.lastName.error),
51
+ disabled: O,
52
+ required: !0
53
+ }),
54
+ /* @__PURE__ */ y(m, {
55
+ fieldId: "lastName",
56
+ error: T.lastName.error
57
+ })
58
+ ] }),
59
+ /* @__PURE__ */ b("div", { children: [
60
+ /* @__PURE__ */ y(C, {
61
+ htmlFor: "dateOfBirth",
62
+ children: D.dateOfBirth
63
+ }),
64
+ /* @__PURE__ */ y(t, {
65
+ id: "dateOfBirth",
66
+ value: T.dateOfBirth.value,
67
+ onChange: T.dateOfBirth.onValueChange,
68
+ placeholder: D.dateOfBirthPlaceholder,
69
+ disabled: O,
70
+ maxDate: N,
71
+ onBlur: T.dateOfBirth.onBlur,
72
+ ...h("dateOfBirth", T.dateOfBirth.error)
73
+ }),
74
+ /* @__PURE__ */ y(m, {
75
+ fieldId: "dateOfBirth",
76
+ error: T.dateOfBirth.error
77
+ })
78
+ ] }),
79
+ /* @__PURE__ */ b("div", { children: [
80
+ /* @__PURE__ */ y(C, {
81
+ htmlFor: "ssn",
82
+ children: D.ssn
83
+ }),
84
+ /* @__PURE__ */ b("div", {
85
+ className: "ttw:flex ttw:gap-2",
86
+ onBlur: g(T.ssn.onBlur),
87
+ children: [/* @__PURE__ */ y(n, {
88
+ id: "ssn",
89
+ className: "ttw:flex-1 ttw:font-mono ttw:tracking-wider",
90
+ type: "text",
91
+ value: V ? P : F,
92
+ onChange: (e) => T.ssn.onValueChange(e.target.value),
93
+ onFocus: () => B(!0),
94
+ onBlur: () => B(!1),
95
+ disabled: O,
96
+ autoComplete: "off",
97
+ inputMode: "numeric",
98
+ maxLength: 11,
99
+ required: I,
100
+ placeholder: L,
101
+ ...h("ssn", T.ssn.error, R ? "ssn-on-file" : void 0)
102
+ }), /* @__PURE__ */ y(e, {
103
+ type: "button",
104
+ variant: "outline",
105
+ size: "icon",
106
+ onClick: j,
107
+ disabled: O,
108
+ "aria-label": A,
109
+ children: y(k ? S : x, { className: "ttw:size-4" })
110
+ })]
111
+ }),
112
+ R ? /* @__PURE__ */ y("p", {
113
+ id: "ssn-on-file",
114
+ className: "ttw:mt-1 ttw:text-xs ttw:text-muted-foreground",
115
+ children: R
116
+ }) : null,
117
+ /* @__PURE__ */ y(m, {
118
+ fieldId: "ssn",
119
+ error: T.ssn.error
120
+ })
121
+ ] }),
122
+ /* @__PURE__ */ b("div", { children: [
123
+ /* @__PURE__ */ y(C, {
124
+ htmlFor: "homeAddress",
125
+ children: D.homeAddress
126
+ }),
127
+ /* @__PURE__ */ y(n, {
128
+ id: "homeAddress",
129
+ value: T.homeAddress.value,
130
+ onChange: (e) => T.homeAddress.onValueChange(e.target.value),
131
+ onBlur: T.homeAddress.onBlur,
132
+ ...h("homeAddress", T.homeAddress.error),
133
+ disabled: O,
134
+ required: !0
135
+ }),
136
+ /* @__PURE__ */ y(m, {
137
+ fieldId: "homeAddress",
138
+ error: T.homeAddress.error
139
+ })
140
+ ] }),
141
+ /* @__PURE__ */ b("div", {
142
+ className: "ttw:grid ttw:grid-cols-3 ttw:gap-4",
143
+ children: [
144
+ /* @__PURE__ */ b("div", {
145
+ className: "ttw:min-w-0",
146
+ children: [
147
+ /* @__PURE__ */ y(C, {
148
+ htmlFor: "city",
149
+ children: D.city
150
+ }),
151
+ /* @__PURE__ */ y(n, {
152
+ id: "city",
153
+ value: T.city.value,
154
+ onChange: (e) => T.city.onValueChange(e.target.value),
155
+ onBlur: T.city.onBlur,
156
+ ...h("city", T.city.error),
157
+ disabled: O,
158
+ required: !0
159
+ }),
160
+ /* @__PURE__ */ y(m, {
161
+ fieldId: "city",
162
+ error: T.city.error
163
+ })
164
+ ]
165
+ }),
166
+ /* @__PURE__ */ b("div", {
167
+ className: "ttw:min-w-0",
168
+ children: [
169
+ /* @__PURE__ */ y(C, {
170
+ htmlFor: "state",
171
+ children: D.state
172
+ }),
173
+ /* @__PURE__ */ b(l, {
174
+ value: T.state.value,
175
+ onValueChange: T.state.onValueChange,
176
+ onOpenChange: H.onOpenChange,
177
+ disabled: O,
178
+ children: [/* @__PURE__ */ y(f, {
179
+ id: "state",
180
+ className: w,
181
+ onBlur: H.onTriggerBlur,
182
+ ...h("state", T.state.error),
183
+ children: /* @__PURE__ */ y(p, { placeholder: D.statePlaceholder })
184
+ }), /* @__PURE__ */ y(u, { children: T.state.options.map((e) => /* @__PURE__ */ y(d, {
185
+ value: e.value,
186
+ children: e.label
187
+ }, e.value)) })]
188
+ }),
189
+ /* @__PURE__ */ y(m, {
190
+ fieldId: "state",
191
+ error: T.state.error
192
+ })
193
+ ]
194
+ }),
195
+ /* @__PURE__ */ b("div", {
196
+ className: "ttw:min-w-0",
197
+ children: [
198
+ /* @__PURE__ */ y(C, {
199
+ htmlFor: "zipCode",
200
+ children: D.zipCode
201
+ }),
202
+ /* @__PURE__ */ y(n, {
203
+ id: "zipCode",
204
+ value: T.zipCode.value,
205
+ onChange: (e) => T.zipCode.onValueChange(e.target.value),
206
+ onBlur: T.zipCode.onBlur,
207
+ ...h("zipCode", T.zipCode.error),
208
+ disabled: O,
209
+ required: !0,
210
+ inputMode: "numeric"
211
+ }),
212
+ /* @__PURE__ */ y(m, {
213
+ fieldId: "zipCode",
214
+ error: T.zipCode.error
215
+ })
216
+ ]
217
+ })
218
+ ]
219
+ }),
220
+ /* @__PURE__ */ b("div", { children: [
221
+ /* @__PURE__ */ y(C, {
222
+ htmlFor: "mobilePhoneNumber",
223
+ children: D.mobilePhoneNumber
224
+ }),
225
+ /* @__PURE__ */ y(n, {
226
+ id: "mobilePhoneNumber",
227
+ type: "tel",
228
+ value: T.mobilePhoneNumber.value,
229
+ onChange: (e) => T.mobilePhoneNumber.onValueChange(e.target.value),
230
+ onBlur: T.mobilePhoneNumber.onBlur,
231
+ ...h("mobilePhoneNumber", T.mobilePhoneNumber.error),
232
+ disabled: O,
233
+ required: !0
234
+ }),
235
+ /* @__PURE__ */ y(m, {
236
+ fieldId: "mobilePhoneNumber",
237
+ error: T.mobilePhoneNumber.error
238
+ })
239
+ ] }),
240
+ /* @__PURE__ */ b("div", { children: [
241
+ /* @__PURE__ */ y(C, {
242
+ htmlFor: "workEmail",
243
+ children: D.workEmail
244
+ }),
245
+ /* @__PURE__ */ y(n, {
246
+ id: "workEmail",
247
+ type: "email",
248
+ value: T.workEmail.value,
249
+ onChange: (e) => T.workEmail.onValueChange(e.target.value),
250
+ onBlur: T.workEmail.onBlur,
251
+ ...h("workEmail", T.workEmail.error),
252
+ disabled: O,
253
+ required: !0
254
+ }),
255
+ /* @__PURE__ */ y(m, {
256
+ fieldId: "workEmail",
257
+ error: T.workEmail.error
258
+ })
259
+ ] }),
260
+ /* @__PURE__ */ b("fieldset", {
261
+ "data-testid": E?.ownsOver25Question,
262
+ children: [
263
+ /* @__PURE__ */ y("legend", {
264
+ id: "ownsOver25Legend",
265
+ className: "ttw:mb-2 ttw:text-sm ttw:font-medium",
266
+ children: D.ownsOver25Question
267
+ }),
268
+ /* @__PURE__ */ b(s, {
269
+ value: T.ownsOver25Percent.value,
270
+ onValueChange: T.ownsOver25Percent.onValueChange,
271
+ className: "ttw:flex ttw:gap-4",
272
+ disabled: O,
273
+ "aria-labelledby": "ownsOver25Legend",
274
+ "aria-describedby": h("ownsOver25", T.ownsOver25Percent.error)["aria-describedby"],
275
+ onBlur: g(T.ownsOver25Percent.onBlur),
276
+ children: [/* @__PURE__ */ b("div", {
277
+ className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
278
+ children: [/* @__PURE__ */ y(c, {
279
+ value: "yes",
280
+ id: "ownsOver25Yes",
281
+ "aria-invalid": T.ownsOver25Percent.error ? !0 : void 0,
282
+ className: "ttw:cursor-pointer"
283
+ }), /* @__PURE__ */ y(o, {
284
+ htmlFor: "ownsOver25Yes",
285
+ className: "ttw:cursor-pointer",
286
+ children: D.ownsOver25Yes
287
+ })]
288
+ }), /* @__PURE__ */ b("div", {
289
+ className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
290
+ children: [/* @__PURE__ */ y(c, {
291
+ value: "no",
292
+ id: "ownsOver25No",
293
+ "aria-invalid": T.ownsOver25Percent.error ? !0 : void 0,
294
+ className: "ttw:cursor-pointer"
295
+ }), /* @__PURE__ */ y(o, {
296
+ htmlFor: "ownsOver25No",
297
+ className: "ttw:cursor-pointer",
298
+ children: D.ownsOver25No
299
+ })]
300
+ })]
301
+ }),
302
+ /* @__PURE__ */ y(m, {
303
+ fieldId: "ownsOver25",
304
+ error: T.ownsOver25Percent.error
305
+ })
306
+ ]
307
+ }),
308
+ M ? /* @__PURE__ */ b("div", { children: [
309
+ /* @__PURE__ */ y(C, {
310
+ htmlFor: "ownershipPercentage",
311
+ children: D.ownershipPercentage
312
+ }),
313
+ /* @__PURE__ */ b(r, {
314
+ className: "ttw:w-32",
315
+ children: [/* @__PURE__ */ y(a, {
316
+ id: "ownershipPercentage",
317
+ type: "number",
318
+ min: 25,
319
+ max: 100,
320
+ "data-has-end-addon": "",
321
+ placeholder: D.ownershipPercentagePlaceholder,
322
+ value: T.ownershipPercentage.value ?? "",
323
+ onChange: (e) => T.ownershipPercentage.onValueChange(e.target.value === "" ? null : Number(e.target.value)),
324
+ onBlur: T.ownershipPercentage.onBlur,
325
+ ...h("ownershipPercentage", T.ownershipPercentage.error),
326
+ disabled: O,
327
+ required: !0
328
+ }), /* @__PURE__ */ y(i, {
329
+ align: "inline-end",
330
+ "aria-hidden": !0,
331
+ children: "%"
332
+ })]
333
+ }),
334
+ /* @__PURE__ */ y(m, {
335
+ fieldId: "ownershipPercentage",
336
+ error: T.ownershipPercentage.error
337
+ })
338
+ ] }) : null
339
+ ]
340
+ });
341
+ }
22
342
  //#endregion
23
- export { e as BUSINESS_DETAILS_PANEL_LABELS_EN };
343
+ export { T as AboutYouEditForm };
@@ -1,69 +1,31 @@
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 { BUSINESS_DETAILS_PANEL_LABELS_EN as o } from "./index21.js";
3
- import { BusinessDetailsEditForm as s } from "./index19.js";
4
- import { BusinessDetailsSummary 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";
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";
7
3
  //#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: _, taxIdRequired: v, taxIdPlaceholder: y, taxIdHelpText: b, testIds: x }) {
9
- let S = {
10
- ...o,
11
- ...g
12
- };
13
- return f ? /* @__PURE__ */ l(s, {
14
- fields: h,
15
- labels: S,
16
- isDisabled: _,
17
- taxIdRequired: v,
18
- taxIdPlaceholder: y,
19
- taxIdHelpText: b,
20
- testIds: x?.editForm
21
- }) : /* @__PURE__ */ u("section", {
22
- "data-testid": x?.root,
23
- className: "ttw:relative ttw:min-w-0 ttw:rounded-lg ttw:bg-surface-subtle ttw:p-4",
24
- children: [
25
- /* @__PURE__ */ u("div", {
26
- className: "ttw:mb-3 ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
27
- children: [/* @__PURE__ */ l(a, {
28
- component: "h3",
29
- variant: "h6",
30
- className: "ttw:font-semibold ttw:text-foreground",
31
- children: S.panelTitle
32
- }), /* @__PURE__ */ l(r, { children: /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l(i, {
33
- asChild: !0,
34
- onFocus: (e) => {
35
- e.preventDefault();
36
- },
37
- children: /* @__PURE__ */ l(e, {
38
- type: "button",
39
- variant: "ghost",
40
- size: "icon-sm",
41
- onClick: p,
42
- disabled: _,
43
- "aria-label": S.editButtonAriaLabel,
44
- "data-testid": x?.editButton,
45
- className: "ttw:rounded-lg ttw:bg-muted ttw:text-foreground ttw:hover:bg-primary/10 ttw:hover:text-foreground",
46
- children: /* @__PURE__ */ l(d, {
47
- className: "ttw:size-5",
48
- "aria-hidden": !0
49
- })
50
- })
51
- }), /* @__PURE__ */ l(n, {
52
- side: "top",
53
- sideOffset: 4,
54
- children: S.editTooltip
55
- })] }) })]
56
- }),
57
- /* @__PURE__ */ l("div", {
58
- className: "ttw:mb-3 ttw:border-b ttw:border-border",
59
- "aria-hidden": !0
60
- }),
61
- /* @__PURE__ */ l(c, {
62
- rows: m,
63
- testIds: x?.summary
64
- })
65
- ]
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
+ }
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))
66
28
  });
67
29
  }
68
30
  //#endregion
69
- export { o as BUSINESS_DETAILS_PANEL_LABELS_EN, f as BusinessDetailsPanel };
31
+ export { a as AboutYouSummary };