@tesouro/embedded-components-react 0.9.30 → 0.9.32

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 (18) hide show
  1. package/dist/index.css +82 -88
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index10.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +246 -246
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/ExpensesScreen.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +4 -0
  9. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmptyState/EmptyState.js +13 -23
  10. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ErrorState/ErrorState.js +18 -28
  11. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +1 -0
  12. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/PaginationFooter/PaginationFooter.js +23 -54
  13. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/SectionHeading/SectionHeading.js +6 -5
  14. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/StatePanel/NoAccessState.js +2 -0
  15. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/StatePanel/StatePanel.js +49 -0
  16. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/StatePanel/labels.js +4 -0
  17. package/dist/packages/shared-ui-shadcn/dist/index.js +1750 -1539
  18. package/package.json +1 -1
@@ -24,7 +24,7 @@ function s({ labels: s, tabs: c, selectedTabId: l, onTabChange: u }) {
24
24
  onValueChange: u,
25
25
  className: "ttw:w-full",
26
26
  children: [/* @__PURE__ */ a(n, {
27
- variant: "line",
27
+ variant: "underline",
28
28
  children: c.map((e) => /* @__PURE__ */ a(r, {
29
29
  value: e.id,
30
30
  children: e.label
@@ -36,7 +36,7 @@ function p({ labels: p, header: m, headerLabels: h, myTransactionsContent: g, te
36
36
  /* @__PURE__ */ d("div", {
37
37
  className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-2",
38
38
  children: [/* @__PURE__ */ d(a, {
39
- variant: "line",
39
+ variant: "underline",
40
40
  className: "ttw:flex ttw:flex-wrap ttw:justify-start",
41
41
  children: [
42
42
  _ ? /* @__PURE__ */ d(o, {
@@ -35,7 +35,7 @@ function c({ labels: c, sections: l, selectedSectionId: u, onSectionChange: d })
35
35
  className: "ttw:h-auto ttw:w-full ttw:max-w-full ttw:flex-col ttw:items-stretch ttw:justify-start ttw:gap-1 ttw:overflow-x-visible ttw:bg-transparent ttw:p-0",
36
36
  children: l.map((e) => /* @__PURE__ */ o(r, {
37
37
  value: e.id,
38
- className: "ttw:w-full ttw:shrink-0 ttw:justify-start ttw:rounded-md ttw:px-3 ttw:py-2 ttw:hover:bg-muted/60 ttw:data-[state=active]:bg-primary/10 ttw:data-[state=active]:font-medium ttw:data-[state=active]:text-primary ttw:group-data-[variant=default]/tabs-list:data-[state=active]:bg-primary/10 ttw:group-data-[variant=default]/tabs-list:data-[state=active]:shadow-none",
38
+ className: "ttw:w-full ttw:shrink-0 ttw:justify-start ttw:rounded-md ttw:px-3 ttw:py-2 ttw:hover:bg-muted/60 ttw:data-[state=active]:bg-primary/10 ttw:data-[state=active]:font-medium ttw:data-[state=active]:text-primary ttw:after:hidden",
39
39
  children: e.label
40
40
  }, e.id))
41
41
  })
@@ -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.30", n = "b631e4bd81d6433ce07f6d679b078083d68155c9", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.9.32", n = "a94615c7b5725b833f24e0c7bb1f5c1a1388ca97", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -13,8 +13,12 @@ import { HostIsolationScope as u } from "./lib/HostIsolationScope/HostIsolationS
13
13
  import { Link as d } from "./lib/Link/Link.js";
14
14
  import "./lib/WidgetFrame/WidgetFrame.js";
15
15
  import { WidgetContainer as f } from "./lib/WidgetContainer/WidgetContainer.js";
16
+ import "./lib/StatePanel/labels.js";
17
+ import "./lib/StatePanel/StatePanel.js";
16
18
  import { EmptyState as p } from "./lib/EmptyState/EmptyState.js";
17
19
  import { ERROR_STATE_ID as m, ErrorState as h } from "./lib/ErrorState/ErrorState.js";
20
+ import "./lib/StatePanel/NoAccessState.js";
21
+ import "./lib/LoadingRegion/LoadingRegion.js";
18
22
  import { InlineErrorAlert as g } from "./lib/InlineErrorAlert/InlineErrorAlert.js";
19
23
  import { PAGINATION_FOOTER_LABELS_EN as _ } from "./lib/PaginationFooter/labels.js";
20
24
  import { PaginationFooter as v } from "./lib/PaginationFooter/PaginationFooter.js";
@@ -1,29 +1,19 @@
1
1
  import { Button as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- import { InboxIcon as r } from "lucide-react";
2
+ import { StatePanel as t } from "../StatePanel/StatePanel.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  //#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmptyState/EmptyState.js
5
5
  function i({ icon: i, title: a, description: o, actionLabel: s, actionIcon: c, onAction: l, className: u, testId: d }) {
6
- return /* @__PURE__ */ n("div", {
7
- "data-testid": d,
8
- className: "ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:px-4 ttw:py-14 ttw:text-center" + (u ? ` ${u}` : ""),
9
- children: [
10
- /* @__PURE__ */ t("div", {
11
- className: "ttw:mb-4 ttw:flex ttw:h-14 ttw:w-14 ttw:items-center ttw:justify-center ttw:rounded-2xl ttw:bg-muted",
12
- children: i ?? /* @__PURE__ */ t(r, { className: "ttw:h-6 ttw:w-6 ttw:text-muted-foreground" })
13
- }),
14
- /* @__PURE__ */ t("h3", {
15
- className: "ttw:mb-2 ttw:text-lg ttw:font-bold ttw:tracking-tight ttw:text-foreground",
16
- children: a
17
- }),
18
- o && /* @__PURE__ */ t("p", {
19
- className: "ttw:mb-6 ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground",
20
- children: o
21
- }),
22
- s && l && /* @__PURE__ */ n(e, {
23
- onClick: l,
24
- children: [c, s]
25
- })
26
- ]
6
+ return /* @__PURE__ */ n(t, {
7
+ kind: "empty",
8
+ icon: i,
9
+ title: a,
10
+ description: o,
11
+ className: u,
12
+ testId: d,
13
+ action: s && l ? /* @__PURE__ */ r(e, {
14
+ onClick: l,
15
+ children: [c, s]
16
+ }) : void 0
27
17
  });
28
18
  }
29
19
  //#endregion
@@ -1,32 +1,22 @@
1
- import { Button as e, cn as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
3
- import { AlertCircleIcon as i } from "lucide-react";
1
+ import { Button as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { StatePanel as t } from "../StatePanel/StatePanel.js";
3
+ import { jsx as n } from "react/jsx-runtime";
4
4
  //#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/ErrorState/ErrorState.js
5
- var a = "error-state";
6
- function o({ icon: a, title: o, description: s, retryLabel: c, onRetry: l, className: u, testId: d }) {
7
- return /* @__PURE__ */ r("div", {
8
- "data-testid": d,
9
- className: t("ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:px-4 ttw:py-14 ttw:text-center", u),
10
- children: [
11
- /* @__PURE__ */ n("div", {
12
- className: "ttw:mb-4 ttw:flex ttw:h-14 ttw:w-14 ttw:items-center ttw:justify-center ttw:rounded-2xl ttw:bg-destructive/10",
13
- children: a ?? /* @__PURE__ */ n(i, { className: "ttw:h-6 ttw:w-6 ttw:text-destructive" })
14
- }),
15
- /* @__PURE__ */ n("h3", {
16
- className: "ttw:mb-2 ttw:text-lg ttw:font-bold ttw:tracking-tight ttw:text-foreground",
17
- children: o
18
- }),
19
- s && /* @__PURE__ */ n("p", {
20
- className: t("ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground", c && l && "ttw:mb-6"),
21
- children: s
22
- }),
23
- c && l && /* @__PURE__ */ n(e, {
24
- variant: "outline",
25
- onClick: l,
26
- children: c
27
- })
28
- ]
5
+ var r = "error-state";
6
+ function i({ icon: r, title: i, description: a, retryLabel: o, onRetry: s, className: c, testId: l }) {
7
+ return /* @__PURE__ */ n(t, {
8
+ kind: "error",
9
+ icon: r,
10
+ title: i,
11
+ description: a,
12
+ className: c,
13
+ testId: l,
14
+ action: o && s ? /* @__PURE__ */ n(e, {
15
+ variant: "outline",
16
+ onClick: s,
17
+ children: o
18
+ }) : void 0
29
19
  });
30
20
  }
31
21
  //#endregion
32
- export { a as ERROR_STATE_ID, o as ErrorState, o as default };
22
+ export { r as ERROR_STATE_ID, i as ErrorState, i as default };
@@ -2,62 +2,31 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Button as e, Select as t, SelectContent as n, SelectItem as r, SelectTrigger as i, SelectValue as a } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { PAGINATION_FOOTER_LABELS_EN as o } from "./labels.js";
7
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
- import { ChevronLeft as l, ChevronRight as u } from "lucide-react";
5
+ import { TablePagination as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { PAGINATION_FOOTER_LABELS_EN as t } from "./labels.js";
7
+ import { jsx as n } from "react/jsx-runtime";
9
8
  //#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/PaginationFooter/PaginationFooter.js
10
- function d({ pageSize: d, pageSizeOptions: f, rangeLabel: p, isPreviousDisabled: m = !1, isNextDisabled: h = !1, isDisabled: g = !1, onPageSizeChange: _, onPreviousPageClick: v, onNextPageClick: y, labels: b }) {
11
- let x = {
12
- ...o,
13
- ...b
9
+ function r({ pageSize: r, pageSizeOptions: i, rangeLabel: a, isPreviousDisabled: o = !1, isNextDisabled: s = !1, isDisabled: c = !1, onPageSizeChange: l, onPreviousPageClick: u, onNextPageClick: d, labels: f }) {
10
+ let p = {
11
+ ...t,
12
+ ...f
14
13
  };
15
- return /* @__PURE__ */ c("div", {
16
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-end ttw:gap-8 ttw:border-t ttw:border-border ttw:p-3",
17
- children: [
18
- /* @__PURE__ */ c("div", {
19
- className: "ttw:flex ttw:items-center ttw:gap-2",
20
- children: [/* @__PURE__ */ s("span", {
21
- className: "ttw:text-sm ttw:text-muted-foreground",
22
- children: x.rowsPerPageLabel
23
- }), /* @__PURE__ */ c(t, {
24
- value: String(d),
25
- disabled: g,
26
- onValueChange: (e) => _(Number(e)),
27
- children: [/* @__PURE__ */ s(i, {
28
- size: "sm",
29
- className: "ttw:w-[4.5rem]",
30
- children: /* @__PURE__ */ s(a, {})
31
- }), /* @__PURE__ */ s(n, { children: f.map((e) => /* @__PURE__ */ s(r, {
32
- value: String(e),
33
- children: e
34
- }, e)) })]
35
- })]
36
- }),
37
- /* @__PURE__ */ s("span", {
38
- className: "ttw:text-sm ttw:text-muted-foreground ttw:tabular-nums",
39
- children: p
40
- }),
41
- /* @__PURE__ */ c("div", {
42
- className: "ttw:flex ttw:items-center ttw:gap-2",
43
- children: [/* @__PURE__ */ s(e, {
44
- variant: "ghost",
45
- size: "icon-sm",
46
- "aria-label": x.previousPageButton,
47
- disabled: g || m,
48
- onClick: v,
49
- children: /* @__PURE__ */ s(l, { className: "ttw:size-4" })
50
- }), /* @__PURE__ */ s(e, {
51
- variant: "ghost",
52
- size: "icon-sm",
53
- "aria-label": x.nextPageButton,
54
- disabled: g || h,
55
- onClick: y,
56
- children: /* @__PURE__ */ s(u, { className: "ttw:size-4" })
57
- })]
58
- })
59
- ]
14
+ return /* @__PURE__ */ n(e, {
15
+ pageSize: r,
16
+ pageSizeOptions: i,
17
+ onPageSizeChange: l,
18
+ pageInfo: a,
19
+ hasPrevPage: !o,
20
+ hasNextPage: !s,
21
+ onPrevPage: u,
22
+ onNextPage: d,
23
+ disabled: c,
24
+ labels: {
25
+ rowsPerPage: p.rowsPerPageLabel,
26
+ previousPage: p.previousPageButton,
27
+ nextPage: p.nextPageButton
28
+ }
60
29
  });
61
30
  }
62
31
  //#endregion
63
- export { d as PaginationFooter, d as default };
32
+ export { r as PaginationFooter, r as default };
@@ -1,10 +1,11 @@
1
- import { cn as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as t } from "react/jsx-runtime";
1
+ import { Heading as e, cn as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as n } from "react/jsx-runtime";
3
3
  //#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/SectionHeading/SectionHeading.js
4
- var n = "ttw:mb-4 ttw:text-2xl ttw:font-semibold ttw:text-foreground";
5
4
  function r({ children: r, className: i }) {
6
- return /* @__PURE__ */ t("h2", {
7
- className: e(n, i),
5
+ return /* @__PURE__ */ n(e, {
6
+ variant: "section",
7
+ level: 2,
8
+ className: t("ttw:mb-4", i),
8
9
  children: r
9
10
  });
10
11
  }
@@ -0,0 +1,2 @@
1
+ import "./StatePanel.js";
2
+ import "react/jsx-runtime";
@@ -0,0 +1,49 @@
1
+ import { Heading as e, cn as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { STATE_PANEL_LABELS_EN as n } from "./labels.js";
3
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { CircleAlertIcon as a, InboxIcon as o, LockIcon as s } from "lucide-react";
5
+ //#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/StatePanel/StatePanel.js
6
+ var c = {
7
+ Empty: "empty",
8
+ Error: "error",
9
+ NoAccess: "noAccess"
10
+ }, l = {
11
+ empty: /* @__PURE__ */ r(o, {}),
12
+ error: /* @__PURE__ */ r(a, {}),
13
+ noAccess: /* @__PURE__ */ r(s, {})
14
+ };
15
+ function u({ kind: a, icon: o, title: s, description: u, action: d, headingLevel: f = 3, labels: p, className: m, testId: h }) {
16
+ let g = {
17
+ ...n,
18
+ ...p
19
+ }, _ = u ?? (a === c.NoAccess ? g.noAccessDescription : void 0);
20
+ return /* @__PURE__ */ i("div", {
21
+ "data-testid": h,
22
+ "data-slot": "state-panel",
23
+ "data-kind": a,
24
+ role: a === c.Error ? "alert" : void 0,
25
+ className: t("ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-1 ttw:px-4 ttw:py-14 ttw:text-center", m),
26
+ children: [
27
+ /* @__PURE__ */ r("span", {
28
+ "aria-hidden": !0,
29
+ className: "ttw:mb-2 ttw:flex ttw:text-muted-foreground ttw:[&_svg]:size-5 ttw:[&_svg]:text-muted-foreground",
30
+ children: o ?? l[a]
31
+ }),
32
+ /* @__PURE__ */ r(e, {
33
+ variant: "component",
34
+ level: f,
35
+ children: s
36
+ }),
37
+ _ ? /* @__PURE__ */ r("p", {
38
+ className: "ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground",
39
+ children: _
40
+ }) : null,
41
+ d ? /* @__PURE__ */ r("div", {
42
+ className: "ttw:mt-3",
43
+ children: d
44
+ }) : null
45
+ ]
46
+ });
47
+ }
48
+ //#endregion
49
+ export { u as StatePanel, u as default, c as StatePanelKind };
@@ -0,0 +1,4 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/StatePanel/labels.js
2
+ var e = { noAccessDescription: "Ask a company admin for access." };
3
+ //#endregion
4
+ export { e as STATE_PANEL_LABELS_EN };