@tesouro/embedded-components-react 0.5.181 → 0.5.183

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 (41) hide show
  1. package/README.md +32 -32
  2. package/dist/index.css +6 -0
  3. package/dist/index.d.ts +48 -20
  4. package/dist/index.js +2 -2
  5. package/dist/lib/BankAccountOnboardingWidget.d.ts +30 -1
  6. package/dist/lib/CreditCardsWidget.d.ts +9 -11
  7. package/dist/lib/CreditCardsWidget.js +1 -1
  8. package/dist/lib/DebitCardsWidget.d.ts +14 -15
  9. package/dist/lib/DebitCardsWidget.js +1 -1
  10. package/dist/lib/WidgetSuite.d.ts +43 -16
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index.js +5 -4
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index10.js +3 -32
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index11.js +24 -33
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index12.js +44 -0
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index8.js +13 -36
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index9.js +43 -3
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +4 -0
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +3 -0
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index25.js +339 -301
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +3 -1
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +11 -0
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +64 -0
  23. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index.js +4 -4
  24. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index10.js +87 -8
  25. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index11.js +3 -3
  26. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index12.js +17 -0
  27. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index4.js +17 -24
  28. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index5.js +23 -24
  29. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index6.js +24 -30
  30. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +28 -55
  31. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +53 -222
  32. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +219 -87
  33. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +34 -34
  34. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +188 -181
  35. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +162 -154
  36. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  37. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +67 -55
  38. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js +1 -0
  39. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +3 -3
  40. package/package.json +1 -1
  41. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js +0 -19
@@ -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.5.181", n = "ce2f6c5170bf0f6ef337971adcf7467d4d5c2baf", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.183", n = "9fb07b1082882df49077ff74f82900a73ef96881", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -1,52 +1,60 @@
1
- import { Button as e, Dialog as t, DialogClose as n, DialogContent as r, DialogDescription as i, DialogTitle as a, Separator as o } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { InlineErrorAlert as s } from "../InlineErrorAlert/InlineErrorAlert.js";
3
- import { ONBOARDING_SHELL_LABELS_EN as c } from "./labels.js";
4
- import { OnboardingShellStepper as l } from "./OnboardingShellStepper.js";
5
- import { OnboardingShellOverlayContainerContext as u } from "./OnboardingShellOverlayPortal.js";
6
- import { FdicLogo as d } from "./FdicLogo.js";
1
+ import { Button as e, Dialog as t, DialogClose as n, DialogContent as r, DialogDescription as i, DialogTitle as a, Separator as o, cn as s } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { InlineErrorAlert as c } from "../InlineErrorAlert/InlineErrorAlert.js";
3
+ import { ONBOARDING_SHELL_LABELS_EN as l } from "./labels.js";
4
+ import { OnboardingShellStepper as u } from "./OnboardingShellStepper.js";
5
+ import { OnboardingShellOverlayContainerContext as d } from "./OnboardingShellOverlayPortal.js";
6
+ import { FdicLogo as ee } from "./FdicLogo.js";
7
7
  import { OnboardingShellScrollRegion as f } from "./OnboardingShellScrollRegion.js";
8
8
  import * as p from "react";
9
9
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
10
10
  import { useControllableState as g } from "@radix-ui/react-use-controllable-state";
11
- import { Check as _, X as v } from "lucide-react";
11
+ import { Check as _, Trash2 as v, X as y } from "lucide-react";
12
12
  //#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js
13
- function y({ isFullScreenInline: e, className: t, children: n }) {
13
+ function b({ isFullScreenInline: e, className: t, children: n }) {
14
14
  return m(e ? "h2" : a, {
15
15
  className: t,
16
16
  children: n
17
17
  });
18
18
  }
19
- function b({ isFullScreenInline: e, className: t, children: n }) {
19
+ function x({ isFullScreenInline: e, className: t, children: n }) {
20
20
  return m(e ? "p" : i, {
21
21
  className: t,
22
22
  children: n
23
23
  });
24
24
  }
25
- function x({ open: i, defaultOpen: a = !0, onOpenChange: x, isFullScreenInline: S = !1, title: C, subtitle: w, stepLabels: T, activeStep: E, disclaimerText: D, onBack: O, onNext: ee, onCancel: k, onSaveAndClose: A, isSaveAndCloseDisabled: j = !1, isSaveAndCloseLoading: M = !1, isBackDisabled: N = !1, showDismissButton: P = !0, isNextDisabled: F = !1, isNextLoading: I = !1, nextLabel: L, nextIcon: R, errorMessage: z, children: B, labels: V, testIds: H }) {
25
+ function S({ open: i, defaultOpen: a = !0, onOpenChange: S, isFullScreenInline: C = !1, title: w, subtitle: T, stepLabels: E, activeStep: D, disclaimerText: te, onBack: ne, onNext: re, onCancel: O, onSaveAndClose: k, isSaveAndCloseDisabled: A = !1, isSaveAndCloseLoading: j = !1, onDelete: M, isBackDisabled: N = !1, showDismissButton: P = !0, isNextDisabled: F = !1, isNextLoading: I = !1, nextLabel: L, nextIcon: R, errorMessage: z, children: B, labels: V, testIds: H }) {
26
26
  let U = {
27
- ...c,
27
+ ...l,
28
28
  ...V
29
29
  }, [W, G] = g({
30
30
  prop: i,
31
31
  defaultProp: a,
32
- onChange: x
32
+ onChange: S
33
33
  }), [K, q] = p.useState(null), J = p.useCallback((e) => {
34
34
  q(e);
35
35
  }, []), Y = p.useMemo(() => ({
36
36
  container: K,
37
- isFullScreenInline: S
38
- }), [K, S]), X = I || M, Z = !I && (R === void 0 ? /* @__PURE__ */ m(_, {
37
+ isFullScreenInline: C
38
+ }), [K, C]), X = I || j, ie = !I && (R === void 0 ? /* @__PURE__ */ m(_, {
39
39
  className: "ttw:size-5",
40
40
  "aria-hidden": !0
41
- }) : R), Q = P && !S, $ = /* @__PURE__ */ h("div", {
41
+ }) : R), Z = P && !C, Q = /* @__PURE__ */ m(e, {
42
+ type: "button",
43
+ variant: "outline",
44
+ disabled: N || X,
45
+ onClick: ne,
46
+ className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
47
+ "data-testid": H?.back,
48
+ children: U.backButton
49
+ }), $ = /* @__PURE__ */ h("div", {
42
50
  ref: J,
43
- className: S ? "ttw:relative ttw:grid ttw:h-full ttw:w-full ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0 ttw:overflow-hidden ttw:bg-background" : "ttw:relative ttw:grid ttw:max-h-[95vh] ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0",
44
- "data-testid": S ? H?.root : void 0,
51
+ className: C ? "ttw:relative ttw:grid ttw:h-full ttw:w-full ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0 ttw:overflow-hidden ttw:bg-background" : "ttw:relative ttw:grid ttw:max-h-[95vh] ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0",
52
+ "data-testid": C ? H?.root : void 0,
45
53
  children: [
46
- Q ? /* @__PURE__ */ h(n, {
54
+ Z ? /* @__PURE__ */ h(n, {
47
55
  className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none ttw:data-[state=open]:bg-accent ttw:data-[state=open]:text-muted-foreground",
48
56
  "data-testid": H?.dismiss,
49
- children: [/* @__PURE__ */ m(v, {
57
+ children: [/* @__PURE__ */ m(y, {
50
58
  className: "ttw:size-4",
51
59
  "aria-hidden": !0
52
60
  }), /* @__PURE__ */ m("span", {
@@ -55,27 +63,27 @@ function x({ open: i, defaultOpen: a = !0, onOpenChange: x, isFullScreenInline:
55
63
  })]
56
64
  }) : null,
57
65
  /* @__PURE__ */ h("header", {
58
- className: Q ? "ttw:px-8 ttw:pt-8 ttw:pr-14" : "ttw:px-8 ttw:pt-8",
66
+ className: Z ? "ttw:px-8 ttw:pt-8 ttw:pr-14" : "ttw:px-8 ttw:pt-8",
59
67
  children: [
60
- /* @__PURE__ */ m(y, {
61
- isFullScreenInline: S,
68
+ /* @__PURE__ */ m(b, {
69
+ isFullScreenInline: C,
62
70
  className: "ttw:text-2xl ttw:font-bold ttw:leading-tight ttw:text-foreground",
63
- children: C
71
+ children: w
64
72
  }),
65
- /* @__PURE__ */ m(b, {
66
- isFullScreenInline: S,
73
+ /* @__PURE__ */ m(x, {
74
+ isFullScreenInline: C,
67
75
  className: "ttw:mt-1 ttw:mb-4 ttw:text-sm ttw:text-muted-foreground",
68
- children: w
76
+ children: T
69
77
  }),
70
- /* @__PURE__ */ m(l, {
71
- stepLabels: T,
72
- activeStep: E,
78
+ /* @__PURE__ */ m(u, {
79
+ stepLabels: E,
80
+ activeStep: D,
73
81
  labels: V
74
82
  })
75
83
  ]
76
84
  }),
77
85
  /* @__PURE__ */ m(f, {
78
- activeStep: E,
86
+ activeStep: D,
79
87
  scrollForMoreLabel: U.scrollForMore,
80
88
  testIds: H?.scrollRegion,
81
89
  children: B
@@ -88,41 +96,45 @@ function x({ open: i, defaultOpen: a = !0, onOpenChange: x, isFullScreenInline:
88
96
  className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-1",
89
97
  children: [/* @__PURE__ */ m("p", {
90
98
  className: "ttw:text-sm ttw:text-muted-foreground",
91
- children: D
92
- }), /* @__PURE__ */ m(d, {})]
99
+ children: te
100
+ }), /* @__PURE__ */ m(ee, {})]
93
101
  }),
94
- z ? /* @__PURE__ */ m(s, {
102
+ z ? /* @__PURE__ */ m(c, {
95
103
  className: "ttw:mb-3",
96
104
  children: z
97
105
  }) : null,
98
106
  /* @__PURE__ */ h("div", {
99
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
100
- children: [/* @__PURE__ */ m(e, {
107
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
108
+ children: [M ? /* @__PURE__ */ h(e, {
101
109
  type: "button",
102
- variant: "outline",
103
- disabled: N || X,
104
- onClick: O,
105
- className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
106
- "data-testid": H?.back,
107
- children: U.backButton
108
- }), /* @__PURE__ */ h("div", {
109
- className: "ttw:flex ttw:items-center ttw:gap-3",
110
+ variant: "ghost",
111
+ disabled: X,
112
+ onClick: M,
113
+ className: "ttw:h-auto ttw:max-w-full ttw:whitespace-normal ttw:rounded-2xl ttw:px-3 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-destructive ttw:hover:bg-destructive/10 ttw:hover:text-destructive",
114
+ "data-testid": H?.delete,
115
+ children: [/* @__PURE__ */ m(v, {
116
+ className: "ttw:size-4",
117
+ "aria-hidden": !0
118
+ }), U.deleteButton]
119
+ }) : Q, /* @__PURE__ */ h("div", {
120
+ className: "ttw:ml-auto ttw:flex ttw:min-w-0 ttw:max-w-full ttw:flex-wrap ttw:items-center ttw:justify-end ttw:gap-3",
110
121
  children: [
111
- k ? /* @__PURE__ */ m(e, {
122
+ M ? Q : null,
123
+ O ? /* @__PURE__ */ m(e, {
112
124
  type: "button",
113
125
  variant: "outline",
114
126
  disabled: X,
115
- onClick: k,
127
+ onClick: O,
116
128
  className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
117
129
  "data-testid": H?.cancel,
118
130
  children: U.cancelButton
119
131
  }) : null,
120
- A ? /* @__PURE__ */ m(e, {
132
+ k ? /* @__PURE__ */ m(e, {
121
133
  type: "button",
122
134
  variant: "secondary",
123
- disabled: j || X,
124
- loading: M,
125
- onClick: A,
135
+ disabled: A || X,
136
+ loading: j,
137
+ onClick: k,
126
138
  className: "ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
127
139
  "data-testid": H?.saveAndClose,
128
140
  children: U.saveAndCloseButton
@@ -131,10 +143,10 @@ function x({ open: i, defaultOpen: a = !0, onOpenChange: x, isFullScreenInline:
131
143
  type: "button",
132
144
  disabled: F || X,
133
145
  loading: I,
134
- onClick: ee,
146
+ onClick: re,
135
147
  className: "ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
136
148
  "data-testid": H?.next,
137
- children: [L, Z]
149
+ children: [L, ie]
138
150
  })
139
151
  ]
140
152
  })]
@@ -143,16 +155,16 @@ function x({ open: i, defaultOpen: a = !0, onOpenChange: x, isFullScreenInline:
143
155
  })
144
156
  ]
145
157
  });
146
- return S ? /* @__PURE__ */ m(u.Provider, {
158
+ return C ? /* @__PURE__ */ m(d.Provider, {
147
159
  value: Y,
148
160
  children: $
149
161
  }) : /* @__PURE__ */ m(t, {
150
162
  open: W,
151
163
  onOpenChange: G,
152
- children: /* @__PURE__ */ m(u.Provider, {
164
+ children: /* @__PURE__ */ m(d.Provider, {
153
165
  value: Y,
154
166
  children: /* @__PURE__ */ m(r, {
155
- className: "ttw:max-h-[95vh] ttw:w-[720px] ttw:max-w-[calc(100vw-2rem)] ttw:overflow-hidden ttw:rounded-2xl ttw:p-0",
167
+ className: s("ttw:max-h-[95vh] ttw:max-w-[calc(100vw-2rem)] ttw:overflow-hidden ttw:rounded-2xl ttw:p-0", M ? "ttw:w-[840px]" : "ttw:w-[720px]"),
156
168
  "data-testid": H?.root,
157
169
  children: $
158
170
  })
@@ -160,4 +172,4 @@ function x({ open: i, defaultOpen: a = !0, onOpenChange: x, isFullScreenInline:
160
172
  });
161
173
  }
162
174
  //#endregion
163
- export { c as ONBOARDING_SHELL_LABELS_EN, x as OnboardingShell, l as OnboardingShellStepper };
175
+ export { l as ONBOARDING_SHELL_LABELS_EN, S as OnboardingShell, u as OnboardingShellStepper };
@@ -3,6 +3,7 @@ var e = {
3
3
  backButton: "Back",
4
4
  cancelButton: "Cancel",
5
5
  saveAndCloseButton: "Save and close",
6
+ deleteButton: "Cancel and delete application",
6
7
  dismissAriaLabel: "Close onboarding",
7
8
  stepperAriaLabel: "Onboarding progress",
8
9
  scrollForMore: "Scroll for more"
@@ -8,8 +8,8 @@ import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
8
8
  import "../../../shared/data-access/dist/index.js";
9
9
  import { SectionHeading as r } from "../../../shared/ui/dist/lib/SectionHeading/SectionHeading.js";
10
10
  import "../../../shared/ui/dist/index.js";
11
- import { CreditCardsWidget as i } from "../../../cards-widget/feature/dist/index10.js";
12
- import { DebitCardsWidget as a } from "../../../cards-widget/feature/dist/index11.js";
11
+ import { CreditCardsWidget as i } from "../../../cards-widget/feature/dist/index11.js";
12
+ import { DebitCardsWidget as a } from "../../../cards-widget/feature/dist/index12.js";
13
13
  import "../../../cards-widget/feature/dist/index.js";
14
14
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
15
15
  //#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js
@@ -25,7 +25,7 @@ function c() {
25
25
  })
26
26
  }), t(c, [n.DebitCardReadOrg]) && /* @__PURE__ */ o(a, {
27
27
  ...d.debitCards,
28
- cardArtSrc: u ?? "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='190' viewBox='0 0 300 190'><rect width='300' height='190' rx='16' fill='%23334155'/><rect x='28' y='64' width='44' height='34' rx='6' fill='%2364748b'/></svg>",
28
+ cardArtSrc: u,
29
29
  headerStart: /* @__PURE__ */ o(r, {
30
30
  className: "ttw:mb-0",
31
31
  children: d.debitCardsTitle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.181",
3
+ "version": "0.5.183",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {
@@ -1,19 +0,0 @@
1
- //#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js
2
- var e = {
3
- list: "cards-list",
4
- cardFaceSwatch: "card-face-swatch",
5
- rowPrefix: "cards-list-row",
6
- empty: "cards-list-empty",
7
- error: "cards-list-error",
8
- detailsSheet: "cards-list-details-sheet"
9
- }, t = {
10
- root: e.list,
11
- empty: e.empty,
12
- error: e.error,
13
- row: {
14
- rootPrefix: e.rowPrefix,
15
- cardFaceSwatch: { root: e.cardFaceSwatch }
16
- }
17
- }, n = { root: e.detailsSheet };
18
- //#endregion
19
- export { n as cardsListDetailsSheetTestIds, t as cardsListTestIds, e as cardsWidgetTestIds };