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.
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +2 -17
- package/components/AttachmentsList/AttachmentsList.vue.js +273 -175
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.d.ts +1 -1
- package/components/Button.vue.js +30 -28
- package/components/Calendar/Calendar.vue.d.ts +6 -6
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +12 -3
- package/components/CategoryManager/CategoryManager.vue.js +204 -145
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/CategoryManager/types.d.ts +14 -0
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/Chip/Chip.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.js +30 -28
- package/components/CopyButton.vue.d.ts +50 -0
- package/components/CopyButton.vue.js +69 -0
- package/components/CopyButton.vue2.js +4 -0
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTable.vue.js +44 -44
- package/components/DatePicker.vue.js +41 -35
- package/components/DateRangePicker.vue.js +18 -17
- package/components/Dropdown/Dropdown.vue.d.ts +5 -2
- package/components/Dropdown/Dropdown.vue.js +117 -115
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +3 -1
- package/components/Dropdown/DropdownTrigger.vue.js +10 -6
- package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
- package/components/Dropdown/composables/useDropdownSelection.js +46 -31
- package/components/FilePicker/FilePicker.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +230 -238
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/FormField.vue.js +204 -148
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +28 -27
- package/components/Form/types.d.ts +2 -2
- package/components/Form/utils/form.utils.d.ts +3 -3
- package/components/Form/utils/form.utils.js +37 -37
- package/components/Input.vue.d.ts +3 -3
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.d.ts +1 -4
- package/components/Invoice/Invoice.vue.js +22 -13
- package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
- package/components/Invoice/InvoiceTotals.vue.js +86 -0
- package/components/Invoice/InvoiceTotals.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant1.vue.js +304 -271
- package/components/Invoice/InvoiceVariant2.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant2.vue.js +168 -181
- package/components/Invoice/InvoiceVariant3.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant3.vue.js +215 -182
- package/components/Invoice/InvoiceVariant4.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant4.vue.js +281 -238
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +26 -0
- package/components/List/List.vue.d.ts +1 -9
- package/components/List/List.vue.js +166 -165
- package/components/List/ListFieldRow.vue.d.ts +2 -2
- package/components/List/ListFieldRow.vue.js +50 -50
- package/components/Masonry/Masonry.vue.d.ts +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +60 -54
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.vue.js +47 -46
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/Navbar/NavbarItem.vue.d.ts +1 -1
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +121 -116
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.vue.d.ts +2 -2
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/Stats/types.d.ts +1 -0
- package/components/StatusChip/status-map.js +27 -7
- package/components/Switch.vue.d.ts +6 -1
- package/components/Switch.vue.js +61 -24
- package/components/TagInput/TagInput.vue.d.ts +187 -0
- package/components/TagInput/TagInput.vue.js +113 -0
- package/components/TagInput/TagInput.vue2.js +4 -0
- package/components/TagInput/index.d.ts +1 -0
- package/components/Textarea.vue.js +19 -18
- package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/core/config.d.ts +112 -0
- package/core/index.js +17 -5
- package/index.d.ts +2 -0
- package/index.js +279 -271
- package/package.json +1 -1
- package/style.css +617 -2
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +6 -0
- package/types/list.type.d.ts +6 -0
- package/types/styles.d.ts +1 -0
- package/utils/configUtils.d.ts +9 -0
- package/utils/configUtils.js +7 -0
- package/utils/functions.js +9 -9
- package/utils/index.d.ts +1 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as D, ref as
|
|
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" },
|
|
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
|
-
},
|
|
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,
|
|
34
|
-
let
|
|
35
|
-
const
|
|
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 && (
|
|
39
|
+
s.value = e, e && (v("onOpen"), i?.close());
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
42
|
const A = () => {
|
|
43
|
-
s.value = !0,
|
|
44
|
-
},
|
|
45
|
-
s.value = !1,
|
|
43
|
+
s.value = !0, i?.close();
|
|
44
|
+
}, n = () => {
|
|
45
|
+
s.value = !1, v("update:show", !1), v("close");
|
|
46
46
|
}, O = () => {
|
|
47
|
-
t.closeOutside &&
|
|
48
|
-
}, { onKeyStroke:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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 &&
|
|
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
|
|
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 =
|
|
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,
|
|
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
|
-
|
|
73
|
-
|
|
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(),
|
|
77
|
-
k
|
|
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(),
|
|
87
|
+
default: x(() => [
|
|
88
|
+
s.value ? (l(), d("div", {
|
|
87
89
|
key: 0,
|
|
88
|
-
class:
|
|
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
|
|
96
|
+
$(k, {
|
|
95
97
|
name: N.value,
|
|
96
|
-
onAfterEnter:
|
|
97
|
-
onAfterLeave:
|
|
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(),
|
|
101
|
+
default: x(() => [
|
|
102
|
+
s.value ? (l(), d("div", {
|
|
101
103
|
key: 0,
|
|
102
|
-
|
|
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
|
-
|
|
109
|
+
r.value || e.$slots.header ? (l(), d("div", {
|
|
105
110
|
key: 0,
|
|
106
|
-
class:
|
|
111
|
+
class: m([o.headerClass, "flex-none flex items-center justify-between px-5 py-2 border-b border-border"])
|
|
107
112
|
}, [
|
|
108
|
-
|
|
113
|
+
c(e.$slots, "header", {}, () => [
|
|
109
114
|
y("div", null, [
|
|
110
|
-
y("h3",
|
|
111
|
-
|
|
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(),
|
|
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:
|
|
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:
|
|
131
|
+
class: m(["flex-1 overflow-y-auto px-6 py-4 scrollbar-thin scrollbar-stable", o.bodyClass])
|
|
126
132
|
}, [
|
|
127
|
-
|
|
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:
|
|
135
|
+
close: n
|
|
130
136
|
}, void 0, !0)
|
|
131
137
|
], 2),
|
|
132
|
-
e.$slots.footer ? (l(),
|
|
138
|
+
e.$slots.footer ? (l(), d("div", {
|
|
133
139
|
key: 1,
|
|
134
|
-
class:
|
|
140
|
+
class: m(["flex-none px-6 py-3 border-t border-border", o.footerClass])
|
|
135
141
|
}, [
|
|
136
|
-
|
|
142
|
+
c(e.$slots, "footer", { close: n }, void 0, !0)
|
|
137
143
|
], 2)) : a("", !0)
|
|
138
|
-
],
|
|
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
|
-
|
|
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
|
|
2
|
-
import { $t as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
-
},
|
|
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
|
-
},
|
|
21
|
+
}, D = {
|
|
21
22
|
key: 1,
|
|
22
23
|
class: "h-6 w-5 bg-gray-50 animate-pulse rounded-sm shrink-0"
|
|
23
|
-
},
|
|
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
|
-
},
|
|
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
|
|
42
|
-
|
|
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
|
-
},
|
|
56
|
+
}, h = x[l.layout] || x["icon-left"];
|
|
52
57
|
let u = "";
|
|
53
|
-
if (
|
|
54
|
-
|
|
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 (
|
|
61
|
+
switch (l.variant) {
|
|
57
62
|
case "solid": {
|
|
58
|
-
const
|
|
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 = `${
|
|
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 [
|
|
82
|
-
}),
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
return { backgroundColor: `${
|
|
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 (
|
|
89
|
-
const
|
|
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 (
|
|
98
|
-
return { borderLeftColor:
|
|
102
|
+
if (a)
|
|
103
|
+
return { borderLeftColor: x[a] || a };
|
|
99
104
|
}
|
|
100
105
|
return {};
|
|
101
106
|
});
|
|
102
|
-
return (
|
|
103
|
-
class:
|
|
104
|
-
style:
|
|
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(
|
|
111
|
+
t.layout === "title-top-icon-bottom-right" ? (e(), i(b, { key: 0 }, [
|
|
107
112
|
r("h3", {
|
|
108
|
-
class:
|
|
109
|
-
},
|
|
110
|
-
r("div",
|
|
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",
|
|
117
|
+
t.loading ? (e(), i("div", $)) : (e(), i("p", {
|
|
113
118
|
key: 1,
|
|
114
|
-
class:
|
|
115
|
-
},
|
|
116
|
-
t.item.trend && !t.loading ? (e(),
|
|
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"])) :
|
|
125
|
+
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
121
126
|
]),
|
|
122
|
-
t.item.icon ? (e(),
|
|
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"])) :
|
|
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(
|
|
134
|
-
t.loading ? (e(), i("div",
|
|
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:
|
|
137
|
-
},
|
|
141
|
+
class: n(t.valueSize || "text-3xl font-bold text-foreground")
|
|
142
|
+
}, o(m(t.item)), 3)),
|
|
138
143
|
r("h3", {
|
|
139
|
-
class:
|
|
140
|
-
},
|
|
141
|
-
t.item.trend && !t.loading ? (e(),
|
|
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"])) :
|
|
146
|
-
], 64)) : t.layout === "floating-icon" ? (e(), i(
|
|
147
|
-
t.item.icon ? (e(),
|
|
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"])) :
|
|
162
|
+
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
|
|
158
163
|
r("h3", {
|
|
159
|
-
class:
|
|
160
|
-
},
|
|
161
|
-
t.loading ? (e(), i("div",
|
|
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:
|
|
164
|
-
},
|
|
165
|
-
t.item.trend && !t.loading ? (e(),
|
|
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"])) :
|
|
174
|
+
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
170
175
|
], 64)) : t.layout === "split-bar" ? (e(), i("div", E, [
|
|
171
176
|
r("h3", {
|
|
172
|
-
class:
|
|
177
|
+
class: n(
|
|
173
178
|
t.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
|
|
174
179
|
)
|
|
175
|
-
},
|
|
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:
|
|
179
|
-
},
|
|
180
|
-
t.item.trend && !t.loading ? (e(),
|
|
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"])) :
|
|
185
|
-
])) : t.layout === "inline-label-value" ? (e(), i(
|
|
186
|
-
t.item.icon ? (e(),
|
|
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"])) :
|
|
200
|
+
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
|
|
196
201
|
r("span", {
|
|
197
|
-
class:
|
|
198
|
-
},
|
|
199
|
-
t.loading ? (e(), i("div",
|
|
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:
|
|
202
|
-
},
|
|
203
|
-
t.item.trend && !t.loading ? (e(),
|
|
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"])) :
|
|
208
|
-
], 64)) : (e(), i(
|
|
209
|
-
t.item.icon && t.layout !== "icon-right" ? (e(),
|
|
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"])) :
|
|
219
|
-
r("div",
|
|
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:
|
|
222
|
-
},
|
|
223
|
-
r("div",
|
|
224
|
-
t.loading ? (e(), i("div",
|
|
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:
|
|
227
|
-
},
|
|
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(),
|
|
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"])) :
|
|
238
|
+
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
234
239
|
]),
|
|
235
|
-
t.item.icon && t.layout === "icon-right" ? (e(),
|
|
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"])) :
|
|
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
|
-
|
|
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
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: "
|
|
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
|
|
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
|
|
172
|
+
return o[e] ?? { variant: "secondary" };
|
|
153
173
|
}
|
|
154
174
|
export {
|
|
155
|
-
|
|
175
|
+
o as STATUS_MAP,
|
|
156
176
|
n as normalizeStatus,
|
|
157
|
-
|
|
177
|
+
d as resolveStatus
|
|
158
178
|
};
|