@tesouro/embedded-components-react 0.11.70 → 0.11.72
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.
- package/README.md +1 -0
- package/dist/index.css +41 -192
- package/dist/index.d.ts +93 -73
- package/dist/lib/SettingsWidget.d.ts +5 -1
- package/dist/lib/WidgetSuite.d.ts +22 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +196 -131
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +11 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index4.js +5 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +38 -32
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +103 -75
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +140 -168
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +97 -87
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +11 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index8.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index2.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +134 -177
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index4.js +110 -176
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index5.js +28 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +13 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +28 -24
- package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +35 -31
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index11.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index12.js +22 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index17.js +54 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index20.js +75 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +42 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +89 -82
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index9.js +39 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/feature/dist/index4.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index3.js +56 -71
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index10.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +86 -66
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index13.js +51 -51
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index15.js +146 -132
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +95 -99
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index4.js +8 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +69 -72
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index6.js +51 -51
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +9 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index10.js +83 -298
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index11.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +122 -75
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index13.js +41 -15
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index14.js +7 -131
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js +147 -48
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +240 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +15 -173
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index2.js +38 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index3.js +5 -46
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index4.js +52 -45
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +101 -25
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index6.js +40 -98
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index7.js +415 -40
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index8.js +261 -332
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index9.js +15 -8
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +136 -122
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +99 -100
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index17.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +10 -55
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index19.js +34 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +8 -84
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index21.js +86 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +17 -18
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +33 -42
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/FileDropZone/FileDropZone.js +62 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuiteProvider.js +12 -4
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/labels.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/BillPaySection.js +12 -9
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/CardsSection.js +25 -23
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardQuickActions.js +74 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardSection.js +20 -16
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/InvoicingSection.js +15 -9
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/SettingsSection.js +15 -8
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/TransfersSection.js +23 -21
- package/dist/packages/shared-ui-shadcn/dist/index.js +2336 -2274
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index18.js +0 -291
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index19.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/avatarSwatch.js +0 -26
|
@@ -1,40 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DISCARD_CHANGES_DIALOG_LABELS_EN as
|
|
3
|
-
import { jsx as
|
|
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
|
|
6
|
-
let
|
|
7
|
-
...
|
|
8
|
-
...
|
|
5
|
+
function r({ open: r, onCancel: i, onConfirm: a, labels: o }) {
|
|
6
|
+
let s = {
|
|
7
|
+
...t,
|
|
8
|
+
...o
|
|
9
9
|
};
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
open:
|
|
12
|
-
onOpenChange: (e) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 {
|
|
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-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
|
|
9
|
-
let
|
|
10
|
-
...
|
|
11
|
-
...
|
|
12
|
-
},
|
|
13
|
-
return
|
|
14
|
-
className:
|
|
15
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
19
|
+
children: [/* @__PURE__ */ p("div", {
|
|
18
20
|
className: "ttw:flex ttw:gap-2 ttw:w-1/2 ttw:items-center",
|
|
19
|
-
children: [
|
|
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:
|
|
29
|
+
children: v
|
|
22
30
|
})]
|
|
23
|
-
}), /* @__PURE__ */
|
|
31
|
+
}), /* @__PURE__ */ p("div", {
|
|
24
32
|
className: "ttw:flex ttw:gap-2 ttw:items-center",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
26
|
-
status:
|
|
27
|
-
progressLabel:
|
|
28
|
-
completeLabel:
|
|
29
|
-
}),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
}),
|
|
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:
|
|
57
|
+
children: y ?? E.genericError
|
|
43
58
|
})]
|
|
44
|
-
}) : /* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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 {
|
|
68
|
+
export { _ as LogoDropzone, _ as default };
|
|
@@ -1,92 +1,107 @@
|
|
|
1
|
-
import { Button as e,
|
|
2
|
-
import { LogoUploadStatus as
|
|
3
|
-
import { LogoDropzone as
|
|
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
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { SquarePen as
|
|
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
|
|
10
|
-
let
|
|
11
|
-
...
|
|
12
|
-
...
|
|
13
|
-
},
|
|
14
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
19
|
-
variant: "
|
|
20
|
-
|
|
21
|
-
|
|
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:
|
|
25
|
+
children: M.description
|
|
25
26
|
})]
|
|
26
|
-
}), /* @__PURE__ */
|
|
27
|
+
}), /* @__PURE__ */ f("div", {
|
|
27
28
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
28
|
-
children: [/* @__PURE__ */
|
|
29
|
+
children: [/* @__PURE__ */ f("div", {
|
|
29
30
|
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
30
|
-
children: [/* @__PURE__ */
|
|
31
|
+
children: [/* @__PURE__ */ d(s, {
|
|
31
32
|
variant: "body1",
|
|
32
33
|
className: "ttw:font-medium",
|
|
33
|
-
children:
|
|
34
|
-
}), /* @__PURE__ */
|
|
34
|
+
children: M.uploadTitle
|
|
35
|
+
}), /* @__PURE__ */ d(s, {
|
|
35
36
|
variant: "body2",
|
|
36
37
|
className: "ttw:leading-5",
|
|
37
38
|
color: "muted",
|
|
38
|
-
children:
|
|
39
|
+
children: M.uploadDescription
|
|
39
40
|
})]
|
|
40
|
-
}), /* @__PURE__ */
|
|
41
|
+
}), /* @__PURE__ */ f("div", {
|
|
41
42
|
className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-2",
|
|
42
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ d("div", {
|
|
43
44
|
className: "ttw:w-full",
|
|
44
|
-
onDragOver:
|
|
45
|
-
onDragLeave:
|
|
46
|
-
onDrop:
|
|
47
|
-
children:
|
|
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__ */
|
|
50
|
-
src:
|
|
51
|
-
alt:
|
|
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
|
-
}),
|
|
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__ */
|
|
56
|
+
children: /* @__PURE__ */ d(s, {
|
|
56
57
|
variant: "body2",
|
|
57
58
|
color: "primary",
|
|
58
59
|
className: "ttw:font-medium",
|
|
59
|
-
children:
|
|
60
|
+
children: M.dropToReplace
|
|
60
61
|
})
|
|
61
62
|
})]
|
|
62
|
-
}) : /* @__PURE__ */
|
|
63
|
-
status:
|
|
64
|
-
fileName:
|
|
65
|
-
errorMessage:
|
|
66
|
-
isDraggingOver:
|
|
67
|
-
onBrowse:
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
}),
|
|
74
|
+
}), N && /* @__PURE__ */ f("div", {
|
|
72
75
|
className: "ttw:flex ttw:gap-4",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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 {
|
|
107
|
+
export { h as LogoSection, h as default };
|
|
@@ -1,39 +1,54 @@
|
|
|
1
|
-
import { Button as e,
|
|
2
|
-
import { ErrorState as
|
|
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
|
|
5
|
-
import { jsx as
|
|
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
|
|
8
|
-
let
|
|
9
|
-
...
|
|
10
|
-
...
|
|
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__ */
|
|
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__ */
|
|
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: [
|
|
17
|
-
title:
|
|
18
|
-
description:
|
|
19
|
-
retryLabel:
|
|
20
|
-
onRetry:
|
|
21
|
-
}) :
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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(),
|
|
38
|
+
e.preventDefault(), m();
|
|
28
39
|
},
|
|
29
|
-
children: [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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 {
|
|
54
|
+
export { c as InvoiceSettingsPanel, c as default };
|