@tesouro/embedded-components-react 0.11.274 → 0.11.276

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 (27) hide show
  1. package/dist/index.css +61 -7
  2. package/dist/index.d.ts +1 -13
  3. package/dist/lib/RecentActivityWidget.d.ts +1 -13
  4. package/dist/lib/WidgetSuite.d.ts +1 -13
  5. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/ui/dist/lib/BalanceHistoryCard/BalanceHistoryCard.js +114 -111
  6. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/CreateAccountDialog.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index23.js +69 -69
  8. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CardControls/SpendLimitControl.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index4.js +1 -1
  11. package/dist/libs/tesouro-embedded-components-react/recent-activity-widget/feature/dist/lib/RecentActivityWidget/RecentActivityWidgetFeature.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/recent-activity-widget/feature/dist/lib/RecentActivityWidget/labels.js +1 -4
  13. package/dist/libs/tesouro-embedded-components-react/recent-activity-widget/feature/dist/lib/recentActivityView/buildRecentActivityRows.js +12 -19
  14. package/dist/libs/tesouro-embedded-components-react/recent-activity-widget/ui/dist/lib/RecentActivityCard/RecentActivityCard.js +0 -1
  15. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js +2 -2
  16. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +3 -2
  17. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +106 -106
  18. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +142 -146
  19. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useOwnedQueryClient.js +31 -0
  20. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AttentionStrip/AttentionStrip.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AttentionStrip/AttentionViewBar.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DueDateText/DueDateText.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +16 -14
  25. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +17 -14
  26. package/dist/packages/shared-ui-shadcn/dist/index.js +448 -417
  27. package/package.json +1 -1
@@ -5,46 +5,46 @@
5
5
  import { installStyleNonce as e } from "../../../../util/dist/lib/csp.js";
6
6
  import "../../../../util/dist/index.js";
7
7
  import { createClientSecretInstaller as t } from "../../../../data-access/dist/lib/scopedClientSecret.js";
8
- import { registerQueryClient as n, unregisterQueryClient as r } from "../../../../data-access/dist/lib/clientRegistry.js";
9
- import { createEmbeddedClient as i } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
10
- import { EmbedApiProvider as a, useEmbedApi as o } from "../../../../data-access/dist/lib/EmbedApiContext.js";
8
+ import { createEmbeddedClient as n } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
9
+ import { EmbedApiProvider as r, useEmbedApi as i } from "../../../../data-access/dist/lib/EmbedApiContext.js";
11
10
  import "../../../../data-access/dist/index.js";
12
- import { resolveUIFramework as ee } from "../../../../ui/dist/lib/UIContext/UIContext.js";
13
- import { UIProvider as te } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
14
- import { useDesignSystemEnsurer as ne, useFrameworkRenderer as re } from "../../../../ui/dist/lib/UIContext/uiRendererRegistry.js";
15
- import { HostIsolationScope as ie } from "../../../../ui/dist/lib/HostIsolationScope/HostIsolationScope.js";
11
+ import { resolveUIFramework as a } from "../../../../ui/dist/lib/UIContext/UIContext.js";
12
+ import { UIProvider as o } from "../../../../ui/dist/lib/UIContext/UIProvider.js";
13
+ import { useDesignSystemEnsurer as ee, useFrameworkRenderer as te } from "../../../../ui/dist/lib/UIContext/uiRendererRegistry.js";
14
+ import { HostIsolationScope as ne } from "../../../../ui/dist/lib/HostIsolationScope/HostIsolationScope.js";
16
15
  import { ErrorState as s } from "../../../../ui/dist/lib/ErrorState/ErrorState.js";
17
16
  import "../../../../ui/dist/index.js";
18
- import { getGlobalSnapshot as c, subscribeToGlobal as ae } from "./globalStore.js";
19
- import { EmbeddedAnalyticsEvent as l } from "../analytics/events.js";
20
- import { configureEmbeddedClient as oe } from "../analytics/client.js";
21
- import { generateCorrelationId as se } from "../analytics/ids.js";
22
- import { WidgetContext as u } from "./WidgetContext.js";
17
+ import { getGlobalSnapshot as re, subscribeToGlobal as ie } from "./globalStore.js";
18
+ import { EmbeddedAnalyticsEvent as c } from "../analytics/events.js";
19
+ import { configureEmbeddedClient as ae } from "../analytics/client.js";
20
+ import { generateCorrelationId as oe } from "../analytics/ids.js";
21
+ import { WidgetContext as se } from "./WidgetContext.js";
23
22
  import { noop as ce, resolveOrgId as le, useAuthEpoch as ue } from "./utils.js";
24
23
  import { useWidgetFetch as de } from "./useWidgetFetch.js";
25
24
  import { deriveOrganizationStatus as fe } from "./deriveOrganizationStatus.js";
26
25
  import { deriveWidgetInitState as pe, useWidgetInitPublisher as me } from "./useWidgetInitPublisher.js";
27
26
  import { useTokenRefreshRef as he } from "./useTokenRefreshRef.js";
28
- import { useAnalyticsTrack as d } from "../analytics/hooks.js";
29
- import { resolveProviderLabels as ge } from "./labels.js";
30
- import { WidgetErrorBoundary as _e } from "./WidgetErrorBoundary.js";
31
- import { DISCLOSURES_REQUIRED_TEST_ID as f, hasRenderableAcceptanceSurface as p, resolveDisclosuresBlockedReason as m, shouldGateOnDisclosuresAcceptance as ve } from "./isDisclosuresAcceptanceRequired.js";
32
- import { useContext as ye, useEffect as h, useMemo as g, useRef as _, useState as v, useSyncExternalStore as be } from "react";
33
- import { jsx as y, jsxs as xe } from "react/jsx-runtime";
34
- import { QueryClient as Se, QueryClientProvider as Ce } from "@tanstack/react-query";
27
+ import { useOwnedQueryClient as ge } from "./useOwnedQueryClient.js";
28
+ import { useAnalyticsTrack as l } from "../analytics/hooks.js";
29
+ import { resolveProviderLabels as _e } from "./labels.js";
30
+ import { WidgetErrorBoundary as ve } from "./WidgetErrorBoundary.js";
31
+ import { DISCLOSURES_REQUIRED_TEST_ID as u, hasRenderableAcceptanceSurface as d, resolveDisclosuresBlockedReason as f, shouldGateOnDisclosuresAcceptance as ye } from "./isDisclosuresAcceptanceRequired.js";
32
+ import { useContext as be, useEffect as p, useMemo as m, useRef as h, useState as g, useSyncExternalStore as xe } from "react";
33
+ import { jsx as _, jsxs as Se } from "react/jsx-runtime";
34
+ import { QueryClient as Ce, QueryClientProvider as we } from "@tanstack/react-query";
35
35
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js
36
- function b({ children: re, baseUrl: s, widgetToken: l, organizationId: d, configClient: f, gatewayRouting: p, linkComponent: m, uiFramework: b, errorFallback: Te, onError: Ee, analytics: x, disclosuresAcceptance: De, providerLabels: Oe, widgetName: S, header: ke }) {
36
+ function v({ children: te, baseUrl: s, widgetToken: c, organizationId: l, configClient: u, gatewayRouting: d, linkComponent: f, uiFramework: v, errorFallback: Ee, onError: De, analytics: y, disclosuresAcceptance: Oe, providerLabels: ke, widgetName: b, header: Ae }) {
37
37
  e();
38
- let C = ye(u), Ae = be(ae, c, c), w = C?.resolved ?? Ae, je = C?.refetch ?? ce, Me = C?.loading ?? !1, Ne = C?.error ?? null, T = s ?? w.baseUrl, E = l === void 0 ? w.widgetToken : l, Pe = C ? C.cascadeOrgId : Ae.organizationId, D = d === void 0 ? Pe : d, O = f ?? w.configClient, k = p ?? w.gatewayRouting, A = m ?? w.linkComponent, j = b ?? w.uiFramework, M = De ?? C?.disclosuresAcceptance, N = Oe ?? C?.providerLabels, Fe = g(() => ge(N), [N]), P = C === null, F = P ? x !== !1 : C.analytics.enabled, [Ie] = v(se), I = P ? Ie : C.analytics.rootCorrelationId, [Le] = v(se), L = S === void 0 ? C?.analytics.widgetName : S, R = S === void 0 ? C?.analytics.widgetInstanceId : Le, z = _({
38
+ let x = be(se), S = xe(ie, re, re), C = x?.resolved ?? S, je = x?.refetch ?? ce, Me = x?.loading ?? !1, Ne = x?.error ?? null, w = s ?? C.baseUrl, T = c === void 0 ? C.widgetToken : c, Pe = x ? x.cascadeOrgId : S.organizationId, E = l === void 0 ? Pe : l, D = u ?? C.configClient, O = d ?? C.gatewayRouting, k = f ?? C.linkComponent, A = v ?? C.uiFramework, j = Oe ?? x?.disclosuresAcceptance, M = ke ?? x?.providerLabels, N = m(() => _e(M), [M]), P = x === null, F = P ? y !== !1 : x.analytics.enabled, [Fe] = g(oe), I = P ? Fe : x.analytics.rootCorrelationId, [Ie] = g(oe), L = b === void 0 ? x?.analytics.widgetName : b, R = b === void 0 ? x?.analytics.widgetInstanceId : Ie, z = h({
39
39
  enabled: F,
40
- organizationId: D,
40
+ organizationId: E,
41
41
  rootCorrelationId: I,
42
42
  widgetName: L,
43
43
  widgetInstanceId: R
44
- }), Re = _(!1);
45
- h(() => {
46
- P || x === void 0 || Re.current || (Re.current = !0, console.warn("[tesouro-embedded] `analytics` on a nested WidgetProvider is ignored in v1. Set it on the outermost RootWidgetProvider or standalone WidgetProvider instead."));
47
- }, [x, P]), h(() => {
44
+ }), Le = h(!1);
45
+ p(() => {
46
+ P || y === void 0 || Le.current || (Le.current = !0, console.warn("[tesouro-embedded] `analytics` on a nested WidgetProvider is ignored in v1. Set it on the outermost RootWidgetProvider or standalone WidgetProvider instead."));
47
+ }, [y, P]), p(() => {
48
48
  if (!P || !F || !("window" in globalThis)) return;
49
49
  let e = !1;
50
50
  return import("../analytics/install.js").then(({ ensureAnalyticsAdapterInstalled: t }) => {
@@ -53,186 +53,182 @@ function b({ children: re, baseUrl: s, widgetToken: l, organizationId: d, config
53
53
  e = !0;
54
54
  };
55
55
  }, [P, F]);
56
- let B = ne(ee(j));
57
- h(() => {
56
+ let B = ee(a(A));
57
+ p(() => {
58
58
  B && B().catch(() => {});
59
59
  }, [B]);
60
- let V = C === null || s !== void 0 || l !== void 0 || d !== void 0 || f != null || p !== void 0 || S !== void 0, H = _(E);
61
- H.current = E;
62
- let ze = he(), Be = _(null), Ve = g(() => t(Be), []), He = o(), Ue = ue(E), U = g(() => {
63
- if (!V) return null;
64
- let e = oe(i(T), {
65
- tokenRef: H,
60
+ let Re = x === null || s !== void 0 || c !== void 0 || l !== void 0 || u != null || d !== void 0 || b !== void 0, ze = h(T);
61
+ ze.current = T;
62
+ let Be = he(), Ve = h(null), He = m(() => t(Ve), []), Ue = i(), We = ue(T), V = m(() => {
63
+ if (!Re) return null;
64
+ let e = ae(n(w), {
65
+ tokenRef: ze,
66
66
  analyticsContextRef: z,
67
- clientSecretRef: Be,
68
- gatewayRouting: k,
69
- refreshTokenRef: ze
67
+ clientSecretRef: Ve,
68
+ gatewayRouting: O,
69
+ refreshTokenRef: Be
70
70
  });
71
- return O ? O(e) : e;
71
+ return D ? D(e) : e;
72
72
  }, [
73
- V,
74
- T,
73
+ Re,
74
+ w,
75
+ D,
75
76
  O,
76
- k,
77
- ze
78
- ]), W = C === null || s !== void 0 || l !== void 0, We = W ? Ue : He.authEpoch, { result: G, loading: K, error: q, clearedForAuthChange: Ge, initStaleForToken: J, initReplacementPending: Ke, refetch: qe } = de(W ? U : null, W ? E : void 0, z), Je = W ? qe : je, Ye = W ? K : Me, Xe = W ? q : Ne, Ze = C?.resolved.initResponse, Qe = !W || !Ge && !q && !G && !!E && !K, Y = Qe ? Ze : G ?? void 0, X = Qe ? W || (C?.initResponseStaleForToken ?? !1) : J, $e = C === null, et = g(() => $e ? pe({
79
- hasToken: !!E,
80
- loading: K,
81
- error: q,
82
- initResponse: G ?? void 0,
83
- initStaleForToken: J
77
+ Be
78
+ ]), H = x === null || s !== void 0 || c !== void 0, Ge = H ? We : Ue.authEpoch, { result: U, loading: W, error: G, clearedForAuthChange: Ke, initStaleForToken: K, initReplacementPending: qe, refetch: Je } = de(H ? V : null, H ? T : void 0, z), Ye = H ? Je : je, Xe = H ? W : Me, q = H ? G : Ne, Ze = x?.resolved.initResponse, Qe = !H || !Ke && !G && !U && !!T && !W, J = Qe ? Ze : U ?? void 0, Y = Qe ? H || (x?.initResponseStaleForToken ?? !1) : K, $e = x === null, et = m(() => $e ? pe({
79
+ hasToken: !!T,
80
+ loading: W,
81
+ error: G,
82
+ initResponse: U ?? void 0,
83
+ initStaleForToken: K
84
84
  }) : null, [
85
85
  $e,
86
- E,
87
- K,
88
- q,
86
+ T,
87
+ W,
89
88
  G,
90
- J
89
+ U,
90
+ K
91
91
  ]);
92
- me(et, E);
93
- let Z = le(D, X ? void 0 : Y?.organizationId), tt = fe({
94
- organizationId: Z,
95
- cascadeOrgId: D,
96
- ownsFetch: W,
97
- parentStatus: He.organizationStatus,
98
- hasToken: !!E,
99
- loading: K,
100
- error: q,
101
- hasResult: !!G,
102
- initReplacementPending: Ke
103
- }), Q = g(() => ({
92
+ me(et, T);
93
+ let X = le(E, Y ? void 0 : J?.organizationId), tt = fe({
94
+ organizationId: X,
95
+ cascadeOrgId: E,
96
+ ownsFetch: H,
97
+ parentStatus: Ue.organizationStatus,
98
+ hasToken: !!T,
99
+ loading: W,
100
+ error: G,
101
+ hasResult: !!U,
102
+ initReplacementPending: qe
103
+ }), Z = m(() => ({
104
104
  enabled: F,
105
- organizationId: Z,
105
+ organizationId: X,
106
106
  rootCorrelationId: I,
107
107
  widgetName: L,
108
108
  widgetInstanceId: R
109
109
  }), [
110
110
  F,
111
- Z,
111
+ X,
112
112
  I,
113
113
  L,
114
114
  R
115
115
  ]);
116
- z.current = Q;
117
- let [$] = v(() => C === null ? new Se({ defaultOptions: {
116
+ z.current = Z;
117
+ let [Q] = g(() => x === null ? new Ce({ defaultOptions: {
118
118
  queries: {
119
119
  retry: !1,
120
120
  refetchOnWindowFocus: !1
121
121
  },
122
122
  mutations: { retry: !1 }
123
123
  } }) : null);
124
- h(() => {
125
- if (!$) return;
126
- let e = $;
127
- return n(e), () => r(e);
128
- }, [$]);
129
- let nt = g(() => ({
124
+ ge(Q);
125
+ let nt = m(() => ({
130
126
  baseUrl: s,
131
- widgetToken: l,
132
- organizationId: d,
133
- configClient: f,
134
- gatewayRouting: p,
135
- linkComponent: m,
136
- uiFramework: b
127
+ widgetToken: c,
128
+ organizationId: l,
129
+ configClient: u,
130
+ gatewayRouting: d,
131
+ linkComponent: f,
132
+ uiFramework: v
137
133
  }), [
138
134
  s,
135
+ c,
139
136
  l,
137
+ u,
140
138
  d,
141
139
  f,
142
- p,
143
- m,
144
- b
145
- ]), rt = g(() => ({
146
- baseUrl: T,
147
- widgetToken: E,
148
- organizationId: Z,
149
- configClient: O,
150
- gatewayRouting: k,
151
- linkComponent: A,
152
- uiFramework: j,
153
- initResponse: Y
140
+ v
141
+ ]), rt = m(() => ({
142
+ baseUrl: w,
143
+ widgetToken: T,
144
+ organizationId: X,
145
+ configClient: D,
146
+ gatewayRouting: O,
147
+ linkComponent: k,
148
+ uiFramework: A,
149
+ initResponse: J
154
150
  }), [
151
+ w,
155
152
  T,
156
- E,
157
- Z,
153
+ X,
154
+ D,
158
155
  O,
159
156
  k,
160
157
  A,
161
- j,
162
- Y
163
- ]), it = g(() => ({
158
+ J
159
+ ]), it = m(() => ({
164
160
  resolved: rt,
165
161
  own: nt,
166
- refetch: Je,
167
- loading: Ye,
168
- error: Xe,
169
- analytics: Q,
170
- cascadeOrgId: D,
171
- initResponseStaleForToken: X,
172
- disclosuresAcceptance: M,
173
- providerLabels: N
162
+ refetch: Ye,
163
+ loading: Xe,
164
+ error: q,
165
+ analytics: Z,
166
+ cascadeOrgId: E,
167
+ initResponseStaleForToken: Y,
168
+ disclosuresAcceptance: j,
169
+ providerLabels: M
174
170
  }), [
175
171
  rt,
176
172
  nt,
177
- Je,
178
173
  Ye,
179
174
  Xe,
180
- Q,
181
- D,
182
- X,
183
- M,
184
- N
185
- ]), at = /* @__PURE__ */ y(u.Provider, {
175
+ q,
176
+ Z,
177
+ E,
178
+ Y,
179
+ j,
180
+ M
181
+ ]), at = /* @__PURE__ */ _(se.Provider, {
186
182
  value: it,
187
- children: /* @__PURE__ */ y(te, {
188
- linkComponent: A,
189
- uiFramework: j,
190
- children: /* @__PURE__ */ xe(ie, { children: [ke, /* @__PURE__ */ y(_e, {
191
- resetKeys: [E],
192
- errorFallback: Te,
193
- onError: Ee,
194
- labels: Fe,
195
- children: ve(Y, S) ? /* @__PURE__ */ y(we, {
196
- disclosuresAcceptance: M,
197
- initStaleForToken: X,
198
- labels: Fe
199
- }) : re
183
+ children: /* @__PURE__ */ _(o, {
184
+ linkComponent: k,
185
+ uiFramework: A,
186
+ children: /* @__PURE__ */ Se(ne, { children: [Ae, /* @__PURE__ */ _(ve, {
187
+ resetKeys: [T],
188
+ errorFallback: Ee,
189
+ onError: De,
190
+ labels: N,
191
+ children: ye(J, b) ? /* @__PURE__ */ _(Te, {
192
+ disclosuresAcceptance: j,
193
+ initStaleForToken: Y,
194
+ labels: N
195
+ }) : te
200
196
  })] })
201
197
  })
202
- }), ot = U ? /* @__PURE__ */ y(a, {
203
- client: U,
204
- organizationId: Z,
205
- widgetToken: E,
206
- installClientSecret: Ve,
207
- authEpoch: We,
198
+ }), $ = V ? /* @__PURE__ */ _(r, {
199
+ client: V,
200
+ organizationId: X,
201
+ widgetToken: T,
202
+ installClientSecret: He,
203
+ authEpoch: Ge,
208
204
  organizationStatus: tt,
209
205
  children: at
210
206
  }) : at;
211
- return $ ? /* @__PURE__ */ y(Ce, {
212
- client: $,
213
- children: ot
214
- }) : ot;
207
+ return Q ? /* @__PURE__ */ _(we, {
208
+ client: Q,
209
+ children: $
210
+ }) : $;
215
211
  }
216
- function we({ disclosuresAcceptance: e, initStaleForToken: t, labels: n }) {
217
- let r = re("error-state") ?? s, i = d(), a = p(e), o = m({
212
+ function Te({ disclosuresAcceptance: e, initStaleForToken: t, labels: n }) {
213
+ let r = te("error-state") ?? s, i = l(), a = d(e), o = f({
218
214
  initStaleForToken: t,
219
215
  hasAcceptanceSurface: a
220
216
  });
221
- return h(() => {
222
- i(l.WidgetDisclosuresBlocked, { reason: o }), console.info(`[disclosures] widget blocked: ${o}`);
223
- }, [o, i]), t ? /* @__PURE__ */ y(r, {
217
+ return p(() => {
218
+ i(c.WidgetDisclosuresBlocked, { reason: o }), console.info(`[disclosures] widget blocked: ${o}`);
219
+ }, [o, i]), t ? /* @__PURE__ */ _(r, {
224
220
  title: n.disclosuresRefreshingTitle,
225
221
  description: n.disclosuresRefreshingDescription,
226
- testId: f,
222
+ testId: u,
227
223
  className: "ttw:w-full ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:py-7 ttw:text-card-foreground ttw:shadow-sm"
228
- }) : a ? /* @__PURE__ */ y("div", {
229
- "data-testid": f,
224
+ }) : a ? /* @__PURE__ */ _("div", {
225
+ "data-testid": u,
230
226
  className: "ttw:w-full",
231
227
  children: e
232
- }) : /* @__PURE__ */ y(r, {
228
+ }) : /* @__PURE__ */ _(r, {
233
229
  title: n.disclosuresRequiredTitle,
234
- testId: f,
230
+ testId: u,
235
231
  className: "ttw:w-full ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:py-7 ttw:text-card-foreground ttw:shadow-sm"
236
232
  });
237
233
  }
238
- export { b as WidgetProvider, b as default };
234
+ export { v as WidgetProvider, v as default };
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { registerQueryClient as e, unregisterQueryClient as t } from "../../../../data-access/dist/lib/clientRegistry.js";
6
+ import "../../../../data-access/dist/index.js";
7
+ import { useEffect as n, useRef as r } from "react";
8
+ // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useOwnedQueryClient.js
9
+ function i(i) {
10
+ let a = r(void 0);
11
+ n(() => {
12
+ if (i) return a.current?.(), e(i), () => {
13
+ t(i);
14
+ let e = !1, n, r = setTimeout(() => {
15
+ i.cancelQueries().then(() => {
16
+ if (e) return;
17
+ for (let e of i.getMutationCache().getAll()) e.destroy();
18
+ i.clear();
19
+ let t = i.getQueryCache(), r = !1;
20
+ n = t.subscribe((e) => {
21
+ e.type === "added" && !r ? t.remove(e.query) : e.type === "observerAdded" && (r = !0, t.add(e.query));
22
+ });
23
+ });
24
+ }, 0);
25
+ a.current = () => {
26
+ e = !0, clearTimeout(r), n?.();
27
+ };
28
+ };
29
+ }, [i]);
30
+ }
31
+ export { i as useOwnedQueryClient };
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.274", n = "d1b3f9e4daf0f77be32cce90fb077c220ec1489e", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.276", n = "906142414581e930d666b1e4c9960ddc711f9a99", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -5,7 +5,7 @@ var r = {
5
5
  warning: "ttw:border-warning/40 ttw:bg-warning-subtle ttw:text-warning-foreground ttw:hover:border-warning",
6
6
  destructive: "ttw:border-destructive/40 ttw:bg-destructive-subtle ttw:text-destructive-subtle-foreground ttw:hover:border-destructive"
7
7
  }, i = {
8
- warning: "ttw:border-warning ttw:bg-warning ttw:text-destructive-foreground",
8
+ warning: "ttw:border-warning-foreground ttw:bg-warning-subtle ttw:text-warning-foreground ttw:ring-1 ttw:ring-inset ttw:ring-warning-foreground",
9
9
  destructive: "ttw:border-destructive ttw:bg-destructive ttw:text-destructive-foreground"
10
10
  };
11
11
  function a({ label: a, items: o, className: s }) {
@@ -3,7 +3,7 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
3
3
  import { ChevronLeftIcon as a } from "lucide-react";
4
4
  // ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/AttentionStrip/AttentionViewBar.js
5
5
  var o = {
6
- warning: "ttw:text-warning",
6
+ warning: "ttw:text-warning-foreground",
7
7
  destructive: "ttw:text-destructive"
8
8
  };
9
9
  function s({ backLabel: s, backAccessibleLabel: c, title: l, tone: u, onBack: d }) {
@@ -5,7 +5,7 @@ function r({ label: r, overdueLabel: i, accessibleLabel: a }) {
5
5
  return i ? /* @__PURE__ */ t(e, {
6
6
  hint: r,
7
7
  children: /* @__PURE__ */ n("span", {
8
- className: "ttw:text-destructive",
8
+ className: "ttw:text-destructive-subtle-foreground",
9
9
  children: [/* @__PURE__ */ t("span", {
10
10
  "aria-hidden": !0,
11
11
  children: i
@@ -23,27 +23,27 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
23
23
  ...R
24
24
  }, [V, H] = u.useState(null), U = u.useCallback((e) => {
25
25
  H(e);
26
- }, []), W = u.useRef(null), G = u.useRef(b);
26
+ }, []), W = u.useRef(null), G = u.useId(), K = u.useRef(b);
27
27
  u.useEffect(() => {
28
- if (G.current === b || (G.current = b, !V)) return;
28
+ if (K.current === b || (K.current = b, !V)) return;
29
29
  let { activeElement: e, body: t } = V.ownerDocument;
30
30
  (!e || e === t || V.contains(e)) && W.current?.focus({ preventScroll: !0 }), V.getBoundingClientRect().top < m(V) && V.scrollIntoView({ block: "start" });
31
31
  }, [b, V]);
32
- let K = u.useRef(v);
32
+ let q = u.useRef(v);
33
33
  u.useEffect(() => {
34
- K.current && W.current?.focus();
34
+ q.current && W.current?.focus();
35
35
  }, []);
36
- let q = u.useMemo(() => ({ container: V }), [V]), J = P || O, Y = j ? /* @__PURE__ */ d(e, {
36
+ let J = u.useMemo(() => ({ container: V }), [V]), Y = P || O, X = j ? /* @__PURE__ */ d(e, {
37
37
  type: "button",
38
38
  variant: "outline",
39
- disabled: A || J,
39
+ disabled: A || Y,
40
40
  onClick: C,
41
41
  "aria-label": M,
42
42
  "data-testid": z?.back,
43
43
  children: B.backButton
44
44
  }) : null;
45
45
  return /* @__PURE__ */ d(s.Provider, {
46
- value: q,
46
+ value: J,
47
47
  children: /* @__PURE__ */ f("div", {
48
48
  ref: U,
49
49
  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",
@@ -54,6 +54,7 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
54
54
  children: [
55
55
  /* @__PURE__ */ d(t, {
56
56
  variant: "page",
57
+ id: G,
57
58
  ref: W,
58
59
  tabIndex: -1,
59
60
  className: r("ttw:outline-none", _ ? "ttw:sr-only" : "ttw:text-foreground"),
@@ -68,13 +69,14 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
68
69
  activeStep: b,
69
70
  labels: R,
70
71
  onStepClick: x,
71
- isStepClickDisabled: J,
72
+ isStepClickDisabled: Y,
72
73
  stepButtonTestIdPrefix: z?.stepButton
73
74
  })
74
75
  ]
75
76
  }),
76
77
  /* @__PURE__ */ d(l, {
77
78
  activeStep: b,
79
+ labelledBy: G,
78
80
  testIds: z?.scrollRegion,
79
81
  children: L
80
82
  }),
@@ -98,7 +100,7 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
98
100
  children: [k ? /* @__PURE__ */ f(e, {
99
101
  type: "button",
100
102
  variant: "ghost",
101
- disabled: J,
103
+ disabled: Y,
102
104
  onClick: k,
103
105
  className: "ttw:max-w-full ttw:whitespace-normal ttw:text-destructive ttw:hover:text-destructive",
104
106
  "data-testid": z?.delete,
@@ -106,14 +108,14 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
106
108
  className: "ttw:size-4",
107
109
  "aria-hidden": !0
108
110
  }), B.deleteButton]
109
- }) : Y, /* @__PURE__ */ f("div", {
111
+ }) : X, /* @__PURE__ */ f("div", {
110
112
  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",
111
113
  children: [
112
- k ? Y : null,
114
+ k ? X : null,
113
115
  T ? /* @__PURE__ */ d(e, {
114
116
  type: "button",
115
117
  variant: "ghost",
116
- disabled: J,
118
+ disabled: Y,
117
119
  onClick: T,
118
120
  "data-testid": z?.cancel,
119
121
  children: B.cancelButton
@@ -121,7 +123,7 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
121
123
  E ? /* @__PURE__ */ d(e, {
122
124
  type: "button",
123
125
  variant: "secondary",
124
- disabled: D || J,
126
+ disabled: D || Y,
125
127
  loading: O,
126
128
  onClick: E,
127
129
  "data-testid": z?.saveAndClose,
@@ -129,7 +131,7 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
129
131
  }) : null,
130
132
  /* @__PURE__ */ d(e, {
131
133
  type: "button",
132
- disabled: N || J,
134
+ disabled: N || Y,
133
135
  loading: P,
134
136
  onClick: w,
135
137
  "data-testid": z?.next,
@@ -20,26 +20,29 @@ function a(e) {
20
20
  }, [e])
21
21
  };
22
22
  }
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);
23
+ function o({ activeStep: o, labelledBy: s, children: c, testIds: l }) {
24
+ let { containerRef: u, hasOverflow: d, fadeVisible: f, fadeHeight: p, resetHint: m } = e(), { mounted: h, visible: g, onTransitionEnd: _ } = a(f);
25
25
  return t.useEffect(() => {
26
- p();
27
- }, [o, p]), /* @__PURE__ */ r("div", {
28
- ref: l,
29
- className: "ttw:relative ttw:min-h-0 ttw:overflow-y-auto ttw:px-8 ttw:pt-2",
30
- "data-testid": c?.root,
26
+ m();
27
+ }, [o, m]), /* @__PURE__ */ r("div", {
28
+ ref: u,
29
+ role: "region",
30
+ "aria-labelledby": s,
31
+ tabIndex: 0,
32
+ className: "ttw:relative ttw:min-h-0 ttw:overflow-y-auto ttw:px-8 ttw:pt-2 ttw:outline-none ttw:focus-visible:outline-2 ttw:focus-visible:-outline-offset-2 ttw:focus-visible:outline-ring",
33
+ "data-testid": l?.root,
31
34
  children: [/* @__PURE__ */ n("div", {
32
35
  className: "ttw:pb-4",
33
- children: s
34
- }), u && m ? /* @__PURE__ */ n("div", {
36
+ children: c
37
+ }), d && h ? /* @__PURE__ */ n("div", {
35
38
  "aria-hidden": !0,
36
- "data-testid": c?.fade,
37
- onTransitionEnd: g,
39
+ "data-testid": l?.fade,
40
+ onTransitionEnd: _,
38
41
  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
42
  style: {
40
- height: f,
41
- marginTop: `-${f}px`,
42
- opacity: +!!h,
43
+ height: p,
44
+ marginTop: `-${p}px`,
45
+ opacity: +!!g,
43
46
  transitionDuration: `${i}ms`,
44
47
  background: "linear-gradient(to bottom, transparent 0%, var(--ttw-background) 85%, var(--ttw-background) 100%)"
45
48
  }