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