@tesouro/embedded-components-react 0.3.19 → 0.3.20

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 (58) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +4 -4
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +14 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +4 -1
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +3 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +28 -97
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +81 -176
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +50 -4
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +250 -5
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +106 -107
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +209 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +3 -24
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -0
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +114 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +1 -0
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +25 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +21 -17
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -0
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +36 -11
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +10 -283
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +199 -8
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +3 -8
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +14 -91
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +314 -0
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +10 -2
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +4 -14
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +85 -105
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -7
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +16 -28
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +113 -2
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +2 -7
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +5 -32
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +30 -2
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +2 -12
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +5 -104
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +34 -2
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +2 -18
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +9 -7
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +81 -145
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +1 -1
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +15 -11
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +8 -87
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +170 -2
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -0
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +14 -0
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +89 -0
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -0
  54. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  55. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -1
  56. package/dist/packages/shared-ui-shadcn/dist/index.js +16 -11
  57. package/package.json +1 -1
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +0 -2
@@ -1,2 +1,113 @@
1
- import "./index69.js";
2
- import "./index70.js";
1
+ import { Button as e, Checkbox as t, Dialog as n, DialogContent as r, DialogDescription as i, DialogFooter as a, DialogHeader as o, DialogTitle as s, Table as c, TableBody as l, TableCell as u, TableHead as d, TableHeader as f, TableRow as p } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BillDuplicateBadge as m } from "./index54.js";
3
+ import "./index55.js";
4
+ import { DUPLICATE_BILLS_DIALOG_LABELS_EN as h } from "./index70.js";
5
+ import { useMemo as g } from "react";
6
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
7
+ import { Ban as y, ChevronRightIcon as b, CopyX as x } from "lucide-react";
8
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js
9
+ function S({ open: S, onOpenChange: C, rows: w, selectAllChecked: T = !1, onToggleAllRows: E, onKeepSelected: D, onCancelDuplicates: O, isActionDisabled: k, labels: A }) {
10
+ let j = g(() => ({
11
+ ...h,
12
+ ...A
13
+ }), [A]);
14
+ return /* @__PURE__ */ _(n, {
15
+ open: S,
16
+ onOpenChange: C,
17
+ children: /* @__PURE__ */ v(r, {
18
+ className: "ttw:flex ttw:flex-col ttw:gap-8 ttw:sm:max-w-208.75",
19
+ showCloseButton: !0,
20
+ children: [
21
+ /* @__PURE__ */ v(o, {
22
+ className: "ttw:items-center ttw:gap-3 ttw:text-center ttw:sm:text-center",
23
+ children: [
24
+ /* @__PURE__ */ _("div", {
25
+ className: "ttw:flex ttw:items-center ttw:justify-center ttw:border ttw:rounded-full ttw:size-11 ttw:border-orange-300 ttw:bg-orange-200",
26
+ children: /* @__PURE__ */ _(x, {
27
+ className: "ttw:size-4 ttw:text-orange-950",
28
+ "aria-hidden": !0
29
+ })
30
+ }),
31
+ /* @__PURE__ */ _(s, { children: j.title }),
32
+ /* @__PURE__ */ v(i, { children: [/* @__PURE__ */ _("span", {
33
+ className: "ttw:block",
34
+ children: j.descriptionFirstLine
35
+ }), /* @__PURE__ */ _("span", {
36
+ className: "ttw:block",
37
+ children: j.descriptionSecondLine
38
+ })] })
39
+ ]
40
+ }),
41
+ /* @__PURE__ */ _("div", {
42
+ className: "ttw:max-h-80 ttw:overflow-y-auto",
43
+ children: /* @__PURE__ */ v(c, { children: [/* @__PURE__ */ _(f, {
44
+ className: "ttw:sticky ttw:top-0 ttw:bg-background",
45
+ children: /* @__PURE__ */ v(p, { children: [
46
+ /* @__PURE__ */ _(d, {
47
+ className: "ttw:w-10",
48
+ children: /* @__PURE__ */ _(t, {
49
+ "aria-label": j.selectAllRows,
50
+ checked: T,
51
+ onCheckedChange: E
52
+ })
53
+ }),
54
+ /* @__PURE__ */ _(d, { children: j.columnDuplicate }),
55
+ /* @__PURE__ */ _(d, { children: j.columnVendor }),
56
+ /* @__PURE__ */ _(d, { children: j.columnInvoiceNumber }),
57
+ /* @__PURE__ */ _(d, { children: j.columnAmount }),
58
+ /* @__PURE__ */ _(d, { children: j.columnInvoiceDate }),
59
+ /* @__PURE__ */ _(d, { children: j.columnAddedOn }),
60
+ /* @__PURE__ */ _(d, {
61
+ className: "ttw:w-10",
62
+ children: /* @__PURE__ */ _("span", {
63
+ className: "ttw:sr-only",
64
+ children: j.columnActions
65
+ })
66
+ })
67
+ ] })
68
+ }), /* @__PURE__ */ _(l, { children: w.map((n) => /* @__PURE__ */ v(p, { children: [
69
+ /* @__PURE__ */ _(u, { children: /* @__PURE__ */ _(t, {
70
+ "aria-label": n.selectLabel,
71
+ checked: n.isSelected ?? !1,
72
+ onCheckedChange: n.onToggleSelected
73
+ }) }),
74
+ /* @__PURE__ */ _(u, { children: /* @__PURE__ */ _(m, { ...n.duplicateBadge }) }),
75
+ /* @__PURE__ */ _(u, { children: n.vendorLabel }),
76
+ /* @__PURE__ */ _(u, { children: n.invoiceNumberLabel }),
77
+ /* @__PURE__ */ _(u, { children: n.amountLabel }),
78
+ /* @__PURE__ */ _(u, { children: n.invoiceDateLabel }),
79
+ /* @__PURE__ */ _(u, { children: n.addedOnLabel }),
80
+ /* @__PURE__ */ _(u, { children: /* @__PURE__ */ _("div", {
81
+ className: "ttw:flex ttw:justify-end",
82
+ children: /* @__PURE__ */ _(e, {
83
+ variant: "ghost",
84
+ size: "icon",
85
+ "aria-label": n.openLabel,
86
+ onClick: n.onOpen,
87
+ children: /* @__PURE__ */ _(b, { className: "ttw:size-4" })
88
+ })
89
+ }) })
90
+ ] }, n.id)) })] })
91
+ }),
92
+ D || O ? /* @__PURE__ */ v(a, {
93
+ className: "ttw:flex-row",
94
+ children: [D ? /* @__PURE__ */ _(e, {
95
+ variant: "outline",
96
+ className: "ttw:flex-1",
97
+ disabled: k,
98
+ onClick: D,
99
+ children: j.keepSelectedButton
100
+ }) : null, O ? /* @__PURE__ */ v(e, {
101
+ variant: "destructive",
102
+ className: "ttw:flex-1",
103
+ disabled: k,
104
+ onClick: O,
105
+ children: [/* @__PURE__ */ _(y, {}), j.cancelDuplicatesButton]
106
+ }) : null]
107
+ }) : null
108
+ ]
109
+ })
110
+ });
111
+ }
112
+ //#endregion
113
+ export { S as DuplicateBillsDialog, S as default };
@@ -1,7 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js
2
- var e = {
3
- revealValue: "Show value",
4
- hideValue: "Hide value"
5
- };
6
- //#endregion
7
- export { e as REVEALABLE_FIELD_LABELS_EN };
1
+ import "./index70.js";
2
+ import "./index71.js";
@@ -1,34 +1,7 @@
1
- import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { REVEALABLE_FIELD_LABELS_EN as t } from "./index72.js";
3
- import { useState as n } from "react";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { Eye as a, EyeOff as o } from "lucide-react";
6
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js
7
- function s({ field: s, labels: c }) {
8
- let l = {
9
- ...t,
10
- ...c
11
- }, [u, d] = n(!1), f = s.maskedValue && !u ? s.maskedValue : s.value;
12
- return /* @__PURE__ */ i("div", {
13
- className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-3",
14
- children: [/* @__PURE__ */ i("div", {
15
- className: "ttw:min-w-0",
16
- children: [/* @__PURE__ */ r("dt", {
17
- className: "ttw:text-xs ttw:text-muted-foreground",
18
- children: s.label
19
- }), /* @__PURE__ */ r("dd", {
20
- className: "ttw:break-words ttw:text-sm ttw:font-medium",
21
- children: f
22
- })]
23
- }), s.maskedValue ? /* @__PURE__ */ r(e, {
24
- type: "button",
25
- variant: "ghost",
26
- size: "icon",
27
- "aria-label": u ? l.hideValue : l.revealValue,
28
- onClick: () => d((e) => !e),
29
- children: r(u ? o : a, { className: "ttw:size-4" })
30
- }) : null]
31
- });
32
- }
2
+ var e = {
3
+ message: "Data extracted automatically — please review all details to make sure they match",
4
+ dismiss: "Dismiss this notice"
5
+ };
33
6
  //#endregion
34
- export { s as RevealableField, s as default };
7
+ export { e as EXTRACTION_NOTICE_LABELS_EN };
@@ -1,2 +1,30 @@
1
- import "./index72.js";
2
- import "./index73.js";
1
+ import { EXTRACTION_NOTICE_LABELS_EN as e } from "./index73.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { Info as r, X as i } from "lucide-react";
4
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js
5
+ function a({ onDismiss: a, testId: o, labels: s }) {
6
+ let c = {
7
+ ...e,
8
+ ...s
9
+ };
10
+ return /* @__PURE__ */ n("div", {
11
+ className: "ttw:flex ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:border-primary/30 ttw:bg-primary/5 ttw:px-3 ttw:py-2.5",
12
+ "data-testid": o,
13
+ children: [
14
+ /* @__PURE__ */ t(r, { className: "ttw:mt-0.5 ttw:size-4 ttw:shrink-0 ttw:text-primary" }),
15
+ /* @__PURE__ */ t("p", {
16
+ className: "ttw:flex-1 ttw:text-sm ttw:text-foreground",
17
+ children: c.message
18
+ }),
19
+ /* @__PURE__ */ t("button", {
20
+ type: "button",
21
+ onClick: a,
22
+ "aria-label": c.dismiss,
23
+ className: "ttw:shrink-0 ttw:text-muted-foreground ttw:hover:text-foreground",
24
+ children: /* @__PURE__ */ t(i, { className: "ttw:size-4" })
25
+ })
26
+ ]
27
+ });
28
+ }
29
+ //#endregion
30
+ export { a as ExtractionNotice, a as default };
@@ -1,12 +1,2 @@
1
- import { REVEALABLE_FIELD_LABELS_EN as e } from "./index72.js";
2
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js
3
- var t = {
4
- title: "Review transaction",
5
- hiddenDescription: "Review the payment before submitting it.",
6
- payToHeading: "Pay to",
7
- backButton: "Back",
8
- submitButton: "Submit",
9
- ...e
10
- };
11
- //#endregion
12
- export { t as REVIEW_TRANSACTION_DIALOG_LABELS_EN };
1
+ import "./index73.js";
2
+ import "./index74.js";
@@ -1,106 +1,7 @@
1
- import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o, cn as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RevealableField as c } from "./index73.js";
3
- import "./index74.js";
4
- import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as l } from "./index75.js";
5
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
6
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js
7
- function f({ open: f, onOpenChange: p, amountLabel: m, amount: h, rows: g, payTo: _, isSubmitting: v, onBack: y, onCancel: b, onSubmit: x, testId: S, labels: C }) {
8
- let w = {
9
- ...l,
10
- ...C
11
- };
12
- return /* @__PURE__ */ u(t, {
13
- open: f,
14
- onOpenChange: (e) => e ? p(e) : b(),
15
- children: /* @__PURE__ */ d(n, {
16
- "data-testid": S,
17
- className: "ttw:flex ttw:max-w-lg ttw:flex-col ttw:gap-6",
18
- children: [
19
- /* @__PURE__ */ d(a, {
20
- className: "ttw:border-b ttw:border-border ttw:pb-7",
21
- children: [/* @__PURE__ */ u(o, {
22
- className: "ttw:text-3xl ttw:tracking-tight",
23
- children: w.title
24
- }), /* @__PURE__ */ u(r, {
25
- className: "ttw:sr-only",
26
- children: w.hiddenDescription
27
- })]
28
- }),
29
- /* @__PURE__ */ d("div", {
30
- className: "ttw:flex ttw:flex-col ttw:gap-6",
31
- children: [
32
- /* @__PURE__ */ d("div", {
33
- className: "ttw:flex ttw:flex-col ttw:gap-1",
34
- children: [/* @__PURE__ */ u("p", {
35
- className: "ttw:text-sm ttw:text-muted-foreground",
36
- children: m
37
- }), /* @__PURE__ */ u("p", {
38
- className: "ttw:text-4xl ttw:font-semibold",
39
- children: h
40
- })]
41
- }),
42
- /* @__PURE__ */ u("dl", {
43
- className: "ttw:flex ttw:flex-col",
44
- children: g.map((e, t) => /* @__PURE__ */ d("div", {
45
- className: s("ttw:flex ttw:items-center ttw:gap-4 ttw:py-2.5", t < g.length - 1 && "ttw:border-b ttw:border-border"),
46
- children: [/* @__PURE__ */ u("dt", {
47
- className: "ttw:w-32 ttw:shrink-0 ttw:text-sm ttw:text-muted-foreground",
48
- children: e.label
49
- }), /* @__PURE__ */ u("dd", {
50
- className: "ttw:text-sm ttw:font-medium",
51
- children: e.value
52
- })]
53
- }, e.label))
54
- }),
55
- /* @__PURE__ */ d("section", {
56
- className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted/30 ttw:p-4",
57
- children: [
58
- /* @__PURE__ */ u("p", {
59
- className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
60
- children: w.payToHeading
61
- }),
62
- /* @__PURE__ */ u("p", {
63
- className: "ttw:mt-1 ttw:text-xl ttw:font-semibold",
64
- children: _.name
65
- }),
66
- _.email ? /* @__PURE__ */ u("p", {
67
- className: "ttw:text-sm ttw:text-muted-foreground",
68
- children: _.email
69
- }) : null,
70
- _.methodLabel || _.fields.length > 0 ? /* @__PURE__ */ d("div", {
71
- className: "ttw:mt-4 ttw:border-t ttw:border-border ttw:pt-4",
72
- children: [_.methodLabel ? /* @__PURE__ */ u("p", {
73
- className: "ttw:text-xs ttw:font-semibold ttw:text-muted-foreground",
74
- children: _.methodLabel
75
- }) : null, /* @__PURE__ */ u("dl", {
76
- className: "ttw:mt-3 ttw:grid ttw:gap-3",
77
- children: _.fields.map((e) => /* @__PURE__ */ u(c, {
78
- field: e,
79
- labels: w
80
- }, e.label))
81
- })]
82
- }) : null
83
- ]
84
- })
85
- ]
86
- }),
87
- /* @__PURE__ */ d(i, {
88
- className: "ttw:pt-4 ttw:sm:gap-3",
89
- children: [/* @__PURE__ */ u(e, {
90
- type: "button",
91
- variant: "outline",
92
- onClick: y,
93
- children: w.backButton
94
- }), /* @__PURE__ */ u(e, {
95
- type: "button",
96
- loading: v,
97
- onClick: x,
98
- children: w.submitButton
99
- })]
100
- })
101
- ]
102
- })
103
- });
104
- }
2
+ var e = {
3
+ revealValue: "Show value",
4
+ hideValue: "Hide value"
5
+ };
105
6
  //#endregion
106
- export { f as ReviewTransactionDialog, f as default };
7
+ export { e as REVEALABLE_FIELD_LABELS_EN };
@@ -1,2 +1,34 @@
1
- import "./index75.js";
2
- import "./index76.js";
1
+ import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { REVEALABLE_FIELD_LABELS_EN as t } from "./index76.js";
3
+ import { useState as n } from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { Eye as a, EyeOff as o } from "lucide-react";
6
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js
7
+ function s({ field: s, labels: c }) {
8
+ let l = {
9
+ ...t,
10
+ ...c
11
+ }, [u, d] = n(!1), f = s.maskedValue && !u ? s.maskedValue : s.value;
12
+ return /* @__PURE__ */ i("div", {
13
+ className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-3",
14
+ children: [/* @__PURE__ */ i("div", {
15
+ className: "ttw:min-w-0",
16
+ children: [/* @__PURE__ */ r("dt", {
17
+ className: "ttw:text-xs ttw:text-muted-foreground",
18
+ children: s.label
19
+ }), /* @__PURE__ */ r("dd", {
20
+ className: "ttw:break-words ttw:text-sm ttw:font-medium",
21
+ children: f
22
+ })]
23
+ }), s.maskedValue ? /* @__PURE__ */ r(e, {
24
+ type: "button",
25
+ variant: "ghost",
26
+ size: "icon",
27
+ "aria-label": u ? l.hideValue : l.revealValue,
28
+ onClick: () => d((e) => !e),
29
+ children: r(u ? o : a, { className: "ttw:size-4" })
30
+ }) : null]
31
+ });
32
+ }
33
+ //#endregion
34
+ export { s as RevealableField, s as default };
@@ -1,18 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js
2
- var e = {
3
- title: "Schedule payment",
4
- hiddenDescription: "Choose the account to pay from and the payment date.",
5
- payFrom: "Pay from",
6
- payFromPlaceholder: "Select an account",
7
- paymentDate: "Payment date",
8
- paymentDatePlaceholder: "Choose a date",
9
- today: "Today",
10
- noAccounts: "No accounts available",
11
- loadingAccounts: "Loading accounts",
12
- accountsError: "Couldn't load accounts. Try again.",
13
- poweredByBank: (e) => `Powered by ${e}`,
14
- cancelButton: "Cancel",
15
- reviewButton: "Review payment"
16
- };
17
- //#endregion
18
- export { e as SCHEDULE_PAYMENT_DIALOG_LABELS_EN };
1
+ import "./index76.js";
2
+ import "./index77.js";
@@ -1,10 +1,12 @@
1
+ import { REVEALABLE_FIELD_LABELS_EN as e } from "./index76.js";
1
2
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js
2
- var e = {
3
- neutral: "ttw:text-foreground",
4
- muted: "ttw:text-muted-foreground",
5
- success: "ttw:text-emerald-700",
6
- warning: "ttw:text-amber-700",
7
- error: "ttw:text-destructive"
3
+ var t = {
4
+ title: "Review transaction",
5
+ hiddenDescription: "Review the payment before submitting it.",
6
+ payToHeading: "Pay to",
7
+ backButton: "Back",
8
+ submitButton: "Submit",
9
+ ...e
8
10
  };
9
11
  //#endregion
10
- export { e as TONE_TEXT_CLASS };
12
+ export { t as REVIEW_TRANSACTION_DIALOG_LABELS_EN };
@@ -1,165 +1,101 @@
1
- import { Badge as e, Button as t, Calendar as n, Dialog as r, DialogContent as i, DialogDescription as a, DialogFooter as o, DialogHeader as ee, DialogTitle as s, Label as c, Popover as l, PopoverContent as u, PopoverTrigger as d, Select as f, SelectContent as p, SelectItem as m, SelectTrigger as h, SelectValue as g, cn as _ } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as v } from "./index78.js";
3
- import { TONE_TEXT_CLASS as y } from "./index79.js";
4
- import { useId as b } from "react";
5
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
6
- import { CalendarIcon as C } from "lucide-react";
1
+ import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o, cn as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { RevealableField as c } from "./index77.js";
3
+ import "./index78.js";
4
+ import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as l } from "./index79.js";
5
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
7
6
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js
8
- var w = {
9
- sufficient: y.muted,
10
- warning: y.warning,
11
- error: y.error
12
- };
13
- function T({ open: y, onOpenChange: T, amountDueLabel: E, amountDue: D, dueDateSuffix: O, paymentAmountLabel: k, paymentAmount: A, selectedDate: j, selectedDateLabel: M, calendarDisabled: N, isToday: P, selectedAccountId: F, accounts: I, poweredByBankName: L, funds: R, isAccountsLoading: z, isAccountsError: B, isSubmitting: V, onDateChange: H, onAccountChange: U, onReview: W, onCancel: G, testId: K, labels: q }) {
14
- let J = {
15
- ...v,
16
- ...q
17
- }, Y = b(), X = b(), Z = b(), Q = z || B || I.length === 0, $ = I.find((e) => e.id === F);
18
- return /* @__PURE__ */ x(r, {
19
- open: y,
20
- onOpenChange: (e) => e ? T(e) : G(),
21
- children: /* @__PURE__ */ S(i, {
22
- "data-testid": K,
23
- className: "ttw:flex ttw:max-w-lg ttw:flex-col ttw:gap-3",
7
+ function f({ open: f, onOpenChange: p, amountLabel: m, amount: h, rows: g, payTo: _, isSubmitting: v, onBack: y, onCancel: b, onSubmit: x, testId: S, labels: C }) {
8
+ let w = {
9
+ ...l,
10
+ ...C
11
+ };
12
+ return /* @__PURE__ */ u(t, {
13
+ open: f,
14
+ onOpenChange: (e) => e ? p(e) : b(),
15
+ children: /* @__PURE__ */ d(n, {
16
+ "data-testid": S,
17
+ className: "ttw:flex ttw:max-w-lg ttw:flex-col ttw:gap-6",
24
18
  children: [
25
- /* @__PURE__ */ S(ee, { children: [/* @__PURE__ */ x(s, { children: J.title }), /* @__PURE__ */ x(a, {
26
- className: "ttw:sr-only",
27
- children: J.hiddenDescription
28
- })] }),
29
- /* @__PURE__ */ S("div", {
30
- className: "ttw:flex ttw:flex-col ttw:gap-3",
19
+ /* @__PURE__ */ d(a, {
20
+ className: "ttw:border-b ttw:border-border ttw:pb-7",
21
+ children: [/* @__PURE__ */ u(o, {
22
+ className: "ttw:text-3xl ttw:tracking-tight",
23
+ children: w.title
24
+ }), /* @__PURE__ */ u(r, {
25
+ className: "ttw:sr-only",
26
+ children: w.hiddenDescription
27
+ })]
28
+ }),
29
+ /* @__PURE__ */ d("div", {
30
+ className: "ttw:flex ttw:flex-col ttw:gap-6",
31
31
  children: [
32
- /* @__PURE__ */ S("div", {
33
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
34
- children: [/* @__PURE__ */ x("p", {
35
- className: "ttw:text-base ttw:text-muted-foreground",
36
- children: E
37
- }), /* @__PURE__ */ S("div", {
38
- className: "ttw:flex ttw:flex-wrap ttw:items-end ttw:gap-2",
39
- children: [/* @__PURE__ */ x("p", {
40
- className: "ttw:text-4xl ttw:font-semibold ttw:text-foreground",
41
- children: D
42
- }), O ? /* @__PURE__ */ x("p", {
43
- className: "ttw:pb-1 ttw:text-xs ttw:text-muted-foreground",
44
- children: O
45
- }) : null]
32
+ /* @__PURE__ */ d("div", {
33
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
34
+ children: [/* @__PURE__ */ u("p", {
35
+ className: "ttw:text-sm ttw:text-muted-foreground",
36
+ children: m
37
+ }), /* @__PURE__ */ u("p", {
38
+ className: "ttw:text-4xl ttw:font-semibold",
39
+ children: h
46
40
  })]
47
41
  }),
48
- /* @__PURE__ */ S("div", {
49
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
50
- children: [/* @__PURE__ */ S("div", {
51
- className: "ttw:grid ttw:gap-2.5",
52
- children: [/* @__PURE__ */ x(c, { children: k }), /* @__PURE__ */ x("div", {
53
- "aria-disabled": !0,
54
- className: "ttw:flex ttw:h-9 ttw:items-center ttw:rounded-md ttw:border ttw:border-border ttw:bg-muted ttw:px-3 ttw:text-sm ttw:font-medium ttw:text-muted-foreground",
55
- children: A
42
+ /* @__PURE__ */ u("dl", {
43
+ className: "ttw:flex ttw:flex-col",
44
+ children: g.map((e, t) => /* @__PURE__ */ d("div", {
45
+ className: s("ttw:flex ttw:items-center ttw:gap-4 ttw:py-2.5", t < g.length - 1 && "ttw:border-b ttw:border-border"),
46
+ children: [/* @__PURE__ */ u("dt", {
47
+ className: "ttw:w-32 ttw:shrink-0 ttw:text-sm ttw:text-muted-foreground",
48
+ children: e.label
49
+ }), /* @__PURE__ */ u("dd", {
50
+ className: "ttw:text-sm ttw:font-medium",
51
+ children: e.value
56
52
  })]
57
- }), /* @__PURE__ */ S("div", {
58
- className: "ttw:grid ttw:gap-2.5",
59
- children: [/* @__PURE__ */ x(c, {
60
- id: Y,
61
- children: J.paymentDate
62
- }), /* @__PURE__ */ S(l, { children: [/* @__PURE__ */ x(d, {
63
- asChild: !0,
64
- children: /* @__PURE__ */ S(t, {
65
- type: "button",
66
- variant: "outline",
67
- className: "ttw:justify-start ttw:gap-2",
68
- "aria-labelledby": `${Y} ${X}`,
69
- children: [
70
- /* @__PURE__ */ x(C, { className: "ttw:size-4" }),
71
- /* @__PURE__ */ x("span", {
72
- id: X,
73
- children: M ?? J.paymentDatePlaceholder
74
- }),
75
- P ? /* @__PURE__ */ x(e, {
76
- variant: "secondary",
77
- children: J.today
78
- }) : null
79
- ]
80
- })
81
- }), /* @__PURE__ */ x(u, {
82
- align: "start",
83
- className: "ttw:w-auto ttw:p-0",
84
- children: /* @__PURE__ */ x(n, {
85
- mode: "single",
86
- selected: j,
87
- onSelect: H,
88
- disabled: N
89
- })
90
- })] })]
91
- })]
53
+ }, e.label))
92
54
  }),
93
- /* @__PURE__ */ S("div", {
94
- className: "ttw:grid ttw:gap-2.5",
55
+ /* @__PURE__ */ d("section", {
56
+ className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted/30 ttw:p-4",
95
57
  children: [
96
- /* @__PURE__ */ x(c, {
97
- id: Z,
98
- children: J.payFrom
58
+ /* @__PURE__ */ u("p", {
59
+ className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
60
+ children: w.payToHeading
99
61
  }),
100
- /* @__PURE__ */ S(f, {
101
- value: F,
102
- disabled: Q,
103
- onValueChange: U,
104
- children: [/* @__PURE__ */ x(h, {
105
- className: "ttw:w-full ttw:data-[size=default]:h-14",
106
- "aria-labelledby": Z,
107
- children: $ ? /* @__PURE__ */ S("span", {
108
- className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-3",
109
- children: [/* @__PURE__ */ S("span", {
110
- className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col ttw:text-left",
111
- children: [/* @__PURE__ */ x("span", {
112
- className: "ttw:truncate",
113
- children: $.primaryLabel
114
- }), $.secondaryLabel ? /* @__PURE__ */ x("span", {
115
- className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
116
- children: $.secondaryLabel
117
- }) : null]
118
- }), L ? /* @__PURE__ */ x(e, {
119
- variant: "secondary",
120
- className: "ttw:shrink-0",
121
- children: J.poweredByBank(L)
122
- }) : null]
123
- }) : /* @__PURE__ */ x(g, { placeholder: J.payFromPlaceholder })
124
- }), /* @__PURE__ */ x(p, { children: I.map((e) => /* @__PURE__ */ x(m, {
125
- value: e.id,
126
- children: /* @__PURE__ */ S("span", {
127
- className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col",
128
- children: [/* @__PURE__ */ x("span", {
129
- className: "ttw:truncate",
130
- children: e.primaryLabel
131
- }), e.secondaryLabel ? /* @__PURE__ */ x("span", {
132
- className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
133
- children: e.secondaryLabel
134
- }) : null]
135
- })
136
- }, e.id)) })]
62
+ /* @__PURE__ */ u("p", {
63
+ className: "ttw:mt-1 ttw:text-xl ttw:font-semibold",
64
+ children: _.name
137
65
  }),
138
- Q ? /* @__PURE__ */ x("p", {
139
- className: _("ttw:text-sm", B ? "ttw:text-destructive" : "ttw:text-muted-foreground"),
140
- role: B ? "alert" : void 0,
141
- children: z ? J.loadingAccounts : B ? J.accountsError : J.noAccounts
66
+ _.email ? /* @__PURE__ */ u("p", {
67
+ className: "ttw:text-sm ttw:text-muted-foreground",
68
+ children: _.email
69
+ }) : null,
70
+ _.methodLabel || _.fields.length > 0 ? /* @__PURE__ */ d("div", {
71
+ className: "ttw:mt-4 ttw:border-t ttw:border-border ttw:pt-4",
72
+ children: [_.methodLabel ? /* @__PURE__ */ u("p", {
73
+ className: "ttw:text-xs ttw:font-semibold ttw:text-muted-foreground",
74
+ children: _.methodLabel
75
+ }) : null, /* @__PURE__ */ u("dl", {
76
+ className: "ttw:mt-3 ttw:grid ttw:gap-3",
77
+ children: _.fields.map((e) => /* @__PURE__ */ u(c, {
78
+ field: e,
79
+ labels: w
80
+ }, e.label))
81
+ })]
142
82
  }) : null
143
83
  ]
144
- }),
145
- R.message ? /* @__PURE__ */ x("p", {
146
- className: _("ttw:text-sm", w[R.state]),
147
- children: R.message
148
- }) : null
84
+ })
149
85
  ]
150
86
  }),
151
- /* @__PURE__ */ S(o, {
87
+ /* @__PURE__ */ d(i, {
152
88
  className: "ttw:pt-4 ttw:sm:gap-3",
153
- children: [/* @__PURE__ */ x(t, {
89
+ children: [/* @__PURE__ */ u(e, {
154
90
  type: "button",
155
91
  variant: "outline",
156
- onClick: G,
157
- children: J.cancelButton
158
- }), /* @__PURE__ */ x(t, {
92
+ onClick: y,
93
+ children: w.backButton
94
+ }), /* @__PURE__ */ u(e, {
159
95
  type: "button",
160
- loading: V,
161
- onClick: W,
162
- children: J.reviewButton
96
+ loading: v,
97
+ onClick: x,
98
+ children: w.submitButton
163
99
  })]
164
100
  })
165
101
  ]
@@ -167,4 +103,4 @@ function T({ open: y, onOpenChange: T, amountDueLabel: E, amountDue: D, dueDateS
167
103
  });
168
104
  }
169
105
  //#endregion
170
- export { T as SchedulePaymentDialog, T as default };
106
+ export { f as ReviewTransactionDialog, f as default };