@tesouro/embedded-components-react 0.5.17 → 0.5.19

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 (33) hide show
  1. package/README.md +22 -21
  2. package/dist/index.css +18 -0
  3. package/dist/index.d.ts +29 -6
  4. package/dist/lib/CardDetailsWidget.d.ts +20 -2
  5. package/dist/lib/CreditCardsWidget.d.ts +29 -6
  6. package/dist/lib/DebitCardsWidget.d.ts +29 -6
  7. package/dist/lib/WidgetSuite.d.ts +29 -6
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +8 -14
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -0
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +34 -34
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +85 -80
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +186 -179
  14. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +152 -149
  15. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index3.js +8 -11
  16. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index4.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +2 -0
  18. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index7.js +4 -4
  19. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index9.js +81 -79
  20. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +39 -38
  21. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/AddressLine.js +23 -0
  22. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +142 -118
  23. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardFace.js +24 -14
  24. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +4 -1
  25. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +1 -0
  26. package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/PerTransactionMaximumControl.js +17 -16
  27. package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/SpendLimitControl.js +25 -24
  28. package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/limitDecimalPlaces.js +7 -0
  29. package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/SetupView.js +1 -1
  30. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +4 -1
  31. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/card/cardPresentation.js +1 -1
  33. package/package.json +1 -1
@@ -23,69 +23,70 @@ function O(e, t) {
23
23
  default: return;
24
24
  }
25
25
  }
26
- function k({ labels: p, state: m = "idle", values: k = h, onValuesChange: A, errors: j = D, isSubmitDisabled: M = !0, onSubmit: N, onClose: P, onDone: F, bankLogoSrc: I, bankLogoAlt: L, cardholderName: R, maskedCardNumber: z, programLabel: B, testIds: V, className: H }) {
27
- let U = x(() => f(p), [p]), W = b(), G = b(), K = b(), q = b(), J = m === "submitting", Y = O(j.expirationDate, U.validation), X = O(j.form, U.validation);
26
+ function k({ labels: p, state: m = "idle", values: k = h, onValuesChange: A, errors: j = D, isSubmitDisabled: M = !0, onSubmit: N, onClose: P, onDone: F, cardArtSrc: I, bankLogoSrc: L, bankLogoAlt: R, cardholderName: z, maskedCardNumber: B, programLabel: V, testIds: H, className: U }) {
27
+ let W = x(() => f(p), [p]), G = b(), K = b(), q = b(), J = b(), Y = m === "submitting", X = O(j.expirationDate, W.validation), Z = O(j.form, W.validation);
28
28
  return /* @__PURE__ */ C("div", {
29
- "data-testid": V?.root,
30
- className: l("ttw:flex ttw:w-full ttw:flex-col", H),
29
+ "data-testid": H?.root,
30
+ className: l("ttw:flex ttw:w-full ttw:flex-col", U),
31
31
  children: [/* @__PURE__ */ C("div", {
32
32
  className: "ttw:flex ttw:items-start ttw:gap-1.5 ttw:px-4 ttw:pt-4 ttw:pb-3",
33
33
  children: [/* @__PURE__ */ S("h2", {
34
34
  className: "ttw:min-w-0 ttw:flex-1 ttw:text-2xl ttw:font-semibold ttw:tracking-[-0.6px] ttw:text-foreground",
35
- children: U.header.title
35
+ children: W.header.title
36
36
  }), P ? /* @__PURE__ */ S(e, {
37
37
  type: "button",
38
38
  variant: "ghost",
39
39
  size: "icon",
40
40
  className: "ttw:size-8 ttw:shrink-0",
41
- "aria-label": U.header.closeAriaLabel,
41
+ "aria-label": W.header.closeAriaLabel,
42
42
  onClick: P,
43
43
  children: /* @__PURE__ */ S(E, { className: "ttw:size-4" })
44
44
  }) : null]
45
45
  }), m === "succeeded" ? /* @__PURE__ */ S(v, {
46
- labels: U.status,
46
+ labels: W.status,
47
47
  onDone: F,
48
- testIds: V?.successView
48
+ testIds: H?.successView
49
49
  }) : /* @__PURE__ */ C("form", {
50
50
  noValidate: !0,
51
51
  onSubmit: (e) => {
52
- e.preventDefault(), !(M || J) && N?.();
52
+ e.preventDefault(), !(M || Y) && N?.();
53
53
  },
54
54
  className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-4 ttw:pb-4",
55
55
  children: [
56
56
  /* @__PURE__ */ S("div", {
57
57
  className: "ttw:flex ttw:justify-center",
58
58
  children: /* @__PURE__ */ S(d, {
59
- bankLogoSrc: I,
60
- bankLogoAlt: L ?? U.cardFace.bankLogoAlt,
61
- cardholderName: R ?? "",
62
- maskedCardNumber: z ?? "",
63
- programLabel: B ?? "",
64
- testIds: V?.cardFace
59
+ cardArtSrc: I,
60
+ bankLogoSrc: L,
61
+ bankLogoAlt: R ?? W.cardFace.bankLogoAlt,
62
+ cardholderName: z ?? "",
63
+ maskedCardNumber: B ?? "",
64
+ programLabel: V ?? "",
65
+ testIds: H?.cardFace
65
66
  })
66
67
  }),
67
68
  /* @__PURE__ */ C("div", {
68
69
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
69
70
  children: [
70
71
  /* @__PURE__ */ S(n, {
71
- htmlFor: W,
72
+ htmlFor: G,
72
73
  className: "ttw:text-sm ttw:font-medium",
73
- children: U.fields.expirationDate
74
+ children: W.fields.expirationDate
74
75
  }),
75
76
  /* @__PURE__ */ S(t, {
76
- id: W,
77
+ id: G,
77
78
  value: k.expirationDate,
78
- placeholder: U.fields.expirationDatePlaceholder,
79
- disabled: J,
79
+ placeholder: W.fields.expirationDatePlaceholder,
80
+ disabled: Y,
80
81
  inputMode: "numeric",
81
82
  autoComplete: "off",
82
- "aria-invalid": Y ? !0 : void 0,
83
- "aria-describedby": Y ? G : void 0,
83
+ "aria-invalid": X ? !0 : void 0,
84
+ "aria-describedby": X ? K : void 0,
84
85
  onChange: (e) => A?.({ expirationDate: _(e.target.value) })
85
86
  }),
86
87
  /* @__PURE__ */ S(y, {
87
- id: G,
88
- message: Y
88
+ id: K,
89
+ message: X
89
90
  })
90
91
  ]
91
92
  }),
@@ -95,46 +96,46 @@ function k({ labels: p, state: m = "idle", values: k = h, onValuesChange: A, err
95
96
  /* @__PURE__ */ C("div", {
96
97
  className: "ttw:flex ttw:items-center ttw:gap-1.5",
97
98
  children: [/* @__PURE__ */ S(n, {
98
- htmlFor: K,
99
+ htmlFor: q,
99
100
  className: "ttw:text-sm ttw:font-medium",
100
- children: U.fields.securityCode
101
+ children: W.fields.securityCode
101
102
  }), /* @__PURE__ */ S(s, { children: /* @__PURE__ */ C(a, { children: [/* @__PURE__ */ S(c, {
102
103
  type: "button",
103
104
  className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-help ttw:text-muted-foreground",
104
- "aria-label": U.fields.securityCodeInfoAriaLabel,
105
+ "aria-label": W.fields.securityCodeInfoAriaLabel,
105
106
  children: /* @__PURE__ */ S(T, { className: "ttw:size-4" })
106
107
  }), /* @__PURE__ */ S(o, {
107
108
  className: "ttw:max-w-xs",
108
- children: U.fields.securityCodeInfo
109
+ children: W.fields.securityCodeInfo
109
110
  })] }) })]
110
111
  }),
111
112
  /* @__PURE__ */ S(t, {
112
- id: K,
113
+ id: q,
113
114
  value: k.securityCode,
114
- placeholder: U.fields.securityCodePlaceholder,
115
- "aria-describedby": q,
116
- disabled: J,
115
+ placeholder: W.fields.securityCodePlaceholder,
116
+ "aria-describedby": J,
117
+ disabled: Y,
117
118
  inputMode: "numeric",
118
119
  autoComplete: "off",
119
120
  maxLength: 4,
120
121
  onChange: (e) => A?.({ securityCode: g(e.target.value, 4) })
121
122
  }),
122
123
  /* @__PURE__ */ S("span", {
123
- id: q,
124
+ id: J,
124
125
  className: "ttw:sr-only",
125
- children: U.fields.securityCodeInfo
126
+ children: W.fields.securityCodeInfo
126
127
  })
127
128
  ]
128
129
  }),
129
130
  /* @__PURE__ */ S(r, {}),
130
- m === "errored" || X ? /* @__PURE__ */ S(u, { children: X ?? U.status.errorDescription }) : null,
131
+ m === "errored" || Z ? /* @__PURE__ */ S(u, { children: Z ?? W.status.errorDescription }) : null,
131
132
  /* @__PURE__ */ C(e, {
132
133
  type: "submit",
133
134
  className: "ttw:w-full",
134
- disabled: M || J,
135
+ disabled: M || Y,
135
136
  children: [
136
- J ? /* @__PURE__ */ S(i, { "aria-label": U.status.submittingAriaLabel }) : null,
137
- U.status.submit,
137
+ Y ? /* @__PURE__ */ S(i, { "aria-label": W.status.submittingAriaLabel }) : null,
138
+ W.status.submit,
138
139
  /* @__PURE__ */ S(w, { className: "ttw:size-4" })
139
140
  ]
140
141
  })
@@ -0,0 +1,23 @@
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { CopyIcon as n } from "lucide-react";
3
+ //#region ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/AddressLine.js
4
+ function r({ value: r, copyAriaLabel: i, onCopy: a }) {
5
+ return /* @__PURE__ */ t("div", {
6
+ className: "ttw:flex ttw:items-center ttw:gap-1",
7
+ children: [/* @__PURE__ */ e("span", {
8
+ className: "ttw:min-w-0 ttw:truncate ttw:text-sm ttw:text-foreground",
9
+ children: r
10
+ }), i && a ? /* @__PURE__ */ e("button", {
11
+ type: "button",
12
+ "aria-label": i,
13
+ onClick: a,
14
+ className: "ttw:inline-flex ttw:size-5 ttw:shrink-0 ttw:cursor-pointer ttw:items-center ttw:justify-center ttw:rounded ttw:text-muted-foreground ttw:transition-colors ttw:hover:bg-accent ttw:hover:text-accent-foreground ttw:focus-visible:ring-2 ttw:focus-visible:ring-ring ttw:focus-visible:outline-none",
15
+ children: /* @__PURE__ */ e(n, {
16
+ className: "ttw:size-3",
17
+ "aria-hidden": "true"
18
+ })
19
+ }) : null]
20
+ });
21
+ }
22
+ //#endregion
23
+ export { r as AddressLine };
@@ -3,197 +3,221 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { Button as e, Skeleton as t, cn as n } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { EmptyState as r } from "../../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
7
- import { ErrorState as ee } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
6
+ import { EmptyState as ee } from "../../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
7
+ import { ErrorState as r } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
8
8
  import { InlineErrorAlert as i } from "../../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
9
9
  import "../../../../../shared/ui/dist/index.js";
10
- import { CardDetailsHeader as a } from "./CardDetailsHeader.js";
11
- import { CARD_FACE_WIDTH_CLASS_NAME as te } from "./cardFaceSurface.js";
12
- import { CardFace as ne } from "./CardFace.js";
10
+ import { CardDetailsHeader as te } from "./CardDetailsHeader.js";
11
+ import { CARD_FACE_WIDTH_CLASS_NAME as ne } from "./cardFaceSurface.js";
12
+ import { CardFace as a } from "./CardFace.js";
13
13
  import { DetailCopyRow as o } from "./DetailCopyRow.js";
14
14
  import { resolveCardDetailsPanelLabels as s } from "./labels.js";
15
- import { CardCredentialsFace as c } from "./CardCredentialsFace.js";
16
- import { CardFaceFlip as l } from "./CardFaceFlip.js";
17
- import { NicknameRow as u } from "./NicknameRow.js";
18
- import { useMemo as d } from "react";
19
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
20
- import { CheckIcon as re, CreditCardIcon as m, EyeIcon as h, EyeOffIcon as ie, LockIcon as ae, LockOpenIcon as oe, PowerIcon as se } from "lucide-react";
15
+ import { AddressLine as c } from "./AddressLine.js";
16
+ import { CardCredentialsFace as re } from "./CardCredentialsFace.js";
17
+ import { CardFaceFlip as ie } from "./CardFaceFlip.js";
18
+ import { NicknameRow as ae } from "./NicknameRow.js";
19
+ import { useMemo as oe } from "react";
20
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
21
+ import { CheckIcon as d, CreditCardIcon as f, EyeIcon as p, EyeOffIcon as m, LockIcon as h, LockOpenIcon as se, PowerIcon as ce } from "lucide-react";
21
22
  //#region ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js
22
- function g({ labels: g, state: _, nickname: v, statusLabel: ce, statusTone: le, formFactorLabel: ue, cardMenu: de, onClose: fe, bankLogoSrc: pe, bankLogoAlt: me, cardholderName: y, maskedCardNumber: b, programLabel: x, cardFaceStatusLabel: S, billingAddress: C, allowedCategories: w, spendLimitLabels: T, perTransactionMaxLabel: E, onCopy: D, onEditNickname: O, nicknameEditState: k = "closed", nicknameDraft: A, onNicknameDraftChange: j, onSaveNickname: M, onCancelNicknameEdit: N, isNicknameSaveDisabled: P, onActivate: F, onViewCard: I, onHideCard: L, revealState: R = "hidden", revealedCardNumber: z, revealedExpirationDate: he, revealedSecurityCode: ge, isLocked: B, lockState: V = "idle", onLockCard: H, onUnlockCard: U, onRetry: _e, testIds: W, className: ve }) {
23
- let G = d(() => s(g), [g]), K = !!w?.length, q = !!T?.length, J = !!E, Y = R === "revealed", X = Y ? L : I, Z = !!(H || U), Q = B ? U : H, $ = /* @__PURE__ */ f(ne, {
24
- bankLogoSrc: pe,
25
- bankLogoAlt: me ?? G.cardFace.bankLogoAlt,
23
+ function g({ labels: g, state: _, nickname: v, statusLabel: le, statusTone: ue, formFactorLabel: de, cardMenu: fe, onClose: pe, cardArtSrc: me, bankLogoSrc: he, bankLogoAlt: ge, cardholderName: y, maskedCardNumber: _e, programLabel: ve, cardFaceStatusLabel: ye, billingAddress: b, allowedCategories: x, spendLimitLabels: S, perTransactionMaxLabel: C, onCopy: w, onEditNickname: T, nicknameEditState: E = "closed", nicknameDraft: D, onNicknameDraftChange: O, onSaveNickname: k, onCancelNicknameEdit: A, isNicknameSaveDisabled: j, onActivate: M, onViewCard: N, onHideCard: P, revealState: F = "hidden", revealedCardNumber: be, revealedExpirationDate: xe, revealedSecurityCode: Se, isLocked: I, lockState: L = "idle", onLockCard: R, onUnlockCard: z, onRetry: Ce, testIds: B, className: we }) {
24
+ let V = oe(() => s(g), [g]), H = b?.addressLine1, U = b?.addressLine2, W = b?.cityState, G = b?.postalCode, Te = !!(H || U || W || G), K = !!x?.length, q = !!S?.length, J = !!C, Y = F === "revealed", X = Y ? P : N, Z = !!(R || z), Q = I ? z : R, $ = /* @__PURE__ */ l(a, {
25
+ cardArtSrc: me,
26
+ bankLogoSrc: he,
27
+ bankLogoAlt: ge ?? V.cardFace.bankLogoAlt,
26
28
  cardholderName: y ?? "",
27
- maskedCardNumber: b ?? "",
28
- programLabel: x ?? "",
29
- statusLabel: S,
30
- isLocked: B,
31
- lockedLabel: G.lock.cardFaceLabel,
32
- testIds: W?.cardFace
29
+ maskedCardNumber: _e ?? "",
30
+ programLabel: ve ?? "",
31
+ statusLabel: ye,
32
+ isLocked: I,
33
+ lockedLabel: V.lock.cardFaceLabel,
34
+ testIds: B?.cardFace
33
35
  });
34
- return /* @__PURE__ */ p("div", {
35
- "data-testid": W?.root,
36
- className: n("ttw:flex ttw:w-full ttw:flex-col", ve),
37
- children: [/* @__PURE__ */ f(a, {
38
- testIds: W?.header,
39
- labels: G.header,
40
- title: _ === "loaded" ? v ?? G.header.untitledCard : void 0,
36
+ return /* @__PURE__ */ u("div", {
37
+ "data-testid": B?.root,
38
+ className: n("ttw:flex ttw:w-full ttw:flex-col", we),
39
+ children: [/* @__PURE__ */ l(te, {
40
+ testIds: B?.header,
41
+ labels: V.header,
42
+ title: _ === "loaded" ? v ?? V.header.untitledCard : void 0,
41
43
  isTitlePending: _ === "loading",
42
- statusLabel: _ === "loaded" ? ce : void 0,
43
- statusTone: le,
44
- formFactorLabel: _ === "loaded" ? ue : void 0,
45
- cardMenu: _ === "loaded" ? de : void 0,
46
- onClose: fe
47
- }), /* @__PURE__ */ f("div", {
44
+ statusLabel: _ === "loaded" ? le : void 0,
45
+ statusTone: ue,
46
+ formFactorLabel: _ === "loaded" ? de : void 0,
47
+ cardMenu: _ === "loaded" ? fe : void 0,
48
+ onClose: pe
49
+ }), /* @__PURE__ */ l("div", {
48
50
  className: "ttw:px-4 ttw:pb-4",
49
- children: _ === "loading" ? /* @__PURE__ */ p("div", {
50
- "data-testid": W?.loading,
51
+ children: _ === "loading" ? /* @__PURE__ */ u("div", {
52
+ "data-testid": B?.loading,
51
53
  role: "status",
52
- "aria-label": G.status.loadingAriaLabel,
54
+ "aria-label": V.status.loadingAriaLabel,
53
55
  className: "ttw:space-y-4",
54
- children: [/* @__PURE__ */ f(t, { className: "ttw:h-8 ttw:w-56" }), /* @__PURE__ */ f(t, { className: "ttw:h-64 ttw:w-full ttw:rounded-xl" })]
55
- }) : _ === "error" ? /* @__PURE__ */ f(ee, {
56
- title: G.status.errorTitle,
57
- description: G.status.errorDescription,
58
- retryLabel: G.status.errorRetry,
59
- onRetry: _e
60
- }) : _ === "notFound" ? /* @__PURE__ */ f(r, {
61
- icon: /* @__PURE__ */ f(m, { className: "ttw:size-6 ttw:text-muted-foreground" }),
62
- title: G.status.notFoundTitle,
63
- description: G.status.notFoundDescription
64
- }) : /* @__PURE__ */ p("div", {
56
+ children: [/* @__PURE__ */ l(t, { className: "ttw:h-8 ttw:w-56" }), /* @__PURE__ */ l(t, { className: "ttw:h-64 ttw:w-full ttw:rounded-xl" })]
57
+ }) : _ === "error" ? /* @__PURE__ */ l(r, {
58
+ title: V.status.errorTitle,
59
+ description: V.status.errorDescription,
60
+ retryLabel: V.status.errorRetry,
61
+ onRetry: Ce
62
+ }) : _ === "notFound" ? /* @__PURE__ */ l(ee, {
63
+ icon: /* @__PURE__ */ l(f, { className: "ttw:size-6 ttw:text-muted-foreground" }),
64
+ title: V.status.notFoundTitle,
65
+ description: V.status.notFoundDescription
66
+ }) : /* @__PURE__ */ u("div", {
65
67
  className: "ttw:flex ttw:flex-col ttw:gap-4",
66
- children: [/* @__PURE__ */ p("div", {
68
+ children: [/* @__PURE__ */ u("div", {
67
69
  className: "ttw:flex ttw:flex-col ttw:overflow-hidden ttw:rounded-xl ttw:border ttw:border-border ttw:sm:flex-row",
68
- children: [/* @__PURE__ */ f("div", {
70
+ children: [/* @__PURE__ */ l("div", {
69
71
  className: "ttw:flex ttw:items-center ttw:justify-center ttw:bg-muted ttw:px-4 ttw:py-5",
70
- children: /* @__PURE__ */ p("div", {
71
- className: n("ttw:flex ttw:flex-col ttw:gap-4", te),
72
- children: [I ? /* @__PURE__ */ f(l, {
73
- testIds: W?.cardFaceFlip,
72
+ children: /* @__PURE__ */ u("div", {
73
+ className: n("ttw:flex ttw:flex-col ttw:gap-4", ne),
74
+ children: [N ? /* @__PURE__ */ l(ie, {
75
+ testIds: B?.cardFaceFlip,
74
76
  isFlipped: Y,
75
77
  front: $,
76
- back: /* @__PURE__ */ f(c, {
77
- labels: G.credentials,
78
- cardNumber: z,
79
- expirationDate: he,
80
- securityCode: ge,
81
- isLocked: B,
82
- onCopy: D,
83
- testIds: W?.credentialsFace
78
+ back: /* @__PURE__ */ l(re, {
79
+ labels: V.credentials,
80
+ cardNumber: be,
81
+ expirationDate: xe,
82
+ securityCode: Se,
83
+ isLocked: I,
84
+ onCopy: w,
85
+ testIds: B?.credentialsFace
84
86
  })
85
- }) : $, F || I || Z ? /* @__PURE__ */ p("div", {
87
+ }) : $, M || N || Z ? /* @__PURE__ */ u("div", {
86
88
  className: "ttw:flex ttw:flex-col ttw:gap-2",
87
89
  children: [
88
- F ? /* @__PURE__ */ p(e, {
90
+ M ? /* @__PURE__ */ u(e, {
89
91
  type: "button",
90
92
  className: "ttw:self-center",
91
- onClick: F,
92
- children: [/* @__PURE__ */ f(se, {
93
+ onClick: M,
94
+ children: [/* @__PURE__ */ l(ce, {
93
95
  className: "ttw:size-4",
94
96
  "aria-hidden": "true"
95
- }), G.actions.activateCard]
97
+ }), V.actions.activateCard]
96
98
  }) : null,
97
- I || Z ? /* @__PURE__ */ p("div", {
99
+ N || Z ? /* @__PURE__ */ u("div", {
98
100
  className: "ttw:flex ttw:gap-2",
99
- children: [I ? /* @__PURE__ */ p(e, {
101
+ children: [N ? /* @__PURE__ */ u(e, {
100
102
  type: "button",
101
103
  variant: "outline",
102
104
  className: "ttw:flex-1",
103
105
  disabled: !X,
104
- loading: R === "revealing",
106
+ loading: F === "revealing",
105
107
  onClick: X,
106
- children: [f(Y ? ie : h, {
108
+ children: [l(Y ? m : p, {
107
109
  className: "ttw:size-4",
108
110
  "aria-hidden": "true"
109
- }), Y ? G.actions.hideCard : G.actions.viewCard]
110
- }) : null, Z ? /* @__PURE__ */ p(e, {
111
+ }), Y ? V.actions.hideCard : V.actions.viewCard]
112
+ }) : null, Z ? /* @__PURE__ */ u(e, {
111
113
  type: "button",
112
114
  variant: "outline",
113
115
  className: "ttw:flex-1",
114
116
  disabled: !Q,
115
- loading: V === "pending",
117
+ loading: L === "pending",
116
118
  onClick: Q,
117
- children: [f(B ? oe : ae, {
119
+ children: [l(I ? se : h, {
118
120
  className: "ttw:size-4",
119
121
  "aria-hidden": "true"
120
- }), B ? G.lock.unlockCard : G.lock.lockCard]
122
+ }), I ? V.lock.unlockCard : V.lock.lockCard]
121
123
  }) : null]
122
124
  }) : null,
123
- B ? /* @__PURE__ */ f("p", {
125
+ I ? /* @__PURE__ */ l("p", {
124
126
  className: "ttw:text-sm ttw:text-destructive",
125
- children: Z ? G.lock.lockedDescription : G.lock.lockedDescriptionWithoutUnlock
127
+ children: Z ? V.lock.lockedDescription : V.lock.lockedDescriptionWithoutUnlock
126
128
  }) : null,
127
- V === "errored" ? /* @__PURE__ */ f(i, { children: G.lock.errorDescription }) : null,
128
- R === "errored" ? /* @__PURE__ */ f(i, { children: G.credentials.errorDescription }) : null
129
+ L === "errored" ? /* @__PURE__ */ l(i, { children: V.lock.errorDescription }) : null,
130
+ F === "errored" ? /* @__PURE__ */ l(i, { children: V.credentials.errorDescription }) : null
129
131
  ]
130
132
  }) : null]
131
133
  })
132
- }), /* @__PURE__ */ p("div", {
134
+ }), /* @__PURE__ */ u("div", {
133
135
  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",
134
136
  children: [
135
- /* @__PURE__ */ f(o, {
136
- label: G.fields.cardholder,
137
- copyAriaLabel: y && D ? G.fields.copyCardholderAriaLabel : void 0,
138
- onCopy: y && D ? () => D(y) : void 0,
139
- children: y ?? G.fields.emptyValue
137
+ /* @__PURE__ */ l(o, {
138
+ label: V.fields.cardholder,
139
+ copyAriaLabel: y && w ? V.fields.copyCardholderAriaLabel : void 0,
140
+ onCopy: y && w ? () => w(y) : void 0,
141
+ children: y ?? V.fields.emptyValue
140
142
  }),
141
- C ? /* @__PURE__ */ f(o, {
142
- label: G.fields.billingAddress,
143
- copyAriaLabel: D ? G.fields.copyBillingAddressAriaLabel : void 0,
144
- onCopy: D ? () => D(C) : void 0,
145
- children: C
143
+ Te ? /* @__PURE__ */ l(o, {
144
+ label: V.fields.billingAddress,
145
+ children: /* @__PURE__ */ u("div", {
146
+ className: "ttw:flex ttw:flex-col",
147
+ children: [
148
+ H ? /* @__PURE__ */ l(c, {
149
+ value: H,
150
+ copyAriaLabel: w ? V.fields.copyBillingAddressLine1AriaLabel : void 0,
151
+ onCopy: w ? () => w(H) : void 0
152
+ }) : null,
153
+ U ? /* @__PURE__ */ l(c, {
154
+ value: U,
155
+ copyAriaLabel: w ? V.fields.copyBillingAddressLine2AriaLabel : void 0,
156
+ onCopy: w ? () => w(U) : void 0
157
+ }) : null,
158
+ W ? /* @__PURE__ */ l(c, {
159
+ value: W,
160
+ copyAriaLabel: w ? V.fields.copyBillingAddressCityStateAriaLabel : void 0,
161
+ onCopy: w ? () => w(W) : void 0
162
+ }) : null,
163
+ G ? /* @__PURE__ */ l(c, {
164
+ value: G,
165
+ copyAriaLabel: w ? V.fields.copyBillingAddressPostalCodeAriaLabel : void 0,
166
+ onCopy: w ? () => w(G) : void 0
167
+ }) : null
168
+ ]
169
+ })
146
170
  }) : null,
147
- /* @__PURE__ */ f(u, {
148
- fieldLabels: G.fields,
149
- labels: G.nickname,
171
+ /* @__PURE__ */ l(ae, {
172
+ fieldLabels: V.fields,
173
+ labels: V.nickname,
150
174
  nickname: v,
151
- editState: k,
152
- onEdit: O,
153
- draft: A,
154
- onDraftChange: j,
155
- onSave: M,
156
- onCancel: N,
157
- isSaveDisabled: P,
158
- copyAriaLabel: v && D ? G.fields.copyNicknameAriaLabel : void 0,
159
- onCopy: v && D ? () => D(v) : void 0,
175
+ editState: E,
176
+ onEdit: T,
177
+ draft: D,
178
+ onDraftChange: O,
179
+ onSave: k,
180
+ onCancel: A,
181
+ isSaveDisabled: j,
182
+ copyAriaLabel: v && w ? V.fields.copyNicknameAriaLabel : void 0,
183
+ onCopy: v && w ? () => w(v) : void 0,
160
184
  isLast: !0
161
185
  })
162
186
  ]
163
187
  })]
164
- }), K || q || J ? /* @__PURE__ */ p("div", {
188
+ }), K || q || J ? /* @__PURE__ */ u("div", {
165
189
  className: "ttw:flex ttw:flex-col ttw:overflow-hidden ttw:rounded-xl ttw:border ttw:border-border",
166
190
  children: [
167
- /* @__PURE__ */ f("h3", {
191
+ /* @__PURE__ */ l("h3", {
168
192
  className: "ttw:border-b ttw:border-border ttw:px-4 ttw:pt-4 ttw:pb-3 ttw:text-base ttw:font-semibold ttw:text-foreground",
169
- children: G.fields.cardControlsHeading
193
+ children: V.fields.cardControlsHeading
170
194
  }),
171
- K ? /* @__PURE__ */ f(o, {
172
- label: G.fields.allowedCategories,
195
+ K ? /* @__PURE__ */ l(o, {
196
+ label: V.fields.allowedCategories,
173
197
  isLast: !q && !J,
174
- children: /* @__PURE__ */ f("div", {
198
+ children: /* @__PURE__ */ l("div", {
175
199
  className: "ttw:mt-2 ttw:flex ttw:flex-wrap ttw:gap-2",
176
- children: w?.map((e) => /* @__PURE__ */ p("span", {
200
+ children: x?.map((e) => /* @__PURE__ */ u("span", {
177
201
  className: "ttw:inline-flex ttw:items-center ttw:gap-1.5 ttw:rounded-full ttw:border ttw:border-primary ttw:bg-primary/5 ttw:px-4 ttw:py-2 ttw:text-sm ttw:font-semibold ttw:text-primary",
178
- children: [/* @__PURE__ */ f(re, {
202
+ children: [/* @__PURE__ */ l(d, {
179
203
  "aria-hidden": "true",
180
204
  className: "ttw:size-3.5"
181
205
  }), e]
182
206
  }, e))
183
207
  })
184
208
  }) : null,
185
- q ? /* @__PURE__ */ f(o, {
186
- label: G.fields.spendLimit,
209
+ q ? /* @__PURE__ */ l(o, {
210
+ label: V.fields.spendLimit,
187
211
  isLast: !J,
188
- children: /* @__PURE__ */ f("div", {
212
+ children: /* @__PURE__ */ l("div", {
189
213
  className: "ttw:flex ttw:flex-col ttw:gap-1",
190
- children: T?.map((e, t) => /* @__PURE__ */ f("div", { children: e }, `${e}-${t}`))
214
+ children: S?.map((e, t) => /* @__PURE__ */ l("div", { children: e }, `${e}-${t}`))
191
215
  })
192
216
  }) : null,
193
- J ? /* @__PURE__ */ f(o, {
194
- label: G.fields.perTransactionMax,
217
+ J ? /* @__PURE__ */ l(o, {
218
+ label: V.fields.perTransactionMax,
195
219
  isLast: !0,
196
- children: E
220
+ children: C
197
221
  }) : null
198
222
  ]
199
223
  }) : null]
@@ -4,32 +4,42 @@ import { CardFaceGlow as r } from "./CardFaceGlow.js";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  import { LockIcon as o } from "lucide-react";
6
6
  //#region ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardFace.js
7
- function s({ bankLogoSrc: s, bankLogoAlt: c, cardholderName: l, maskedCardNumber: u, programLabel: d, statusLabel: f, isLocked: p, lockedLabel: m, testIds: h, className: g }) {
7
+ function s({ cardArtSrc: s, bankLogoSrc: c, bankLogoAlt: l, cardholderName: u, maskedCardNumber: d, programLabel: f, statusLabel: p, isLocked: m, lockedLabel: h, testIds: g, className: _ }) {
8
8
  return /* @__PURE__ */ a("div", {
9
- "data-testid": h?.root,
10
- className: e(n, "ttw:justify-between", g),
9
+ "data-testid": g?.root,
10
+ className: e(n, "ttw:justify-between", _),
11
11
  children: [
12
- /* @__PURE__ */ i(r, {}),
13
12
  s ? /* @__PURE__ */ i("img", {
13
+ "data-testid": g?.cardArt,
14
14
  src: s,
15
- alt: c,
15
+ alt: "",
16
+ "aria-hidden": "true",
17
+ className: "ttw:absolute ttw:inset-0 ttw:h-full ttw:w-full ttw:object-cover"
18
+ }) : /* @__PURE__ */ i(r, {}),
19
+ s ? /* @__PURE__ */ i("div", {
20
+ "aria-hidden": "true",
21
+ className: "ttw:pointer-events-none ttw:absolute ttw:inset-x-0 ttw:bottom-0 ttw:h-20 ttw:bg-gradient-to-t ttw:from-black/70 ttw:to-transparent"
22
+ }) : null,
23
+ s ? /* @__PURE__ */ i("span", { className: "ttw:relative ttw:h-8" }) : c ? /* @__PURE__ */ i("img", {
24
+ src: c,
25
+ alt: l,
16
26
  className: "ttw:relative ttw:h-8 ttw:w-auto ttw:max-w-[60%] ttw:object-contain ttw:object-left"
17
27
  }) : /* @__PURE__ */ i("span", { className: "ttw:relative ttw:h-8" }),
18
- p ? /* @__PURE__ */ i("div", {
19
- "data-testid": h?.lockedOverlay,
28
+ m ? /* @__PURE__ */ i("div", {
29
+ "data-testid": g?.lockedOverlay,
20
30
  className: "ttw:pointer-events-none ttw:absolute ttw:inset-0 ttw:flex ttw:items-center ttw:justify-center ttw:bg-black/55",
21
- children: m ? /* @__PURE__ */ a("span", {
31
+ children: h ? /* @__PURE__ */ a("span", {
22
32
  className: e(t, "ttw:inline-flex ttw:items-center ttw:gap-1.5"),
23
33
  children: [/* @__PURE__ */ i(o, {
24
34
  className: "ttw:size-3.5",
25
35
  "aria-hidden": "true"
26
- }), m]
36
+ }), h]
27
37
  }) : null
28
- }) : f ? /* @__PURE__ */ i("div", {
38
+ }) : p ? /* @__PURE__ */ i("div", {
29
39
  className: "ttw:pointer-events-none ttw:absolute ttw:inset-0 ttw:flex ttw:items-center ttw:justify-center",
30
40
  children: /* @__PURE__ */ i("span", {
31
41
  className: t,
32
- children: f
42
+ children: p
33
43
  })
34
44
  }) : null,
35
45
  /* @__PURE__ */ a("div", {
@@ -38,14 +48,14 @@ function s({ bankLogoSrc: s, bankLogoAlt: c, cardholderName: l, maskedCardNumber
38
48
  className: "ttw:min-w-0",
39
49
  children: [/* @__PURE__ */ i("p", {
40
50
  className: "ttw:truncate ttw:text-base ttw:font-medium ttw:text-white",
41
- children: l
51
+ children: u
42
52
  }), /* @__PURE__ */ i("p", {
43
53
  className: "ttw:mt-1 ttw:truncate ttw:text-lg ttw:tracking-wide ttw:text-white/90",
44
- children: u
54
+ children: d
45
55
  })]
46
56
  }), /* @__PURE__ */ i("p", {
47
57
  className: "ttw:shrink-0 ttw:text-[10px] ttw:font-medium ttw:text-white/90",
48
- children: d
58
+ children: f
49
59
  })]
50
60
  })
51
61
  ]
@@ -17,7 +17,10 @@ var e = {
17
17
  emptyValue: "—",
18
18
  copyCardholderAriaLabel: "Copy cardholder",
19
19
  copyNicknameAriaLabel: "Copy nickname",
20
- copyBillingAddressAriaLabel: "Copy billing address"
20
+ copyBillingAddressLine1AriaLabel: "Copy street address 1",
21
+ copyBillingAddressLine2AriaLabel: "Copy street address 2",
22
+ copyBillingAddressCityStateAriaLabel: "Copy city and state",
23
+ copyBillingAddressPostalCodeAriaLabel: "Copy ZIP code"
21
24
  },
22
25
  actions: {
23
26
  activateCard: "Activate card",
@@ -66,6 +66,7 @@ function g({ cardProgram: e, pagination: t, defaultPagination: g, onPaginationCh
66
66
  labels: C,
67
67
  activateLabels: T,
68
68
  featureLabels: w,
69
+ cardArtSrc: O,
69
70
  bankLogoSrc: E,
70
71
  bankLogoAlt: D,
71
72
  onClose: Y