@tesouro/embedded-components-react 0.2.298 → 0.2.299

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 (39) hide show
  1. package/dist/index.css +6 -0
  2. package/dist/index.d.ts +107 -87
  3. package/dist/lib/CounterpartsWidget.d.ts +24 -4
  4. package/dist/lib/ReceivablesWidget.d.ts +20 -3
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +31 -27
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +2 -0
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +122 -149
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +163 -72
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +3 -3
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +52 -46
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +8 -2
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +98 -67
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +6 -1
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +7 -3
  15. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index7.js +4 -1
  16. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +12 -7
  17. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +17 -16
  20. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +103 -50
  22. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +2 -1
  23. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +2 -0
  24. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +126 -76
  25. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +12 -11
  26. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +6 -173
  27. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +173 -5
  28. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +5 -57
  29. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +51 -22
  30. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index14.js +24 -72
  31. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +76 -0
  32. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +13 -7
  33. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +53 -110
  34. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js +115 -51
  35. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js +53 -47
  36. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +44 -504
  37. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +480 -6
  38. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  39. package/package.json +1 -1
@@ -1,6 +1,480 @@
1
- import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "./index4.js";
3
- import "./index5.js";
4
- import "./index7.js";
5
- import "react";
6
- import "react/jsx-runtime";
1
+ import { Button as e, Checkbox as t, Input as n, Label as r, Separator as i, Typography as a } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { COUNTERPART_FORM_SHEET_LABELS_EN as o } from "./index2.js";
3
+ import { FieldError as s } from "./index4.js";
4
+ import { AchFieldGroup as c } from "./index5.js";
5
+ import { AddressFieldGroup as l } from "./index6.js";
6
+ import { CounterpartTypeChooser as u } from "./index7.js";
7
+ import { FormSheet as d } from "./index8.js";
8
+ import { useEffect as f, useId as p, useRef as m } from "react";
9
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
10
+ import { Plus as v } from "lucide-react";
11
+ //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js
12
+ var y = {
13
+ entityType: !0,
14
+ title: !0,
15
+ profileHeading: !0,
16
+ addressHeading: !0,
17
+ taxId: !0,
18
+ address: !0,
19
+ bankAccount: !0
20
+ };
21
+ function b({ show: e, sectionsToExpand: t }) {
22
+ return {
23
+ isAddressShown: e.address === !0 || e.address === "collapsible",
24
+ isAddressExpanded: e.address === !0 || t?.address === !0
25
+ };
26
+ }
27
+ function x(e) {
28
+ let t = m(null), n = m(e);
29
+ return f(() => {
30
+ e !== n.current && (n.current = e, (t.current?.querySelector("[aria-invalid=\"true\"]"))?.focus());
31
+ }, [e]), t;
32
+ }
33
+ function S(e) {
34
+ return {
35
+ ...o,
36
+ ...e,
37
+ address: {
38
+ ...o.address,
39
+ ...e?.address
40
+ },
41
+ ach: {
42
+ ...o.ach,
43
+ ...e?.accountHolderNameLabel !== void 0 && { accountHolderName: e.accountHolderNameLabel },
44
+ ...e?.routingNumberLabel !== void 0 && { routingNumber: e.routingNumberLabel },
45
+ ...e?.accountNumberLabel !== void 0 && { accountNumber: e.accountNumberLabel },
46
+ ...e?.ach
47
+ }
48
+ };
49
+ }
50
+ function C({ open: o, onOpenChange: f, mode: m, counterpartMode: C = "customer", values: w, errors: T, stateOptions: E, inProgress: D, submitDisabled: O, onChange: k, onAddressChange: A, onBankAccountChange: j, onSubmit: M, onCancel: N, sections: P, sectionsToExpand: F, onAddressExpand: I, labels: L }) {
51
+ let R = S(L), z = {
52
+ ...y,
53
+ ...P
54
+ }, B = p(), V = w.entityType === "organization", H = C === "customer", U = C === "vendor", { isAddressShown: W, isAddressExpanded: G } = b({
55
+ show: z,
56
+ sectionsToExpand: F
57
+ }), K = x(T), q = m === "edit" ? H ? R.editTitleCustomer : R.editTitleVendor : H ? R.createTitleCustomer : R.createTitleVendor, J = m === "create" ? H ? R.createDescriptionCustomer : R.createDescriptionVendor : void 0, Y = H ? R.customerTypeHeading : R.vendorTypeHeading, X = H ? R.customerTaxIdHelp : R.vendorTaxIdHelp;
58
+ return /* @__PURE__ */ g(d, {
59
+ open: o,
60
+ onOpenChange: f,
61
+ title: q,
62
+ description: J,
63
+ formError: T?.form,
64
+ inProgress: D,
65
+ submitDisabled: O,
66
+ submitLabel: m === "edit" ? R.saveButton : R.createButton,
67
+ cancelLabel: R.cancelButton,
68
+ onSubmit: M,
69
+ onCancel: N,
70
+ children: /* @__PURE__ */ _("div", {
71
+ ref: K,
72
+ style: { display: "contents" },
73
+ children: [
74
+ m === "create" && /* @__PURE__ */ g(u, {
75
+ value: w.entityType,
76
+ onChange: (e) => k({ entityType: e }),
77
+ variant: "pills",
78
+ labels: {
79
+ heading: Y,
80
+ organization: R.businessTypeOption,
81
+ organizationHint: R.businessTypeHint,
82
+ individual: R.personTypeOption,
83
+ individualHint: R.personTypeHint
84
+ }
85
+ }),
86
+ z.profileHeading && /* @__PURE__ */ g(a, {
87
+ variant: "body2",
88
+ className: "ttw:font-semibold",
89
+ children: R.profileHeading
90
+ }),
91
+ V ? /* @__PURE__ */ _("div", {
92
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
93
+ children: [
94
+ /* @__PURE__ */ g(r, {
95
+ htmlFor: `${B}-legal-name`,
96
+ children: R.businessNameLabel
97
+ }),
98
+ /* @__PURE__ */ g(n, {
99
+ id: `${B}-legal-name`,
100
+ autoFocus: !0,
101
+ value: w.legalName,
102
+ "aria-invalid": !!T?.legalName,
103
+ onChange: (e) => k({ legalName: e.target.value })
104
+ }),
105
+ /* @__PURE__ */ g(s, { message: T?.legalName })
106
+ ]
107
+ }) : /* @__PURE__ */ _("div", {
108
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
109
+ children: [/* @__PURE__ */ _("div", {
110
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
111
+ children: [
112
+ /* @__PURE__ */ g(r, {
113
+ htmlFor: `${B}-first-name`,
114
+ children: R.firstNameLabel
115
+ }),
116
+ /* @__PURE__ */ g(n, {
117
+ id: `${B}-first-name`,
118
+ autoFocus: !0,
119
+ value: w.firstName,
120
+ "aria-invalid": !!T?.firstName,
121
+ onChange: (e) => k({ firstName: e.target.value })
122
+ }),
123
+ /* @__PURE__ */ g(s, { message: T?.firstName })
124
+ ]
125
+ }), /* @__PURE__ */ _("div", {
126
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
127
+ children: [
128
+ /* @__PURE__ */ g(r, {
129
+ htmlFor: `${B}-last-name`,
130
+ children: R.lastNameLabel
131
+ }),
132
+ /* @__PURE__ */ g(n, {
133
+ id: `${B}-last-name`,
134
+ value: w.lastName,
135
+ "aria-invalid": !!T?.lastName,
136
+ onChange: (e) => k({ lastName: e.target.value })
137
+ }),
138
+ /* @__PURE__ */ g(s, { message: T?.lastName })
139
+ ]
140
+ })]
141
+ }),
142
+ !V && z.title && /* @__PURE__ */ _("div", {
143
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
144
+ children: [/* @__PURE__ */ g(r, {
145
+ htmlFor: `${B}-title`,
146
+ children: R.titleLabel
147
+ }), /* @__PURE__ */ g(n, {
148
+ id: `${B}-title`,
149
+ value: w.title,
150
+ onChange: (e) => k({ title: e.target.value })
151
+ })]
152
+ }),
153
+ /* @__PURE__ */ _("div", {
154
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
155
+ children: [/* @__PURE__ */ _("div", {
156
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
157
+ children: [
158
+ /* @__PURE__ */ g(r, {
159
+ htmlFor: `${B}-email`,
160
+ children: R.emailLabel
161
+ }),
162
+ /* @__PURE__ */ g(n, {
163
+ id: `${B}-email`,
164
+ type: "email",
165
+ value: w.email,
166
+ "aria-invalid": !!T?.email,
167
+ onChange: (e) => k({ email: e.target.value })
168
+ }),
169
+ /* @__PURE__ */ g(s, { message: T?.email })
170
+ ]
171
+ }), /* @__PURE__ */ _("div", {
172
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
173
+ children: [/* @__PURE__ */ g(r, {
174
+ htmlFor: `${B}-phone`,
175
+ children: R.phoneLabel
176
+ }), /* @__PURE__ */ g(n, {
177
+ id: `${B}-phone`,
178
+ value: w.phone,
179
+ onChange: (e) => k({ phone: e.target.value })
180
+ })]
181
+ })]
182
+ }),
183
+ z.taxId && /* @__PURE__ */ _("div", {
184
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
185
+ children: [
186
+ /* @__PURE__ */ g(r, {
187
+ htmlFor: `${B}-tax-id`,
188
+ children: R.taxIdLabel
189
+ }),
190
+ /* @__PURE__ */ g(n, {
191
+ id: `${B}-tax-id`,
192
+ value: w.taxId,
193
+ onChange: (e) => k({ taxId: e.target.value })
194
+ }),
195
+ /* @__PURE__ */ g(a, {
196
+ variant: "caption",
197
+ className: "ttw:text-muted-foreground",
198
+ children: X
199
+ })
200
+ ]
201
+ }),
202
+ H && /* @__PURE__ */ _(r, {
203
+ htmlFor: `${B}-reminders`,
204
+ className: "ttw:flex ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:p-3",
205
+ children: [/* @__PURE__ */ g(t, {
206
+ id: `${B}-reminders`,
207
+ checked: w.remindersEnabled,
208
+ onCheckedChange: (e) => k({ remindersEnabled: e === !0 })
209
+ }), /* @__PURE__ */ _("span", {
210
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
211
+ children: [/* @__PURE__ */ g("span", {
212
+ className: "ttw:text-sm ttw:font-medium",
213
+ children: R.paymentRemindersLabel
214
+ }), /* @__PURE__ */ g("span", {
215
+ className: "ttw:text-sm ttw:text-muted-foreground",
216
+ children: R.paymentRemindersDescription
217
+ })]
218
+ })]
219
+ }),
220
+ W && /* @__PURE__ */ _(h, { children: [z.addressHeading && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(i, { className: "ttw:my-1" }), /* @__PURE__ */ _("div", {
221
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
222
+ children: [/* @__PURE__ */ g(a, {
223
+ variant: "body2",
224
+ className: "ttw:font-semibold",
225
+ children: R.addressHeading
226
+ }), H && /* @__PURE__ */ g(a, {
227
+ variant: "body2",
228
+ className: "ttw:text-muted-foreground",
229
+ children: R.customerAddressDescription
230
+ })]
231
+ })] }), G ? /* @__PURE__ */ g(l, {
232
+ idPrefix: `${B}-address`,
233
+ values: w.address,
234
+ errors: T?.address,
235
+ stateOptions: E,
236
+ onChange: A,
237
+ labels: R.address
238
+ }) : /* @__PURE__ */ _(e, {
239
+ type: "button",
240
+ variant: "link",
241
+ className: "ttw:w-fit ttw:px-0",
242
+ onClick: I,
243
+ children: [/* @__PURE__ */ g(v, { className: "ttw:size-4" }), R.addAddress]
244
+ })] }),
245
+ U && z.bankAccount && /* @__PURE__ */ _(h, { children: [
246
+ /* @__PURE__ */ g(i, { className: "ttw:my-1" }),
247
+ /* @__PURE__ */ _("div", {
248
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
249
+ children: [/* @__PURE__ */ g(a, {
250
+ variant: "body2",
251
+ className: "ttw:font-semibold",
252
+ children: R.paymentMethodsHeading
253
+ }), /* @__PURE__ */ g(a, {
254
+ variant: "body2",
255
+ className: "ttw:text-muted-foreground",
256
+ children: R.paymentMethodsDescription
257
+ })]
258
+ }),
259
+ /* @__PURE__ */ g(c, {
260
+ idPrefix: `${B}-ach`,
261
+ values: w.bankAccount,
262
+ errors: T?.bankAccount,
263
+ onChange: (e) => j?.(e),
264
+ labels: R.ach
265
+ })
266
+ ] })
267
+ ]
268
+ })
269
+ });
270
+ }
271
+ function w({ mode: o, counterpartMode: d = "customer", values: f, errors: m, stateOptions: C, onChange: w, onAddressChange: T, onBankAccountChange: E, sections: D, sectionsToExpand: O, onAddressExpand: k, labels: A }) {
272
+ let j = S(A), M = {
273
+ ...y,
274
+ ...D
275
+ }, N = p(), P = f.entityType === "organization", F = d === "customer", I = d === "vendor", { isAddressShown: L, isAddressExpanded: R } = b({
276
+ show: M,
277
+ sectionsToExpand: O
278
+ }), z = x(m), B = F ? j.customerTypeHeading : j.vendorTypeHeading, V = F ? j.customerTaxIdHelp : j.vendorTaxIdHelp;
279
+ return /* @__PURE__ */ _("div", {
280
+ ref: z,
281
+ style: { display: "contents" },
282
+ children: [
283
+ o === "create" && M.entityType && /* @__PURE__ */ g(u, {
284
+ value: f.entityType,
285
+ onChange: (e) => w({ entityType: e }),
286
+ variant: "pills",
287
+ labels: {
288
+ heading: B,
289
+ organization: j.businessTypeOption,
290
+ organizationHint: j.businessTypeHint,
291
+ individual: j.personTypeOption,
292
+ individualHint: j.personTypeHint
293
+ }
294
+ }),
295
+ M.profileHeading && /* @__PURE__ */ g(a, {
296
+ variant: "body2",
297
+ className: "ttw:font-semibold",
298
+ children: j.profileHeading
299
+ }),
300
+ P ? /* @__PURE__ */ _("div", {
301
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
302
+ children: [
303
+ /* @__PURE__ */ g(r, {
304
+ htmlFor: `${N}-legal-name`,
305
+ children: j.businessNameLabel
306
+ }),
307
+ /* @__PURE__ */ g(n, {
308
+ id: `${N}-legal-name`,
309
+ autoFocus: !0,
310
+ value: f.legalName,
311
+ "aria-invalid": !!m?.legalName,
312
+ onChange: (e) => w({ legalName: e.target.value })
313
+ }),
314
+ /* @__PURE__ */ g(s, { message: m?.legalName })
315
+ ]
316
+ }) : /* @__PURE__ */ _("div", {
317
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
318
+ children: [/* @__PURE__ */ _("div", {
319
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
320
+ children: [
321
+ /* @__PURE__ */ g(r, {
322
+ htmlFor: `${N}-first-name`,
323
+ children: j.firstNameLabel
324
+ }),
325
+ /* @__PURE__ */ g(n, {
326
+ id: `${N}-first-name`,
327
+ autoFocus: !0,
328
+ value: f.firstName,
329
+ "aria-invalid": !!m?.firstName,
330
+ onChange: (e) => w({ firstName: e.target.value })
331
+ }),
332
+ /* @__PURE__ */ g(s, { message: m?.firstName })
333
+ ]
334
+ }), /* @__PURE__ */ _("div", {
335
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
336
+ children: [
337
+ /* @__PURE__ */ g(r, {
338
+ htmlFor: `${N}-last-name`,
339
+ children: j.lastNameLabel
340
+ }),
341
+ /* @__PURE__ */ g(n, {
342
+ id: `${N}-last-name`,
343
+ value: f.lastName,
344
+ "aria-invalid": !!m?.lastName,
345
+ onChange: (e) => w({ lastName: e.target.value })
346
+ }),
347
+ /* @__PURE__ */ g(s, { message: m?.lastName })
348
+ ]
349
+ })]
350
+ }),
351
+ !P && M.title && /* @__PURE__ */ _("div", {
352
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
353
+ children: [/* @__PURE__ */ g(r, {
354
+ htmlFor: `${N}-title`,
355
+ children: j.titleLabel
356
+ }), /* @__PURE__ */ g(n, {
357
+ id: `${N}-title`,
358
+ value: f.title,
359
+ onChange: (e) => w({ title: e.target.value })
360
+ })]
361
+ }),
362
+ /* @__PURE__ */ _("div", {
363
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
364
+ children: [/* @__PURE__ */ _("div", {
365
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
366
+ children: [
367
+ /* @__PURE__ */ g(r, {
368
+ htmlFor: `${N}-email`,
369
+ children: j.emailLabel
370
+ }),
371
+ /* @__PURE__ */ g(n, {
372
+ id: `${N}-email`,
373
+ type: "email",
374
+ value: f.email,
375
+ "aria-invalid": !!m?.email,
376
+ onChange: (e) => w({ email: e.target.value })
377
+ }),
378
+ /* @__PURE__ */ g(s, { message: m?.email })
379
+ ]
380
+ }), /* @__PURE__ */ _("div", {
381
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
382
+ children: [/* @__PURE__ */ g(r, {
383
+ htmlFor: `${N}-phone`,
384
+ children: j.phoneLabel
385
+ }), /* @__PURE__ */ g(n, {
386
+ id: `${N}-phone`,
387
+ value: f.phone,
388
+ onChange: (e) => w({ phone: e.target.value })
389
+ })]
390
+ })]
391
+ }),
392
+ M.taxId && /* @__PURE__ */ _("div", {
393
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
394
+ children: [
395
+ /* @__PURE__ */ g(r, {
396
+ htmlFor: `${N}-tax-id`,
397
+ children: j.taxIdLabel
398
+ }),
399
+ /* @__PURE__ */ g(n, {
400
+ id: `${N}-tax-id`,
401
+ value: f.taxId,
402
+ onChange: (e) => w({ taxId: e.target.value })
403
+ }),
404
+ /* @__PURE__ */ g(a, {
405
+ variant: "caption",
406
+ className: "ttw:text-muted-foreground",
407
+ children: V
408
+ })
409
+ ]
410
+ }),
411
+ F && /* @__PURE__ */ _(r, {
412
+ htmlFor: `${N}-reminders`,
413
+ className: "ttw:flex ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:p-3",
414
+ children: [/* @__PURE__ */ g(t, {
415
+ id: `${N}-reminders`,
416
+ checked: f.remindersEnabled,
417
+ onCheckedChange: (e) => w({ remindersEnabled: e === !0 })
418
+ }), /* @__PURE__ */ _("span", {
419
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
420
+ children: [/* @__PURE__ */ g("span", {
421
+ className: "ttw:text-sm ttw:font-medium",
422
+ children: j.paymentRemindersLabel
423
+ }), /* @__PURE__ */ g("span", {
424
+ className: "ttw:text-sm ttw:text-muted-foreground",
425
+ children: j.paymentRemindersDescription
426
+ })]
427
+ })]
428
+ }),
429
+ L && /* @__PURE__ */ _(h, { children: [M.addressHeading && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(i, { className: "ttw:my-1" }), /* @__PURE__ */ _("div", {
430
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
431
+ children: [/* @__PURE__ */ g(a, {
432
+ variant: "body2",
433
+ className: "ttw:font-semibold",
434
+ children: j.addressHeading
435
+ }), F && /* @__PURE__ */ g(a, {
436
+ variant: "body2",
437
+ className: "ttw:text-muted-foreground",
438
+ children: j.customerAddressDescription
439
+ })]
440
+ })] }), R ? /* @__PURE__ */ g(l, {
441
+ idPrefix: `${N}-address`,
442
+ values: f.address,
443
+ errors: m?.address,
444
+ stateOptions: C,
445
+ onChange: T,
446
+ labels: j.address
447
+ }) : /* @__PURE__ */ _(e, {
448
+ type: "button",
449
+ variant: "link",
450
+ className: "ttw:w-fit ttw:px-0",
451
+ onClick: k,
452
+ children: [/* @__PURE__ */ g(v, { className: "ttw:size-4" }), j.addAddress]
453
+ })] }),
454
+ I && M.bankAccount && /* @__PURE__ */ _(h, { children: [
455
+ /* @__PURE__ */ g(i, { className: "ttw:my-1" }),
456
+ /* @__PURE__ */ _("div", {
457
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
458
+ children: [/* @__PURE__ */ g(a, {
459
+ variant: "body2",
460
+ className: "ttw:font-semibold",
461
+ children: j.paymentMethodsHeading
462
+ }), /* @__PURE__ */ g(a, {
463
+ variant: "body2",
464
+ className: "ttw:text-muted-foreground",
465
+ children: j.paymentMethodsDescription
466
+ })]
467
+ }),
468
+ /* @__PURE__ */ g(c, {
469
+ idPrefix: `${N}-ach`,
470
+ values: f.bankAccount,
471
+ errors: m?.bankAccount,
472
+ onChange: (e) => E?.(e),
473
+ labels: j.ach
474
+ })
475
+ ] })
476
+ ]
477
+ });
478
+ }
479
+ //#endregion
480
+ export { w as CounterpartFormFields, C as CounterpartFormSheet, C as default, x as useFocusFirstInvalidField };
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.2.298", n = "27ed9ae863f19513dd75edfdc37fa5819f967533", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.2.299", n = "162a8fba75d09d6d2866a7c25adea7d7eb82e00b", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.2.298",
3
+ "version": "0.2.299",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {