@tesouro/embedded-components-react 0.5.227 → 0.5.230

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 (90) hide show
  1. package/README.md +22 -21
  2. package/dist/index.d.ts +87 -34
  3. package/dist/index.js +1 -1
  4. package/dist/lib/ReceivablesWidget.d.ts +87 -34
  5. package/dist/lib/ReceivablesWidget.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +5 -5
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +29 -59
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +32 -33
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +34 -32
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +120 -52
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +44 -100
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +93 -442
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +356 -201
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +225 -157
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +152 -21
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +18 -221
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +220 -31
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +125 -124
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +58 -150
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +232 -46
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +303 -122
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +43 -58
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +125 -98
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +140 -106
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +46 -232
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +119 -29
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +81 -613
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +116 -39
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +27 -33
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +634 -72
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +39 -119
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +36 -317
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +82 -0
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +139 -0
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +340 -0
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +15 -2
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +55 -468
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +443 -97
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +24 -22
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +32 -2
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +205 -84
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +161 -3
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +12 -20
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +25 -1
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +4 -3
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +95 -3
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +3 -18
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +24 -1
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +42 -4
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +14 -7
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +19 -12
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +73 -1
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +17 -261
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +12 -44
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +28 -68
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +288 -479
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +1 -106
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +48 -0
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +72 -2
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +496 -4
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +121 -27
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +106 -1
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +2 -28
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +4 -236
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +0 -2
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +90 -239
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +24 -89
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +231 -54
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +3 -353
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +249 -0
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +100 -207
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +93 -0
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +59 -0
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +353 -0
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +35 -29
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +2 -216
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +9 -159
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +27 -14
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +216 -23
  84. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -40
  85. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +189 -211
  86. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +43 -59
  87. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  88. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js +12 -12
  89. package/package.json +1 -1
  90. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +0 -100
@@ -1 +1,24 @@
1
- import "react/jsx-runtime";
1
+ import { Badge as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { RECEIVABLE_STATUS_BADGE_LABELS_EN as n } from "./index9.js";
3
+ import { jsxs as r } from "react/jsx-runtime";
4
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js
5
+ var i = {
6
+ danger: "ttw:border-red-200 ttw:bg-red-50 ttw:text-red-700 ttw:hover:bg-red-50",
7
+ info: "ttw:border-blue-200 ttw:bg-blue-50 ttw:text-blue-700 ttw:hover:bg-blue-50",
8
+ neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
9
+ success: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700 ttw:hover:bg-emerald-50",
10
+ warning: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800 ttw:hover:bg-amber-50"
11
+ };
12
+ function a({ status: a, label: o, tone: s, labels: c, icon: l }) {
13
+ let u = {
14
+ ...n,
15
+ ...c
16
+ }, d = o ?? u[a] ?? u.unknown;
17
+ return /* @__PURE__ */ r(e, {
18
+ variant: "outline",
19
+ className: t(l && "ttw:gap-1", i[s]),
20
+ children: [l, d]
21
+ });
22
+ }
23
+ //#endregion
24
+ export { a as ReceivableStatusBadge, a as default };
@@ -1,4 +1,42 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "./index14.js";
3
- import "react/jsx-runtime";
4
- import "lucide-react";
1
+ import { Ban as e, Check as t, CircleCheck as n, CircleSlash as r, CircleX as i, ClipboardCheck as a, Clock as o, CopyPlus as s, Mail as c, PenTool as l, Pencil as u, Trash2 as d } from "lucide-react";
2
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js
3
+ var f = {
4
+ edit: "editButton",
5
+ issue: "issueButton",
6
+ recordPayment: "recordPaymentButton",
7
+ send: "sendButton",
8
+ accept: "acceptButton",
9
+ decline: "declineButton",
10
+ markPaid: "markPaidButton",
11
+ markUncollectible: "markUncollectibleButton",
12
+ cancel: "cancelButton",
13
+ clone: "cloneButton",
14
+ delete: "deleteButton"
15
+ }, p = {
16
+ edit: u,
17
+ issue: c,
18
+ recordPayment: a,
19
+ send: c,
20
+ accept: n,
21
+ decline: i,
22
+ markPaid: n,
23
+ markUncollectible: r,
24
+ cancel: e,
25
+ clone: s,
26
+ delete: d
27
+ }, m = {
28
+ draft: l,
29
+ issuing: o,
30
+ issued: o,
31
+ partially_paid: o,
32
+ paid: t,
33
+ overdue: o,
34
+ canceled: e
35
+ }, h = {
36
+ default: "ttw:text-foreground",
37
+ danger: "ttw:text-red-600",
38
+ success: "ttw:text-emerald-600",
39
+ muted: "ttw:text-muted-foreground"
40
+ }, g = "ttw:bg-muted ttw:text-muted-foreground ttw:hover:bg-accent";
41
+ //#endregion
42
+ export { p as ACTION_ICON, f as ACTION_LABEL_KEY, m as STATUS_ICON, h as amountValueToneClass, g as headerIconButtonClass };
@@ -1,11 +1,18 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js
2
2
  var e = {
3
- billingHeading: "Billing details",
4
- billingDescription: "What are the billing terms?",
5
- paymentTermsLabel: "Payment terms",
6
- paymentTermsPlaceholder: "Select payment terms",
7
- paymentTermsReceiptDue: "Due on receipt",
8
- paymentTermsCustomDate: "Custom date"
3
+ issueDescription: "The customer will be emailed a copy of the invoice with payment instructions.",
4
+ toLabel: "To",
5
+ subjectLabel: "Subject",
6
+ messageLabel: "Message",
7
+ messagePlaceholder: "e.g., Thank you for your business",
8
+ attachmentsLabel: "Attachments",
9
+ attachmentsCaption: "To change what files are attached to the email, you will need to update the invoice.",
10
+ skipButton: "Skip",
11
+ sendButton: "Send invoice",
12
+ productsQuestion: "Do you want to also save these items?",
13
+ productsCaption: "Saved items can be quickly added to future invoices.",
14
+ productsAllLabel: "Products and services",
15
+ saveItemsButton: "Save selected items"
9
16
  };
10
17
  //#endregion
11
- export { e as RECEIVABLE_BILLING_SECTION_LABELS_EN };
18
+ export { e as RECEIVABLE_ACTIONS_MODAL_LABELS_EN };
@@ -1,12 +1,19 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "../../../shared/ui/dist/index.js";
3
- import "./index4.js";
4
- import "./index13.js";
5
- import "./index14.js";
6
- import "./index15.js";
7
- import "./index16.js";
8
- import "./index17.js";
9
- import "./index18.js";
10
- import "./index19.js";
11
- import "react/jsx-runtime";
12
- import "lucide-react";
1
+ import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { amountValueToneClass as t } from "./index19.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js
5
+ function i({ row: i, defaultTone: a }) {
6
+ let o = i.tone ?? (i.emphasis ? a : "default");
7
+ return /* @__PURE__ */ r("div", {
8
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
9
+ children: [/* @__PURE__ */ n("span", {
10
+ className: "ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
11
+ children: i.label
12
+ }), /* @__PURE__ */ n("span", {
13
+ className: e(i.emphasis ? "ttw:text-2xl ttw:font-semibold" : "ttw:text-base ttw:font-medium", t[o]),
14
+ children: i.value
15
+ })]
16
+ });
17
+ }
18
+ //#endregion
19
+ export { i as AmountCell };
@@ -1 +1,73 @@
1
- import "./index20.js";
1
+ import { AccordionContent as e, AccordionItem as t, AccordionTrigger as n, Badge as r, Typography as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
+ import { Check as s } from "lucide-react";
4
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js
5
+ var c = "attachments";
6
+ function l({ attachments: l, labels: u }) {
7
+ return /* @__PURE__ */ o(t, {
8
+ value: c,
9
+ children: [/* @__PURE__ */ a(n, { children: /* @__PURE__ */ o("span", {
10
+ className: "ttw:flex ttw:items-center ttw:gap-2",
11
+ children: [/* @__PURE__ */ a("span", {
12
+ className: "ttw:group-hover:underline",
13
+ children: u.attachmentsHeading
14
+ }), /* @__PURE__ */ a(r, {
15
+ variant: "secondary",
16
+ className: "ttw:rounded-full",
17
+ children: l.countLabel
18
+ })]
19
+ }) }), /* @__PURE__ */ a(e, { children: l.rows.length === 0 ? /* @__PURE__ */ a(i, {
20
+ variant: "body2",
21
+ color: "muted",
22
+ children: u.attachmentsEmpty
23
+ }) : /* @__PURE__ */ o("table", {
24
+ className: "ttw:w-full ttw:border-collapse",
25
+ children: [/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", {
26
+ className: "ttw:border-b ttw:border-border",
27
+ children: [/* @__PURE__ */ a("th", {
28
+ scope: "col",
29
+ className: "ttw:py-2 ttw:text-left",
30
+ children: /* @__PURE__ */ a(i, {
31
+ component: "span",
32
+ variant: "caption",
33
+ color: "muted",
34
+ children: u.attachmentsFileColumn
35
+ })
36
+ }), /* @__PURE__ */ a("th", {
37
+ scope: "col",
38
+ className: "ttw:py-2 ttw:text-right",
39
+ children: /* @__PURE__ */ a(i, {
40
+ component: "span",
41
+ variant: "caption",
42
+ color: "muted",
43
+ children: u.attachmentsEmailedColumn
44
+ })
45
+ })]
46
+ }) }), /* @__PURE__ */ a("tbody", { children: l.rows.map((e) => /* @__PURE__ */ o("tr", {
47
+ className: "ttw:border-b ttw:border-border ttw:last:border-b-0",
48
+ children: [/* @__PURE__ */ a("td", {
49
+ className: "ttw:py-3",
50
+ children: /* @__PURE__ */ a("a", {
51
+ href: e.url,
52
+ target: "_blank",
53
+ rel: "noreferrer",
54
+ className: "ttw:text-primary ttw:hover:underline",
55
+ children: e.name
56
+ })
57
+ }), /* @__PURE__ */ a("td", {
58
+ className: "ttw:py-3 ttw:text-right ttw:align-middle",
59
+ children: e.includeInEmail ? /* @__PURE__ */ a(s, {
60
+ role: "img",
61
+ "aria-label": e.emailedLabel,
62
+ className: "ttw:inline-block ttw:size-4 ttw:text-emerald-600"
63
+ }) : /* @__PURE__ */ a("span", {
64
+ className: "ttw:sr-only",
65
+ children: e.emailedLabel
66
+ })
67
+ })]
68
+ }, e.id)) })]
69
+ }) })]
70
+ });
71
+ }
72
+ //#endregion
73
+ export { c as ATTACHMENTS_ITEM_VALUE, l as AttachmentsItem };
@@ -1,264 +1,20 @@
1
- import { Button as e, Sheet as t, SheetContent as n, SheetDescription as r, SheetFooter as i, SheetHeader as a, SheetTitle as o, Typography as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ErrorState as c } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
3
- import "../../../shared/ui/dist/index.js";
4
- import { RECEIVABLE_DETAILS_SHEET_LABELS_EN as l } from "./index4.js";
5
- import { ReceivableStatusBadge as u } from "./index13.js";
6
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
7
- import { DownloadIcon as m } from "lucide-react";
1
+ import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { forwardRef as t } from "react";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { XIcon as r } from "lucide-react";
8
5
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js
9
- function h({ title: e, children: t }) {
10
- return /* @__PURE__ */ p("section", {
11
- className: "ttw:flex ttw:flex-col ttw:gap-3",
12
- children: [/* @__PURE__ */ f(s, {
13
- variant: "body2",
14
- className: "ttw:font-semibold",
15
- children: e
16
- }), t]
6
+ var i = t(function({ label: t, onClose: i, variant: a = "ghost", size: o = "icon", onClick: s, ...c }, l) {
7
+ return /* @__PURE__ */ n(e, {
8
+ ref: l,
9
+ variant: a,
10
+ size: o,
11
+ ...c,
12
+ "aria-label": t,
13
+ onClick: (e) => {
14
+ s?.(e), i();
15
+ },
16
+ children: /* @__PURE__ */ n(r, { className: "ttw:size-4" })
17
17
  });
18
- }
19
- function g({ open: s, onOpenChange: g, details: _, isLoading: v, isError: y, onActionClick: b, onClose: x, labels: S }) {
20
- let C = {
21
- ...l,
22
- ...S,
23
- statusBadge: {
24
- ...l.statusBadge,
25
- ...S?.statusBadge
26
- }
27
- };
28
- return /* @__PURE__ */ f(t, {
29
- open: s,
30
- onOpenChange: g,
31
- children: /* @__PURE__ */ p(n, {
32
- className: "ttw:w-180 ttw:overflow-y-auto ttw:sm:max-w-180",
33
- children: [
34
- /* @__PURE__ */ p(a, { children: [/* @__PURE__ */ f(o, { children: v ? C.loadingTitle : _?.title }), /* @__PURE__ */ f(r, {
35
- className: "ttw:sr-only",
36
- children: C.hiddenDescription
37
- })] }),
38
- /* @__PURE__ */ f("div", {
39
- className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:px-6 ttw:pb-6",
40
- children: y ? /* @__PURE__ */ f(c, {
41
- title: C.errorTitle,
42
- description: C.errorDescription
43
- }) : _ ? /* @__PURE__ */ p(d, { children: [
44
- /* @__PURE__ */ p("div", {
45
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
46
- children: [/* @__PURE__ */ p("div", {
47
- className: "ttw:flex ttw:flex-col ttw:gap-1",
48
- children: [/* @__PURE__ */ f("span", {
49
- className: "ttw:text-sm ttw:text-muted-foreground",
50
- children: _.customerLabel
51
- }), /* @__PURE__ */ p("div", {
52
- className: "ttw:flex ttw:items-center ttw:gap-2",
53
- children: [/* @__PURE__ */ f(u, {
54
- status: _.status,
55
- tone: _.statusTone,
56
- labels: C.statusBadge
57
- }), /* @__PURE__ */ f("span", {
58
- className: "ttw:text-sm ttw:font-medium",
59
- children: _.totalLabel
60
- })]
61
- })]
62
- }), _.pdfUrl && /* @__PURE__ */ f(e, {
63
- asChild: !0,
64
- variant: "outline",
65
- children: /* @__PURE__ */ p("a", {
66
- href: _.pdfUrl,
67
- target: "_blank",
68
- rel: "noreferrer",
69
- children: [/* @__PURE__ */ f(m, { className: "ttw:size-4" }), C.downloadPdfButton]
70
- })
71
- })]
72
- }),
73
- /* @__PURE__ */ f(h, {
74
- title: C.summaryHeading,
75
- children: /* @__PURE__ */ f("dl", {
76
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6 ttw:gap-y-3",
77
- children: _.summaryItems.map((e) => /* @__PURE__ */ p("div", {
78
- className: "ttw:flex ttw:flex-col",
79
- children: [/* @__PURE__ */ f("dt", {
80
- className: "ttw:text-xs ttw:text-muted-foreground",
81
- children: e.label
82
- }), /* @__PURE__ */ f("dd", {
83
- className: "ttw:text-sm ttw:font-medium",
84
- children: e.value
85
- })]
86
- }, e.label))
87
- })
88
- }),
89
- /* @__PURE__ */ f(h, {
90
- title: C.lineItemsHeading,
91
- children: _.lineItems.length === 0 ? /* @__PURE__ */ f("p", {
92
- className: "ttw:text-sm ttw:text-muted-foreground",
93
- children: C.noLineItems
94
- }) : /* @__PURE__ */ f("div", {
95
- className: "ttw:overflow-hidden ttw:rounded-md ttw:border",
96
- children: /* @__PURE__ */ p("table", {
97
- className: "ttw:w-full ttw:text-sm",
98
- children: [/* @__PURE__ */ f("thead", {
99
- className: "ttw:bg-muted/50",
100
- children: /* @__PURE__ */ p("tr", { children: [
101
- /* @__PURE__ */ f("th", {
102
- className: "ttw:p-2 ttw:text-left",
103
- children: C.lineItemsHeading
104
- }),
105
- /* @__PURE__ */ f("th", {
106
- className: "ttw:p-2 ttw:text-right",
107
- children: C.quantityColumn
108
- }),
109
- /* @__PURE__ */ f("th", {
110
- className: "ttw:p-2 ttw:text-right",
111
- children: C.unitPriceColumn
112
- }),
113
- /* @__PURE__ */ f("th", {
114
- className: "ttw:p-2 ttw:text-right",
115
- children: C.totalColumn
116
- })
117
- ] })
118
- }), /* @__PURE__ */ f("tbody", { children: _.lineItems.map((e) => /* @__PURE__ */ p("tr", {
119
- className: "ttw:border-t",
120
- children: [
121
- /* @__PURE__ */ f("td", {
122
- className: "ttw:p-2",
123
- children: e.name
124
- }),
125
- /* @__PURE__ */ f("td", {
126
- className: "ttw:p-2 ttw:text-right",
127
- children: e.quantityLabel
128
- }),
129
- /* @__PURE__ */ f("td", {
130
- className: "ttw:p-2 ttw:text-right",
131
- children: e.unitPriceLabel
132
- }),
133
- /* @__PURE__ */ f("td", {
134
- className: "ttw:p-2 ttw:text-right",
135
- children: e.totalLabel
136
- })
137
- ]
138
- }, e.id)) })]
139
- })
140
- })
141
- }),
142
- /* @__PURE__ */ f(h, {
143
- title: C.activityHeading,
144
- children: _.activityItems.length === 0 ? /* @__PURE__ */ f("p", {
145
- className: "ttw:text-sm ttw:text-muted-foreground",
146
- children: C.noActivity
147
- }) : /* @__PURE__ */ f("div", {
148
- className: "ttw:flex ttw:flex-col ttw:gap-3",
149
- children: _.activityItems.map((e) => /* @__PURE__ */ p("div", {
150
- className: "ttw:flex ttw:flex-col",
151
- children: [
152
- /* @__PURE__ */ f("span", {
153
- className: "ttw:text-sm ttw:font-medium",
154
- children: e.title
155
- }),
156
- /* @__PURE__ */ f("span", {
157
- className: "ttw:text-sm ttw:text-muted-foreground",
158
- children: e.description
159
- }),
160
- /* @__PURE__ */ f("span", {
161
- className: "ttw:text-xs ttw:text-muted-foreground",
162
- children: e.timestampLabel
163
- })
164
- ]
165
- }, e.id))
166
- })
167
- }),
168
- /* @__PURE__ */ f(h, {
169
- title: C.mailsHeading,
170
- children: _.mailItems.length === 0 ? /* @__PURE__ */ f("p", {
171
- className: "ttw:text-sm ttw:text-muted-foreground",
172
- children: C.noMails
173
- }) : /* @__PURE__ */ f("div", {
174
- className: "ttw:flex ttw:flex-col ttw:gap-3",
175
- children: _.mailItems.map((e) => /* @__PURE__ */ p("div", {
176
- className: "ttw:flex ttw:flex-col",
177
- children: [
178
- /* @__PURE__ */ f("span", {
179
- className: "ttw:text-sm ttw:font-medium",
180
- children: e.statusLabel
181
- }),
182
- /* @__PURE__ */ f("span", {
183
- className: "ttw:text-sm ttw:text-muted-foreground",
184
- children: e.recipientsLabel
185
- }),
186
- /* @__PURE__ */ f("span", {
187
- className: "ttw:text-xs ttw:text-muted-foreground",
188
- children: e.sentAtLabel
189
- })
190
- ]
191
- }, e.id))
192
- })
193
- })
194
- ] }) : null
195
- }),
196
- /* @__PURE__ */ f(i, { children: _ && /* @__PURE__ */ p("div", {
197
- className: "ttw:flex ttw:flex-wrap ttw:justify-end ttw:gap-2",
198
- children: [
199
- _.actions.edit && /* @__PURE__ */ f(e, {
200
- variant: "outline",
201
- onClick: () => b("edit", _),
202
- children: C.editButton
203
- }),
204
- _.actions.issue && /* @__PURE__ */ f(e, {
205
- onClick: () => b("issue", _),
206
- children: C.issueButton
207
- }),
208
- _.actions.send && /* @__PURE__ */ f(e, {
209
- variant: "outline",
210
- onClick: () => b("send", _),
211
- children: C.sendButton
212
- }),
213
- _.actions.accept && /* @__PURE__ */ f(e, {
214
- onClick: () => b("accept", _),
215
- children: C.acceptButton
216
- }),
217
- _.actions.decline && /* @__PURE__ */ f(e, {
218
- variant: "outline",
219
- onClick: () => b("decline", _),
220
- children: C.declineButton
221
- }),
222
- _.actions.recordPayment && /* @__PURE__ */ f(e, {
223
- variant: "outline",
224
- onClick: () => b("recordPayment", _),
225
- children: C.recordPaymentButton
226
- }),
227
- _.actions.markPaid && /* @__PURE__ */ f(e, {
228
- variant: "outline",
229
- onClick: () => b("markPaid", _),
230
- children: C.markPaidButton
231
- }),
232
- _.actions.markUncollectible && /* @__PURE__ */ f(e, {
233
- variant: "outline",
234
- onClick: () => b("markUncollectible", _),
235
- children: C.markUncollectibleButton
236
- }),
237
- _.actions.cancel && /* @__PURE__ */ f(e, {
238
- variant: "outline",
239
- onClick: () => b("cancel", _),
240
- children: C.cancelButton
241
- }),
242
- _.actions.clone && /* @__PURE__ */ f(e, {
243
- variant: "outline",
244
- onClick: () => b("clone", _),
245
- children: C.cloneButton
246
- }),
247
- _.actions.delete && /* @__PURE__ */ f(e, {
248
- variant: "destructive",
249
- onClick: () => b("delete", _),
250
- children: C.deleteButton
251
- }),
252
- /* @__PURE__ */ f(e, {
253
- variant: "ghost",
254
- onClick: x,
255
- children: C.closeButton
256
- })
257
- ]
258
- }) })
259
- ]
260
- })
261
- });
262
- }
18
+ });
263
19
  //#endregion
264
- export { g as ReceivableDetailsSheet, g as default };
20
+ export { i as CloseButton };
@@ -1,48 +1,16 @@
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 { jsx as e, jsxs as t } from "react/jsx-runtime";
3
2
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.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 })]
8
- });
9
- }
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
- ]
3
+ function n({ label: n, value: r }) {
4
+ return /* @__PURE__ */ t("div", {
5
+ className: "ttw:flex ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:text-sm ttw:last:border-b-0",
6
+ children: [/* @__PURE__ */ e("span", {
7
+ className: "ttw:w-40 ttw:shrink-0 ttw:text-muted-foreground",
8
+ children: n
9
+ }), /* @__PURE__ */ e("span", {
10
+ className: "ttw:whitespace-pre-line ttw:text-foreground",
11
+ children: r
12
+ })]
45
13
  });
46
14
  }
47
15
  //#endregion
48
- export { i as ReceivableFormTotals };
16
+ export { n as InfoRow };
@@ -1,72 +1,32 @@
1
- import { Field as e, FieldContent as t, FieldDescription as n, FieldError as r, FieldLabel as i, Textarea as a, Typography as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
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 "./index19.js";
3
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
4
+ import { MoreVerticalIcon as d } from "lucide-react";
3
5
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js
4
- function l({ id: l, value: u, error: d, disabled: f, label: p, optionalSuffix: m, placeholder: h, description: g, onChange: _ }) {
5
- return /* @__PURE__ */ s(e, { children: /* @__PURE__ */ c(t, { children: [
6
- /* @__PURE__ */ c(i, {
7
- htmlFor: l,
8
- className: "ttw:text-nowrap",
9
- children: [p, /* @__PURE__ */ s(o, {
10
- variant: "body2",
11
- component: "span",
12
- color: "muted",
13
- className: "ttw:leading-snug",
14
- children: m
15
- })]
16
- }),
17
- /* @__PURE__ */ s(a, {
18
- id: l,
19
- value: u,
20
- disabled: f,
21
- placeholder: h,
22
- className: "ttw:h-26 ttw:resize-none",
23
- "aria-invalid": !!d,
24
- onChange: (e) => _(e.target.value)
25
- }),
26
- /* @__PURE__ */ s(n, { children: g }),
27
- /* @__PURE__ */ s(r, { errors: d ? [{ message: d }] : [] })
28
- ] }) });
29
- }
30
- function u({ idPrefix: e, openingNote: t, closingNote: n, openingNoteError: r, closingNoteError: i, disabled: a, onOpeningNoteChange: u, onClosingNoteChange: d, labels: f }) {
31
- return /* @__PURE__ */ c("div", {
32
- className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
33
- children: [
34
- /* @__PURE__ */ c("div", {
35
- className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
36
- children: [/* @__PURE__ */ s(o, {
37
- variant: "h4",
38
- children: f.notesHeading
39
- }), /* @__PURE__ */ s(o, {
40
- variant: "body2",
41
- color: "muted",
42
- className: "ttw:font-medium",
43
- children: f.notesDescription
44
- })]
45
- }),
46
- /* @__PURE__ */ s(l, {
47
- id: `${e}-opening-note`,
48
- value: t,
49
- error: r,
50
- disabled: a,
51
- label: f.openingNoteLabel,
52
- optionalSuffix: f.optionalSuffix,
53
- placeholder: f.openingNotePlaceholder,
54
- description: f.openingNoteDescription,
55
- onChange: u
56
- }),
57
- /* @__PURE__ */ s(l, {
58
- id: `${e}-closing-note`,
59
- value: n,
60
- error: i,
61
- disabled: a,
62
- label: f.closingNoteLabel,
63
- optionalSuffix: f.optionalSuffix,
64
- placeholder: f.closingNotePlaceholder,
65
- description: f.closingNoteDescription,
66
- onChange: d
6
+ function f({ actions: f, triggerLabel: p, getActionLabel: m, onSelect: h, className: g }) {
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: g,
15
+ "aria-label": p,
16
+ children: /* @__PURE__ */ l(d, { className: "ttw:size-4" })
67
17
  })
68
- ]
69
- });
18
+ })
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
+ onClick: () => h(e),
26
+ children: [/* @__PURE__ */ l(t, { className: "ttw:size-4" }), m(e)]
27
+ }, e);
28
+ })
29
+ })] });
70
30
  }
71
31
  //#endregion
72
- export { u as ReceivableNotesSection };
32
+ export { f as OverflowMenu };