vlite3 1.1.1 → 1.1.4
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/components/AttachmentsList/AttachmentsList.vue.d.ts +2 -17
- package/components/AttachmentsList/AttachmentsList.vue.js +273 -175
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.d.ts +1 -1
- package/components/Button.vue.js +30 -28
- package/components/Calendar/Calendar.vue.d.ts +6 -6
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +12 -3
- package/components/CategoryManager/CategoryManager.vue.js +204 -145
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/CategoryManager/types.d.ts +14 -0
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/Chip/Chip.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.js +30 -28
- package/components/CopyButton.vue.d.ts +50 -0
- package/components/CopyButton.vue.js +69 -0
- package/components/CopyButton.vue2.js +4 -0
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTable.vue.js +44 -44
- package/components/DatePicker.vue.js +41 -35
- package/components/DateRangePicker.vue.js +18 -17
- package/components/Dropdown/Dropdown.vue.d.ts +5 -2
- package/components/Dropdown/Dropdown.vue.js +117 -115
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +3 -1
- package/components/Dropdown/DropdownTrigger.vue.js +10 -6
- package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
- package/components/Dropdown/composables/useDropdownSelection.js +46 -31
- package/components/FilePicker/FilePicker.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +230 -238
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/FormField.vue.js +204 -148
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +28 -27
- package/components/Form/types.d.ts +2 -2
- package/components/Form/utils/form.utils.d.ts +3 -3
- package/components/Form/utils/form.utils.js +37 -37
- package/components/Input.vue.d.ts +3 -3
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.d.ts +1 -4
- package/components/Invoice/Invoice.vue.js +22 -13
- package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
- package/components/Invoice/InvoiceTotals.vue.js +86 -0
- package/components/Invoice/InvoiceTotals.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant1.vue.js +304 -271
- package/components/Invoice/InvoiceVariant2.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant2.vue.js +168 -181
- package/components/Invoice/InvoiceVariant3.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant3.vue.js +215 -182
- package/components/Invoice/InvoiceVariant4.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant4.vue.js +281 -238
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +26 -0
- package/components/List/List.vue.d.ts +1 -9
- package/components/List/List.vue.js +166 -165
- package/components/List/ListFieldRow.vue.d.ts +2 -2
- package/components/List/ListFieldRow.vue.js +50 -50
- package/components/Masonry/Masonry.vue.d.ts +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +60 -54
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.vue.js +47 -46
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/Navbar/NavbarItem.vue.d.ts +1 -1
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +121 -116
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.vue.d.ts +2 -2
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/Stats/types.d.ts +1 -0
- package/components/StatusChip/status-map.js +27 -7
- package/components/Switch.vue.d.ts +6 -1
- package/components/Switch.vue.js +61 -24
- package/components/TagInput/TagInput.vue.d.ts +187 -0
- package/components/TagInput/TagInput.vue.js +113 -0
- package/components/TagInput/TagInput.vue2.js +4 -0
- package/components/TagInput/index.d.ts +1 -0
- package/components/Textarea.vue.js +19 -18
- package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/core/config.d.ts +112 -0
- package/core/index.js +17 -5
- package/index.d.ts +2 -0
- package/index.js +279 -271
- package/package.json +1 -1
- package/style.css +617 -2
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +6 -0
- package/types/list.type.d.ts +6 -0
- package/types/styles.d.ts +1 -0
- package/utils/configUtils.d.ts +9 -0
- package/utils/configUtils.js +7 -0
- package/utils/functions.js +9 -9
- package/utils/index.d.ts +1 -0
|
@@ -1,290 +1,333 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as I, computed as x, openBlock as o, createElementBlock as s, normalizeStyle as w, createElementVNode as a, normalizeClass as n, toDisplayString as t, createBlock as D, createCommentVNode as c, createVNode as r, unref as u, createTextVNode as m, Fragment as f, renderList as z } from "vue";
|
|
2
|
+
import p from "../Price/Price.vue.js";
|
|
3
3
|
import g from "../DateTime/DateTime.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
4
|
+
import T from "../Barcode/Barcode.vue.js";
|
|
5
|
+
import N from "../QRCode/QRCode.vue.js";
|
|
6
|
+
import k from "../Avatar.vue.js";
|
|
7
|
+
import V from "../StatusChip/StatusChip.vue.js";
|
|
8
|
+
import B from "./InvoiceTotals.vue.js";
|
|
9
|
+
const $ = { class: "flex flex-col sm:flex-row justify-between items-start gap-4" }, C = { class: "flex flex-col gap-3" }, L = { class: "flex items-center gap-2.5 mt-1.5 flex-wrap" }, S = { class: "flex flex-wrap gap-5" }, j = { key: 0 }, q = { key: 1 }, E = { class: "flex flex-col items-start sm:items-end gap-2 shrink-0" }, F = { class: "grid grid-cols-1 md:grid-cols-2 gap-5 mb-6" }, O = { key: 0 }, P = { key: 1 }, K = { key: 2 }, Q = { key: 3 }, U = { class: "flex flex-col gap-0.5" }, A = { key: 0 }, G = { key: 1 }, H = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "text-gray-700 font-medium"
|
|
12
|
+
}, J = { key: 4 }, M = { key: 1 }, R = { key: 1 }, W = { key: 2 }, X = { key: 3 }, Y = { class: "flex flex-col gap-0.5" }, Z = { key: 0 }, ee = { key: 1 }, te = {
|
|
13
|
+
key: 4,
|
|
14
|
+
class: "text-xs font-semibold"
|
|
15
|
+
}, oe = {
|
|
16
|
+
scope: "col",
|
|
17
|
+
class: "invoice-th font-bold"
|
|
18
|
+
}, ae = {
|
|
19
|
+
scope: "col",
|
|
20
|
+
class: "invoice-th invoice-text-right font-bold"
|
|
21
|
+
}, se = {
|
|
22
|
+
key: 0,
|
|
23
|
+
scope: "col",
|
|
24
|
+
class: "invoice-th invoice-text-right font-bold"
|
|
25
|
+
}, ce = {
|
|
26
|
+
scope: "col",
|
|
27
|
+
class: "invoice-th invoice-text-right font-bold"
|
|
28
|
+
}, le = {
|
|
29
|
+
key: 1,
|
|
30
|
+
scope: "col",
|
|
31
|
+
class: "invoice-th invoice-text-right font-bold"
|
|
32
|
+
}, ne = {
|
|
33
|
+
scope: "col",
|
|
34
|
+
class: "invoice-th invoice-text-right font-bold text-gray-900"
|
|
35
|
+
}, ie = { class: "invoice-tbody" }, de = { class: "invoice-td" }, re = { class: "flex items-center gap-3" }, ue = { class: "min-w-0 flex-1" }, me = ["title"], ve = ["title"], xe = {
|
|
7
36
|
key: 1,
|
|
8
|
-
class: "block text-xs text-muted-foreground
|
|
9
|
-
},
|
|
37
|
+
class: "block text-xs text-muted-foreground line-clamp-2 max-w-md whitespace-normal mt-0.5 leading-relaxed"
|
|
38
|
+
}, fe = { class: "invoice-td invoice-text-right tabular-nums text-muted-foreground font-semibold text-sm" }, pe = {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "invoice-td invoice-text-right tabular-nums text-muted-foreground text-sm"
|
|
41
|
+
}, he = { class: "invoice-td invoice-text-right tabular-nums text-muted-foreground font-medium" }, be = {
|
|
42
|
+
key: 1,
|
|
43
|
+
class: "invoice-td invoice-text-right tabular-nums text-success font-bold"
|
|
44
|
+
}, ye = {
|
|
10
45
|
key: 0,
|
|
11
46
|
class: "flex flex-col items-end"
|
|
12
|
-
},
|
|
47
|
+
}, ge = {
|
|
13
48
|
key: 0,
|
|
14
|
-
class: "text-
|
|
15
|
-
},
|
|
49
|
+
class: "text-sm uppercase tracking-wider font-extrabold opacity-80 mt-0.5"
|
|
50
|
+
}, ke = {
|
|
51
|
+
key: 1,
|
|
52
|
+
class: "text-muted-foreground font-normal"
|
|
53
|
+
}, _e = { class: "invoice-td invoice-text-right tabular-nums font-bold text-foreground" }, Ie = { class: "flex flex-row flex-wrap gap-2 items-center" }, we = {
|
|
54
|
+
key: 0,
|
|
55
|
+
class: "shrink-0 inline-block"
|
|
56
|
+
}, De = {
|
|
57
|
+
key: 1,
|
|
58
|
+
class: "shrink-0 inline-block overflow-hidden"
|
|
59
|
+
}, ze = { key: 0 }, Te = { class: "w-full md:w-[42%] min-w-[260px]" }, Ne = { key: 0 }, Ve = { key: 1 }, Oe = /* @__PURE__ */ I({
|
|
16
60
|
__name: "InvoiceVariant4",
|
|
17
61
|
props: {
|
|
18
62
|
data: {},
|
|
19
|
-
compact: { type: Boolean, default: !1 }
|
|
63
|
+
compact: { type: Boolean, default: !1 },
|
|
64
|
+
displayBarcodeValue: { type: Boolean, default: !1 },
|
|
65
|
+
labels: {}
|
|
20
66
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const h =
|
|
23
|
-
return (
|
|
24
|
-
|
|
25
|
-
|
|
67
|
+
setup(l) {
|
|
68
|
+
const h = l, e = x(() => h.data), d = x(() => h.labels || {}), b = x(() => e.value.items.some((v) => !!v.size)), y = x(() => e.value.items.some((v) => v.discount !== void 0));
|
|
69
|
+
return (v, Be) => (o(), s("div", {
|
|
70
|
+
class: "v-invoice-v4 bg-background border border-border text-foreground overflow-hidden rounded-xl font-sans print:shadow-none print:border-none",
|
|
71
|
+
style: w({
|
|
72
|
+
"--invoice-cell-px": l.compact ? "0.75rem" : "1rem",
|
|
73
|
+
"--invoice-cell-py": l.compact ? "0.5rem" : "0.75rem",
|
|
74
|
+
"--invoice-thead-bg": "var(--color-muted)",
|
|
75
|
+
"--invoice-thead-border": "1px solid var(--color-border)",
|
|
76
|
+
"--invoice-thead-color": "var(--color-muted-foreground)",
|
|
77
|
+
"--invoice-tr-border": "1px solid var(--color-border)",
|
|
78
|
+
"--invoice-tr-hover-bg": "color-mix(in oklab, var(--color-muted) 40%, transparent)",
|
|
79
|
+
"--invoice-td-valign": "middle"
|
|
80
|
+
})
|
|
81
|
+
}, [
|
|
82
|
+
a("div", {
|
|
83
|
+
class: n(["bg-gray-900 text-white", l.compact ? "px-5 py-4" : "px-6 py-5 sm:px-8"])
|
|
26
84
|
}, [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
85
|
+
a("div", $, [
|
|
86
|
+
a("div", C, [
|
|
87
|
+
a("div", null, [
|
|
88
|
+
a("h1", {
|
|
89
|
+
class: n(["font-black tracking-tighter uppercase leading-none text-white", l.compact ? "text-3xl" : "text-4xl"])
|
|
90
|
+
}, t(e.value.brandTitle || d.value.invoice || "INVOICE"), 3),
|
|
91
|
+
a("div", L, [
|
|
92
|
+
a("span", {
|
|
93
|
+
class: n(["font-semibold opacity-80", l.compact ? "text-sm" : "text-base"])
|
|
94
|
+
}, " #" + t(e.value.invoiceNumber), 3),
|
|
95
|
+
e.value.status ? (o(), D(V, {
|
|
96
|
+
key: 0,
|
|
97
|
+
status: e.value.status,
|
|
98
|
+
"hide-icon": "",
|
|
99
|
+
size: "small"
|
|
100
|
+
}, null, 8, ["status"])) : c("", !0)
|
|
101
|
+
])
|
|
102
|
+
]),
|
|
103
|
+
a("div", S, [
|
|
104
|
+
e.value.issuedDate ? (o(), s("div", j, [
|
|
105
|
+
a("p", {
|
|
106
|
+
class: n(["font-semibold uppercase tracking-widest opacity-60", l.compact ? "text-[9px] mb-0.5" : "text-[10px] mb-1"])
|
|
107
|
+
}, t(d.value.issued || "Issue Date"), 3),
|
|
108
|
+
r(u(g), {
|
|
109
|
+
value: e.value.issuedDate,
|
|
110
|
+
type: "date",
|
|
111
|
+
class: n(["font-extrabold", l.compact ? "text-sm" : "text-base"])
|
|
112
|
+
}, null, 8, ["value", "class"])
|
|
113
|
+
])) : c("", !0),
|
|
114
|
+
e.value.dueDate ? (o(), s("div", q, [
|
|
115
|
+
a("p", {
|
|
116
|
+
class: n(["font-semibold uppercase tracking-widest opacity-60", l.compact ? "text-[9px] mb-0.5" : "text-[10px] mb-1"])
|
|
117
|
+
}, t(d.value.due || "Due Date"), 3),
|
|
118
|
+
r(u(g), {
|
|
119
|
+
value: e.value.dueDate,
|
|
120
|
+
type: "date",
|
|
121
|
+
class: n(["font-extrabold", l.compact ? "text-sm" : "text-base"])
|
|
122
|
+
}, null, 8, ["value", "class"])
|
|
123
|
+
])) : c("", !0)
|
|
124
|
+
])
|
|
37
125
|
]),
|
|
38
|
-
|
|
39
|
-
e.value.brandLogo ? (o(),
|
|
126
|
+
a("div", E, [
|
|
127
|
+
e.value.brandLogo ? (o(), s("div", {
|
|
40
128
|
key: 0,
|
|
41
|
-
class:
|
|
129
|
+
class: n(["bg-white/10 rounded-lg p-2 border border-white/20", l.compact ? "h-11" : "h-14"])
|
|
42
130
|
}, [
|
|
43
|
-
|
|
131
|
+
r(k, {
|
|
44
132
|
src: e.value.brandLogo,
|
|
45
133
|
alt: e.value.brandName,
|
|
46
|
-
class: "h-full object-contain
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
134
|
+
class: "h-full w-auto object-contain",
|
|
135
|
+
rounded: "sm"
|
|
136
|
+
}, null, 8, ["src", "alt"])
|
|
137
|
+
], 2)) : c("", !0),
|
|
138
|
+
e.value.brandName ? (o(), s("h2", {
|
|
50
139
|
key: 1,
|
|
51
|
-
class:
|
|
52
|
-
},
|
|
140
|
+
class: n(["font-extrabold tracking-tight opacity-90 text-white", l.compact ? "text-base" : "text-lg"])
|
|
141
|
+
}, t(e.value.brandName), 3)) : c("", !0)
|
|
53
142
|
])
|
|
54
|
-
]
|
|
55
|
-
s("div", {
|
|
56
|
-
class: a(["flex flex-col md:flex-row justify-between items-start md:items-end gap-6 border-t border-white/20", t.compact ? "pt-3" : "pt-5"])
|
|
57
|
-
}, [
|
|
58
|
-
s("div", {
|
|
59
|
-
class: a(t.compact ? "flex gap-5" : "flex gap-8")
|
|
60
|
-
}, [
|
|
61
|
-
e.value.issuedDate ? (o(), c("div", j, [
|
|
62
|
-
s("p", {
|
|
63
|
-
class: a(["text-foreground/60 font-semibold uppercase tracking-widest", t.compact ? "text-[10px] mb-0.5" : "text-xs mb-1"])
|
|
64
|
-
}, " Issue Date ", 2),
|
|
65
|
-
u(r(g), {
|
|
66
|
-
value: e.value.issuedDate,
|
|
67
|
-
type: "date",
|
|
68
|
-
class: a(["font-bold", t.compact ? "text-sm" : "text-base"])
|
|
69
|
-
}, null, 8, ["value", "class"])
|
|
70
|
-
])) : n("", !0),
|
|
71
|
-
e.value.dueDate ? (o(), c("div", z, [
|
|
72
|
-
s("p", {
|
|
73
|
-
class: a(["text-foreground/60 font-semibold uppercase tracking-widest", t.compact ? "text-[10px] mb-0.5" : "text-xs mb-1"])
|
|
74
|
-
}, " Due Date ", 2),
|
|
75
|
-
u(r(g), {
|
|
76
|
-
value: e.value.dueDate,
|
|
77
|
-
type: "date",
|
|
78
|
-
class: a(["font-bold", t.compact ? "text-sm" : "text-base"])
|
|
79
|
-
}, null, 8, ["value", "class"])
|
|
80
|
-
])) : n("", !0)
|
|
81
|
-
], 2),
|
|
82
|
-
e.value.status ? (o(), c("div", {
|
|
83
|
-
key: 0,
|
|
84
|
-
class: a(["font-extrabold uppercase tracking-widest text-xs", r(w)(e.value.status)])
|
|
85
|
-
}, d(e.value.status), 3)) : n("", !0)
|
|
86
|
-
], 2)
|
|
143
|
+
])
|
|
87
144
|
], 2),
|
|
88
|
-
|
|
89
|
-
class:
|
|
145
|
+
a("div", {
|
|
146
|
+
class: n(l.compact ? "p-5" : "px-7 py-4.5")
|
|
90
147
|
}, [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
s("div", {
|
|
99
|
-
class: a(["text-muted-foreground leading-relaxed", t.compact ? "text-xs" : "text-sm"])
|
|
148
|
+
a("div", F, [
|
|
149
|
+
e.value.companyInfo ? (o(), s("div", O, [
|
|
150
|
+
a("p", {
|
|
151
|
+
class: n(["font-bold text-gray-700 uppercase tracking-widest border-b border-gray-300 pb-1 inline-block mb-2", l.compact ? "text-[10px]" : "text-[11px]"])
|
|
152
|
+
}, t(d.value.from || "From"), 3),
|
|
153
|
+
a("div", {
|
|
154
|
+
class: n(["text-muted-foreground leading-relaxed", l.compact ? "text-xs space-y-0.5" : "text-sm space-y-1"])
|
|
100
155
|
}, [
|
|
101
|
-
e.value.companyInfo.name ? (o(),
|
|
156
|
+
e.value.companyInfo.name ? (o(), s("p", {
|
|
102
157
|
key: 0,
|
|
103
|
-
class:
|
|
104
|
-
},
|
|
105
|
-
e.value.companyInfo.address ? (o(),
|
|
106
|
-
e.value.companyInfo.city
|
|
107
|
-
|
|
158
|
+
class: n(["font-extrabold text-foreground", l.compact ? "text-sm mb-0.5" : "text-base mb-1"])
|
|
159
|
+
}, t(e.value.companyInfo.name), 3)) : c("", !0),
|
|
160
|
+
e.value.companyInfo.address ? (o(), s("p", P, t(e.value.companyInfo.address), 1)) : c("", !0),
|
|
161
|
+
e.value.companyInfo.city || e.value.companyInfo.state ? (o(), s("p", K, [
|
|
162
|
+
m(t(e.value.companyInfo.city), 1),
|
|
163
|
+
e.value.companyInfo.city && e.value.companyInfo.state ? (o(), s(f, { key: 0 }, [
|
|
164
|
+
m(", ")
|
|
165
|
+
], 64)) : c("", !0),
|
|
166
|
+
m(t(e.value.companyInfo.state) + " " + t(e.value.companyInfo.zip), 1)
|
|
167
|
+
])) : c("", !0),
|
|
168
|
+
e.value.companyInfo.country ? (o(), s("p", Q, t(e.value.companyInfo.country), 1)) : c("", !0),
|
|
169
|
+
a("div", U, [
|
|
170
|
+
e.value.companyInfo.email ? (o(), s("p", A, t(e.value.companyInfo.email), 1)) : c("", !0),
|
|
171
|
+
e.value.companyInfo.phone ? (o(), s("p", G, t(e.value.companyInfo.phone), 1)) : c("", !0),
|
|
172
|
+
e.value.companyInfo.website ? (o(), s("p", H, t(e.value.companyInfo.website), 1)) : c("", !0)
|
|
173
|
+
]),
|
|
174
|
+
e.value.companyInfo.taxId ? (o(), s("p", J, t(d.value.taxId || "Tax ID") + ": " + t(e.value.companyInfo.taxId), 1)) : c("", !0)
|
|
108
175
|
], 2)
|
|
109
|
-
])) :
|
|
110
|
-
e.value.customerInfo ? (o(),
|
|
111
|
-
|
|
112
|
-
class:
|
|
113
|
-
}, "
|
|
114
|
-
|
|
115
|
-
class:
|
|
176
|
+
])) : c("", !0),
|
|
177
|
+
e.value.customerInfo ? (o(), s("div", M, [
|
|
178
|
+
a("p", {
|
|
179
|
+
class: n(["font-bold text-gray-700 uppercase tracking-widest border-b border-gray-300 pb-1 inline-block mb-2", l.compact ? "text-[10px]" : "text-[11px]"])
|
|
180
|
+
}, t(d.value.billedTo || "Billed To"), 3),
|
|
181
|
+
a("div", {
|
|
182
|
+
class: n(["text-muted-foreground leading-relaxed", l.compact ? "text-xs space-y-0.5" : "text-sm space-y-1"])
|
|
116
183
|
}, [
|
|
117
|
-
e.value.customerInfo.name ? (o(),
|
|
184
|
+
e.value.customerInfo.name ? (o(), s("p", {
|
|
118
185
|
key: 0,
|
|
119
|
-
class:
|
|
120
|
-
},
|
|
121
|
-
e.value.customerInfo.address ? (o(),
|
|
122
|
-
e.value.customerInfo.city
|
|
123
|
-
|
|
186
|
+
class: n(["font-extrabold text-foreground", l.compact ? "text-sm mb-0.5" : "text-base mb-1"])
|
|
187
|
+
}, t(e.value.customerInfo.name), 3)) : c("", !0),
|
|
188
|
+
e.value.customerInfo.address ? (o(), s("p", R, t(e.value.customerInfo.address), 1)) : c("", !0),
|
|
189
|
+
e.value.customerInfo.city || e.value.customerInfo.state ? (o(), s("p", W, [
|
|
190
|
+
m(t(e.value.customerInfo.city), 1),
|
|
191
|
+
e.value.customerInfo.city && e.value.customerInfo.state ? (o(), s(f, { key: 0 }, [
|
|
192
|
+
m(", ")
|
|
193
|
+
], 64)) : c("", !0),
|
|
194
|
+
m(t(e.value.customerInfo.state) + " " + t(e.value.customerInfo.zip), 1)
|
|
195
|
+
])) : c("", !0),
|
|
196
|
+
e.value.customerInfo.country ? (o(), s("p", X, t(e.value.customerInfo.country), 1)) : c("", !0),
|
|
197
|
+
a("div", Y, [
|
|
198
|
+
e.value.customerInfo.email ? (o(), s("p", Z, t(e.value.customerInfo.email), 1)) : c("", !0),
|
|
199
|
+
e.value.customerInfo.phone ? (o(), s("p", ee, t(e.value.customerInfo.phone), 1)) : c("", !0)
|
|
200
|
+
]),
|
|
201
|
+
e.value.customerInfo.taxId ? (o(), s("p", te, t(d.value.taxId || "Tax ID") + ": " + t(e.value.customerInfo.taxId), 1)) : c("", !0)
|
|
124
202
|
], 2)
|
|
125
|
-
])) :
|
|
126
|
-
]
|
|
127
|
-
|
|
128
|
-
class:
|
|
203
|
+
])) : c("", !0)
|
|
204
|
+
]),
|
|
205
|
+
a("div", {
|
|
206
|
+
class: n(["border border-border rounded-lg overflow-x-auto", l.compact ? "mb-5" : "mb-6"])
|
|
129
207
|
}, [
|
|
130
|
-
|
|
131
|
-
class:
|
|
208
|
+
a("table", {
|
|
209
|
+
class: n(["invoice-table", l.compact ? "text-xs" : "text-sm"])
|
|
132
210
|
}, [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
s("th",
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
p.value ? (o(), c("th", {
|
|
144
|
-
key: 0,
|
|
145
|
-
scope: "col",
|
|
146
|
-
class: a(["font-bold text-muted-foreground uppercase tracking-widest text-right", t.compact ? "py-2 text-xs" : "py-4 text-xs"])
|
|
147
|
-
}, " Size ", 2)) : n("", !0),
|
|
148
|
-
s("th", {
|
|
149
|
-
scope: "col",
|
|
150
|
-
class: a(["font-bold text-muted-foreground uppercase tracking-widest text-right", t.compact ? "py-2 text-xs" : "py-4 text-xs"])
|
|
151
|
-
}, " Price ", 2),
|
|
152
|
-
b.value ? (o(), c("th", {
|
|
153
|
-
key: 1,
|
|
154
|
-
scope: "col",
|
|
155
|
-
class: a(["font-bold text-muted-foreground uppercase tracking-widest text-right", t.compact ? "py-2 text-xs" : "py-4 text-xs"])
|
|
156
|
-
}, " Discount ", 2)) : n("", !0),
|
|
157
|
-
s("th", {
|
|
158
|
-
scope: "col",
|
|
159
|
-
class: a(["font-bold text-muted-foreground uppercase tracking-widest text-right", t.compact ? "py-2 text-xs" : "py-4 text-xs"])
|
|
160
|
-
}, " Total ", 2)
|
|
211
|
+
a("thead", {
|
|
212
|
+
class: n(["invoice-thead uppercase", l.compact ? "text-[9px]" : "text-[10px]"])
|
|
213
|
+
}, [
|
|
214
|
+
a("tr", null, [
|
|
215
|
+
a("th", oe, t(d.value.item || "Product"), 1),
|
|
216
|
+
a("th", ae, t(d.value.qty || "Qty"), 1),
|
|
217
|
+
b.value ? (o(), s("th", se, t(d.value.size || "Size"), 1)) : c("", !0),
|
|
218
|
+
a("th", ce, t(d.value.price || "Price"), 1),
|
|
219
|
+
y.value ? (o(), s("th", le, t(d.value.discount || "Discount"), 1)) : c("", !0),
|
|
220
|
+
a("th", ne, t(d.value.total || "Total"), 1)
|
|
161
221
|
])
|
|
162
|
-
]),
|
|
163
|
-
|
|
164
|
-
(o(!0),
|
|
165
|
-
key:
|
|
166
|
-
class: "group
|
|
222
|
+
], 2),
|
|
223
|
+
a("tbody", ie, [
|
|
224
|
+
(o(!0), s(f, null, z(e.value.items, (i, _) => (o(), s("tr", {
|
|
225
|
+
key: i.id || _,
|
|
226
|
+
class: "invoice-tr group"
|
|
167
227
|
}, [
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
s("div", P, [
|
|
172
|
-
l.thumbnail ? (o(), c("div", {
|
|
228
|
+
a("td", de, [
|
|
229
|
+
a("div", re, [
|
|
230
|
+
i.thumbnail ? (o(), s("div", {
|
|
173
231
|
key: 0,
|
|
174
|
-
class:
|
|
232
|
+
class: n(["shrink-0 overflow-hidden border border-border", l.compact ? "w-9 h-9 rounded-md" : "w-10 h-10 rounded-lg"])
|
|
175
233
|
}, [
|
|
176
|
-
|
|
177
|
-
src:
|
|
178
|
-
alt:
|
|
179
|
-
class: "w-full h-full
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
234
|
+
r(k, {
|
|
235
|
+
src: i.thumbnail,
|
|
236
|
+
alt: i.name,
|
|
237
|
+
class: "w-full h-full",
|
|
238
|
+
rounded: "sm"
|
|
239
|
+
}, null, 8, ["src", "alt"])
|
|
240
|
+
], 2)) : c("", !0),
|
|
241
|
+
a("div", ue, [
|
|
242
|
+
a("span", {
|
|
243
|
+
class: "block truncate font-semibold text-foreground text-sm",
|
|
244
|
+
title: i.name
|
|
245
|
+
}, t(i.name), 9, me),
|
|
246
|
+
i.sku ? (o(), s("div", {
|
|
188
247
|
key: 0,
|
|
189
|
-
class: "text-
|
|
190
|
-
title:
|
|
191
|
-
}, "
|
|
192
|
-
|
|
248
|
+
class: "text-xs uppercase tracking-widest text-muted-foreground font-medium truncate mt-0.5",
|
|
249
|
+
title: i.sku
|
|
250
|
+
}, t(d.value.sku || "SKU") + ": " + t(i.sku), 9, ve)) : c("", !0),
|
|
251
|
+
i.description && !l.compact ? (o(), s("span", xe, t(i.description), 1)) : c("", !0)
|
|
193
252
|
])
|
|
194
253
|
])
|
|
195
|
-
]
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}, d(l.size || "-"), 3)) : n("", !0),
|
|
203
|
-
s("td", {
|
|
204
|
-
class: a(["text-right tabular-nums text-muted-foreground", t.compact ? "py-3" : "py-4"])
|
|
205
|
-
}, [
|
|
206
|
-
u(r(i), {
|
|
207
|
-
value: l.price
|
|
254
|
+
]),
|
|
255
|
+
a("td", fe, t(i.quantity), 1),
|
|
256
|
+
b.value ? (o(), s("td", pe, t(i.size || "-"), 1)) : c("", !0),
|
|
257
|
+
a("td", he, [
|
|
258
|
+
r(u(p), {
|
|
259
|
+
value: i.price,
|
|
260
|
+
class: "text-sm"
|
|
208
261
|
}, null, 8, ["value"])
|
|
209
|
-
]
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
u(r(i), {
|
|
216
|
-
value: -l.discount
|
|
262
|
+
]),
|
|
263
|
+
y.value ? (o(), s("td", be, [
|
|
264
|
+
i.discount !== void 0 ? (o(), s("div", ye, [
|
|
265
|
+
r(u(p), {
|
|
266
|
+
value: -i.discount,
|
|
267
|
+
class: "text-sm"
|
|
217
268
|
}, null, 8, ["value"]),
|
|
218
|
-
|
|
219
|
-
])) : (o(),
|
|
220
|
-
]
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
value: l.total
|
|
269
|
+
i.discountLabel ? (o(), s("span", ge, t(i.discountLabel), 1)) : c("", !0)
|
|
270
|
+
])) : (o(), s("span", ke, "-"))
|
|
271
|
+
])) : c("", !0),
|
|
272
|
+
a("td", _e, [
|
|
273
|
+
r(u(p), {
|
|
274
|
+
value: i.total,
|
|
275
|
+
class: "text-sm"
|
|
226
276
|
}, null, 8, ["value"])
|
|
227
|
-
]
|
|
277
|
+
])
|
|
228
278
|
]))), 128))
|
|
229
279
|
])
|
|
230
280
|
], 2)
|
|
231
281
|
], 2),
|
|
232
|
-
|
|
233
|
-
class:
|
|
282
|
+
a("div", {
|
|
283
|
+
class: n(["flex flex-col-reverse md:flex-row justify-between items-start", l.compact ? "gap-5" : "gap-6"])
|
|
234
284
|
}, [
|
|
235
|
-
|
|
236
|
-
class:
|
|
285
|
+
a("div", {
|
|
286
|
+
class: n(["w-full md:w-1/2 flex flex-col", l.compact ? "gap-3" : "gap-4"])
|
|
237
287
|
}, [
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
288
|
+
a("div", Ie, [
|
|
289
|
+
e.value.qrcode ? (o(), s("div", we, [
|
|
290
|
+
r(u(N), {
|
|
291
|
+
value: e.value.qrcode,
|
|
292
|
+
size: l.compact ? 56 : 72
|
|
293
|
+
}, null, 8, ["value", "size"])
|
|
294
|
+
])) : c("", !0),
|
|
295
|
+
e.value.barcode ? (o(), s("div", De, [
|
|
296
|
+
r(u(T), {
|
|
297
|
+
value: e.value.barcode,
|
|
298
|
+
format: "CODE128",
|
|
299
|
+
height: l.compact ? 28 : 40,
|
|
300
|
+
width: l.compact ? 1.3 : 1.5,
|
|
301
|
+
"display-value": l.displayBarcodeValue
|
|
302
|
+
}, null, 8, ["value", "height", "width", "display-value"])
|
|
303
|
+
])) : c("", !0)
|
|
304
|
+
]),
|
|
305
|
+
e.value.notes ? (o(), s("div", ze, [
|
|
306
|
+
a("h4", {
|
|
307
|
+
class: n(["font-bold text-muted-foreground uppercase tracking-widest mb-1.5", l.compact ? "text-[9px]" : "text-[10px]"])
|
|
308
|
+
}, t(d.value.notes || "Notes & Terms"), 3),
|
|
309
|
+
a("div", {
|
|
310
|
+
class: n(["text-muted-foreground leading-relaxed whitespace-pre-wrap p-3 bg-muted/30 rounded-lg border border-border", l.compact ? "text-xs max-w-xs" : "text-xs max-w-sm"])
|
|
311
|
+
}, t(e.value.notes), 3)
|
|
312
|
+
])) : c("", !0)
|
|
253
313
|
], 2),
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}, [
|
|
260
|
-
|
|
261
|
-
key: x,
|
|
262
|
-
class: a(["flex justify-between items-center", [
|
|
263
|
-
l.isGrandTotal ? t.compact ? "pt-2 border-t-2 border-primary/20 text-lg font-black text-primary" : "pt-4 border-t-2 border-primary/20 text-xl font-black text-primary" : t.compact ? "text-xs font-semibold text-muted-foreground" : "text-sm font-semibold text-muted-foreground"
|
|
264
|
-
]])
|
|
265
|
-
}, [
|
|
266
|
-
s("span", {
|
|
267
|
-
class: a({
|
|
268
|
-
"uppercase tracking-widest text-xs": l.isGrandTotal && !t.compact,
|
|
269
|
-
"uppercase tracking-wide text-xs": l.isGrandTotal && t.compact
|
|
270
|
-
})
|
|
271
|
-
}, d(l.label), 3),
|
|
272
|
-
u(r(i), {
|
|
273
|
-
value: l.value
|
|
274
|
-
}, null, 8, ["value"])
|
|
275
|
-
], 2))), 128))
|
|
276
|
-
], 2)
|
|
277
|
-
], 2)
|
|
314
|
+
a("div", Te, [
|
|
315
|
+
r(B, {
|
|
316
|
+
totals: e.value.totals,
|
|
317
|
+
compact: l.compact,
|
|
318
|
+
variant: "Variant4"
|
|
319
|
+
}, null, 8, ["totals", "compact"])
|
|
320
|
+
])
|
|
278
321
|
], 2)
|
|
279
322
|
], 2),
|
|
280
|
-
|
|
281
|
-
class:
|
|
323
|
+
a("div", {
|
|
324
|
+
class: n(["bg-gray-900 text-white flex justify-center font-bold uppercase tracking-widest", l.compact ? "py-2 px-4 text-[9px]" : "py-2.5 px-6 text-[10px]"])
|
|
282
325
|
}, [
|
|
283
|
-
e.value.footerText ? (o(),
|
|
326
|
+
e.value.footerText ? (o(), s("span", Ne, t(e.value.footerText), 1)) : (o(), s("span", Ve, "Thank you for your business"))
|
|
284
327
|
], 2)
|
|
285
|
-
]));
|
|
328
|
+
], 4));
|
|
286
329
|
}
|
|
287
330
|
});
|
|
288
331
|
export {
|
|
289
|
-
|
|
332
|
+
Oe as default
|
|
290
333
|
};
|
|
@@ -82,6 +82,24 @@ export interface InvoiceData {
|
|
|
82
82
|
/** Footer text, usually for terms and conditions */
|
|
83
83
|
footerText?: string;
|
|
84
84
|
}
|
|
85
|
+
export interface InvoiceLabels {
|
|
86
|
+
invoice?: string;
|
|
87
|
+
invoiceNumber?: string;
|
|
88
|
+
issued?: string;
|
|
89
|
+
due?: string;
|
|
90
|
+
from?: string;
|
|
91
|
+
billedTo?: string;
|
|
92
|
+
status?: string;
|
|
93
|
+
item?: string;
|
|
94
|
+
price?: string;
|
|
95
|
+
qty?: string;
|
|
96
|
+
size?: string;
|
|
97
|
+
discount?: string;
|
|
98
|
+
total?: string;
|
|
99
|
+
notes?: string;
|
|
100
|
+
sku?: string;
|
|
101
|
+
taxId?: string;
|
|
102
|
+
}
|
|
85
103
|
export interface InvoiceProps {
|
|
86
104
|
data: InvoiceData;
|
|
87
105
|
variant?: InvoiceVariant;
|
|
@@ -90,4 +108,12 @@ export interface InvoiceProps {
|
|
|
90
108
|
* for a more compact, print-friendly layout that uses less paper.
|
|
91
109
|
*/
|
|
92
110
|
compact?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Whether to display the text value underneath the barcode
|
|
113
|
+
*/
|
|
114
|
+
displayBarcodeValue?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Custom text labels for static UI strings (e.g. overriding "Invoice", "Issued")
|
|
117
|
+
*/
|
|
118
|
+
labels?: InvoiceLabels;
|
|
93
119
|
}
|