vlite3 1.1.1 → 1.1.2

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