vlite3 1.1.1 → 1.1.4

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