@tesouro/embedded-components-react 0.11.71 → 0.11.73

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 (88) hide show
  1. package/README.md +1 -0
  2. package/dist/index.css +35 -192
  3. package/dist/index.d.ts +75 -71
  4. package/dist/lib/SettingsWidget.d.ts +5 -1
  5. package/dist/lib/WidgetSuite.d.ts +4 -0
  6. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +8 -7
  7. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +4 -1
  8. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +196 -131
  9. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +4 -4
  10. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +11 -1
  11. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index4.js +5 -3
  12. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +38 -32
  13. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +103 -75
  14. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +140 -168
  15. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +97 -87
  16. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +11 -7
  17. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index8.js +0 -1
  18. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index2.js +3 -1
  19. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +134 -177
  20. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index4.js +110 -176
  21. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index5.js +28 -38
  22. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +13 -10
  23. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +28 -24
  24. package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +35 -31
  25. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +2 -0
  26. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -5
  27. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +3 -0
  28. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index11.js +2 -1
  29. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index12.js +22 -36
  30. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index16.js +1 -1
  31. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index17.js +54 -60
  32. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index20.js +75 -60
  33. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +42 -27
  34. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +89 -82
  35. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index9.js +39 -38
  36. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/feature/dist/index4.js +32 -32
  37. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index2.js +1 -1
  38. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index3.js +56 -71
  39. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index10.js +3 -0
  40. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +86 -66
  41. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index13.js +51 -51
  42. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index15.js +146 -132
  43. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +95 -99
  44. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +1 -0
  45. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index4.js +8 -27
  46. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +69 -72
  47. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index6.js +51 -51
  48. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +9 -11
  49. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index10.js +83 -298
  50. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index11.js +13 -13
  51. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +122 -75
  52. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index13.js +41 -15
  53. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index14.js +7 -131
  54. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js +147 -48
  55. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +240 -11
  56. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +15 -173
  57. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index2.js +38 -10
  58. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index3.js +5 -46
  59. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index4.js +52 -45
  60. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +101 -25
  61. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index6.js +40 -98
  62. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index7.js +415 -40
  63. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index8.js +261 -332
  64. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index9.js +15 -8
  65. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
  66. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +9 -8
  67. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +136 -122
  68. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -8
  69. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +16 -17
  70. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +99 -100
  71. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +1 -1
  72. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index17.js +8 -8
  73. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +10 -55
  74. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index19.js +34 -8
  75. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +8 -84
  76. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index21.js +86 -0
  77. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
  78. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +17 -18
  79. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +33 -42
  80. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  81. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +24 -24
  82. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/FileDropZone/FileDropZone.js +62 -0
  83. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +1 -0
  84. package/dist/packages/shared-ui-shadcn/dist/index.js +2302 -2284
  85. package/package.json +1 -1
  86. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index18.js +0 -291
  87. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index19.js +0 -22
  88. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/avatarSwatch.js +0 -26
@@ -1,40 +1,26 @@
1
- import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o, Typography as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { DISCARD_CHANGES_DIALOG_LABELS_EN as c } from "./index11.js";
3
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
1
+ import { ConfirmDialog as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { DISCARD_CHANGES_DIALOG_LABELS_EN as t } from "./index11.js";
3
+ import { jsx as n } from "react/jsx-runtime";
4
4
  // ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index12.js
5
- function d({ open: d, onCancel: f, onConfirm: p, labels: m }) {
6
- let h = {
7
- ...c,
8
- ...m
5
+ function r({ open: r, onCancel: i, onConfirm: a, labels: o }) {
6
+ let s = {
7
+ ...t,
8
+ ...o
9
9
  };
10
- return /* @__PURE__ */ l(t, {
11
- open: d,
12
- onOpenChange: (e) => !e && f(),
13
- children: /* @__PURE__ */ u(n, {
14
- showCloseButton: !1,
15
- children: [
16
- /* @__PURE__ */ l(a, { children: /* @__PURE__ */ l(o, { children: h.title }) }),
17
- /* @__PURE__ */ l(r, {
18
- asChild: !0,
19
- children: /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l(s, {
20
- variant: "body1",
21
- children: h.message
22
- }), /* @__PURE__ */ l(s, {
23
- variant: "body1",
24
- children: h.question
25
- })] })
26
- }),
27
- /* @__PURE__ */ u(i, { children: [/* @__PURE__ */ l(e, {
28
- variant: "outline",
29
- onClick: f,
30
- children: h.cancelButton
31
- }), /* @__PURE__ */ l(e, {
32
- variant: "destructive",
33
- onClick: p,
34
- children: h.confirmButton
35
- })] })
36
- ]
37
- })
10
+ return /* @__PURE__ */ n(e, {
11
+ open: r,
12
+ onOpenChange: (e) => {
13
+ e || i();
14
+ },
15
+ title: s.title,
16
+ description: `${s.message} ${s.question}`,
17
+ destructive: !0,
18
+ onConfirm: a,
19
+ labels: {
20
+ confirm: s.confirmButton,
21
+ cancel: s.cancelButton,
22
+ close: s.close
23
+ }
38
24
  });
39
25
  }
40
- export { d as DiscardChangesDialog, d as default };
26
+ export { r as DiscardChangesDialog, r as default };
@@ -3,7 +3,7 @@ import { LogoUploadStatus as t } from "./index15.js";
3
3
  import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
4
  // ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index16.js
5
5
  function a({ status: a, progressLabel: o, completeLabel: s }) {
6
- let c = a === t.Uploading, l = a === t.Success, u = a === t.Error ? "ttw:bg-destructive" : l ? "ttw:bg-emerald-600" : "ttw:bg-primary";
6
+ let c = a === t.Uploading, l = a === t.Success, u = a === t.Error ? "ttw:bg-destructive" : l ? "ttw:bg-success" : "ttw:bg-primary";
7
7
  return /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("div", {
8
8
  ...c ? {
9
9
  role: "progressbar",
@@ -1,74 +1,68 @@
1
- import { Spinner as e, Typography as t, cn as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { LOGO_DROPZONE_LABELS_EN as r } from "./index14.js";
3
- import { LogoUploadStatus as i } from "./index15.js";
4
- import { LogoUploadProgress as a } from "./index16.js";
5
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
- import { AlertCircle as c, CheckCircle2 as l, CloudUpload as u, X as d } from "lucide-react";
1
+ import { Button as e, Spinner as t, Tooltip as n, TooltipContent as r, TooltipProvider as i, TooltipTrigger as a, Typography as o, cn as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { FileDropZone as c } from "../../../../shared/ui/dist/lib/FileDropZone/FileDropZone.js";
3
+ import "../../../../shared/ui/dist/index.js";
4
+ import { LOGO_DROPZONE_LABELS_EN as l } from "./index14.js";
5
+ import { LogoUploadStatus as u } from "./index15.js";
6
+ import { LogoUploadProgress as d } from "./index16.js";
7
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
8
+ import { AlertCircle as m, CheckCircle2 as h, X as g } from "lucide-react";
7
9
  // ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index17.js
8
- function f({ status: f = i.Idle, fileName: p, errorMessage: m, isDraggingOver: h, onBrowse: g, onDismissError: _, labels: v }) {
9
- let y = {
10
- ...r,
11
- ...v
12
- }, b = f === i.Uploading, x = f === i.Success, S = f === i.Error, C = b || x || S, w = n("ttw:w-full ttw:h-38 ttw:bg-background ttw:box-border ttw:transition-all ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:text-center ttw:gap-2 ttw:rounded-lg ttw:border ttw:px-4 ttw:py-6", h ? "ttw:border-solid ttw:border-primary" : "ttw:border-dashed ttw:border-border");
13
- return C ? /* @__PURE__ */ s("div", {
14
- className: w,
15
- children: [/* @__PURE__ */ s("div", {
10
+ function _({ status: _ = u.Idle, fileName: v, errorMessage: y, isDraggingOver: b, onBrowse: x, onFilesSelected: S, accept: C, onDismissError: w, labels: T }) {
11
+ let E = {
12
+ ...l,
13
+ ...T
14
+ }, D = _ === u.Uploading, O = _ === u.Success, k = _ === u.Error, A = D || O || k, j = s("ttw:w-full ttw:h-38 ttw:bg-background ttw:box-border ttw:transition-all ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:text-center ttw:gap-2 ttw:rounded-lg ttw:border ttw:px-4 ttw:py-6", b ? "ttw:border-solid ttw:border-primary" : "ttw:border-dashed ttw:border-border");
15
+ return A ? /* @__PURE__ */ p("div", {
16
+ className: j,
17
+ children: [/* @__PURE__ */ p("div", {
16
18
  className: "ttw:flex ttw:gap-4 ttw:justify-center ttw:w-full",
17
- children: [/* @__PURE__ */ s("div", {
19
+ children: [/* @__PURE__ */ p("div", {
18
20
  className: "ttw:flex ttw:gap-2 ttw:w-1/2 ttw:items-center",
19
- children: [S ? /* @__PURE__ */ o(c, { className: "ttw:size-5 ttw:text-destructive" }) : x ? /* @__PURE__ */ o(l, { className: "ttw:size-5 ttw:text-emerald-600" }) : /* @__PURE__ */ o(e, { className: "ttw:size-5" }), /* @__PURE__ */ o("span", {
21
+ children: [k ? /* @__PURE__ */ f(m, {
22
+ "aria-hidden": !0,
23
+ className: "ttw:size-5 ttw:text-destructive"
24
+ }) : O ? /* @__PURE__ */ f(h, {
25
+ "aria-hidden": !0,
26
+ className: "ttw:size-5 ttw:text-success"
27
+ }) : /* @__PURE__ */ f(t, { className: "ttw:size-5" }), /* @__PURE__ */ f("span", {
20
28
  className: "ttw:w-full ttw:text-sm ttw:leading-5 ttw:font-medium ttw:text-muted-foreground ttw:truncate",
21
- children: p
29
+ children: v
22
30
  })]
23
- }), /* @__PURE__ */ s("div", {
31
+ }), /* @__PURE__ */ p("div", {
24
32
  className: "ttw:flex ttw:gap-2 ttw:items-center",
25
- children: [/* @__PURE__ */ o(a, {
26
- status: f,
27
- progressLabel: y.uploadProgress,
28
- completeLabel: y.uploadComplete
29
- }), S && /* @__PURE__ */ o("button", {
30
- type: "button",
31
- onClick: _,
32
- "aria-label": y.dismissError,
33
- className: "ttw:cursor-pointer ttw:border-none",
34
- children: /* @__PURE__ */ o(d, { className: "ttw:size-4" })
35
- })]
33
+ children: [/* @__PURE__ */ f(d, {
34
+ status: _,
35
+ progressLabel: E.uploadProgress,
36
+ completeLabel: E.uploadComplete
37
+ }), k && /* @__PURE__ */ f(i, { children: /* @__PURE__ */ p(n, { children: [/* @__PURE__ */ f(a, {
38
+ asChild: !0,
39
+ children: /* @__PURE__ */ f(e, {
40
+ type: "button",
41
+ variant: "ghost",
42
+ size: "icon",
43
+ onClick: w,
44
+ "aria-label": E.dismissError,
45
+ children: /* @__PURE__ */ f(g, {
46
+ "aria-hidden": !0,
47
+ className: "ttw:size-4"
48
+ })
49
+ })
50
+ }), /* @__PURE__ */ f(r, { children: E.dismissError })] }) })]
36
51
  })]
37
- }), S && /* @__PURE__ */ o(t, {
52
+ }), k && /* @__PURE__ */ f(o, {
38
53
  variant: "body2",
39
54
  color: "destructive",
40
55
  role: "alert",
41
56
  className: "ttw:font-medium",
42
- children: m ?? y.genericError
57
+ children: y ?? E.genericError
43
58
  })]
44
- }) : /* @__PURE__ */ s("button", {
45
- type: "button",
46
- className: w,
47
- onClick: g,
48
- children: [
49
- /* @__PURE__ */ o("span", {
50
- className: "ttw:p-3 ttw:bg-primary ttw:rounded-full",
51
- children: /* @__PURE__ */ o(u, { className: "ttw:text-primary-foreground ttw:size-5" })
52
- }),
53
- /* @__PURE__ */ s(t, {
54
- component: "span",
55
- variant: "body2",
56
- className: "ttw:font-medium",
57
- children: [
58
- y.dropPrefix,
59
- " ",
60
- /* @__PURE__ */ o("span", {
61
- className: "ttw:text-primary ttw:underline",
62
- children: y.browseAction
63
- })
64
- ]
65
- }),
66
- /* @__PURE__ */ o(t, {
67
- variant: "caption",
68
- color: "muted",
69
- children: y.fileTypesHint
70
- })
71
- ]
59
+ }) : /* @__PURE__ */ f(c, {
60
+ label: `${E.dropPrefix} ${E.browseAction}`,
61
+ rules: E.fileTypesHint,
62
+ inputLabel: E.browseAction,
63
+ accept: C,
64
+ onBrowse: x,
65
+ onFilesSelected: S
72
66
  });
73
67
  }
74
- export { f as LogoDropzone, f as default };
68
+ export { _ as LogoDropzone, _ as default };
@@ -1,92 +1,107 @@
1
- import { Button as e, Skeleton as t, Typography as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { LogoUploadStatus as r } from "./index15.js";
3
- import { LogoDropzone as i } from "./index17.js";
1
+ import { Button as e, Heading as t, Skeleton as n, Tooltip as r, TooltipContent as i, TooltipProvider as a, TooltipTrigger as o, Typography as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { LogoUploadStatus as c } from "./index15.js";
3
+ import { LogoDropzone as l } from "./index17.js";
4
4
  import "./index18.js";
5
- import { LOGO_SECTION_LABELS_EN as a } from "./index19.js";
6
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
- import { SquarePen as c, Trash2 as l } from "lucide-react";
5
+ import { LOGO_SECTION_LABELS_EN as u } from "./index19.js";
6
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
+ import { SquarePen as p, Trash2 as m } from "lucide-react";
8
8
  // ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index20.js
9
- function u({ logoUrl: u, isLoading: d, isDeleting: f, status: p = r.Idle, fileName: m, errorMessage: h, isDraggingOver: g, onBrowse: _, onDelete: v, onDismissError: y, onDragOver: b, onDragLeave: x, onDrop: S, labels: C, dropzoneLabels: w }) {
10
- let T = {
11
- ...a,
12
- ...C
13
- }, E = !!u && !d && p !== r.Uploading && p !== r.Error;
14
- return /* @__PURE__ */ s("div", {
9
+ function h({ logoUrl: h, isLoading: g, isDeleting: _, status: v = c.Idle, fileName: y, errorMessage: b, isDraggingOver: x, onBrowse: S, onFilesSelected: C, accept: w, onDelete: T, onDismissError: E, onDragOver: D, onDragLeave: O, onDrop: k, labels: A, dropzoneLabels: j }) {
10
+ let M = {
11
+ ...u,
12
+ ...A
13
+ }, N = !!h && !g && v !== c.Uploading && v !== c.Error;
14
+ return /* @__PURE__ */ f("div", {
15
15
  className: "ttw:flex ttw:flex-col ttw:gap-2.5",
16
- children: [/* @__PURE__ */ s("div", {
16
+ children: [/* @__PURE__ */ f("div", {
17
17
  className: "ttw:pt-5 ttw:pb-2.5 ttw:flex ttw:flex-col ttw:gap-1.5",
18
- children: [/* @__PURE__ */ o(n, {
19
- variant: "h3",
20
- children: T.title
21
- }), /* @__PURE__ */ o(n, {
18
+ children: [/* @__PURE__ */ d(t, {
19
+ variant: "section",
20
+ level: 3,
21
+ children: M.title
22
+ }), /* @__PURE__ */ d(s, {
22
23
  variant: "body2",
23
24
  color: "muted",
24
- children: T.description
25
+ children: M.description
25
26
  })]
26
- }), /* @__PURE__ */ s("div", {
27
+ }), /* @__PURE__ */ f("div", {
27
28
  className: "ttw:flex ttw:flex-col ttw:gap-4",
28
- children: [/* @__PURE__ */ s("div", {
29
+ children: [/* @__PURE__ */ f("div", {
29
30
  className: "ttw:flex ttw:flex-col ttw:gap-0.5",
30
- children: [/* @__PURE__ */ o(n, {
31
+ children: [/* @__PURE__ */ d(s, {
31
32
  variant: "body1",
32
33
  className: "ttw:font-medium",
33
- children: T.uploadTitle
34
- }), /* @__PURE__ */ o(n, {
34
+ children: M.uploadTitle
35
+ }), /* @__PURE__ */ d(s, {
35
36
  variant: "body2",
36
37
  className: "ttw:leading-5",
37
38
  color: "muted",
38
- children: T.uploadDescription
39
+ children: M.uploadDescription
39
40
  })]
40
- }), /* @__PURE__ */ s("div", {
41
+ }), /* @__PURE__ */ f("div", {
41
42
  className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-2",
42
- children: [/* @__PURE__ */ o("div", {
43
+ children: [/* @__PURE__ */ d("div", {
43
44
  className: "ttw:w-full",
44
- onDragOver: b,
45
- onDragLeave: x,
46
- onDrop: S,
47
- children: d ? /* @__PURE__ */ o(t, { className: "ttw:w-full ttw:h-38" }) : E ? /* @__PURE__ */ s("div", {
45
+ onDragOver: D,
46
+ onDragLeave: O,
47
+ onDrop: k,
48
+ children: g ? /* @__PURE__ */ d(n, { className: "ttw:w-full ttw:h-38" }) : N ? /* @__PURE__ */ f("div", {
48
49
  className: "ttw:relative ttw:flex ttw:w-full ttw:h-38 ttw:box-border",
49
- children: [/* @__PURE__ */ o("img", {
50
- src: u,
51
- alt: T.logoAlt,
50
+ children: [/* @__PURE__ */ d("img", {
51
+ src: h,
52
+ alt: M.logoAlt,
52
53
  className: "ttw:w-auto ttw:max-w-full ttw:object-contain ttw:max-h-38"
53
- }), g && /* @__PURE__ */ o("div", {
54
+ }), x && /* @__PURE__ */ d("div", {
54
55
  className: "ttw:absolute ttw:inset-0 ttw:pointer-events-none ttw:flex ttw:items-center ttw:justify-center ttw:gap-2 ttw:rounded-lg ttw:border ttw:border-solid ttw:border-primary ttw:bg-background/80",
55
- children: /* @__PURE__ */ o(n, {
56
+ children: /* @__PURE__ */ d(s, {
56
57
  variant: "body2",
57
58
  color: "primary",
58
59
  className: "ttw:font-medium",
59
- children: T.dropToReplace
60
+ children: M.dropToReplace
60
61
  })
61
62
  })]
62
- }) : /* @__PURE__ */ o(i, {
63
- status: p,
64
- fileName: m,
65
- errorMessage: h,
66
- isDraggingOver: g,
67
- onBrowse: _,
68
- onDismissError: y,
69
- labels: w
63
+ }) : /* @__PURE__ */ d(l, {
64
+ status: v,
65
+ fileName: y,
66
+ errorMessage: b,
67
+ isDraggingOver: x,
68
+ onBrowse: S,
69
+ onFilesSelected: C,
70
+ accept: w,
71
+ onDismissError: E,
72
+ labels: j
70
73
  })
71
- }), E && /* @__PURE__ */ s("div", {
74
+ }), N && /* @__PURE__ */ f("div", {
72
75
  className: "ttw:flex ttw:gap-4",
73
- children: [/* @__PURE__ */ o(e, {
74
- variant: "ghost",
75
- size: "sm",
76
- "aria-label": T.editLogo,
77
- onClick: _,
78
- children: /* @__PURE__ */ o(c, { className: "ttw:size-4" })
79
- }), /* @__PURE__ */ o(e, {
80
- variant: "ghost",
81
- size: "sm",
82
- disabled: f,
83
- "aria-label": T.deleteLogo,
84
- onClick: v,
85
- children: /* @__PURE__ */ o(l, { className: "ttw:size-4" })
86
- })]
76
+ children: [/* @__PURE__ */ d(a, { children: /* @__PURE__ */ f(r, { children: [/* @__PURE__ */ d(o, {
77
+ asChild: !0,
78
+ children: /* @__PURE__ */ d(e, {
79
+ variant: "ghost",
80
+ size: "sm",
81
+ "aria-label": M.editLogo,
82
+ onClick: S,
83
+ children: /* @__PURE__ */ d(p, {
84
+ "aria-hidden": !0,
85
+ className: "ttw:size-4"
86
+ })
87
+ })
88
+ }), /* @__PURE__ */ d(i, { children: M.editLogo })] }) }), /* @__PURE__ */ d(a, { children: /* @__PURE__ */ f(r, { children: [/* @__PURE__ */ d(o, {
89
+ asChild: !0,
90
+ children: /* @__PURE__ */ d(e, {
91
+ variant: "ghost",
92
+ size: "sm",
93
+ disabled: _,
94
+ "aria-label": M.deleteLogo,
95
+ onClick: T,
96
+ children: /* @__PURE__ */ d(m, {
97
+ "aria-hidden": !0,
98
+ className: "ttw:size-4"
99
+ })
100
+ })
101
+ }), /* @__PURE__ */ d(i, { children: M.deleteLogo })] }) })]
87
102
  })]
88
103
  })]
89
104
  })]
90
105
  });
91
106
  }
92
- export { u as LogoSection, u as default };
107
+ export { h as LogoSection, h as default };
@@ -1,39 +1,54 @@
1
- import { Button as e, Spinner as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ErrorState as n } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
1
+ import { Button as e, RequiredFieldsLegend as t, Skeleton as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ErrorState as r } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
3
+ import { LoadingRegion as i } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
3
4
  import "../../../../shared/ui/dist/index.js";
4
- import { INVOICE_SETTINGS_PANEL_LABELS_EN as r } from "./index2.js";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ import { INVOICE_SETTINGS_PANEL_LABELS_EN as a } from "./index2.js";
6
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
7
  // ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js
7
- function o({ isLoading: o, isError: s, onRetry: c, logo: l, children: u, submitDisabled: d, onSubmit: f, labels: p }) {
8
- let m = {
9
- ...r,
10
- ...p
8
+ function c({ isLoading: c, isError: l, onRetry: u, logo: d, children: f, submitDisabled: p, onSubmit: m, labels: h }) {
9
+ let g = {
10
+ ...a,
11
+ ...h
11
12
  };
12
- return /* @__PURE__ */ i("div", {
13
+ return /* @__PURE__ */ o("div", {
13
14
  className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
14
- children: /* @__PURE__ */ a("div", {
15
+ children: /* @__PURE__ */ s("div", {
15
16
  className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:w-full ttw:max-w-163",
16
- children: [l, s ? /* @__PURE__ */ i(n, {
17
- title: m.errorTitle,
18
- description: m.errorDescription,
19
- retryLabel: m.errorRetry,
20
- onRetry: c
21
- }) : o ? /* @__PURE__ */ i(t, {
22
- className: "ttw:size-8 ttw:text-primary",
23
- "aria-label": m.loading
24
- }) : /* @__PURE__ */ a("form", {
17
+ children: [d, l ? /* @__PURE__ */ o(r, {
18
+ title: g.errorTitle,
19
+ description: g.errorDescription,
20
+ retryLabel: g.errorRetry,
21
+ onRetry: u
22
+ }) : c ? /* @__PURE__ */ o(i, {
23
+ isLoading: !0,
24
+ loadingLabel: g.loading,
25
+ children: /* @__PURE__ */ s("div", {
26
+ "aria-hidden": !0,
27
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
28
+ children: [
29
+ /* @__PURE__ */ o(n, { className: "ttw:h-6 ttw:w-40" }),
30
+ /* @__PURE__ */ o(n, { className: "ttw:h-20 ttw:w-full" }),
31
+ /* @__PURE__ */ o(n, { className: "ttw:h-9 ttw:w-full" })
32
+ ]
33
+ })
34
+ }) : /* @__PURE__ */ s("form", {
35
+ noValidate: !0,
25
36
  className: "ttw:flex ttw:flex-col ttw:gap-6",
26
37
  onSubmit: (e) => {
27
- e.preventDefault(), f();
38
+ e.preventDefault(), m();
28
39
  },
29
- children: [u, /* @__PURE__ */ i(e, {
30
- type: "submit",
31
- className: "ttw:w-fit",
32
- disabled: d,
33
- children: m.submitButton
34
- })]
40
+ children: [
41
+ /* @__PURE__ */ o(t, {}),
42
+ f,
43
+ /* @__PURE__ */ o(e, {
44
+ type: "submit",
45
+ className: "ttw:w-fit",
46
+ disabled: p,
47
+ children: g.submitButton
48
+ })
49
+ ]
35
50
  })]
36
51
  })
37
52
  });
38
53
  }
39
- export { o as InvoiceSettingsPanel, o as default };
54
+ export { c as InvoiceSettingsPanel, c as default };