@tesouro/embedded-components-react 0.5.170 → 0.5.172

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 (30) hide show
  1. package/dist/index.d.ts +18 -0
  2. package/dist/index.js +1 -1
  3. package/dist/lib/BankAccountOnboardingWidget.d.ts +18 -0
  4. package/dist/lib/BankAccountOnboardingWidget.js +1 -1
  5. package/dist/lib/WidgetSuite.d.ts +18 -0
  6. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index10.js +82 -184
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +189 -29
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +34 -127
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +83 -175
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +173 -84
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +62 -92
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +86 -115
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +5 -97
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +105 -87
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index19.js +99 -5
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index20.js +94 -28
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js +182 -16
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +5 -423
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +34 -0
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index24.js +19 -0
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index25.js +580 -0
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +3 -1
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +10 -0
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +59 -0
  26. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +62 -49
  28. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js +1 -0
  29. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +1 -1
  30. package/package.json +1 -1
@@ -22,40 +22,40 @@ function b({ isFullScreenInline: e, className: t, children: n }) {
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: k, onCancel: A, isBackDisabled: j = !1, showDismissButton: M = !0, isNextDisabled: N = !1, isNextLoading: P = !1, nextLabel: F, nextIcon: I, errorMessage: L, children: R, labels: z, testIds: B }) {
26
- let V = {
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 }) {
26
+ let U = {
27
27
  ...c,
28
- ...z
29
- }, [H, U] = g({
28
+ ...V
29
+ }, [W, G] = g({
30
30
  prop: i,
31
31
  defaultProp: a,
32
32
  onChange: x
33
- }), [W, G] = p.useState(null), K = p.useCallback((e) => {
34
- G(e);
35
- }, []), q = p.useMemo(() => ({
36
- container: W,
33
+ }), [K, q] = p.useState(null), J = p.useCallback((e) => {
34
+ q(e);
35
+ }, []), Y = p.useMemo(() => ({
36
+ container: K,
37
37
  isFullScreenInline: S
38
- }), [W, S]), J = !P && (I === void 0 ? /* @__PURE__ */ m(_, {
38
+ }), [K, S]), X = I || M, Z = !I && (R === void 0 ? /* @__PURE__ */ m(_, {
39
39
  className: "ttw:size-5",
40
40
  "aria-hidden": !0
41
- }) : I), Y = M && !S, X = /* @__PURE__ */ h("div", {
42
- ref: K,
41
+ }) : R), Q = P && !S, $ = /* @__PURE__ */ h("div", {
42
+ ref: J,
43
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 ? B?.root : void 0,
44
+ "data-testid": S ? H?.root : void 0,
45
45
  children: [
46
- Y ? /* @__PURE__ */ h(n, {
46
+ Q ? /* @__PURE__ */ h(n, {
47
47
  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
- "data-testid": B?.dismiss,
48
+ "data-testid": H?.dismiss,
49
49
  children: [/* @__PURE__ */ m(v, {
50
50
  className: "ttw:size-4",
51
51
  "aria-hidden": !0
52
52
  }), /* @__PURE__ */ m("span", {
53
53
  className: "ttw:sr-only",
54
- children: V.dismissAriaLabel
54
+ children: U.dismissAriaLabel
55
55
  })]
56
56
  }) : null,
57
57
  /* @__PURE__ */ h("header", {
58
- className: Y ? "ttw:px-8 ttw:pt-8 ttw:pr-14" : "ttw:px-8 ttw:pt-8",
58
+ className: Q ? "ttw:px-8 ttw:pt-8 ttw:pr-14" : "ttw:px-8 ttw:pt-8",
59
59
  children: [
60
60
  /* @__PURE__ */ m(y, {
61
61
  isFullScreenInline: S,
@@ -70,15 +70,15 @@ function x({ open: i, defaultOpen: a = !0, onOpenChange: x, isFullScreenInline:
70
70
  /* @__PURE__ */ m(l, {
71
71
  stepLabels: T,
72
72
  activeStep: E,
73
- labels: z
73
+ labels: V
74
74
  })
75
75
  ]
76
76
  }),
77
77
  /* @__PURE__ */ m(f, {
78
78
  activeStep: E,
79
- scrollForMoreLabel: V.scrollForMore,
80
- testIds: B?.scrollRegion,
81
- children: R
79
+ scrollForMoreLabel: U.scrollForMore,
80
+ testIds: H?.scrollRegion,
81
+ children: B
82
82
  }),
83
83
  /* @__PURE__ */ h("footer", {
84
84
  className: "ttw:px-8 ttw:pb-8",
@@ -91,39 +91,52 @@ function x({ open: i, defaultOpen: a = !0, onOpenChange: x, isFullScreenInline:
91
91
  children: D
92
92
  }), /* @__PURE__ */ m(d, {})]
93
93
  }),
94
- L ? /* @__PURE__ */ m(s, {
94
+ z ? /* @__PURE__ */ m(s, {
95
95
  className: "ttw:mb-3",
96
- children: L
96
+ children: z
97
97
  }) : null,
98
98
  /* @__PURE__ */ h("div", {
99
99
  className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
100
100
  children: [/* @__PURE__ */ m(e, {
101
101
  type: "button",
102
102
  variant: "outline",
103
- disabled: j || P,
103
+ disabled: N || X,
104
104
  onClick: O,
105
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": B?.back,
107
- children: V.backButton
106
+ "data-testid": H?.back,
107
+ children: U.backButton
108
108
  }), /* @__PURE__ */ h("div", {
109
109
  className: "ttw:flex ttw:items-center ttw:gap-3",
110
- children: [A ? /* @__PURE__ */ m(e, {
111
- type: "button",
112
- variant: "outline",
113
- disabled: P,
114
- onClick: A,
115
- 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",
116
- "data-testid": B?.cancel,
117
- children: V.cancelButton
118
- }) : null, /* @__PURE__ */ h(e, {
119
- type: "button",
120
- disabled: N || P,
121
- loading: P,
122
- onClick: k,
123
- className: "ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
124
- "data-testid": B?.next,
125
- children: [F, J]
126
- })]
110
+ children: [
111
+ k ? /* @__PURE__ */ m(e, {
112
+ type: "button",
113
+ variant: "outline",
114
+ disabled: X,
115
+ onClick: k,
116
+ 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
+ "data-testid": H?.cancel,
118
+ children: U.cancelButton
119
+ }) : null,
120
+ A ? /* @__PURE__ */ m(e, {
121
+ type: "button",
122
+ variant: "secondary",
123
+ disabled: j || X,
124
+ loading: M,
125
+ onClick: A,
126
+ className: "ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
127
+ "data-testid": H?.saveAndClose,
128
+ children: U.saveAndCloseButton
129
+ }) : null,
130
+ /* @__PURE__ */ h(e, {
131
+ type: "button",
132
+ disabled: F || X,
133
+ loading: I,
134
+ onClick: ee,
135
+ className: "ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
136
+ "data-testid": H?.next,
137
+ children: [L, Z]
138
+ })
139
+ ]
127
140
  })]
128
141
  })
129
142
  ]
@@ -131,17 +144,17 @@ function x({ open: i, defaultOpen: a = !0, onOpenChange: x, isFullScreenInline:
131
144
  ]
132
145
  });
133
146
  return S ? /* @__PURE__ */ m(u.Provider, {
134
- value: q,
135
- children: X
147
+ value: Y,
148
+ children: $
136
149
  }) : /* @__PURE__ */ m(t, {
137
- open: H,
138
- onOpenChange: U,
150
+ open: W,
151
+ onOpenChange: G,
139
152
  children: /* @__PURE__ */ m(u.Provider, {
140
- value: q,
153
+ value: Y,
141
154
  children: /* @__PURE__ */ m(r, {
142
155
  className: "ttw:max-h-[95vh] ttw:w-[720px] ttw:max-w-[calc(100vw-2rem)] ttw:overflow-hidden ttw:rounded-2xl ttw:p-0",
143
- "data-testid": B?.root,
144
- children: X
156
+ "data-testid": H?.root,
157
+ children: $
145
158
  })
146
159
  })
147
160
  });
@@ -2,6 +2,7 @@
2
2
  var e = {
3
3
  backButton: "Back",
4
4
  cancelButton: "Cancel",
5
+ saveAndCloseButton: "Save and close",
5
6
  dismissAriaLabel: "Close onboarding",
6
7
  stepperAriaLabel: "Onboarding progress",
7
8
  scrollForMore: "Scroll for more"
@@ -24,7 +24,7 @@ import { WIDGET_NAME as b, WidgetSuiteAnalyticsEvent as x } from "./index2.js";
24
24
  import { needsDisclosureAcceptance as S } from "./index3.js";
25
25
  import { AcceptDisclosuresWidget as C } from "../../../accept-disclosures-widget/feature/dist/index5.js";
26
26
  import "../../../accept-disclosures-widget/feature/dist/index.js";
27
- import { BankAccountOnboardingWidget as w } from "../../../bank-account-onboarding-widget/feature/dist/index22.js";
27
+ import { BankAccountOnboardingWidget as w } from "../../../bank-account-onboarding-widget/feature/dist/index25.js";
28
28
  import "../../../bank-account-onboarding-widget/feature/dist/index.js";
29
29
  import { useCallback as T, useEffect as E, useMemo as D, useRef as O, useState as k } from "react";
30
30
  import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.170",
3
+ "version": "0.5.172",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {