@tesouro/embedded-components-react 0.5.43 → 0.5.45

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.
@@ -8,63 +8,74 @@ import { AccountCardSkeleton as r, BankingHeader as i } from "./BankingHeader.js
8
8
  import { InlineErrorAlert as a } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
9
9
  import "../../../../shared/ui/dist/index.js";
10
10
  import { CreateAccountDialog as o } from "./CreateAccountDialog.js";
11
- import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
11
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
12
12
  //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js
13
- function u({ labels: u, "data-testid": d, bankDisplayName: f, bankLogoSrc: p, bankLogoAlt: m, availableBalanceLabel: h, shouldDisplayAvailableBalance: g, isBankingTaglineVisible: _, accountCards: v, accountCardTestId: y, shouldDisplayAddAccountCard: b, isLoading: x, isError: S, isCreateOpen: C, createForm: w, legalCopy: T, accessRows: E, isTeamMembersLoading: D, isTeamMembersError: O, isCreateSubmitDisabled: k, isCreateError: A, hasNicknameError: j, isSubmitting: M, isCreateDisabled: N, onCreateOpenChange: P, onCreateFormChange: F, onCreateSubmit: I, onAddAccountClick: L }) {
14
- let R = {
13
+ function l({ labels: l, "data-testid": u, bankDisplayName: d, bankLogoSrc: f, bankLogoAlt: p, availableBalanceLabel: m, shouldDisplayAvailableBalance: h, isBankingTaglineVisible: g, accountCards: _, accountCardTestId: v, shouldDisplayAddAccountCard: y, isLoading: b, isError: x, isCreateOpen: S, createForm: C, legalCopy: w, accessRows: T, isTeamMembersLoading: E, isTeamMembersError: D, isCreateSubmitDisabled: O, isCreateError: k, hasNicknameError: A, isSubmitting: j, isCreateDisabled: M, onCreateOpenChange: N, onCreateFormChange: P, onCreateSubmit: F, onAddAccountClick: I }) {
14
+ let L = {
15
15
  ...e,
16
- ...u
16
+ ...l
17
17
  };
18
- return /* @__PURE__ */ l("section", {
18
+ return /* @__PURE__ */ c("section", {
19
19
  className: "ttw:w-full",
20
- "data-testid": d,
20
+ "data-testid": u,
21
21
  children: [
22
- /* @__PURE__ */ c(o, {
23
- labels: R,
24
- open: C,
25
- form: w,
26
- legalCopy: T,
27
- accessRows: E,
28
- isTeamMembersLoading: D,
29
- isTeamMembersError: O,
30
- isSubmitDisabled: k,
31
- isSubmitting: M,
32
- isError: A,
33
- hasNicknameError: j,
34
- onOpenChange: P,
35
- onFormChange: F,
36
- onSubmit: I
22
+ /* @__PURE__ */ s(o, {
23
+ labels: L,
24
+ open: S,
25
+ form: C,
26
+ legalCopy: w,
27
+ accessRows: T,
28
+ isTeamMembersLoading: E,
29
+ isTeamMembersError: D,
30
+ isSubmitDisabled: O,
31
+ isSubmitting: j,
32
+ isError: k,
33
+ hasNicknameError: A,
34
+ onOpenChange: N,
35
+ onFormChange: P,
36
+ onSubmit: F
37
37
  }),
38
- /* @__PURE__ */ c(i, {
39
- labels: R,
40
- bankDisplayName: f,
41
- bankLogoSrc: p,
42
- bankLogoAlt: m,
43
- availableBalanceLabel: h,
44
- shouldDisplayAvailableBalance: g,
45
- isBankingTaglineVisible: _
38
+ /* @__PURE__ */ s(i, {
39
+ labels: L,
40
+ bankDisplayName: d,
41
+ bankLogoSrc: f,
42
+ bankLogoAlt: p,
43
+ availableBalanceLabel: m,
44
+ shouldDisplayAvailableBalance: h,
45
+ isBankingTaglineVisible: g
46
46
  }),
47
- S ? /* @__PURE__ */ c(a, {
47
+ x ? /* @__PURE__ */ s(a, {
48
48
  className: "ttw:mb-4",
49
- children: R.errorTitle
49
+ children: L.errorTitle
50
50
  }) : null,
51
- /* @__PURE__ */ l("div", {
51
+ /* @__PURE__ */ c("div", {
52
52
  className: "ttw:flex ttw:flex-wrap ttw:gap-6",
53
53
  children: [
54
- x ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(r, {}), /* @__PURE__ */ c(r, {})] }) : null,
55
- !x && v.length === 0 && !b ? /* @__PURE__ */ c("p", {
54
+ b ? /* @__PURE__ */ c("div", {
55
+ role: "status",
56
+ className: "ttw:flex ttw:flex-wrap ttw:gap-6",
57
+ children: [
58
+ /* @__PURE__ */ s("span", {
59
+ className: "ttw:sr-only",
60
+ children: L.loadingLabel
61
+ }),
62
+ /* @__PURE__ */ s(r, {}),
63
+ /* @__PURE__ */ s(r, {})
64
+ ]
65
+ }) : null,
66
+ !b && _.length === 0 && !y ? /* @__PURE__ */ s("p", {
56
67
  className: "ttw:font-medium",
57
- children: R.emptyAccountsLabel
68
+ children: L.emptyAccountsLabel
58
69
  }) : null,
59
- x ? null : v.map((e) => /* @__PURE__ */ c(t, {
60
- labels: R,
70
+ b ? null : _.map((e) => /* @__PURE__ */ s(t, {
71
+ labels: L,
61
72
  card: e,
62
- testId: y
73
+ testId: v
63
74
  }, e.id)),
64
- !x && b ? /* @__PURE__ */ c(n, {
65
- labels: R,
66
- disabled: N,
67
- onClick: L
75
+ !b && y ? /* @__PURE__ */ s(n, {
76
+ labels: L,
77
+ disabled: M,
78
+ onClick: I
68
79
  }) : null
69
80
  ]
70
81
  })
@@ -72,4 +83,4 @@ function u({ labels: u, "data-testid": d, bankDisplayName: f, bankLogoSrc: p, ba
72
83
  });
73
84
  }
74
85
  //#endregion
75
- export { u as BankAccountsWidgetUi };
86
+ export { l as BankAccountsWidgetUi };