@tesouro/embedded-components-react 0.5.233 → 0.5.236

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 (87) hide show
  1. package/README.md +19 -14
  2. package/dist/index.d.ts +175 -16
  3. package/dist/index.js +1 -1
  4. package/dist/lib/BankAccountOnboardingWidget.d.ts +39 -1
  5. package/dist/lib/ReceivablesWidget.d.ts +110 -1
  6. package/dist/lib/ReceivablesWidget.js +1 -1
  7. package/dist/lib/WidgetSuite.d.ts +65 -15
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +3 -2
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +2 -1
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +6 -0
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +15 -11
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js +441 -409
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +18 -14
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +3 -3
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +210 -208
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +98 -40
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +159 -39
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +53 -77
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +99 -132
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index36.js +40 -341
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index37.js +43 -0
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index38.js +92 -0
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index39.js +146 -0
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index40.js +354 -0
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +28 -24
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -37
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +9 -214
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +27 -159
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +233 -14
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +34 -22
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +214 -2
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +153 -87
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +16 -3
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +22 -21
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +2 -51
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +30 -15
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +90 -14
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +3 -10
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +20 -69
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +51 -33
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +16 -17
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +8 -14
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +70 -30
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +33 -14
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +17 -25
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +12 -83
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +9 -121
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +28 -401
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +16 -2
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +22 -42
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +80 -65
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +383 -473
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +2 -106
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +48 -0
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +72 -2
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +498 -4
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +106 -1
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +141 -93
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +2 -28
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +4 -236
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +0 -2
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +90 -239
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +24 -89
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +231 -54
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +3 -353
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +249 -0
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +93 -0
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +3 -40
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +59 -0
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +353 -0
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +18 -2
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +121 -9
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +100 -27
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +38 -233
  83. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  84. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +123 -92
  85. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +12 -5
  86. package/package.json +1 -1
  87. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +0 -100
@@ -1,406 +1,33 @@
1
- import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTrigger as r, Badge as i, Button as a, Sheet as o, SheetContent as ee, SheetDescription as s, SheetHeader as c, SheetTitle as l, Spinner as te, Tooltip as u, TooltipContent as d, TooltipProvider as f, TooltipTrigger as p, cn as m } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ErrorState as h } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
3
- import "../../../shared/ui/dist/index.js";
4
- import { RECEIVABLE_DETAILS_PANEL_LABELS_EN as g } from "./index9.js";
5
- import { ReceivableStatusBadge as _ } from "./index18.js";
6
- import { RECEIVABLE_DETAILS_SECTION as v } from "./index21.js";
7
- import { ACTION_ICON as y, ACTION_LABEL_KEY as b, STATUS_ICON as x, amountValueToneClass as S, headerIconButtonClass as C } from "./index19.js";
8
- import { AmountCell as w } from "./index20.js";
9
- import { AttachmentsItem as ne } from "./index22.js";
10
- import { AuditHistoryItem as re } from "./index23.js";
11
- import { CloseButton as T } from "./index24.js";
12
- import { InfoRow as E } from "./index25.js";
13
- import { OverflowMenu as ie } from "./index26.js";
14
- import { SeriesStatusChip as ae } from "./index28.js";
15
- import { ScheduledInvoicesTable as D } from "./index29.js";
16
- import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
17
- import { ChevronLeft as j, CircleAlert as M, EyeIcon as N, Repeat as P } from "lucide-react";
1
+ import { Button as e, DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i, Tooltip as a, TooltipContent as o, TooltipTrigger as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ACTION_ICON as c } from "./index23.js";
3
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
4
+ import { MoreVerticalIcon as d } from "lucide-react";
18
5
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js
19
- function F({ open: F, onOpenChange: I, details: L, unsupported: R, isLoading: z, isError: B, onActionClick: V, onClose: H, openSections: U, onOpenSectionsChange: W, disabledActions: G, labels: K }) {
20
- let q = {
21
- ...g,
22
- ...K
23
- }, J = L?.panel, Y = B ? {
24
- title: q.errorTitle,
25
- description: q.errorDescription
26
- } : R, oe = J?.amountTone === "danger", X = (e) => q[b[e]], Z = L ? x[L.status] : void 0, Q = J?.recurringSeries, $ = L && J && J.primaryActions.length > 0 ? /* @__PURE__ */ k("div", {
27
- className: "ttw:flex ttw:items-center ttw:gap-2 ttw:border-t ttw:border-border ttw:pt-3",
28
- children: J.primaryActions.map((e, t) => {
29
- let n = y[e], r = t === J.primaryActions.length - 1;
30
- return /* @__PURE__ */ A(a, {
31
- size: "sm",
32
- variant: r ? "default" : "outline",
33
- onClick: () => V(e, L),
34
- children: [/* @__PURE__ */ k(n, { className: "ttw:size-4" }), X(e)]
35
- }, e);
6
+ function f({ actions: f, triggerLabel: p, getActionLabel: m, onSelect: h, disabledActions: g, className: _ }) {
7
+ return /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ u(a, { children: [/* @__PURE__ */ l(s, {
8
+ asChild: !0,
9
+ children: /* @__PURE__ */ l(i, {
10
+ asChild: !0,
11
+ children: /* @__PURE__ */ l(e, {
12
+ variant: "ghost",
13
+ size: "icon",
14
+ className: _,
15
+ "aria-label": p,
16
+ children: /* @__PURE__ */ l(d, { className: "ttw:size-4" })
17
+ })
36
18
  })
37
- }) : null;
38
- return /* @__PURE__ */ k(o, {
39
- open: F,
40
- onOpenChange: I,
41
- children: /* @__PURE__ */ A(ee, {
42
- showCloseButton: !1,
43
- className: "ttw:w-180 ttw:overflow-y-auto ttw:p-0 ttw:sm:max-w-180",
44
- children: [Y || z || !L ? /* @__PURE__ */ k(T, {
45
- label: q.closeButton,
46
- onClose: H,
47
- className: m(C, "ttw:absolute ttw:right-4 ttw:top-4 ttw:z-10")
48
- }) : null, Y ? /* @__PURE__ */ A("div", {
49
- className: "ttw:p-6",
50
- children: [/* @__PURE__ */ A(c, {
51
- className: "ttw:sr-only",
52
- children: [/* @__PURE__ */ k(l, { children: Y.title }), /* @__PURE__ */ k(s, { children: q.hiddenDescription })]
53
- }), /* @__PURE__ */ k(h, {
54
- title: Y.title,
55
- description: Y.description
56
- })]
57
- }) : z || !L || !J ? /* @__PURE__ */ A(c, {
58
- className: "ttw:p-6",
59
- children: [/* @__PURE__ */ k(l, { children: q.loadingTitle }), /* @__PURE__ */ k(s, {
60
- className: "ttw:sr-only",
61
- children: q.hiddenDescription
62
- })]
63
- }) : /* @__PURE__ */ A(O, { children: [
64
- J.seriesLink ? /* @__PURE__ */ k("div", {
65
- className: "ttw:border-b ttw:border-border ttw:px-6 ttw:py-3",
66
- children: /* @__PURE__ */ A("button", {
67
- type: "button",
68
- onClick: J.seriesLink.onOpen,
69
- className: "ttw:flex ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-primary ttw:hover:underline",
70
- children: [/* @__PURE__ */ k(j, {
71
- className: "ttw:size-4",
72
- "aria-hidden": "true"
73
- }), J.seriesLink.backLabel]
74
- })
75
- }) : null,
76
- /* @__PURE__ */ A(c, {
77
- className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-2 ttw:space-y-0 ttw:px-6 ttw:py-4",
78
- children: [/* @__PURE__ */ A("div", {
79
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
80
- children: [
81
- /* @__PURE__ */ k(l, {
82
- className: "ttw:text-xl ttw:font-semibold ttw:text-foreground",
83
- children: L.title
84
- }),
85
- J.subtitle ? /* @__PURE__ */ k("p", {
86
- className: "ttw:text-sm ttw:text-muted-foreground",
87
- children: J.subtitle
88
- }) : null,
89
- /* @__PURE__ */ k(s, {
90
- className: "ttw:sr-only",
91
- children: q.hiddenDescription
92
- })
93
- ]
94
- }), /* @__PURE__ */ k(f, {
95
- delayDuration: 500,
96
- children: /* @__PURE__ */ A("div", {
97
- className: "ttw:flex ttw:items-center ttw:gap-1.5",
98
- children: [
99
- L.pdfUrl ? /* @__PURE__ */ A(u, { children: [/* @__PURE__ */ k(p, {
100
- asChild: !0,
101
- children: /* @__PURE__ */ k(a, {
102
- asChild: !0,
103
- variant: "ghost",
104
- size: "icon",
105
- className: C,
106
- children: /* @__PURE__ */ k("a", {
107
- href: L.pdfUrl,
108
- target: "_blank",
109
- rel: "noreferrer",
110
- "aria-label": q.viewPdfButton,
111
- children: /* @__PURE__ */ k(N, { className: "ttw:size-4" })
112
- })
113
- })
114
- }), /* @__PURE__ */ k(d, { children: q.viewPdfButton })] }) : null,
115
- J.overflowActions.length > 0 ? /* @__PURE__ */ k(ie, {
116
- actions: J.overflowActions,
117
- triggerLabel: q.moreActionsLabel,
118
- getActionLabel: X,
119
- onSelect: (e) => V(e, L),
120
- disabledActions: G,
121
- className: C
122
- }) : null,
123
- /* @__PURE__ */ A(u, { children: [/* @__PURE__ */ k(p, {
124
- asChild: !0,
125
- children: /* @__PURE__ */ k(T, {
126
- label: q.closeButton,
127
- onClose: H,
128
- className: C
129
- })
130
- }), /* @__PURE__ */ k(d, { children: q.closeButton })] })
131
- ]
132
- })
133
- })]
134
- }),
135
- /* @__PURE__ */ A("div", {
136
- className: "ttw:flex ttw:flex-col",
137
- children: [/* @__PURE__ */ k("div", {
138
- className: "ttw:px-6",
139
- children: Q ? /* @__PURE__ */ A("div", {
140
- className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-violet-50 ttw:p-4 ttw:dark:bg-violet-950",
141
- children: [
142
- /* @__PURE__ */ A("div", {
143
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
144
- children: [/* @__PURE__ */ k("span", {
145
- className: "ttw:text-xs ttw:text-muted-foreground",
146
- children: q.recurringAmountCaption
147
- }), /* @__PURE__ */ A("div", {
148
- className: "ttw:flex ttw:items-baseline ttw:gap-1.5",
149
- children: [/* @__PURE__ */ k("span", {
150
- className: m("ttw:text-2xl ttw:font-semibold", S[J.amountTone]),
151
- children: Q.amountLabel
152
- }), /* @__PURE__ */ k("span", {
153
- className: "ttw:text-sm ttw:text-muted-foreground",
154
- children: Q.amountPeriodLabel
155
- })]
156
- })]
157
- }),
158
- /* @__PURE__ */ A("div", {
159
- className: "ttw:flex ttw:items-center ttw:gap-2",
160
- children: [/* @__PURE__ */ A(i, {
161
- variant: "outline",
162
- className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700",
163
- children: [/* @__PURE__ */ k(P, { className: "ttw:size-3" }), q.recurringBadge]
164
- }), /* @__PURE__ */ k(ae, {
165
- label: Q.statusLabel,
166
- tone: Q.statusTone,
167
- icon: Q.statusIcon
168
- })]
169
- }),
170
- /* @__PURE__ */ A("div", {
171
- className: "ttw:flex ttw:gap-12 ttw:text-sm",
172
- children: [/* @__PURE__ */ A("div", {
173
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
174
- children: [/* @__PURE__ */ k("span", {
175
- className: "ttw:text-xs ttw:text-muted-foreground",
176
- children: q.startsOnCaption
177
- }), /* @__PURE__ */ k("span", {
178
- className: "ttw:text-foreground",
179
- children: Q.startsOnLabel
180
- })]
181
- }), /* @__PURE__ */ A("div", {
182
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
183
- children: [/* @__PURE__ */ k("span", {
184
- className: "ttw:text-xs ttw:text-muted-foreground",
185
- children: q.endsOnCaption
186
- }), /* @__PURE__ */ k("span", {
187
- className: "ttw:text-foreground",
188
- children: Q.endsOnLabel
189
- })]
190
- })]
191
- }),
192
- $
193
- ]
194
- }) : /* @__PURE__ */ A("div", {
195
- className: m("ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4", oe && "ttw:border ttw:border-red-200"),
196
- children: [
197
- /* @__PURE__ */ k("div", {
198
- className: "ttw:flex ttw:flex-row ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
199
- children: J.amountRows.map((e) => /* @__PURE__ */ k(w, {
200
- row: e,
201
- defaultTone: J.amountTone
202
- }, e.label))
203
- }),
204
- /* @__PURE__ */ A("div", {
205
- className: "ttw:flex ttw:items-center ttw:gap-2",
206
- children: [J.overdueLabel ? /* @__PURE__ */ A("span", {
207
- className: "ttw:inline-flex ttw:items-center ttw:gap-1 ttw:rounded-full ttw:bg-red-100 ttw:px-2.5 ttw:py-0.5 ttw:text-xs ttw:font-medium ttw:text-red-700",
208
- children: [/* @__PURE__ */ k(M, { className: "ttw:size-3" }), J.overdueLabel]
209
- }) : /* @__PURE__ */ k(_, {
210
- label: J.statusLabel,
211
- tone: L.statusTone,
212
- icon: Z ? /* @__PURE__ */ k(Z, { className: "ttw:size-3" }) : void 0
213
- }), J.recurring ? /* @__PURE__ */ A(i, {
214
- variant: "outline",
215
- className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700",
216
- children: [/* @__PURE__ */ k(P, { className: "ttw:size-3" }), q.recurringBadge]
217
- }) : null]
218
- }),
219
- /* @__PURE__ */ A("div", {
220
- className: "ttw:flex ttw:gap-12 ttw:text-sm",
221
- children: [/* @__PURE__ */ A("div", {
222
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
223
- children: [/* @__PURE__ */ k("span", {
224
- className: "ttw:text-xs ttw:text-muted-foreground",
225
- children: q.invoiceDateCaption
226
- }), /* @__PURE__ */ k("span", {
227
- className: "ttw:text-foreground",
228
- children: J.issueDateLabel
229
- })]
230
- }), /* @__PURE__ */ A("div", {
231
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
232
- children: [/* @__PURE__ */ k("span", {
233
- className: "ttw:text-xs ttw:text-muted-foreground",
234
- children: J.dueDateCaption
235
- }), /* @__PURE__ */ k("span", {
236
- className: "ttw:text-foreground",
237
- children: J.dueDateLabel
238
- })]
239
- })]
240
- }),
241
- $
242
- ]
243
- })
244
- }), /* @__PURE__ */ A("div", {
245
- className: "ttw:px-6",
246
- children: [
247
- J.paymentHistory ? /* @__PURE__ */ A("section", {
248
- "aria-label": q.paymentHistoryHeading,
249
- className: "ttw:border-b ttw:py-4",
250
- children: [/* @__PURE__ */ k("h3", {
251
- className: "ttw:mb-3 ttw:text-sm ttw:font-medium",
252
- children: q.paymentHistoryHeading
253
- }), J.paymentHistory.isLoading ? /* @__PURE__ */ k("div", {
254
- className: "ttw:flex ttw:py-2",
255
- children: /* @__PURE__ */ k(te, {
256
- className: "ttw:size-5",
257
- "aria-label": q.paymentHistoryLoading
258
- })
259
- }) : J.paymentHistory.rows.length === 0 ? /* @__PURE__ */ k("p", {
260
- className: m("ttw:text-sm", J.paymentHistory.emptyTone === "danger" ? "ttw:text-red-600" : "ttw:text-muted-foreground"),
261
- children: q.paymentHistoryEmpty
262
- }) : /* @__PURE__ */ A("div", {
263
- className: "ttw:flex ttw:flex-col",
264
- children: [J.paymentHistory.rows.map((e) => /* @__PURE__ */ A("div", {
265
- className: "ttw:flex ttw:justify-between ttw:border-b ttw:border-border ttw:py-2 ttw:text-sm",
266
- children: [/* @__PURE__ */ k("span", { children: e.dateLabel }), /* @__PURE__ */ k("span", { children: e.amountLabel })]
267
- }, e.id)), /* @__PURE__ */ A("div", {
268
- className: "ttw:flex ttw:justify-between ttw:py-2 ttw:text-sm ttw:font-medium",
269
- children: [/* @__PURE__ */ k("span", { children: q.paymentHistoryTotalLabel }), /* @__PURE__ */ k("span", { children: J.paymentHistory.totalLabel })]
270
- })]
271
- })]
272
- }) : null,
273
- J.customerContact.length > 0 ? /* @__PURE__ */ A("section", {
274
- "aria-label": q.customerDetailsHeading,
275
- className: "ttw:border-b ttw:py-4",
276
- children: [/* @__PURE__ */ k("h3", {
277
- className: "ttw:mb-3 ttw:text-sm ttw:font-medium",
278
- children: q.customerDetailsHeading
279
- }), /* @__PURE__ */ k("div", {
280
- className: "ttw:flex ttw:flex-col",
281
- children: J.customerContact.map((e) => /* @__PURE__ */ k(E, { ...e }, e.label))
282
- })]
283
- }) : null,
284
- /* @__PURE__ */ A(e, {
285
- type: "multiple",
286
- value: U,
287
- onValueChange: W,
288
- className: "ttw:w-full",
289
- children: [
290
- /* @__PURE__ */ A(n, {
291
- value: v.billing,
292
- children: [/* @__PURE__ */ k(r, { children: q.billingHeading }), /* @__PURE__ */ k(t, { children: /* @__PURE__ */ A("div", {
293
- className: "ttw:flex ttw:flex-col",
294
- children: [J.billingItems.map((e) => /* @__PURE__ */ k(E, { ...e }, e.label)), J.seriesLink ? /* @__PURE__ */ A("div", {
295
- className: "ttw:flex ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:text-sm ttw:last:border-b-0",
296
- children: [/* @__PURE__ */ k("span", {
297
- className: "ttw:w-40 ttw:shrink-0 ttw:text-muted-foreground",
298
- children: q.recurringSeriesRowLabel
299
- }), /* @__PURE__ */ k("button", {
300
- type: "button",
301
- onClick: J.seriesLink.onOpen,
302
- className: "ttw:text-left ttw:text-primary ttw:hover:underline",
303
- children: J.seriesLink.title
304
- })]
305
- }) : null]
306
- }) })]
307
- }),
308
- J.lineItemsSection ? /* @__PURE__ */ A(n, {
309
- value: v.lineItems,
310
- children: [/* @__PURE__ */ k(r, { children: /* @__PURE__ */ A("span", {
311
- className: "ttw:flex ttw:items-center ttw:gap-2",
312
- children: [q.lineItemsHeading, /* @__PURE__ */ k(i, {
313
- variant: "secondary",
314
- className: "ttw:rounded-full",
315
- children: J.lineItemsSection.countLabel
316
- })]
317
- }) }), /* @__PURE__ */ k(t, { children: /* @__PURE__ */ A("div", {
318
- className: "ttw:flex ttw:flex-col ttw:text-sm",
319
- children: [L.lineItems.length === 0 ? /* @__PURE__ */ k("p", {
320
- className: "ttw:py-3 ttw:text-muted-foreground",
321
- children: q.noLineItems
322
- }) : L.lineItems.map((e) => /* @__PURE__ */ A("div", {
323
- className: "ttw:flex ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:py-3",
324
- children: [/* @__PURE__ */ A("div", {
325
- className: "ttw:flex ttw:flex-col",
326
- children: [/* @__PURE__ */ k("span", {
327
- className: "ttw:font-medium",
328
- children: e.name
329
- }), /* @__PURE__ */ A("span", {
330
- className: "ttw:text-muted-foreground",
331
- children: [
332
- e.quantityLabel,
333
- " ",
334
- q.lineItemMultiplier,
335
- " ",
336
- e.unitPriceLabel,
337
- " ",
338
- q.lineItemEaLabel
339
- ]
340
- })]
341
- }), /* @__PURE__ */ k("span", { children: e.totalLabel })]
342
- }, e.id)), J.lineItemsSection.totals.length > 0 ? /* @__PURE__ */ k("div", {
343
- className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:py-3",
344
- children: J.lineItemsSection.totals.map((e) => /* @__PURE__ */ A("div", {
345
- className: m("ttw:flex ttw:justify-between", e.emphasis && "ttw:font-medium"),
346
- children: [/* @__PURE__ */ k("span", { children: e.label }), /* @__PURE__ */ k("span", { children: e.value })]
347
- }, e.label))
348
- }) : null]
349
- }) })]
350
- }) : null,
351
- J.notes ? /* @__PURE__ */ A(n, {
352
- value: v.notes,
353
- children: [/* @__PURE__ */ k(r, { children: /* @__PURE__ */ A("span", {
354
- className: "ttw:flex ttw:items-center ttw:gap-2",
355
- children: [q.notesHeading, /* @__PURE__ */ k(i, {
356
- variant: "secondary",
357
- className: "ttw:rounded-full",
358
- children: J.notes.countLabel
359
- })]
360
- }) }), /* @__PURE__ */ k(t, { children: /* @__PURE__ */ A("div", {
361
- className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:text-sm",
362
- children: [J.notes.opening ? /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
363
- className: "ttw:mb-1 ttw:font-medium",
364
- children: q.notesOpeningLabel
365
- }), /* @__PURE__ */ k("p", {
366
- className: "ttw:text-muted-foreground",
367
- children: J.notes.opening
368
- })] }) : null, J.notes.closing ? /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
369
- className: "ttw:mb-1 ttw:font-medium",
370
- children: q.notesClosingLabel
371
- }), /* @__PURE__ */ k("p", {
372
- className: "ttw:text-muted-foreground",
373
- children: J.notes.closing
374
- })] }) : null]
375
- }) })]
376
- }) : null,
377
- /* @__PURE__ */ k(ne, {
378
- attachments: J.attachments,
379
- labels: q
380
- }),
381
- /* @__PURE__ */ k(re, {
382
- auditHistory: J.auditHistory,
383
- labels: q
384
- })
385
- ]
386
- }),
387
- Q ? /* @__PURE__ */ A("section", {
388
- "aria-label": Q.scheduleTitle,
389
- className: "ttw:border-t ttw:border-border ttw:py-4",
390
- children: [/* @__PURE__ */ k("h3", {
391
- className: "ttw:mb-3 ttw:text-sm ttw:font-medium",
392
- children: Q.scheduleTitle
393
- }), /* @__PURE__ */ k(D, {
394
- rows: Q.schedule,
395
- labels: q
396
- })]
397
- }) : null
398
- ]
399
- })]
400
- })
401
- ] })]
19
+ }), /* @__PURE__ */ l(o, { children: p })] }), /* @__PURE__ */ l(n, {
20
+ align: "end",
21
+ children: f.map((e) => {
22
+ let t = c[e];
23
+ return /* @__PURE__ */ u(r, {
24
+ variant: e === "delete" ? "destructive" : "default",
25
+ disabled: g?.includes(e),
26
+ onClick: () => h(e),
27
+ children: [/* @__PURE__ */ l(t, { className: "ttw:size-4" }), m(e)]
28
+ }, e);
402
29
  })
403
- });
30
+ })] });
404
31
  }
405
32
  //#endregion
406
- export { F as ReceivableDetailsPanel, F as default };
33
+ export { f as OverflowMenu };
@@ -1,2 +1,16 @@
1
- import "./index21.js";
2
- import "./index30.js";
1
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js
2
+ var e = {
3
+ neutral: "ttw:bg-muted ttw:text-muted-foreground",
4
+ info: "ttw:bg-indigo-100 ttw:text-indigo-700",
5
+ warning: "ttw:bg-yellow-100 ttw:text-yellow-700",
6
+ danger: "ttw:bg-destructive/10 ttw:text-destructive",
7
+ success: "ttw:bg-green-100 ttw:text-green-700"
8
+ }, t = {
9
+ neutral: "ttw:bg-muted-foreground",
10
+ info: "ttw:bg-indigo-700",
11
+ warning: "ttw:bg-yellow-700",
12
+ danger: "ttw:bg-destructive",
13
+ success: "ttw:bg-green-700"
14
+ };
15
+ //#endregion
16
+ export { e as RECURRENCE_CHIP_CLASS, t as RECURRENCE_DOT_CLASS };
@@ -1,48 +1,28 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
1
+ import { Badge as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { SERIES_STATUS_ICON as n } from "./index23.js";
3
+ import { RECURRENCE_CHIP_CLASS as r, RECURRENCE_DOT_CLASS as i } from "./index31.js";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
5
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js
4
- function r({ label: r, value: i, className: a }) {
5
- return /* @__PURE__ */ n("li", {
6
- className: e("ttw:flex ttw:items-center ttw:justify-between", a),
7
- children: [/* @__PURE__ */ t("span", { children: r }), /* @__PURE__ */ t("span", { children: i })]
6
+ function s({ label: i, tone: s, icon: c }) {
7
+ let l = c ? n[c] : void 0;
8
+ return /* @__PURE__ */ o(e, {
9
+ variant: "outline",
10
+ className: t("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:border-transparent", r[s]),
11
+ children: [l ? /* @__PURE__ */ a(l, {
12
+ className: "ttw:size-3",
13
+ "aria-hidden": !0
14
+ }) : null, i]
8
15
  });
9
16
  }
10
- function i({ totals: e, labels: i }) {
11
- return /* @__PURE__ */ n("ul", {
12
- className: "ttw:flex ttw:w-full ttw:list-none ttw:flex-col ttw:gap-1.5",
13
- children: [
14
- /* @__PURE__ */ t(r, {
15
- label: i.subtotalLabel,
16
- value: e.subtotal,
17
- className: "ttw:text-sm ttw:font-normal"
18
- }),
19
- /* @__PURE__ */ t(r, {
20
- label: i.discountTotalLabel,
21
- value: e.discount,
22
- className: "ttw:text-sm ttw:font-normal"
23
- }),
24
- /* @__PURE__ */ t(r, {
25
- label: i.nonTaxableSubtotalLabel,
26
- value: e.nonTaxableSubtotal,
27
- className: "ttw:text-sm ttw:font-normal ttw:text-muted-foreground"
28
- }),
29
- /* @__PURE__ */ t(r, {
30
- label: i.taxableSubtotalLabel,
31
- value: e.taxableSubtotal,
32
- className: "ttw:text-sm ttw:font-normal ttw:text-muted-foreground"
33
- }),
34
- /* @__PURE__ */ t(r, {
35
- label: i.taxTotalLabel,
36
- value: e.tax,
37
- className: "ttw:text-sm ttw:font-normal"
38
- }),
39
- /* @__PURE__ */ t(r, {
40
- label: i.totalLabel,
41
- value: e.total,
42
- className: "ttw:text-lg ttw:font-medium"
43
- })
44
- ]
17
+ function c({ label: n, tone: s }) {
18
+ return /* @__PURE__ */ o(e, {
19
+ variant: "outline",
20
+ className: t("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:border-transparent", r[s]),
21
+ children: [/* @__PURE__ */ a("span", {
22
+ "aria-hidden": !0,
23
+ className: t("ttw:inline-block ttw:size-2 ttw:rounded-full", i[s])
24
+ }), n]
45
25
  });
46
26
  }
47
27
  //#endregion
48
- export { i as ReceivableFormTotals };
28
+ export { c as IterationStatusChip, s as SeriesStatusChip };