@tesouro/embedded-components-react 0.11.122 → 0.11.123
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 +6 -3
- package/dist/index.css +0 -7
- package/dist/index.d.ts +29 -6
- package/dist/index.js +29 -28
- package/dist/lib/ReceivablesWidget.d.ts +29 -6
- package/dist/lib/ReceivablesWidget.js +3 -1
- package/dist/lib/WidgetSuite.d.ts +27 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +342 -295
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/tabs.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +30 -26
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +121 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +100 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +39 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +2 -205
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +11 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +11 -210
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +27 -159
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +203 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +51 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +210 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +154 -111
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +15 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +21 -195
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +116 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +3 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +197 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +2 -78
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +53 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +20 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +8 -41
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +73 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +36 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +17 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +39 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +29 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +18 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +8 -85
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +33 -490
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +15 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +22 -42
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +82 -65
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +475 -426
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +2 -226
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +46 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +69 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +445 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +208 -246
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +22 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +5 -129
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +247 -222
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +125 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +23 -56
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +229 -209
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +3 -47
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +248 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +60 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +194 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +47 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +53 -117
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +9 -99
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +3 -40
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +0 -27
|
@@ -1,226 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
4
|
-
import { NotebookPen as y } from "lucide-react";
|
|
5
|
-
// ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js
|
|
6
|
-
var b = {
|
|
7
|
-
amount: "receivable-payment-amount",
|
|
8
|
-
date: "receivable-payment-date",
|
|
9
|
-
time: "receivable-payment-time"
|
|
10
|
-
};
|
|
11
|
-
function x({ id: e, message: t }) {
|
|
12
|
-
return t ? /* @__PURE__ */ _("p", {
|
|
13
|
-
id: e,
|
|
14
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
15
|
-
children: t
|
|
16
|
-
}) : null;
|
|
17
|
-
}
|
|
18
|
-
function S({ label: e, children: t }) {
|
|
19
|
-
return /* @__PURE__ */ v("div", {
|
|
20
|
-
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:px-4 ttw:py-3",
|
|
21
|
-
children: [/* @__PURE__ */ _("dt", {
|
|
22
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
23
|
-
children: e
|
|
24
|
-
}), /* @__PURE__ */ _("dd", {
|
|
25
|
-
className: "ttw:text-sm ttw:font-medium ttw:text-right ttw:break-all",
|
|
26
|
-
children: t
|
|
27
|
-
})]
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function C({ open: C, onOpenChange: w, step: T, values: E, errors: D, currencySymbol: O, amountDueLabel: k, review: A, inProgress: j, onChange: M, onFillAmountDue: N, onSave: P, onEdit: F, onConfirm: I, onCancel: L, labels: R }) {
|
|
31
|
-
let z = {
|
|
32
|
-
...h,
|
|
33
|
-
...R
|
|
34
|
-
};
|
|
35
|
-
return /* @__PURE__ */ _(i, {
|
|
36
|
-
open: C,
|
|
37
|
-
onOpenChange: w,
|
|
38
|
-
children: /* @__PURE__ */ _(a, {
|
|
39
|
-
closeDisabled: j,
|
|
40
|
-
labels: { close: z.close },
|
|
41
|
-
"aria-describedby": void 0,
|
|
42
|
-
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
43
|
-
children: T === "review" && A ? /* @__PURE__ */ v(g, { children: [
|
|
44
|
-
/* @__PURE__ */ v(s, {
|
|
45
|
-
className: "ttw:items-center ttw:text-center",
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ _("div", {
|
|
48
|
-
className: "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-muted",
|
|
49
|
-
children: /* @__PURE__ */ _(y, { className: "ttw:size-5 ttw:text-muted-foreground" })
|
|
50
|
-
}),
|
|
51
|
-
/* @__PURE__ */ _(c, {
|
|
52
|
-
className: "ttw:text-base ttw:font-normal",
|
|
53
|
-
children: z.reviewTitle
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ _("p", {
|
|
56
|
-
className: "ttw:text-2xl ttw:font-semibold",
|
|
57
|
-
children: A.amountLabel
|
|
58
|
-
}),
|
|
59
|
-
/* @__PURE__ */ _("p", {
|
|
60
|
-
className: "ttw:text-sm",
|
|
61
|
-
children: A.fromLabel
|
|
62
|
-
})
|
|
63
|
-
]
|
|
64
|
-
}),
|
|
65
|
-
/* @__PURE__ */ v("dl", {
|
|
66
|
-
className: "ttw:divide-y ttw:divide-border ttw:rounded-lg ttw:border ttw:border-border",
|
|
67
|
-
children: [
|
|
68
|
-
/* @__PURE__ */ _(S, {
|
|
69
|
-
label: z.receivedLabel,
|
|
70
|
-
children: A.receivedLabel
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ _(S, {
|
|
73
|
-
label: z.referenceLabel,
|
|
74
|
-
children: A.referenceLabel
|
|
75
|
-
}),
|
|
76
|
-
/* @__PURE__ */ _(S, {
|
|
77
|
-
label: z.createdByLabel,
|
|
78
|
-
children: A.isCreatedByLoading ? /* @__PURE__ */ _(m, { className: "ttw:h-4 ttw:w-24" }) : A.createdByLabel
|
|
79
|
-
})
|
|
80
|
-
]
|
|
81
|
-
}),
|
|
82
|
-
/* @__PURE__ */ _(e, {
|
|
83
|
-
className: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800",
|
|
84
|
-
children: /* @__PURE__ */ _(t, {
|
|
85
|
-
className: "ttw:text-amber-800",
|
|
86
|
-
children: z.reviewWarning
|
|
87
|
-
})
|
|
88
|
-
}),
|
|
89
|
-
/* @__PURE__ */ v(o, {
|
|
90
|
-
className: "ttw:sm:justify-between",
|
|
91
|
-
children: [/* @__PURE__ */ _(n, {
|
|
92
|
-
variant: "ghost",
|
|
93
|
-
onClick: L,
|
|
94
|
-
children: z.cancelButton
|
|
95
|
-
}), /* @__PURE__ */ v("div", {
|
|
96
|
-
className: "ttw:flex ttw:gap-2",
|
|
97
|
-
children: [/* @__PURE__ */ _(n, {
|
|
98
|
-
variant: "outline",
|
|
99
|
-
disabled: j,
|
|
100
|
-
onClick: F,
|
|
101
|
-
children: z.editRecordButton
|
|
102
|
-
}), /* @__PURE__ */ _(n, {
|
|
103
|
-
disabled: j,
|
|
104
|
-
onClick: I,
|
|
105
|
-
children: z.confirmButton
|
|
106
|
-
})]
|
|
107
|
-
})]
|
|
108
|
-
})
|
|
109
|
-
] }) : /* @__PURE__ */ v("form", {
|
|
110
|
-
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
111
|
-
noValidate: !0,
|
|
112
|
-
onSubmit: (e) => {
|
|
113
|
-
e.preventDefault(), P();
|
|
114
|
-
},
|
|
115
|
-
children: [
|
|
116
|
-
/* @__PURE__ */ _(s, { children: /* @__PURE__ */ _(c, { children: z.title }) }),
|
|
117
|
-
/* @__PURE__ */ v("div", {
|
|
118
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
119
|
-
children: [
|
|
120
|
-
/* @__PURE__ */ _(p, {
|
|
121
|
-
htmlFor: b.amount,
|
|
122
|
-
requirement: l.Required,
|
|
123
|
-
children: z.amountLabel
|
|
124
|
-
}),
|
|
125
|
-
/* @__PURE__ */ v(u, { children: [/* @__PURE__ */ _(f, {
|
|
126
|
-
id: b.amount,
|
|
127
|
-
type: "number",
|
|
128
|
-
required: !0,
|
|
129
|
-
placeholder: z.amountPlaceholder,
|
|
130
|
-
"data-has-end-addon": !0,
|
|
131
|
-
"aria-invalid": !!D?.amount || void 0,
|
|
132
|
-
"aria-describedby": D?.amount ? `${b.amount}-error` : void 0,
|
|
133
|
-
value: E.amount,
|
|
134
|
-
onChange: (e) => M({ amount: e.target.value })
|
|
135
|
-
}), /* @__PURE__ */ _(d, {
|
|
136
|
-
align: "inline-end",
|
|
137
|
-
children: O
|
|
138
|
-
})] }),
|
|
139
|
-
/* @__PURE__ */ _(x, {
|
|
140
|
-
id: `${b.amount}-error`,
|
|
141
|
-
message: D?.amount
|
|
142
|
-
}),
|
|
143
|
-
/* @__PURE__ */ v("p", {
|
|
144
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
145
|
-
children: [
|
|
146
|
-
z.fullAmountDuePrefix,
|
|
147
|
-
" ",
|
|
148
|
-
/* @__PURE__ */ _(n, {
|
|
149
|
-
type: "button",
|
|
150
|
-
variant: "link",
|
|
151
|
-
className: "ttw:h-auto ttw:p-0 ttw:underline",
|
|
152
|
-
onClick: N,
|
|
153
|
-
children: k
|
|
154
|
-
})
|
|
155
|
-
]
|
|
156
|
-
})
|
|
157
|
-
]
|
|
158
|
-
}),
|
|
159
|
-
/* @__PURE__ */ v("div", {
|
|
160
|
-
className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
|
|
161
|
-
children: [/* @__PURE__ */ v("div", {
|
|
162
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
163
|
-
children: [
|
|
164
|
-
/* @__PURE__ */ _(p, {
|
|
165
|
-
htmlFor: b.date,
|
|
166
|
-
requirement: l.Required,
|
|
167
|
-
children: z.dateLabel
|
|
168
|
-
}),
|
|
169
|
-
/* @__PURE__ */ _(r, {
|
|
170
|
-
id: b.date,
|
|
171
|
-
value: E.paymentDate,
|
|
172
|
-
onChange: (e) => M({ paymentDate: e }),
|
|
173
|
-
placeholder: z.datePlaceholder,
|
|
174
|
-
iconPosition: "end",
|
|
175
|
-
"aria-invalid": !!D?.paymentDate || void 0,
|
|
176
|
-
"aria-describedby": D?.paymentDate ? `${b.date}-error` : void 0
|
|
177
|
-
}),
|
|
178
|
-
/* @__PURE__ */ _(x, {
|
|
179
|
-
id: `${b.date}-error`,
|
|
180
|
-
message: D?.paymentDate
|
|
181
|
-
})
|
|
182
|
-
]
|
|
183
|
-
}), /* @__PURE__ */ v("div", {
|
|
184
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
185
|
-
children: [
|
|
186
|
-
/* @__PURE__ */ _(p, {
|
|
187
|
-
htmlFor: b.time,
|
|
188
|
-
requirement: l.Required,
|
|
189
|
-
children: z.timeLabel
|
|
190
|
-
}),
|
|
191
|
-
/* @__PURE__ */ v(u, { children: [/* @__PURE__ */ _(f, {
|
|
192
|
-
id: b.time,
|
|
193
|
-
type: "time",
|
|
194
|
-
required: !0,
|
|
195
|
-
"data-has-end-addon": !0,
|
|
196
|
-
"aria-invalid": !!D?.paymentTime || void 0,
|
|
197
|
-
"aria-describedby": D?.paymentTime ? `${b.time}-error` : void 0,
|
|
198
|
-
value: E.paymentTime,
|
|
199
|
-
onChange: (e) => M({ paymentTime: e.target.value })
|
|
200
|
-
}), /* @__PURE__ */ _(d, {
|
|
201
|
-
align: "inline-end",
|
|
202
|
-
children: z.timeZoneSuffix
|
|
203
|
-
})] }),
|
|
204
|
-
/* @__PURE__ */ _(x, {
|
|
205
|
-
id: `${b.time}-error`,
|
|
206
|
-
message: D?.paymentTime
|
|
207
|
-
})
|
|
208
|
-
]
|
|
209
|
-
})]
|
|
210
|
-
}),
|
|
211
|
-
/* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _(n, {
|
|
212
|
-
type: "button",
|
|
213
|
-
variant: "ghost",
|
|
214
|
-
onClick: L,
|
|
215
|
-
children: z.cancelButton
|
|
216
|
-
}), /* @__PURE__ */ _(n, {
|
|
217
|
-
type: "submit",
|
|
218
|
-
loading: j,
|
|
219
|
-
children: z.saveButton
|
|
220
|
-
})] })
|
|
221
|
-
]
|
|
222
|
-
})
|
|
223
|
-
})
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
export { C as ReceivablePaymentDialog, C as default };
|
|
1
|
+
import "./index31.js";
|
|
2
|
+
import "./index43.js";
|
|
@@ -1,22 +1,47 @@
|
|
|
1
|
+
import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
1
3
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
4
|
+
function r({ label: r, value: i, className: a }) {
|
|
5
|
+
return /* @__PURE__ */ n("li", {
|
|
6
|
+
className: e("ttw:flex ttw:items-center ttw:justify-between", a),
|
|
7
|
+
children: [/* @__PURE__ */ t("span", { children: r }), /* @__PURE__ */ t("span", { children: i })]
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function i({ totals: e, labels: i }) {
|
|
11
|
+
return /* @__PURE__ */ n("ul", {
|
|
12
|
+
className: "ttw:flex ttw:w-full ttw:list-none ttw:flex-col ttw:gap-1.5",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ t(r, {
|
|
15
|
+
label: i.subtotalLabel,
|
|
16
|
+
value: e.subtotal,
|
|
17
|
+
className: "ttw:text-sm ttw:font-normal"
|
|
18
|
+
}),
|
|
19
|
+
/* @__PURE__ */ t(r, {
|
|
20
|
+
label: i.discountTotalLabel,
|
|
21
|
+
value: e.discount,
|
|
22
|
+
className: "ttw:text-sm ttw:font-normal"
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ t(r, {
|
|
25
|
+
label: i.nonTaxableSubtotalLabel,
|
|
26
|
+
value: e.nonTaxableSubtotal,
|
|
27
|
+
className: "ttw:text-sm ttw:font-normal ttw:text-muted-foreground"
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ t(r, {
|
|
30
|
+
label: i.taxableSubtotalLabel,
|
|
31
|
+
value: e.taxableSubtotal,
|
|
32
|
+
className: "ttw:text-sm ttw:font-normal ttw:text-muted-foreground"
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ t(r, {
|
|
35
|
+
label: i.taxTotalLabel,
|
|
36
|
+
value: e.tax,
|
|
37
|
+
className: "ttw:text-sm ttw:font-normal"
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ t(r, {
|
|
40
|
+
label: i.totalLabel,
|
|
41
|
+
value: e.total,
|
|
42
|
+
className: "ttw:text-lg ttw:font-medium"
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export { i as ReceivableFormTotals };
|
|
@@ -1,7 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx as
|
|
1
|
+
import { Field as e, FieldContent as t, FieldDescription as n, FieldError as r, FieldLabel as i, Textarea as a, Typography as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
3
3
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function l({ id: l, value: u, error: d, disabled: f, label: p, optionalSuffix: m, placeholder: h, description: g, onChange: _ }) {
|
|
5
|
+
return /* @__PURE__ */ s(e, { children: /* @__PURE__ */ c(t, { children: [
|
|
6
|
+
/* @__PURE__ */ c(i, {
|
|
7
|
+
htmlFor: l,
|
|
8
|
+
className: "ttw:text-nowrap",
|
|
9
|
+
children: [p, /* @__PURE__ */ s(o, {
|
|
10
|
+
variant: "body2",
|
|
11
|
+
component: "span",
|
|
12
|
+
color: "muted",
|
|
13
|
+
className: "ttw:leading-snug",
|
|
14
|
+
children: m
|
|
15
|
+
})]
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ s(a, {
|
|
18
|
+
id: l,
|
|
19
|
+
value: u,
|
|
20
|
+
disabled: f,
|
|
21
|
+
placeholder: h,
|
|
22
|
+
className: "ttw:h-26 ttw:resize-none",
|
|
23
|
+
"aria-invalid": !!d,
|
|
24
|
+
onChange: (e) => _(e.target.value)
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ s(n, { children: g }),
|
|
27
|
+
/* @__PURE__ */ s(r, { errors: d ? [{ message: d }] : [] })
|
|
28
|
+
] }) });
|
|
6
29
|
}
|
|
7
|
-
|
|
30
|
+
function u({ idPrefix: e, openingNote: t, closingNote: n, openingNoteError: r, closingNoteError: i, disabled: a, onOpeningNoteChange: u, onClosingNoteChange: d, labels: f }) {
|
|
31
|
+
return /* @__PURE__ */ c("div", {
|
|
32
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ c("div", {
|
|
35
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
|
|
36
|
+
children: [/* @__PURE__ */ s(o, {
|
|
37
|
+
variant: "h4",
|
|
38
|
+
children: f.notesHeading
|
|
39
|
+
}), /* @__PURE__ */ s(o, {
|
|
40
|
+
variant: "body2",
|
|
41
|
+
color: "muted",
|
|
42
|
+
className: "ttw:font-medium",
|
|
43
|
+
children: f.notesDescription
|
|
44
|
+
})]
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ s(l, {
|
|
47
|
+
id: `${e}-opening-note`,
|
|
48
|
+
value: t,
|
|
49
|
+
error: r,
|
|
50
|
+
disabled: a,
|
|
51
|
+
label: f.openingNoteLabel,
|
|
52
|
+
optionalSuffix: f.optionalSuffix,
|
|
53
|
+
placeholder: f.openingNotePlaceholder,
|
|
54
|
+
description: f.openingNoteDescription,
|
|
55
|
+
onChange: u
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ s(l, {
|
|
58
|
+
id: `${e}-closing-note`,
|
|
59
|
+
value: n,
|
|
60
|
+
error: i,
|
|
61
|
+
disabled: a,
|
|
62
|
+
label: f.closingNoteLabel,
|
|
63
|
+
optionalSuffix: f.optionalSuffix,
|
|
64
|
+
placeholder: f.closingNotePlaceholder,
|
|
65
|
+
description: f.closingNoteDescription,
|
|
66
|
+
onChange: d
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
export { u as ReceivableNotesSection };
|