vlite3 0.8.7 → 0.8.9
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/Badge.vue.js +4 -4
- package/components/Button.vue.js +21 -21
- package/components/ColorPicker/ColorPicker.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.js +34 -11
- package/components/Dropdown/Dropdown.vue.d.ts +7 -7
- package/components/Dropdown/Dropdown.vue.js +132 -121
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/Dropdown/useDropdownIds.d.ts +7 -0
- package/components/FilePicker/FilePicker.vue.js +12 -12
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +2 -2
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +6 -6
- package/components/IconPicker.vue.d.ts +1 -1
- package/components/Modal.vue.js +2 -2
- package/components/Navbar/Navbar.vue.d.ts +1 -1
- package/components/NavbarCommandPalette.vue.d.ts +1 -1
- package/components/Screen/Screen.vue.js +197 -218
- package/components/SidePanel.vue.d.ts +1 -1
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/Stats.vue.js +151 -113
- package/components/Stats/types.d.ts +1 -1
- package/components/Tooltip.vue.d.ts +4 -4
- package/components/Tooltip.vue.js +2 -2
- package/lib/v-tooltip-lite/components/ToolTip.vue.d.ts +48 -0
- package/lib/v-tooltip-lite/components/ToolTip.vue.js +102 -0
- package/lib/v-tooltip-lite/components/ToolTip.vue2.js +4 -0
- package/lib/v-tooltip-lite/composables/usePopover.d.ts +20 -0
- package/lib/v-tooltip-lite/composables/usePopover.js +144 -0
- package/lib/v-tooltip-lite/index.d.ts +2 -0
- package/lib/v-tooltip-lite/index.js +4 -0
- package/package.json +2 -2
- package/style.css +1 -1
|
@@ -52,12 +52,12 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
52
52
|
}>, {
|
|
53
53
|
size: SidePanelSize;
|
|
54
54
|
class: string;
|
|
55
|
+
triggerClass: string;
|
|
55
56
|
headerClass: string;
|
|
56
57
|
position: SidePanelPosition;
|
|
57
58
|
show: boolean;
|
|
58
59
|
closeOutside: boolean;
|
|
59
60
|
backdrop: boolean;
|
|
60
|
-
triggerClass: string;
|
|
61
61
|
bodyClass: string;
|
|
62
62
|
footerClass: string;
|
|
63
63
|
hideCloseButton: boolean;
|
|
@@ -2,6 +2,7 @@ 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
|
+
showTooltip: boolean;
|
|
5
6
|
items: SidebarMenuItemSchema[];
|
|
6
7
|
iconSize: string;
|
|
7
8
|
mobileBreakpoint: "sm" | "md" | "lg" | "xl" | "none";
|
|
@@ -19,7 +20,6 @@ declare const _default: import('vue').DefineComponent<SidebarMenuProps, {}, {},
|
|
|
19
20
|
compactItemPadding: string;
|
|
20
21
|
nestedMenuWidth: string;
|
|
21
22
|
nestedMenuMaxHeight: string;
|
|
22
|
-
showTooltip: boolean;
|
|
23
23
|
forceTreeView: boolean;
|
|
24
24
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
25
25
|
export default _default;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { $t as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as N, computed as w, openBlock as s, createElementBlock as a, normalizeClass as t, Fragment as y, renderList as V, normalizeStyle as b, createElementVNode as c, toDisplayString as o, unref as v, createVNode as f, createCommentVNode as d, createBlock as E, createTextVNode as L } from "vue";
|
|
2
|
+
import g from "../Icon.vue.js";
|
|
3
|
+
import { $t as h } from "../../utils/i18n.js";
|
|
4
|
+
const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "mt-1 flex items-center gap-1 text-sm"
|
|
7
|
-
},
|
|
7
|
+
}, F = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-muted-foreground truncate"
|
|
10
|
-
},
|
|
10
|
+
}, T = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "flex items-center gap-1 text-sm"
|
|
13
|
-
},
|
|
13
|
+
}, q = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "mt-2 flex items-center gap-1.5 text-sm"
|
|
16
|
-
},
|
|
16
|
+
}, A = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "text-muted-foreground truncate"
|
|
19
|
-
},
|
|
19
|
+
}, G = {
|
|
20
20
|
key: 3,
|
|
21
21
|
class: "flex-1 flex flex-col justify-center min-w-0"
|
|
22
|
-
},
|
|
22
|
+
}, H = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "mt-1 flex items-center gap-1 text-sm"
|
|
25
|
-
},
|
|
25
|
+
}, J = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "text-muted-foreground truncate"
|
|
28
|
-
},
|
|
28
|
+
}, K = { class: "flex-1 flex flex-col justify-center min-w-0" }, Q = { class: "flex items-baseline gap-2 mt-1" }, R = {
|
|
29
29
|
key: 0,
|
|
30
30
|
class: "mt-2 flex items-center gap-1.5 text-sm"
|
|
31
|
-
},
|
|
31
|
+
}, U = {
|
|
32
32
|
key: 0,
|
|
33
33
|
class: "text-muted-foreground truncate"
|
|
34
|
-
},
|
|
34
|
+
}, Z = /* @__PURE__ */ N({
|
|
35
35
|
__name: "Stats",
|
|
36
36
|
props: {
|
|
37
37
|
items: {},
|
|
@@ -47,17 +47,17 @@ const N = { class: "flex items-end justify-between w-full mt-3" }, V = {
|
|
|
47
47
|
class: { default: "" }
|
|
48
48
|
},
|
|
49
49
|
setup(n) {
|
|
50
|
-
const
|
|
51
|
-
const i = Number(
|
|
50
|
+
const l = n, S = w(() => {
|
|
51
|
+
const i = Number(l.columns) || 4;
|
|
52
52
|
return i === 1 ? "grid-cols-1" : i === 2 ? "grid-cols-1 sm:grid-cols-2" : i === 3 ? "grid-cols-1 sm:grid-cols-3" : i === 4 ? "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4" : i === 5 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-5" : i === 6 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-6" : "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";
|
|
53
53
|
}), z = w(() => [
|
|
54
54
|
"grid",
|
|
55
55
|
S.value,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
].join(" ")),
|
|
60
|
-
const e = "flex p-5 relative transition-all duration-200", u = {
|
|
56
|
+
l.attached ? "gap-0 border-t border-l overflow-hidden" : "gap-3 sm:gap-4.5",
|
|
57
|
+
l.variant === "shadow" && l.attached ? "shadow-md" : "",
|
|
58
|
+
l.class
|
|
59
|
+
].join(" ")), I = (i, r) => {
|
|
60
|
+
const e = l.layout === "inline-label-value" ? "flex px-3.5 py-3 relative transition-all duration-200" : "flex p-5 relative transition-all duration-200", u = {
|
|
61
61
|
"icon-left": "flex-row items-center gap-3 text-left",
|
|
62
62
|
"icon-right": "flex-row items-center justify-between gap-3 text-left",
|
|
63
63
|
"icon-top": "flex-col items-start gap-3 text-left",
|
|
@@ -68,15 +68,17 @@ const N = { class: "flex items-end justify-between w-full mt-3" }, V = {
|
|
|
68
68
|
// floating icon overlapping card top-right corner
|
|
69
69
|
"floating-icon": "flex-col items-start gap-1 text-left",
|
|
70
70
|
// split-bar: colored left border accent with stacked text
|
|
71
|
-
"split-bar": "flex-row items-center gap-3 text-left border-l-4"
|
|
72
|
-
|
|
71
|
+
"split-bar": "flex-row items-center gap-3 text-left border-l-4",
|
|
72
|
+
// inline-label-value: icon + label left, value right — compact row
|
|
73
|
+
"inline-label-value": "flex-row items-center gap-2.5 text-left"
|
|
74
|
+
}, j = u[l.layout] || u["icon-left"];
|
|
73
75
|
let x = "";
|
|
74
|
-
if (
|
|
75
|
-
x = "border-b border-r hover:bg-muted/30",
|
|
76
|
+
if (l.attached)
|
|
77
|
+
x = "border-b border-r hover:bg-muted/30", l.variant !== "transparent" && (x += " bg-card");
|
|
76
78
|
else {
|
|
77
|
-
switch (
|
|
79
|
+
switch (l.variant) {
|
|
78
80
|
case "solid": {
|
|
79
|
-
const
|
|
81
|
+
const M = i.color || "primary", m = {
|
|
80
82
|
primary: "bg-primary-light",
|
|
81
83
|
secondary: "bg-secondary",
|
|
82
84
|
success: "bg-success-light",
|
|
@@ -84,7 +86,7 @@ const N = { class: "flex items-end justify-between w-full mt-3" }, V = {
|
|
|
84
86
|
danger: "bg-danger-light",
|
|
85
87
|
info: "bg-info-light"
|
|
86
88
|
};
|
|
87
|
-
x = `${m[
|
|
89
|
+
x = `${m[M] || m.primary}`;
|
|
88
90
|
break;
|
|
89
91
|
}
|
|
90
92
|
case "outline":
|
|
@@ -99,15 +101,15 @@ const N = { class: "flex items-end justify-between w-full mt-3" }, V = {
|
|
|
99
101
|
}
|
|
100
102
|
x += " rounded-lg";
|
|
101
103
|
}
|
|
102
|
-
return [e,
|
|
103
|
-
},
|
|
104
|
-
if (
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
107
|
-
return { backgroundColor: `${
|
|
104
|
+
return [e, j, x].join(" ");
|
|
105
|
+
}, C = (i) => {
|
|
106
|
+
if (l.variant === "solid" && !l.attached) {
|
|
107
|
+
const r = i.color;
|
|
108
|
+
if (r && !["primary", "secondary", "success", "warning", "danger", "info"].includes(r))
|
|
109
|
+
return { backgroundColor: `${r}15` };
|
|
108
110
|
}
|
|
109
|
-
if (
|
|
110
|
-
const
|
|
111
|
+
if (l.layout === "split-bar") {
|
|
112
|
+
const r = i.color, e = {
|
|
111
113
|
primary: "var(--color-primary)",
|
|
112
114
|
secondary: "var(--color-secondary)",
|
|
113
115
|
success: "var(--color-success)",
|
|
@@ -115,14 +117,14 @@ const N = { class: "flex items-end justify-between w-full mt-3" }, V = {
|
|
|
115
117
|
danger: "var(--color-danger)",
|
|
116
118
|
info: "var(--color-info)"
|
|
117
119
|
};
|
|
118
|
-
if (
|
|
119
|
-
return { borderLeftColor: e[
|
|
120
|
+
if (r)
|
|
121
|
+
return { borderLeftColor: e[r] || r };
|
|
120
122
|
}
|
|
121
123
|
return {};
|
|
122
|
-
},
|
|
123
|
-
const
|
|
124
|
-
if (
|
|
125
|
-
return `${
|
|
124
|
+
}, P = w(() => l.iconBoxShape === "full-rounded" ? "rounded-full" : l.iconBoxShape === "none" ? "rounded-none" : "rounded-lg"), p = (i) => {
|
|
125
|
+
const r = `flex items-center justify-center shrink-0 ${P.value} p-3`, e = i.color || "primary";
|
|
126
|
+
if (l.iconBoxStyle === "transparent")
|
|
127
|
+
return `${r} bg-transparent ${{
|
|
126
128
|
primary: "text-primary",
|
|
127
129
|
secondary: "text-secondary-foreground",
|
|
128
130
|
success: "text-success-dark",
|
|
@@ -130,7 +132,7 @@ const N = { class: "flex items-end justify-between w-full mt-3" }, V = {
|
|
|
130
132
|
danger: "text-danger-dark",
|
|
131
133
|
info: "text-info-dark"
|
|
132
134
|
}[e] || "text-primary"}`;
|
|
133
|
-
if (
|
|
135
|
+
if (l.variant === "solid" && !l.attached) {
|
|
134
136
|
const u = {
|
|
135
137
|
primary: "bg-primary text-primary-fg",
|
|
136
138
|
secondary: "bg-foreground text-background",
|
|
@@ -139,7 +141,7 @@ const N = { class: "flex items-end justify-between w-full mt-3" }, V = {
|
|
|
139
141
|
danger: "bg-danger text-danger-fg",
|
|
140
142
|
info: "bg-info text-info-fg"
|
|
141
143
|
};
|
|
142
|
-
return `${
|
|
144
|
+
return `${r} ${u[e] || u.primary}`;
|
|
143
145
|
} else {
|
|
144
146
|
const u = {
|
|
145
147
|
primary: "bg-primary-light text-primary",
|
|
@@ -149,150 +151,186 @@ const N = { class: "flex items-end justify-between w-full mt-3" }, V = {
|
|
|
149
151
|
danger: "bg-danger-light text-danger-dark",
|
|
150
152
|
info: "bg-info-light text-info-dark"
|
|
151
153
|
};
|
|
152
|
-
return `${
|
|
154
|
+
return `${r} ${u[e] || u.primary}`;
|
|
153
155
|
}
|
|
156
|
+
}, $ = (i) => {
|
|
157
|
+
const r = i.color || "primary";
|
|
158
|
+
return `shrink-0 ${{
|
|
159
|
+
primary: "text-primary",
|
|
160
|
+
secondary: "text-secondary-foreground",
|
|
161
|
+
success: "text-success-dark",
|
|
162
|
+
warning: "text-warning-dark",
|
|
163
|
+
danger: "text-danger-dark",
|
|
164
|
+
info: "text-info-dark"
|
|
165
|
+
}[r] || "text-primary"}`;
|
|
166
|
+
}, B = (i) => {
|
|
167
|
+
const r = i.color;
|
|
168
|
+
return r && !["primary", "secondary", "success", "warning", "danger", "info"].includes(r) ? { color: r } : {};
|
|
154
169
|
}, k = (i) => {
|
|
155
|
-
const
|
|
156
|
-
return
|
|
170
|
+
const r = i.color;
|
|
171
|
+
return r && !["primary", "secondary", "success", "warning", "danger", "info"].includes(r) ? l.iconBoxStyle === "transparent" ? { color: r } : l.variant === "solid" && !l.attached ? { backgroundColor: r, color: "#fff" } : { color: r, backgroundColor: `${r}20` } : {};
|
|
157
172
|
};
|
|
158
|
-
return (i,
|
|
173
|
+
return (i, r) => (s(), a("div", {
|
|
159
174
|
class: t(z.value)
|
|
160
175
|
}, [
|
|
161
|
-
(
|
|
176
|
+
(s(!0), a(y, null, V(n.items, (e, u) => (s(), a("div", {
|
|
162
177
|
key: e.id || u,
|
|
163
|
-
class: t(
|
|
164
|
-
style: b(
|
|
178
|
+
class: t(I(e)),
|
|
179
|
+
style: b(C(e))
|
|
165
180
|
}, [
|
|
166
|
-
n.layout === "title-top-icon-bottom-right" ? (
|
|
167
|
-
|
|
181
|
+
n.layout === "title-top-icon-bottom-right" ? (s(), a(y, { key: 0 }, [
|
|
182
|
+
c("h3", {
|
|
168
183
|
class: t(n.titleSize || "text-sm font-medium text-muted-foreground truncate w-full")
|
|
169
|
-
},
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
184
|
+
}, o(e.titleI18n ? v(h)(e.titleI18n) : e.title), 3),
|
|
185
|
+
c("div", O, [
|
|
186
|
+
c("div", null, [
|
|
187
|
+
c("p", {
|
|
173
188
|
class: t(n.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
174
|
-
},
|
|
175
|
-
e.trend ? (
|
|
176
|
-
g
|
|
189
|
+
}, o(e.value), 3),
|
|
190
|
+
e.trend ? (s(), a("div", D, [
|
|
191
|
+
f(g, {
|
|
177
192
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
178
193
|
class: t([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
179
194
|
}, null, 8, ["icon", "class"]),
|
|
180
|
-
|
|
195
|
+
c("span", {
|
|
181
196
|
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
182
|
-
},
|
|
183
|
-
e.trend.label ? (
|
|
197
|
+
}, o(e.trend.value), 3),
|
|
198
|
+
e.trend.label ? (s(), a("span", F, o(e.trend.label), 1)) : d("", !0)
|
|
184
199
|
])) : d("", !0)
|
|
185
200
|
]),
|
|
186
|
-
e.icon ? (
|
|
201
|
+
e.icon ? (s(), a("div", {
|
|
187
202
|
key: 0,
|
|
188
203
|
class: t(p(e)),
|
|
189
204
|
style: b(k(e))
|
|
190
205
|
}, [
|
|
191
|
-
g
|
|
206
|
+
f(g, {
|
|
192
207
|
icon: e.icon,
|
|
193
208
|
class: t(n.iconSize || "w-6 h-6")
|
|
194
209
|
}, null, 8, ["icon", "class"])
|
|
195
210
|
], 6)) : d("", !0)
|
|
196
211
|
])
|
|
197
|
-
], 64)) : n.layout === "centered-value-title" ? (
|
|
198
|
-
|
|
212
|
+
], 64)) : n.layout === "centered-value-title" ? (s(), a(y, { key: 1 }, [
|
|
213
|
+
c("p", {
|
|
199
214
|
class: t(n.valueSize || "text-3xl font-bold text-foreground")
|
|
200
|
-
},
|
|
201
|
-
|
|
215
|
+
}, o(e.value), 3),
|
|
216
|
+
c("h3", {
|
|
202
217
|
class: t(n.titleSize || "text-sm font-medium text-muted-foreground")
|
|
203
|
-
},
|
|
204
|
-
e.trend ? (
|
|
205
|
-
g
|
|
218
|
+
}, o(e.titleI18n ? v(h)(e.titleI18n) : e.title), 3),
|
|
219
|
+
e.trend ? (s(), a("div", T, [
|
|
220
|
+
f(g, {
|
|
206
221
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
207
222
|
class: t([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
208
223
|
}, null, 8, ["icon", "class"]),
|
|
209
|
-
|
|
224
|
+
c("span", {
|
|
210
225
|
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium"])
|
|
211
|
-
},
|
|
226
|
+
}, o(e.trend.value), 3)
|
|
212
227
|
])) : d("", !0)
|
|
213
|
-
], 64)) : n.layout === "floating-icon" ? (
|
|
214
|
-
e.icon ? (
|
|
228
|
+
], 64)) : n.layout === "floating-icon" ? (s(), a(y, { key: 2 }, [
|
|
229
|
+
e.icon ? (s(), a("div", {
|
|
215
230
|
key: 0,
|
|
216
231
|
class: t([p(e), "absolute top-4 right-4"]),
|
|
217
232
|
style: b(k(e))
|
|
218
233
|
}, [
|
|
219
|
-
g
|
|
234
|
+
f(g, {
|
|
220
235
|
icon: e.icon,
|
|
221
236
|
class: t(n.iconSize || "w-6 h-6")
|
|
222
237
|
}, null, 8, ["icon", "class"])
|
|
223
238
|
], 6)) : d("", !0),
|
|
224
|
-
|
|
239
|
+
c("h3", {
|
|
225
240
|
class: t(n.titleSize || "text-sm font-medium text-muted-foreground truncate pr-12")
|
|
226
|
-
},
|
|
227
|
-
|
|
241
|
+
}, o(e.titleI18n ? v(h)(e.titleI18n) : e.title), 3),
|
|
242
|
+
c("p", {
|
|
228
243
|
class: t(n.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
|
|
229
|
-
},
|
|
230
|
-
e.trend ? (
|
|
231
|
-
g
|
|
244
|
+
}, o(e.value), 3),
|
|
245
|
+
e.trend ? (s(), a("div", q, [
|
|
246
|
+
f(g, {
|
|
232
247
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
233
248
|
class: t([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
234
249
|
}, null, 8, ["icon", "class"]),
|
|
235
|
-
|
|
250
|
+
c("span", {
|
|
236
251
|
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
237
|
-
},
|
|
238
|
-
e.trend.label ? (
|
|
252
|
+
}, o(e.trend.value), 3),
|
|
253
|
+
e.trend.label ? (s(), a("span", A, o(e.trend.label), 1)) : d("", !0)
|
|
239
254
|
])) : d("", !0)
|
|
240
|
-
], 64)) : n.layout === "split-bar" ? (
|
|
241
|
-
|
|
255
|
+
], 64)) : n.layout === "split-bar" ? (s(), a("div", G, [
|
|
256
|
+
c("h3", {
|
|
242
257
|
class: t(
|
|
243
258
|
n.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
|
|
244
259
|
)
|
|
245
|
-
},
|
|
246
|
-
|
|
260
|
+
}, o(e.titleI18n ? v(h)(e.titleI18n) : e.title), 3),
|
|
261
|
+
c("p", {
|
|
247
262
|
class: t(n.valueSize || "text-3xl font-black text-foreground truncate mt-0.5")
|
|
248
|
-
},
|
|
249
|
-
e.trend ? (
|
|
250
|
-
g
|
|
263
|
+
}, o(e.value), 3),
|
|
264
|
+
e.trend ? (s(), a("div", H, [
|
|
265
|
+
f(g, {
|
|
251
266
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
252
267
|
class: t([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
253
268
|
}, null, 8, ["icon", "class"]),
|
|
254
|
-
|
|
269
|
+
c("span", {
|
|
255
270
|
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
256
|
-
},
|
|
257
|
-
e.trend.label ? (
|
|
271
|
+
}, o(e.trend.value), 3),
|
|
272
|
+
e.trend.label ? (s(), a("span", J, o(e.trend.label), 1)) : d("", !0)
|
|
258
273
|
])) : d("", !0)
|
|
259
|
-
])) : (
|
|
260
|
-
e.icon
|
|
274
|
+
])) : n.layout === "inline-label-value" ? (s(), a(y, { key: 4 }, [
|
|
275
|
+
e.icon ? (s(), E(g, {
|
|
276
|
+
key: 0,
|
|
277
|
+
icon: e.icon,
|
|
278
|
+
class: t([$(e), n.iconSize || "w-4.5 h-4.5"]),
|
|
279
|
+
style: b(B(e))
|
|
280
|
+
}, null, 8, ["icon", "class", "style"])) : d("", !0),
|
|
281
|
+
c("span", {
|
|
282
|
+
class: t([n.titleSize || "-text-fs-2 font-medium text-muted-foreground truncate", "flex-1 min-w-0"])
|
|
283
|
+
}, o(e.titleI18n ? v(h)(e.titleI18n) : e.title), 3),
|
|
284
|
+
c("span", {
|
|
285
|
+
class: t(n.valueSize || "text-sm font-semibold text-foreground tabular-nums shrink-0")
|
|
286
|
+
}, o(e.value), 3),
|
|
287
|
+
e.trend ? (s(), a("span", {
|
|
288
|
+
key: 1,
|
|
289
|
+
class: t(["shrink-0 flex items-center gap-0.5 text-xs font-medium", e.trend.isPositive ? "text-success-dark" : "text-danger-dark"])
|
|
290
|
+
}, [
|
|
291
|
+
f(g, {
|
|
292
|
+
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
293
|
+
class: "w-3 h-3"
|
|
294
|
+
}, null, 8, ["icon"]),
|
|
295
|
+
L(" " + o(e.trend.value), 1)
|
|
296
|
+
], 2)) : d("", !0)
|
|
297
|
+
], 64)) : (s(), a(y, { key: 5 }, [
|
|
298
|
+
e.icon && n.layout !== "icon-right" ? (s(), a("div", {
|
|
261
299
|
key: 0,
|
|
262
300
|
class: t(p(e)),
|
|
263
301
|
style: b(k(e))
|
|
264
302
|
}, [
|
|
265
|
-
g
|
|
303
|
+
f(g, {
|
|
266
304
|
icon: e.icon,
|
|
267
305
|
class: t(n.iconSize || "w-6 h-6")
|
|
268
306
|
}, null, 8, ["icon", "class"])
|
|
269
307
|
], 6)) : d("", !0),
|
|
270
|
-
|
|
271
|
-
|
|
308
|
+
c("div", K, [
|
|
309
|
+
c("h3", {
|
|
272
310
|
class: t(n.titleSize || "text-sm font-medium text-muted-foreground truncate")
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
|
|
311
|
+
}, o(e.titleI18n ? v(h)(e.titleI18n) : e.title), 3),
|
|
312
|
+
c("div", Q, [
|
|
313
|
+
c("p", {
|
|
276
314
|
class: t(n.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
277
|
-
},
|
|
315
|
+
}, o(e.value), 3)
|
|
278
316
|
]),
|
|
279
|
-
e.trend ? (
|
|
280
|
-
g
|
|
317
|
+
e.trend ? (s(), a("div", R, [
|
|
318
|
+
f(g, {
|
|
281
319
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
282
320
|
class: t([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
283
321
|
}, null, 8, ["icon", "class"]),
|
|
284
|
-
|
|
322
|
+
c("span", {
|
|
285
323
|
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
286
|
-
},
|
|
287
|
-
e.trend.label ? (
|
|
324
|
+
}, o(e.trend.value), 3),
|
|
325
|
+
e.trend.label ? (s(), a("span", U, o(e.trend.label), 1)) : d("", !0)
|
|
288
326
|
])) : d("", !0)
|
|
289
327
|
]),
|
|
290
|
-
e.icon && n.layout === "icon-right" ? (
|
|
328
|
+
e.icon && n.layout === "icon-right" ? (s(), a("div", {
|
|
291
329
|
key: 1,
|
|
292
330
|
class: t(p(e)),
|
|
293
331
|
style: b(k(e))
|
|
294
332
|
}, [
|
|
295
|
-
g
|
|
333
|
+
f(g, {
|
|
296
334
|
icon: e.icon,
|
|
297
335
|
class: t(n.iconSize || "w-6 h-6")
|
|
298
336
|
}, null, 8, ["icon", "class"])
|
|
@@ -303,5 +341,5 @@ const N = { class: "flex items-end justify-between w-full mt-3" }, V = {
|
|
|
303
341
|
}
|
|
304
342
|
});
|
|
305
343
|
export {
|
|
306
|
-
|
|
344
|
+
Z as default
|
|
307
345
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type StatsVariant = 'solid' | 'outline' | 'shadow' | 'transparent';
|
|
2
|
-
export type StatsLayout = 'icon-left' | 'icon-right' | 'icon-top' | 'title-top-icon-bottom-right' | 'centered-value-title' | 'floating-icon' | 'split-bar';
|
|
2
|
+
export type StatsLayout = 'icon-left' | 'icon-right' | 'icon-top' | 'title-top-icon-bottom-right' | 'centered-value-title' | 'floating-icon' | 'split-bar' | 'inline-label-value';
|
|
3
3
|
export type IconBoxShape = 'rounded' | 'full-rounded' | 'none';
|
|
4
4
|
export type IconBoxStyle = 'filled' | 'transparent';
|
|
5
5
|
export interface StatTrend {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TooltTipProps } from 'v-tooltip-lite/types';
|
|
1
|
+
import { TooltTipProps } from '../lib/v-tooltip-lite/types';
|
|
2
2
|
interface Props extends TooltTipProps {
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
contentI18n?: string;
|
|
@@ -17,11 +17,11 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
17
17
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
18
18
|
disabled: boolean;
|
|
19
19
|
className: string;
|
|
20
|
-
|
|
21
|
-
triggerClass: string;
|
|
22
|
-
placement: import('v-tooltip-lite/types').TooltTipPlacement;
|
|
20
|
+
placement: import('../lib/v-tooltip-lite/types').TooltTipPlacement;
|
|
23
21
|
arrow: boolean;
|
|
22
|
+
triggerClass: string;
|
|
24
23
|
contentClass: string;
|
|
24
|
+
teleport: boolean;
|
|
25
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
26
26
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
27
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as r, computed as c, openBlock as l, createElementBlock as i, renderSlot as n, createBlock as p, unref as d, mergeProps as u, withCtx as a } from "vue";
|
|
2
|
-
|
|
3
|
-
import f from "v-tooltip-lite";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import f from "../lib/v-tooltip-lite/components/ToolTip.vue.js";
|
|
4
4
|
import { $t as m } from "../utils/i18n.js";
|
|
5
5
|
const y = {
|
|
6
6
|
key: 0,
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { TooltTipProps } from '../types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
trigger?(_: {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
}): any;
|
|
8
|
+
default?(_: {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {
|
|
13
|
+
triggerRef: HTMLSpanElement;
|
|
14
|
+
containerRef: HTMLDivElement;
|
|
15
|
+
};
|
|
16
|
+
rootEl: HTMLDivElement;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<TooltTipProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
onShow: (...args: any[]) => void;
|
|
21
|
+
onHide: (...args: any[]) => void;
|
|
22
|
+
"update:isOpen": (...args: any[]) => void;
|
|
23
|
+
}, string, import('vue').PublicProps, Readonly<TooltTipProps> & Readonly<{
|
|
24
|
+
onOnShow?: (...args: any[]) => any;
|
|
25
|
+
onOnHide?: (...args: any[]) => any;
|
|
26
|
+
"onUpdate:isOpen"?: (...args: any[]) => any;
|
|
27
|
+
}>, {
|
|
28
|
+
trigger: "hover" | "click";
|
|
29
|
+
placement: import('../types').TooltTipPlacement;
|
|
30
|
+
offset: [number, number];
|
|
31
|
+
arrow: boolean;
|
|
32
|
+
content: string;
|
|
33
|
+
teleport: boolean;
|
|
34
|
+
ignoreClickOutside: string[];
|
|
35
|
+
isOpen: boolean;
|
|
36
|
+
keepAlive: boolean;
|
|
37
|
+
menuId: string;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
39
|
+
triggerRef: HTMLSpanElement;
|
|
40
|
+
containerRef: HTMLDivElement;
|
|
41
|
+
}, HTMLDivElement>;
|
|
42
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|