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,301 +1,347 @@
1
- import { defineComponent as z, computed as y, openBlock as t, createElementBlock as o, normalizeStyle as g, createElementVNode as a, normalizeClass as l, createCommentVNode as c, toDisplayString as u, createTextVNode as i, Fragment as x, unref as d, createVNode as m, renderList as k } from "vue";
2
- import v from "../Price/Price.vue.js";
3
- import I from "../DateTime/DateTime.vue.js";
4
- import { getStatusColorClass as D } from "../../utils/status.js";
1
+ import { defineComponent as _, computed as y, openBlock as t, createElementBlock as o, normalizeStyle as z, createElementVNode as a, normalizeClass as l, createVNode as i, toDisplayString as n, createCommentVNode as c, unref as d, createBlock as D, createTextVNode as m, Fragment as x, renderList as g } from "vue";
2
+ import p from "../Price/Price.vue.js";
3
+ import k from "../DateTime/DateTime.vue.js";
5
4
  import N from "../Barcode/Barcode.vue.js";
6
5
  import T from "../QRCode/QRCode.vue.js";
7
- const j = ["src", "alt"], C = {
6
+ import I from "../Avatar.vue.js";
7
+ import B from "../StatusChip/StatusChip.vue.js";
8
+ const V = { class: "flex items-center justify-between gap-3" }, $ = { class: "shrink-0" }, S = {
9
+ key: 0,
10
+ class: "flex items-center gap-3 border-r-[1.5px] pr-3 border-gray-300"
11
+ }, j = {
8
12
  key: 1,
9
- class: "mt-1 text-muted-foreground space-y-0.5 text-sm"
10
- }, S = { key: 0 }, L = { key: 1 }, V = { key: 2 }, B = { key: 3 }, $ = { key: 4 }, q = { key: 5 }, E = {
13
+ class: "flex items-center gap-3 border-r-[1.5px] pr-3 border-gray-250"
14
+ }, q = { class: "grid grid-cols-2 gap-8" }, C = { key: 0 }, L = { key: 0 }, E = { key: 1 }, F = { key: 2 }, G = {
15
+ key: 3,
16
+ class: "pt-0.5"
17
+ }, U = { key: 4 }, K = {
18
+ key: 5,
19
+ class: "pt-0.5"
20
+ }, O = { key: 1 }, P = { key: 0 }, Q = { key: 1 }, A = { key: 2 }, H = {
21
+ key: 3,
22
+ class: "pt-0.5"
23
+ }, J = { key: 4 }, M = {
24
+ key: 5,
25
+ class: "pt-0.5"
26
+ }, R = {
11
27
  key: 1,
12
- class: "flex md:justify-end items-center gap-2 text-sm"
13
- }, P = {
14
- key: 2,
15
- class: "flex md:justify-end items-center gap-2 text-sm"
16
- }, _ = { class: "font-semibold text-lg" }, F = { class: "text-muted-foreground space-y-0.5 text-sm" }, G = { key: 0 }, K = { key: 1 }, O = { key: 2 }, Q = { key: 3 }, U = { key: 4 }, A = { key: 5 }, H = { class: "bg-muted text-muted-foreground uppercase font-semibold text-xs" }, J = { class: "divide-y divide-border" }, M = { class: "flex items-start gap-3" }, R = ["src", "alt"], W = { class: "space-y-0.5 min-w-0 flex-1" }, X = ["title"], Y = ["title"], Z = {
28
+ class: "border-b border-border overflow-x-auto"
29
+ }, W = { class: "invoice-thead" }, X = {
30
+ key: 0,
31
+ scope: "col",
32
+ class: "invoice-th invoice-text-right"
33
+ }, Y = {
17
34
  key: 1,
18
- class: "text-xs text-muted-foreground line-clamp-1 max-w-[280px]"
19
- }, ee = {
35
+ scope: "col",
36
+ class: "invoice-th invoice-text-right"
37
+ }, Z = { class: "invoice-tbody" }, ee = { class: "invoice-td" }, te = { class: "flex items-start gap-3" }, oe = { class: "min-w-0 flex-1" }, ae = ["title"], se = {
20
38
  key: 0,
21
- class: "flex flex-col items-end"
22
- }, te = {
39
+ class: "text-muted-foreground uppercase tracking-wider font-medium mt-0.5 text-xs"
40
+ }, ce = {
41
+ key: 1,
42
+ class: "text-muted-foreground mt-0.5 whitespace-normal max-w-xs text-xs leading-snug"
43
+ }, ne = { class: "invoice-td invoice-text-right tabular-nums font-medium text-sm" }, le = {
23
44
  key: 0,
24
- class: "text-xs uppercase font-bold"
25
- }, oe = { key: 1 }, ae = {
45
+ class: "invoice-td invoice-text-right tabular-nums text-muted-foreground"
46
+ }, re = { class: "invoice-td invoice-text-right tabular-nums" }, ue = {
47
+ key: 1,
48
+ class: "invoice-td invoice-text-right tabular-nums text-success font-semibold"
49
+ }, ie = {
26
50
  key: 0,
27
- class: "space-y-1"
28
- }, se = { class: "flex gap-4 items-end" }, ce = {
51
+ class: "flex flex-col items-end gap-0.5"
52
+ }, de = {
53
+ key: 1,
54
+ class: "text-muted-foreground font-normal"
55
+ }, me = { class: "invoice-td invoice-text-right tabular-nums font-bold text-foreground" }, ve = { key: 0 }, xe = {
56
+ key: 1,
57
+ class: "flex flex-row flex-wrap gap-3 items-center"
58
+ }, pe = {
29
59
  key: 0,
30
- class: "flex flex-col items-center gap-2"
31
- }, le = {
60
+ class: "shrink-0 p-1 bg-white border border-border"
61
+ }, fe = {
32
62
  key: 1,
33
- class: "flex flex-col items-start gap-2"
34
- }, ue = { class: "w-full md:w-1/3 min-w-[220px]" }, xe = /* @__PURE__ */ z({
63
+ class: "shrink-0 p-1.5 bg-white border border-border"
64
+ }, ye = { class: "w-full lg:w-2/5 min-w-[220px]" }, ze = /* @__PURE__ */ _({
35
65
  __name: "InvoiceVariant1",
36
66
  props: {
37
67
  data: {},
38
- compact: { type: Boolean, default: !1 }
68
+ compact: { type: Boolean, default: !1 },
69
+ displayBarcodeValue: { type: Boolean, default: !1 }
39
70
  },
40
71
  setup(s) {
41
- const w = s, e = y(() => w.data), b = y(() => e.value.items.some((p) => !!p.size)), h = y(() => e.value.items.some((p) => p.discount !== void 0));
42
- return (p, r) => (t(), o("div", {
43
- class: "v-invoice-v1 bg-background text-foreground rounded-xl border border-border overflow-hidden shadow-sm",
44
- style: g({
45
- "--text-sm": s.compact ? "13px" : "14px"
72
+ const w = s, e = y(() => w.data), b = y(() => e.value.items.some((v) => !!v.size)), h = y(() => e.value.items.some((v) => v.discount !== void 0));
73
+ return (v, u) => (t(), o("div", {
74
+ class: "v-invoice-v1 bg-background text-foreground border border-border rounded-sm",
75
+ style: z({
76
+ "--text-sm": s.compact ? "12.5px" : "13.5px",
77
+ "--invoice-cell-px": s.compact ? "0.875rem" : "1.25rem",
78
+ "--invoice-cell-py": s.compact ? "0.625rem" : "0.875rem",
79
+ "--invoice-thead-bg": "var(--color-muted)",
80
+ "--invoice-tr-border": "1px solid var(--color-border)",
81
+ "--invoice-tr-hover-bg": "color-mix(in oklab, var(--color-muted) 40%, transparent)"
46
82
  })
47
83
  }, [
48
84
  a("div", {
49
- class: l(["flex flex-col md:flex-row justify-between items-start border-b border-border bg-muted/20", s.compact ? "gap-4 p-6" : "gap-6 p-6 sm:p-8"])
85
+ class: l(["border-b border-border", s.compact ? "px-5 py-3" : "px-6 pt-5 pb-3.5"])
50
86
  }, [
51
- a("div", {
52
- class: l(s.compact ? "space-y-3" : "space-y-4")
53
- }, [
54
- e.value.brandLogo ? (t(), o("div", {
55
- key: 0,
56
- class: l(s.compact ? "h-10" : "h-12")
57
- }, [
58
- a("img", {
59
- src: e.value.brandLogo,
60
- alt: e.value.brandName,
61
- class: "h-full object-contain"
62
- }, null, 8, j)
63
- ], 2)) : c("", !0),
64
- a("div", null, [
65
- e.value.brandName ? (t(), o("h2", {
66
- key: 0,
67
- class: l(s.compact ? "text-lg font-bold" : "text-xl font-bold")
68
- }, u(e.value.brandName), 3)) : c("", !0),
69
- e.value.companyInfo ? (t(), o("div", C, [
70
- e.value.companyInfo.address ? (t(), o("p", S, u(e.value.companyInfo.address), 1)) : c("", !0),
71
- e.value.companyInfo.city || e.value.companyInfo.state || e.value.companyInfo.zip ? (t(), o("p", L, [
72
- i(u(e.value.companyInfo.city), 1),
73
- e.value.companyInfo.city && e.value.companyInfo.state ? (t(), o(x, { key: 0 }, [
74
- i(", ")
75
- ], 64)) : c("", !0),
76
- i(u(e.value.companyInfo.state) + " " + u(e.value.companyInfo.zip), 1)
77
- ])) : c("", !0),
78
- e.value.companyInfo.country ? (t(), o("p", V, u(e.value.companyInfo.country), 1)) : c("", !0),
79
- e.value.companyInfo.email ? (t(), o("p", B, u(e.value.companyInfo.email), 1)) : c("", !0),
80
- e.value.companyInfo.phone ? (t(), o("p", $, u(e.value.companyInfo.phone), 1)) : c("", !0),
81
- e.value.companyInfo.taxId ? (t(), o("p", q, "Tax ID: " + u(e.value.companyInfo.taxId), 1)) : c("", !0)
82
- ])) : c("", !0)
83
- ])
84
- ], 2),
85
- a("div", {
86
- class: l(["text-left md:text-right shrink-0", s.compact ? "space-y-3" : "space-y-4"])
87
- }, [
88
- a("div", null, [
89
- a("h1", {
90
- class: l(["font-bold tracking-tight text-primary uppercase", s.compact ? "text-2xl" : "text-3xl"])
91
- }, u(e.value.brandTitle || "Invoice"), 3),
92
- a("p", {
93
- class: l(["font-medium mt-1 text-muted-foreground", s.compact ? "text-base" : "text-lg"])
94
- }, " #" + u(e.value.invoiceNumber), 3)
87
+ a("div", V, [
88
+ a("div", $, [
89
+ a("div", {
90
+ class: l(s.compact ? "h-10 w-10" : "h-13 w-13")
91
+ }, [
92
+ i(I, {
93
+ src: e.value.brandLogo,
94
+ alt: e.value.brandName,
95
+ class: "h-full w-auto object-contain",
96
+ rounded: "md"
97
+ }, null, 8, ["src", "alt"])
98
+ ], 2)
95
99
  ]),
96
100
  a("div", {
97
- class: l((s.compact, "space-y-1"))
101
+ class: l(["flex-1 min-w-0", s.compact ? "space-y-0.5" : "space-y-1"])
98
102
  }, [
99
- e.value.status ? (t(), o("div", {
103
+ e.value.brandName ? (t(), o("p", {
100
104
  key: 0,
101
- class: l(["text-xs font-bold uppercase tracking-widest mb-1", d(D)(e.value.status)])
102
- }, u(e.value.status), 3)) : c("", !0),
103
- e.value.issuedDate ? (t(), o("div", E, [
104
- r[0] || (r[0] = a("span", { class: "text-muted-foreground font-medium w-24 md:w-auto" }, "Issued:", -1)),
105
- m(d(I), {
106
- value: e.value.issuedDate,
107
- type: "date",
108
- class: "font-medium"
109
- }, null, 8, ["value"])
110
- ])) : c("", !0),
111
- e.value.dueDate ? (t(), o("div", P, [
112
- r[1] || (r[1] = a("span", { class: "text-muted-foreground font-medium w-24 md:w-auto" }, "Due:", -1)),
113
- m(d(I), {
114
- value: e.value.dueDate,
115
- type: "date",
116
- class: "font-medium"
117
- }, null, 8, ["value"])
118
- ])) : c("", !0)
105
+ class: l(["font-bold text-foreground leading-tight truncate", s.compact ? "text-base" : "text-lg"])
106
+ }, n(e.value.brandName), 3)) : c("", !0),
107
+ e.value.brandTitle ? (t(), o("p", {
108
+ key: 1,
109
+ class: l(["text-muted-foreground font-medium truncate", s.compact ? "text-xs" : "text-sm"])
110
+ }, n(e.value.brandTitle), 3)) : c("", !0)
111
+ ], 2),
112
+ a("div", {
113
+ class: l(["text-right shrink-0", s.compact ? "space-y-2" : "space-y-3"])
114
+ }, [
115
+ a("div", null, [
116
+ a("h1", {
117
+ class: l(["font-black tracking-tight text-foreground uppercase", s.compact ? "text-2xl" : "text-3xl"])
118
+ }, " Invoice ", 2),
119
+ a("p", {
120
+ class: l(["text-muted-foreground font-medium mt-0.5", s.compact ? "text-xs" : "text-sm"])
121
+ }, " #" + n(e.value.invoiceNumber), 3)
122
+ ])
119
123
  ], 2)
124
+ ]),
125
+ a("div", {
126
+ class: l(["flex items-center gap-4 text-xs", s.compact ? "mt-2" : "mt-4"])
127
+ }, [
128
+ e.value.issuedDate ? (t(), o("div", S, [
129
+ u[0] || (u[0] = a("span", { class: "text-muted-foreground uppercase tracking-wider font-medium" }, " Issued ", -1)),
130
+ i(d(k), {
131
+ value: e.value.issuedDate,
132
+ type: "date",
133
+ class: "font-semibold text-foreground tabular-nums"
134
+ }, null, 8, ["value"])
135
+ ])) : c("", !0),
136
+ e.value.dueDate ? (t(), o("div", j, [
137
+ u[1] || (u[1] = a("span", { class: "text-muted-foreground uppercase tracking-wider font-medium" }, " Due ", -1)),
138
+ i(d(k), {
139
+ value: e.value.dueDate,
140
+ type: "date",
141
+ class: "font-semibold text-foreground tabular-nums"
142
+ }, null, 8, ["value"])
143
+ ])) : c("", !0),
144
+ e.value.status ? (t(), D(B, {
145
+ key: 2,
146
+ status: e.value.status,
147
+ "hide-icon": "",
148
+ size: "small"
149
+ }, null, 8, ["status"])) : c("", !0)
120
150
  ], 2)
121
151
  ], 2),
122
- a("div", {
123
- class: l(s.compact ? "p-6 space-y-6" : "p-6 sm:p-8 space-y-8")
152
+ e.value.companyInfo || e.value.customerInfo ? (t(), o("div", {
153
+ key: 0,
154
+ class: l(["border-b border-border", s.compact ? "px-5 py-4" : "px-6 pt-4 pb-5"])
124
155
  }, [
125
- e.value.customerInfo ? (t(), o("div", {
126
- key: 0,
127
- class: l(s.compact ? "space-y-1" : "space-y-2")
128
- }, [
129
- r[2] || (r[2] = a("h3", { class: "text-sm font-semibold text-muted-foreground uppercase tracking-wider" }, " Billed To ", -1)),
130
- a("p", _, u(e.value.customerInfo.name), 1),
131
- a("div", F, [
132
- e.value.customerInfo.address ? (t(), o("p", G, u(e.value.customerInfo.address), 1)) : c("", !0),
133
- e.value.customerInfo.city || e.value.customerInfo.state ? (t(), o("p", K, [
134
- i(u(e.value.customerInfo.city), 1),
135
- e.value.customerInfo.city && e.value.customerInfo.state ? (t(), o(x, { key: 0 }, [
136
- i(", ")
137
- ], 64)) : c("", !0),
138
- i(u(e.value.customerInfo.state) + " " + u(e.value.customerInfo.zip), 1)
139
- ])) : c("", !0),
140
- e.value.customerInfo.country ? (t(), o("p", O, u(e.value.customerInfo.country), 1)) : c("", !0),
141
- e.value.customerInfo.email ? (t(), o("p", Q, u(e.value.customerInfo.email), 1)) : c("", !0),
142
- e.value.customerInfo.phone ? (t(), o("p", U, u(e.value.customerInfo.phone), 1)) : c("", !0),
143
- e.value.customerInfo.taxId ? (t(), o("p", A, "Tax ID: " + u(e.value.customerInfo.taxId), 1)) : c("", !0)
144
- ])
145
- ], 2)) : c("", !0),
146
- e.value.items && e.value.items.length ? (t(), o("div", {
147
- key: 1,
148
- class: "overflow-x-auto rounded-lg border border-border",
149
- style: g({
150
- "--text-sm": s.compact ? "13px" : "14px"
151
- })
156
+ a("div", q, [
157
+ e.value.companyInfo ? (t(), o("div", C, [
158
+ a("p", {
159
+ class: l(["text-muted-foreground uppercase tracking-widest font-semibold mb-2", s.compact ? "text-[9px]" : "text-[10px]"])
160
+ }, " From ", 2),
161
+ e.value.brandName ? (t(), o("p", {
162
+ key: 0,
163
+ class: l(["font-bold text-foreground", s.compact ? "text-sm" : "text-base"])
164
+ }, n(e.value.brandName), 3)) : c("", !0),
165
+ a("div", {
166
+ class: l(["text-muted-foreground leading-snug mt-1", s.compact ? "text-xs space-y-0.5" : "text-sm space-y-0.5"])
167
+ }, [
168
+ e.value.companyInfo.address ? (t(), o("p", L, n(e.value.companyInfo.address), 1)) : c("", !0),
169
+ e.value.companyInfo.city || e.value.companyInfo.state || e.value.companyInfo.zip ? (t(), o("p", E, [
170
+ m(n(e.value.companyInfo.city), 1),
171
+ e.value.companyInfo.city && e.value.companyInfo.state ? (t(), o(x, { key: 0 }, [
172
+ m(", ")
173
+ ], 64)) : c("", !0),
174
+ m(n(e.value.companyInfo.state) + " " + n(e.value.companyInfo.zip), 1)
175
+ ])) : c("", !0),
176
+ e.value.companyInfo.country ? (t(), o("p", F, n(e.value.companyInfo.country), 1)) : c("", !0),
177
+ e.value.companyInfo.email ? (t(), o("p", G, n(e.value.companyInfo.email), 1)) : c("", !0),
178
+ e.value.companyInfo.phone ? (t(), o("p", U, n(e.value.companyInfo.phone), 1)) : c("", !0),
179
+ e.value.companyInfo.taxId ? (t(), o("p", K, "Tax ID: " + n(e.value.companyInfo.taxId), 1)) : c("", !0)
180
+ ], 2)
181
+ ])) : c("", !0),
182
+ e.value.customerInfo ? (t(), o("div", O, [
183
+ a("p", {
184
+ class: l(["text-muted-foreground uppercase tracking-widest font-semibold mb-2", s.compact ? "text-[9px]" : "text-[10px]"])
185
+ }, " Billed To ", 2),
186
+ a("p", {
187
+ class: l(["font-bold text-foreground", s.compact ? "text-sm" : "text-base"])
188
+ }, n(e.value.customerInfo.name), 3),
189
+ a("div", {
190
+ class: l(["text-muted-foreground leading-snug mt-1", s.compact ? "text-xs space-y-0.5" : "text-sm space-y-0.5"])
191
+ }, [
192
+ e.value.customerInfo.address ? (t(), o("p", P, n(e.value.customerInfo.address), 1)) : c("", !0),
193
+ e.value.customerInfo.city || e.value.customerInfo.state ? (t(), o("p", Q, [
194
+ m(n(e.value.customerInfo.city), 1),
195
+ e.value.customerInfo.city && e.value.customerInfo.state ? (t(), o(x, { key: 0 }, [
196
+ m(", ")
197
+ ], 64)) : c("", !0),
198
+ m(n(e.value.customerInfo.state) + " " + n(e.value.customerInfo.zip), 1)
199
+ ])) : c("", !0),
200
+ e.value.customerInfo.country ? (t(), o("p", A, n(e.value.customerInfo.country), 1)) : c("", !0),
201
+ e.value.customerInfo.email ? (t(), o("p", H, n(e.value.customerInfo.email), 1)) : c("", !0),
202
+ e.value.customerInfo.phone ? (t(), o("p", J, n(e.value.customerInfo.phone), 1)) : c("", !0),
203
+ e.value.customerInfo.taxId ? (t(), o("p", M, "Tax ID: " + n(e.value.customerInfo.taxId), 1)) : c("", !0)
204
+ ], 2)
205
+ ])) : c("", !0)
206
+ ])
207
+ ], 2)) : c("", !0),
208
+ e.value.items && e.value.items.length ? (t(), o("div", R, [
209
+ a("table", {
210
+ class: l(["invoice-table", s.compact ? "text-xs" : "text-sm"])
152
211
  }, [
153
- a("table", {
154
- class: l(["w-full text-left whitespace-nowrap", s.compact ? "text-xs" : "text-sm"])
155
- }, [
156
- a("thead", H, [
157
- a("tr", null, [
158
- a("th", {
159
- scope: "col",
160
- class: l(s.compact ? "px-4 py-2" : "px-6 py-3")
161
- }, "Product", 2),
162
- a("th", {
163
- scope: "col",
164
- class: l(["text-right", s.compact ? "px-4 py-2" : "px-6 py-3"])
165
- }, " Qty ", 2),
166
- b.value ? (t(), o("th", {
167
- key: 0,
168
- scope: "col",
169
- class: l(["text-right", s.compact ? "px-4 py-2" : "px-6 py-3"])
170
- }, " Size ", 2)) : c("", !0),
171
- a("th", {
172
- scope: "col",
173
- class: l(["text-right", s.compact ? "px-4 py-2" : "px-6 py-3"])
174
- }, " Price ", 2),
175
- h.value ? (t(), o("th", {
176
- key: 1,
177
- scope: "col",
178
- class: l(["text-right", s.compact ? "px-4 py-2" : "px-6 py-3"])
179
- }, " Discount ", 2)) : c("", !0),
180
- a("th", {
181
- scope: "col",
182
- class: l(["text-right", s.compact ? "px-4 py-2" : "px-6 py-3"])
183
- }, " Total ", 2)
184
- ])
185
- ]),
186
- a("tbody", J, [
187
- (t(!0), o(x, null, k(e.value.items, (n, f) => (t(), o("tr", {
188
- key: n.id || f,
189
- class: "hover:bg-muted/50 transition-colors"
190
- }, [
191
- a("td", {
192
- class: l(s.compact ? "px-4 py-2" : "px-5 py-3")
193
- }, [
194
- a("div", M, [
195
- n.thumbnail ? (t(), o("div", {
196
- key: 0,
197
- class: l(["shrink-0 rounded-md bg-muted overflow-hidden border border-border/50", s.compact ? "w-8 h-8" : "w-10 h-10"])
198
- }, [
199
- a("img", {
200
- src: n.thumbnail,
201
- alt: n.name,
202
- class: "w-full h-full object-cover"
203
- }, null, 8, R)
204
- ], 2)) : c("", !0),
205
- a("div", W, [
206
- a("div", {
207
- class: "font-medium text-foreground truncate text-sm",
208
- title: n.name
209
- }, u(n.name), 9, X),
210
- n.sku ? (t(), o("div", {
211
- key: 0,
212
- class: "text-xs uppercase tracking-wider text-muted-foreground font-normal truncate",
213
- title: n.sku
214
- }, " SKU: " + u(n.sku), 9, Y)) : c("", !0),
215
- n.description && !s.compact ? (t(), o("div", Z, u(n.description), 1)) : c("", !0)
216
- ])
212
+ a("thead", W, [
213
+ a("tr", null, [
214
+ u[2] || (u[2] = a("th", {
215
+ scope: "col",
216
+ class: "invoice-th"
217
+ }, "Description", -1)),
218
+ u[3] || (u[3] = a("th", {
219
+ scope: "col",
220
+ class: "invoice-th invoice-text-right"
221
+ }, "Qty", -1)),
222
+ b.value ? (t(), o("th", X, "Size")) : c("", !0),
223
+ u[4] || (u[4] = a("th", {
224
+ scope: "col",
225
+ class: "invoice-th invoice-text-right"
226
+ }, "Unit Price", -1)),
227
+ h.value ? (t(), o("th", Y, "Discount")) : c("", !0),
228
+ u[5] || (u[5] = a("th", {
229
+ scope: "col",
230
+ class: "invoice-th invoice-text-right"
231
+ }, "Total", -1))
232
+ ])
233
+ ]),
234
+ a("tbody", Z, [
235
+ (t(!0), o(x, null, g(e.value.items, (r, f) => (t(), o("tr", {
236
+ key: r.id || f,
237
+ class: "invoice-tr group"
238
+ }, [
239
+ a("td", ee, [
240
+ a("div", te, [
241
+ r.thumbnail ? (t(), o("div", {
242
+ key: 0,
243
+ class: l(["shrink-0 overflow-hidden", s.compact ? "w-9 h-9" : "w-10 h-10"])
244
+ }, [
245
+ i(I, {
246
+ src: r.thumbnail,
247
+ alt: r.name,
248
+ class: "w-full h-full ronded!",
249
+ rounded: "md"
250
+ }, null, 8, ["src", "alt"])
251
+ ], 2)) : c("", !0),
252
+ a("div", oe, [
253
+ a("p", {
254
+ class: "font-semibold text-foreground whitespace-normal text-sm",
255
+ title: r.name
256
+ }, n(r.name), 9, ae),
257
+ r.sku ? (t(), o("p", se, " SKU: " + n(r.sku), 1)) : c("", !0),
258
+ r.description && !s.compact ? (t(), o("p", ce, n(r.description), 1)) : c("", !0)
217
259
  ])
218
- ], 2),
219
- a("td", {
220
- class: l(["text-right text-sm tabular-nums", s.compact ? "px-4 py-2" : "px-6 py-4"])
221
- }, u(n.quantity), 3),
222
- b.value ? (t(), o("td", {
223
- key: 0,
224
- class: l(["text-right tabular-nums text-muted-foreground text-sm", s.compact ? "px-4 py-2" : "px-6 py-4"])
225
- }, u(n.size || "-"), 3)) : c("", !0),
226
- a("td", {
227
- class: l(["text-right tabular-nums text-sm", s.compact ? "px-4 py-2" : "px-6 py-4"])
228
- }, [
229
- m(d(v), {
230
- value: n.price
231
- }, null, 8, ["value"])
232
- ], 2),
233
- h.value ? (t(), o("td", {
234
- key: 1,
235
- class: l(["text-right tabular-nums text-success/80 font-medium", s.compact ? "px-4 py-2" : "px-6 py-4"])
236
- }, [
237
- n.discount !== void 0 ? (t(), o("div", ee, [
238
- m(d(v), {
239
- value: -n.discount,
240
- class: "text-sm"
241
- }, null, 8, ["value"]),
242
- n.discountLabel ? (t(), o("span", te, u(n.discountLabel), 1)) : c("", !0)
243
- ])) : (t(), o("span", oe, "-"))
244
- ], 2)) : c("", !0),
245
- a("td", {
246
- class: l(["text-right tabular-nums font-medium", s.compact ? "px-4 py-2" : "px-6 py-4"])
247
- }, [
248
- m(d(v), {
249
- value: n.total,
260
+ ])
261
+ ]),
262
+ a("td", ne, n(r.quantity), 1),
263
+ b.value ? (t(), o("td", le, n(r.size || "—"), 1)) : c("", !0),
264
+ a("td", re, [
265
+ i(d(p), {
266
+ value: r.price,
267
+ class: "text-sm"
268
+ }, null, 8, ["value"])
269
+ ]),
270
+ h.value ? (t(), o("td", ue, [
271
+ r.discount !== void 0 ? (t(), o("div", ie, [
272
+ i(d(p), {
273
+ value: -r.discount,
250
274
  class: "text-sm"
251
- }, null, 8, ["value"])
252
- ], 2)
253
- ]))), 128))
254
- ])
255
- ], 2)
256
- ], 4)) : c("", !0),
275
+ }, null, 8, ["value"]),
276
+ r.discountLabel ? (t(), o("span", {
277
+ key: 0,
278
+ class: l(["uppercase tracking-wider font-bold text-muted-foreground", s.compact ? "text-[8px]" : "text-[9px]"])
279
+ }, n(r.discountLabel), 3)) : c("", !0)
280
+ ])) : (t(), o("span", de, "—"))
281
+ ])) : c("", !0),
282
+ a("td", me, [
283
+ i(d(p), {
284
+ value: r.total,
285
+ class: "text-sm"
286
+ }, null, 8, ["value"])
287
+ ])
288
+ ]))), 128))
289
+ ])
290
+ ], 2)
291
+ ])) : c("", !0),
292
+ a("div", {
293
+ class: l(s.compact ? "p-6" : "p-8")
294
+ }, [
257
295
  a("div", {
258
- class: l(["flex flex-col-reverse md:flex-row justify-between", s.compact ? "gap-4 pt-2" : "gap-8 pt-4"])
296
+ class: l(["flex flex-col-reverse lg:flex-row justify-between", s.compact ? "gap-6" : "gap-8"])
259
297
  }, [
260
298
  a("div", {
261
- class: l(["w-full md:w-1/2", s.compact ? "space-y-3" : "space-y-6"])
299
+ class: l(["w-full lg:w-1/2 flex flex-col", s.compact ? "gap-4" : "gap-5"])
262
300
  }, [
263
- e.value.notes ? (t(), o("div", ae, [
264
- r[3] || (r[3] = a("h4", { class: "font-semibold text-muted-foreground uppercase tracking-wider text-sm" }, " Notes ", -1)),
265
- a("div", {
266
- class: l(["text-muted-foreground whitespace-pre-wrap leading-relaxed rounded-lg border border-border/50 text-sm", s.compact ? "p-3 bg-muted/20" : "p-4 bg-muted/30"])
267
- }, u(e.value.notes), 3)
301
+ e.value.notes ? (t(), o("div", ve, [
302
+ a("p", {
303
+ class: l(["text-muted-foreground uppercase tracking-widest font-semibold mb-2", s.compact ? "text-[9px]" : "text-[10px]"])
304
+ }, " Notes ", 2),
305
+ a("p", {
306
+ class: l(["text-muted-foreground whitespace-pre-wrap leading-relaxed", s.compact ? "text-xs" : "text-sm"])
307
+ }, n(e.value.notes), 3)
268
308
  ])) : c("", !0),
269
- a("div", se, [
270
- e.value.qrcode ? (t(), o("div", ce, [
271
- m(d(T), {
272
- text: e.value.qrcode,
273
- size: s.compact ? 64 : 80
274
- }, null, 8, ["text", "size"])
309
+ e.value.qrcode || e.value.barcode ? (t(), o("div", xe, [
310
+ e.value.qrcode ? (t(), o("div", pe, [
311
+ i(d(T), {
312
+ value: e.value.qrcode,
313
+ size: s.compact ? 48 : 56
314
+ }, null, 8, ["value", "size"])
275
315
  ])) : c("", !0),
276
- e.value.barcode ? (t(), o("div", le, [
277
- m(d(N), {
316
+ e.value.barcode ? (t(), o("div", fe, [
317
+ i(d(N), {
278
318
  value: e.value.barcode,
279
319
  format: "CODE128",
280
- height: s.compact ? 32 : 40,
281
- width: s.compact ? 1.3 : 1.5
282
- }, null, 8, ["value", "height", "width"])
320
+ height: s.compact ? 24 : 30,
321
+ width: s.compact ? 1.2 : 1.4,
322
+ "display-value": s.displayBarcodeValue
323
+ }, null, 8, ["value", "height", "width", "display-value"])
283
324
  ])) : c("", !0)
284
- ])
325
+ ])) : c("", !0)
285
326
  ], 2),
286
- a("div", ue, [
327
+ a("div", ye, [
287
328
  a("div", {
288
- class: l(["rounded-lg bg-muted/20 border border-border", s.compact ? "p-4 space-y-2" : "p-5 space-y-3"])
329
+ class: l(s.compact ? "space-y-1.5" : "space-y-2")
289
330
  }, [
290
- (t(!0), o(x, null, k(e.value.totals, (n, f) => (t(), o("div", {
331
+ (t(!0), o(x, null, g(e.value.totals, (r, f) => (t(), o("div", {
291
332
  key: f,
292
333
  class: l(["flex justify-between items-center", [
293
- n.isGrandTotal ? s.compact ? "pt-2 border-t border-border mt-2 text-base font-bold text-foreground" : "pt-3 border-t border-border mt-3 text-base font-bold text-foreground" : "text-sm text-muted-foreground font-medium"
334
+ r.isGrandTotal ? [
335
+ "border-t border-border font-black text-foreground",
336
+ s.compact ? "pt-2 mt-1 text-base" : "pt-3 mt-2 text-lg"
337
+ ] : ["text-muted-foreground font-medium", s.compact ? "text-xs" : "text-sm"]
294
338
  ]])
295
339
  }, [
296
- a("span", null, u(n.label), 1),
297
- m(d(v), {
298
- value: n.value
340
+ a("span", {
341
+ class: l(r.isGrandTotal ? "uppercase tracking-widest text-xs" : "")
342
+ }, n(r.label), 3),
343
+ i(d(p), {
344
+ value: r.value
299
345
  }, null, 8, ["value"])
300
346
  ], 2))), 128))
301
347
  ], 2)
@@ -303,12 +349,12 @@ const j = ["src", "alt"], C = {
303
349
  ], 2)
304
350
  ], 2),
305
351
  e.value.footerText ? (t(), o("div", {
306
- key: 0,
307
- class: l(["bg-muted/40 border-t border-border text-center text-muted-foreground", s.compact ? "px-6 py-3 text-xs" : "px-6 py-4 text-xs"])
308
- }, u(e.value.footerText), 3)) : c("", !0)
352
+ key: 2,
353
+ class: l(["border-t border-border text-center text-muted-foreground font-medium uppercase tracking-widest", s.compact ? "px-6 py-3 text-[9px]" : "px-6 py-4 text-[10px]"])
354
+ }, n(e.value.footerText), 3)) : c("", !0)
309
355
  ], 4));
310
356
  }
311
357
  });
312
358
  export {
313
- xe as default
359
+ ze as default
314
360
  };