@tesouro/embedded-components-react 0.11.71 → 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 +35 -192
- package/dist/index.d.ts +75 -71
- package/dist/lib/SettingsWidget.d.ts +5 -1
- package/dist/lib/WidgetSuite.d.ts +4 -0
- 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/packages/shared-ui-shadcn/dist/index.js +2301 -2283
- 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
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js
CHANGED
|
@@ -50,19 +50,19 @@ function p({ value: r, onChange: a, onBlur: o, currencySymbol: c, placeholder: p
|
|
|
50
50
|
]
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
var m = ({ value: e, onChange: t, onFieldBlur: n, errors: i, disabled: s, labels: l,
|
|
54
|
-
let
|
|
53
|
+
var m = ({ value: e, onChange: t, onFieldBlur: n, errors: i, disabled: s, labels: l, lead: f, testIds: m }) => {
|
|
54
|
+
let h = c(() => ({
|
|
55
55
|
...o,
|
|
56
56
|
...l
|
|
57
57
|
}), [l]);
|
|
58
58
|
return /* @__PURE__ */ u(r, { children: /* @__PURE__ */ d("div", {
|
|
59
|
-
"data-testid":
|
|
59
|
+
"data-testid": m?.root,
|
|
60
60
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
|
|
61
61
|
children: [
|
|
62
62
|
/* @__PURE__ */ u(a, {
|
|
63
63
|
variant: "body2",
|
|
64
64
|
className: "ttw:font-medium",
|
|
65
|
-
children:
|
|
65
|
+
children: f ?? h.IfAmountIsBetween
|
|
66
66
|
}),
|
|
67
67
|
/* @__PURE__ */ u(p, {
|
|
68
68
|
value: e.lower,
|
|
@@ -71,17 +71,17 @@ var m = ({ value: e, onChange: t, onFieldBlur: n, errors: i, disabled: s, labels
|
|
|
71
71
|
lower: n
|
|
72
72
|
}),
|
|
73
73
|
onBlur: n ? () => n("lower") : void 0,
|
|
74
|
-
currencySymbol:
|
|
75
|
-
placeholder:
|
|
74
|
+
currencySymbol: h.CurrencySymbol,
|
|
75
|
+
placeholder: h.LowerPlaceholder,
|
|
76
76
|
error: i?.lower,
|
|
77
77
|
disabled: s,
|
|
78
|
-
ariaLabel:
|
|
79
|
-
testId:
|
|
78
|
+
ariaLabel: h.LowerAmountAriaLabel,
|
|
79
|
+
testId: m?.lowerInput
|
|
80
80
|
}),
|
|
81
81
|
/* @__PURE__ */ u(a, {
|
|
82
82
|
variant: "body2",
|
|
83
83
|
className: "ttw:font-medium",
|
|
84
|
-
children:
|
|
84
|
+
children: h.And
|
|
85
85
|
}),
|
|
86
86
|
/* @__PURE__ */ u(p, {
|
|
87
87
|
value: e.upper,
|
|
@@ -90,12 +90,12 @@ var m = ({ value: e, onChange: t, onFieldBlur: n, errors: i, disabled: s, labels
|
|
|
90
90
|
upper: n
|
|
91
91
|
}),
|
|
92
92
|
onBlur: n ? () => n("upper") : void 0,
|
|
93
|
-
currencySymbol:
|
|
94
|
-
placeholder:
|
|
93
|
+
currencySymbol: h.CurrencySymbol,
|
|
94
|
+
placeholder: h.UpperPlaceholder,
|
|
95
95
|
error: i?.upper,
|
|
96
96
|
disabled: s,
|
|
97
|
-
ariaLabel:
|
|
98
|
-
testId:
|
|
97
|
+
ariaLabel: h.UpperAmountAriaLabel,
|
|
98
|
+
testId: m?.upperInput
|
|
99
99
|
})
|
|
100
100
|
]
|
|
101
101
|
}) });
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js
CHANGED
|
@@ -2,50 +2,49 @@ import { Button as e, Tooltip as t, TooltipContent as n, TooltipProvider as r, T
|
|
|
2
2
|
import { NoPolicyBannerDefaultLabels as o } from "./index4.js";
|
|
3
3
|
import { useMemo as s } from "react";
|
|
4
4
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
-
import { PlusIcon as u } from "lucide-react";
|
|
6
5
|
// ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js
|
|
7
|
-
var
|
|
8
|
-
let
|
|
6
|
+
var u = ({ onCreateRule: u, disabled: d, createRuleDisabledReason: f, hasUnlistedRules: p, labels: m, testIds: h }) => {
|
|
7
|
+
let g = s(() => ({
|
|
9
8
|
...o,
|
|
10
|
-
...
|
|
11
|
-
}), [
|
|
9
|
+
...m
|
|
10
|
+
}), [m]), _ = /* @__PURE__ */ c(e, {
|
|
12
11
|
type: "button",
|
|
13
|
-
onClick:
|
|
14
|
-
disabled:
|
|
15
|
-
"data-testid":
|
|
12
|
+
onClick: u,
|
|
13
|
+
disabled: d,
|
|
14
|
+
"data-testid": h?.createRuleButton,
|
|
16
15
|
className: "ttw:mt-2",
|
|
17
|
-
children:
|
|
16
|
+
children: g.CreateRule
|
|
18
17
|
});
|
|
19
18
|
return /* @__PURE__ */ c("div", {
|
|
20
|
-
"data-testid":
|
|
19
|
+
"data-testid": h?.root,
|
|
21
20
|
className: "ttw:w-full ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:py-10",
|
|
22
21
|
children: /* @__PURE__ */ l("div", {
|
|
23
22
|
className: "ttw:mx-auto ttw:flex ttw:max-w-[600px] ttw:flex-col ttw:items-center ttw:gap-2 ttw:px-6",
|
|
24
23
|
children: [
|
|
25
24
|
/* @__PURE__ */ c(a, {
|
|
26
25
|
variant: "h5",
|
|
27
|
-
children:
|
|
26
|
+
children: p ? g.TitleWithUnlistedRules : g.Title
|
|
28
27
|
}),
|
|
29
28
|
/* @__PURE__ */ c(a, {
|
|
30
29
|
variant: "body2",
|
|
31
30
|
color: "muted",
|
|
32
31
|
className: "ttw:text-center",
|
|
33
|
-
children:
|
|
32
|
+
children: p ? g.BodyWithUnlistedRules : g.Body
|
|
34
33
|
}),
|
|
35
|
-
|
|
34
|
+
d && f ? /* @__PURE__ */ c(r, { children: /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ c(i, {
|
|
36
35
|
asChild: !0,
|
|
37
36
|
children: /* @__PURE__ */ c("span", {
|
|
38
37
|
tabIndex: 0,
|
|
39
38
|
className: "ttw:inline-flex ttw:cursor-not-allowed ttw:rounded-md",
|
|
40
|
-
"data-testid":
|
|
41
|
-
children:
|
|
39
|
+
"data-testid": h?.createRuleBlocked,
|
|
40
|
+
children: _
|
|
42
41
|
})
|
|
43
42
|
}), /* @__PURE__ */ c(n, {
|
|
44
43
|
side: "top",
|
|
45
|
-
children:
|
|
46
|
-
})] }) }) :
|
|
44
|
+
children: f
|
|
45
|
+
})] }) }) : _
|
|
47
46
|
]
|
|
48
47
|
})
|
|
49
48
|
});
|
|
50
49
|
};
|
|
51
|
-
export {
|
|
50
|
+
export { u as NoPolicyBanner };
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js
CHANGED
|
@@ -1,56 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GapCoverageAlertDefaultLabels as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { ArrowRight as
|
|
1
|
+
import { Alert as e, AlertDescription as t, AlertTitle as n, Tooltip as r, TooltipContent as i, TooltipProvider as a, TooltipTrigger as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { GapCoverageAlertDefaultLabels as s } from "./index6.js";
|
|
3
|
+
import { useMemo as c } from "react";
|
|
4
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
import { ArrowRight as d, Info as f } from "lucide-react";
|
|
6
6
|
// ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js
|
|
7
|
-
var
|
|
8
|
-
let
|
|
9
|
-
...
|
|
10
|
-
...
|
|
11
|
-
}), [
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
"
|
|
7
|
+
var p = ({ gaps: p, onSelectGap: m, disabled: h, labels: g, testIds: _ }) => {
|
|
8
|
+
let v = c(() => ({
|
|
9
|
+
...s,
|
|
10
|
+
...g
|
|
11
|
+
}), [g]);
|
|
12
|
+
return /* @__PURE__ */ u(e, {
|
|
13
|
+
variant: "warning",
|
|
14
14
|
role: "status",
|
|
15
|
-
|
|
15
|
+
"data-testid": _?.root,
|
|
16
16
|
children: [
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
className: "ttw:font-medium",
|
|
24
|
-
children: h.Title
|
|
25
|
-
})]
|
|
26
|
-
}),
|
|
27
|
-
/* @__PURE__ */ o("ul", {
|
|
28
|
-
className: "ttw:my-1.5 ttw:list-disc ttw:space-y-1 ttw:pl-7",
|
|
29
|
-
children: u.map((i) => {
|
|
30
|
-
let a = /* @__PURE__ */ s("button", {
|
|
17
|
+
/* @__PURE__ */ l(f, { "aria-hidden": "true" }),
|
|
18
|
+
/* @__PURE__ */ l(n, { children: v.Title }),
|
|
19
|
+
/* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l("ul", {
|
|
20
|
+
className: "ttw:my-1.5 ttw:list-disc ttw:space-y-1 ttw:pl-5",
|
|
21
|
+
children: p.map((e) => {
|
|
22
|
+
let t = /* @__PURE__ */ u("button", {
|
|
31
23
|
type: "button",
|
|
32
|
-
className: "ttw:inline-flex ttw:items-center ttw:gap-1 ttw:text-primary ttw:disabled:pointer-events-none ttw:disabled:opacity-60 hover:
|
|
33
|
-
disabled:
|
|
34
|
-
onClick: () =>
|
|
35
|
-
"data-testid": `gap-coverage-link-${
|
|
36
|
-
children: [
|
|
24
|
+
className: "ttw:inline-flex ttw:items-center ttw:gap-1 ttw:text-primary ttw:disabled:pointer-events-none ttw:disabled:opacity-60 ttw:hover:underline",
|
|
25
|
+
disabled: h || e.blockedReason !== void 0,
|
|
26
|
+
onClick: () => m(e.id),
|
|
27
|
+
"data-testid": `gap-coverage-link-${e.id}`,
|
|
28
|
+
children: [e.label, /* @__PURE__ */ l(d, { className: "ttw:size-3" })]
|
|
37
29
|
});
|
|
38
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ l("li", { children: e.blockedReason ? /* @__PURE__ */ l(a, { children: /* @__PURE__ */ u(r, { children: [/* @__PURE__ */ l(o, {
|
|
39
31
|
asChild: !0,
|
|
40
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ l("span", {
|
|
41
33
|
tabIndex: 0,
|
|
42
34
|
className: "ttw:inline-flex ttw:cursor-not-allowed",
|
|
43
|
-
"data-testid": `gap-coverage-link-blocked-${
|
|
44
|
-
children:
|
|
35
|
+
"data-testid": `gap-coverage-link-blocked-${e.id}`,
|
|
36
|
+
children: t
|
|
45
37
|
})
|
|
46
|
-
}), /* @__PURE__ */
|
|
38
|
+
}), /* @__PURE__ */ l(i, {
|
|
47
39
|
side: "top",
|
|
48
|
-
children:
|
|
49
|
-
})] }) }) :
|
|
40
|
+
children: e.blockedReason
|
|
41
|
+
})] }) }) : t }, e.id);
|
|
50
42
|
})
|
|
51
|
-
}),
|
|
52
|
-
/* @__PURE__ */ o("p", { children: h.Footer })
|
|
43
|
+
}), /* @__PURE__ */ l("p", { children: v.Footer })] })
|
|
53
44
|
]
|
|
54
45
|
});
|
|
55
46
|
};
|
|
56
|
-
export {
|
|
47
|
+
export { p as GapCoverageAlert };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -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.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.11.72", n = "89fdc81288aa3e49a161b10825fcc7ab101ccc28", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { avatarSwatchFor as e } from "./lib/avatarSwatch.js";
|
|
3
2
|
import "./lib/ProductIntroModal/ProductIntroModal.js";
|
|
4
|
-
import { EmbeddedToaster as
|
|
5
|
-
import { ToastNameMessage as
|
|
6
|
-
import { UIFramework as
|
|
7
|
-
import { UIProvider as
|
|
3
|
+
import { EmbeddedToaster as e } from "./lib/EmbeddedToaster.js";
|
|
4
|
+
import { ToastNameMessage as t } from "./lib/ToastNameMessage/ToastNameMessage.js";
|
|
5
|
+
import { UIFramework as n, resolveUIFramework as r } from "./lib/UIContext/UIContext.js";
|
|
6
|
+
import { UIProvider as i } from "./lib/UIContext/UIProvider.js";
|
|
8
7
|
import "./lib/UIContext/useLinkComponent.js";
|
|
9
8
|
import "./lib/UIContext/useUIFramework.js";
|
|
10
|
-
import { registerDesignSystemEnsurer as
|
|
9
|
+
import { registerDesignSystemEnsurer as a, registerUIRenderers as o, useDesignSystemEnsurer as s, useFrameworkRenderer as c } from "./lib/UIContext/uiRendererRegistry.js";
|
|
11
10
|
import "./lib/UIContext/index.js";
|
|
12
|
-
import { HostIsolationScope as
|
|
13
|
-
import { Link as
|
|
14
|
-
import { WidgetFrame as
|
|
15
|
-
import { WidgetContainer as
|
|
16
|
-
import { AddTile as
|
|
11
|
+
import { HostIsolationScope as l } from "./lib/HostIsolationScope/HostIsolationScope.js";
|
|
12
|
+
import { Link as u } from "./lib/Link/Link.js";
|
|
13
|
+
import { WidgetFrame as d } from "./lib/WidgetFrame/WidgetFrame.js";
|
|
14
|
+
import { WidgetContainer as f } from "./lib/WidgetContainer/WidgetContainer.js";
|
|
15
|
+
import { AddTile as p } from "./lib/AddTile/AddTile.js";
|
|
17
16
|
import "./lib/StatePanel/labels.js";
|
|
18
|
-
import { StatePanel as
|
|
19
|
-
import { EmptyState as
|
|
20
|
-
import { ERROR_STATE_ID as
|
|
21
|
-
import { NoAccessState as
|
|
22
|
-
import { AmountInput as
|
|
23
|
-
import { LoadingRegion as
|
|
17
|
+
import { StatePanel as m } from "./lib/StatePanel/StatePanel.js";
|
|
18
|
+
import { EmptyState as h } from "./lib/EmptyState/EmptyState.js";
|
|
19
|
+
import { ERROR_STATE_ID as g, ErrorState as _ } from "./lib/ErrorState/ErrorState.js";
|
|
20
|
+
import { NoAccessState as v } from "./lib/StatePanel/NoAccessState.js";
|
|
21
|
+
import { AmountInput as y } from "./lib/AmountInput/AmountInput.js";
|
|
22
|
+
import { LoadingRegion as b } from "./lib/LoadingRegion/LoadingRegion.js";
|
|
24
23
|
import "./lib/MaskedAccountNumber/labels.js";
|
|
25
|
-
import { MaskedAccountNumber as
|
|
26
|
-
import { InlineErrorAlert as
|
|
27
|
-
import { PAGINATION_FOOTER_LABELS_EN as
|
|
28
|
-
import { PaginationFooter as
|
|
24
|
+
import { MaskedAccountNumber as x } from "./lib/MaskedAccountNumber/MaskedAccountNumber.js";
|
|
25
|
+
import { InlineErrorAlert as S } from "./lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
26
|
+
import { PAGINATION_FOOTER_LABELS_EN as C } from "./lib/PaginationFooter/labels.js";
|
|
27
|
+
import { PaginationFooter as w } from "./lib/PaginationFooter/PaginationFooter.js";
|
|
29
28
|
import "./lib/OnboardingShell/labels.js";
|
|
30
29
|
import "./lib/OnboardingShell/OnboardingShellStepper.js";
|
|
31
30
|
import "./lib/OnboardingShell/OnboardingShellOverlayPortal.js";
|
|
32
|
-
import { OnboardingShell as
|
|
33
|
-
import { SectionHeading as
|
|
34
|
-
|
|
31
|
+
import { OnboardingShell as T } from "./lib/OnboardingShell/OnboardingShell.js";
|
|
32
|
+
import { SectionHeading as E } from "./lib/SectionHeading/SectionHeading.js";
|
|
33
|
+
import { FileDropZone as D } from "./lib/FileDropZone/FileDropZone.js";
|
|
34
|
+
export { p as AddTile, y as AmountInput, g as ERROR_STATE_ID, e as EmbeddedToaster, h as EmptyState, _ as ErrorState, D as FileDropZone, l as HostIsolationScope, S as InlineErrorAlert, u as Link, b as LoadingRegion, x as MaskedAccountNumber, v as NoAccessState, T as OnboardingShell, C as PAGINATION_FOOTER_LABELS_EN, w as PaginationFooter, E as SectionHeading, m as StatePanel, t as ToastNameMessage, n as UIFramework, i as UIProvider, f as WidgetContainer, d as WidgetFrame, a as registerDesignSystemEnsurer, o as registerUIRenderers, r as resolveUIFramework, s as useDesignSystemEnsurer, c as useFrameworkRenderer };
|
package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/FileDropZone/FileDropZone.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { InlineErrorAlert as e } from "../InlineErrorAlert/InlineErrorAlert.js";
|
|
6
|
+
import { useRef as t, useState as n } from "react";
|
|
7
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
8
|
+
import { Upload as a } from "lucide-react";
|
|
9
|
+
// ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/FileDropZone/FileDropZone.js
|
|
10
|
+
function o({ label: o, rules: s, inputLabel: c, accept: l, multiple: u = !1, disabled: d = !1, onFilesSelected: f, onBrowse: p, error: m }) {
|
|
11
|
+
let h = t(null), [g, _] = n(!1), v = (e) => {
|
|
12
|
+
!d && e.length && f?.(e);
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ i("div", {
|
|
15
|
+
className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-2",
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ i("button", {
|
|
18
|
+
type: "button",
|
|
19
|
+
disabled: d,
|
|
20
|
+
className: `ttw:flex ttw:w-full ttw:cursor-pointer ttw:flex-col ttw:items-center ttw:gap-2 ttw:rounded-lg ttw:border ttw:border-dashed ttw:p-6 ttw:text-center ttw:disabled:cursor-not-allowed ttw:disabled:opacity-50 ${g ? "ttw:border-primary ttw:bg-accent" : "ttw:border-border ttw:bg-muted"}`,
|
|
21
|
+
onClick: () => p ? p() : h.current?.click(),
|
|
22
|
+
onDragOver: (e) => {
|
|
23
|
+
e.preventDefault(), f && e.stopPropagation(), d || _(!0);
|
|
24
|
+
},
|
|
25
|
+
onDragLeave: (e) => {
|
|
26
|
+
e.preventDefault(), f && e.stopPropagation(), _(!1);
|
|
27
|
+
},
|
|
28
|
+
onDrop: (e) => {
|
|
29
|
+
e.preventDefault(), f && e.stopPropagation(), _(!1), v(Array.from(e.dataTransfer.files));
|
|
30
|
+
},
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ r(a, {
|
|
33
|
+
className: "ttw:size-5 ttw:text-muted-foreground",
|
|
34
|
+
"aria-hidden": !0
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ r("span", {
|
|
37
|
+
className: "ttw:text-sm",
|
|
38
|
+
children: o
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ r("span", {
|
|
41
|
+
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
42
|
+
children: s
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
}),
|
|
46
|
+
p ? null : /* @__PURE__ */ r("input", {
|
|
47
|
+
ref: h,
|
|
48
|
+
type: "file",
|
|
49
|
+
accept: l,
|
|
50
|
+
multiple: u,
|
|
51
|
+
disabled: d,
|
|
52
|
+
"aria-label": c,
|
|
53
|
+
className: "ttw:hidden",
|
|
54
|
+
onChange: (e) => {
|
|
55
|
+
v(Array.from(e.target.files ?? [])), e.target.value = "";
|
|
56
|
+
}
|
|
57
|
+
}),
|
|
58
|
+
m ? /* @__PURE__ */ r(e, { children: m }) : null
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export { o as FileDropZone };
|
|
@@ -3,6 +3,7 @@ import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
|
3
3
|
function r({ isLoading: r, loadingLabel: i, children: a, ...o }) {
|
|
4
4
|
return /* @__PURE__ */ n(e, { children: [r ? /* @__PURE__ */ t("span", {
|
|
5
5
|
role: "status",
|
|
6
|
+
"aria-label": i,
|
|
6
7
|
className: "ttw:sr-only",
|
|
7
8
|
children: i
|
|
8
9
|
}) : null, /* @__PURE__ */ t("div", {
|