@tesouro/embedded-components-react 0.11.14 → 0.11.17
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.
- package/dist/experimental/QuickViewWidget.d.ts +9 -3
- package/dist/experimental/index.d.ts +9 -3
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/feature/dist/lib/InvoicesQuickViewWidget/InvoicesQuickViewWidgetFeature.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/feature/dist/lib/InvoicesQuickViewWidget/labels.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/quick-view/ui/dist/index3.js +22 -16
- package/package.json +1 -1
|
@@ -662,10 +662,16 @@ interface InvoicesQuickViewWidgetLabels extends InvoicesQuickViewTileLabels {
|
|
|
662
662
|
/** Line under the total when nothing is overdue, e.g. "5 open invoices". */
|
|
663
663
|
openInvoiceCount: (count: number) => string;
|
|
664
664
|
/**
|
|
665
|
-
*
|
|
666
|
-
* "$6,450.00 overdue
|
|
665
|
+
* Start of the line under the total when something is overdue, e.g.
|
|
666
|
+
* "$6,450.00 overdue", in the destructive tone. `amount` is already
|
|
667
|
+
* formatted.
|
|
667
668
|
*/
|
|
668
|
-
|
|
669
|
+
overdueAmount: (amount: string) => string;
|
|
670
|
+
/**
|
|
671
|
+
* Rest of the overdue line, muted, e.g. " · 3 invoices". It follows
|
|
672
|
+
* `overdueAmount` directly, so it carries its own separator.
|
|
673
|
+
*/
|
|
674
|
+
overdueInvoiceCount: (count: number) => string;
|
|
669
675
|
/** The overdue line as a screen reader hears it, without the separator. */
|
|
670
676
|
overdueDescription: (amount: string, count: number) => string;
|
|
671
677
|
/**
|
|
@@ -662,10 +662,16 @@ interface InvoicesQuickViewWidgetLabels extends InvoicesQuickViewTileLabels {
|
|
|
662
662
|
/** Line under the total when nothing is overdue, e.g. "5 open invoices". */
|
|
663
663
|
openInvoiceCount: (count: number) => string;
|
|
664
664
|
/**
|
|
665
|
-
*
|
|
666
|
-
* "$6,450.00 overdue
|
|
665
|
+
* Start of the line under the total when something is overdue, e.g.
|
|
666
|
+
* "$6,450.00 overdue", in the destructive tone. `amount` is already
|
|
667
|
+
* formatted.
|
|
667
668
|
*/
|
|
668
|
-
|
|
669
|
+
overdueAmount: (amount: string) => string;
|
|
670
|
+
/**
|
|
671
|
+
* Rest of the overdue line, muted, e.g. " · 3 invoices". It follows
|
|
672
|
+
* `overdueAmount` directly, so it carries its own separator.
|
|
673
|
+
*/
|
|
674
|
+
overdueInvoiceCount: (count: number) => string;
|
|
669
675
|
/** The overdue line as a screen reader hears it, without the separator. */
|
|
670
676
|
overdueDescription: (amount: string, count: number) => string;
|
|
671
677
|
/**
|
|
@@ -43,9 +43,12 @@ function S(e, t, n) {
|
|
|
43
43
|
if (e.overdueCount > 0) {
|
|
44
44
|
let n = x(e.overdueAmountDue);
|
|
45
45
|
return {
|
|
46
|
-
subtext:
|
|
46
|
+
subtext: [{
|
|
47
|
+
text: t.overdueAmount(n),
|
|
48
|
+
tone: "destructive"
|
|
49
|
+
}, { text: t.overdueInvoiceCount(e.overdueCount) }],
|
|
47
50
|
description: t.overdueDescription(n, e.overdueCount),
|
|
48
|
-
subtextTone: "
|
|
51
|
+
subtextTone: "muted",
|
|
49
52
|
callToAction: "viewInvoices"
|
|
50
53
|
};
|
|
51
54
|
}
|
|
@@ -9,7 +9,8 @@ var t = (e, t = "") => `${e.toLocaleString("en-US")} ${t}${e === 1 ? "invoice" :
|
|
|
9
9
|
noOpenInvoices: "No open invoices",
|
|
10
10
|
noOpenInvoicesInCurrency: (e) => `No open ${e} invoices`,
|
|
11
11
|
openInvoiceCount: (e) => t(e, "open "),
|
|
12
|
-
|
|
12
|
+
overdueAmount: (e) => `${e} overdue`,
|
|
13
|
+
overdueInvoiceCount: (e) => ` · ${t(e)}`,
|
|
13
14
|
overdueDescription: (e, n) => `${e} overdue across ${t(n)}`,
|
|
14
15
|
accessibleName: ({ title: e, value: t, detail: n, action: r }) => `${e}, ${t}, ${n}. ${r}.`
|
|
15
16
|
};
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.11.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.11.17", n = "6e5e635a91c9de25e8da7214a9a83a4bac240f08", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -10,7 +10,10 @@ function u({ title: u, value: d, subtext: f, subtextTone: p = "muted", linkText:
|
|
|
10
10
|
let w = {
|
|
11
11
|
...i,
|
|
12
12
|
...b
|
|
13
|
-
}, T =
|
|
13
|
+
}, T = typeof f == "string" ? f ? [{
|
|
14
|
+
text: f,
|
|
15
|
+
tone: p
|
|
16
|
+
}] : [] : f ?? [], E = !!h && !_ && !v, D = /* @__PURE__ */ s("span", {
|
|
14
17
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
|
|
15
18
|
children: [/* @__PURE__ */ o(t, {
|
|
16
19
|
component: "span",
|
|
@@ -18,7 +21,7 @@ function u({ title: u, value: d, subtext: f, subtextTone: p = "muted", linkText:
|
|
|
18
21
|
color: "muted",
|
|
19
22
|
className: "ttw:font-semibold",
|
|
20
23
|
children: u
|
|
21
|
-
}),
|
|
24
|
+
}), E ? /* @__PURE__ */ o(c, {
|
|
22
25
|
className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground",
|
|
23
26
|
"aria-hidden": !0
|
|
24
27
|
}) : null]
|
|
@@ -27,7 +30,7 @@ function u({ title: u, value: d, subtext: f, subtextTone: p = "muted", linkText:
|
|
|
27
30
|
className: n(l, S),
|
|
28
31
|
style: C,
|
|
29
32
|
"data-testid": x?.tile,
|
|
30
|
-
children: [
|
|
33
|
+
children: [D, /* @__PURE__ */ s("div", {
|
|
31
34
|
role: "status",
|
|
32
35
|
"aria-busy": !0,
|
|
33
36
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
@@ -54,7 +57,7 @@ function u({ title: u, value: d, subtext: f, subtextTone: p = "muted", linkText:
|
|
|
54
57
|
className: n(l, S),
|
|
55
58
|
style: C,
|
|
56
59
|
"data-testid": x?.tile,
|
|
57
|
-
children: [
|
|
60
|
+
children: [D, /* @__PURE__ */ o(r, {
|
|
58
61
|
title: w.loadErrorTitle,
|
|
59
62
|
retryLabel: w.loadErrorRetry,
|
|
60
63
|
onRetry: y,
|
|
@@ -62,39 +65,42 @@ function u({ title: u, value: d, subtext: f, subtextTone: p = "muted", linkText:
|
|
|
62
65
|
testId: x?.error
|
|
63
66
|
})]
|
|
64
67
|
});
|
|
65
|
-
let
|
|
66
|
-
|
|
68
|
+
let O = /* @__PURE__ */ s(a, { children: [
|
|
69
|
+
D,
|
|
67
70
|
/* @__PURE__ */ o(t, {
|
|
68
71
|
component: "span",
|
|
69
72
|
variant: "h6",
|
|
70
73
|
className: "ttw:block ttw:text-3xl ttw:font-semibold ttw:leading-tight",
|
|
71
74
|
children: d
|
|
72
75
|
}),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
T.length > 0 ? /* @__PURE__ */ o("span", {
|
|
77
|
+
className: "ttw:block ttw:text-sm ttw:leading-6",
|
|
78
|
+
children: T.map(({ text: e, tone: r = "muted" }, i) => /* @__PURE__ */ o(t, {
|
|
79
|
+
component: "span",
|
|
80
|
+
variant: "body2",
|
|
81
|
+
color: r,
|
|
82
|
+
className: n(r !== "muted" && "ttw:font-medium"),
|
|
83
|
+
children: e
|
|
84
|
+
}, i))
|
|
79
85
|
}) : null,
|
|
80
|
-
|
|
86
|
+
E && m ? /* @__PURE__ */ o("span", {
|
|
81
87
|
className: "ttw:mt-3 ttw:text-sm ttw:font-medium ttw:text-primary ttw:group-hover:underline",
|
|
82
88
|
children: m
|
|
83
89
|
}) : null
|
|
84
90
|
] });
|
|
85
|
-
return
|
|
91
|
+
return E ? /* @__PURE__ */ o("button", {
|
|
86
92
|
type: "button",
|
|
87
93
|
onClick: h,
|
|
88
94
|
"aria-label": g,
|
|
89
95
|
"data-testid": x?.tile,
|
|
90
96
|
style: C,
|
|
91
97
|
className: n(l, "ttw:group ttw:cursor-pointer ttw:transition-colors ttw:hover:bg-accent/40 ttw:focus-visible:outline-none ttw:focus-visible:ring-2 ttw:focus-visible:ring-ring ttw:focus-visible:ring-offset-2", S),
|
|
92
|
-
children:
|
|
98
|
+
children: O
|
|
93
99
|
}) : /* @__PURE__ */ o("div", {
|
|
94
100
|
className: n(l, S),
|
|
95
101
|
style: C,
|
|
96
102
|
"data-testid": x?.tile,
|
|
97
|
-
children:
|
|
103
|
+
children: O
|
|
98
104
|
});
|
|
99
105
|
}
|
|
100
106
|
export { u as QuickViewTile };
|