@tesouro/embedded-components-react 0.5.51 → 0.5.53

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 (38) hide show
  1. package/dist/index.d.ts +42 -1
  2. package/dist/lib/CounterpartsWidget.d.ts +41 -0
  3. package/dist/lib/ReceivablesWidget.d.ts +40 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +6 -9
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +9 -12
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -2
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +8 -8
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +18 -4
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +91 -88
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +18 -3
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +113 -102
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +5 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +28 -20
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +148 -147
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +15 -3
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +39 -34
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +16 -4
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +203 -174
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +15 -3
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +52 -52
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +22 -3
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -17
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +31 -31
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +97 -96
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +15 -3
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +57 -61
  27. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +189 -188
  28. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +1 -0
  29. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +1 -0
  30. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +54 -37
  31. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +23 -16
  32. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index3.js +1 -0
  33. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +54 -41
  34. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js +88 -70
  35. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +333 -282
  36. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  37. package/dist/packages/shared-ui-shadcn/dist/index.js +3757 -3705
  38. package/package.json +1 -1
@@ -1,84 +1,84 @@
1
- import { Badge as e, Button as t, DropdownMenu as n, DropdownMenuContent as r, DropdownMenuItem as i, DropdownMenuTrigger as a, Separator as o, Sheet as s, SheetContent as c, SheetDescription as l, SheetHeader as u, SheetTitle as d, Skeleton as f, Typography as p } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { EmptyState as ee } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
- import { ErrorState as te } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
1
+ import { Badge as e, Button as t, DropdownMenu as n, DropdownMenuContent as r, DropdownMenuItem as i, DropdownMenuTrigger as a, RequiredFieldsLegend as o, Separator as s, Sheet as c, SheetContent as l, SheetDescription as ee, SheetHeader as u, SheetTitle as d, Skeleton as f, Typography as p, mergeRequiredFieldsLegendLabels as m } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { EmptyState as te } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
+ import { ErrorState as ne } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
4
4
  import "../../../shared/ui/dist/index.js";
5
- import { COUNTERPART_FORM_SHEET_LABELS_EN as m } from "../../../shared/counterpart-management/ui/dist/index2.js";
6
- import { CounterpartFormFields as h } from "../../../shared/counterpart-management/ui/dist/index9.js";
5
+ import { COUNTERPART_FORM_SHEET_LABELS_EN as h } from "../../../shared/counterpart-management/ui/dist/index2.js";
6
+ import { CounterpartFormFields as g } from "../../../shared/counterpart-management/ui/dist/index9.js";
7
7
  import "../../../shared/counterpart-management/ui/dist/index.js";
8
- import { COUNTERPART_DETAILS_SHEET_LABELS_EN as g } from "./index2.js";
9
- import { useEffect as ne, useState as re } from "react";
10
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
11
- import { EyeIcon as b, EyeOffIcon as x, MoreVerticalIcon as S, PencilIcon as C, PlusIcon as w, Trash2Icon as T, XIcon as ie } from "lucide-react";
8
+ import { COUNTERPART_DETAILS_SHEET_LABELS_EN as _ } from "./index2.js";
9
+ import { useEffect as v, useState as y } from "react";
10
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
11
+ import { EyeIcon as C, EyeOffIcon as w, MoreVerticalIcon as re, PencilIcon as T, PlusIcon as E, Trash2Icon as D, XIcon as ie } from "lucide-react";
12
12
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js
13
- var E = "-";
14
- function D({ className: e }) {
15
- return /* @__PURE__ */ v(f, { className: e ?? "ttw:h-5 ttw:w-24" });
13
+ var O = "-";
14
+ function k({ className: e }) {
15
+ return /* @__PURE__ */ x(f, { className: e ?? "ttw:h-5 ttw:w-24" });
16
16
  }
17
- function O({ label: e, children: t, isLast: n }) {
18
- return /* @__PURE__ */ y("div", {
17
+ function A({ label: e, children: t, isLast: n }) {
18
+ return /* @__PURE__ */ S("div", {
19
19
  className: ["ttw:grid ttw:grid-cols-[180px_1fr] ttw:gap-4 ttw:py-3", n ? "" : "ttw:border-b"].join(" "),
20
- children: [/* @__PURE__ */ v(p, {
20
+ children: [/* @__PURE__ */ x(p, {
21
21
  variant: "body2",
22
22
  className: "ttw:text-muted-foreground",
23
23
  children: e
24
- }), /* @__PURE__ */ v("div", {
24
+ }), /* @__PURE__ */ x("div", {
25
25
  className: "ttw:min-w-0 ttw:text-sm",
26
26
  children: t
27
27
  })]
28
28
  });
29
29
  }
30
- function k({ mode: e, summary: t, labels: n }) {
30
+ function j({ mode: e, summary: t, labels: n }) {
31
31
  let r = e === "customer" ? n.summaryReceived : n.summaryPaid;
32
- return /* @__PURE__ */ y("div", {
32
+ return /* @__PURE__ */ S("div", {
33
33
  className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-md ttw:bg-muted ttw:p-5",
34
34
  children: [
35
- /* @__PURE__ */ v(p, {
35
+ /* @__PURE__ */ x(p, {
36
36
  variant: "body2",
37
37
  className: "ttw:text-muted-foreground",
38
38
  children: e === "customer" ? n.summaryAmountDue : n.summaryBalanceDue
39
39
  }),
40
- t?.isPrimaryAmountLoading ? /* @__PURE__ */ v(D, { className: "ttw:h-9 ttw:w-36" }) : /* @__PURE__ */ v(p, {
40
+ t?.isPrimaryAmountLoading ? /* @__PURE__ */ x(k, { className: "ttw:h-9 ttw:w-36" }) : /* @__PURE__ */ x(p, {
41
41
  variant: "h3",
42
42
  className: "ttw:font-semibold",
43
- children: t?.primaryAmountLabel ?? E
43
+ children: t?.primaryAmountLabel ?? O
44
44
  }),
45
- /* @__PURE__ */ y("div", {
45
+ /* @__PURE__ */ S("div", {
46
46
  className: "ttw:flex ttw:gap-8",
47
47
  children: [
48
- /* @__PURE__ */ y("div", {
48
+ /* @__PURE__ */ S("div", {
49
49
  className: "ttw:flex ttw:flex-col ttw:gap-1",
50
- children: [/* @__PURE__ */ v(p, {
50
+ children: [/* @__PURE__ */ x(p, {
51
51
  variant: "caption",
52
52
  className: "ttw:text-muted-foreground",
53
53
  children: n.summaryBilled
54
- }), t?.isBilledAmountLoading ? /* @__PURE__ */ v(D, {}) : /* @__PURE__ */ v(p, {
54
+ }), t?.isBilledAmountLoading ? /* @__PURE__ */ x(k, {}) : /* @__PURE__ */ x(p, {
55
55
  variant: "body1",
56
56
  className: "ttw:font-semibold",
57
- children: t?.billedAmountLabel ?? E
57
+ children: t?.billedAmountLabel ?? O
58
58
  })]
59
59
  }),
60
- /* @__PURE__ */ y("div", {
60
+ /* @__PURE__ */ S("div", {
61
61
  className: "ttw:flex ttw:flex-col ttw:gap-1",
62
- children: [/* @__PURE__ */ v(p, {
62
+ children: [/* @__PURE__ */ x(p, {
63
63
  variant: "caption",
64
64
  className: "ttw:text-muted-foreground",
65
65
  children: r
66
- }), t?.isReceivedOrPaidAmountLoading ? /* @__PURE__ */ v(D, {}) : /* @__PURE__ */ v(p, {
66
+ }), t?.isReceivedOrPaidAmountLoading ? /* @__PURE__ */ x(k, {}) : /* @__PURE__ */ x(p, {
67
67
  variant: "body1",
68
68
  className: "ttw:font-semibold ttw:text-green-600",
69
- children: t?.receivedOrPaidAmountLabel ?? E
69
+ children: t?.receivedOrPaidAmountLabel ?? O
70
70
  })]
71
71
  }),
72
- e === "vendor" && /* @__PURE__ */ y("div", {
72
+ e === "vendor" && /* @__PURE__ */ S("div", {
73
73
  className: "ttw:flex ttw:flex-col ttw:gap-1",
74
- children: [/* @__PURE__ */ v(p, {
74
+ children: [/* @__PURE__ */ x(p, {
75
75
  variant: "caption",
76
76
  className: "ttw:text-muted-foreground",
77
77
  children: n.summaryRejected
78
- }), t?.isRejectedAmountLoading ? /* @__PURE__ */ v(D, {}) : /* @__PURE__ */ v(p, {
78
+ }), t?.isRejectedAmountLoading ? /* @__PURE__ */ x(k, {}) : /* @__PURE__ */ x(p, {
79
79
  variant: "body1",
80
80
  className: "ttw:font-semibold",
81
- children: t?.rejectedAmountLabel ?? E
81
+ children: t?.rejectedAmountLabel ?? O
82
82
  })]
83
83
  })
84
84
  ]
@@ -86,204 +86,205 @@ function k({ mode: e, summary: t, labels: n }) {
86
86
  ]
87
87
  });
88
88
  }
89
- function A({ mode: n, documents: r, labels: i, onViewAll: a }) {
89
+ function M({ mode: n, documents: r, labels: i, onViewAll: a }) {
90
90
  if (!r || r.length === 0) return null;
91
- let s = n === "vendor";
92
- return /* @__PURE__ */ y("section", {
91
+ let o = n === "vendor";
92
+ return /* @__PURE__ */ S("section", {
93
93
  className: "ttw:flex ttw:flex-col ttw:border-t ttw:pt-6",
94
- children: [/* @__PURE__ */ y("div", {
94
+ children: [/* @__PURE__ */ S("div", {
95
95
  className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4 ttw:pb-5",
96
- children: [/* @__PURE__ */ y("div", {
96
+ children: [/* @__PURE__ */ S("div", {
97
97
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
98
- children: [/* @__PURE__ */ v(p, {
98
+ children: [/* @__PURE__ */ x(p, {
99
99
  variant: "body1",
100
100
  className: "ttw:font-medium",
101
101
  children: n === "customer" ? i.recentCustomerDocumentsHeading : i.recentVendorDocumentsHeading
102
- }), /* @__PURE__ */ v(p, {
102
+ }), /* @__PURE__ */ x(p, {
103
103
  variant: "body2",
104
104
  className: "ttw:text-muted-foreground",
105
105
  children: n === "customer" ? i.recentCustomerDocumentsDescription : i.recentVendorDocumentsDescription
106
106
  })]
107
- }), a && /* @__PURE__ */ v(t, {
107
+ }), a && /* @__PURE__ */ x(t, {
108
108
  variant: "link",
109
109
  className: "ttw:h-auto ttw:p-0",
110
110
  onClick: a,
111
111
  children: i.viewAllDocumentsAction
112
112
  })]
113
- }), /* @__PURE__ */ v("div", {
113
+ }), /* @__PURE__ */ x("div", {
114
114
  className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-md ttw:border ttw:p-4",
115
115
  children: r.map((t, n) => {
116
- let a = s && t.isOverdue;
117
- return /* @__PURE__ */ y("div", {
116
+ let a = o && t.isOverdue;
117
+ return /* @__PURE__ */ S("div", {
118
118
  className: "ttw:flex ttw:flex-col ttw:gap-3",
119
- children: [/* @__PURE__ */ y("div", {
119
+ children: [/* @__PURE__ */ S("div", {
120
120
  className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
121
- children: [/* @__PURE__ */ y("div", {
121
+ children: [/* @__PURE__ */ S("div", {
122
122
  className: "ttw:flex ttw:flex-col ttw:gap-1",
123
- children: [/* @__PURE__ */ v(p, {
123
+ children: [/* @__PURE__ */ x(p, {
124
124
  variant: "h6",
125
125
  className: "ttw:font-medium",
126
126
  children: t.amountLabel
127
- }), /* @__PURE__ */ v(p, {
127
+ }), /* @__PURE__ */ x(p, {
128
128
  variant: "body2",
129
129
  className: a ? "ttw:text-destructive" : "ttw:text-muted-foreground",
130
130
  children: t.dateLabel
131
131
  })]
132
- }), /* @__PURE__ */ y("div", {
132
+ }), /* @__PURE__ */ S("div", {
133
133
  className: "ttw:flex ttw:items-center ttw:gap-2",
134
- children: [a && /* @__PURE__ */ v(e, {
134
+ children: [a && /* @__PURE__ */ x(e, {
135
135
  variant: "destructive",
136
136
  children: i.overdueTag
137
- }), /* @__PURE__ */ v(e, {
137
+ }), /* @__PURE__ */ x(e, {
138
138
  variant: t.statusTone ?? "outline",
139
139
  children: t.statusLabel
140
140
  })]
141
141
  })]
142
- }), n < r.length - 1 && /* @__PURE__ */ v(o, {})]
142
+ }), n < r.length - 1 && /* @__PURE__ */ x(s, {})]
143
143
  }, t.id);
144
144
  })
145
145
  })]
146
146
  });
147
147
  }
148
- function j({ mode: e, addressLines: n, canEdit: r, onEditAddress: i, onAddAddress: a, labels: o }) {
148
+ function N({ mode: e, addressLines: n, canEdit: r, onEditAddress: i, onAddAddress: a, labels: o }) {
149
149
  let s = n.length > 0;
150
- return /* @__PURE__ */ y("section", {
150
+ return /* @__PURE__ */ S("section", {
151
151
  className: e === "customer" ? "ttw:flex ttw:flex-col ttw:gap-3 ttw:border-t ttw:pt-6" : "ttw:flex ttw:flex-col",
152
- children: [e === "customer" && /* @__PURE__ */ y("div", {
152
+ children: [e === "customer" && /* @__PURE__ */ S("div", {
153
153
  className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
154
- children: [/* @__PURE__ */ y("div", {
154
+ children: [/* @__PURE__ */ S("div", {
155
155
  className: "ttw:flex ttw:flex-col ttw:gap-1",
156
- children: [/* @__PURE__ */ v(p, {
156
+ children: [/* @__PURE__ */ x(p, {
157
157
  variant: "body1",
158
158
  className: "ttw:font-medium",
159
159
  children: o.addressHeading
160
- }), /* @__PURE__ */ v(p, {
160
+ }), /* @__PURE__ */ x(p, {
161
161
  variant: "body2",
162
162
  className: "ttw:text-muted-foreground",
163
163
  children: o.customerAddressDescription
164
164
  })]
165
- }), r && /* @__PURE__ */ y(t, {
165
+ }), r && /* @__PURE__ */ S(t, {
166
166
  type: "button",
167
167
  variant: "ghost",
168
168
  size: "sm",
169
169
  onClick: s ? i : a,
170
- children: [v(s ? C : w, { className: "ttw:size-4" }), s ? o.editAddressAction : o.addAddressAction]
170
+ children: [x(s ? T : E, { className: "ttw:size-4" }), s ? o.editAddressAction : o.addAddressAction]
171
171
  })]
172
- }), s ? /* @__PURE__ */ v("address", {
172
+ }), s ? /* @__PURE__ */ x("address", {
173
173
  className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:not-italic ttw:text-sm",
174
- children: n.map((e) => /* @__PURE__ */ v("span", { children: e }, e))
175
- }) : /* @__PURE__ */ v(p, {
174
+ children: n.map((e) => /* @__PURE__ */ x("span", { children: e }, e))
175
+ }) : /* @__PURE__ */ x(p, {
176
176
  variant: "body2",
177
177
  className: "ttw:text-muted-foreground",
178
178
  children: o.noAddress
179
179
  })]
180
180
  });
181
181
  }
182
- function M({ paymentMethod: n, canEdit: r, onAddBankAccount: i, onEditBankAccount: a, onDeleteBankAccount: o, labels: s }) {
183
- return /* @__PURE__ */ y("section", {
182
+ function P({ paymentMethod: n, canEdit: r, onAddBankAccount: i, onEditBankAccount: a, onDeleteBankAccount: o, labels: s }) {
183
+ return /* @__PURE__ */ S("section", {
184
184
  className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:border-t ttw:pt-6",
185
- children: [/* @__PURE__ */ y("div", {
185
+ children: [/* @__PURE__ */ S("div", {
186
186
  className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
187
- children: [/* @__PURE__ */ y("div", {
187
+ children: [/* @__PURE__ */ S("div", {
188
188
  className: "ttw:flex ttw:flex-col ttw:gap-1",
189
- children: [/* @__PURE__ */ v(p, {
189
+ children: [/* @__PURE__ */ x(p, {
190
190
  variant: "body1",
191
191
  className: "ttw:font-medium",
192
192
  children: s.paymentMethodsHeading
193
- }), /* @__PURE__ */ v(p, {
193
+ }), /* @__PURE__ */ x(p, {
194
194
  variant: "body2",
195
195
  className: "ttw:text-muted-foreground",
196
196
  children: s.paymentMethodsDescription
197
197
  })]
198
- }), r && !n && /* @__PURE__ */ y(t, {
198
+ }), r && !n && /* @__PURE__ */ S(t, {
199
199
  type: "button",
200
200
  variant: "ghost",
201
201
  size: "sm",
202
202
  onClick: i,
203
- children: [/* @__PURE__ */ v(w, { className: "ttw:size-4" }), s.addPaymentMethodAction]
203
+ children: [/* @__PURE__ */ x(E, { className: "ttw:size-4" }), s.addPaymentMethodAction]
204
204
  })]
205
- }), n ? /* @__PURE__ */ y("div", {
205
+ }), n ? /* @__PURE__ */ S("div", {
206
206
  className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-md ttw:border ttw:p-4",
207
- children: [/* @__PURE__ */ y("div", {
207
+ children: [/* @__PURE__ */ S("div", {
208
208
  className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-3",
209
- children: [/* @__PURE__ */ y("div", {
209
+ children: [/* @__PURE__ */ S("div", {
210
210
  className: "ttw:flex ttw:flex-col ttw:gap-1",
211
- children: [/* @__PURE__ */ v(p, {
211
+ children: [/* @__PURE__ */ x(p, {
212
212
  variant: "body2",
213
213
  className: "ttw:font-medium",
214
214
  children: n.title
215
- }), n.isIncomplete && /* @__PURE__ */ v(e, {
215
+ }), n.isIncomplete && /* @__PURE__ */ x(e, {
216
216
  variant: "outline",
217
217
  children: s.incompletePaymentMethod
218
218
  })]
219
- }), r && /* @__PURE__ */ y("div", {
219
+ }), r && /* @__PURE__ */ S("div", {
220
220
  className: "ttw:flex ttw:gap-1",
221
- children: [/* @__PURE__ */ v(t, {
221
+ children: [/* @__PURE__ */ x(t, {
222
222
  type: "button",
223
223
  variant: "ghost",
224
224
  size: "icon-sm",
225
225
  "aria-label": s.editPaymentMethodAction,
226
226
  onClick: () => a?.(n.id),
227
- children: /* @__PURE__ */ v(C, { className: "ttw:size-4" })
228
- }), /* @__PURE__ */ v(t, {
227
+ children: /* @__PURE__ */ x(T, { className: "ttw:size-4" })
228
+ }), /* @__PURE__ */ x(t, {
229
229
  type: "button",
230
230
  variant: "ghost",
231
231
  size: "icon-sm",
232
232
  "aria-label": s.deletePaymentMethodAction,
233
233
  onClick: () => o?.(n.id),
234
- children: /* @__PURE__ */ v(T, { className: "ttw:size-4" })
234
+ children: /* @__PURE__ */ x(D, { className: "ttw:size-4" })
235
235
  })]
236
236
  })]
237
- }), /* @__PURE__ */ y("div", {
237
+ }), /* @__PURE__ */ S("div", {
238
238
  className: "ttw:grid ttw:grid-cols-3 ttw:gap-3 ttw:text-sm",
239
239
  children: [
240
- /* @__PURE__ */ y("div", {
240
+ /* @__PURE__ */ S("div", {
241
241
  className: "ttw:flex ttw:flex-col ttw:gap-1",
242
- children: [/* @__PURE__ */ v("span", {
242
+ children: [/* @__PURE__ */ x("span", {
243
243
  className: "ttw:text-muted-foreground",
244
244
  children: s.accountHolderLabel
245
- }), /* @__PURE__ */ v("span", { children: n.accountHolderLabel || E })]
245
+ }), /* @__PURE__ */ x("span", { children: n.accountHolderLabel || O })]
246
246
  }),
247
- /* @__PURE__ */ y("div", {
247
+ /* @__PURE__ */ S("div", {
248
248
  className: "ttw:flex ttw:flex-col ttw:gap-1",
249
- children: [/* @__PURE__ */ v("span", {
249
+ children: [/* @__PURE__ */ x("span", {
250
250
  className: "ttw:text-muted-foreground",
251
251
  children: s.accountNumberLabel
252
- }), /* @__PURE__ */ v("span", { children: n.accountNumberLabel || E })]
252
+ }), /* @__PURE__ */ x("span", { children: n.accountNumberLabel || O })]
253
253
  }),
254
- /* @__PURE__ */ y("div", {
254
+ /* @__PURE__ */ S("div", {
255
255
  className: "ttw:flex ttw:flex-col ttw:gap-1",
256
- children: [/* @__PURE__ */ v("span", {
256
+ children: [/* @__PURE__ */ x("span", {
257
257
  className: "ttw:text-muted-foreground",
258
258
  children: s.routingNumberLabel
259
- }), /* @__PURE__ */ v("span", { children: n.routingNumberLabel || E })]
259
+ }), /* @__PURE__ */ x("span", { children: n.routingNumberLabel || O })]
260
260
  })
261
261
  ]
262
262
  })]
263
- }) : /* @__PURE__ */ v(p, {
263
+ }) : /* @__PURE__ */ x(p, {
264
264
  variant: "body2",
265
265
  className: "ttw:text-muted-foreground",
266
266
  children: s.noPaymentMethods
267
267
  })]
268
268
  });
269
269
  }
270
- function N({ mode: e, form: n }) {
270
+ function F({ mode: e, form: n }) {
271
271
  let r = {
272
- ...m,
273
- ...n.labels
274
- };
275
- return /* @__PURE__ */ y("form", {
272
+ ...h.fieldMarkers,
273
+ ...n.labels?.fieldMarkers
274
+ }, i = m(r, n.labels?.requiredFieldsLegend), a = n.labels?.cancelButton ?? h.cancelButton, s = n.labels?.saveButton ?? h.saveButton;
275
+ return /* @__PURE__ */ S("form", {
276
276
  className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:pt-5",
277
277
  onSubmit: (e) => {
278
278
  e.preventDefault(), n.onSubmit();
279
279
  },
280
280
  children: [
281
- n.errors?.form && /* @__PURE__ */ v(p, {
281
+ n.errors?.form && /* @__PURE__ */ x(p, {
282
282
  variant: "body2",
283
283
  className: "ttw:text-destructive",
284
284
  children: n.errors.form
285
285
  }),
286
- /* @__PURE__ */ v(h, {
286
+ /* @__PURE__ */ x(o, { labels: i }),
287
+ /* @__PURE__ */ x(g, {
287
288
  mode: "edit",
288
289
  counterpartMode: e,
289
290
  values: n.values,
@@ -294,71 +295,71 @@ function N({ mode: e, form: n }) {
294
295
  onBankAccountChange: n.onBankAccountChange,
295
296
  labels: n.labels
296
297
  }),
297
- /* @__PURE__ */ y("div", {
298
+ /* @__PURE__ */ S("div", {
298
299
  className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:pt-4",
299
- children: [/* @__PURE__ */ v(t, {
300
+ children: [/* @__PURE__ */ x(t, {
300
301
  type: "button",
301
302
  variant: "outline",
302
303
  disabled: n.inProgress,
303
304
  onClick: n.onCancel,
304
- children: r.cancelButton
305
- }), /* @__PURE__ */ v(t, {
305
+ children: a
306
+ }), /* @__PURE__ */ x(t, {
306
307
  type: "submit",
307
308
  disabled: n.inProgress || n.submitDisabled,
308
- children: r.saveButton
309
+ children: s
309
310
  })]
310
311
  })
311
312
  ]
312
313
  });
313
314
  }
314
- function P({ open: e, onOpenChange: o, privacyResetKey: f, mode: m = "customer", counterpart: h, isLoading: w, isError: D, canEdit: P = !0, canDelete: F = !0, onEdit: I, onDelete: L, onClose: R, onEditAddress: z, onAddAddress: B, onAddBankAccount: V, onEditBankAccount: H, onDeleteBankAccount: U, onViewAllDocuments: W, editForm: G, labels: K }) {
315
+ function I({ open: e, onOpenChange: o, privacyResetKey: s, mode: f = "customer", counterpart: m, isLoading: h, isError: g, canEdit: E = !0, canDelete: k = !0, onEdit: I, onDelete: L, onClose: R, onEditAddress: z, onAddAddress: B, onAddBankAccount: V, onEditBankAccount: H, onDeleteBankAccount: U, onViewAllDocuments: W, editForm: G, labels: K }) {
315
316
  let q = {
316
- ...g,
317
+ ..._,
317
318
  ...K
318
- }, [J, Y] = re(null), X = [
319
- f ?? h?.name ?? "",
320
- h?.taxId ?? "",
321
- h?.taxIdMasked ?? ""
322
- ].join(":"), Z = e && !!h?.taxId && J === X;
323
- ne(() => {
319
+ }, [J, Y] = y(null), X = [
320
+ s ?? m?.name ?? "",
321
+ m?.taxId ?? "",
322
+ m?.taxIdMasked ?? ""
323
+ ].join(":"), Z = e && !!m?.taxId && J === X;
324
+ v(() => {
324
325
  e || Y(null);
325
326
  }, [e]);
326
- let Q = m === "vendor", ae = Z ? h?.taxId ?? E : h?.taxIdMasked || h?.taxId || E, $ = h?.taxIdHelpText ?? (Q ? q.vendorTaxIdHelp : q.customerTaxIdHelp);
327
- return /* @__PURE__ */ v(s, {
327
+ let Q = f === "vendor", ae = Z ? m?.taxId ?? O : m?.taxIdMasked || m?.taxId || O, $ = m?.taxIdHelpText ?? (Q ? q.vendorTaxIdHelp : q.customerTaxIdHelp);
328
+ return /* @__PURE__ */ x(c, {
328
329
  open: e,
329
330
  onOpenChange: (e) => {
330
331
  e || Y(null), o(e);
331
332
  },
332
- children: /* @__PURE__ */ y(c, {
333
+ children: /* @__PURE__ */ S(l, {
333
334
  showCloseButton: !1,
334
335
  className: "ttw:w-160 ttw:sm:max-w-160 ttw:gap-0 ttw:overflow-y-auto",
335
- children: [/* @__PURE__ */ y(u, {
336
+ children: [/* @__PURE__ */ S(u, {
336
337
  className: "ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-4 ttw:border-b ttw:px-6 ttw:py-6",
337
- children: [/* @__PURE__ */ y("div", {
338
+ children: [/* @__PURE__ */ S("div", {
338
339
  className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-1",
339
- children: [/* @__PURE__ */ v(d, {
340
+ children: [/* @__PURE__ */ x(d, {
340
341
  className: "ttw:truncate ttw:text-2xl",
341
- children: h?.name ?? q.loadingTitle
342
- }), /* @__PURE__ */ v(l, { children: h?.subtitle ?? q.hiddenDescription })]
343
- }), /* @__PURE__ */ y("div", {
342
+ children: m?.name ?? q.loadingTitle
343
+ }), /* @__PURE__ */ x(ee, { children: m?.subtitle ?? q.hiddenDescription })]
344
+ }), /* @__PURE__ */ S("div", {
344
345
  className: "ttw:flex ttw:gap-2",
345
- children: [F && h && /* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v(a, {
346
+ children: [k && m && /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ x(a, {
346
347
  asChild: !0,
347
- children: /* @__PURE__ */ v(t, {
348
+ children: /* @__PURE__ */ x(t, {
348
349
  type: "button",
349
350
  variant: "outline",
350
351
  size: "icon",
351
352
  "aria-label": q.openActionsMenu,
352
- children: /* @__PURE__ */ v(S, { className: "ttw:size-4" })
353
+ children: /* @__PURE__ */ x(re, { className: "ttw:size-4" })
353
354
  })
354
- }), /* @__PURE__ */ v(r, {
355
+ }), /* @__PURE__ */ x(r, {
355
356
  align: "end",
356
- children: /* @__PURE__ */ y(i, {
357
+ children: /* @__PURE__ */ S(i, {
357
358
  variant: "destructive",
358
359
  onClick: L,
359
- children: [/* @__PURE__ */ v(T, { className: "ttw:size-4" }), Q ? q.deleteVendorAction : q.deleteCustomerAction]
360
+ children: [/* @__PURE__ */ x(D, { className: "ttw:size-4" }), Q ? q.deleteVendorAction : q.deleteCustomerAction]
360
361
  })
361
- })] }), /* @__PURE__ */ v(t, {
362
+ })] }), /* @__PURE__ */ x(t, {
362
363
  type: "button",
363
364
  variant: "outline",
364
365
  size: "icon",
@@ -366,134 +367,134 @@ function P({ open: e, onOpenChange: o, privacyResetKey: f, mode: m = "customer",
366
367
  onClick: () => {
367
368
  Y(null), R();
368
369
  },
369
- children: /* @__PURE__ */ v(ie, { className: "ttw:size-4" })
370
+ children: /* @__PURE__ */ x(ie, { className: "ttw:size-4" })
370
371
  })]
371
372
  })]
372
- }), D ? /* @__PURE__ */ v("div", {
373
+ }), g ? /* @__PURE__ */ x("div", {
373
374
  className: "ttw:p-6",
374
- children: /* @__PURE__ */ v(te, {
375
+ children: /* @__PURE__ */ x(ne, {
375
376
  title: q.errorTitle,
376
377
  description: q.errorDescription
377
378
  })
378
- }) : w || !h ? /* @__PURE__ */ v("div", {
379
+ }) : h || !m ? /* @__PURE__ */ x("div", {
379
380
  className: "ttw:p-6",
380
- children: /* @__PURE__ */ v(ee, { title: q.loadingTitle })
381
- }) : /* @__PURE__ */ y("main", {
381
+ children: /* @__PURE__ */ x(te, { title: q.loadingTitle })
382
+ }) : /* @__PURE__ */ S("main", {
382
383
  className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:p-6",
383
384
  children: [
384
- /* @__PURE__ */ y("div", {
385
+ /* @__PURE__ */ S("div", {
385
386
  className: "ttw:flex ttw:flex-col ttw:gap-4",
386
- children: [/* @__PURE__ */ v(k, {
387
- mode: m,
388
- summary: h.summary,
387
+ children: [/* @__PURE__ */ x(j, {
388
+ mode: f,
389
+ summary: m.summary,
389
390
  labels: q
390
- }), /* @__PURE__ */ v(t, {
391
+ }), /* @__PURE__ */ x(t, {
391
392
  className: "ttw:w-fit",
392
393
  disabled: !0,
393
394
  children: Q ? q.sendPaymentAction : q.issueInvoiceAction
394
395
  })]
395
396
  }),
396
- /* @__PURE__ */ v(A, {
397
- mode: m,
398
- documents: h.recentDocuments,
397
+ /* @__PURE__ */ x(M, {
398
+ mode: f,
399
+ documents: m.recentDocuments,
399
400
  labels: q,
400
401
  onViewAll: W
401
402
  }),
402
- G ? /* @__PURE__ */ y("section", {
403
+ G ? /* @__PURE__ */ S("section", {
403
404
  className: "ttw:flex ttw:flex-col",
404
- children: [/* @__PURE__ */ y("div", {
405
+ children: [/* @__PURE__ */ S("div", {
405
406
  className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:border-b ttw:pb-5",
406
- children: [/* @__PURE__ */ v(p, {
407
+ children: [/* @__PURE__ */ x(p, {
407
408
  variant: "body1",
408
409
  className: "ttw:font-medium",
409
410
  children: Q ? q.vendorDetailsHeading : q.customerDetailsHeading
410
- }), /* @__PURE__ */ v(p, {
411
+ }), /* @__PURE__ */ x(p, {
411
412
  variant: "body2",
412
413
  className: "ttw:text-muted-foreground",
413
414
  children: Q ? q.vendorDetailsDescription : q.customerDetailsDescription
414
415
  })]
415
- }), /* @__PURE__ */ v(N, {
416
- mode: m,
416
+ }), /* @__PURE__ */ x(F, {
417
+ mode: f,
417
418
  form: G
418
419
  })]
419
- }) : /* @__PURE__ */ y(_, { children: [
420
- /* @__PURE__ */ y("section", {
420
+ }) : /* @__PURE__ */ S(b, { children: [
421
+ /* @__PURE__ */ S("section", {
421
422
  className: "ttw:flex ttw:flex-col",
422
423
  children: [
423
- /* @__PURE__ */ y("div", {
424
+ /* @__PURE__ */ S("div", {
424
425
  className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:border-b ttw:pb-5",
425
- children: [/* @__PURE__ */ y("div", {
426
+ children: [/* @__PURE__ */ S("div", {
426
427
  className: "ttw:flex ttw:flex-col ttw:gap-1",
427
- children: [/* @__PURE__ */ v(p, {
428
+ children: [/* @__PURE__ */ x(p, {
428
429
  variant: "body1",
429
430
  className: "ttw:font-medium",
430
431
  children: Q ? q.vendorDetailsHeading : q.customerDetailsHeading
431
- }), /* @__PURE__ */ v(p, {
432
+ }), /* @__PURE__ */ x(p, {
432
433
  variant: "body2",
433
434
  className: "ttw:text-muted-foreground",
434
435
  children: Q ? q.vendorDetailsDescription : q.customerDetailsDescription
435
436
  })]
436
- }), P && /* @__PURE__ */ y(t, {
437
+ }), E && /* @__PURE__ */ S(t, {
437
438
  type: "button",
438
439
  variant: "ghost",
439
440
  size: "sm",
440
441
  onClick: I,
441
- children: [/* @__PURE__ */ v(C, { className: "ttw:size-4" }), q.editButton]
442
+ children: [/* @__PURE__ */ x(T, { className: "ttw:size-4" }), q.editButton]
442
443
  })]
443
444
  }),
444
- /* @__PURE__ */ v(O, {
445
+ /* @__PURE__ */ x(A, {
445
446
  label: q.rowType,
446
- children: h.entityTypeLabel ?? E
447
+ children: m.entityTypeLabel ?? O
447
448
  }),
448
- /* @__PURE__ */ v(O, {
449
+ /* @__PURE__ */ x(A, {
449
450
  label: q.rowName,
450
- children: h.name
451
+ children: m.name
451
452
  }),
452
- /* @__PURE__ */ v(O, {
453
+ /* @__PURE__ */ x(A, {
453
454
  label: q.rowEmail,
454
- children: h.email || E
455
+ children: m.email || O
455
456
  }),
456
- !Q && /* @__PURE__ */ v(O, {
457
+ !Q && /* @__PURE__ */ x(A, {
457
458
  label: q.rowPaymentReminders,
458
- children: h.remindersLabel ?? E
459
+ children: m.remindersLabel ?? O
459
460
  }),
460
- /* @__PURE__ */ v(O, {
461
+ /* @__PURE__ */ x(A, {
461
462
  label: q.rowPhone,
462
- children: h.phone || E
463
+ children: m.phone || O
463
464
  }),
464
- /* @__PURE__ */ v(O, {
465
- label: h.entityType === "individual" ? q.rowTaxIdSsn : q.rowTaxIdEin,
465
+ /* @__PURE__ */ x(A, {
466
+ label: m.entityType === "individual" ? q.rowTaxIdSsn : q.rowTaxIdEin,
466
467
  isLast: !Q,
467
- children: /* @__PURE__ */ y("div", {
468
+ children: /* @__PURE__ */ S("div", {
468
469
  className: "ttw:flex ttw:flex-col ttw:gap-2",
469
- children: [/* @__PURE__ */ y("div", {
470
+ children: [/* @__PURE__ */ S("div", {
470
471
  className: "ttw:flex ttw:items-center ttw:gap-2",
471
- children: [/* @__PURE__ */ v("span", {
472
+ children: [/* @__PURE__ */ x("span", {
472
473
  className: "ttw:font-medium",
473
474
  children: ae
474
- }), h.taxId && /* @__PURE__ */ y(t, {
475
+ }), m.taxId && /* @__PURE__ */ S(t, {
475
476
  type: "button",
476
477
  variant: "outline",
477
478
  size: "sm",
478
479
  onClick: () => {
479
480
  Y((e) => e === X ? null : X);
480
481
  },
481
- children: [v(Z ? x : b, { className: "ttw:size-4" }), Z ? q.hideTaxId : q.showTaxId]
482
+ children: [x(Z ? w : C, { className: "ttw:size-4" }), Z ? q.hideTaxId : q.showTaxId]
482
483
  })]
483
- }), $ && /* @__PURE__ */ v(p, {
484
+ }), $ && /* @__PURE__ */ x(p, {
484
485
  variant: "body2",
485
486
  className: "ttw:text-muted-foreground",
486
487
  children: $
487
488
  })]
488
489
  })
489
490
  }),
490
- Q && /* @__PURE__ */ v(O, {
491
+ Q && /* @__PURE__ */ x(A, {
491
492
  label: q.addressHeading,
492
493
  isLast: !0,
493
- children: /* @__PURE__ */ v(j, {
494
- mode: m,
495
- addressLines: h.addressLines,
496
- canEdit: P,
494
+ children: /* @__PURE__ */ x(N, {
495
+ mode: f,
496
+ addressLines: m.addressLines,
497
+ canEdit: E,
497
498
  onEditAddress: z,
498
499
  onAddAddress: B,
499
500
  labels: q
@@ -501,17 +502,17 @@ function P({ open: e, onOpenChange: o, privacyResetKey: f, mode: m = "customer",
501
502
  })
502
503
  ]
503
504
  }),
504
- !Q && /* @__PURE__ */ v(j, {
505
- mode: m,
506
- addressLines: h.addressLines,
507
- canEdit: P,
505
+ !Q && /* @__PURE__ */ x(N, {
506
+ mode: f,
507
+ addressLines: m.addressLines,
508
+ canEdit: E,
508
509
  onEditAddress: z,
509
510
  onAddAddress: B,
510
511
  labels: q
511
512
  }),
512
- Q && /* @__PURE__ */ v(M, {
513
- paymentMethod: h.paymentMethod,
514
- canEdit: P,
513
+ Q && /* @__PURE__ */ x(P, {
514
+ paymentMethod: m.paymentMethod,
515
+ canEdit: E,
515
516
  onAddBankAccount: V,
516
517
  onEditBankAccount: H,
517
518
  onDeleteBankAccount: U,
@@ -524,4 +525,4 @@ function P({ open: e, onOpenChange: o, privacyResetKey: f, mode: m = "customer",
524
525
  });
525
526
  }
526
527
  //#endregion
527
- export { P as CounterpartDetailsSheet, P as default };
528
+ export { I as CounterpartDetailsSheet, I as default };