@tesouro/embedded-components-react 0.2.252 → 0.2.253

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 (33) hide show
  1. package/dist/experimental/WidgetSuite.d.ts +649 -25
  2. package/dist/experimental/WidgetSuite.js +5 -2
  3. package/dist/experimental/index.d.ts +649 -25
  4. package/dist/experimental/index.js +5 -2
  5. package/dist/index.css +22 -2
  6. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index.js +2 -2
  9. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/{index3.js → lib/AccountCard.js} +3 -3
  10. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/{index6.js → lib/BankAccountsWidgetUi.js} +7 -7
  11. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/{index4.js → lib/BankingHeader.js} +2 -2
  12. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/{index5.js → lib/CreateAccountDialog.js} +4 -4
  13. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/{index2.js → lib/labels.js} +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/index.js +3 -3
  16. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/{index3.js → lib/SettingsWidgetUi/SettingsWidgetUi.js} +3 -3
  17. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/index.js +2 -0
  18. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/{index2.js → lib/SettingsWidgetUi/labels.js} +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +4 -0
  20. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +4 -0
  21. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +4 -0
  22. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/UIContext/UIProvider.js +4 -0
  24. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index.js +5 -2
  25. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index2.js +4 -0
  26. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index3.js +8 -0
  27. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +34 -0
  28. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +59 -0
  29. package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index.js +3 -3
  30. package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index2.js +6 -3
  31. package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index3.js +70 -18
  32. package/package.json +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/index4.js +0 -2
@@ -1,3 +1,6 @@
1
- import { WidgetSuiteStyleProbe as e } from "../libs/tesouro-embedded-components-react/widget-suite/ui/dist/index3.js";
1
+ import { WIDGET_SUITE_SECTION_LABELS_EN as e } from "../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index3.js";
2
+ import { WidgetSuiteSectionId as t } from "../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js";
3
+ import { WIDGET_SUITE_SHELL_LABELS_EN as n } from "../libs/tesouro-embedded-components-react/widget-suite/ui/dist/index2.js";
4
+ import { WidgetSuite as r } from "../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js";
2
5
  import "./WidgetSuite.js";
3
- export { e as WidgetSuiteStyleProbe };
6
+ export { e as WIDGET_SUITE_SECTION_LABELS_EN, n as WIDGET_SUITE_SHELL_LABELS_EN, r as WidgetSuite, t as WidgetSuiteSectionId };
package/dist/index.css CHANGED
@@ -449,6 +449,9 @@
449
449
  .ttw\:mr-auto {
450
450
  margin-right: auto;
451
451
  }
452
+ .ttw\:-mb-px {
453
+ margin-bottom: -1px;
454
+ }
452
455
  .ttw\:mb-0 {
453
456
  margin-bottom: 0px;
454
457
  }
@@ -916,8 +919,8 @@
916
919
  .ttw\:min-h-\[300px\] {
917
920
  min-height: 300px;
918
921
  }
919
- .ttw\:min-h-\[364px\] {
920
- min-height: 364px;
922
+ .ttw\:min-h-\[432px\] {
923
+ min-height: 432px;
921
924
  }
922
925
  .ttw\:min-h-\[1123px\] {
923
926
  min-height: 1123px;
@@ -2015,6 +2018,10 @@
2015
2018
  border-bottom-style: var(--tw-border-style);
2016
2019
  border-bottom-width: 0px;
2017
2020
  }
2021
+ .ttw\:border-b-2 {
2022
+ border-bottom-style: var(--tw-border-style);
2023
+ border-bottom-width: 2px;
2024
+ }
2018
2025
  .ttw\:border-l {
2019
2026
  border-left-style: var(--tw-border-style);
2020
2027
  border-left-width: 1px;
@@ -2660,6 +2667,9 @@
2660
2667
  .ttw\:p-8 {
2661
2668
  padding: calc(var(--ttw-spacing) * 8);
2662
2669
  }
2670
+ .ttw\:p-10 {
2671
+ padding: calc(var(--ttw-spacing) * 10);
2672
+ }
2663
2673
  .ttw\:p-12 {
2664
2674
  padding: calc(var(--ttw-spacing) * 12);
2665
2675
  }
@@ -4075,6 +4085,9 @@
4075
4085
  .ttw\:hover\:border-\[\#EAECF0\]:hover {
4076
4086
  border-color: #EAECF0;
4077
4087
  }
4088
+ .ttw\:hover\:border-border:hover {
4089
+ border-color: var(--ttw-border);
4090
+ }
4078
4091
  .ttw\:hover\:border-indigo-700:hover {
4079
4092
  border-color: var(--ttw-color-indigo-700);
4080
4093
  }
@@ -4428,6 +4441,13 @@
4428
4441
  outline-style: var(--tw-outline-style);
4429
4442
  outline-width: 1px;
4430
4443
  }
4444
+ .ttw\:focus-visible\:outline-2:focus-visible {
4445
+ outline-style: var(--tw-outline-style);
4446
+ outline-width: 2px;
4447
+ }
4448
+ .ttw\:focus-visible\:outline-offset-2:focus-visible {
4449
+ outline-offset: 2px;
4450
+ }
4431
4451
  .ttw\:focus-visible\:outline-ring:focus-visible {
4432
4452
  outline-color: var(--ttw-ring);
4433
4453
  }
@@ -15,7 +15,7 @@ import { copyTextToClipboard as ae, formatAmountLabel as a, formatTotalAvailable
15
15
  import { DEFAULT_FEATURE_LABELS as se } from "./index4.js";
16
16
  import { getBankAccountsPermissions as ce } from "./index5.js";
17
17
  import { toAccessRows as le, toOrganizationRoleOptions as ue, toTeamMembers as de } from "./index6.js";
18
- import { DEFAULT_LABELS as fe } from "../../ui/dist/index2.js";
18
+ import { DEFAULT_LABELS as fe } from "../../ui/dist/lib/labels.js";
19
19
  import "../../ui/dist/index.js";
20
20
  import { useCreateBankAccountMutation as pe } from "../../data-access/dist/index3.js";
21
21
  import { useGrantBankAccountAccessMutation as me } from "../../data-access/dist/index4.js";
@@ -7,7 +7,7 @@ import "../../../shared/ui/dist/index.js";
7
7
  import { WidgetProvider as t } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
8
8
  import "../../../shared/feature/dist/index.js";
9
9
  import { WIDGET_NAME as n } from "./index2.js";
10
- import { BankAccountsWidgetUi as r } from "../../ui/dist/index6.js";
10
+ import { BankAccountsWidgetUi as r } from "../../ui/dist/lib/BankAccountsWidgetUi.js";
11
11
  import "../../ui/dist/index.js";
12
12
  import { useBankAccountsWidget as i } from "./index7.js";
13
13
  import { AccountDetailsWidget as a } from "../../account-details/feature/dist/index8.js";
@@ -1,3 +1,3 @@
1
- import { DEFAULT_LABELS as e } from "./index2.js";
2
- import { BankAccountsWidgetUi as t } from "./index6.js";
1
+ import { DEFAULT_LABELS as e } from "./lib/labels.js";
2
+ import { BankAccountsWidgetUi as t } from "./lib/BankAccountsWidgetUi.js";
3
3
  export { t as BankAccountsWidgetUi, e as DEFAULT_LABELS };
@@ -2,11 +2,11 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { formatOpenAccountAriaLabel as t } from "./index2.js";
5
+ import { Button as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { formatOpenAccountAriaLabel as t } from "./labels.js";
7
7
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
8
8
  import { CheckCircle2Icon as i, CopyIcon as a, EyeIcon as o, EyeOffIcon as s, PlusIcon as c } from "lucide-react";
9
- //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index3.js
9
+ //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js
10
10
  var l = "ttw:absolute ttw:inset-0 ttw:z-0 ttw:cursor-pointer ttw:rounded-xl ttw:border-0 ttw:bg-transparent ttw:outline-none focus-visible:ttw:ring-2 focus-visible:ttw:ring-ring focus-visible:ttw:ring-offset-2", u = "ttw:pointer-events-auto ttw:relative ttw:z-10 ttw:size-7 ttw:text-primary";
11
11
  function d({ labels: c, card: d, testId: f }) {
12
12
  return /* @__PURE__ */ r("article", {
@@ -2,14 +2,14 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { InlineErrorAlert as e } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
6
- import "../../../shared/ui/dist/index.js";
7
- import { DEFAULT_LABELS as t } from "./index2.js";
8
- import { AccountCard as n, AddAccountCard as r } from "./index3.js";
9
- import { AccountCardSkeleton as i, BankingHeader as a } from "./index4.js";
10
- import { CreateAccountDialog as o } from "./index5.js";
5
+ import { InlineErrorAlert as e } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
6
+ import "../../../../shared/ui/dist/index.js";
7
+ import { DEFAULT_LABELS as t } from "./labels.js";
8
+ import { AccountCard as n, AddAccountCard as r } from "./AccountCard.js";
9
+ import { AccountCardSkeleton as i, BankingHeader as a } from "./BankingHeader.js";
10
+ import { CreateAccountDialog as o } from "./CreateAccountDialog.js";
11
11
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
12
- //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index6.js
12
+ //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js
13
13
  function u({ labels: u, "data-testid": d, title: f, bankDisplayName: p, bankLogoSrc: m, bankLogoAlt: h, availableBalanceLabel: g, shouldDisplayAvailableBalance: _, isBankingTaglineVisible: v, accountCards: y, accountCardTestId: b, shouldDisplayAddAccountCard: x, isLoading: S, isError: C, isCreateOpen: w, createForm: T, legalCopy: E, accessRows: D, isTeamMembersLoading: O, isTeamMembersError: k, isCreateSubmitDisabled: A, isCreateError: j, hasNicknameError: M, isSubmitting: N, isCreateDisabled: P, onCreateOpenChange: F, onCreateFormChange: I, onCreateSubmit: L, onAddAccountClick: R }) {
14
14
  let z = {
15
15
  ...t,
@@ -2,10 +2,10 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Skeleton as e, Tooltip as t, TooltipContent as n, TooltipProvider as r, TooltipTrigger as i, Typography as a } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
5
+ import { Skeleton as e, Tooltip as t, TooltipContent as n, TooltipProvider as r, TooltipTrigger as i, Typography as a } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
6
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
7
  import { HelpCircleIcon as c } from "lucide-react";
8
- //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index4.js
8
+ //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankingHeader.js
9
9
  function l({ labels: e, title: l, bankDisplayName: u, bankLogoSrc: d, bankLogoAlt: f, availableBalanceLabel: p, shouldDisplayAvailableBalance: m, isBankingTaglineVisible: h }) {
10
10
  return /* @__PURE__ */ s("header", {
11
11
  className: "ttw:mb-6 ttw:space-y-2",
@@ -2,13 +2,13 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o, Input as s, Label as c, Skeleton as l, Switch as u, Tooltip as d, TooltipContent as f, TooltipProvider as p, TooltipTrigger as m } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { InlineErrorAlert as h } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
7
- import "../../../shared/ui/dist/index.js";
5
+ import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o, Input as s, Label as c, Skeleton as l, Switch as u, Tooltip as d, TooltipContent as f, TooltipProvider as p, TooltipTrigger as m } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { InlineErrorAlert as h } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
7
+ import "../../../../shared/ui/dist/index.js";
8
8
  import { Fragment as g } from "react";
9
9
  import { jsx as _, jsxs as v } from "react/jsx-runtime";
10
10
  import { HelpCircleIcon as y, XIcon as b } from "lucide-react";
11
- //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index5.js
11
+ //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/CreateAccountDialog.js
12
12
  function x(e, t, n, r) {
13
13
  return e.split(/(\{bankName\}|\{vspName\}|\{agreementLink\})/g).map((e, i) => e === "{bankName}" ? t : e === "{vspName}" ? n : e === "{agreementLink}" ? /* @__PURE__ */ _(g, { children: r }, i) : e);
14
14
  }
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index2.js
1
+ //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js
2
2
  var e = {
3
3
  title: "Accounts",
4
4
  bankingTaglinePrefix: "Business Banking provided by",
@@ -26,7 +26,7 @@ import { TagsWidget as m } from "../../../tags-widget/feature/dist/index11.js";
26
26
  import "../../../tags-widget/feature/dist/index.js";
27
27
  import { TeamWidget as h } from "../../../team-widget/feature/dist/index17.js";
28
28
  import "../../../team-widget/feature/dist/index.js";
29
- import { SettingsWidgetUi as g } from "../../ui/dist/index3.js";
29
+ import { SettingsWidgetUi as g } from "../../ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js";
30
30
  import "../../ui/dist/index.js";
31
31
  import { useEffect as _, useState as v } from "react";
32
32
  import { jsx as y } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import "./index2.js";
2
- import { SettingsWidgetUi as e } from "./index3.js";
3
- import "./index4.js";
1
+ import "./lib/SettingsWidgetUi/labels.js";
2
+ import { SettingsWidgetUi as e } from "./lib/SettingsWidgetUi/SettingsWidgetUi.js";
3
+ import "./lib/SettingsWidgetUi/index.js";
4
4
  export { e as SettingsWidgetUi };
@@ -2,10 +2,10 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { DEFAULT_LABELS as i } from "./index2.js";
5
+ import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { DEFAULT_LABELS as i } from "./labels.js";
7
7
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
- //#region ../../libs/tesouro-embedded-components-react/settings-widget/ui/dist/index3.js
8
+ //#region ../../libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js
9
9
  function s({ labels: s, sections: c, selectedSectionId: l, onSectionChange: u }) {
10
10
  let d = {
11
11
  ...i,
@@ -0,0 +1,2 @@
1
+ import "./labels.js";
2
+ import "./SettingsWidgetUi.js";
@@ -1,4 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/settings-widget/ui/dist/index2.js
1
+ //#region ../../libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/labels.js
2
2
  var e = { title: "Settings" };
3
3
  //#endregion
4
4
  export { e as DEFAULT_LABELS };
@@ -1,3 +1,7 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
1
5
  import { client as e } from "./rest/client.gen.js";
2
6
  import { createContext as t, useContext as n, useMemo as r } from "react";
3
7
  import { jsx as i } from "react/jsx-runtime";
@@ -1,3 +1,7 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
1
5
  import { registerQueryClient as e, unregisterQueryClient as t } from "../../../../data-access/dist/lib/clientRegistry.js";
2
6
  import { createEmbeddedClient as ee } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
3
7
  import { EmbedApiProvider as n } from "../../../../data-access/dist/lib/EmbedApiContext.js";
@@ -1,3 +1,7 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
1
5
  import { registerQueryClient as e, unregisterQueryClient as t } from "../../../../data-access/dist/lib/clientRegistry.js";
2
6
  import { createEmbeddedClient as n } from "../../../../data-access/dist/lib/createEmbeddedClient.js";
3
7
  import { EmbedApiProvider as ee, useEmbedApi as te } from "../../../../data-access/dist/lib/EmbedApiContext.js";
@@ -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.2.252", n = "564dda023d90103959a7f30ad006c2dbdfeb4f44", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.2.253", n = "6a1ab1e8411dbf2ea634a7be5dfce3d8108b1aff", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -1,3 +1,7 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
1
5
  import { DefaultLinkComponent as e, UIContext as t, resolveUIFramework as n } from "./UIContext.js";
2
6
  import { useContext as r, useMemo as i } from "react";
3
7
  import { jsx as a } from "react/jsx-runtime";
@@ -1,3 +1,6 @@
1
- import { WidgetSuiteStyleProbe as e } from "../../ui/dist/index3.js";
1
+ import { WIDGET_SUITE_SECTION_LABELS_EN as e } from "./index3.js";
2
+ import { WidgetSuiteSectionId as t } from "./index4.js";
3
+ import { WIDGET_SUITE_SHELL_LABELS_EN as n } from "../../ui/dist/index2.js";
2
4
  import "../../ui/dist/index.js";
3
- export { e as WidgetSuiteStyleProbe };
5
+ import { WidgetSuite as r } from "./index5.js";
6
+ export { e as WIDGET_SUITE_SECTION_LABELS_EN, n as WIDGET_SUITE_SHELL_LABELS_EN, r as WidgetSuite, t as WidgetSuiteSectionId };
@@ -0,0 +1,4 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index2.js
2
+ var e = { Mounted: "widget_suite.mounted" }, t = "widget_suite";
3
+ //#endregion
4
+ export { t as WIDGET_NAME, e as WidgetSuiteAnalyticsEvent };
@@ -0,0 +1,8 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index3.js
2
+ var e = {
3
+ accounts: "Accounts",
4
+ cards: "Cards",
5
+ settings: "Settings"
6
+ };
7
+ //#endregion
8
+ export { e as WIDGET_SUITE_SECTION_LABELS_EN };
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
+ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
+ import "../../../shared/data-access/dist/index.js";
8
+ import { CardProgram as n } from "../../../shared/feature/dist/lib/card/cardProgram.js";
9
+ import "../../../shared/feature/dist/index.js";
10
+ import { BankAccountsWidget as r } from "../../../bank-accounts-widget/feature/dist/index8.js";
11
+ import "../../../bank-accounts-widget/feature/dist/index.js";
12
+ import { CardsWidget as i } from "../../../cards-widget/feature/dist/index8.js";
13
+ import "../../../cards-widget/feature/dist/index.js";
14
+ import { SettingsWidget as a } from "../../../settings-widget/feature/dist/index5.js";
15
+ import "../../../settings-widget/feature/dist/index.js";
16
+ import { jsx as o } from "react/jsx-runtime";
17
+ //#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js
18
+ var s = {
19
+ Accounts: "accounts",
20
+ Cards: "cards",
21
+ Settings: "settings"
22
+ }, c = {
23
+ [s.Accounts]: {
24
+ anyOfScopes: [t.BankAccountReadOrg, t.ExternalBankAccountReadOrg],
25
+ render: () => /* @__PURE__ */ o(r, {})
26
+ },
27
+ [s.Cards]: {
28
+ anyOfScopes: [t.CreditCardReadOrg, t.DebitCardReadOrg],
29
+ render: (r) => /* @__PURE__ */ o(i, { cardProgram: e(r, [t.CreditCardReadOrg]) ? n.Credit : n.Debit })
30
+ },
31
+ [s.Settings]: { render: () => /* @__PURE__ */ o(a, {}) }
32
+ };
33
+ //#endregion
34
+ export { c as WIDGET_SUITE_SECTIONS, s as WidgetSuiteSectionId };
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
+ import "../../../shared/data-access/dist/index.js";
7
+ import { useAnalyticsTrack as t } from "../../../shared/feature/dist/lib/analytics/hooks.js";
8
+ import { WidgetProvider as n } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
9
+ import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
10
+ import "../../../shared/feature/dist/index.js";
11
+ import { WIDGET_SUITE_SECTION_LABELS_EN as i } from "./index3.js";
12
+ import { WIDGET_SUITE_SECTIONS as a } from "./index4.js";
13
+ import { WIDGET_NAME as o, WidgetSuiteAnalyticsEvent as s } from "./index2.js";
14
+ import { WidgetSuiteShell as c } from "../../ui/dist/index3.js";
15
+ import "../../ui/dist/index.js";
16
+ import { useEffect as l, useState as u } from "react";
17
+ import { jsx as d } from "react/jsx-runtime";
18
+ //#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js
19
+ function f({ sections: n, labels: o, sectionLabels: f }) {
20
+ let p = t();
21
+ l(() => {
22
+ p(s.Mounted);
23
+ }, [p]);
24
+ let m = {
25
+ ...i,
26
+ ...f
27
+ }, { initResponse: h } = r(), g = h?.scopes, _ = n.flatMap((t) => {
28
+ let n = a[t];
29
+ return !n || n.anyOfScopes && !e(g, n.anyOfScopes) ? [] : [{
30
+ id: t,
31
+ label: m[t],
32
+ content: n.render(g)
33
+ }];
34
+ }), [v, y] = u(n[0] ?? ""), b = _.some((e) => e.id === v) ? v : _[0]?.id ?? "";
35
+ return /* @__PURE__ */ d(c, {
36
+ sections: _,
37
+ selectedSectionId: b,
38
+ onSectionChange: y,
39
+ labels: o
40
+ });
41
+ }
42
+ function p({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, linkComponent: a, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: p, ...m }) {
43
+ return /* @__PURE__ */ d(n, {
44
+ widgetName: o,
45
+ baseUrl: e,
46
+ widgetToken: t,
47
+ organizationId: r,
48
+ configClient: i,
49
+ linkComponent: a,
50
+ implementation: s,
51
+ uiFramework: c,
52
+ errorFallback: l,
53
+ onError: u,
54
+ analytics: p,
55
+ children: /* @__PURE__ */ d(f, { ...m })
56
+ });
57
+ }
58
+ //#endregion
59
+ export { p as WidgetSuite, p as default };
@@ -1,3 +1,3 @@
1
- import "./index2.js";
2
- import { WidgetSuiteStyleProbe as e } from "./index3.js";
3
- export { e as WidgetSuiteStyleProbe };
1
+ import { WIDGET_SUITE_SHELL_LABELS_EN as e } from "./index2.js";
2
+ import { WidgetSuiteShell as t } from "./index3.js";
3
+ export { e as WIDGET_SUITE_SHELL_LABELS_EN, t as WidgetSuiteShell };
@@ -1,7 +1,10 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/widget-suite/ui/dist/index2.js
2
2
  var e = {
3
- title: "Widget suite styling is wired",
4
- body: "This box is 364px tall and uses theme tokens. If it is unstyled, this library is missing from the generated Tailwind @source block."
3
+ navAriaLabel: "Sections",
4
+ emptyState: {
5
+ title: "Nothing available here",
6
+ body: "This account doesn't have access to any of this page's sections."
7
+ }
5
8
  };
6
9
  //#endregion
7
- export { e as WIDGET_SUITE_STYLE_PROBE_LABELS_EN };
10
+ export { e as WIDGET_SUITE_SHELL_LABELS_EN };
@@ -1,25 +1,77 @@
1
- import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { WIDGET_SUITE_STYLE_PROBE_LABELS_EN as t } from "./index2.js";
3
- import { useMemo as n } from "react";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Typography as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { WIDGET_SUITE_SHELL_LABELS_EN as n } from "./index2.js";
7
+ import { useRef as r } from "react";
8
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
9
  //#region ../../libs/tesouro-embedded-components-react/widget-suite/ui/dist/index3.js
6
- var a = ({ labels: a }) => {
7
- let o = n(() => ({
8
- ...t,
9
- ...a
10
- }), [a]);
11
- return /* @__PURE__ */ i("div", {
12
- "data-testid": "widget-suite-style-probe",
13
- className: "ttw:flex ttw:min-h-[364px] ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-2 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted ttw:p-6 ttw:text-center",
14
- children: [/* @__PURE__ */ r(e, {
10
+ function o({ sections: o, selectedSectionId: s, onSectionChange: c, labels: l }) {
11
+ let u = {
12
+ ...n,
13
+ ...l,
14
+ emptyState: {
15
+ ...n.emptyState,
16
+ ...l?.emptyState
17
+ }
18
+ }, d = r([]), f = o.find((e) => e.id === s), p = (e, t) => {
19
+ let n = o.length - 1, r;
20
+ switch (e.key) {
21
+ case "ArrowRight":
22
+ r = t === n ? 0 : t + 1;
23
+ break;
24
+ case "ArrowLeft":
25
+ r = t === 0 ? n : t - 1;
26
+ break;
27
+ case "Home":
28
+ r = 0;
29
+ break;
30
+ case "End":
31
+ r = n;
32
+ break;
33
+ default: return;
34
+ }
35
+ e.preventDefault(), d.current[r]?.focus();
36
+ };
37
+ return o.length === 0 ? /* @__PURE__ */ a("section", {
38
+ className: "ttw:flex ttw:w-full ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-2 ttw:rounded-lg ttw:border ttw:border-border ttw:p-10 ttw:text-center",
39
+ children: [/* @__PURE__ */ i(e, {
15
40
  variant: "h5",
16
- children: o.title
17
- }), /* @__PURE__ */ r(e, {
41
+ children: u.emptyState.title
42
+ }), /* @__PURE__ */ i(e, {
18
43
  variant: "body2",
19
44
  color: "muted",
20
- children: o.body
45
+ children: u.emptyState.body
46
+ })]
47
+ }) : /* @__PURE__ */ a("section", {
48
+ className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-6",
49
+ children: [/* @__PURE__ */ i("nav", {
50
+ "aria-label": u.navAriaLabel,
51
+ children: /* @__PURE__ */ i("ul", {
52
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-1 ttw:border-b ttw:border-border",
53
+ children: o.map((e, n) => {
54
+ let r = e.id === s;
55
+ return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i("button", {
56
+ type: "button",
57
+ ref: (e) => {
58
+ d.current[n] = e;
59
+ },
60
+ "aria-current": r ? "page" : void 0,
61
+ onClick: () => c(e.id),
62
+ onKeyDown: (e) => p(e, n),
63
+ className: t("ttw:-mb-px ttw:cursor-pointer ttw:border-b-2 ttw:px-4 ttw:py-2.5 ttw:text-sm ttw:font-medium ttw:whitespace-nowrap ttw:focus-visible:outline-2 ttw:focus-visible:outline-offset-2 ttw:focus-visible:outline-ring", r ? "ttw:border-primary ttw:text-primary" : "ttw:border-transparent ttw:text-muted-foreground ttw:hover:border-border ttw:hover:text-foreground"),
64
+ children: e.label
65
+ }) }, e.id);
66
+ })
67
+ })
68
+ }), /* @__PURE__ */ i("div", {
69
+ role: "region",
70
+ "aria-label": f?.label,
71
+ className: "ttw:min-h-[432px] ttw:min-w-0",
72
+ children: f?.content
21
73
  })]
22
74
  });
23
- };
75
+ }
24
76
  //#endregion
25
- export { a as WidgetSuiteStyleProbe };
77
+ export { o as WidgetSuiteShell };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.2.252",
3
+ "version": "0.2.253",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {
@@ -1,2 +0,0 @@
1
- import "./index2.js";
2
- import "./index3.js";