@tesouro/embedded-components-react 0.5.205 → 0.5.206

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 (48) hide show
  1. package/dist/index.d.ts +11 -4
  2. package/dist/index.js +1 -1
  3. package/dist/lib/ReceivablesWidget.d.ts +11 -4
  4. package/dist/lib/ReceivablesWidget.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +88 -193
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +184 -31
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +32 -145
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +150 -58
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +35 -89
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +53 -42
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +82 -299
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +47 -70
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +321 -100
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +68 -246
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +115 -0
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +270 -0
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +93 -407
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +422 -86
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +16 -12
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +92 -16
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +3 -1
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +24 -4
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +0 -10
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +2 -0
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +3 -264
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +16 -70
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +1 -424
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +4 -106
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +12 -93
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +5 -179
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +1 -344
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +264 -0
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +72 -0
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +401 -0
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +106 -0
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +93 -0
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +344 -0
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +182 -32
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +29 -202
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +183 -137
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +157 -20
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +16 -1
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +25 -3
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +4 -3
  47. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  48. package/package.json +1 -1
@@ -1,24 +1,161 @@
1
- import { Badge as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_STATUS_BADGE_LABELS_EN as n } from "./index2.js";
3
- import { jsxs as r } from "react/jsx-runtime";
1
+ import { Button as e, Checkbox as t, Separator as n, Typography as r, cn as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { RECEIVABLE_FORM_SHEET_LABELS_EN as a } from "./index3.js";
3
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ import { FileText as l, ImageIcon as u, Loader2 as d, Trash2 as f, X as p } from "lucide-react";
4
5
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js
5
- var i = {
6
- danger: "ttw:border-red-200 ttw:bg-red-50 ttw:text-red-700 ttw:hover:bg-red-50",
7
- info: "ttw:border-blue-200 ttw:bg-blue-50 ttw:text-blue-700 ttw:hover:bg-blue-50",
8
- neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
9
- success: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700 ttw:hover:bg-emerald-50",
10
- warning: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800 ttw:hover:bg-amber-50"
11
- };
12
- function a({ status: a, tone: o, labels: s, icon: c }) {
13
- let l = {
14
- ...n,
15
- ...s
16
- }, u = l[a] ?? l.unknown;
17
- return /* @__PURE__ */ r(e, {
18
- variant: "outline",
19
- className: t(c && "ttw:gap-1", i[o]),
20
- children: [c, u]
6
+ function m({ view: m, isDragging: h, disabled: g, inputRef: _, onBrowseClick: v, onDragOver: y, onDragLeave: b, onDrop: x, onFilesSelect: S, onIncludeInEmailChange: C, onRemove: w, labels: T }) {
7
+ let E = {
8
+ ...a,
9
+ ...T
10
+ };
11
+ return /* @__PURE__ */ c("div", {
12
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
13
+ children: [
14
+ /* @__PURE__ */ c("div", {
15
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
16
+ children: [/* @__PURE__ */ s(r, {
17
+ variant: "h4",
18
+ children: E.attachmentsHeading
19
+ }), /* @__PURE__ */ s(r, {
20
+ variant: "body2",
21
+ color: "muted",
22
+ className: "ttw:font-medium",
23
+ children: E.attachmentsDescription
24
+ })]
25
+ }),
26
+ m.showRows && /* @__PURE__ */ c("div", {
27
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
28
+ children: [m.emailCaption && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(r, {
29
+ variant: "caption",
30
+ color: "muted",
31
+ children: m.emailCaption
32
+ }), /* @__PURE__ */ s(n, {})] }), /* @__PURE__ */ c("ul", {
33
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
34
+ children: [m.attachedRows.map((n) => /* @__PURE__ */ c("li", {
35
+ className: "ttw:flex ttw:items-center ttw:gap-2",
36
+ children: [/* @__PURE__ */ s(t, {
37
+ checked: n.includeInEmail,
38
+ disabled: g,
39
+ "aria-label": n.includeInEmailLabel,
40
+ onCheckedChange: (e) => C(n.id, e === !0)
41
+ }), /* @__PURE__ */ c("div", {
42
+ className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:px-2 ttw:py-1",
43
+ children: [/* @__PURE__ */ c("div", {
44
+ className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:items-center ttw:gap-1",
45
+ children: [/* @__PURE__ */ s(r, {
46
+ variant: "body2",
47
+ className: "ttw:truncate",
48
+ children: n.name
49
+ }), /* @__PURE__ */ c(r, {
50
+ variant: "body2",
51
+ color: "muted",
52
+ className: "ttw:shrink-0",
53
+ children: [
54
+ "(",
55
+ n.sizeLabel,
56
+ ")"
57
+ ]
58
+ })]
59
+ }), /* @__PURE__ */ s(e, {
60
+ type: "button",
61
+ variant: "ghost",
62
+ size: "icon",
63
+ className: "ttw:size-4",
64
+ disabled: g,
65
+ "aria-label": n.removeLabel,
66
+ onClick: () => w(n.id),
67
+ children: /* @__PURE__ */ s(f, { className: "ttw:size-4" })
68
+ })]
69
+ })]
70
+ }, n.id)), m.pendingRows.map((t) => /* @__PURE__ */ c("li", {
71
+ className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:px-2 ttw:py-1",
72
+ children: [
73
+ t.state === "uploading" ? /* @__PURE__ */ s(d, { className: "ttw:size-5 ttw:shrink-0 ttw:animate-spin ttw:text-muted-foreground" }) : /* @__PURE__ */ s(l, { className: "ttw:size-5 ttw:shrink-0 ttw:text-destructive" }),
74
+ /* @__PURE__ */ c("div", {
75
+ className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col",
76
+ children: [/* @__PURE__ */ s(r, {
77
+ variant: "body2",
78
+ className: "ttw:truncate",
79
+ children: t.name
80
+ }), t.state === "uploading" ? /* @__PURE__ */ s(r, {
81
+ variant: "caption",
82
+ color: "muted",
83
+ children: t.message
84
+ }) : /* @__PURE__ */ s(r, {
85
+ variant: "caption",
86
+ role: "alert",
87
+ className: "ttw:text-destructive",
88
+ children: t.message
89
+ })]
90
+ }),
91
+ /* @__PURE__ */ s(e, {
92
+ type: "button",
93
+ variant: "ghost",
94
+ size: "icon",
95
+ disabled: g,
96
+ "aria-label": t.removeLabel,
97
+ onClick: () => w(t.id),
98
+ children: /* @__PURE__ */ s(p, { className: "ttw:size-4" })
99
+ })
100
+ ]
101
+ }, t.id))]
102
+ })]
103
+ }),
104
+ /* @__PURE__ */ c("button", {
105
+ type: "button",
106
+ disabled: g,
107
+ onClick: v,
108
+ onDragOver: (e) => {
109
+ e.preventDefault(), y();
110
+ },
111
+ onDragLeave: (e) => {
112
+ e.preventDefault(), b();
113
+ },
114
+ onDrop: (e) => {
115
+ e.preventDefault(), x(e.dataTransfer.files);
116
+ },
117
+ className: i("ttw:flex ttw:w-full ttw:flex-col ttw:items-center ttw:gap-2 ttw:rounded-xl ttw:border ttw:border-dashed ttw:p-6 ttw:text-center ttw:disabled:cursor-not-allowed ttw:disabled:opacity-50", h ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-muted"),
118
+ children: [
119
+ /* @__PURE__ */ s("span", {
120
+ className: "ttw:flex ttw:size-10 ttw:items-center ttw:justify-center ttw:rounded-full ttw:border ttw:border-border",
121
+ children: /* @__PURE__ */ s(u, { className: "ttw:size-5 ttw:text-muted-foreground" })
122
+ }),
123
+ /* @__PURE__ */ c(r, {
124
+ variant: "body2",
125
+ children: [
126
+ E.attachmentsDropPrompt,
127
+ " ",
128
+ /* @__PURE__ */ s("span", {
129
+ className: "ttw:text-primary ttw:underline",
130
+ children: E.attachmentsBrowseLink
131
+ })
132
+ ]
133
+ }),
134
+ /* @__PURE__ */ s(r, {
135
+ variant: "caption",
136
+ color: "muted",
137
+ children: E.attachmentsFormatsHint
138
+ })
139
+ ]
140
+ }),
141
+ m.countLimitMessage && /* @__PURE__ */ s(r, {
142
+ variant: "body2",
143
+ role: "alert",
144
+ className: "ttw:text-destructive",
145
+ children: m.countLimitMessage
146
+ }),
147
+ /* @__PURE__ */ s("input", {
148
+ ref: _,
149
+ type: "file",
150
+ multiple: !0,
151
+ tabIndex: -1,
152
+ "aria-hidden": !0,
153
+ className: "ttw:sr-only",
154
+ accept: m.accept,
155
+ onChange: (e) => S(e.target.files)
156
+ })
157
+ ]
21
158
  });
22
159
  }
23
160
  //#endregion
24
- export { a as ReceivableStatusBadge, a as default };
161
+ export { m as ReceivableAttachmentsSection };
@@ -1 +1,16 @@
1
- import "lucide-react";
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js
3
+ function n({ option: n }) {
4
+ return /* @__PURE__ */ t("span", {
5
+ className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2",
6
+ children: [/* @__PURE__ */ e("span", {
7
+ className: "ttw:truncate",
8
+ children: n.label
9
+ }), n.dueDateLabel && /* @__PURE__ */ e("span", {
10
+ className: "ttw:shrink-0 ttw:text-xs ttw:text-muted-foreground",
11
+ children: n.dueDateLabel
12
+ })]
13
+ });
14
+ }
15
+ //#endregion
16
+ export { n as OptionRow };
@@ -1,3 +1,25 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "./index7.js";
3
- import "react/jsx-runtime";
1
+ import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { OptionRow as t } from "./index7.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { CalendarIcon as i } from "lucide-react";
5
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js
6
+ function a({ selection: a, labels: o }) {
7
+ return a?.kind === "receiptDue" ? /* @__PURE__ */ n("span", {
8
+ className: "ttw:truncate",
9
+ children: o.paymentTermsReceiptDue
10
+ }) : a?.kind === "customDate" ? /* @__PURE__ */ r("span", {
11
+ className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2",
12
+ children: [/* @__PURE__ */ r("span", {
13
+ className: "ttw:flex ttw:min-w-0 ttw:items-center ttw:gap-1.5",
14
+ children: [/* @__PURE__ */ n(i, { className: e("ttw:size-4 ttw:shrink-0", !a.hasDate && "ttw:text-muted-foreground") }), /* @__PURE__ */ n("span", {
15
+ className: e("ttw:truncate", !a.hasDate && "ttw:text-muted-foreground"),
16
+ children: a.dateLabel
17
+ })]
18
+ }), /* @__PURE__ */ n("span", {
19
+ className: "ttw:shrink-0 ttw:text-xs ttw:text-muted-foreground",
20
+ children: o.paymentTermsCustomDate
21
+ })]
22
+ }) : a?.kind === "term" ? /* @__PURE__ */ n(t, { option: a.option }) : null;
23
+ }
24
+ //#endregion
25
+ export { a as SelectionValue };
@@ -1,3 +1,4 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "react/jsx-runtime";
3
- import "lucide-react";
1
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js
2
+ var e = "receipt_due", t = "custom";
3
+ //#endregion
4
+ export { t as RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE, e as RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE };
@@ -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.5.205", n = "a3f0bb078bb0c8ef13f80eee919cd10143ad5af4", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.206", n = "0536ac0575fabe0c5f630232f7530e1604f46209", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.205",
3
+ "version": "0.5.206",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {