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,9 +1,9 @@
1
- import { defineComponent as Y, computed as a, useSlots as Z, ref as v, onMounted as _, nextTick as z, openBlock as d, createElementBlock as u, normalizeClass as r, createBlock as R, withCtx as ee, createTextVNode as $, toDisplayString as w, createCommentVNode as i, createElementVNode as A, renderSlot as M, createVNode as k } from "vue";
1
+ import { defineComponent as Y, computed as d, useSlots as Z, ref as v, onMounted as _, nextTick as B, openBlock as r, createElementBlock as s, normalizeClass as u, createBlock as j, withCtx as ee, createTextVNode as R, toDisplayString as w, createCommentVNode as i, createElementVNode as A, renderSlot as M, createVNode as C } from "vue";
2
2
  import g from "./Icon.vue.js";
3
3
  import te from "./Label.vue.js";
4
4
  import le from "./Textarea.vue.js";
5
5
  import { $t as E } from "../utils/i18n.js";
6
- const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly", "min", "max"], ae = { class: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center gap-2 z-20" }, fe = /* @__PURE__ */ Y({
6
+ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly", "min", "max", "data-testid"], ae = { class: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center gap-2 z-20" }, fe = /* @__PURE__ */ Y({
7
7
  __name: "Input",
8
8
  props: {
9
9
  modelValue: { default: "" },
@@ -39,16 +39,16 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
39
39
  },
40
40
  emits: ["update:modelValue", "focus", "blur", "change", "click:icon", "click:icon-right"],
41
41
  setup(t, { emit: D }) {
42
- const e = t, c = D, s = a(() => e.labelI18n ? E(e.labelI18n) : e.label), I = a(
42
+ const e = t, c = D, a = d(() => e.labelI18n ? E(e.labelI18n) : e.label), S = d(
43
43
  () => e.placeholderI18n ? E(e.placeholderI18n) : e.placeholder
44
- ), x = Z(), m = v(null), y = v(!1), h = v(!1), H = a(() => e.type === "password" && y.value ? "text" : e.type), C = a(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), V = a(() => b.value || C.value || h.value), p = a(() => !!e.addonLeft || !!x["addon-left"]), B = a(() => !!e.addonRight || !!x["addon-right"]), U = a(() => [
44
+ ), y = Z(), m = v(null), x = v(!1), h = v(!1), H = d(() => e.type === "password" && x.value ? "text" : e.type), k = d(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), $ = d(() => b.value || k.value || h.value), p = d(() => !!e.addonLeft || !!y["addon-left"]), V = d(() => !!e.addonRight || !!y["addon-right"]), U = d(() => [
45
45
  "relative w-full",
46
46
  e.class,
47
47
  e.labelPosition === "left" ? "flex items-center gap-4" : "",
48
48
  e.labelPosition === "right" ? "flex flex-row-reverse items-center gap-4" : "space-y-2"
49
- ].join(" ")), W = a(() => ["relative flex w-full items-stretch", e.labelPosition !== "top" ? "flex-1" : ""].join(
49
+ ].join(" ")), W = d(() => ["relative flex w-full items-stretch", e.labelPosition !== "top" ? "flex-1" : ""].join(
50
50
  " "
51
- )), S = a(() => {
51
+ )), L = d(() => {
52
52
  const l = "block w-full bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/70 disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none relative focus:z-10", n = {
53
53
  solid: "bg-muted border-transparent focus-visible:border-black",
54
54
  outline: "border border-input focus-visible:border-black",
@@ -69,7 +69,7 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
69
69
  "2xl": "rounded-2xl",
70
70
  full: "rounded-full"
71
71
  }[e.rounded];
72
- p.value && (e.rounded === "md" ? o = "rounded-r-md rounded-l-none" : e.rounded === "sm" ? o = "rounded-r-sm rounded-l-none" : e.rounded === "lg" ? o = "rounded-r-lg rounded-l-none" : e.rounded === "full" ? o = "rounded-r-full rounded-l-none" : e.rounded !== "none" && (o = o.replace("rounded-", "rounded-r-").replace("rounded-l-", ""))), B.value && (p.value ? o = "rounded-none" : e.rounded === "md" ? o = "rounded-l-md rounded-r-none" : e.rounded === "sm" ? o = "rounded-l-sm rounded-r-none" : e.rounded === "lg" ? o = "rounded-l-lg rounded-r-none" : e.rounded === "full" ? o = "rounded-l-full rounded-r-none" : e.rounded !== "none" && (o = o.replace("rounded-", "rounded-l-").replace("rounded-r-", ""))), e.variant === "outline-b" && (o = "rounded-none");
72
+ p.value && (e.rounded === "md" ? o = "rounded-r-md rounded-l-none" : e.rounded === "sm" ? o = "rounded-r-sm rounded-l-none" : e.rounded === "lg" ? o = "rounded-r-lg rounded-l-none" : e.rounded === "full" ? o = "rounded-r-full rounded-l-none" : e.rounded !== "none" && (o = o.replace("rounded-", "rounded-r-").replace("rounded-l-", ""))), V.value && (p.value ? o = "rounded-none" : e.rounded === "md" ? o = "rounded-l-md rounded-r-none" : e.rounded === "sm" ? o = "rounded-l-sm rounded-r-none" : e.rounded === "lg" ? o = "rounded-l-lg rounded-r-none" : e.rounded === "full" ? o = "rounded-l-full rounded-r-none" : e.rounded !== "none" && (o = o.replace("rounded-", "rounded-l-").replace("rounded-r-", ""))), e.variant === "outline-b" && (o = "rounded-none");
73
73
  const T = e.variant === "outline-b" || e.variant === "transparent";
74
74
  return e.variant, [
75
75
  l,
@@ -78,12 +78,12 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
78
78
  o,
79
79
  e.error ? "border-destructive focus-visible:ring-destructive" : "",
80
80
  e.icon ? "pl-9" : T && !p.value ? "pl-0" : "",
81
- e.showClearButton && C.value || e.type === "password" || e.loading || e.iconRight ? "pr-9" : T && !B.value ? "pr-0" : "",
81
+ e.showClearButton && k.value || e.type === "password" || e.loading || e.iconRight ? "pr-9" : T && !V.value ? "pr-0" : "",
82
82
  // Keyframe name used to detect browser autofill via animationstart event
83
83
  e.variant === "floating" ? "autofill-detect" : "",
84
84
  e.inputClass
85
85
  ].join(" ");
86
- }), L = {
86
+ }), I = {
87
87
  sm: "text-xs",
88
88
  md: "text-sm",
89
89
  lg: "text-base"
@@ -96,8 +96,8 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
96
96
  n ? "-mr-px" : "-ml-px",
97
97
  "z-10"
98
98
  ].join(" ");
99
- }, q = a(() => {
100
- const l = !!x["addon-left"];
99
+ }, q = d(() => {
100
+ const l = !!y["addon-left"];
101
101
  return [
102
102
  "flex items-center justify-center whitespace-nowrap",
103
103
  l ? `border-none ${P("left")}` : `bg-muted border border-input border-r-0! px-3 text-muted-foreground ${{
@@ -109,12 +109,12 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
109
109
  xl: "rounded-l-xl",
110
110
  "2xl": "rounded-l-2xl"
111
111
  }[e.rounded] || "rounded-l-md"}`,
112
- l ? "" : L[e.size],
112
+ l ? "" : I[e.size],
113
113
  e.addonLeftClass,
114
114
  e.disabled ? "opacity-50 cursor-not-allowed" : ""
115
115
  ].join(" ");
116
- }), G = a(() => {
117
- const l = !!x["addon-right"];
116
+ }), G = d(() => {
117
+ const l = !!y["addon-right"];
118
118
  return [
119
119
  "flex items-center justify-center whitespace-nowrap",
120
120
  l ? `border-none ${P("right")}` : `bg-muted border border-input border-l-0! px-3 text-muted-foreground ${{
@@ -126,7 +126,7 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
126
126
  xl: "rounded-r-xl",
127
127
  "2xl": "rounded-r-2xl"
128
128
  }[e.rounded] || "rounded-r-md"}`,
129
- l ? "" : L[e.size],
129
+ l ? "" : I[e.size],
130
130
  e.addonRightClass,
131
131
  e.disabled ? "opacity-50 cursor-not-allowed" : ""
132
132
  ].join(" ");
@@ -137,12 +137,12 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
137
137
  const n = l.target;
138
138
  c("change", n.value);
139
139
  }, O = () => {
140
- e.disabled || e.readonly || (y.value = !y.value);
140
+ e.disabled || e.readonly || (x.value = !x.value);
141
141
  }, Q = () => {
142
- e.disabled || e.readonly || (c("update:modelValue", ""), z(() => {
142
+ e.disabled || e.readonly || (c("update:modelValue", ""), B(() => {
143
143
  m.value?.focus();
144
144
  }));
145
- }, b = v(!1), j = v(!1), F = (l) => {
145
+ }, b = v(!1), z = v(!1), F = (l) => {
146
146
  b.value = !0, c("focus", l);
147
147
  }, N = (l) => {
148
148
  b.value = !1, c("blur", l);
@@ -150,143 +150,145 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
150
150
  l.animationName === "onAutoFillStart" ? h.value = !0 : l.animationName === "onAutoFillCancel" && (h.value = !1);
151
151
  };
152
152
  return _(() => {
153
- e.autofocus && z(() => {
153
+ e.autofocus && B(() => {
154
154
  setTimeout(() => {
155
155
  m.value?.focus(), b.value = !0;
156
156
  }, 100);
157
- }), z(() => {
157
+ }), B(() => {
158
158
  m.value && m.value.value && !e.modelValue && (h.value = !0);
159
159
  });
160
- }), (l, n) => (d(), u("div", {
161
- class: r(U.value)
160
+ }), (l, n) => (r(), s("div", {
161
+ class: u(U.value)
162
162
  }, [
163
- s.value && t.variant !== "floating" ? (d(), R(te, {
163
+ a.value && t.variant !== "floating" ? (r(), j(te, {
164
164
  key: 0,
165
- for: s.value,
166
- class: r(["mb-1.5", t.labelPosition !== "top" ? "mb-0" : ""].join(" "))
165
+ for: a.value,
166
+ class: u(["mb-1.5", t.labelPosition !== "top" ? "mb-0" : ""].join(" "))
167
167
  }, {
168
168
  default: ee(() => [
169
- $(w(s.value), 1)
169
+ R(w(a.value), 1)
170
170
  ]),
171
171
  _: 1
172
172
  }, 8, ["for", "class"])) : i("", !0),
173
173
  A("div", {
174
- class: r(W.value)
174
+ class: u(W.value)
175
175
  }, [
176
- p.value ? (d(), u("div", {
176
+ p.value ? (r(), s("div", {
177
177
  key: 0,
178
- class: r(q.value)
178
+ class: u(q.value)
179
179
  }, [
180
180
  M(l.$slots, "addon-left", {}, () => [
181
- $(w(t.addonLeft), 1)
181
+ R(w(t.addonLeft), 1)
182
182
  ])
183
183
  ], 2)) : i("", !0),
184
184
  A("div", {
185
185
  class: "relative w-full",
186
- onMouseenter: n[2] || (n[2] = (f) => j.value = !0),
187
- onMouseleave: n[3] || (n[3] = (f) => j.value = !1)
186
+ onMouseenter: n[2] || (n[2] = (f) => z.value = !0),
187
+ onMouseleave: n[3] || (n[3] = (f) => z.value = !1)
188
188
  }, [
189
- s.value && t.variant === "floating" ? (d(), u("label", {
189
+ a.value && t.variant === "floating" ? (r(), s("label", {
190
190
  key: 0,
191
- for: s.value,
192
- class: r([
191
+ for: a.value,
192
+ class: u([
193
193
  "absolute transition-all duration-200 ease-in-out pointer-events-none z-20",
194
- V.value ? "-top-2.5 left-3 text-xs bg-background px-1 text-black shadow-[0_4px_4px_-4px_bg-background] translate-y-0" : t.type === "textarea" ? `top-2 text-sm text-muted-foreground/70 ${t.icon ? "left-9" : "left-3"} translate-y-0` : `top-1/2 -translate-y-1/2 text-sm text-muted-foreground/70 ${t.icon ? "left-9" : "left-3"}`
194
+ $.value ? "-top-2.5 left-3 text-xs bg-background px-1 text-black shadow-[0_4px_4px_-4px_bg-background] translate-y-0" : t.type === "textarea" ? `top-2 text-sm text-muted-foreground/70 ${t.icon ? "left-9" : "left-3"} translate-y-0` : `top-1/2 -translate-y-1/2 text-sm text-muted-foreground/70 ${t.icon ? "left-9" : "left-3"}`
195
195
  ])
196
- }, w(s.value), 11, ne)) : i("", !0),
197
- t.type === "textarea" ? (d(), R(le, {
196
+ }, w(a.value), 11, ne)) : i("", !0),
197
+ t.type === "textarea" ? (r(), j(le, {
198
198
  key: 1,
199
199
  "model-value": String(t.modelValue),
200
- placeholder: t.variant === "floating" && s.value && !V.value ? "" : I.value,
200
+ placeholder: t.variant === "floating" && a.value && !$.value ? "" : S.value,
201
201
  disabled: t.disabled,
202
202
  readonly: t.readonly,
203
203
  rows: t.rows,
204
- class: r(S.value),
204
+ class: u(L.value),
205
205
  "onUpdate:modelValue": n[0] || (n[0] = (f) => c("update:modelValue", f)),
206
206
  onBlur: N,
207
- onFocus: F
208
- }, null, 8, ["model-value", "placeholder", "disabled", "readonly", "rows", "class"])) : (d(), u("input", {
207
+ onFocus: F,
208
+ "data-testid": l.$attrs["data-testid"] || (l.$attrs.name ? `input-${l.$attrs.name}` : a.value ? `input-${a.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "textarea")
209
+ }, null, 8, ["model-value", "placeholder", "disabled", "readonly", "rows", "class", "data-testid"])) : (r(), s("input", {
209
210
  key: 2,
210
211
  ref_key: "inputRef",
211
212
  ref: m,
212
213
  type: H.value,
213
214
  value: t.modelValue,
214
- placeholder: t.variant === "floating" && s.value && !V.value ? "" : I.value,
215
+ placeholder: t.variant === "floating" && a.value && !$.value ? "" : S.value,
215
216
  disabled: t.disabled,
216
217
  readonly: t.readonly,
217
218
  min: t.min,
218
219
  max: t.max,
219
- class: r(S.value),
220
+ class: u(L.value),
220
221
  onInput: J,
221
222
  onChange: K,
222
223
  onBlur: N,
223
224
  onFocus: F,
224
- onAnimationstart: X
225
+ onAnimationstart: X,
226
+ "data-testid": l.$attrs["data-testid"] || (l.$attrs.name ? `input-${l.$attrs.name}` : a.value ? `input-${a.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "input")
225
227
  }, null, 42, oe)),
226
- t.icon ? (d(), u("div", {
228
+ t.icon ? (r(), s("div", {
227
229
  key: 3,
228
230
  tabindex: "-1",
229
- class: r([
231
+ class: u([
230
232
  "absolute left-3 top-1/2 -translate-y-1/2 flex items-center justify-center text-muted-foreground z-20 pointer-events-none",
231
233
  t.disabled ? "opacity-50" : ""
232
234
  ])
233
235
  }, [
234
- k(g, {
236
+ C(g, {
235
237
  icon: t.icon,
236
- class: r(["h-4 w-4", t.iconClass])
238
+ class: u(["h-4 w-4", t.iconClass])
237
239
  }, null, 8, ["icon", "class"])
238
240
  ], 2)) : i("", !0),
239
241
  A("div", ae, [
240
- t.loading ? (d(), R(g, {
242
+ t.loading ? (r(), j(g, {
241
243
  key: 0,
242
244
  icon: "lucide:loader-2",
243
245
  class: "h-4 w-4 animate-spin text-muted-foreground"
244
- })) : t.iconRight ? (d(), u("div", {
246
+ })) : t.iconRight ? (r(), s("div", {
245
247
  key: 1,
246
248
  tabindex: "-1",
247
- class: r([
249
+ class: u([
248
250
  "flex items-center justify-center text-muted-foreground",
249
251
  t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:text-foreground"
250
252
  ]),
251
253
  onClick: n[1] || (n[1] = (f) => !t.disabled && !t.readonly && c("click:icon-right", f))
252
254
  }, [
253
- k(g, {
255
+ C(g, {
254
256
  icon: t.iconRight,
255
- class: r(["h-4 w-4", t.iconRightClass])
257
+ class: u(["h-4 w-4", t.iconRightClass])
256
258
  }, null, 8, ["icon", "class"])
257
259
  ], 2)) : i("", !0),
258
- t.type === "password" && !t.disabled && !t.readonly ? (d(), u("button", {
260
+ t.type === "password" && !t.disabled && !t.readonly ? (r(), s("button", {
259
261
  key: 2,
260
262
  type: "button",
261
263
  tabindex: "-1",
262
264
  class: "flex items-center justify-center text-muted-foreground hover:text-foreground focus:outline-none",
263
265
  onClick: O
264
266
  }, [
265
- k(g, {
266
- icon: y.value ? "lucide:eye-off" : "lucide:eye",
267
+ C(g, {
268
+ icon: x.value ? "lucide:eye-off" : "lucide:eye",
267
269
  class: "h-4 w-4"
268
270
  }, null, 8, ["icon"])
269
271
  ])) : i("", !0),
270
- t.showClearButton && C.value && !t.disabled && !t.readonly && !t.loading && t.type !== "textarea" && t.type !== "password" && (b.value || j.value) ? (d(), u("button", {
272
+ t.showClearButton && k.value && !t.disabled && !t.readonly && !t.loading && t.type !== "textarea" && t.type !== "password" && (b.value || z.value) ? (r(), s("button", {
271
273
  key: 3,
272
274
  type: "button",
273
275
  tabindex: "-1",
274
276
  class: "flex items-center justify-center text-muted-foreground hover:text-foreground focus:outline-none transition-opacity duration-200",
275
277
  onClick: Q
276
278
  }, [
277
- k(g, {
279
+ C(g, {
278
280
  icon: "lucide:x-circle",
279
281
  class: "h-4 w-4"
280
282
  })
281
283
  ])) : i("", !0)
282
284
  ])
283
285
  ], 32),
284
- B.value ? (d(), u("div", {
286
+ V.value ? (r(), s("div", {
285
287
  key: 1,
286
- class: r(G.value)
288
+ class: u(G.value)
287
289
  }, [
288
290
  M(l.$slots, "addon-right", {}, () => [
289
- $(w(t.addonRight), 1)
291
+ R(w(t.addonRight), 1)
290
292
  ])
291
293
  ], 2)) : i("", !0)
292
294
  ], 2)
@@ -1,19 +1,20 @@
1
- import { defineComponent as l, computed as e, openBlock as p, createBlock as s, resolveDynamicComponent as m } from "vue";
1
+ import { defineComponent as i, computed as e, openBlock as s, createBlock as p, resolveDynamicComponent as m } from "vue";
2
2
  import { getComponentConfig as u } from "../../utils/configUtils.js";
3
3
  import d from "./InvoiceVariant1.vue.js";
4
4
  import f from "./InvoiceVariant2.vue.js";
5
5
  import v from "./InvoiceVariant3.vue.js";
6
6
  import _ from "./InvoiceVariant4.vue.js";
7
- const k = /* @__PURE__ */ l({
7
+ const k = /* @__PURE__ */ i({
8
8
  __name: "Invoice",
9
9
  props: {
10
10
  data: {},
11
11
  variant: {},
12
12
  compact: { type: Boolean },
13
- displayBarcodeValue: { type: Boolean }
13
+ displayBarcodeValue: { type: Boolean },
14
+ labels: {}
14
15
  },
15
16
  setup(r) {
16
- const a = r, o = u("invoice") || {}, t = e(() => a.variant ?? o.variant ?? "Variant1"), n = e(() => a.compact ?? o.compact ?? !1), c = e(() => a.displayBarcodeValue ?? o.displayBarcodeValue ?? !1), i = e(() => {
17
+ const a = r, o = u("invoice") || {}, t = e(() => a.variant ?? o.variant ?? "Variant1"), n = e(() => a.compact ?? o.compact ?? !1), c = e(() => a.displayBarcodeValue ?? o.displayBarcodeValue ?? !1), l = e(() => {
17
18
  switch (t.value) {
18
19
  case "Variant2":
19
20
  return f;
@@ -25,12 +26,13 @@ const k = /* @__PURE__ */ l({
25
26
  return d;
26
27
  }
27
28
  });
28
- return (V, y) => (p(), s(m(i.value), {
29
+ return (V, y) => (s(), p(m(l.value), {
29
30
  data: a.data,
30
31
  variant: t.value,
31
32
  compact: n.value,
32
- "display-barcode-value": c.value
33
- }, null, 8, ["data", "variant", "compact", "display-barcode-value"]));
33
+ "display-barcode-value": c.value,
34
+ labels: a.labels
35
+ }, null, 8, ["data", "variant", "compact", "display-barcode-value", "labels"]));
34
36
  }
35
37
  });
36
38
  export {
@@ -0,0 +1,14 @@
1
+ import { InvoiceTotal, InvoiceVariant } from './types';
2
+ type __VLS_Props = {
3
+ totals: InvoiceTotal[];
4
+ compact?: boolean;
5
+ variant?: InvoiceVariant | 'default';
6
+ /** Optional custom class to override the container wrapper styles */
7
+ containerClass?: string | any[] | Record<string, 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
+ variant: InvoiceVariant | "default";
11
+ compact: boolean;
12
+ containerClass: string | any[] | Record<string, boolean>;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
14
+ export default _default;
@@ -0,0 +1,86 @@
1
+ import { defineComponent as m, computed as p, openBlock as r, createElementBlock as n, normalizeClass as s, Fragment as d, renderList as x, createElementVNode as f, toDisplayString as b, createVNode as y, unref as g } from "vue";
2
+ import v from "../Price/Price.vue.js";
3
+ const _ = /* @__PURE__ */ m({
4
+ __name: "InvoiceTotals",
5
+ props: {
6
+ totals: {},
7
+ compact: { type: Boolean, default: !1 },
8
+ variant: { default: "default" },
9
+ containerClass: { default: void 0 }
10
+ },
11
+ setup(o) {
12
+ const t = o, c = p(() => {
13
+ if (t.containerClass !== void 0) return t.containerClass;
14
+ switch (t.variant) {
15
+ case "Variant1":
16
+ return t.compact ? "space-y-1.5" : "space-y-2";
17
+ case "Variant2":
18
+ return t.compact ? "px-4 py-2.5 space-y-1" : "px-5 py-3 space-y-1.5";
19
+ case "Variant3":
20
+ return t.compact ? "w-full max-w-[200px] space-y-1 text-xs" : "w-full max-w-[240px] space-y-1.5 text-xs";
21
+ case "Variant4":
22
+ return [
23
+ "border border-border rounded-lg",
24
+ t.compact ? "p-4 space-y-2" : "p-5 space-y-2.5"
25
+ ];
26
+ default:
27
+ return t.compact ? "space-y-1.5" : "space-y-2";
28
+ }
29
+ }), i = (e) => {
30
+ if (e.isGrandTotal)
31
+ switch (t.variant) {
32
+ case "Variant1":
33
+ default:
34
+ return [
35
+ "border-t border-border font-black text-foreground",
36
+ t.compact ? "pt-2 mt-1 text-base" : "pt-3 mt-2 text-lg"
37
+ ];
38
+ case "Variant2":
39
+ return [
40
+ "border-t border-border font-bold text-foreground",
41
+ t.compact ? "mt-1.5 pt-1.5 text-sm" : "mt-2 pt-2 text-base"
42
+ ];
43
+ case "Variant3":
44
+ return [
45
+ "border-t border-gray-300 font-bold text-gray-900",
46
+ t.compact ? "pt-1.5 mt-1.5 text-sm" : "pt-2 mt-2 text-sm"
47
+ ];
48
+ case "Variant4":
49
+ return [
50
+ "border-t border-gray-300 font-black text-gray-900",
51
+ t.compact ? "pt-2.5 mt-1 text-base" : "pt-3 mt-1.5 text-lg"
52
+ ];
53
+ }
54
+ else
55
+ switch (t.variant) {
56
+ case "Variant1":
57
+ default:
58
+ return ["text-muted-foreground font-medium", t.compact ? "text-xs" : "text-sm"];
59
+ case "Variant2":
60
+ return ["font-medium text-muted-foreground", t.compact ? "text-xs" : "text-sm"];
61
+ case "Variant3":
62
+ return ["text-muted-foreground font-medium"];
63
+ case "Variant4":
64
+ return ["font-semibold text-muted-foreground", t.compact ? "text-xs" : "text-sm"];
65
+ }
66
+ }, l = (e) => e.isGrandTotal && (t.variant === "Variant1" || t.variant === "Variant4" || t.variant === "default") ? "uppercase tracking-widest text-xs" : "";
67
+ return (e, V) => (r(), n("div", {
68
+ class: s(["vl-invoice-totals", c.value])
69
+ }, [
70
+ (r(!0), n(d, null, x(o.totals, (a, u) => (r(), n("div", {
71
+ key: u,
72
+ class: s(["flex justify-between items-center", i(a)])
73
+ }, [
74
+ f("span", {
75
+ class: s(l(a))
76
+ }, b(a.label), 3),
77
+ y(g(v), {
78
+ value: a.value
79
+ }, null, 8, ["value"])
80
+ ], 2))), 128))
81
+ ], 2));
82
+ }
83
+ });
84
+ export {
85
+ _ as default
86
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./InvoiceTotals.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -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;