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,11 +1,11 @@
1
- import { defineComponent as D, ref as V, inject as j, computed as u, markRaw as K, watch as h, onMounted as M, onUnmounted as F, openBlock as l, createElementBlock as r, Fragment as L, createElementVNode as y, mergeProps as w, withModifiers as R, renderSlot as f, createCommentVNode as a, createBlock as v, Teleport as U, createVNode as k, Transition as x, withCtx as $, normalizeClass as c, toDisplayString as B, resolveDynamicComponent as q } from "vue";
1
+ import { defineComponent as D, ref as L, inject as V, computed as f, markRaw as j, watch as h, onMounted as K, onUnmounted as M, openBlock as l, createElementBlock as d, Fragment as F, createElementVNode as y, mergeProps as w, withModifiers as R, renderSlot as c, createCommentVNode as a, createBlock as g, Teleport as U, createVNode as $, Transition as k, withCtx as x, normalizeClass as m, toDisplayString as B, resolveDynamicComponent as q } from "vue";
2
2
  import G from "./Button.vue.js";
3
3
  import { useKeyStroke as H } from "../composables/useKeyStroke.js";
4
4
  import { $t as T } from "../utils/i18n.js";
5
- const J = { class: "text-lg font-bold text-foreground" }, Q = {
5
+ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold text-foreground" }, X = {
6
6
  key: 0,
7
7
  class: "mt-1 text-sm text-muted-foreground"
8
- }, _ = /* @__PURE__ */ D({
8
+ }, te = /* @__PURE__ */ D({
9
9
  inheritAttrs: !1,
10
10
  __name: "SidePanel",
11
11
  props: {
@@ -30,51 +30,53 @@ const J = { class: "text-lg font-bold text-foreground" }, Q = {
30
30
  },
31
31
  emits: ["close", "update:show", "onOpen", "onAfterOpen", "onAfterClose"],
32
32
  setup(o, { emit: z }) {
33
- const t = o, p = z, s = V(t.show);
34
- let d = null;
35
- const n = j("dropdown-context", null), b = u(() => t.body ? K(t.body) : void 0);
33
+ const t = o, v = z, s = L(t.show);
34
+ let u = null;
35
+ const i = V("dropdown-context", null), C = f(() => t.body ? j(t.body) : void 0);
36
36
  h(
37
37
  () => t.show,
38
38
  (e) => {
39
- s.value = e, e && (p("onOpen"), n?.close());
39
+ s.value = e, e && (v("onOpen"), i?.close());
40
40
  }
41
41
  );
42
42
  const A = () => {
43
- s.value = !0, n?.close();
44
- }, i = () => {
45
- s.value = !1, p("update:show", !1), p("close");
43
+ s.value = !0, i?.close();
44
+ }, n = () => {
45
+ s.value = !1, v("update:show", !1), v("close");
46
46
  }, O = () => {
47
- t.closeOutside && i();
48
- }, { onKeyStroke: I } = H();
49
- I("Escape", i), h(s, (e) => {
50
- d && clearTimeout(d), e ? (n?.onChildToggle?.(!0), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", d = setTimeout(() => {
51
- n?.onChildToggle?.(!1);
47
+ t.closeOutside && n();
48
+ }, { onKeyStroke: S } = H();
49
+ S("Escape", n), h(s, (e) => {
50
+ u && clearTimeout(u), e ? (i?.onChildToggle?.(!0), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", u = setTimeout(() => {
51
+ i?.onChildToggle?.(!1);
52
52
  }, 300));
53
+ }), K(() => {
54
+ s.value && i?.onChildToggle?.(!0);
53
55
  }), M(() => {
54
- s.value && n?.onChildToggle?.(!0);
55
- }), F(() => {
56
- d && clearTimeout(d), s.value && n?.onChildToggle?.(!1), document.body.style.overflow = "";
56
+ u && clearTimeout(u), s.value && i?.onChildToggle?.(!1), document.body.style.overflow = "";
57
57
  });
58
- const S = {
58
+ const I = {
59
59
  sm: "max-w-sm",
60
60
  md: "max-w-md",
61
61
  lg: "max-w-lg",
62
62
  xl: "max-w-xl",
63
63
  full: "max-w-full"
64
- }, E = u(() => t.position === "left" ? "left-0" : "right-0"), N = u(() => t.position === "left" ? "slide-left" : "slide-right"), C = u(() => t.titleI18n ? T(t.titleI18n) : t.title), g = u(
64
+ }, E = f(() => t.position === "left" ? "left-0" : "right-0"), N = f(() => t.position === "left" ? "slide-left" : "slide-right"), r = f(() => t.titleI18n ? T(t.titleI18n) : t.title), b = f(
65
65
  () => t.descriptionI18n ? T(t.descriptionI18n) : t.description
66
66
  );
67
- return (e, m) => (l(), r(L, null, [
67
+ return (e, p) => (l(), d(F, null, [
68
68
  y("span", w({
69
69
  onClick: R(A, ["stop"]),
70
70
  class: `${o.triggerClass}`
71
- }, e.$attrs), [
72
- f(e.$slots, "trigger", {}, () => [
73
- o.body ? f(e.$slots, "default", { key: 0 }, void 0, !0) : a("", !0)
71
+ }, e.$attrs, {
72
+ "data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : r.value ? `sidepanel-trigger-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel-trigger"
73
+ }), [
74
+ c(e.$slots, "trigger", {}, () => [
75
+ o.body ? c(e.$slots, "default", { key: 0 }, void 0, !0) : a("", !0)
74
76
  ], !0)
75
- ], 16),
76
- (l(), v(U, { to: "body" }, [
77
- k(x, {
77
+ ], 16, J),
78
+ (l(), g(U, { to: "body" }, [
79
+ $(k, {
78
80
  "enter-active-class": "transition-opacity duration-300 ease-out",
79
81
  "enter-from-class": "opacity-0",
80
82
  "enter-to-class": "opacity-100",
@@ -82,60 +84,64 @@ const J = { class: "text-lg font-bold text-foreground" }, Q = {
82
84
  "leave-from-class": "opacity-100",
83
85
  "leave-to-class": "opacity-0"
84
86
  }, {
85
- default: $(() => [
86
- s.value ? (l(), r("div", {
87
+ default: x(() => [
88
+ s.value ? (l(), d("div", {
87
89
  key: 0,
88
- class: c(["fixed inset-0 z-50 v-sidepanel-overlay", o.overlayClass]),
90
+ class: m(["fixed inset-0 z-50 v-sidepanel-overlay", o.overlayClass]),
89
91
  onClick: O
90
92
  }, null, 2)) : a("", !0)
91
93
  ]),
92
94
  _: 1
93
95
  }),
94
- k(x, {
96
+ $(k, {
95
97
  name: N.value,
96
- onAfterEnter: m[0] || (m[0] = (P) => e.$emit("onAfterOpen")),
97
- onAfterLeave: m[1] || (m[1] = (P) => e.$emit("onAfterClose"))
98
+ onAfterEnter: p[0] || (p[0] = (P) => e.$emit("onAfterOpen")),
99
+ onAfterLeave: p[1] || (p[1] = (P) => e.$emit("onAfterClose"))
98
100
  }, {
99
- default: $(() => [
100
- s.value ? (l(), r("div", {
101
+ default: x(() => [
102
+ s.value ? (l(), d("div", {
101
103
  key: 0,
102
- class: c(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border transition-transform duration-300 ease-in-out w-full", [S[o.size], E.value, t.class]])
104
+ role: "dialog",
105
+ "aria-modal": "true",
106
+ class: m(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border transition-transform duration-300 ease-in-out w-full", [I[o.size], E.value, t.class]]),
107
+ "data-testid": e.$attrs["data-testid"] || (r.value ? `sidepanel-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel")
103
108
  }, [
104
- C.value || e.$slots.header ? (l(), r("div", {
109
+ r.value || e.$slots.header ? (l(), d("div", {
105
110
  key: 0,
106
- class: c([o.headerClass, "flex-none flex items-center justify-between px-5 py-2 border-b border-border"])
111
+ class: m([o.headerClass, "flex-none flex items-center justify-between px-5 py-2 border-b border-border"])
107
112
  }, [
108
- f(e.$slots, "header", {}, () => [
113
+ c(e.$slots, "header", {}, () => [
109
114
  y("div", null, [
110
- y("h3", J, B(C.value), 1),
111
- g.value ? (l(), r("p", Q, B(g.value), 1)) : a("", !0)
115
+ y("h3", W, B(r.value), 1),
116
+ b.value ? (l(), d("p", X, B(b.value), 1)) : a("", !0)
112
117
  ])
113
118
  ], !0),
114
- o.hideCloseButton ? a("", !0) : (l(), v(G, {
119
+ o.hideCloseButton ? a("", !0) : (l(), g(G, {
115
120
  key: 0,
116
121
  rounded: "full",
117
122
  size: "sm",
118
123
  variant: "ghost",
119
124
  icon: "lucide:x",
120
- onClick: i,
121
- class: "-mr-2"
125
+ onClick: n,
126
+ class: "-mr-2",
127
+ "data-testid": "sidepanel-close-btn"
122
128
  }))
123
129
  ], 2)) : a("", !0),
124
130
  y("div", {
125
- class: c(["flex-1 overflow-y-auto px-6 py-4 scrollbar-thin scrollbar-stable", o.bodyClass])
131
+ class: m(["flex-1 overflow-y-auto px-6 py-4 scrollbar-thin scrollbar-stable", o.bodyClass])
126
132
  }, [
127
- b.value ? (l(), v(q(b.value), w({ key: 0 }, { ...o.bodyProps, ...e.$attrs }, { close: i }), null, 16)) : f(e.$slots, "default", {
133
+ C.value ? (l(), g(q(C.value), w({ key: 0 }, { ...o.bodyProps, ...e.$attrs }, { close: n }), null, 16)) : c(e.$slots, "default", {
128
134
  key: 1,
129
- close: i
135
+ close: n
130
136
  }, void 0, !0)
131
137
  ], 2),
132
- e.$slots.footer ? (l(), r("div", {
138
+ e.$slots.footer ? (l(), d("div", {
133
139
  key: 1,
134
- class: c(["flex-none px-6 py-3 border-t border-border", o.footerClass])
140
+ class: m(["flex-none px-6 py-3 border-t border-border", o.footerClass])
135
141
  }, [
136
- f(e.$slots, "footer", { close: i }, void 0, !0)
142
+ c(e.$slots, "footer", { close: n }, void 0, !0)
137
143
  ], 2)) : a("", !0)
138
- ], 2)) : a("", !0)
144
+ ], 10, Q)) : a("", !0)
139
145
  ]),
140
146
  _: 3
141
147
  }, 8, ["name"])
@@ -144,5 +150,5 @@ const J = { class: "text-lg font-bold text-foreground" }, Q = {
144
150
  }
145
151
  });
146
152
  export {
147
- _ as default
153
+ te as default
148
154
  };
@@ -2,10 +2,10 @@ import { SidebarMenuProps, SidebarMenuItemSchema } from './types';
2
2
  declare const _default: import('vue').DefineComponent<SidebarMenuProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SidebarMenuProps> & Readonly<{}>, {
3
3
  variant: "default" | "ghost";
4
4
  compact: boolean;
5
+ orientation: "vertical" | "horizontal";
5
6
  iconSize: string;
6
7
  items: SidebarMenuItemSchema[];
7
8
  mobileBreakpoint: "sm" | "md" | "lg" | "xl" | "none";
8
- orientation: "vertical" | "horizontal";
9
9
  allowMultiple: boolean;
10
10
  menuOffset: [number, number];
11
11
  indentSize: number;
@@ -1,14 +1,15 @@
1
- import { defineComponent as w, computed as v, openBlock as e, createElementBlock as i, normalizeStyle as B, normalizeClass as a, Fragment as x, createElementVNode as r, toDisplayString as l, unref as m, createBlock as o, createCommentVNode as c } from "vue";
2
- import { $t as y } from "../../utils/i18n.js";
3
- import s from "./components/StatTrend.vue.js";
4
- import b from "./components/StatIconBox.vue.js";
5
- const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
1
+ import { defineComponent as B, computed as k, openBlock as e, createElementBlock as i, normalizeStyle as I, normalizeClass as n, Fragment as b, createElementVNode as r, toDisplayString as o, unref as y, createBlock as c, createCommentVNode as d } from "vue";
2
+ import { $t as s } from "../../utils/i18n.js";
3
+ import { formatCurrency as C } from "../../utils/functions.js";
4
+ import f from "./components/StatTrend.vue.js";
5
+ import g from "./components/StatIconBox.vue.js";
6
+ const j = { class: "flex items-center justify-between w-full mt-1" }, $ = {
6
7
  key: 0,
7
8
  class: "h-8 w-24 bg-gray-50 animate-pulse rounded-md"
8
- }, j = {
9
+ }, N = {
9
10
  key: 0,
10
11
  class: "h-9 w-24 bg-gray-50 animate-pulse rounded-md"
11
- }, $ = {
12
+ }, V = {
12
13
  key: 1,
13
14
  class: "h-8 w-20 bg-gray-50 animate-pulse rounded-md mt-1"
14
15
  }, E = {
@@ -17,13 +18,13 @@ const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
17
18
  }, M = {
18
19
  key: 0,
19
20
  class: "h-9 w-24 bg-gray-50 animate-pulse rounded-md mt-0.5"
20
- }, N = {
21
+ }, D = {
21
22
  key: 1,
22
23
  class: "h-6 w-5 bg-gray-50 animate-pulse rounded-sm shrink-0"
23
- }, V = { class: "flex-1 flex flex-col justify-center min-w-0" }, D = { class: "flex items-baseline gap-2 mt-1" }, F = {
24
+ }, F = { class: "flex-1 flex flex-col justify-center min-w-0" }, L = { class: "flex items-baseline gap-2 mt-1" }, P = {
24
25
  key: 0,
25
26
  class: "h-8 w-24 bg-gray-50 animate-pulse rounded-md"
26
- }, H = /* @__PURE__ */ w({
27
+ }, K = /* @__PURE__ */ B({
27
28
  __name: "StatItem",
28
29
  props: {
29
30
  item: {},
@@ -38,8 +39,12 @@ const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
38
39
  iconBoxStyle: { default: "filled" }
39
40
  },
40
41
  setup(t) {
41
- const n = t, k = v(() => {
42
- const d = n.layout === "inline-label-value" ? "flex px-3.5 py-3" : "flex p-3", f = {
42
+ const l = t;
43
+ function m(a) {
44
+ return a.isPrice ? C(Number(a.value)) : a.value;
45
+ }
46
+ const S = k(() => {
47
+ const a = l.layout === "inline-label-value" ? "flex px-3.5 py-3" : "flex p-3", x = {
43
48
  "icon-left": "flex-row items-center gap-3 text-left",
44
49
  "icon-right": "flex-row items-center justify-between gap-3 text-left",
45
50
  "icon-top": "flex-col items-start gap-1 px-5! pt-2! text-left",
@@ -48,14 +53,14 @@ const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
48
53
  "floating-icon": "flex-col items-start gap-1 text-left relative",
49
54
  "split-bar": "flex-row items-center gap-3 text-left border-l-4",
50
55
  "inline-label-value": "flex-row items-center gap-2.5 text-left"
51
- }, g = f[n.layout] || f["icon-left"];
56
+ }, h = x[l.layout] || x["icon-left"];
52
57
  let u = "";
53
- if (n.attached)
54
- n.variant === "transparent" ? u = "border-b border-r border-transparent bg-transparent hover:bg-muted/30 transition-colors" : n.variant === "outline" ? u = "border-b border-r border-border bg-transparent hover:bg-muted/30 transition-colors" : u = "border-b border-r border-border bg-card hover:bg-muted/30 transition-colors";
58
+ if (l.attached)
59
+ l.variant === "transparent" ? u = "border-b border-r border-transparent bg-transparent hover:bg-muted/30 transition-colors" : l.variant === "outline" ? u = "border-b border-r border-border bg-transparent hover:bg-muted/30 transition-colors" : u = "border-b border-r border-border bg-card hover:bg-muted/30 transition-colors";
55
60
  else {
56
- switch (n.variant) {
61
+ switch (l.variant) {
57
62
  case "solid": {
58
- const z = n.item.color || "primary", h = {
63
+ const w = l.item.color || "primary", v = {
59
64
  primary: "bg-primary-light",
60
65
  secondary: "bg-secondary",
61
66
  success: "bg-success-light",
@@ -63,7 +68,7 @@ const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
63
68
  danger: "bg-danger-light",
64
69
  info: "bg-info-light"
65
70
  };
66
- u = `${h[z] || h.primary}`;
71
+ u = `${v[w] || v.primary}`;
67
72
  break;
68
73
  }
69
74
  case "outline":
@@ -78,15 +83,15 @@ const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
78
83
  }
79
84
  u += " rounded-lg";
80
85
  }
81
- return [d, g, u].join(" ");
82
- }), S = v(() => {
83
- if (n.variant === "solid" && !n.attached) {
84
- const d = n.item.color;
85
- if (d && !["primary", "secondary", "success", "warning", "danger", "info"].includes(d))
86
- return { backgroundColor: `${d}15` };
86
+ return [a, h, u].join(" ");
87
+ }), z = k(() => {
88
+ if (l.variant === "solid" && !l.attached) {
89
+ const a = l.item.color;
90
+ if (a && !["primary", "secondary", "success", "warning", "danger", "info"].includes(a))
91
+ return { backgroundColor: `${a}15` };
87
92
  }
88
- if (n.layout === "split-bar") {
89
- const d = n.item.color, f = {
93
+ if (l.layout === "split-bar") {
94
+ const a = l.item.color, x = {
90
95
  primary: "var(--color-primary)",
91
96
  secondary: "var(--color-secondary)",
92
97
  success: "var(--color-success)",
@@ -94,32 +99,32 @@ const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
94
99
  danger: "var(--color-danger)",
95
100
  info: "var(--color-info)"
96
101
  };
97
- if (d)
98
- return { borderLeftColor: f[d] || d };
102
+ if (a)
103
+ return { borderLeftColor: x[a] || a };
99
104
  }
100
105
  return {};
101
106
  });
102
- return (d, f) => (e(), i("div", {
103
- class: a(k.value),
104
- style: B(S.value)
107
+ return (a, x) => (e(), i("div", {
108
+ class: n(S.value),
109
+ style: I(z.value)
105
110
  }, [
106
- t.layout === "title-top-icon-bottom-right" ? (e(), i(x, { key: 0 }, [
111
+ t.layout === "title-top-icon-bottom-right" ? (e(), i(b, { key: 0 }, [
107
112
  r("h3", {
108
- class: a(t.titleSize || "text-sm font-medium text-muted-foreground truncate w-full")
109
- }, l(t.item.titleI18n ? m(y)(t.item.titleI18n) : t.item.title), 3),
110
- r("div", I, [
113
+ class: n(t.titleSize || "text-sm font-medium text-muted-foreground truncate w-full")
114
+ }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
115
+ r("div", j, [
111
116
  r("div", null, [
112
- t.loading ? (e(), i("div", C)) : (e(), i("p", {
117
+ t.loading ? (e(), i("div", $)) : (e(), i("p", {
113
118
  key: 1,
114
- class: a(t.valueSize || "text-2xl font-bold text-foreground truncate")
115
- }, l(t.item.value), 3)),
116
- t.item.trend && !t.loading ? (e(), o(s, {
119
+ class: n(t.valueSize || "text-2xl font-bold text-foreground truncate")
120
+ }, o(m(t.item)), 3)),
121
+ t.item.trend && !t.loading ? (e(), c(f, {
117
122
  key: 2,
118
123
  trend: t.item.trend,
119
124
  layout: t.layout
120
- }, null, 8, ["trend", "layout"])) : c("", !0)
125
+ }, null, 8, ["trend", "layout"])) : d("", !0)
121
126
  ]),
122
- t.item.icon ? (e(), o(b, {
127
+ t.item.icon ? (e(), c(g, {
123
128
  key: 0,
124
129
  item: t.item,
125
130
  variant: t.variant,
@@ -128,23 +133,23 @@ const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
128
133
  "icon-box-shape": t.iconBoxShape,
129
134
  "icon-box-style": t.iconBoxStyle,
130
135
  "icon-size": t.iconSize
131
- }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : c("", !0)
136
+ }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0)
132
137
  ])
133
- ], 64)) : t.layout === "centered-value-title" ? (e(), i(x, { key: 1 }, [
134
- t.loading ? (e(), i("div", j)) : (e(), i("p", {
138
+ ], 64)) : t.layout === "centered-value-title" ? (e(), i(b, { key: 1 }, [
139
+ t.loading ? (e(), i("div", N)) : (e(), i("p", {
135
140
  key: 1,
136
- class: a(t.valueSize || "text-3xl font-bold text-foreground")
137
- }, l(t.item.value), 3)),
141
+ class: n(t.valueSize || "text-3xl font-bold text-foreground")
142
+ }, o(m(t.item)), 3)),
138
143
  r("h3", {
139
- class: a(t.titleSize || "text-sm font-medium text-muted-foreground")
140
- }, l(t.item.titleI18n ? m(y)(t.item.titleI18n) : t.item.title), 3),
141
- t.item.trend && !t.loading ? (e(), o(s, {
144
+ class: n(t.titleSize || "text-sm font-medium text-muted-foreground")
145
+ }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
146
+ t.item.trend && !t.loading ? (e(), c(f, {
142
147
  key: 2,
143
148
  trend: t.item.trend,
144
149
  layout: t.layout
145
- }, null, 8, ["trend", "layout"])) : c("", !0)
146
- ], 64)) : t.layout === "floating-icon" ? (e(), i(x, { key: 2 }, [
147
- t.item.icon ? (e(), o(b, {
150
+ }, null, 8, ["trend", "layout"])) : d("", !0)
151
+ ], 64)) : t.layout === "floating-icon" ? (e(), i(b, { key: 2 }, [
152
+ t.item.icon ? (e(), c(g, {
148
153
  key: 0,
149
154
  item: t.item,
150
155
  variant: t.variant,
@@ -154,36 +159,36 @@ const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
154
159
  "icon-box-style": t.iconBoxStyle,
155
160
  "icon-size": t.iconSize,
156
161
  class: "absolute top-4 right-4"
157
- }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : c("", !0),
162
+ }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
158
163
  r("h3", {
159
- class: a(t.titleSize || "text-sm font-medium text-muted-foreground truncate pr-12")
160
- }, l(t.item.titleI18n ? m(y)(t.item.titleI18n) : t.item.title), 3),
161
- t.loading ? (e(), i("div", $)) : (e(), i("p", {
164
+ class: n(t.titleSize || "text-sm font-medium text-muted-foreground truncate pr-12")
165
+ }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
166
+ t.loading ? (e(), i("div", V)) : (e(), i("p", {
162
167
  key: 2,
163
- class: a(t.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
164
- }, l(t.item.value), 3)),
165
- t.item.trend && !t.loading ? (e(), o(s, {
168
+ class: n(t.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
169
+ }, o(m(t.item)), 3)),
170
+ t.item.trend && !t.loading ? (e(), c(f, {
166
171
  key: 3,
167
172
  trend: t.item.trend,
168
173
  layout: t.layout
169
- }, null, 8, ["trend", "layout"])) : c("", !0)
174
+ }, null, 8, ["trend", "layout"])) : d("", !0)
170
175
  ], 64)) : t.layout === "split-bar" ? (e(), i("div", E, [
171
176
  r("h3", {
172
- class: a(
177
+ class: n(
173
178
  t.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
174
179
  )
175
- }, l(t.item.titleI18n ? m(y)(t.item.titleI18n) : t.item.title), 3),
180
+ }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
176
181
  t.loading ? (e(), i("div", M)) : (e(), i("p", {
177
182
  key: 1,
178
- class: a(t.valueSize || "text-3xl font-black text-foreground truncate mt-0.5")
179
- }, l(t.item.value), 3)),
180
- t.item.trend && !t.loading ? (e(), o(s, {
183
+ class: n(t.valueSize || "text-3xl font-black text-foreground truncate mt-0.5")
184
+ }, o(m(t.item)), 3)),
185
+ t.item.trend && !t.loading ? (e(), c(f, {
181
186
  key: 2,
182
187
  trend: t.item.trend,
183
188
  layout: t.layout
184
- }, null, 8, ["trend", "layout"])) : c("", !0)
185
- ])) : t.layout === "inline-label-value" ? (e(), i(x, { key: 4 }, [
186
- t.item.icon ? (e(), o(b, {
189
+ }, null, 8, ["trend", "layout"])) : d("", !0)
190
+ ])) : t.layout === "inline-label-value" ? (e(), i(b, { key: 4 }, [
191
+ t.item.icon ? (e(), c(g, {
187
192
  key: 0,
188
193
  item: t.item,
189
194
  variant: t.variant,
@@ -192,21 +197,21 @@ const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
192
197
  "icon-box-shape": t.iconBoxShape,
193
198
  "icon-box-style": t.iconBoxStyle,
194
199
  "icon-size": t.iconSize
195
- }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : c("", !0),
200
+ }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
196
201
  r("span", {
197
- class: a([t.titleSize || "-text-fs-2 font-medium text-muted-foreground truncate", "flex-1 min-w-0"])
198
- }, l(t.item.titleI18n ? m(y)(t.item.titleI18n) : t.item.title), 3),
199
- t.loading ? (e(), i("div", N)) : (e(), i("span", {
202
+ class: n([t.titleSize || "-text-fs-2 font-medium text-muted-foreground truncate", "flex-1 min-w-0"])
203
+ }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
204
+ t.loading ? (e(), i("div", D)) : (e(), i("span", {
200
205
  key: 2,
201
- class: a(t.valueSize || "-text-fs-1 font-semibold text-foreground tabular-nums shrink-0")
202
- }, l(t.item.value), 3)),
203
- t.item.trend && !t.loading ? (e(), o(s, {
206
+ class: n(t.valueSize || "-text-fs-1 font-semibold text-foreground tabular-nums shrink-0")
207
+ }, o(m(t.item)), 3)),
208
+ t.item.trend && !t.loading ? (e(), c(f, {
204
209
  key: 3,
205
210
  trend: t.item.trend,
206
211
  layout: t.layout
207
- }, null, 8, ["trend", "layout"])) : c("", !0)
208
- ], 64)) : (e(), i(x, { key: 5 }, [
209
- t.item.icon && t.layout !== "icon-right" ? (e(), o(b, {
212
+ }, null, 8, ["trend", "layout"])) : d("", !0)
213
+ ], 64)) : (e(), i(b, { key: 5 }, [
214
+ t.item.icon && t.layout !== "icon-right" ? (e(), c(g, {
210
215
  key: 0,
211
216
  item: t.item,
212
217
  variant: t.variant,
@@ -215,24 +220,24 @@ const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
215
220
  "icon-box-shape": t.iconBoxShape,
216
221
  "icon-box-style": t.iconBoxStyle,
217
222
  "icon-size": t.iconSize
218
- }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : c("", !0),
219
- r("div", V, [
223
+ }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
224
+ r("div", F, [
220
225
  r("h3", {
221
- class: a(t.titleSize || "text-sm font-medium text-muted-foreground truncate")
222
- }, l(t.item.titleI18n ? m(y)(t.item.titleI18n) : t.item.title), 3),
223
- r("div", D, [
224
- t.loading ? (e(), i("div", F)) : (e(), i("p", {
226
+ class: n(t.titleSize || "text-sm font-medium text-muted-foreground truncate")
227
+ }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
228
+ r("div", L, [
229
+ t.loading ? (e(), i("div", P)) : (e(), i("p", {
225
230
  key: 1,
226
- class: a(t.valueSize || "text-2xl font-bold text-foreground truncate")
227
- }, l(t.item.value), 3))
231
+ class: n(t.valueSize || "text-2xl font-bold text-foreground truncate")
232
+ }, o(m(t.item)), 3))
228
233
  ]),
229
- t.item.trend && !t.loading ? (e(), o(s, {
234
+ t.item.trend && !t.loading ? (e(), c(f, {
230
235
  key: 0,
231
236
  trend: t.item.trend,
232
237
  layout: t.layout
233
- }, null, 8, ["trend", "layout"])) : c("", !0)
238
+ }, null, 8, ["trend", "layout"])) : d("", !0)
234
239
  ]),
235
- t.item.icon && t.layout === "icon-right" ? (e(), o(b, {
240
+ t.item.icon && t.layout === "icon-right" ? (e(), c(g, {
236
241
  key: 1,
237
242
  item: t.item,
238
243
  variant: t.variant,
@@ -241,11 +246,11 @@ const I = { class: "flex items-center justify-between w-full mt-1" }, C = {
241
246
  "icon-box-shape": t.iconBoxShape,
242
247
  "icon-box-style": t.iconBoxStyle,
243
248
  "icon-size": t.iconSize
244
- }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : c("", !0)
249
+ }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0)
245
250
  ], 64))
246
251
  ], 6));
247
252
  }
248
253
  });
249
254
  export {
250
- H as default
255
+ K as default
251
256
  };
@@ -2,8 +2,8 @@ import { StatsProps } from './types';
2
2
  declare const _default: import('vue').DefineComponent<StatsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StatsProps> & Readonly<{}>, {
3
3
  class: string;
4
4
  variant: import('./types').StatsVariant;
5
- loading: boolean;
6
5
  columns: number | string;
6
+ loading: boolean;
7
7
  layout: import('./types').StatsLayout;
8
8
  attached: boolean;
9
9
  iconBoxShape: import('./types').IconBoxShape;
@@ -12,6 +12,7 @@ export interface StatItemSchema {
12
12
  title: string;
13
13
  titleI18n?: string;
14
14
  value: string | number;
15
+ isPrice?: boolean;
15
16
  icon?: string;
16
17
  color?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | string;
17
18
  trend?: StatTrend;
@@ -1,4 +1,4 @@
1
- const d = {
1
+ const o = {
2
2
  // ── Active / Positive ──────────────────────────────────────────────────────
3
3
  active: { variant: "success", icon: "lucide:check-circle-2" },
4
4
  activated: { variant: "success", icon: "lucide:check-circle-2" },
@@ -24,6 +24,17 @@ const d = {
24
24
  passed: { variant: "success", icon: "lucide:check-circle-2" },
25
25
  instock: { variant: "success", icon: "lucide:package-check" },
26
26
  fulfilled: { variant: "success", icon: "lucide:package-check" },
27
+ // ── CRM / Sales / Leads ───────────────────────────────────────────────────
28
+ prospecting: { variant: "indigo", icon: "lucide:search" },
29
+ qualification: { variant: "purple", icon: "lucide:filter" },
30
+ proposal: { variant: "cyan", icon: "lucide:file-text" },
31
+ negotiation: { variant: "orange", icon: "lucide:handshake" },
32
+ won: { variant: "success", icon: "lucide:trophy" },
33
+ closedwon: { variant: "success", icon: "lucide:trophy", label: "Closed Won" },
34
+ lost: { variant: "danger", icon: "lucide:frown" },
35
+ closedlost: { variant: "danger", icon: "lucide:frown", label: "Closed Lost" },
36
+ contacted: { variant: "blue", icon: "lucide:message-square" },
37
+ qualified: { variant: "success", icon: "lucide:user-check" },
27
38
  // ── In Progress / Processing / Transit ─────────────────────────────────────
28
39
  inprogress: { variant: "info", icon: "lucide:loader-2" },
29
40
  processing: { variant: "info", icon: "lucide:loader-2" },
@@ -55,7 +66,7 @@ const d = {
55
66
  overdue: { variant: "orange", icon: "lucide:alarm-clock" },
56
67
  expiring: { variant: "orange", icon: "lucide:timer" },
57
68
  expiringsoon: { variant: "orange", icon: "lucide:timer" },
58
- low: { variant: "orange", icon: "lucide:arrow-down" },
69
+ low: { variant: "secondary", icon: "lucide:arrow-down" },
59
70
  lowstock: { variant: "orange", icon: "lucide:package" },
60
71
  warning: { variant: "warning", icon: "lucide:alert-triangle" },
61
72
  late: { variant: "orange", icon: "lucide:alarm-clock" },
@@ -82,12 +93,16 @@ const d = {
82
93
  void: { variant: "secondary", icon: "lucide:ban" },
83
94
  refunded: { variant: "pink", icon: "lucide:corner-up-left" },
84
95
  outofstock: { variant: "danger", icon: "lucide:package-x" },
85
- lost: { variant: "danger", icon: "lucide:x-circle" },
86
96
  absent: { variant: "danger", icon: "lucide:user-x" },
87
97
  offline: { variant: "secondary", icon: "lucide:wifi-off" },
88
98
  danger: { variant: "danger", icon: "lucide:alert-circle" },
89
99
  declined: { variant: "danger", icon: "lucide:thumbs-down" },
90
100
  laidoff: { variant: "danger", icon: "lucide:user-minus" },
101
+ // ── Communication & Presence ──────────────────────────────────────────────
102
+ incoming: { variant: "blue", icon: "lucide:arrow-down-left" },
103
+ outgoing: { variant: "indigo", icon: "lucide:arrow-up-right" },
104
+ missed: { variant: "danger", icon: "lucide:phone-missed" },
105
+ inperson: { variant: "indigo", icon: "lucide:users", label: "In Person" },
91
106
  // ── Priority / Severity ────────────────────────────────────────────────────
92
107
  critical: { variant: "danger", icon: "lucide:alert-octagon" },
93
108
  high: { variant: "danger", icon: "lucide:arrow-up-circle" },
@@ -115,6 +130,11 @@ const d = {
115
130
  unposted: { variant: "secondary", icon: "lucide:file-x" },
116
131
  settled: { variant: "success", icon: "lucide:handshake" },
117
132
  voided: { variant: "secondary", icon: "lucide:ban" },
133
+ // ── Payment Methods ────────────────────────────────────────────────────────
134
+ cash: { variant: "success", icon: "lucide:banknote" },
135
+ check: { variant: "blue", icon: "lucide:receipt" },
136
+ card: { variant: "purple", icon: "lucide:credit-card" },
137
+ transfer: { variant: "cyan", icon: "lucide:arrow-right-left" },
118
138
  // ── HR / Recruiting ────────────────────────────────────────────────────────
119
139
  hired: { variant: "success", icon: "lucide:user-check" },
120
140
  interviewing: { variant: "indigo", icon: "lucide:users" },
@@ -142,17 +162,17 @@ const d = {
142
162
  function n(i) {
143
163
  return i.toLowerCase().replace(/[\s_\-]+/g, "");
144
164
  }
145
- function o(i, c) {
165
+ function d(i, c) {
146
166
  const e = n(i);
147
167
  if (c) {
148
168
  for (const [a, r] of Object.entries(c))
149
169
  if (n(a) === e)
150
170
  return r;
151
171
  }
152
- return d[e] ?? { variant: "secondary" };
172
+ return o[e] ?? { variant: "secondary" };
153
173
  }
154
174
  export {
155
- d as STATUS_MAP,
175
+ o as STATUS_MAP,
156
176
  n as normalizeStatus,
157
- o as resolveStatus
177
+ d as resolveStatus
158
178
  };