@tesouro/embedded-components-react 0.11.133 → 0.11.135

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 (17) hide show
  1. package/dist/index.css +0 -22
  2. package/dist/index.d.ts +15 -4
  3. package/dist/lib/ReceivablesWidget.d.ts +12 -1
  4. package/dist/lib/WidgetSuite.d.ts +15 -4
  5. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +8 -0
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusCards.js +62 -35
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useInvoicesFilter.js +74 -66
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +14 -14
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +2 -3
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/invoicing.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/receivables.js +4 -4
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +6 -2
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +25 -55
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +4 -1
  15. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  16. package/dist/packages/shared-ui-shadcn/dist/index.js +1055 -1011
  17. package/package.json +1 -1
@@ -1,60 +1,30 @@
1
- import { Skeleton as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ReceivableStatusBadge as n } from "../../../shared/document-status/ui/dist/index7.js";
3
- import "../../../shared/document-status/ui/dist/index.js";
4
- import { RECEIVABLE_STATUS_CARDS_LABELS_EN as r } from "./index18.js";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
1
+ import { Skeleton as e, SummaryCard as t, SummaryCardGroup as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { LoadingRegion as r } from "../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
3
+ import "../../../shared/ui/dist/index.js";
4
+ import { RECEIVABLE_STATUS_CARDS_LABELS_EN as i } from "./index18.js";
5
+ import { jsx as a } from "react/jsx-runtime";
6
6
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js
7
- var o = 6;
8
- function s({ selected: e, onClick: n, children: r }) {
9
- return /* @__PURE__ */ i("button", {
10
- type: "button",
11
- "aria-pressed": e,
12
- onClick: n,
13
- className: t("ttw:flex ttw:w-42 ttw:shrink-0 ttw:cursor-pointer ttw:flex-col ttw:gap-2 ttw:rounded-xl ttw:border ttw:bg-card ttw:px-4 ttw:py-2 ttw:text-left ttw:transition-colors", e ? "ttw:border-primary" : "ttw:border-card ttw:hover:border-primary"),
14
- children: r
15
- });
16
- }
17
- function c({ view: t, onSelect: c, labels: l }) {
7
+ var o = 4;
8
+ function s({ view: s, onSelect: c, labels: l }) {
18
9
  let u = {
19
- ...r,
10
+ ...i,
20
11
  ...l
21
- };
22
- return t.kind === "loading" ? /* @__PURE__ */ i("div", {
23
- className: "ttw:flex ttw:gap-2",
24
- children: Array.from({ length: o }).map((t, n) => /* @__PURE__ */ i(e, { className: "ttw:h-16.5 ttw:w-42 ttw:rounded-xl" }, n))
25
- }) : /* @__PURE__ */ a("div", {
26
- className: "ttw:mb-2 ttw:flex ttw:gap-2 ttw:overflow-x-auto ttw:[scrollbar-width:none] ttw:[&::-webkit-scrollbar]:hidden",
27
- children: [/* @__PURE__ */ a(s, {
28
- selected: t.all.selected,
29
- onClick: () => c(t.all.value),
30
- children: [/* @__PURE__ */ i("span", {
31
- className: "ttw:text-xs ttw:font-medium ttw:text-foreground",
32
- children: u.all
33
- }), /* @__PURE__ */ i("span", {
34
- className: "ttw:text-2xl ttw:font-medium ttw:leading-8 ttw:tabular-nums ttw:text-foreground",
35
- children: t.all.countLabel
36
- })]
37
- }), t.statuses.map((e) => /* @__PURE__ */ i(s, {
38
- selected: e.selected,
39
- onClick: () => c(e.value),
40
- children: /* @__PURE__ */ a("div", {
41
- className: "ttw:flex ttw:flex-col",
42
- children: [/* @__PURE__ */ a("div", {
43
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
44
- children: [/* @__PURE__ */ i(n, {
45
- label: e.statusLabel,
46
- status: e.value,
47
- variant: "filled"
48
- }), /* @__PURE__ */ i("span", {
49
- className: "ttw:text-xs ttw:font-medium ttw:leading-4.5 ttw:tabular-nums ttw:text-foreground",
50
- children: e.countLabel
51
- })]
52
- }), /* @__PURE__ */ i("span", {
53
- className: "ttw:overflow-hidden ttw:text-ellipsis ttw:whitespace-nowrap ttw:text-2xl ttw:font-medium ttw:leading-8 ttw:tabular-nums ttw:text-foreground",
54
- children: e.amountLabel
55
- })]
56
- })
57
- }, e.value))]
12
+ }, d = s.kind === "loading";
13
+ return /* @__PURE__ */ a(r, {
14
+ isLoading: d,
15
+ loadingLabel: u.loading,
16
+ children: /* @__PURE__ */ a(n, {
17
+ "aria-label": u.group,
18
+ children: s.kind === "loading" ? Array.from({ length: o }).map((t, n) => /* @__PURE__ */ a(e, { className: "ttw:h-28 ttw:rounded-lg" }, n)) : s.cards.map((e) => /* @__PURE__ */ a(t, {
19
+ label: e.label,
20
+ labelTone: e.labelTone,
21
+ amount: e.amountLabel,
22
+ caption: e.captionLabel,
23
+ selected: e.selected,
24
+ disabled: e.disabled,
25
+ onClick: () => c(e.value)
26
+ }, e.value))
27
+ })
58
28
  });
59
29
  }
60
- export { c as ReceivableStatusCards, c as default };
30
+ export { s as ReceivableStatusCards, s as default };
@@ -153,7 +153,10 @@ function C({ rows: e, isLoading: n, isError: a, isAccessRestricted: c, sorting:
153
153
  !c && k && A && /* @__PURE__ */ u(l, {
154
154
  view: k,
155
155
  onSelect: A,
156
- labels: { all: R.statusCardsAll }
156
+ labels: {
157
+ group: R.statusCardsGroup,
158
+ loading: R.statusCardsLoading
159
+ }
157
160
  }),
158
161
  c ? /* @__PURE__ */ u(i, {
159
162
  icon: /* @__PURE__ */ u(h, { className: "ttw:size-8 ttw:text-primary" }),
@@ -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.133", n = "e9091fe304ef22a1093554b06f8622883bd248fa", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.135", n = "3c662443f560b98824fc5c2cb5f15997f087a8b2", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n