@tesouro/embedded-components-react 0.5.58 → 0.5.60

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 (24) hide show
  1. package/README.md +9 -9
  2. package/dist/index.d.ts +5 -3
  3. package/dist/lib/CounterpartsWidget.d.ts +5 -3
  4. package/dist/lib/ReceivablesWidget.d.ts +3 -2
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +53 -53
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +42 -65
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +288 -226
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +104 -101
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +313 -285
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +12 -4
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +2 -0
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +41 -31
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +8 -1
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +9 -0
  15. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +4 -4
  19. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +121 -115
  20. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +2 -1
  21. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js +1 -0
  22. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1419 -1397
  23. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  24. package/package.json +1 -1
@@ -12,14 +12,22 @@ function i({ paymentInstructions: i, labels: a }) {
12
12
  errors: i.errors,
13
13
  onChange: i.onChange,
14
14
  labels: a.ach
15
- }), /* @__PURE__ */ n("div", {
16
- className: "ttw:flex ttw:justify-end",
17
- children: /* @__PURE__ */ n(e, {
15
+ }), /* @__PURE__ */ r("div", {
16
+ className: "ttw:flex ttw:justify-end ttw:gap-2",
17
+ children: [/* @__PURE__ */ n(e, {
18
18
  type: "button",
19
19
  variant: "outline",
20
20
  onClick: i.onCancel,
21
+ disabled: i.isSaving,
21
22
  children: a.cancelAction
22
- })
23
+ }), i.onSave ? /* @__PURE__ */ n(e, {
24
+ type: "button",
25
+ onClick: i.onSave,
26
+ "aria-label": a.saveAriaLabel,
27
+ loading: i.isSaving,
28
+ disabled: i.isSaving,
29
+ children: a.saveAction
30
+ }) : null]
23
31
  })]
24
32
  });
25
33
  }
@@ -11,6 +11,8 @@ var t = {
11
11
  paymentInstructionsDescription: "How and where will the money be sent. This information is required to send a payment.",
12
12
  addPaymentInstructions: "Add payment instructions",
13
13
  cancelAction: "Cancel",
14
+ saveAction: "Save",
15
+ saveAriaLabel: "Save payment instructions",
14
16
  ach: e
15
17
  };
16
18
  //#endregion
@@ -5,8 +5,8 @@ import { useMemo as r } from "react";
5
5
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  import { ChevronRightIcon as o, Plus as s } from "lucide-react";
7
7
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js
8
- var c = "ttw:flex ttw:items-start ttw:gap-4 ttw:py-2.5", l = "ttw:text-sm ttw:font-medium ttw:text-muted-foreground", u = `ttw:w-[140px] ttw:shrink-0 ${l}`, d = "ttw:-mx-2 ttw:-my-1 ttw:flex ttw:flex-1 ttw:items-center ttw:justify-between ttw:gap-3 ttw:rounded-md ttw:px-2 ttw:py-1 ttw:text-left ttw:hover:bg-muted";
9
- function f({ summary: f, onEdit: p, paymentInstructions: m, testId: h, labels: g }) {
8
+ var c = "ttw:flex ttw:items-start ttw:gap-4 ttw:py-2.5", l = "ttw:w-[140px] ttw:shrink-0 ttw:text-sm ttw:font-medium ttw:text-muted-foreground", u = "ttw:-mx-2 ttw:-my-1 ttw:flex ttw:flex-1 ttw:items-center ttw:justify-between ttw:gap-3 ttw:rounded-md ttw:px-2 ttw:py-1 ttw:text-left ttw:hover:bg-muted";
9
+ function d({ summary: d, onEdit: f, paymentInstructions: p, showPaymentInstructions: m = !0, testId: h, labels: g }) {
10
10
  let _ = r(() => ({
11
11
  ...t,
12
12
  ...g,
@@ -18,34 +18,41 @@ function f({ summary: f, onEdit: p, paymentInstructions: m, testId: h, labels: g
18
18
  ...g?.ach?.fieldMarkers
19
19
  }
20
20
  }
21
- }), [g]), v = !!m?.isOpen, y = !!m?.canEditExisting && f.hasPaymentInstructions, b = /* @__PURE__ */ a("div", {
21
+ }), [g]), v = !!p?.isOpen, y = !!p?.canEditExisting && d.hasPaymentInstructions, b = /* @__PURE__ */ a("div", {
22
22
  className: "ttw:flex ttw:flex-col ttw:gap-0.5",
23
- children: [/* @__PURE__ */ i("span", {
24
- className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
25
- children: f.name
26
- }), /* @__PURE__ */ i("span", {
27
- className: "ttw:text-sm ttw:text-muted-foreground",
28
- children: f.email
29
- })]
23
+ children: [
24
+ /* @__PURE__ */ i("span", {
25
+ className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
26
+ children: d.name
27
+ }),
28
+ /* @__PURE__ */ i("span", {
29
+ className: "ttw:text-sm ttw:text-muted-foreground",
30
+ children: d.email
31
+ }),
32
+ d.description ? /* @__PURE__ */ i("span", {
33
+ className: "ttw:text-sm ttw:text-muted-foreground",
34
+ children: d.description
35
+ }) : null
36
+ ]
30
37
  }), x;
31
- return x = m && v ? /* @__PURE__ */ i(n, {
32
- paymentInstructions: m,
38
+ return x = p && v ? /* @__PURE__ */ i(n, {
39
+ paymentInstructions: p,
33
40
  labels: _
34
- }) : f.hasPaymentInstructions ? y ? /* @__PURE__ */ a("button", {
41
+ }) : d.hasPaymentInstructions ? y ? /* @__PURE__ */ a("button", {
35
42
  type: "button",
36
43
  "aria-label": _.editPaymentInstructionsAction,
37
- onClick: m?.onOpen,
38
- className: d,
44
+ onClick: p?.onOpen,
45
+ className: u,
39
46
  children: [/* @__PURE__ */ i("span", {
40
47
  className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
41
- children: f.methodLabel
48
+ children: d.methodLabel
42
49
  }), /* @__PURE__ */ i(o, {
43
50
  "aria-hidden": "true",
44
51
  className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground"
45
52
  })]
46
53
  }) : /* @__PURE__ */ i("p", {
47
54
  className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
48
- children: f.methodLabel
55
+ children: d.methodLabel
49
56
  }) : /* @__PURE__ */ a("div", {
50
57
  className: "ttw:flex ttw:flex-col ttw:gap-3",
51
58
  children: [/* @__PURE__ */ a("div", {
@@ -57,15 +64,15 @@ function f({ summary: f, onEdit: p, paymentInstructions: m, testId: h, labels: g
57
64
  className: "ttw:text-sm ttw:text-muted-foreground",
58
65
  children: _.paymentInstructionsDescription
59
66
  })]
60
- }), m ? /* @__PURE__ */ a(e, {
67
+ }), p ? /* @__PURE__ */ a(e, {
61
68
  type: "button",
62
69
  variant: "link",
63
70
  className: "ttw:w-fit ttw:px-0",
64
- onClick: m.onOpen,
71
+ onClick: p.onOpen,
65
72
  children: [/* @__PURE__ */ i(s, { className: "ttw:size-4" }), _.addPaymentInstructions]
66
73
  }) : /* @__PURE__ */ i("p", {
67
74
  className: "ttw:text-sm ttw:text-muted-foreground",
68
- children: f.methodLabel
75
+ children: d.methodLabel
69
76
  })]
70
77
  }), /* @__PURE__ */ a("div", {
71
78
  "data-testid": h,
@@ -77,13 +84,13 @@ function f({ summary: f, onEdit: p, paymentInstructions: m, testId: h, labels: g
77
84
  children: [/* @__PURE__ */ a("div", {
78
85
  className: c,
79
86
  children: [/* @__PURE__ */ i("span", {
80
- className: u,
87
+ className: l,
81
88
  children: _.vendorLabel
82
- }), p && !v ? /* @__PURE__ */ a("button", {
89
+ }), f && !v ? /* @__PURE__ */ a("button", {
83
90
  type: "button",
84
91
  "aria-label": _.editAction,
85
- onClick: p,
86
- className: d,
92
+ onClick: f,
93
+ className: u,
87
94
  children: [b, /* @__PURE__ */ i(o, {
88
95
  "aria-hidden": "true",
89
96
  className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground"
@@ -92,24 +99,27 @@ function f({ summary: f, onEdit: p, paymentInstructions: m, testId: h, labels: g
92
99
  className: "ttw:flex ttw:flex-1",
93
100
  children: b
94
101
  })]
95
- }), v ? /* @__PURE__ */ a("div", {
96
- className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:py-2.5",
102
+ }), m && v ? /* @__PURE__ */ a("div", {
103
+ className: c,
97
104
  children: [/* @__PURE__ */ i("span", {
98
105
  className: l,
99
106
  children: _.achBankAccountLabel
100
- }), x]
101
- }) : /* @__PURE__ */ a("div", {
107
+ }), /* @__PURE__ */ i("div", {
108
+ className: "ttw:flex-1",
109
+ children: x
110
+ })]
111
+ }) : m ? /* @__PURE__ */ a("div", {
102
112
  className: c,
103
113
  children: [/* @__PURE__ */ i("span", {
104
- className: u,
114
+ className: l,
105
115
  children: _.achBankAccountLabel
106
116
  }), /* @__PURE__ */ i("div", {
107
117
  className: "ttw:flex ttw:flex-1",
108
118
  children: x
109
119
  })]
110
- })]
120
+ }) : null]
111
121
  })]
112
122
  });
113
123
  }
114
124
  //#endregion
115
- export { f as VendorSummaryCard, f as default };
125
+ export { d as VendorSummaryCard, d as default };
@@ -152,7 +152,14 @@ function E({ view: E, actions: D = g, scheduledSummary: O, scheduledStatusLabel:
152
152
  ]
153
153
  }),
154
154
  H?.isOpen && !N ? /* @__PURE__ */ v(n, { labels: z.requiredFieldsLegend }) : null,
155
- M?.editForm ?? /* @__PURE__ */ v(p, {
155
+ M?.editForm ? /* @__PURE__ */ y("div", {
156
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
157
+ children: [M.editForm, /* @__PURE__ */ v(p, {
158
+ summary: E.payTo,
159
+ paymentInstructions: H,
160
+ labels: B
161
+ })]
162
+ }) : /* @__PURE__ */ v(p, {
156
163
  summary: E.payTo,
157
164
  onEdit: M?.onEdit,
158
165
  paymentInstructions: H,
@@ -23,6 +23,7 @@ function o(o) {
23
23
  summary: o.summary,
24
24
  onEdit: s,
25
25
  paymentInstructions: d ? void 0 : o.paymentInstructions,
26
+ showPaymentInstructions: o.showPaymentInstructions,
26
27
  labels: f.summaryCard
27
28
  }) : d ? /* @__PURE__ */ i(e, {
28
29
  variant: "body2",
@@ -31,6 +32,14 @@ function o(o) {
31
32
  }) : o.mode === "selecting" ? /* @__PURE__ */ i(n, {
32
33
  ...o.search,
33
34
  labels: f.search
35
+ }) : o.summary ? /* @__PURE__ */ a("div", {
36
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
37
+ children: [o.newVendorForm, /* @__PURE__ */ i(t, {
38
+ summary: o.summary,
39
+ paymentInstructions: o.paymentInstructions,
40
+ showPaymentInstructions: o.showPaymentInstructions,
41
+ labels: f.summaryCard
42
+ })]
34
43
  }) : o.newVendorForm,
35
44
  c ? /* @__PURE__ */ i("p", {
36
45
  className: "ttw:text-sm ttw:text-destructive",
@@ -118,7 +118,7 @@ function g({ counterpartType: t, pageSizeOptions: s = c, onViewAllDocuments: g,
118
118
  onDeleteBankAccount: (e) => I.requestDelete({
119
119
  kind: "bankAccount",
120
120
  id: e,
121
- name: k.bankItems.find((t) => t.id === e)?.primary ?? ""
121
+ label: k.bankItems.find((t) => t.id === e)?.primary ?? ""
122
122
  }),
123
123
  editForm: D === "edit" ? {
124
124
  values: N.values,
@@ -413,7 +413,7 @@ function Z(e) {
413
413
  }
414
414
  function Q(e, t = r) {
415
415
  let n = {};
416
- return e.name.trim().length === 0 && (n.name = t.bankAccountNameRequired), e.accountNumber.trim().length === 0 && e.iban.trim().length === 0 && (n.accountNumber = t.bankAccountIdentifierRequired), e.currency.trim().length === 0 && (n.currency = t.bankAccountCurrencyRequired), n;
416
+ return e.accountNumber.trim().length === 0 && e.iban.trim().length === 0 && (n.accountNumber = t.bankAccountIdentifierRequired), e.currency.trim().length === 0 && (n.currency = t.bankAccountCurrencyRequired), n;
417
417
  }
418
418
  function $(e) {
419
419
  return q(e);
@@ -9,7 +9,6 @@ var e = {
9
9
  cityRequired: "City is required",
10
10
  stateRequired: "State is required",
11
11
  postalCodeRequired: "ZIP code is required",
12
- bankAccountNameRequired: "Account name is required",
13
12
  bankAccountIdentifierRequired: "Enter an account number or IBAN for this bank account",
14
13
  bankAccountCurrencyRequired: "Currency is required",
15
14
  accountHolderNameRequired: "Account holder name is required",
@@ -18,8 +17,9 @@ var e = {
18
17
  vatIdValueRequired: "VAT ID is required",
19
18
  genericError: "Something went wrong. Please try again.",
20
19
  deleteTitle: "Delete “{name}”?",
20
+ deleteBankAccountTitle: "Delete bank account “{account}”?",
21
21
  deleteCounterpartMessage: "This counterpart and its contacts, bank accounts, and VAT IDs will be permanently removed. You can't undo this action.",
22
- deleteSubEntityMessage: "This will be permanently removed. You can't undo this action."
22
+ deleteBankAccountMessage: "This removes these payment instructions from the vendor. The vendor will not be deleted. You can't undo this action."
23
23
  };
24
24
  //#endregion
25
25
  export { e as COUNTERPART_MESSAGE_LABELS_EN };
@@ -15,14 +15,14 @@ function i({ selectedId: i, setSelectedId: a, detailsView: o, messages: s }) {
15
15
  !i || !o || d({
16
16
  kind: "counterpart",
17
17
  id: i,
18
- name: o.name
18
+ label: o.name
19
19
  });
20
20
  }, [i, o]),
21
21
  requestDeleteCounterpartById: n(({ id: e, name: t }) => {
22
22
  d({
23
23
  kind: "counterpart",
24
24
  id: e,
25
- name: t
25
+ label: t
26
26
  });
27
27
  }, []),
28
28
  requestDelete: n((e) => d(e), []),
@@ -49,8 +49,8 @@ function i({ selectedId: i, setSelectedId: a, detailsView: o, messages: s }) {
49
49
  a
50
50
  ]),
51
51
  isDeleting: c.isPending || l.isPending,
52
- dialogTitle: u ? s.deleteTitle.replace("{name}", () => u.name) : "",
53
- dialogMessage: u?.kind === "counterpart" ? s.deleteCounterpartMessage : s.deleteSubEntityMessage
52
+ dialogTitle: u ? u.kind === "counterpart" ? s.deleteTitle.replace("{name}", () => u.label) : s.deleteBankAccountTitle.replace("{account}", () => u.label) : "",
53
+ dialogMessage: u?.kind === "counterpart" ? s.deleteCounterpartMessage : s.deleteBankAccountMessage
54
54
  };
55
55
  }
56
56
  //#endregion
@@ -1,173 +1,179 @@
1
- import { Checkbox as e, Input as t, Label as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BANK_ACCOUNT_FORM_SHEET_LABELS_EN as c } from "./index2.js";
3
- import { FieldError as l } from "./index4.js";
4
- import { FormSheet as u } from "./index8.js";
5
- import { useId as d } from "react";
6
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
1
+ import { Checkbox as e, FieldRequirement as t, Input as n, Label as r, Select as i, SelectContent as a, SelectItem as o, SelectTrigger as s, SelectValue as c } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BANK_ACCOUNT_FORM_SHEET_LABELS_EN as l } from "./index2.js";
3
+ import { FieldError as u } from "./index4.js";
4
+ import { FormSheet as d } from "./index8.js";
5
+ import { useId as f } from "react";
6
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
7
7
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js
8
- function m({ open: m, onOpenChange: h, mode: g, values: _, errors: v, currencyOptions: y, inProgress: b, onChange: x, onSubmit: S, onCancel: C, labels: w }) {
9
- let T = {
10
- ...c,
11
- ...w
12
- }, E = d(), D = g === "edit" ? T.editTitle : T.createTitle;
13
- return /* @__PURE__ */ p(u, {
14
- open: m,
15
- onOpenChange: h,
16
- title: D,
17
- formError: v?.form,
18
- inProgress: b,
19
- submitLabel: g === "edit" ? T.saveButton : T.createButton,
20
- cancelLabel: T.cancelButton,
21
- onSubmit: S,
22
- onCancel: C,
8
+ function h({ open: h, onOpenChange: g, mode: _, values: v, errors: y, currencyOptions: b, inProgress: x, onChange: S, onSubmit: C, onCancel: w, labels: T }) {
9
+ let E = {
10
+ ...l,
11
+ ...T,
12
+ fieldMarkers: {
13
+ ...l.fieldMarkers,
14
+ ...T?.fieldMarkers
15
+ }
16
+ }, D = f(), O = _ === "edit" ? E.editTitle : E.createTitle;
17
+ return /* @__PURE__ */ m(d, {
18
+ open: h,
19
+ onOpenChange: g,
20
+ title: O,
21
+ formError: y?.form,
22
+ inProgress: x,
23
+ submitLabel: _ === "edit" ? E.saveButton : E.createButton,
24
+ cancelLabel: E.cancelButton,
25
+ onSubmit: C,
26
+ onCancel: w,
23
27
  children: [
24
- /* @__PURE__ */ p("div", {
28
+ /* @__PURE__ */ m("div", {
25
29
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
26
30
  children: [
27
- /* @__PURE__ */ f(n, {
28
- htmlFor: `${E}-name`,
29
- children: T.nameLabel
31
+ /* @__PURE__ */ p(r, {
32
+ htmlFor: `${D}-name`,
33
+ requirement: t.Optional,
34
+ labels: E.fieldMarkers,
35
+ children: E.nameLabel
30
36
  }),
31
- /* @__PURE__ */ f(t, {
32
- id: `${E}-name`,
37
+ /* @__PURE__ */ p(n, {
38
+ id: `${D}-name`,
33
39
  autoFocus: !0,
34
- value: _.name,
35
- "aria-invalid": !!v?.name,
36
- onChange: (e) => x({ name: e.target.value })
40
+ value: v.name,
41
+ "aria-invalid": !!y?.name,
42
+ onChange: (e) => S({ name: e.target.value })
37
43
  }),
38
- /* @__PURE__ */ f(l, { message: v?.name })
44
+ /* @__PURE__ */ p(u, { message: y?.name })
39
45
  ]
40
46
  }),
41
- /* @__PURE__ */ p("div", {
47
+ /* @__PURE__ */ m("div", {
42
48
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
43
- children: [/* @__PURE__ */ f(n, {
44
- htmlFor: `${E}-holder`,
45
- children: T.accountHolderNameLabel
46
- }), /* @__PURE__ */ f(t, {
47
- id: `${E}-holder`,
48
- value: _.accountHolderName,
49
- onChange: (e) => x({ accountHolderName: e.target.value })
49
+ children: [/* @__PURE__ */ p(r, {
50
+ htmlFor: `${D}-holder`,
51
+ children: E.accountHolderNameLabel
52
+ }), /* @__PURE__ */ p(n, {
53
+ id: `${D}-holder`,
54
+ value: v.accountHolderName,
55
+ onChange: (e) => S({ accountHolderName: e.target.value })
50
56
  })]
51
57
  }),
52
- /* @__PURE__ */ p("div", {
58
+ /* @__PURE__ */ m("div", {
53
59
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
54
- children: [/* @__PURE__ */ p("div", {
60
+ children: [/* @__PURE__ */ m("div", {
55
61
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
56
62
  children: [
57
- /* @__PURE__ */ f(n, {
58
- htmlFor: `${E}-account-number`,
59
- children: T.accountNumberLabel
63
+ /* @__PURE__ */ p(r, {
64
+ htmlFor: `${D}-account-number`,
65
+ children: E.accountNumberLabel
60
66
  }),
61
- /* @__PURE__ */ f(t, {
62
- id: `${E}-account-number`,
63
- value: _.accountNumber,
64
- "aria-invalid": !!v?.accountNumber,
65
- onChange: (e) => x({ accountNumber: e.target.value })
67
+ /* @__PURE__ */ p(n, {
68
+ id: `${D}-account-number`,
69
+ value: v.accountNumber,
70
+ "aria-invalid": !!y?.accountNumber,
71
+ onChange: (e) => S({ accountNumber: e.target.value })
66
72
  }),
67
- /* @__PURE__ */ f(l, { message: v?.accountNumber })
73
+ /* @__PURE__ */ p(u, { message: y?.accountNumber })
68
74
  ]
69
- }), /* @__PURE__ */ p("div", {
75
+ }), /* @__PURE__ */ m("div", {
70
76
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
71
77
  children: [
72
- /* @__PURE__ */ f(n, {
73
- htmlFor: `${E}-routing`,
74
- children: T.routingNumberLabel
78
+ /* @__PURE__ */ p(r, {
79
+ htmlFor: `${D}-routing`,
80
+ children: E.routingNumberLabel
75
81
  }),
76
- /* @__PURE__ */ f(t, {
77
- id: `${E}-routing`,
78
- value: _.routingNumber,
79
- "aria-invalid": !!v?.routingNumber,
80
- onChange: (e) => x({ routingNumber: e.target.value })
82
+ /* @__PURE__ */ p(n, {
83
+ id: `${D}-routing`,
84
+ value: v.routingNumber,
85
+ "aria-invalid": !!y?.routingNumber,
86
+ onChange: (e) => S({ routingNumber: e.target.value })
81
87
  }),
82
- /* @__PURE__ */ f(l, { message: v?.routingNumber })
88
+ /* @__PURE__ */ p(u, { message: y?.routingNumber })
83
89
  ]
84
90
  })]
85
91
  }),
86
- /* @__PURE__ */ p("div", {
92
+ /* @__PURE__ */ m("div", {
87
93
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
88
- children: [/* @__PURE__ */ p("div", {
94
+ children: [/* @__PURE__ */ m("div", {
89
95
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
90
- children: [/* @__PURE__ */ f(n, {
91
- htmlFor: `${E}-iban`,
92
- children: T.ibanLabel
93
- }), /* @__PURE__ */ f(t, {
94
- id: `${E}-iban`,
95
- value: _.iban,
96
- onChange: (e) => x({ iban: e.target.value })
96
+ children: [/* @__PURE__ */ p(r, {
97
+ htmlFor: `${D}-iban`,
98
+ children: E.ibanLabel
99
+ }), /* @__PURE__ */ p(n, {
100
+ id: `${D}-iban`,
101
+ value: v.iban,
102
+ onChange: (e) => S({ iban: e.target.value })
97
103
  })]
98
- }), /* @__PURE__ */ p("div", {
104
+ }), /* @__PURE__ */ m("div", {
99
105
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
100
- children: [/* @__PURE__ */ f(n, {
101
- htmlFor: `${E}-bic`,
102
- children: T.bicLabel
103
- }), /* @__PURE__ */ f(t, {
104
- id: `${E}-bic`,
105
- value: _.bic,
106
- onChange: (e) => x({ bic: e.target.value })
106
+ children: [/* @__PURE__ */ p(r, {
107
+ htmlFor: `${D}-bic`,
108
+ children: E.bicLabel
109
+ }), /* @__PURE__ */ p(n, {
110
+ id: `${D}-bic`,
111
+ value: v.bic,
112
+ onChange: (e) => S({ bic: e.target.value })
107
113
  })]
108
114
  })]
109
115
  }),
110
- /* @__PURE__ */ p("div", {
116
+ /* @__PURE__ */ m("div", {
111
117
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
112
- children: [/* @__PURE__ */ p("div", {
118
+ children: [/* @__PURE__ */ m("div", {
113
119
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
114
- children: [/* @__PURE__ */ f(n, {
115
- htmlFor: `${E}-sort-code`,
116
- children: T.sortCodeLabel
117
- }), /* @__PURE__ */ f(t, {
118
- id: `${E}-sort-code`,
119
- value: _.sortCode,
120
- onChange: (e) => x({ sortCode: e.target.value })
120
+ children: [/* @__PURE__ */ p(r, {
121
+ htmlFor: `${D}-sort-code`,
122
+ children: E.sortCodeLabel
123
+ }), /* @__PURE__ */ p(n, {
124
+ id: `${D}-sort-code`,
125
+ value: v.sortCode,
126
+ onChange: (e) => S({ sortCode: e.target.value })
121
127
  })]
122
- }), /* @__PURE__ */ p("div", {
128
+ }), /* @__PURE__ */ m("div", {
123
129
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
124
130
  children: [
125
- /* @__PURE__ */ f(n, {
126
- htmlFor: `${E}-currency`,
127
- children: T.currencyLabel
128
- }),
129
131
  /* @__PURE__ */ p(r, {
130
- value: _.currency === "" ? void 0 : _.currency,
131
- onValueChange: (e) => x({ currency: e }),
132
- children: [/* @__PURE__ */ f(o, {
133
- id: `${E}-currency`,
132
+ htmlFor: `${D}-currency`,
133
+ children: E.currencyLabel
134
+ }),
135
+ /* @__PURE__ */ m(i, {
136
+ value: v.currency === "" ? void 0 : v.currency,
137
+ onValueChange: (e) => S({ currency: e }),
138
+ children: [/* @__PURE__ */ p(s, {
139
+ id: `${D}-currency`,
134
140
  className: "ttw:w-full",
135
- "aria-invalid": !!v?.currency,
136
- children: /* @__PURE__ */ f(s, { placeholder: T.currencyPlaceholder })
137
- }), /* @__PURE__ */ f(i, { children: y.map((e) => /* @__PURE__ */ f(a, {
141
+ "aria-invalid": !!y?.currency,
142
+ children: /* @__PURE__ */ p(c, { placeholder: E.currencyPlaceholder })
143
+ }), /* @__PURE__ */ p(a, { children: b.map((e) => /* @__PURE__ */ p(o, {
138
144
  value: e.value,
139
145
  children: e.label
140
146
  }, e.value)) })]
141
147
  }),
142
- /* @__PURE__ */ f(l, { message: v?.currency })
148
+ /* @__PURE__ */ p(u, { message: y?.currency })
143
149
  ]
144
150
  })]
145
151
  }),
146
- /* @__PURE__ */ p("div", {
152
+ /* @__PURE__ */ m("div", {
147
153
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
148
- children: [/* @__PURE__ */ f(n, {
149
- htmlFor: `${E}-country`,
150
- children: T.countryLabel
151
- }), /* @__PURE__ */ f(t, {
152
- id: `${E}-country`,
153
- value: T.countryValue,
154
+ children: [/* @__PURE__ */ p(r, {
155
+ htmlFor: `${D}-country`,
156
+ children: E.countryLabel
157
+ }), /* @__PURE__ */ p(n, {
158
+ id: `${D}-country`,
159
+ value: E.countryValue,
154
160
  disabled: !0,
155
161
  readOnly: !0
156
162
  })]
157
163
  }),
158
- /* @__PURE__ */ p("div", {
164
+ /* @__PURE__ */ m("div", {
159
165
  className: "ttw:flex ttw:items-center ttw:gap-2",
160
- children: [/* @__PURE__ */ f(e, {
161
- id: `${E}-default`,
162
- checked: _.isDefault,
163
- onCheckedChange: (e) => x({ isDefault: e === !0 })
164
- }), /* @__PURE__ */ f(n, {
165
- htmlFor: `${E}-default`,
166
- children: T.isDefaultLabel
166
+ children: [/* @__PURE__ */ p(e, {
167
+ id: `${D}-default`,
168
+ checked: v.isDefault,
169
+ onCheckedChange: (e) => S({ isDefault: e === !0 })
170
+ }), /* @__PURE__ */ p(r, {
171
+ htmlFor: `${D}-default`,
172
+ children: E.isDefaultLabel
167
173
  })]
168
174
  })
169
175
  ]
170
176
  });
171
177
  }
172
178
  //#endregion
173
- export { m as BankAccountFormSheet, m as default };
179
+ export { h as BankAccountFormSheet, h as default };
@@ -86,7 +86,8 @@ var n = {
86
86
  isDefaultLabel: "Set as default for this currency",
87
87
  cancelButton: "Cancel",
88
88
  createButton: "Add",
89
- saveButton: "Save"
89
+ saveButton: "Save",
90
+ fieldMarkers: e
90
91
  }, c = {
91
92
  title: "Edit address",
92
93
  cancelButton: "Cancel",
@@ -89,6 +89,7 @@ function p({ idPrefix: f, values: p, errors: m, stateOptions: h, onChange: g, la
89
89
  children: [/* @__PURE__ */ u(o, {
90
90
  id: `${f}-state`,
91
91
  "aria-required": !0,
92
+ "aria-invalid": !!m?.state,
92
93
  className: "ttw:w-full",
93
94
  children: /* @__PURE__ */ u(s, { placeholder: v.statePlaceholder })
94
95
  }), /* @__PURE__ */ u(i, { children: h.map((e) => /* @__PURE__ */ u(a, {