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