@tesouro/embedded-components-react 0.4.2 → 0.4.5

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 (47) hide show
  1. package/README.md +10 -10
  2. package/dist/index.css +3 -0
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +8 -8
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +50 -29
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +39 -30
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +26 -311
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +326 -12
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +13 -27
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +28 -245
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +256 -92
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +86 -73
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +77 -14
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +18 -63
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +2 -2
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +2 -6
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +2 -2
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +2 -1
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +4 -3
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -1
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +2 -2
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +1 -1
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +2 -1
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +0 -1
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +15 -9
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +7 -5
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +1 -1
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +32 -27
  43. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +141 -138
  44. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +39 -38
  45. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js +33 -21
  46. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  47. package/package.json +1 -1
@@ -17,187 +17,190 @@ import { CardProgramValidity as m, resolveCanRevealCredentials as h, resolveCard
17
17
  import { activateCardPanelTestIds as ie, cardDetailsPanelTestIds as ae } from "./index6.js";
18
18
  import { useCreditCardDetailsQuery as oe } from "../../data-access/dist/index6.js";
19
19
  import { useDebitCardCredentialsQuery as se } from "../../data-access/dist/index7.js";
20
- import { useDebitCardDetailsQuery as ce } from "../../data-access/dist/index8.js";
20
+ import { useDebitCardDetailsQuery as g } from "../../data-access/dist/index8.js";
21
21
  import "../../data-access/dist/index.js";
22
- import { CardDetailsPanel as le } from "../../ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js";
23
- import { ActivateCardPanel as g } from "../../ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js";
22
+ import { CardDetailsPanel as ce } from "../../ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js";
23
+ import { ActivateCardPanel as le } from "../../ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js";
24
24
  import "../../ui/dist/index.js";
25
25
  import { useActivateCard as ue } from "./index9.js";
26
- import { useCardLock as _ } from "./index11.js";
27
- import { useEditCardNickname as de } from "./index12.js";
28
- import { useCallback as v, useEffect as y, useMemo as b, useState as x } from "react";
29
- import { Fragment as fe, jsx as S, jsxs as pe } from "react/jsx-runtime";
26
+ import { useCardLock as de } from "./index11.js";
27
+ import { useEditCardNickname as fe } from "./index12.js";
28
+ import { useCallback as _, useEffect as v, useMemo as y, useState as pe } from "react";
29
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
30
30
  //#region ../../libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js
31
- function C({ cardId: r, cardProgram: u, onClose: C, labels: w, activateLabels: T, featureLabels: E, bankLogoSrc: D, bankLogoAlt: O }) {
32
- let k = n(), A = o(), j = i(), { initResponse: M } = a();
33
- y(() => {
34
- k(l.Mounted);
35
- }, [k]);
36
- let N = b(() => c(E), [E]), P = re(u), F = u === s.Credit, I = u === s.Debit, L = oe({
31
+ function C({ cardId: r, cardProgram: u, onClose: C, labels: w, activateLabels: me, featureLabels: T, bankLogoSrc: E, bankLogoAlt: D }) {
32
+ let O = n(), k = o(), A = i(), { initResponse: j } = a();
33
+ v(() => {
34
+ O(l.Mounted);
35
+ }, [O]);
36
+ let M = y(() => c(T), [T]), N = re(u), P = u === s.Credit, F = u === s.Debit, I = oe({
37
37
  cardId: r,
38
- enabled: F
39
- }), R = ce({
38
+ enabled: P
39
+ }), L = g({
40
40
  cardId: r,
41
- enabled: I
42
- }), { data: z, isError: me, isNotFound: he, refetch: B } = F ? L : R, V = ee({
43
- programValidity: P,
44
- isNotFound: he,
45
- isError: !!A || me,
46
- hasCard: !!z
41
+ enabled: F
42
+ }), { data: R, isError: he, isNotFound: ge, refetch: z } = P ? I : L, B = ee({
43
+ programValidity: N,
44
+ isNotFound: ge,
45
+ isError: !!k || he,
46
+ hasCard: !!R
47
47
  });
48
- y(() => {
49
- if (P === m.Supported) return;
48
+ v(() => {
49
+ if (N === m.Supported) return;
50
50
  let e = `"${s.Credit}" or "${s.Debit}"`;
51
- console.error(P === m.Missing ? `[CardDetailsWidget] cardProgram is required and was not set. Pass ${e} — it selects which card program to read, so there is no default. No card was fetched.` : `[CardDetailsWidget] cardProgram must be ${e}, received ${JSON.stringify(u)}. No card was fetched.`);
52
- }, [u, P]);
53
- let [ge, H] = x(), U = ge === r;
54
- y(() => {
55
- H(void 0);
51
+ console.error(N === m.Missing ? `[CardDetailsWidget] cardProgram is required and was not set. Pass ${e} — it selects which card program to read, so there is no default. No card was fetched.` : `[CardDetailsWidget] cardProgram must be ${e}, received ${JSON.stringify(u)}. No card was fetched.`);
52
+ }, [u, N]);
53
+ let [_e, V] = pe(), H = _e === r;
54
+ v(() => {
55
+ V(void 0);
56
56
  }, [r]);
57
- let W = h({
58
- panelState: V,
57
+ let U = h({
58
+ panelState: B,
59
59
  cardProgram: u,
60
- cardStatus: z?.cardStatus
60
+ cardStatus: R?.cardStatus
61
61
  });
62
- y(() => {
63
- U && !W && H(void 0);
64
- }, [U, W]);
65
- let G = se({
62
+ v(() => {
63
+ H && !U && V(void 0);
64
+ }, [H, U]);
65
+ let W = se({
66
66
  cardId: r,
67
- enabled: W && U
68
- }), K = ne({
69
- isRevealRequested: U,
70
- isError: G.isError,
71
- hasCredentials: !!G.data
72
- }), q = b(() => V === "loaded" && z ? te({
73
- card: z,
67
+ enabled: U && H
68
+ }), G = ne({
69
+ isRevealRequested: H,
70
+ isError: W.isError,
71
+ hasCredentials: !!W.data
72
+ }), K = y(() => B === "loaded" && R ? te({
73
+ card: R,
74
74
  cardProgram: u,
75
- labels: N
75
+ labels: M
76
76
  }) : void 0, [
77
- z,
77
+ R,
78
78
  u,
79
- N,
80
- V
81
- ]), _e = v(async (t) => {
82
- await d(t) && (e.success(N.copySuccessToast), k(l.ValueCopied));
83
- }, [N.copySuccessToast, k]), J = V === "loaded" ? z : void 0, Y = ue({
79
+ M,
80
+ B
81
+ ]), ve = _(async (t) => {
82
+ await d(t) && (e.success(M.copySuccessToast), O(l.ValueCopied));
83
+ }, [M.copySuccessToast, O]), q = B === "loaded" ? R : void 0, J = ue({
84
84
  cardId: r,
85
85
  cardProgram: u,
86
- card: J,
87
- scopes: M?.scopes,
88
- conflictToast: N.activationConflictToast
89
- }), X = _({
86
+ card: q,
87
+ scopes: j?.scopes,
88
+ conflictToast: M.activationConflictToast
89
+ }), Y = de({
90
90
  cardId: r,
91
91
  cardProgram: u,
92
- card: J,
93
- scopes: M?.scopes,
94
- conflictToast: N.lockConflictToast
95
- }), Z = de({
92
+ card: q,
93
+ scopes: j?.scopes,
94
+ conflictToast: M.lockConflictToast
95
+ }), X = fe({
96
96
  cardId: r,
97
97
  cardProgram: u,
98
- card: J,
99
- nickname: q?.nickname,
100
- scopes: M?.scopes,
101
- conflictToast: N.nicknameConflictToast,
102
- successToast: N.nicknameUpdatedToast
103
- }), { refetch: Q } = G, ve = v(() => {
104
- if (U) {
105
- Q();
98
+ card: q,
99
+ nickname: K?.nickname,
100
+ scopes: j?.scopes,
101
+ conflictToast: M.nicknameConflictToast,
102
+ successToast: M.nicknameUpdatedToast
103
+ }), { refetch: Z } = W, ye = _(() => {
104
+ if (H) {
105
+ Z();
106
106
  return;
107
107
  }
108
- H(r);
108
+ V(r);
109
109
  }, [
110
110
  r,
111
- U,
112
- Q
113
- ]), ye = v(() => {
114
- H(void 0);
115
- }, []), be = v(() => {
116
- H(void 0), C?.();
117
- }, [C]), xe = b(() => G.isForbidden ? {
111
+ H,
112
+ Z
113
+ ]), be = _(() => {
114
+ V(void 0);
115
+ }, []), Q = _(() => {
116
+ V(void 0), C?.();
117
+ }, [C]), xe = _(() => {
118
+ J.close(), Q();
119
+ }, [J.close, Q]), Se = y(() => W.isForbidden ? {
118
120
  ...w,
119
121
  credentials: {
120
122
  ...w?.credentials,
121
- errorDescription: N.revealNotPermittedDescription
123
+ errorDescription: M.revealNotPermittedDescription
122
124
  }
123
125
  } : w, [
124
- G.isForbidden,
126
+ W.isForbidden,
125
127
  w,
126
- N.revealNotPermittedDescription
127
- ]), $ = b(() => {
128
- if (!(K !== "revealed" || !G.data)) return {
129
- cardNumber: f(G.data.pan),
130
- expirationDate: p(G.data.expirationDate),
131
- securityCode: G.data.cvv
128
+ M.revealNotPermittedDescription
129
+ ]), $ = y(() => {
130
+ if (!(G !== "revealed" || !W.data)) return {
131
+ cardNumber: f(W.data.pan),
132
+ expirationDate: p(W.data.expirationDate),
133
+ securityCode: W.data.cvv
132
134
  };
133
- }, [G.data, K]), Se = v(() => {
134
- if (A) {
135
- j();
135
+ }, [W.data, G]), Ce = _(() => {
136
+ if (k) {
137
+ A();
136
138
  return;
137
139
  }
138
- B();
140
+ z();
139
141
  }, [
140
- B,
141
- j,
142
- A
142
+ z,
143
+ A,
144
+ k
143
145
  ]);
144
- return /* @__PURE__ */ pe(fe, { children: [/* @__PURE__ */ S(t, {}), Y.isOpen ? /* @__PURE__ */ S(g, {
146
+ return /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(t, {}), J.isOpen ? /* @__PURE__ */ x(le, {
145
147
  testIds: ie,
146
- labels: T,
147
- state: Y.state,
148
- values: Y.values,
149
- errors: Y.errors,
150
- isSubmitDisabled: Y.isSubmitDisabled,
151
- onValuesChange: Y.onValuesChange,
152
- onSubmit: Y.onSubmit,
153
- onClose: Y.close,
154
- bankLogoSrc: D,
155
- bankLogoAlt: O,
156
- cardholderName: q?.cardholderName,
157
- maskedCardNumber: q?.maskedCardNumber,
158
- programLabel: q?.programLabel
159
- }) : /* @__PURE__ */ S(le, {
148
+ labels: me,
149
+ state: J.state,
150
+ values: J.values,
151
+ errors: J.errors,
152
+ isSubmitDisabled: J.isSubmitDisabled,
153
+ onValuesChange: J.onValuesChange,
154
+ onSubmit: J.onSubmit,
155
+ onClose: J.close,
156
+ onDone: C ? xe : void 0,
157
+ bankLogoSrc: E,
158
+ bankLogoAlt: D,
159
+ cardholderName: K?.cardholderName,
160
+ maskedCardNumber: K?.maskedCardNumber,
161
+ programLabel: K?.programLabel
162
+ }) : /* @__PURE__ */ x(ce, {
160
163
  testIds: ae,
161
- labels: xe,
162
- state: V,
163
- nickname: q?.nickname,
164
- statusLabel: q?.statusLabel,
165
- statusTone: q?.statusTone,
166
- formFactorLabel: q?.formFactorLabel,
167
- onClose: C ? be : void 0,
168
- bankLogoSrc: D,
169
- bankLogoAlt: O,
170
- cardholderName: q?.cardholderName,
171
- maskedCardNumber: q?.maskedCardNumber,
172
- programLabel: q?.programLabel,
173
- billingAddress: q?.billingAddress,
174
- allowedCategories: q?.allowedCategories,
175
- spendLimitLabels: q?.spendLimitLabels,
176
- perTransactionMaxLabel: q?.perTransactionMaxLabel,
177
- onCopy: _e,
178
- onEditNickname: Z.onEditNickname,
179
- nicknameEditState: Z.editState,
180
- nicknameDraft: Z.draft,
181
- onNicknameDraftChange: Z.onDraftChange,
182
- onSaveNickname: Z.onSave,
183
- onCancelNicknameEdit: Z.onCancel,
184
- isNicknameSaveDisabled: Z.isSaveDisabled,
185
- onActivate: Y.canActivate ? Y.open : void 0,
186
- onViewCard: W ? ve : void 0,
187
- onHideCard: W ? ye : void 0,
188
- revealState: K,
164
+ labels: Se,
165
+ state: B,
166
+ nickname: K?.nickname,
167
+ statusLabel: K?.statusLabel,
168
+ statusTone: K?.statusTone,
169
+ formFactorLabel: K?.formFactorLabel,
170
+ onClose: C ? Q : void 0,
171
+ bankLogoSrc: E,
172
+ bankLogoAlt: D,
173
+ cardholderName: K?.cardholderName,
174
+ maskedCardNumber: K?.maskedCardNumber,
175
+ programLabel: K?.programLabel,
176
+ billingAddress: K?.billingAddress,
177
+ allowedCategories: K?.allowedCategories,
178
+ spendLimitLabels: K?.spendLimitLabels,
179
+ perTransactionMaxLabel: K?.perTransactionMaxLabel,
180
+ onCopy: ve,
181
+ onEditNickname: X.onEditNickname,
182
+ nicknameEditState: X.editState,
183
+ nicknameDraft: X.draft,
184
+ onNicknameDraftChange: X.onDraftChange,
185
+ onSaveNickname: X.onSave,
186
+ onCancelNicknameEdit: X.onCancel,
187
+ isNicknameSaveDisabled: X.isSaveDisabled,
188
+ onActivate: J.canActivate ? J.open : void 0,
189
+ onViewCard: U ? ye : void 0,
190
+ onHideCard: U ? be : void 0,
191
+ revealState: G,
189
192
  revealedCardNumber: $?.cardNumber,
190
193
  revealedExpirationDate: $?.expirationDate,
191
194
  revealedSecurityCode: $?.securityCode,
192
- isLocked: X.isLocked,
193
- lockState: X.lockState,
194
- onLockCard: X.onLockCard,
195
- onUnlockCard: X.onUnlockCard,
196
- onRetry: P === m.Supported ? Se : void 0
195
+ isLocked: Y.isLocked,
196
+ lockState: Y.lockState,
197
+ onLockCard: Y.onLockCard,
198
+ onUnlockCard: Y.onUnlockCard,
199
+ onRetry: N === m.Supported ? Ce : void 0
197
200
  })] });
198
201
  }
199
202
  function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
200
- return /* @__PURE__ */ S(r, {
203
+ return /* @__PURE__ */ x(r, {
201
204
  widgetName: u,
202
205
  baseUrl: e,
203
206
  widgetToken: t,
@@ -212,7 +215,7 @@ function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gat
212
215
  analytics: f,
213
216
  disclosuresAcceptance: p,
214
217
  providerLabels: m,
215
- children: /* @__PURE__ */ S(C, { ...h })
218
+ children: /* @__PURE__ */ x(C, { ...h })
216
219
  });
217
220
  }
218
221
  //#endregion
@@ -23,68 +23,69 @@ 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, bankLogoSrc: F, bankLogoAlt: I, cardholderName: L, maskedCardNumber: R, programLabel: z, testIds: B, className: V }) {
27
- let H = x(() => f(p), [p]), U = b(), W = b(), G = b(), K = b(), q = m === "submitting", J = O(j.expirationDate, H.validation), Y = O(j.form, H.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, 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);
28
28
  return /* @__PURE__ */ C("div", {
29
- "data-testid": B?.root,
30
- className: l("ttw:flex ttw:w-full ttw:flex-col", V),
29
+ "data-testid": V?.root,
30
+ className: l("ttw:flex ttw:w-full ttw:flex-col", H),
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: H.header.title
35
+ children: U.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": H.header.closeAriaLabel,
41
+ "aria-label": U.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: H.status,
47
- testIds: B?.successView
46
+ labels: U.status,
47
+ onDone: F,
48
+ testIds: V?.successView
48
49
  }) : /* @__PURE__ */ C("form", {
49
50
  noValidate: !0,
50
51
  onSubmit: (e) => {
51
- e.preventDefault(), !(M || q) && N?.();
52
+ e.preventDefault(), !(M || J) && N?.();
52
53
  },
53
54
  className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-4 ttw:pb-4",
54
55
  children: [
55
56
  /* @__PURE__ */ S("div", {
56
57
  className: "ttw:flex ttw:justify-center",
57
58
  children: /* @__PURE__ */ S(d, {
58
- bankLogoSrc: F,
59
- bankLogoAlt: I ?? H.cardFace.bankLogoAlt,
60
- cardholderName: L ?? "",
61
- maskedCardNumber: R ?? "",
62
- programLabel: z ?? "",
63
- testIds: B?.cardFace
59
+ bankLogoSrc: I,
60
+ bankLogoAlt: L ?? U.cardFace.bankLogoAlt,
61
+ cardholderName: R ?? "",
62
+ maskedCardNumber: z ?? "",
63
+ programLabel: B ?? "",
64
+ testIds: V?.cardFace
64
65
  })
65
66
  }),
66
67
  /* @__PURE__ */ C("div", {
67
68
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
68
69
  children: [
69
70
  /* @__PURE__ */ S(n, {
70
- htmlFor: U,
71
+ htmlFor: W,
71
72
  className: "ttw:text-sm ttw:font-medium",
72
- children: H.fields.expirationDate
73
+ children: U.fields.expirationDate
73
74
  }),
74
75
  /* @__PURE__ */ S(t, {
75
- id: U,
76
+ id: W,
76
77
  value: k.expirationDate,
77
- placeholder: H.fields.expirationDatePlaceholder,
78
- disabled: q,
78
+ placeholder: U.fields.expirationDatePlaceholder,
79
+ disabled: J,
79
80
  inputMode: "numeric",
80
81
  autoComplete: "off",
81
- "aria-invalid": J ? !0 : void 0,
82
- "aria-describedby": J ? W : void 0,
82
+ "aria-invalid": Y ? !0 : void 0,
83
+ "aria-describedby": Y ? G : void 0,
83
84
  onChange: (e) => A?.({ expirationDate: _(e.target.value) })
84
85
  }),
85
86
  /* @__PURE__ */ S(y, {
86
- id: W,
87
- message: J
87
+ id: G,
88
+ message: Y
88
89
  })
89
90
  ]
90
91
  }),
@@ -94,46 +95,46 @@ function k({ labels: p, state: m = "idle", values: k = h, onValuesChange: A, err
94
95
  /* @__PURE__ */ C("div", {
95
96
  className: "ttw:flex ttw:items-center ttw:gap-1.5",
96
97
  children: [/* @__PURE__ */ S(n, {
97
- htmlFor: G,
98
+ htmlFor: K,
98
99
  className: "ttw:text-sm ttw:font-medium",
99
- children: H.fields.securityCode
100
+ children: U.fields.securityCode
100
101
  }), /* @__PURE__ */ S(s, { children: /* @__PURE__ */ C(a, { children: [/* @__PURE__ */ S(c, {
101
102
  type: "button",
102
103
  className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-help ttw:text-muted-foreground",
103
- "aria-label": H.fields.securityCodeInfoAriaLabel,
104
+ "aria-label": U.fields.securityCodeInfoAriaLabel,
104
105
  children: /* @__PURE__ */ S(T, { className: "ttw:size-4" })
105
106
  }), /* @__PURE__ */ S(o, {
106
107
  className: "ttw:max-w-xs",
107
- children: H.fields.securityCodeInfo
108
+ children: U.fields.securityCodeInfo
108
109
  })] }) })]
109
110
  }),
110
111
  /* @__PURE__ */ S(t, {
111
- id: G,
112
+ id: K,
112
113
  value: k.securityCode,
113
- placeholder: H.fields.securityCodePlaceholder,
114
- "aria-describedby": K,
115
- disabled: q,
114
+ placeholder: U.fields.securityCodePlaceholder,
115
+ "aria-describedby": q,
116
+ disabled: J,
116
117
  inputMode: "numeric",
117
118
  autoComplete: "off",
118
119
  maxLength: 4,
119
120
  onChange: (e) => A?.({ securityCode: g(e.target.value, 4) })
120
121
  }),
121
122
  /* @__PURE__ */ S("span", {
122
- id: K,
123
+ id: q,
123
124
  className: "ttw:sr-only",
124
- children: H.fields.securityCodeInfo
125
+ children: U.fields.securityCodeInfo
125
126
  })
126
127
  ]
127
128
  }),
128
129
  /* @__PURE__ */ S(r, {}),
129
- m === "errored" || Y ? /* @__PURE__ */ S(u, { children: Y ?? H.status.errorDescription }) : null,
130
+ m === "errored" || X ? /* @__PURE__ */ S(u, { children: X ?? U.status.errorDescription }) : null,
130
131
  /* @__PURE__ */ C(e, {
131
132
  type: "submit",
132
133
  className: "ttw:w-full",
133
- disabled: M || q,
134
+ disabled: M || J,
134
135
  children: [
135
- q ? /* @__PURE__ */ S(i, { "aria-label": H.status.submittingAriaLabel }) : null,
136
- H.status.submit,
136
+ J ? /* @__PURE__ */ S(i, { "aria-label": U.status.submittingAriaLabel }) : null,
137
+ U.status.submit,
137
138
  /* @__PURE__ */ S(w, { className: "ttw:size-4" })
138
139
  ]
139
140
  })
@@ -1,26 +1,38 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { CheckIcon as n } from "lucide-react";
1
+ import { Button as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { CheckIcon as r, ChevronRightIcon as i } from "lucide-react";
3
4
  //#region ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js
4
- function r({ labels: r, testIds: i }) {
5
- return /* @__PURE__ */ t("div", {
6
- "data-testid": i?.root,
7
- className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-3 ttw:px-4 ttw:py-10 ttw:text-center",
8
- children: [
9
- /* @__PURE__ */ e("div", {
10
- "aria-hidden": "true",
11
- className: "ttw:flex ttw:size-10 ttw:items-center ttw:justify-center ttw:rounded-lg ttw:bg-emerald-700 ttw:text-white",
12
- children: /* @__PURE__ */ e(n, { className: "ttw:size-5" })
13
- }),
14
- /* @__PURE__ */ e("h3", {
15
- className: "ttw:text-lg ttw:font-semibold ttw:text-foreground",
16
- children: r.successTitle
17
- }),
18
- /* @__PURE__ */ e("p", {
19
- className: "ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground",
20
- children: r.successDescription
5
+ function a({ labels: a, onDone: o, testIds: s }) {
6
+ return /* @__PURE__ */ n("div", {
7
+ "data-testid": s?.root,
8
+ className: "ttw:flex ttw:flex-col",
9
+ children: [/* @__PURE__ */ n("div", {
10
+ className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-3 ttw:px-4 ttw:pt-10 ttw:pb-8 ttw:text-center",
11
+ children: [
12
+ /* @__PURE__ */ t("div", {
13
+ "aria-hidden": "true",
14
+ className: "ttw:flex ttw:size-10 ttw:items-center ttw:justify-center ttw:rounded-lg ttw:bg-emerald-700 ttw:text-white",
15
+ children: /* @__PURE__ */ t(r, { className: "ttw:size-5" })
16
+ }),
17
+ /* @__PURE__ */ t("h3", {
18
+ className: "ttw:text-lg ttw:font-semibold ttw:text-foreground",
19
+ children: a.successTitle
20
+ }),
21
+ /* @__PURE__ */ t("p", {
22
+ className: "ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground",
23
+ children: a.successDescription
24
+ })
25
+ ]
26
+ }), o ? /* @__PURE__ */ t("div", {
27
+ className: "ttw:px-4 ttw:pb-4",
28
+ children: /* @__PURE__ */ n(e, {
29
+ type: "button",
30
+ className: "ttw:w-full",
31
+ onClick: o,
32
+ children: [a.done, /* @__PURE__ */ t(i, { className: "ttw:size-4" })]
21
33
  })
22
- ]
34
+ }) : null]
23
35
  });
24
36
  }
25
37
  //#endregion
26
- export { r as ActivateCardSuccessView };
38
+ export { a as ActivateCardSuccessView };
@@ -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.4.2", n = "b5c0715badbc2d73da1808cfb5ede10d33b6d51f", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.4.5", n = "8e167254e3d8cfa7777a923bbd458c5f8aea8ab0", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.4.2",
3
+ "version": "0.4.5",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {