@tesouro/embedded-components-react 0.4.4 → 0.4.6

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 (69) hide show
  1. package/README.md +37 -37
  2. package/dist/index.d.ts +14 -8
  3. package/dist/lib/CreditCardsWidget.d.ts +4 -2
  4. package/dist/lib/DebitCardsWidget.d.ts +4 -2
  5. package/dist/lib/WidgetSuite.d.ts +14 -8
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +8 -8
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +50 -29
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +39 -30
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +26 -311
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +326 -12
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +13 -27
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +28 -245
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +256 -92
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +86 -73
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +77 -14
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +18 -63
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +4 -4
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +2 -2
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +1 -1
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +72 -56
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +77 -48
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +47 -91
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +91 -33
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +33 -167
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +168 -75
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +75 -21
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +23 -210
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +199 -203
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +198 -89
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +105 -13
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +12 -47
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +47 -31
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +27 -198
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +198 -30
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +30 -234
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +240 -18
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +19 -341
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +344 -4
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +4 -33
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +32 -83
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +25 -25
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +1 -1
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -1
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +1 -1
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +1 -1
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +2 -2
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -1
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +2 -0
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +28 -3
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -0
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +152 -131
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +1 -1
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +32 -27
  64. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +84 -87
  65. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +0 -1
  66. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  67. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +2 -2
  68. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +12 -10
  69. package/package.json +1 -1
@@ -9,9 +9,11 @@ var r = {
9
9
  errorTitle: "Couldn't load this bill",
10
10
  errorDescription: "Something went wrong. Try again.",
11
11
  amountDueHeading: "Amount due",
12
+ amountPaidHeading: "Amount paid",
12
13
  invoiceDateLabel: "Invoice date",
13
14
  dueDateLabel: "Due date",
14
15
  payToHeading: "Pay to",
16
+ payToHeadingPaid: "Paid to",
15
17
  vendorRow: "Vendor",
16
18
  paymentInstructionsRow: "Payment instructions",
17
19
  addPaymentInstructions: "Add payment instructions",
@@ -56,7 +56,28 @@ function x({ view: x, actions: S = d, scheduledSummary: C, paymentInstructionsFo
56
56
  /* @__PURE__ */ h("section", {
57
57
  className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted/50 ttw:p-4",
58
58
  children: [
59
- /* @__PURE__ */ h("div", {
59
+ x.paidOnLabel ? /* @__PURE__ */ h("div", {
60
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6",
61
+ children: [/* @__PURE__ */ h("div", {
62
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
63
+ children: [/* @__PURE__ */ m("span", {
64
+ className: "ttw:text-sm ttw:text-muted-foreground",
65
+ children: O.amountDueHeading
66
+ }), /* @__PURE__ */ m("span", {
67
+ className: "ttw:text-3xl ttw:font-semibold",
68
+ children: x.amountDue
69
+ })]
70
+ }), /* @__PURE__ */ h("div", {
71
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
72
+ children: [/* @__PURE__ */ m("span", {
73
+ className: "ttw:text-sm ttw:text-muted-foreground",
74
+ children: O.amountPaidHeading
75
+ }), /* @__PURE__ */ m("span", {
76
+ className: "ttw:text-3xl ttw:font-semibold ttw:text-emerald-600",
77
+ children: x.amountPaid
78
+ })]
79
+ })]
80
+ }) : /* @__PURE__ */ h("div", {
60
81
  className: "ttw:flex ttw:flex-col ttw:gap-1",
61
82
  children: [/* @__PURE__ */ m("span", {
62
83
  className: "ttw:text-sm ttw:text-muted-foreground",
@@ -66,7 +87,11 @@ function x({ view: x, actions: S = d, scheduledSummary: C, paymentInstructionsFo
66
87
  children: x.amountDue
67
88
  })]
68
89
  }),
69
- /* @__PURE__ */ m("div", { children: /* @__PURE__ */ m(s, {
90
+ /* @__PURE__ */ m("div", { children: x.paidOnLabel ? /* @__PURE__ */ m(e, {
91
+ variant: "outline",
92
+ className: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700",
93
+ children: x.paidOnLabel
94
+ }) : /* @__PURE__ */ m(s, {
70
95
  status: x.status,
71
96
  tone: x.statusTone,
72
97
  labels: O.statusBadge
@@ -113,7 +138,7 @@ function x({ view: x, actions: S = d, scheduledSummary: C, paymentInstructionsFo
113
138
  children: [
114
139
  /* @__PURE__ */ m("h3", {
115
140
  className: v,
116
- children: O.payToHeading
141
+ children: x.paidOnLabel ? O.payToHeadingPaid : O.payToHeading
117
142
  }),
118
143
  /* @__PURE__ */ h("div", {
119
144
  className: b,
@@ -16,9 +16,11 @@ var o = {
16
16
  errorTitle: "Couldn't load this bill",
17
17
  errorDescription: "Something went wrong. Try again.",
18
18
  amountDueHeading: "Amount due",
19
+ amountPaidHeading: "Amount paid",
19
20
  invoiceDateLabel: "Invoice date",
20
21
  dueDateLabel: "Due date",
21
22
  payToHeading: "Pay to",
23
+ payToHeadingPaid: "Paid to",
22
24
  invoiceDetailsHeading: "Invoice details",
23
25
  lineItemsHeading: "Line items",
24
26
  lineItemsQuantityHeading: "Qty/Price",
@@ -1,31 +1,31 @@
1
- import { Button as e, Collapsible as t, CollapsibleContent as n, CollapsibleTrigger as r, Sheet as i, SheetContent as a, SheetDescription as o, SheetHeader as s, SheetTitle as c, Skeleton as l, Typography as u } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ApprovalPolicyCard as d } from "./index13.js";
1
+ import { Badge as e, Button as t, Collapsible as n, CollapsibleContent as r, CollapsibleTrigger as i, Sheet as a, SheetContent as o, SheetDescription as s, SheetHeader as c, SheetTitle as l, Skeleton as u, Typography as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ApprovalPolicyCard as f } from "./index13.js";
3
3
  import "./index14.js";
4
- import { BillOverflowMenu as f } from "./index16.js";
4
+ import { BillOverflowMenu as p } from "./index16.js";
5
5
  import "./index17.js";
6
- import { BillStatusBadge as p } from "./index20.js";
6
+ import { BillStatusBadge as m } from "./index20.js";
7
7
  import "./index21.js";
8
- import { DueDateValue as m } from "./index23.js";
8
+ import { DueDateValue as h } from "./index23.js";
9
9
  import "./index24.js";
10
- import { BillActionButtons as h, NO_BILL_ACTIONS as g } from "./index15.js";
11
- import { BILL_DETAILS_SHEET_LABELS_EN as _ } from "./index56.js";
12
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
13
- import { ChevronDownIcon as x, MoveDiagonal2Icon as S, XIcon as C } from "lucide-react";
10
+ import { BillActionButtons as g, NO_BILL_ACTIONS as _ } from "./index15.js";
11
+ import { BILL_DETAILS_SHEET_LABELS_EN as v } from "./index56.js";
12
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
13
+ import { ChevronDownIcon as S, MoveDiagonal2Icon as C, XIcon as w } from "lucide-react";
14
14
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js
15
- function w({ items: e }) {
16
- return /* @__PURE__ */ y("dl", {
15
+ function T({ items: e }) {
16
+ return /* @__PURE__ */ b("dl", {
17
17
  className: "ttw:flex ttw:flex-col",
18
- children: e.map((e) => /* @__PURE__ */ b("div", {
18
+ children: e.map((e) => /* @__PURE__ */ x("div", {
19
19
  className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-6 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0",
20
- children: [/* @__PURE__ */ y("dt", {
20
+ children: [/* @__PURE__ */ b("dt", {
21
21
  className: "ttw:text-sm ttw:text-muted-foreground",
22
22
  children: e.label
23
- }), /* @__PURE__ */ b("dd", {
23
+ }), /* @__PURE__ */ x("dd", {
24
24
  className: "ttw:flex ttw:flex-col ttw:items-end ttw:text-right",
25
- children: [/* @__PURE__ */ y("span", {
25
+ children: [/* @__PURE__ */ b("span", {
26
26
  className: "ttw:text-sm ttw:font-medium",
27
27
  children: e.value
28
- }), e.secondaryValue ? /* @__PURE__ */ y("span", {
28
+ }), e.secondaryValue ? /* @__PURE__ */ b("span", {
29
29
  className: "ttw:text-sm ttw:text-muted-foreground",
30
30
  children: e.secondaryValue
31
31
  }) : null]
@@ -33,229 +33,250 @@ function w({ items: e }) {
33
33
  }, e.label))
34
34
  });
35
35
  }
36
- function T({ heading: e, children: i }) {
37
- return /* @__PURE__ */ b(t, {
36
+ function E({ heading: e, children: t }) {
37
+ return /* @__PURE__ */ x(n, {
38
38
  defaultOpen: !0,
39
39
  className: "ttw:flex ttw:flex-col ttw:gap-3",
40
- children: [/* @__PURE__ */ b(r, {
40
+ children: [/* @__PURE__ */ x(i, {
41
41
  className: "ttw:group ttw:flex ttw:w-full ttw:items-center ttw:justify-between ttw:rounded-xs ttw:focus-visible:ring-2 ttw:focus-visible:ring-ring ttw:focus-visible:outline-hidden",
42
- children: [/* @__PURE__ */ y(u, {
42
+ children: [/* @__PURE__ */ b(d, {
43
43
  variant: "body1",
44
44
  className: "ttw:font-semibold",
45
45
  children: e
46
- }), /* @__PURE__ */ y(x, { className: "ttw:size-4 ttw:text-muted-foreground ttw:transition-transform ttw:group-data-[state=closed]:-rotate-90" })]
47
- }), /* @__PURE__ */ y(n, { children: i })]
46
+ }), /* @__PURE__ */ b(S, { className: "ttw:size-4 ttw:text-muted-foreground ttw:transition-transform ttw:group-data-[state=closed]:-rotate-90" })]
47
+ }), /* @__PURE__ */ b(r, { children: t })]
48
48
  });
49
49
  }
50
- function E({ open: t, onOpenChange: n, details: r, actions: u = g, approvalPolicy: x, isLoading: E, isError: D, notice: O, onClose: k, onExpand: A, testId: j, labels: M }) {
51
- let N = {
52
- ..._,
53
- ...M,
50
+ function D({ open: n, onOpenChange: r, details: i, actions: d = _, approvalPolicy: S, isLoading: D, isError: O, notice: k, onClose: A, onExpand: j, testId: M, labels: N }) {
51
+ let P = {
52
+ ...v,
53
+ ...N,
54
54
  statusBadge: {
55
- ..._.statusBadge,
56
- ...M?.statusBadge
55
+ ...v.statusBadge,
56
+ ...N?.statusBadge
57
57
  },
58
58
  approvalPolicy: {
59
- ..._.approvalPolicy,
60
- ...M?.approvalPolicy
59
+ ...v.approvalPolicy,
60
+ ...N?.approvalPolicy
61
61
  },
62
62
  dueDate: {
63
- ..._.dueDate,
64
- ...M?.dueDate
63
+ ...v.dueDate,
64
+ ...N?.dueDate
65
65
  }
66
66
  };
67
- return /* @__PURE__ */ y(i, {
68
- open: t,
69
- onOpenChange: (e) => e ? n(e) : k(),
70
- children: /* @__PURE__ */ b(a, {
67
+ return /* @__PURE__ */ b(a, {
68
+ open: n,
69
+ onOpenChange: (e) => e ? r(e) : A(),
70
+ children: /* @__PURE__ */ x(o, {
71
71
  showCloseButton: !1,
72
72
  className: "ttw:w-150 ttw:gap-0 ttw:overflow-y-auto ttw:sm:max-w-150",
73
- "data-testid": j,
74
- children: [/* @__PURE__ */ b(s, {
73
+ "data-testid": M,
74
+ children: [/* @__PURE__ */ x(c, {
75
75
  className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-3",
76
- children: [/* @__PURE__ */ b("div", {
76
+ children: [/* @__PURE__ */ x("div", {
77
77
  className: "ttw:flex ttw:flex-col ttw:gap-0.5",
78
78
  children: [
79
- /* @__PURE__ */ y(c, {
80
- className: E ? "ttw:sr-only" : "ttw:text-xl ttw:font-semibold",
81
- children: D ? N.errorTitle : E ? N.loadingTitle : r?.title
79
+ /* @__PURE__ */ b(l, {
80
+ className: D ? "ttw:sr-only" : "ttw:text-xl ttw:font-semibold",
81
+ children: O ? P.errorTitle : D ? P.loadingTitle : i?.title
82
82
  }),
83
- E ? /* @__PURE__ */ b("div", {
83
+ D ? /* @__PURE__ */ x("div", {
84
84
  "aria-hidden": !0,
85
85
  className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:py-1",
86
- children: [/* @__PURE__ */ y(l, { className: "ttw:h-6 ttw:w-48" }), /* @__PURE__ */ y(l, { className: "ttw:h-4 ttw:w-28" })]
86
+ children: [/* @__PURE__ */ b(u, { className: "ttw:h-6 ttw:w-48" }), /* @__PURE__ */ b(u, { className: "ttw:h-4 ttw:w-28" })]
87
87
  }) : null,
88
- r && !E && !D ? /* @__PURE__ */ y("p", {
88
+ i && !D && !O ? /* @__PURE__ */ b("p", {
89
89
  className: "ttw:text-sm ttw:text-muted-foreground",
90
- children: r.subtitle
90
+ children: i.subtitle
91
91
  }) : null,
92
- /* @__PURE__ */ y(o, {
92
+ /* @__PURE__ */ b(s, {
93
93
  className: "ttw:sr-only",
94
- children: N.hiddenDescription
94
+ children: P.hiddenDescription
95
95
  })
96
96
  ]
97
- }), /* @__PURE__ */ b("div", {
97
+ }), /* @__PURE__ */ x("div", {
98
98
  className: "ttw:flex ttw:items-center ttw:gap-1",
99
99
  children: [
100
- A ? /* @__PURE__ */ y(e, {
100
+ j ? /* @__PURE__ */ b(t, {
101
101
  type: "button",
102
102
  variant: "ghost",
103
103
  size: "icon",
104
- "aria-label": N.expandButton,
105
- onClick: A,
106
- children: /* @__PURE__ */ y(S, { className: "ttw:size-4" })
104
+ "aria-label": P.expandButton,
105
+ onClick: j,
106
+ children: /* @__PURE__ */ b(C, { className: "ttw:size-4" })
107
107
  }) : null,
108
- r && !E && !D ? /* @__PURE__ */ y(f, {
109
- actions: u.menu,
110
- triggerLabel: N.overflowMenuTrigger,
108
+ i && !D && !O ? /* @__PURE__ */ b(p, {
109
+ actions: d.menu,
110
+ triggerLabel: P.overflowMenuTrigger,
111
111
  placement: "header"
112
112
  }) : null,
113
- /* @__PURE__ */ y(e, {
113
+ /* @__PURE__ */ b(t, {
114
114
  type: "button",
115
115
  variant: "ghost",
116
116
  size: "icon",
117
- "aria-label": N.closeButton,
118
- onClick: k,
119
- children: /* @__PURE__ */ y(C, { className: "ttw:size-4" })
117
+ "aria-label": P.closeButton,
118
+ onClick: A,
119
+ children: /* @__PURE__ */ b(w, { className: "ttw:size-4" })
120
120
  })
121
121
  ]
122
122
  })]
123
- }), /* @__PURE__ */ y("div", {
123
+ }), /* @__PURE__ */ b("div", {
124
124
  className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:px-6 ttw:pb-6",
125
- children: D ? /* @__PURE__ */ y("p", {
125
+ children: O ? /* @__PURE__ */ b("p", {
126
126
  className: "ttw:text-sm ttw:text-muted-foreground",
127
- children: N.errorDescription
128
- }) : E ? /* @__PURE__ */ b("div", {
127
+ children: P.errorDescription
128
+ }) : D ? /* @__PURE__ */ x("div", {
129
129
  className: "ttw:flex ttw:flex-col ttw:gap-6",
130
- children: [/* @__PURE__ */ y(l, { className: "ttw:h-32 ttw:w-full" }), /* @__PURE__ */ b("div", {
130
+ children: [/* @__PURE__ */ b(u, { className: "ttw:h-32 ttw:w-full" }), /* @__PURE__ */ x("div", {
131
131
  className: "ttw:flex ttw:flex-col ttw:gap-2",
132
132
  children: [
133
- /* @__PURE__ */ y(l, { className: "ttw:h-4 ttw:w-40" }),
134
- /* @__PURE__ */ y(l, { className: "ttw:h-9 ttw:w-full" }),
135
- /* @__PURE__ */ y(l, { className: "ttw:h-9 ttw:w-full" })
133
+ /* @__PURE__ */ b(u, { className: "ttw:h-4 ttw:w-40" }),
134
+ /* @__PURE__ */ b(u, { className: "ttw:h-9 ttw:w-full" }),
135
+ /* @__PURE__ */ b(u, { className: "ttw:h-9 ttw:w-full" })
136
136
  ]
137
137
  })]
138
- }) : r ? /* @__PURE__ */ b(v, { children: [
139
- O,
140
- /* @__PURE__ */ b("section", {
138
+ }) : i ? /* @__PURE__ */ x(y, { children: [
139
+ k,
140
+ /* @__PURE__ */ x("section", {
141
141
  className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted/50 ttw:p-4",
142
142
  children: [
143
- /* @__PURE__ */ b("div", {
143
+ /* @__PURE__ */ x("div", {
144
144
  className: "ttw:flex ttw:flex-col ttw:gap-2",
145
- children: [
146
- /* @__PURE__ */ y("span", {
147
- className: "ttw:text-sm ttw:text-muted-foreground",
148
- children: N.amountDueHeading
149
- }),
150
- /* @__PURE__ */ y("span", {
151
- className: "ttw:text-3xl ttw:font-semibold",
152
- children: r.amountDueLabel
153
- }),
154
- /* @__PURE__ */ y("div", { children: /* @__PURE__ */ y(p, {
155
- status: r.status,
156
- tone: r.statusTone,
157
- labels: N.statusBadge
158
- }) })
159
- ]
145
+ children: [i.paidOnLabel ? /* @__PURE__ */ x("div", {
146
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6",
147
+ children: [/* @__PURE__ */ x("div", {
148
+ className: "ttw:flex ttw:flex-col",
149
+ children: [/* @__PURE__ */ b("span", {
150
+ className: "ttw:text-sm ttw:text-muted-foreground",
151
+ children: P.amountDueHeading
152
+ }), /* @__PURE__ */ b("span", {
153
+ className: "ttw:text-3xl ttw:font-semibold",
154
+ children: i.amountDueLabel
155
+ })]
156
+ }), /* @__PURE__ */ x("div", {
157
+ className: "ttw:flex ttw:flex-col",
158
+ children: [/* @__PURE__ */ b("span", {
159
+ className: "ttw:text-sm ttw:text-muted-foreground",
160
+ children: P.amountPaidHeading
161
+ }), /* @__PURE__ */ b("span", {
162
+ className: "ttw:text-3xl ttw:font-semibold ttw:text-emerald-600",
163
+ children: i.amountPaidLabel
164
+ })]
165
+ })]
166
+ }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
167
+ className: "ttw:text-sm ttw:text-muted-foreground",
168
+ children: P.amountDueHeading
169
+ }), /* @__PURE__ */ b("span", {
170
+ className: "ttw:text-3xl ttw:font-semibold",
171
+ children: i.amountDueLabel
172
+ })] }), /* @__PURE__ */ b("div", { children: i.paidOnLabel ? /* @__PURE__ */ b(e, {
173
+ variant: "outline",
174
+ className: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700",
175
+ children: i.paidOnLabel
176
+ }) : /* @__PURE__ */ b(m, {
177
+ status: i.status,
178
+ tone: i.statusTone,
179
+ labels: P.statusBadge
180
+ }) })]
160
181
  }),
161
- /* @__PURE__ */ b("div", {
182
+ /* @__PURE__ */ x("div", {
162
183
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6 ttw:gap-y-1",
163
- children: [/* @__PURE__ */ b("div", {
184
+ children: [/* @__PURE__ */ x("div", {
164
185
  className: "ttw:flex ttw:flex-col",
165
- children: [/* @__PURE__ */ y("span", {
186
+ children: [/* @__PURE__ */ b("span", {
166
187
  className: "ttw:text-xs ttw:text-muted-foreground",
167
- children: N.invoiceDateLabel
168
- }), /* @__PURE__ */ y("span", {
188
+ children: P.invoiceDateLabel
189
+ }), /* @__PURE__ */ b("span", {
169
190
  className: "ttw:text-sm ttw:font-medium",
170
- children: r.invoiceDateLabel
191
+ children: i.invoiceDateLabel
171
192
  })]
172
- }), /* @__PURE__ */ b("div", {
193
+ }), /* @__PURE__ */ x("div", {
173
194
  className: "ttw:flex ttw:flex-col",
174
- children: [/* @__PURE__ */ y("span", {
195
+ children: [/* @__PURE__ */ b("span", {
175
196
  className: "ttw:text-xs ttw:text-muted-foreground",
176
- children: N.dueDateLabel
177
- }), /* @__PURE__ */ y(m, {
197
+ children: P.dueDateLabel
198
+ }), /* @__PURE__ */ b(h, {
178
199
  className: "ttw:text-sm ttw:font-medium",
179
- value: r.dueDateLabel,
180
- tone: r.dueDateTone,
181
- labels: N.dueDate
200
+ value: i.dueDateLabel,
201
+ tone: i.dueDateTone,
202
+ labels: P.dueDate
182
203
  })]
183
204
  })]
184
205
  }),
185
- u.row.length ? /* @__PURE__ */ y("div", {
206
+ d.row.length ? /* @__PURE__ */ b("div", {
186
207
  className: "ttw:flex ttw:items-center ttw:gap-2",
187
- children: /* @__PURE__ */ y(h, { actions: u.row })
208
+ children: /* @__PURE__ */ b(g, { actions: d.row })
188
209
  }) : null
189
210
  ]
190
211
  }),
191
- /* @__PURE__ */ y(T, {
192
- heading: N.payToHeading,
193
- children: /* @__PURE__ */ y(w, { items: r.payToItems })
212
+ /* @__PURE__ */ b(E, {
213
+ heading: i.paidOnLabel ? P.payToHeadingPaid : P.payToHeading,
214
+ children: /* @__PURE__ */ b(T, { items: i.payToItems })
194
215
  }),
195
- /* @__PURE__ */ y(T, {
196
- heading: N.invoiceDetailsHeading,
197
- children: /* @__PURE__ */ b("div", {
216
+ /* @__PURE__ */ b(E, {
217
+ heading: P.invoiceDetailsHeading,
218
+ children: /* @__PURE__ */ x("div", {
198
219
  className: "ttw:flex ttw:flex-col ttw:gap-4",
199
220
  children: [
200
- /* @__PURE__ */ y(w, { items: r.invoiceItems }),
201
- r.lineItems.length ? /* @__PURE__ */ b("table", {
221
+ /* @__PURE__ */ b(T, { items: i.invoiceItems }),
222
+ i.lineItems.length ? /* @__PURE__ */ x("table", {
202
223
  className: "ttw:w-full ttw:text-sm",
203
- children: [/* @__PURE__ */ y("thead", { children: /* @__PURE__ */ b("tr", {
224
+ children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
204
225
  className: "ttw:bg-muted/50 ttw:text-xs ttw:text-muted-foreground",
205
226
  children: [
206
- /* @__PURE__ */ y("th", {
227
+ /* @__PURE__ */ b("th", {
207
228
  className: "ttw:px-3 ttw:py-2 ttw:text-left ttw:font-normal",
208
- children: N.lineItemsHeading
229
+ children: P.lineItemsHeading
209
230
  }),
210
- /* @__PURE__ */ y("th", {
231
+ /* @__PURE__ */ b("th", {
211
232
  className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
212
- children: N.lineItemsQuantityHeading
233
+ children: P.lineItemsQuantityHeading
213
234
  }),
214
- /* @__PURE__ */ y("th", {
235
+ /* @__PURE__ */ b("th", {
215
236
  className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
216
- children: N.lineItemsAmountHeading
237
+ children: P.lineItemsAmountHeading
217
238
  })
218
239
  ]
219
- }) }), /* @__PURE__ */ y("tbody", { children: r.lineItems.map((e) => /* @__PURE__ */ b("tr", {
240
+ }) }), /* @__PURE__ */ b("tbody", { children: i.lineItems.map((e) => /* @__PURE__ */ x("tr", {
220
241
  className: "ttw:border-b ttw:border-border",
221
242
  children: [
222
- /* @__PURE__ */ b("td", {
243
+ /* @__PURE__ */ x("td", {
223
244
  className: "ttw:px-3 ttw:py-2",
224
- children: [/* @__PURE__ */ y("span", {
245
+ children: [/* @__PURE__ */ b("span", {
225
246
  className: "ttw:block",
226
247
  children: e.description
227
- }), /* @__PURE__ */ y("span", {
248
+ }), /* @__PURE__ */ b("span", {
228
249
  className: "ttw:block ttw:text-xs ttw:text-muted-foreground",
229
250
  children: e.glCodeLabel
230
251
  })]
231
252
  }),
232
- /* @__PURE__ */ y("td", {
253
+ /* @__PURE__ */ b("td", {
233
254
  className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap ttw:text-muted-foreground",
234
255
  children: e.quantityLabel
235
256
  }),
236
- /* @__PURE__ */ y("td", {
257
+ /* @__PURE__ */ b("td", {
237
258
  className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap",
238
259
  children: e.amountLabel
239
260
  })
240
261
  ]
241
262
  }, e.id)) })]
242
263
  }) : null,
243
- /* @__PURE__ */ y("dl", {
264
+ /* @__PURE__ */ b("dl", {
244
265
  className: "ttw:flex ttw:flex-col ttw:gap-1",
245
- children: r.totals.map((e) => /* @__PURE__ */ b("div", {
266
+ children: i.totals.map((e) => /* @__PURE__ */ x("div", {
246
267
  className: e.emphasis ? "ttw:flex ttw:justify-between ttw:gap-6 ttw:border-t ttw:border-border ttw:pt-2 ttw:text-base ttw:font-semibold" : "ttw:flex ttw:justify-between ttw:gap-6 ttw:text-sm",
247
- children: [/* @__PURE__ */ y("dt", {
268
+ children: [/* @__PURE__ */ b("dt", {
248
269
  className: e.emphasis ? "" : "ttw:text-muted-foreground",
249
270
  children: e.label
250
- }), /* @__PURE__ */ y("dd", { children: e.value })]
271
+ }), /* @__PURE__ */ b("dd", { children: e.value })]
251
272
  }, e.label))
252
273
  })
253
274
  ]
254
275
  })
255
276
  }),
256
- x ? /* @__PURE__ */ y(d, {
257
- view: x,
258
- labels: N.approvalPolicy
277
+ S ? /* @__PURE__ */ b(f, {
278
+ view: S,
279
+ labels: P.approvalPolicy
259
280
  }) : null
260
281
  ] }) : null
261
282
  })]
@@ -263,4 +284,4 @@ function E({ open: t, onOpenChange: n, details: r, actions: u = g, approvalPolic
263
284
  });
264
285
  }
265
286
  //#endregion
266
- export { E as BillDetailsSheet, E as default };
287
+ export { D as BillDetailsSheet, D as default };
@@ -4,7 +4,7 @@ var e = {
4
4
  description: "This bill has changes that have not been saved. Save it as a draft to finish later, or discard the changes.",
5
5
  saveDraftButton: "Save as draft",
6
6
  discardButton: "Discard changes",
7
- cancelButton: "Keep editing"
7
+ closeButton: "Close"
8
8
  };
9
9
  //#endregion
10
10
  export { e as UNSAVED_BILL_DIALOG_LABELS_EN };
@@ -1,47 +1,52 @@
1
1
  import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
2
  import { UNSAVED_BILL_DIALOG_LABELS_EN as s } from "./index97.js";
3
3
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ import { XIcon as u } from "lucide-react";
4
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js
5
- function u({ open: u, onSaveDraft: d, onDiscard: f, onCancel: p, isSaving: m, isSaveDraftDisabled: h, labels: g, testId: _, saveDraftTestId: v, discardTestId: y }) {
6
- let b = {
6
+ function d({ open: d, onSaveDraft: f, onDiscard: p, onCancel: m, isSaving: h, isSaveDraftDisabled: g, labels: _, testId: v, saveDraftTestId: y, discardTestId: b, closeTestId: x }) {
7
+ let S = {
7
8
  ...s,
8
- ...g
9
+ ..._
9
10
  };
10
11
  return /* @__PURE__ */ c(e, {
11
- open: u,
12
+ open: d,
12
13
  onOpenChange: (e) => {
13
- !e && !m && p();
14
+ !e && !h && m();
14
15
  },
15
16
  children: /* @__PURE__ */ l(t, {
16
- "data-testid": _,
17
- children: [/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: b.title }), /* @__PURE__ */ c(n, { children: b.description })] }), /* @__PURE__ */ l(r, { children: [
18
- /* @__PURE__ */ c(o, {
17
+ "data-testid": v,
18
+ children: [
19
+ /* @__PURE__ */ l("button", {
19
20
  type: "button",
20
- variant: "outline",
21
- onClick: p,
22
- disabled: m,
23
- children: b.cancelButton
21
+ onClick: m,
22
+ disabled: h,
23
+ "data-testid": x,
24
+ className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none",
25
+ children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), /* @__PURE__ */ c("span", {
26
+ className: "ttw:sr-only",
27
+ children: S.closeButton
28
+ })]
24
29
  }),
25
- /* @__PURE__ */ c(o, {
30
+ /* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: S.title }), /* @__PURE__ */ c(n, { children: S.description })] }),
31
+ /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
26
32
  type: "button",
27
33
  variant: "outline",
28
- onClick: f,
29
- disabled: m,
30
- "data-testid": y,
31
- children: b.discardButton
32
- }),
33
- /* @__PURE__ */ c(o, {
34
+ onClick: p,
35
+ disabled: h,
36
+ "data-testid": b,
37
+ children: S.discardButton
38
+ }), /* @__PURE__ */ c(o, {
34
39
  type: "button",
35
40
  variant: "default",
36
- loading: m,
37
- disabled: m || h,
38
- onClick: d,
39
- "data-testid": v,
40
- children: b.saveDraftButton
41
- })
42
- ] })]
41
+ loading: h,
42
+ disabled: h || g,
43
+ onClick: f,
44
+ "data-testid": y,
45
+ children: S.saveDraftButton
46
+ })] })
47
+ ]
43
48
  })
44
49
  });
45
50
  }
46
51
  //#endregion
47
- export { u as UnsavedBillDialog, u as default };
52
+ export { d as UnsavedBillDialog, d as default };