@tesouro/embedded-components-react 0.2.306 → 0.2.308
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/README.md +7 -4
- package/dist/index.css +12 -0
- package/dist/index.d.ts +22 -1
- package/dist/lib/CardDetailsWidget.d.ts +6 -0
- package/dist/lib/CardsWidget.d.ts +6 -0
- package/dist/lib/TransfersWidget.d.ts +16 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +132 -110
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/FieldError.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/PinField.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +80 -70
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/testIds.js +3 -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/transfers-widget/feature/dist/index4.js +174 -164
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +55 -52
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +6 -3
- package/package.json +1 -1
|
@@ -2,90 +2,100 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { Badge as e,
|
|
6
|
-
import { EmptyState as
|
|
7
|
-
import { ErrorState as
|
|
5
|
+
import { Badge as e, Button as t, Skeleton as n, cn as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { EmptyState as i } from "../../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
7
|
+
import { ErrorState as a } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
8
8
|
import "../../../../../shared/ui/dist/index.js";
|
|
9
|
-
import { cardDetailsWidgetUiTestIds as
|
|
10
|
-
import { CardDetailsHeader as
|
|
11
|
-
import { CardFace as
|
|
12
|
-
import { DetailCopyRow as
|
|
13
|
-
import { resolveCardDetailsPanelLabels as
|
|
14
|
-
import { useMemo as
|
|
15
|
-
import { jsx as
|
|
16
|
-
import { CreditCardIcon as
|
|
9
|
+
import { cardDetailsWidgetUiTestIds as o } from "./testIds.js";
|
|
10
|
+
import { CardDetailsHeader as s } from "./CardDetailsHeader.js";
|
|
11
|
+
import { CardFace as c } from "./CardFace.js";
|
|
12
|
+
import { DetailCopyRow as l } from "./DetailCopyRow.js";
|
|
13
|
+
import { resolveCardDetailsPanelLabels as u } from "./labels.js";
|
|
14
|
+
import { useMemo as d } from "react";
|
|
15
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
16
|
+
import { CreditCardIcon as m, PowerIcon as h } from "lucide-react";
|
|
17
17
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js
|
|
18
|
-
function
|
|
19
|
-
let
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
"data-testid":
|
|
22
|
-
className:
|
|
23
|
-
children: [/* @__PURE__ */
|
|
24
|
-
labels:
|
|
25
|
-
title:
|
|
26
|
-
isTitlePending:
|
|
27
|
-
statusLabel:
|
|
28
|
-
statusTone:
|
|
29
|
-
formFactorLabel:
|
|
30
|
-
cardMenu:
|
|
31
|
-
onClose:
|
|
32
|
-
}), /* @__PURE__ */
|
|
18
|
+
function g({ labels: g, state: _, nickname: v, statusLabel: y, statusTone: b, formFactorLabel: x, cardMenu: S, onClose: C, bankLogoSrc: w, bankLogoAlt: T, cardholderName: E, maskedCardNumber: D, programLabel: O, billingAddress: k, allowedCategories: A, onCopy: j, onActivate: M, onRetry: N, className: P }) {
|
|
19
|
+
let F = d(() => u(g), [g]), I = !!A?.length;
|
|
20
|
+
return /* @__PURE__ */ p("div", {
|
|
21
|
+
"data-testid": o.panel,
|
|
22
|
+
className: r("ttw:flex ttw:w-full ttw:flex-col", P),
|
|
23
|
+
children: [/* @__PURE__ */ f(s, {
|
|
24
|
+
labels: F.header,
|
|
25
|
+
title: _ === "loaded" ? v ?? F.header.untitledCard : void 0,
|
|
26
|
+
isTitlePending: _ === "loading",
|
|
27
|
+
statusLabel: _ === "loaded" ? y : void 0,
|
|
28
|
+
statusTone: b,
|
|
29
|
+
formFactorLabel: _ === "loaded" ? x : void 0,
|
|
30
|
+
cardMenu: _ === "loaded" ? S : void 0,
|
|
31
|
+
onClose: C
|
|
32
|
+
}), /* @__PURE__ */ f("div", {
|
|
33
33
|
className: "ttw:px-4 ttw:pb-4",
|
|
34
|
-
children:
|
|
35
|
-
"data-testid":
|
|
34
|
+
children: _ === "loading" ? /* @__PURE__ */ p("div", {
|
|
35
|
+
"data-testid": o.loading,
|
|
36
36
|
role: "status",
|
|
37
|
-
"aria-label":
|
|
37
|
+
"aria-label": F.status.loadingAriaLabel,
|
|
38
38
|
className: "ttw:space-y-4",
|
|
39
|
-
children: [/* @__PURE__ */
|
|
40
|
-
}) :
|
|
41
|
-
title:
|
|
42
|
-
description:
|
|
43
|
-
retryLabel:
|
|
44
|
-
onRetry:
|
|
45
|
-
}) :
|
|
46
|
-
icon: /* @__PURE__ */
|
|
47
|
-
title:
|
|
48
|
-
description:
|
|
49
|
-
}) : /* @__PURE__ */
|
|
39
|
+
children: [/* @__PURE__ */ f(n, { className: "ttw:h-8 ttw:w-56" }), /* @__PURE__ */ f(n, { className: "ttw:h-64 ttw:w-full ttw:rounded-xl" })]
|
|
40
|
+
}) : _ === "error" ? /* @__PURE__ */ f(a, {
|
|
41
|
+
title: F.status.errorTitle,
|
|
42
|
+
description: F.status.errorDescription,
|
|
43
|
+
retryLabel: F.status.errorRetry,
|
|
44
|
+
onRetry: N
|
|
45
|
+
}) : _ === "notFound" ? /* @__PURE__ */ f(i, {
|
|
46
|
+
icon: /* @__PURE__ */ f(m, { className: "ttw:size-6 ttw:text-muted-foreground" }),
|
|
47
|
+
title: F.status.notFoundTitle,
|
|
48
|
+
description: F.status.notFoundDescription
|
|
49
|
+
}) : /* @__PURE__ */ p("div", {
|
|
50
50
|
className: "ttw:flex ttw:flex-col ttw:overflow-hidden ttw:rounded-xl ttw:border ttw:border-border ttw:sm:flex-row",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ f("div", {
|
|
52
52
|
className: "ttw:flex ttw:items-center ttw:justify-center ttw:bg-muted ttw:px-4 ttw:py-5",
|
|
53
|
-
children: /* @__PURE__ */
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
children: /* @__PURE__ */ p("div", {
|
|
54
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
55
|
+
children: [/* @__PURE__ */ f(c, {
|
|
56
|
+
bankLogoSrc: w,
|
|
57
|
+
bankLogoAlt: T ?? F.cardFace.bankLogoAlt,
|
|
58
|
+
cardholderName: E ?? "",
|
|
59
|
+
maskedCardNumber: D ?? "",
|
|
60
|
+
programLabel: O ?? ""
|
|
61
|
+
}), M ? /* @__PURE__ */ p(t, {
|
|
62
|
+
type: "button",
|
|
63
|
+
onClick: M,
|
|
64
|
+
children: [/* @__PURE__ */ f(h, {
|
|
65
|
+
className: "ttw:size-4",
|
|
66
|
+
"aria-hidden": "true"
|
|
67
|
+
}), F.actions.activateCard]
|
|
68
|
+
}) : null]
|
|
59
69
|
})
|
|
60
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ p("div", {
|
|
61
71
|
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col ttw:border-t ttw:border-border ttw:sm:border-t-0 ttw:sm:border-l",
|
|
62
72
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
label:
|
|
65
|
-
copyAriaLabel:
|
|
66
|
-
onCopy:
|
|
67
|
-
children:
|
|
73
|
+
/* @__PURE__ */ f(l, {
|
|
74
|
+
label: F.fields.cardholder,
|
|
75
|
+
copyAriaLabel: E && j ? F.fields.copyCardholderAriaLabel : void 0,
|
|
76
|
+
onCopy: E && j ? () => j(E) : void 0,
|
|
77
|
+
children: E ?? F.fields.emptyValue
|
|
68
78
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
label:
|
|
71
|
-
copyAriaLabel:
|
|
72
|
-
onCopy:
|
|
73
|
-
isLast: !
|
|
74
|
-
children:
|
|
79
|
+
/* @__PURE__ */ f(l, {
|
|
80
|
+
label: F.fields.nickname,
|
|
81
|
+
copyAriaLabel: v && j ? F.fields.copyNicknameAriaLabel : void 0,
|
|
82
|
+
onCopy: v && j ? () => j(v) : void 0,
|
|
83
|
+
isLast: !k && !I,
|
|
84
|
+
children: v ?? F.fields.emptyValue
|
|
75
85
|
}),
|
|
76
|
-
|
|
77
|
-
label:
|
|
78
|
-
copyAriaLabel:
|
|
79
|
-
onCopy:
|
|
80
|
-
isLast: !
|
|
81
|
-
children:
|
|
86
|
+
k ? /* @__PURE__ */ f(l, {
|
|
87
|
+
label: F.fields.billingAddress,
|
|
88
|
+
copyAriaLabel: j ? F.fields.copyBillingAddressAriaLabel : void 0,
|
|
89
|
+
onCopy: j ? () => j(k) : void 0,
|
|
90
|
+
isLast: !I,
|
|
91
|
+
children: k
|
|
82
92
|
}) : null,
|
|
83
|
-
|
|
84
|
-
label:
|
|
93
|
+
I ? /* @__PURE__ */ f(l, {
|
|
94
|
+
label: F.fields.allowedCategories,
|
|
85
95
|
isLast: !0,
|
|
86
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ f("div", {
|
|
87
97
|
className: "ttw:flex ttw:flex-wrap ttw:gap-2",
|
|
88
|
-
children:
|
|
98
|
+
children: A?.map((t) => /* @__PURE__ */ f(e, {
|
|
89
99
|
variant: "secondary",
|
|
90
100
|
children: t
|
|
91
101
|
}, t))
|
|
@@ -98,4 +108,4 @@ function m({ labels: m, state: h, nickname: g, statusLabel: _, statusTone: v, fo
|
|
|
98
108
|
});
|
|
99
109
|
}
|
|
100
110
|
//#endregion
|
|
101
|
-
export {
|
|
111
|
+
export { g as CardDetailsPanel };
|
|
@@ -16,6 +16,7 @@ var e = {
|
|
|
16
16
|
copyNicknameAriaLabel: "Copy nickname",
|
|
17
17
|
copyBillingAddressAriaLabel: "Copy billing address"
|
|
18
18
|
},
|
|
19
|
+
actions: { activateCard: "Activate Card" },
|
|
19
20
|
status: {
|
|
20
21
|
loadingAriaLabel: "Loading card details",
|
|
21
22
|
errorTitle: "We couldn't load this card",
|
|
@@ -39,6 +40,10 @@ function t(t) {
|
|
|
39
40
|
...e.fields,
|
|
40
41
|
...t?.fields
|
|
41
42
|
},
|
|
43
|
+
actions: {
|
|
44
|
+
...e.actions,
|
|
45
|
+
...t?.actions
|
|
46
|
+
},
|
|
42
47
|
status: {
|
|
43
48
|
...e.status,
|
|
44
49
|
...t?.status
|
|
@@ -4,7 +4,9 @@ var e = {
|
|
|
4
4
|
cardFace: "card-details-widget-card-face",
|
|
5
5
|
loading: "card-details-widget-loading",
|
|
6
6
|
menuTrigger: "card-details-widget-menu-trigger",
|
|
7
|
-
closeButton: "card-details-widget-close-button"
|
|
7
|
+
closeButton: "card-details-widget-close-button",
|
|
8
|
+
activatePanel: "card-details-widget-activate-panel",
|
|
9
|
+
activateSuccess: "card-details-widget-activate-success"
|
|
8
10
|
};
|
|
9
11
|
//#endregion
|
|
10
12
|
export { e as cardDetailsWidgetUiTestIds };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.2.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.2.308", n = "23859351e9e0bc83c3468ea19507174c7848d694", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|