@tesouro/embedded-components-react 0.9.53 → 0.9.55

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.
@@ -71,93 +71,98 @@ function D(e) {
71
71
  }
72
72
  };
73
73
  }
74
- function O({ open: e, onOpenChange: c, mode: l, counterpartMode: f = "customer", values: g, errors: v, stateOptions: S, taxIdField: C, inProgress: w, submitDisabled: T, onChange: O, onAddressChange: k, onBankAccountChange: A, onSubmit: j, onCancel: M, labels: N }) {
75
- let P = D(N), F = _(), I = g.entityType === "organization", L = f === "customer", R = f === "vendor", z = E(v), B = l === "edit" ? L ? P.editTitleCustomer : P.editTitleVendor : L ? P.createTitleCustomer : P.createTitleVendor, V = l === "create" ? L ? P.createDescriptionCustomer : P.createDescriptionVendor : void 0, H = l === "edit" ? P.saveButton : L ? P.createButtonCustomer : P.createButtonVendor, U = L ? P.customerTypeHeading : P.vendorTypeHeading, W = /* @__PURE__ */ x("div", {
74
+ function O({ open: e, onOpenChange: c, mode: l, counterpartMode: f = "customer", values: S, errors: C, stateOptions: w, taxIdField: T, inProgress: O, submitDisabled: k, onChange: A, onAddressChange: j, onBankAccountChange: M, onSubmit: N, onCancel: P, labels: F }) {
75
+ let I = D(F), L = _(), R = S.entityType === "organization", z = f === "customer", B = f === "vendor", V = E(C), H = v(S.entityType);
76
+ g(() => {
77
+ H.current !== S.entityType && (H.current = S.entityType, V.current?.querySelector("[data-autofocus]")?.focus());
78
+ }, [S.entityType, V]);
79
+ let U = l === "edit" ? z ? I.editTitleCustomer : I.editTitleVendor : z ? I.createTitleCustomer : I.createTitleVendor, W = l === "create" ? z ? I.createDescriptionCustomer : I.createDescriptionVendor : void 0, G = l === "edit" ? I.saveButton : z ? I.createButtonCustomer : I.createButtonVendor, K = z ? I.customerTypeHeading : I.vendorTypeHeading, q = /* @__PURE__ */ x("div", {
76
80
  className: "ttw:flex ttw:flex-1 ttw:flex-col ttw:gap-1.5",
77
81
  children: [
78
82
  /* @__PURE__ */ b(i, {
79
- htmlFor: `${F}-email`,
83
+ htmlFor: `${L}-email`,
80
84
  requirement: n.Required,
81
- labels: P.fieldMarkers,
82
- children: P.emailLabel
85
+ labels: I.fieldMarkers,
86
+ children: I.emailLabel
83
87
  }),
84
88
  /* @__PURE__ */ b(r, {
85
- id: `${F}-email`,
89
+ id: `${L}-email`,
86
90
  type: "email",
87
- value: g.email,
91
+ value: S.email,
88
92
  "aria-required": !0,
89
- "aria-invalid": !!v?.email,
90
- onChange: (e) => O({ email: e.target.value })
93
+ "aria-invalid": !!C?.email,
94
+ onChange: (e) => A({ email: e.target.value })
91
95
  }),
92
- /* @__PURE__ */ b(u, { message: v?.email })
96
+ /* @__PURE__ */ b(u, { message: C?.email })
93
97
  ]
94
- }), G = /* @__PURE__ */ x("div", {
98
+ }), J = /* @__PURE__ */ x("div", {
95
99
  className: "ttw:flex ttw:flex-1 ttw:flex-col ttw:gap-1.5",
96
100
  children: [
97
101
  /* @__PURE__ */ b(i, {
98
- htmlFor: `${F}-phone`,
102
+ htmlFor: `${L}-phone`,
99
103
  requirement: n.Optional,
100
- labels: P.fieldMarkers,
101
- children: P.phoneLabel
104
+ labels: I.fieldMarkers,
105
+ children: I.phoneLabel
102
106
  }),
103
107
  /* @__PURE__ */ b(r, {
104
- id: `${F}-phone`,
108
+ id: `${L}-phone`,
105
109
  type: "tel",
106
- value: g.phone,
107
- "aria-invalid": !!v?.phone,
108
- onChange: (e) => O({ phone: e.target.value })
110
+ value: S.phone,
111
+ "aria-invalid": !!C?.phone,
112
+ onChange: (e) => A({ phone: e.target.value })
109
113
  }),
110
- /* @__PURE__ */ b(u, { message: v?.phone })
114
+ /* @__PURE__ */ b(u, { message: C?.phone })
111
115
  ]
112
116
  });
113
117
  return /* @__PURE__ */ b(h, {
114
118
  open: e,
115
119
  onOpenChange: c,
116
- title: B,
117
- description: V,
118
- formError: v?.form,
119
- inProgress: w,
120
- submitDisabled: T,
121
- initialFocusId: I ? `${F}-legal-name` : `${F}-first-name`,
122
- submitLabel: H,
123
- cancelLabel: P.cancelButton,
124
- labels: { close: P.close },
125
- onSubmit: j,
126
- onCancel: M,
120
+ title: U,
121
+ description: W,
122
+ formError: C?.form,
123
+ inProgress: O,
124
+ submitDisabled: k,
125
+ initialFocusId: R ? `${L}-legal-name` : `${L}-first-name`,
126
+ submitLabel: G,
127
+ cancelLabel: I.cancelButton,
128
+ labels: { close: I.close },
129
+ onSubmit: N,
130
+ onCancel: P,
127
131
  children: /* @__PURE__ */ x("div", {
128
- ref: z,
132
+ ref: V,
129
133
  style: { display: "contents" },
130
134
  children: [
131
- /* @__PURE__ */ b(a, { labels: P.requiredFieldsLegend }),
135
+ /* @__PURE__ */ b(a, { labels: I.requiredFieldsLegend }),
132
136
  l === "create" && /* @__PURE__ */ b(m, {
133
- value: g.entityType,
134
- onChange: (e) => O({ entityType: e }),
137
+ value: S.entityType,
138
+ onChange: (e) => A({ entityType: e }),
135
139
  variant: "pills",
136
140
  labels: {
137
- heading: U,
138
- organization: P.businessTypeOption,
139
- organizationHint: P.businessTypeHint,
140
- individual: P.personTypeOption,
141
- individualHint: P.personTypeHint
141
+ heading: K,
142
+ organization: I.businessTypeOption,
143
+ organizationHint: I.businessTypeHint,
144
+ individual: I.personTypeOption,
145
+ individualHint: I.personTypeHint
142
146
  }
143
147
  }),
144
- I ? /* @__PURE__ */ x("div", {
148
+ R ? /* @__PURE__ */ x("div", {
145
149
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
146
150
  children: [
147
151
  /* @__PURE__ */ b(i, {
148
- htmlFor: `${F}-legal-name`,
152
+ htmlFor: `${L}-legal-name`,
149
153
  requirement: n.Required,
150
- labels: P.fieldMarkers,
151
- children: P.businessNameLabel
154
+ labels: I.fieldMarkers,
155
+ children: I.businessNameLabel
152
156
  }),
153
157
  /* @__PURE__ */ b(r, {
154
- id: `${F}-legal-name`,
155
- value: g.legalName,
158
+ id: `${L}-legal-name`,
159
+ "data-autofocus": !0,
160
+ value: S.legalName,
156
161
  "aria-required": !0,
157
- "aria-invalid": !!v?.legalName,
158
- onChange: (e) => O({ legalName: e.target.value })
162
+ "aria-invalid": !!C?.legalName,
163
+ onChange: (e) => A({ legalName: e.target.value })
159
164
  }),
160
- /* @__PURE__ */ b(u, { message: v?.legalName })
165
+ /* @__PURE__ */ b(u, { message: C?.legalName })
161
166
  ]
162
167
  }) : /* @__PURE__ */ x("div", {
163
168
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
@@ -165,183 +170,186 @@ function O({ open: e, onOpenChange: c, mode: l, counterpartMode: f = "customer",
165
170
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
166
171
  children: [
167
172
  /* @__PURE__ */ b(i, {
168
- htmlFor: `${F}-first-name`,
173
+ htmlFor: `${L}-first-name`,
169
174
  requirement: n.Required,
170
- labels: P.fieldMarkers,
171
- children: P.firstNameLabel
175
+ labels: I.fieldMarkers,
176
+ children: I.firstNameLabel
172
177
  }),
173
178
  /* @__PURE__ */ b(r, {
174
- id: `${F}-first-name`,
175
- value: g.firstName,
179
+ id: `${L}-first-name`,
180
+ "data-autofocus": !0,
181
+ value: S.firstName,
176
182
  "aria-required": !0,
177
- "aria-invalid": !!v?.firstName,
178
- onChange: (e) => O({ firstName: e.target.value })
183
+ "aria-invalid": !!C?.firstName,
184
+ onChange: (e) => A({ firstName: e.target.value })
179
185
  }),
180
- /* @__PURE__ */ b(u, { message: v?.firstName })
186
+ /* @__PURE__ */ b(u, { message: C?.firstName })
181
187
  ]
182
188
  }), /* @__PURE__ */ x("div", {
183
189
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
184
190
  children: [
185
191
  /* @__PURE__ */ b(i, {
186
- htmlFor: `${F}-last-name`,
192
+ htmlFor: `${L}-last-name`,
187
193
  requirement: n.Required,
188
- labels: P.fieldMarkers,
189
- children: P.lastNameLabel
194
+ labels: I.fieldMarkers,
195
+ children: I.lastNameLabel
190
196
  }),
191
197
  /* @__PURE__ */ b(r, {
192
- id: `${F}-last-name`,
193
- value: g.lastName,
198
+ id: `${L}-last-name`,
199
+ value: S.lastName,
194
200
  "aria-required": !0,
195
- "aria-invalid": !!v?.lastName,
196
- onChange: (e) => O({ lastName: e.target.value })
201
+ "aria-invalid": !!C?.lastName,
202
+ onChange: (e) => A({ lastName: e.target.value })
197
203
  }),
198
- /* @__PURE__ */ b(u, { message: v?.lastName })
204
+ /* @__PURE__ */ b(u, { message: C?.lastName })
199
205
  ]
200
206
  })]
201
207
  }),
202
- L ? /* @__PURE__ */ x(y, { children: [
203
- W,
208
+ z ? /* @__PURE__ */ x(y, { children: [
209
+ q,
204
210
  /* @__PURE__ */ x(i, {
205
- htmlFor: `${F}-reminders`,
211
+ htmlFor: `${L}-reminders`,
206
212
  className: "ttw:flex ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:border-border ttw:p-3",
207
213
  children: [/* @__PURE__ */ b(t, {
208
- id: `${F}-reminders`,
209
- checked: g.remindersEnabled,
210
- onCheckedChange: (e) => O({ remindersEnabled: e === !0 })
214
+ id: `${L}-reminders`,
215
+ checked: S.remindersEnabled,
216
+ onCheckedChange: (e) => A({ remindersEnabled: e === !0 })
211
217
  }), /* @__PURE__ */ x("span", {
212
218
  className: "ttw:flex ttw:flex-col ttw:gap-0.5",
213
219
  children: [/* @__PURE__ */ b("span", {
214
220
  className: "ttw:text-sm ttw:font-medium",
215
- children: P.paymentRemindersLabel
221
+ children: I.paymentRemindersLabel
216
222
  }), /* @__PURE__ */ b("span", {
217
223
  className: "ttw:text-sm ttw:text-muted-foreground",
218
- children: P.paymentRemindersDescription
224
+ children: I.paymentRemindersDescription
219
225
  })]
220
226
  })]
221
227
  }),
222
- G
228
+ J
223
229
  ] }) : /* @__PURE__ */ x("div", {
224
230
  className: "ttw:flex ttw:gap-4",
225
- children: [W, G]
231
+ children: [q, J]
226
232
  }),
227
233
  /* @__PURE__ */ x("div", {
228
234
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
229
235
  children: [
230
236
  /* @__PURE__ */ b(i, {
231
- htmlFor: `${F}-tax-id`,
237
+ htmlFor: `${L}-tax-id`,
232
238
  requirement: n.Optional,
233
- labels: P.fieldMarkers,
234
- children: C.label
239
+ labels: I.fieldMarkers,
240
+ children: T.label
235
241
  }),
236
242
  /* @__PURE__ */ b(r, {
237
- id: `${F}-tax-id`,
238
- placeholder: C.placeholder,
239
- value: g.taxId,
240
- "aria-invalid": !!v?.taxId,
241
- onChange: (e) => O({ taxId: e.target.value })
243
+ id: `${L}-tax-id`,
244
+ placeholder: T.placeholder,
245
+ value: S.taxId,
246
+ "aria-invalid": !!C?.taxId,
247
+ onChange: (e) => A({ taxId: e.target.value })
242
248
  }),
243
- /* @__PURE__ */ b(u, { message: v?.taxId }),
249
+ /* @__PURE__ */ b(u, { message: C?.taxId }),
244
250
  /* @__PURE__ */ b(s, {
245
251
  variant: "caption",
246
252
  className: "ttw:text-muted-foreground",
247
- children: C.description
253
+ children: T.description
248
254
  })
249
255
  ]
250
256
  }),
251
- L && /* @__PURE__ */ b("div", {
257
+ z && /* @__PURE__ */ b("div", {
252
258
  className: "ttw:border-b ttw:border-border ttw:pt-6 ttw:pb-7",
253
259
  children: /* @__PURE__ */ x(s, {
254
260
  variant: "body1",
255
261
  className: "ttw:font-medium",
256
262
  children: [
257
- P.addressHeading,
263
+ I.addressHeading,
258
264
  " ",
259
265
  /* @__PURE__ */ b("span", {
260
266
  className: "ttw:text-muted-foreground",
261
- children: P.fieldMarkers.optionalNote
267
+ children: I.fieldMarkers.optionalNote
262
268
  })
263
269
  ]
264
270
  })
265
271
  }),
266
272
  /* @__PURE__ */ b(p, {
267
- idPrefix: `${F}-address`,
268
- values: g.address,
269
- errors: v?.address,
270
- stateOptions: S,
271
- onChange: k,
272
- labels: P.address
273
+ idPrefix: `${L}-address`,
274
+ values: S.address,
275
+ errors: C?.address,
276
+ stateOptions: w,
277
+ onChange: j,
278
+ labels: I.address
273
279
  }),
274
- R && /* @__PURE__ */ x(y, { children: [
280
+ B && /* @__PURE__ */ x(y, { children: [
275
281
  /* @__PURE__ */ b(o, { className: "ttw:my-1" }),
276
282
  /* @__PURE__ */ x("div", {
277
283
  className: "ttw:flex ttw:flex-col ttw:gap-1",
278
284
  children: [/* @__PURE__ */ b(s, {
279
285
  variant: "body2",
280
286
  className: "ttw:font-semibold",
281
- children: P.paymentMethodsHeading
287
+ children: I.paymentMethodsHeading
282
288
  }), /* @__PURE__ */ b(s, {
283
289
  variant: "body2",
284
290
  className: "ttw:text-muted-foreground",
285
- children: P.paymentMethodsDescription
291
+ children: I.paymentMethodsDescription
286
292
  })]
287
293
  }),
288
294
  /* @__PURE__ */ b(d, {
289
- idPrefix: `${F}-ach`,
290
- values: g.bankAccount,
291
- errors: v?.bankAccount,
292
- onChange: (e) => A?.(e),
293
- labels: P.ach
295
+ idPrefix: `${L}-ach`,
296
+ values: S.bankAccount,
297
+ errors: C?.bankAccount,
298
+ onChange: (e) => M?.(e),
299
+ labels: I.ach
294
300
  })
295
301
  ] })
296
302
  ]
297
303
  })
298
304
  });
299
305
  }
300
- function k({ mode: a, counterpartMode: c = "customer", values: l, errors: p, stateOptions: h, onChange: g, onAddressChange: v, onBankAccountChange: T, sections: O, sectionsToExpand: k, onAddressExpand: A, labels: j }) {
301
- let M = D(j), N = {
306
+ function k({ mode: a, counterpartMode: c = "customer", values: l, errors: p, stateOptions: h, onChange: T, onAddressChange: O, onBankAccountChange: k, sections: A, sectionsToExpand: j, onAddressExpand: M, labels: N }) {
307
+ let P = D(N), F = {
302
308
  ...C,
303
- ...O
304
- }, P = _(), F = l.entityType === "organization", I = c === "customer", L = c === "vendor", { isAddressShown: R, isAddressExpanded: z } = w({
305
- show: N,
306
- sectionsToExpand: k
307
- }), B = E(p), V = I ? M.customerTypeHeading : M.vendorTypeHeading, H = I ? M.customerTaxIdHelp : M.vendorTaxIdHelp;
309
+ ...A
310
+ }, I = _(), L = l.entityType === "organization", R = c === "customer", z = c === "vendor", { isAddressShown: B, isAddressExpanded: V } = w({
311
+ show: F,
312
+ sectionsToExpand: j
313
+ }), H = E(p), U = v(null);
314
+ g(() => U.current?.focus(), [l.entityType]);
315
+ let W = R ? P.customerTypeHeading : P.vendorTypeHeading, G = R ? P.customerTaxIdHelp : P.vendorTaxIdHelp;
308
316
  return /* @__PURE__ */ x("div", {
309
- ref: B,
317
+ ref: H,
310
318
  style: { display: "contents" },
311
319
  children: [
312
- a === "create" && N.entityType && /* @__PURE__ */ b(m, {
320
+ a === "create" && F.entityType && /* @__PURE__ */ b(m, {
313
321
  value: l.entityType,
314
- onChange: (e) => g({ entityType: e }),
322
+ onChange: (e) => T({ entityType: e }),
315
323
  variant: "pills",
316
324
  labels: {
317
- heading: V,
318
- organization: M.businessTypeOption,
319
- organizationHint: M.businessTypeHint,
320
- individual: M.personTypeOption,
321
- individualHint: M.personTypeHint
325
+ heading: W,
326
+ organization: P.businessTypeOption,
327
+ organizationHint: P.businessTypeHint,
328
+ individual: P.personTypeOption,
329
+ individualHint: P.personTypeHint
322
330
  }
323
331
  }),
324
- N.profileHeading && /* @__PURE__ */ b(s, {
332
+ F.profileHeading && /* @__PURE__ */ b(s, {
325
333
  variant: "body2",
326
334
  className: "ttw:font-semibold",
327
- children: M.profileHeading
335
+ children: P.profileHeading
328
336
  }),
329
- F ? /* @__PURE__ */ x("div", {
337
+ L ? /* @__PURE__ */ x("div", {
330
338
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
331
339
  children: [
332
340
  /* @__PURE__ */ b(i, {
333
- htmlFor: `${P}-legal-name`,
341
+ htmlFor: `${I}-legal-name`,
334
342
  requirement: n.Required,
335
- labels: M.fieldMarkers,
336
- children: M.businessNameLabel
343
+ labels: P.fieldMarkers,
344
+ children: P.businessNameLabel
337
345
  }),
338
346
  /* @__PURE__ */ b(r, {
339
- id: `${P}-legal-name`,
340
- autoFocus: !0,
347
+ id: `${I}-legal-name`,
348
+ ref: U,
341
349
  value: l.legalName,
342
350
  "aria-required": !0,
343
351
  "aria-invalid": !!p?.legalName,
344
- onChange: (e) => g({ legalName: e.target.value })
352
+ onChange: (e) => T({ legalName: e.target.value })
345
353
  }),
346
354
  /* @__PURE__ */ b(u, { message: p?.legalName })
347
355
  ]
@@ -351,18 +359,18 @@ function k({ mode: a, counterpartMode: c = "customer", values: l, errors: p, sta
351
359
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
352
360
  children: [
353
361
  /* @__PURE__ */ b(i, {
354
- htmlFor: `${P}-first-name`,
362
+ htmlFor: `${I}-first-name`,
355
363
  requirement: n.Required,
356
- labels: M.fieldMarkers,
357
- children: M.firstNameLabel
364
+ labels: P.fieldMarkers,
365
+ children: P.firstNameLabel
358
366
  }),
359
367
  /* @__PURE__ */ b(r, {
360
- id: `${P}-first-name`,
361
- autoFocus: !0,
368
+ id: `${I}-first-name`,
369
+ ref: U,
362
370
  value: l.firstName,
363
371
  "aria-required": !0,
364
372
  "aria-invalid": !!p?.firstName,
365
- onChange: (e) => g({ firstName: e.target.value })
373
+ onChange: (e) => T({ firstName: e.target.value })
366
374
  }),
367
375
  /* @__PURE__ */ b(u, { message: p?.firstName })
368
376
  ]
@@ -370,33 +378,33 @@ function k({ mode: a, counterpartMode: c = "customer", values: l, errors: p, sta
370
378
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
371
379
  children: [
372
380
  /* @__PURE__ */ b(i, {
373
- htmlFor: `${P}-last-name`,
381
+ htmlFor: `${I}-last-name`,
374
382
  requirement: n.Required,
375
- labels: M.fieldMarkers,
376
- children: M.lastNameLabel
383
+ labels: P.fieldMarkers,
384
+ children: P.lastNameLabel
377
385
  }),
378
386
  /* @__PURE__ */ b(r, {
379
- id: `${P}-last-name`,
387
+ id: `${I}-last-name`,
380
388
  value: l.lastName,
381
389
  "aria-required": !0,
382
390
  "aria-invalid": !!p?.lastName,
383
- onChange: (e) => g({ lastName: e.target.value })
391
+ onChange: (e) => T({ lastName: e.target.value })
384
392
  }),
385
393
  /* @__PURE__ */ b(u, { message: p?.lastName })
386
394
  ]
387
395
  })]
388
396
  }),
389
- !F && N.title && /* @__PURE__ */ x("div", {
397
+ !L && F.title && /* @__PURE__ */ x("div", {
390
398
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
391
399
  children: [/* @__PURE__ */ b(i, {
392
- htmlFor: `${P}-title`,
400
+ htmlFor: `${I}-title`,
393
401
  requirement: n.Optional,
394
- labels: M.fieldMarkers,
395
- children: M.titleLabel
402
+ labels: P.fieldMarkers,
403
+ children: P.titleLabel
396
404
  }), /* @__PURE__ */ b(r, {
397
- id: `${P}-title`,
405
+ id: `${I}-title`,
398
406
  value: l.title,
399
- onChange: (e) => g({ title: e.target.value })
407
+ onChange: (e) => T({ title: e.target.value })
400
408
  })]
401
409
  }),
402
410
  /* @__PURE__ */ x("div", {
@@ -405,18 +413,18 @@ function k({ mode: a, counterpartMode: c = "customer", values: l, errors: p, sta
405
413
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
406
414
  children: [
407
415
  /* @__PURE__ */ b(i, {
408
- htmlFor: `${P}-email`,
416
+ htmlFor: `${I}-email`,
409
417
  requirement: n.Required,
410
- labels: M.fieldMarkers,
411
- children: M.emailLabel
418
+ labels: P.fieldMarkers,
419
+ children: P.emailLabel
412
420
  }),
413
421
  /* @__PURE__ */ b(r, {
414
- id: `${P}-email`,
422
+ id: `${I}-email`,
415
423
  type: "email",
416
424
  value: l.email,
417
425
  "aria-required": !0,
418
426
  "aria-invalid": !!p?.email,
419
- onChange: (e) => g({ email: e.target.value })
427
+ onChange: (e) => T({ email: e.target.value })
420
428
  }),
421
429
  /* @__PURE__ */ b(u, { message: p?.email })
422
430
  ]
@@ -424,107 +432,107 @@ function k({ mode: a, counterpartMode: c = "customer", values: l, errors: p, sta
424
432
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
425
433
  children: [
426
434
  /* @__PURE__ */ b(i, {
427
- htmlFor: `${P}-phone`,
435
+ htmlFor: `${I}-phone`,
428
436
  requirement: n.Optional,
429
- labels: M.fieldMarkers,
430
- children: M.phoneLabel
437
+ labels: P.fieldMarkers,
438
+ children: P.phoneLabel
431
439
  }),
432
440
  /* @__PURE__ */ b(r, {
433
- id: `${P}-phone`,
441
+ id: `${I}-phone`,
434
442
  value: l.phone,
435
443
  "aria-invalid": !!p?.phone,
436
- onChange: (e) => g({ phone: e.target.value })
444
+ onChange: (e) => T({ phone: e.target.value })
437
445
  }),
438
446
  /* @__PURE__ */ b(u, { message: p?.phone })
439
447
  ]
440
448
  })]
441
449
  }),
442
- N.taxId && /* @__PURE__ */ x("div", {
450
+ F.taxId && /* @__PURE__ */ x("div", {
443
451
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
444
452
  children: [
445
453
  /* @__PURE__ */ b(i, {
446
- htmlFor: `${P}-tax-id`,
454
+ htmlFor: `${I}-tax-id`,
447
455
  requirement: n.Optional,
448
- labels: M.fieldMarkers,
449
- children: M.taxIdLabel
456
+ labels: P.fieldMarkers,
457
+ children: P.taxIdLabel
450
458
  }),
451
459
  /* @__PURE__ */ b(r, {
452
- id: `${P}-tax-id`,
460
+ id: `${I}-tax-id`,
453
461
  value: l.taxId,
454
462
  "aria-invalid": !!p?.taxId,
455
- onChange: (e) => g({ taxId: e.target.value })
463
+ onChange: (e) => T({ taxId: e.target.value })
456
464
  }),
457
465
  /* @__PURE__ */ b(u, { message: p?.taxId }),
458
466
  /* @__PURE__ */ b(s, {
459
467
  variant: "caption",
460
468
  className: "ttw:text-muted-foreground",
461
- children: H
469
+ children: G
462
470
  })
463
471
  ]
464
472
  }),
465
- I && /* @__PURE__ */ x(i, {
466
- htmlFor: `${P}-reminders`,
473
+ R && /* @__PURE__ */ x(i, {
474
+ htmlFor: `${I}-reminders`,
467
475
  className: "ttw:flex ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:p-3",
468
476
  children: [/* @__PURE__ */ b(t, {
469
- id: `${P}-reminders`,
477
+ id: `${I}-reminders`,
470
478
  checked: l.remindersEnabled,
471
- onCheckedChange: (e) => g({ remindersEnabled: e === !0 })
479
+ onCheckedChange: (e) => T({ remindersEnabled: e === !0 })
472
480
  }), /* @__PURE__ */ x("span", {
473
481
  className: "ttw:flex ttw:flex-col ttw:gap-0.5",
474
482
  children: [/* @__PURE__ */ b("span", {
475
483
  className: "ttw:text-sm ttw:font-medium",
476
- children: M.paymentRemindersLabel
484
+ children: P.paymentRemindersLabel
477
485
  }), /* @__PURE__ */ b("span", {
478
486
  className: "ttw:text-sm ttw:text-muted-foreground",
479
- children: M.paymentRemindersDescription
487
+ children: P.paymentRemindersDescription
480
488
  })]
481
489
  })]
482
490
  }),
483
- R && /* @__PURE__ */ x(y, { children: [N.addressHeading && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(o, { className: "ttw:my-1" }), /* @__PURE__ */ x("div", {
491
+ B && /* @__PURE__ */ x(y, { children: [F.addressHeading && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(o, { className: "ttw:my-1" }), /* @__PURE__ */ x("div", {
484
492
  className: "ttw:flex ttw:flex-col ttw:gap-1",
485
493
  children: [/* @__PURE__ */ b(s, {
486
494
  variant: "body2",
487
495
  className: "ttw:font-semibold",
488
- children: M.addressHeading
489
- }), I && /* @__PURE__ */ b(s, {
496
+ children: P.addressHeading
497
+ }), R && /* @__PURE__ */ b(s, {
490
498
  variant: "body2",
491
499
  className: "ttw:text-muted-foreground",
492
- children: M.customerAddressDescription
500
+ children: P.customerAddressDescription
493
501
  })]
494
- })] }), z ? /* @__PURE__ */ b(f, {
495
- idPrefix: `${P}-address`,
502
+ })] }), V ? /* @__PURE__ */ b(f, {
503
+ idPrefix: `${I}-address`,
496
504
  values: l.address,
497
505
  errors: p?.address,
498
506
  stateOptions: h,
499
- onChange: v,
500
- labels: M.address
507
+ onChange: O,
508
+ labels: P.address
501
509
  }) : /* @__PURE__ */ x(e, {
502
510
  type: "button",
503
511
  variant: "link",
504
512
  className: "ttw:w-fit ttw:px-0",
505
- onClick: A,
506
- children: [/* @__PURE__ */ b(S, { className: "ttw:size-4" }), M.addAddress]
513
+ onClick: M,
514
+ children: [/* @__PURE__ */ b(S, { className: "ttw:size-4" }), P.addAddress]
507
515
  })] }),
508
- L && N.bankAccount && /* @__PURE__ */ x(y, { children: [
516
+ z && F.bankAccount && /* @__PURE__ */ x(y, { children: [
509
517
  /* @__PURE__ */ b(o, { className: "ttw:my-1" }),
510
518
  /* @__PURE__ */ x("div", {
511
519
  className: "ttw:flex ttw:flex-col ttw:gap-1",
512
520
  children: [/* @__PURE__ */ b(s, {
513
521
  variant: "body2",
514
522
  className: "ttw:font-semibold",
515
- children: M.paymentMethodsHeading
523
+ children: P.paymentMethodsHeading
516
524
  }), /* @__PURE__ */ b(s, {
517
525
  variant: "body2",
518
526
  className: "ttw:text-muted-foreground",
519
- children: M.paymentMethodsDescription
527
+ children: P.paymentMethodsDescription
520
528
  })]
521
529
  }),
522
530
  /* @__PURE__ */ b(d, {
523
- idPrefix: `${P}-ach`,
531
+ idPrefix: `${I}-ach`,
524
532
  values: l.bankAccount,
525
533
  errors: p?.bankAccount,
526
- onChange: (e) => T?.(e),
527
- labels: M.ach
534
+ onChange: (e) => k?.(e),
535
+ labels: P.ach
528
536
  })
529
537
  ] })
530
538
  ]
@@ -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.9.53", n = "e3d19a67f84bf8690644ada81d9515df10b62ea3", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.9.55", n = "b2849b2123265d8b3ad876a2c906e560d8d3c74d", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -66,7 +66,7 @@ function b({ idPrefix: b, values: x, errors: S, unitOptions: C, pricePrefix: w,
66
66
  }),
67
67
  /* @__PURE__ */ m(n, {
68
68
  id: `${b}-name`,
69
- autoFocus: !0,
69
+ "data-autofocus": !0,
70
70
  "aria-required": !0,
71
71
  className: v,
72
72
  placeholder: D.namePlaceholder,