@tesouro/embedded-components-react 0.9.26 → 0.9.29
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/dist/index.css +26 -11
- package/dist/index.d.ts +23 -3
- package/dist/lib/BankAccountOnboardingWidget.d.ts +23 -3
- package/dist/lib/WidgetSuite.d.ts +23 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +366 -350
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index33.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index34.js +46 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +62 -51
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +25 -45
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellStepper.js +38 -48
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/useScrollHintContainer.js +10 -11
- package/package.json +2 -2
|
@@ -43,10 +43,10 @@ var n = {
|
|
|
43
43
|
}
|
|
44
44
|
}, r = {
|
|
45
45
|
stepIndicator: {
|
|
46
|
-
personal: "Personal",
|
|
47
|
-
business: "Business",
|
|
46
|
+
personal: "Personal details",
|
|
47
|
+
business: "Business details",
|
|
48
48
|
review: "Review",
|
|
49
|
-
terms: "Terms",
|
|
49
|
+
terms: "Terms and conditions",
|
|
50
50
|
done: "Done"
|
|
51
51
|
},
|
|
52
52
|
businessDetails: {},
|
|
@@ -55,6 +55,7 @@ var n = {
|
|
|
55
55
|
applicationReview: {},
|
|
56
56
|
result: e,
|
|
57
57
|
deleteApplicationDialog: {},
|
|
58
|
+
applicationDeleted: {},
|
|
58
59
|
back: "Back",
|
|
59
60
|
nextToStep: {
|
|
60
61
|
business: "Next: Business details",
|
|
@@ -7,10 +7,11 @@ var e = {
|
|
|
7
7
|
shellNext: "onboarding-shell-next",
|
|
8
8
|
shellScrollRegion: "onboarding-shell-scroll-region",
|
|
9
9
|
shellScrollFade: "onboarding-shell-scroll-fade",
|
|
10
|
-
shellScrollHint: "onboarding-shell-scroll-hint",
|
|
11
10
|
deleteDialog: "delete-application-dialog",
|
|
12
11
|
deleteDialogConfirm: "delete-application-dialog-confirm",
|
|
13
12
|
deleteDialogCancel: "delete-application-dialog-cancel",
|
|
13
|
+
applicationDeletedScreen: "application-deleted-screen",
|
|
14
|
+
applicationDeletedStartNew: "application-deleted-start-new",
|
|
14
15
|
businessDetailsPanel: "business-details-panel",
|
|
15
16
|
businessDetailsEditButton: "business-details-edit-button",
|
|
16
17
|
businessDetailsSummary: "business-details-summary",
|
package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js
CHANGED
|
@@ -16,4 +16,6 @@ import "./index29.js";
|
|
|
16
16
|
import { ApplicationReview as h } from "./index30.js";
|
|
17
17
|
import "./index31.js";
|
|
18
18
|
import { DeleteApplicationDialog as g } from "./index32.js";
|
|
19
|
-
|
|
19
|
+
import "./index33.js";
|
|
20
|
+
import { ApplicationDeletedScreen as _ } from "./index34.js";
|
|
21
|
+
export { f as ABOUT_YOU_PANEL_LABELS_EN, e as ADDITIONAL_OWNERS_LABELS_EN, p as AboutYouPanel, t as AdditionalOwnerRowStatus, n as AdditionalOwnersForm, _ as ApplicationDeletedScreen, h as ApplicationReview, o as ApplicationStatusCard, s as ApplicationStatusTone, r as BUSINESS_DETAILS_LABELS_EN, u as BUSINESS_DETAILS_PANEL_LABELS_EN, d as BusinessDetailsPanel, m as BusinessDisclosuresSection, g as DeleteApplicationDialog, a as PERSONAL_DETAILS_LABELS_EN, l as RESULT_LABELS_EN, c as ResultStep, i as interpolateBankName };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index33.js
|
|
2
|
+
var e = {
|
|
3
|
+
title: "Application deleted",
|
|
4
|
+
body: "Your application and everything you entered have been permanently removed. You can start a new application whenever you're ready.",
|
|
5
|
+
startNewApplicationButton: "Start a new application"
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { e as APPLICATION_DELETED_SCREEN_LABELS_EN };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Button as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { APPLICATION_DELETED_SCREEN_LABELS_EN as n } from "./index33.js";
|
|
3
|
+
import { useEffect as r, useRef as i } from "react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import { CircleCheckIcon as s } from "lucide-react";
|
|
6
|
+
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index34.js
|
|
7
|
+
function c({ onStartNewApplication: c, labels: l, className: u, testIds: d }) {
|
|
8
|
+
let f = {
|
|
9
|
+
...n,
|
|
10
|
+
...l
|
|
11
|
+
}, p = i(null);
|
|
12
|
+
return r(() => {
|
|
13
|
+
p.current?.focus();
|
|
14
|
+
}, []), /* @__PURE__ */ o("section", {
|
|
15
|
+
"data-testid": d?.root,
|
|
16
|
+
"aria-label": f.title,
|
|
17
|
+
className: t("ttw:flex ttw:w-full ttw:flex-col ttw:items-center ttw:gap-4 ttw:p-6 ttw:text-center ttw:text-foreground", u),
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ a("div", {
|
|
20
|
+
className: "ttw:flex ttw:size-14 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-primary/10",
|
|
21
|
+
"aria-hidden": !0,
|
|
22
|
+
children: /* @__PURE__ */ a(s, { className: "ttw:size-6 ttw:text-primary" })
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ o("div", {
|
|
25
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
26
|
+
children: [/* @__PURE__ */ a("p", {
|
|
27
|
+
ref: p,
|
|
28
|
+
tabIndex: -1,
|
|
29
|
+
className: "ttw:text-xl ttw:font-semibold ttw:outline-none",
|
|
30
|
+
children: f.title
|
|
31
|
+
}), /* @__PURE__ */ a("p", {
|
|
32
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
33
|
+
children: f.body
|
|
34
|
+
})]
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ a(e, {
|
|
37
|
+
type: "button",
|
|
38
|
+
onClick: c,
|
|
39
|
+
"data-testid": d?.startNewApplication,
|
|
40
|
+
children: f.startNewApplicationButton
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { n as APPLICATION_DELETED_SCREEN_LABELS_EN, c as ApplicationDeletedScreen };
|
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.9.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.9.29", n = "df4399969c22305c35a4bf219012507badb35037", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -9,37 +9,49 @@ import * as l from "react";
|
|
|
9
9
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
10
|
import { Check as f, Trash2 as p } from "lucide-react";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js
|
|
12
|
-
function m({ title: m, subtitle: h, isTitleVisuallyHidden: g = !1,
|
|
13
|
-
let
|
|
12
|
+
function m({ title: m, subtitle: h, isTitleVisuallyHidden: g = !1, focusTitleOnMount: _ = !1, stepLabels: v, activeStep: y, disclaimerText: b, onBack: x, onNext: S, onCancel: C, onSaveAndClose: w, isSaveAndCloseDisabled: T = !1, isSaveAndCloseLoading: E = !1, onDelete: D, isBackDisabled: O = !1, showBackButton: k = !0, backAriaLabel: A, isNextDisabled: j = !1, isNextLoading: M = !1, nextLabel: N, nextIcon: P, nextTone: F = "primary", errorMessage: I, children: L, labels: R, testIds: z }) {
|
|
13
|
+
let B = {
|
|
14
14
|
...i,
|
|
15
|
-
...
|
|
16
|
-
}, [
|
|
17
|
-
|
|
18
|
-
}, []),
|
|
15
|
+
...R
|
|
16
|
+
}, [V, H] = l.useState(null), U = l.useCallback((e) => {
|
|
17
|
+
H(e);
|
|
18
|
+
}, []), W = l.useRef(y);
|
|
19
|
+
l.useEffect(() => {
|
|
20
|
+
if (W.current === y || (W.current = y, !V)) return;
|
|
21
|
+
let e = V.ownerDocument.documentElement, t = Number.parseFloat(getComputedStyle(e).scrollPaddingTop) || 0;
|
|
22
|
+
V.getBoundingClientRect().top < t && V.scrollIntoView({ block: "start" });
|
|
23
|
+
}, [y, V]);
|
|
24
|
+
let G = l.useRef(null), K = l.useRef(_);
|
|
25
|
+
l.useEffect(() => {
|
|
26
|
+
K.current && G.current?.focus();
|
|
27
|
+
}, []);
|
|
28
|
+
let q = l.useMemo(() => ({ container: V }), [V]), J = M || E, Y = !M && (P === void 0 ? /* @__PURE__ */ u(f, {
|
|
19
29
|
className: "ttw:size-5",
|
|
20
30
|
"aria-hidden": !0
|
|
21
|
-
}) :
|
|
31
|
+
}) : P), X = k ? /* @__PURE__ */ u(e, {
|
|
22
32
|
type: "button",
|
|
23
33
|
variant: "outline",
|
|
24
|
-
disabled:
|
|
25
|
-
onClick:
|
|
26
|
-
"aria-label":
|
|
34
|
+
disabled: O || J,
|
|
35
|
+
onClick: x,
|
|
36
|
+
"aria-label": A,
|
|
27
37
|
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",
|
|
28
|
-
"data-testid":
|
|
29
|
-
children:
|
|
38
|
+
"data-testid": z?.back,
|
|
39
|
+
children: B.backButton
|
|
30
40
|
}) : null;
|
|
31
41
|
return /* @__PURE__ */ u(o.Provider, {
|
|
32
|
-
value:
|
|
42
|
+
value: q,
|
|
33
43
|
children: /* @__PURE__ */ d("div", {
|
|
34
|
-
ref:
|
|
35
|
-
className: "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",
|
|
36
|
-
"data-testid":
|
|
44
|
+
ref: U,
|
|
45
|
+
className: "ttw:relative ttw:grid ttw:max-h-full ttw:w-full ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0 ttw:overflow-hidden ttw:bg-background",
|
|
46
|
+
"data-testid": z?.root,
|
|
37
47
|
children: [
|
|
38
48
|
/* @__PURE__ */ d("header", {
|
|
39
49
|
className: "ttw:px-8 ttw:pt-8",
|
|
40
50
|
children: [
|
|
41
51
|
/* @__PURE__ */ u("h2", {
|
|
42
|
-
|
|
52
|
+
ref: G,
|
|
53
|
+
tabIndex: -1,
|
|
54
|
+
className: n("ttw:outline-none", g ? "ttw:sr-only" : "ttw:text-2xl ttw:font-bold ttw:leading-tight ttw:text-foreground"),
|
|
43
55
|
children: m
|
|
44
56
|
}),
|
|
45
57
|
/* @__PURE__ */ u("p", {
|
|
@@ -47,17 +59,16 @@ function m({ title: m, subtitle: h, isTitleVisuallyHidden: g = !1, stepLabels: _
|
|
|
47
59
|
children: h
|
|
48
60
|
}),
|
|
49
61
|
/* @__PURE__ */ u(a, {
|
|
50
|
-
stepLabels:
|
|
51
|
-
activeStep:
|
|
52
|
-
labels:
|
|
62
|
+
stepLabels: v,
|
|
63
|
+
activeStep: y,
|
|
64
|
+
labels: R
|
|
53
65
|
})
|
|
54
66
|
]
|
|
55
67
|
}),
|
|
56
68
|
/* @__PURE__ */ u(c, {
|
|
57
|
-
activeStep:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
children: I
|
|
69
|
+
activeStep: y,
|
|
70
|
+
testIds: z?.scrollRegion,
|
|
71
|
+
children: L
|
|
61
72
|
}),
|
|
62
73
|
/* @__PURE__ */ d("footer", {
|
|
63
74
|
className: "ttw:px-8 ttw:pb-8",
|
|
@@ -67,57 +78,57 @@ function m({ title: m, subtitle: h, isTitleVisuallyHidden: g = !1, stepLabels: _
|
|
|
67
78
|
className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-1",
|
|
68
79
|
children: [/* @__PURE__ */ u("p", {
|
|
69
80
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
70
|
-
children:
|
|
81
|
+
children: b
|
|
71
82
|
}), /* @__PURE__ */ u(s, {})]
|
|
72
83
|
}),
|
|
73
|
-
|
|
84
|
+
I ? /* @__PURE__ */ u(r, {
|
|
74
85
|
className: "ttw:mb-3",
|
|
75
|
-
children:
|
|
86
|
+
children: I
|
|
76
87
|
}) : null,
|
|
77
88
|
/* @__PURE__ */ d("div", {
|
|
78
89
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
|
|
79
|
-
children: [
|
|
90
|
+
children: [D ? /* @__PURE__ */ d(e, {
|
|
80
91
|
type: "button",
|
|
81
92
|
variant: "ghost",
|
|
82
|
-
disabled:
|
|
83
|
-
onClick:
|
|
93
|
+
disabled: J,
|
|
94
|
+
onClick: D,
|
|
84
95
|
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-foreground ttw:hover:bg-destructive/10 ttw:hover:text-[color-mix(in_srgb,var(--ttw-destructive),black_10%)]",
|
|
85
|
-
"data-testid":
|
|
96
|
+
"data-testid": z?.delete,
|
|
86
97
|
children: [/* @__PURE__ */ u(p, {
|
|
87
98
|
className: "ttw:size-4",
|
|
88
99
|
"aria-hidden": !0
|
|
89
|
-
}),
|
|
90
|
-
}) :
|
|
100
|
+
}), B.deleteButton]
|
|
101
|
+
}) : X, /* @__PURE__ */ d("div", {
|
|
91
102
|
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",
|
|
92
103
|
children: [
|
|
93
|
-
|
|
94
|
-
|
|
104
|
+
D ? X : null,
|
|
105
|
+
C ? /* @__PURE__ */ u(e, {
|
|
95
106
|
type: "button",
|
|
96
107
|
variant: "outline",
|
|
97
|
-
disabled:
|
|
98
|
-
onClick:
|
|
108
|
+
disabled: J,
|
|
109
|
+
onClick: C,
|
|
99
110
|
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",
|
|
100
|
-
"data-testid":
|
|
101
|
-
children:
|
|
111
|
+
"data-testid": z?.cancel,
|
|
112
|
+
children: B.cancelButton
|
|
102
113
|
}) : null,
|
|
103
|
-
|
|
114
|
+
w ? /* @__PURE__ */ u(e, {
|
|
104
115
|
type: "button",
|
|
105
116
|
variant: "secondary",
|
|
106
|
-
disabled:
|
|
107
|
-
loading:
|
|
108
|
-
onClick:
|
|
117
|
+
disabled: T || J,
|
|
118
|
+
loading: E,
|
|
119
|
+
onClick: w,
|
|
109
120
|
className: "ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
|
|
110
|
-
"data-testid":
|
|
111
|
-
children:
|
|
121
|
+
"data-testid": z?.saveAndClose,
|
|
122
|
+
children: B.saveAndCloseButton
|
|
112
123
|
}) : null,
|
|
113
124
|
/* @__PURE__ */ d(e, {
|
|
114
125
|
type: "button",
|
|
115
|
-
disabled:
|
|
116
|
-
loading:
|
|
117
|
-
onClick:
|
|
118
|
-
className: n("ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
|
|
119
|
-
"data-testid":
|
|
120
|
-
children: [
|
|
126
|
+
disabled: j || J,
|
|
127
|
+
loading: M,
|
|
128
|
+
onClick: S,
|
|
129
|
+
className: n("ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium", F === "success" && "ttw:bg-green-600! ttw:text-white! ttw:hover:bg-green-700!"),
|
|
130
|
+
"data-testid": z?.next,
|
|
131
|
+
children: [N, Y]
|
|
121
132
|
})
|
|
122
133
|
]
|
|
123
134
|
})]
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { useScrollHintContainer as e } from "./useScrollHintContainer.js";
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
import { ArrowDown as i } from "lucide-react";
|
|
5
4
|
//#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js
|
|
6
|
-
var
|
|
7
|
-
function
|
|
5
|
+
var i = 160;
|
|
6
|
+
function a(e) {
|
|
8
7
|
let [n, r] = t.useState(e), [i, a] = t.useState(e);
|
|
9
8
|
return t.useEffect(() => {
|
|
10
9
|
if (e) {
|
|
@@ -21,50 +20,31 @@ function o(e) {
|
|
|
21
20
|
}, [e])
|
|
22
21
|
};
|
|
23
22
|
}
|
|
24
|
-
function
|
|
25
|
-
let { containerRef:
|
|
23
|
+
function o({ activeStep: o, children: s, testIds: c }) {
|
|
24
|
+
let { containerRef: l, hasOverflow: u, fadeVisible: d, fadeHeight: f, resetHint: p } = e(), { mounted: m, visible: h, onTransitionEnd: g } = a(d);
|
|
26
25
|
return t.useEffect(() => {
|
|
27
|
-
|
|
28
|
-
}, [
|
|
29
|
-
ref:
|
|
26
|
+
p();
|
|
27
|
+
}, [o, p]), /* @__PURE__ */ r("div", {
|
|
28
|
+
ref: l,
|
|
30
29
|
className: "ttw:relative ttw:min-h-0 ttw:overflow-y-auto ttw:px-8 ttw:pt-2",
|
|
31
|
-
"data-testid":
|
|
32
|
-
children: [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
}) : null,
|
|
50
|
-
b ? /* @__PURE__ */ r("div", {
|
|
51
|
-
role: "status",
|
|
52
|
-
"aria-live": "polite",
|
|
53
|
-
"data-testid": u?.hint,
|
|
54
|
-
onTransitionEnd: S,
|
|
55
|
-
className: "ttw:pointer-events-none ttw:absolute ttw:left-1/2 ttw:z-[2] ttw:flex ttw:-translate-x-1/2 ttw:items-center ttw:gap-1 ttw:rounded-full ttw:bg-primary ttw:px-3 ttw:py-1.5 ttw:text-[13px] ttw:font-medium ttw:text-primary-foreground ttw:shadow-md ttw:transition-opacity ttw:ease-in-out",
|
|
56
|
-
style: {
|
|
57
|
-
bottom: h / 2,
|
|
58
|
-
opacity: +!!x,
|
|
59
|
-
transitionDuration: `${a}ms`
|
|
60
|
-
},
|
|
61
|
-
children: [c, /* @__PURE__ */ n(i, {
|
|
62
|
-
className: "ttw:size-4",
|
|
63
|
-
"aria-hidden": !0
|
|
64
|
-
})]
|
|
65
|
-
}) : null
|
|
66
|
-
]
|
|
30
|
+
"data-testid": c?.root,
|
|
31
|
+
children: [/* @__PURE__ */ n("div", {
|
|
32
|
+
className: "ttw:pb-4",
|
|
33
|
+
children: s
|
|
34
|
+
}), u && m ? /* @__PURE__ */ n("div", {
|
|
35
|
+
"aria-hidden": !0,
|
|
36
|
+
"data-testid": c?.fade,
|
|
37
|
+
onTransitionEnd: g,
|
|
38
|
+
className: "ttw:pointer-events-none ttw:sticky ttw:bottom-0 ttw:left-0 ttw:right-0 ttw:z-[1] ttw:transition-opacity ttw:ease-in-out",
|
|
39
|
+
style: {
|
|
40
|
+
height: f,
|
|
41
|
+
marginTop: `-${f}px`,
|
|
42
|
+
opacity: +!!h,
|
|
43
|
+
transitionDuration: `${i}ms`,
|
|
44
|
+
background: "linear-gradient(to bottom, rgba(0,0,0,0) 0%, var(--ttw-background) 85%, var(--ttw-background) 100%)"
|
|
45
|
+
}
|
|
46
|
+
}) : null]
|
|
67
47
|
});
|
|
68
48
|
}
|
|
69
49
|
//#endregion
|
|
70
|
-
export {
|
|
50
|
+
export { o as OnboardingShellScrollRegion };
|
|
@@ -1,59 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { cn as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { ONBOARDING_SHELL_LABELS_EN as t } from "./labels.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Check as i } from "lucide-react";
|
|
4
5
|
//#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellStepper.js
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
...
|
|
9
|
-
...
|
|
6
|
+
var a = "#18C29C";
|
|
7
|
+
function o({ stepLabels: o, activeStep: s, labels: c }) {
|
|
8
|
+
let l = {
|
|
9
|
+
...t,
|
|
10
|
+
...c
|
|
10
11
|
};
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ n("div", {
|
|
12
13
|
className: "ttw:mb-2",
|
|
13
|
-
children: /* @__PURE__ */
|
|
14
|
-
className: "ttw:flex ttw:w-full ttw:items-
|
|
15
|
-
"aria-label":
|
|
16
|
-
children:
|
|
17
|
-
let
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
color: "var(--ttw-primary)",
|
|
30
|
-
border: "2px solid var(--ttw-primary)",
|
|
31
|
-
boxShadow: "0 0 0 2px #E6E9FA"
|
|
32
|
-
} : {
|
|
33
|
-
backgroundColor: "#fff",
|
|
34
|
-
color: s,
|
|
35
|
-
border: `2px solid ${o}`
|
|
36
|
-
},
|
|
37
|
-
children: d ? /* @__PURE__ */ t(r, {
|
|
14
|
+
children: /* @__PURE__ */ n("ol", {
|
|
15
|
+
className: "ttw:flex ttw:w-full ttw:items-start ttw:contain-inline-size",
|
|
16
|
+
"aria-label": l.stepperAriaLabel,
|
|
17
|
+
children: o.map((t, c) => {
|
|
18
|
+
let l = c < s, u = c === s, d = c + 1, f = c === o.length - 1;
|
|
19
|
+
return /* @__PURE__ */ r("li", {
|
|
20
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col ttw:gap-2 ttw:last:flex-initial",
|
|
21
|
+
style: f ? { maxWidth: `${100 / o.length}%` } : void 0,
|
|
22
|
+
"aria-current": u ? "step" : void 0,
|
|
23
|
+
children: [/* @__PURE__ */ r("div", {
|
|
24
|
+
className: "ttw:flex ttw:items-center",
|
|
25
|
+
children: [/* @__PURE__ */ n("span", {
|
|
26
|
+
className: e("ttw:flex ttw:size-6 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:text-sm ttw:font-bold ttw:transition-colors", l && "ttw:text-background ttw:opacity-50", u && "ttw:bg-primary ttw:text-primary-foreground", !l && !u && "ttw:border-2 ttw:border-border ttw:bg-background ttw:text-muted-foreground"),
|
|
27
|
+
style: l ? { backgroundColor: a } : void 0,
|
|
28
|
+
"aria-hidden": !0,
|
|
29
|
+
children: l ? /* @__PURE__ */ n(i, {
|
|
38
30
|
className: "ttw:size-4",
|
|
39
|
-
"aria-hidden": !0,
|
|
40
31
|
strokeWidth: 3
|
|
41
|
-
}) :
|
|
42
|
-
}),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
style: { backgroundColor: u < l ? i : a },
|
|
32
|
+
}) : d
|
|
33
|
+
}), f ? null : /* @__PURE__ */ n("span", {
|
|
34
|
+
className: e("ttw:mx-1 ttw:h-0.5 ttw:min-w-2 ttw:flex-1 ttw:rounded-full", l && "ttw:opacity-50", u && "ttw:bg-primary", !l && !u && "ttw:bg-border"),
|
|
35
|
+
style: l ? { backgroundColor: a } : void 0,
|
|
46
36
|
"aria-hidden": !0
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
]
|
|
53
|
-
}, `step-${
|
|
37
|
+
})]
|
|
38
|
+
}), /* @__PURE__ */ n("span", {
|
|
39
|
+
className: e("ttw:truncate ttw:pr-2 ttw:text-xs", u ? "ttw:font-semibold ttw:text-foreground" : "ttw:text-muted-foreground"),
|
|
40
|
+
title: t,
|
|
41
|
+
children: t
|
|
42
|
+
})]
|
|
43
|
+
}, `step-${c}`);
|
|
54
44
|
})
|
|
55
45
|
})
|
|
56
46
|
});
|
|
57
47
|
}
|
|
58
48
|
//#endregion
|
|
59
|
-
export {
|
|
49
|
+
export { o as OnboardingShellStepper };
|
package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js
CHANGED
|
@@ -4,8 +4,7 @@ var e = {
|
|
|
4
4
|
cancelButton: "Cancel",
|
|
5
5
|
saveAndCloseButton: "Save and continue later",
|
|
6
6
|
deleteButton: "Delete",
|
|
7
|
-
stepperAriaLabel: "Onboarding progress"
|
|
8
|
-
scrollForMore: "Scroll for more"
|
|
7
|
+
stepperAriaLabel: "Onboarding progress"
|
|
9
8
|
};
|
|
10
9
|
//#endregion
|
|
11
10
|
export { e as ONBOARDING_SHELL_LABELS_EN };
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
2
|
//#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/useScrollHintContainer.js
|
|
3
3
|
function t({ fadeHeight: t = 32, hideFadeAtBottom: n = !0 } = {}) {
|
|
4
|
-
let r = e.useRef(null), [i, a] = e.useState(!1), [o, s] = e.useState(!1), [c, l] = e.useState(!1),
|
|
4
|
+
let r = e.useRef(null), [i, a] = e.useState(!1), [o, s] = e.useState(!1), [c, l] = e.useState(!1), u = e.useCallback(() => {
|
|
5
5
|
let e = r.current;
|
|
6
6
|
if (!e) return;
|
|
7
|
-
let t = e.scrollHeight - e.clientHeight > 1, a = e.scrollTop
|
|
8
|
-
|
|
7
|
+
let t = e.scrollHeight - e.clientHeight > 1, a = e.scrollTop + e.clientHeight >= e.scrollHeight - 2, o = i || e.scrollTop > 1;
|
|
8
|
+
s(t), l(t && !o && (!n || !a));
|
|
9
9
|
}, [i, n]);
|
|
10
10
|
return e.useEffect(() => {
|
|
11
11
|
let e = r.current;
|
|
12
12
|
if (!e) return;
|
|
13
13
|
let t = () => {
|
|
14
|
-
!i && e.scrollTop > 1 && a(!0),
|
|
14
|
+
!i && e.scrollTop > 1 && a(!0), u();
|
|
15
15
|
}, n;
|
|
16
|
-
return typeof ResizeObserver < "u" && (n = new ResizeObserver(
|
|
17
|
-
n?.disconnect(), e.removeEventListener("scroll", t), window.removeEventListener("resize",
|
|
16
|
+
return typeof ResizeObserver < "u" && (n = new ResizeObserver(u), n.observe(e)), requestAnimationFrame(u), e.addEventListener("scroll", t), window.addEventListener("resize", u), () => {
|
|
17
|
+
n?.disconnect(), e.removeEventListener("scroll", t), window.removeEventListener("resize", u);
|
|
18
18
|
};
|
|
19
|
-
}, [
|
|
19
|
+
}, [u, i]), {
|
|
20
20
|
containerRef: r,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
fadeVisible: u,
|
|
21
|
+
hasOverflow: o,
|
|
22
|
+
fadeVisible: c,
|
|
24
23
|
fadeHeight: t,
|
|
25
24
|
resetHint: e.useCallback(() => {
|
|
26
25
|
a(!1), r.current && (r.current.scrollTop = 0);
|
|
27
26
|
}, []),
|
|
28
|
-
recompute:
|
|
27
|
+
recompute: u
|
|
29
28
|
};
|
|
30
29
|
}
|
|
31
30
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tesouro/embedded-components-react",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.29",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
"devDependencies": {
|
|
223
|
-
"postcss": "^8.5.
|
|
223
|
+
"postcss": "^8.5.31"
|
|
224
224
|
},
|
|
225
225
|
"dependencies": {
|
|
226
226
|
"@radix-ui/react-alert-dialog": "^1.1.23",
|