vlite3 1.0.4 → 1.0.6
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 +19 -3
- package/components/AttachmentsList/AttachmentsList.vue.js +274 -111
- package/components/AttachmentsList/fileTypeIcon.d.ts +16 -0
- package/components/AttachmentsList/fileTypeIcon.js +127 -0
- package/components/AttachmentsList/index.d.ts +1 -0
- package/components/AttachmentsList/types.d.ts +74 -2
- package/components/Avatar.vue.js +2 -2
- package/components/Badge.vue.js +7 -7
- package/components/Button.vue.js +36 -43
- package/components/ButtonGroup.vue.js +2 -2
- package/components/ButtonGroup.vue2.js +8 -8
- package/components/CategoryManager/CategoryManager.vue.d.ts +36 -0
- package/components/CategoryManager/CategoryNode.vue.d.ts +15 -0
- package/components/CategoryManager/index.d.ts +2 -0
- package/components/CategoryManager/types.d.ts +43 -0
- package/components/Chat/ChatBubble.vue.js +70 -56
- package/components/Chat/ChatInterface.vue.js +182 -142
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +2 -2
- package/components/Dropdown/DropdownMenu.vue2.js +1 -0
- package/components/FilePicker/FilePicker.vue.js +117 -122
- package/components/Input.vue.js +28 -26
- package/components/Kanban/Kanban.vue.d.ts +7 -16
- package/components/Kanban/Kanban.vue.js +1 -1
- package/components/Kanban/Kanban.vue2.js +79 -47
- package/components/Kanban/KanbanBoard.vue.js +2 -2
- package/components/Kanban/KanbanBoard.vue2.js +21 -21
- package/components/Kanban/types.d.ts +3 -0
- package/components/List/List.vue.js +89 -85
- package/components/Navbar/Navbar.vue.d.ts +4 -0
- package/components/Navbar/Navbar.vue.js +196 -173
- package/components/Navbar/NavbarTabs.vue.js +72 -66
- package/components/NavbarCommandPalette.vue.js +11 -11
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +144 -104
- package/components/Screen/Screen.vue.d.ts +12 -29
- package/components/Screen/Screen.vue.js +228 -195
- package/components/Screen/components/ScreenViewToggle.vue.d.ts +6 -3
- package/components/Screen/components/ScreenViewToggle.vue.js +29 -34
- package/components/Screen/types.d.ts +59 -7
- package/components/Stats/Stats.vue.d.ts +1 -0
- package/components/Stats/Stats.vue.js +184 -156
- package/components/Stats/types.d.ts +1 -0
- package/components/Workbook/Sheet.vue.d.ts +1 -1
- package/directives/vRipple.js +28 -9
- package/index.js +87 -85
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -1,37 +1,55 @@
|
|
|
1
|
-
import { defineComponent as N, computed as w, openBlock as
|
|
1
|
+
import { defineComponent as N, computed as w, openBlock as n, createElementBlock as r, normalizeClass as s, Fragment as y, renderList as V, normalizeStyle as b, createElementVNode as i, toDisplayString as c, unref as h, createVNode as f, createCommentVNode as d, createBlock as E, createTextVNode as L } from "vue";
|
|
2
2
|
import g from "../Icon.vue.js";
|
|
3
|
-
import { $t as
|
|
3
|
+
import { $t as v } from "../../utils/i18n.js";
|
|
4
4
|
const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
5
5
|
key: 0,
|
|
6
|
-
class: "
|
|
6
|
+
class: "h-8 w-24 bg-gray-50 animate-pulse rounded-md"
|
|
7
7
|
}, F = {
|
|
8
|
+
key: 2,
|
|
9
|
+
class: "mt-1 flex items-center gap-1 text-sm"
|
|
10
|
+
}, T = {
|
|
8
11
|
key: 0,
|
|
9
12
|
class: "text-muted-foreground truncate"
|
|
10
|
-
},
|
|
13
|
+
}, q = {
|
|
11
14
|
key: 0,
|
|
15
|
+
class: "h-9 w-24 bg-gray-50 animate-pulse rounded-md"
|
|
16
|
+
}, A = {
|
|
17
|
+
key: 2,
|
|
12
18
|
class: "flex items-center gap-1 text-sm"
|
|
13
|
-
},
|
|
19
|
+
}, G = {
|
|
14
20
|
key: 1,
|
|
21
|
+
class: "h-8 w-20 bg-gray-50 animate-pulse rounded-md mt-1"
|
|
22
|
+
}, H = {
|
|
23
|
+
key: 3,
|
|
15
24
|
class: "mt-2 flex items-center gap-1.5 text-sm"
|
|
16
|
-
},
|
|
25
|
+
}, J = {
|
|
17
26
|
key: 0,
|
|
18
27
|
class: "text-muted-foreground truncate"
|
|
19
|
-
},
|
|
28
|
+
}, K = {
|
|
20
29
|
key: 3,
|
|
21
30
|
class: "flex-1 flex flex-col justify-center min-w-0"
|
|
22
|
-
},
|
|
31
|
+
}, Q = {
|
|
23
32
|
key: 0,
|
|
33
|
+
class: "h-9 w-24 bg-gray-50 animate-pulse rounded-md mt-0.5"
|
|
34
|
+
}, R = {
|
|
35
|
+
key: 2,
|
|
24
36
|
class: "mt-1 flex items-center gap-1 text-sm"
|
|
25
|
-
},
|
|
37
|
+
}, U = {
|
|
26
38
|
key: 0,
|
|
27
39
|
class: "text-muted-foreground truncate"
|
|
28
|
-
},
|
|
40
|
+
}, W = {
|
|
41
|
+
key: 1,
|
|
42
|
+
class: "h-6 w-5 bg-gray-50 animate-pulse rounded-sm shrink-0"
|
|
43
|
+
}, X = { class: "flex-1 flex flex-col justify-center min-w-0" }, Y = { class: "flex items-baseline gap-2 mt-1" }, Z = {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "h-8 w-24 bg-gray-50 animate-pulse rounded-md"
|
|
46
|
+
}, _ = {
|
|
29
47
|
key: 0,
|
|
30
48
|
class: "mt-2 flex items-center gap-1.5 text-sm"
|
|
31
|
-
},
|
|
49
|
+
}, ee = {
|
|
32
50
|
key: 0,
|
|
33
51
|
class: "text-muted-foreground truncate"
|
|
34
|
-
},
|
|
52
|
+
}, se = /* @__PURE__ */ N({
|
|
35
53
|
__name: "Stats",
|
|
36
54
|
props: {
|
|
37
55
|
items: {},
|
|
@@ -39,6 +57,7 @@ const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
|
39
57
|
layout: { default: "icon-left" },
|
|
40
58
|
columns: { default: 4 },
|
|
41
59
|
attached: { type: Boolean, default: !1 },
|
|
60
|
+
loading: { type: Boolean, default: !1 },
|
|
42
61
|
titleSize: { default: "" },
|
|
43
62
|
valueSize: { default: "" },
|
|
44
63
|
iconSize: { default: "" },
|
|
@@ -46,19 +65,22 @@ const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
|
46
65
|
iconBoxStyle: { default: "transparent" },
|
|
47
66
|
class: { default: "" }
|
|
48
67
|
},
|
|
49
|
-
setup(
|
|
50
|
-
const o =
|
|
51
|
-
const
|
|
52
|
-
return
|
|
53
|
-
}), z = w(() =>
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
68
|
+
setup(t) {
|
|
69
|
+
const o = t, S = w(() => {
|
|
70
|
+
const l = Number(o.columns) || 4;
|
|
71
|
+
return l === 1 ? "grid-cols-1" : l === 2 ? "grid-cols-1 sm:grid-cols-2" : l === 3 ? "grid-cols-1 sm:grid-cols-3" : l === 4 ? "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4" : l === 5 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-5" : l === 6 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-6" : "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";
|
|
72
|
+
}), z = w(() => {
|
|
73
|
+
const l = o.attached && o.variant !== "transparent" ? "border-t border-l border-border overflow-hidden" : "overflow-hidden";
|
|
74
|
+
return [
|
|
75
|
+
"grid",
|
|
76
|
+
S.value,
|
|
77
|
+
o.attached ? `gap-0 ${l}` : "gap-3 sm:gap-4.5",
|
|
78
|
+
o.variant === "shadow" && o.attached ? "shadow-md" : "",
|
|
79
|
+
o?.layout === "inline-label-value" ? "rounded-sm" : "",
|
|
80
|
+
o.class
|
|
81
|
+
].join(" ");
|
|
82
|
+
}), C = (l, a) => {
|
|
83
|
+
const e = o.layout === "inline-label-value" ? "flex px-3.5 py-3 relative " : "flex p-3 relative ", u = {
|
|
62
84
|
"icon-left": "flex-row items-center gap-3 text-left",
|
|
63
85
|
"icon-right": "flex-row items-center justify-between gap-3 text-left",
|
|
64
86
|
"icon-top": "flex-col items-start gap-1 px-5! pt-2! text-left",
|
|
@@ -75,11 +97,11 @@ const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
|
75
97
|
}, j = u[o.layout] || u["icon-left"];
|
|
76
98
|
let x = "";
|
|
77
99
|
if (o.attached)
|
|
78
|
-
x = "border-b border-r hover:bg-muted/30"
|
|
100
|
+
o.variant === "transparent" ? x = "border-b border-r border-transparent hover:bg-muted/30" : o.variant === "outline" ? x = "border-b border-r border-border hover:bg-muted/30" : x = "border-b border-r border-border hover:bg-muted/30 bg-card";
|
|
79
101
|
else {
|
|
80
102
|
switch (o.variant) {
|
|
81
103
|
case "solid": {
|
|
82
|
-
const M =
|
|
104
|
+
const M = l.color || "primary", p = {
|
|
83
105
|
primary: "bg-primary-light",
|
|
84
106
|
secondary: "bg-secondary",
|
|
85
107
|
success: "bg-success-light",
|
|
@@ -87,14 +109,14 @@ const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
|
87
109
|
danger: "bg-danger-light",
|
|
88
110
|
info: "bg-info-light"
|
|
89
111
|
};
|
|
90
|
-
x = `${
|
|
112
|
+
x = `${p[M] || p.primary}`;
|
|
91
113
|
break;
|
|
92
114
|
}
|
|
93
115
|
case "outline":
|
|
94
|
-
x = "
|
|
116
|
+
x = "border border-border";
|
|
95
117
|
break;
|
|
96
118
|
case "shadow":
|
|
97
|
-
x = "bg-
|
|
119
|
+
x = "bg-card shadow-md border border-border/50";
|
|
98
120
|
break;
|
|
99
121
|
case "transparent":
|
|
100
122
|
x = "bg-transparent";
|
|
@@ -103,14 +125,14 @@ const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
|
103
125
|
x += " rounded-lg";
|
|
104
126
|
}
|
|
105
127
|
return [e, j, x].join(" ");
|
|
106
|
-
},
|
|
128
|
+
}, I = (l) => {
|
|
107
129
|
if (o.variant === "solid" && !o.attached) {
|
|
108
|
-
const
|
|
109
|
-
if (
|
|
110
|
-
return { backgroundColor: `${
|
|
130
|
+
const a = l.color;
|
|
131
|
+
if (a && !["primary", "secondary", "success", "warning", "danger", "info"].includes(a))
|
|
132
|
+
return { backgroundColor: `${a}15` };
|
|
111
133
|
}
|
|
112
134
|
if (o.layout === "split-bar") {
|
|
113
|
-
const
|
|
135
|
+
const a = l.color, e = {
|
|
114
136
|
primary: "var(--color-primary)",
|
|
115
137
|
secondary: "var(--color-secondary)",
|
|
116
138
|
success: "var(--color-success)",
|
|
@@ -118,14 +140,14 @@ const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
|
118
140
|
danger: "var(--color-danger)",
|
|
119
141
|
info: "var(--color-info)"
|
|
120
142
|
};
|
|
121
|
-
if (
|
|
122
|
-
return { borderLeftColor: e[
|
|
143
|
+
if (a)
|
|
144
|
+
return { borderLeftColor: e[a] || a };
|
|
123
145
|
}
|
|
124
146
|
return {};
|
|
125
|
-
}, P = w(() => o.iconBoxShape === "full-rounded" ? "rounded-full" : o.iconBoxShape === "none" ? "rounded-none" : "rounded-lg"),
|
|
126
|
-
const
|
|
147
|
+
}, P = w(() => o.iconBoxShape === "full-rounded" ? "rounded-full" : o.iconBoxShape === "none" ? "rounded-none" : "rounded-lg"), k = (l) => {
|
|
148
|
+
const a = `flex items-center justify-center shrink-0 ${P.value} p-3`, e = l.color || "primary";
|
|
127
149
|
if (o.iconBoxStyle === "transparent")
|
|
128
|
-
return `${
|
|
150
|
+
return `${a} bg-transparent ${{
|
|
129
151
|
primary: "text-primary",
|
|
130
152
|
secondary: "text-secondary-foreground",
|
|
131
153
|
success: "text-success-dark",
|
|
@@ -142,7 +164,7 @@ const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
|
142
164
|
danger: "bg-danger text-danger-fg",
|
|
143
165
|
info: "bg-info text-info-fg"
|
|
144
166
|
};
|
|
145
|
-
return `${
|
|
167
|
+
return `${a} ${u[e] || u.primary}`;
|
|
146
168
|
} else {
|
|
147
169
|
const u = {
|
|
148
170
|
primary: "bg-primary-light text-primary",
|
|
@@ -152,10 +174,10 @@ const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
|
152
174
|
danger: "bg-danger-light text-danger-dark",
|
|
153
175
|
info: "bg-info-light text-info-dark"
|
|
154
176
|
};
|
|
155
|
-
return `${
|
|
177
|
+
return `${a} ${u[e] || u.primary}`;
|
|
156
178
|
}
|
|
157
|
-
},
|
|
158
|
-
const
|
|
179
|
+
}, B = (l) => {
|
|
180
|
+
const a = l.color || "primary";
|
|
159
181
|
return `shrink-0 ${{
|
|
160
182
|
primary: "text-primary",
|
|
161
183
|
secondary: "text-secondary-foreground",
|
|
@@ -163,177 +185,183 @@ const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
|
163
185
|
warning: "text-warning-dark",
|
|
164
186
|
danger: "text-danger-dark",
|
|
165
187
|
info: "text-info-dark"
|
|
166
|
-
}[
|
|
167
|
-
},
|
|
168
|
-
const
|
|
169
|
-
return
|
|
170
|
-
},
|
|
171
|
-
const
|
|
172
|
-
return
|
|
188
|
+
}[a] || "text-primary"}`;
|
|
189
|
+
}, $ = (l) => {
|
|
190
|
+
const a = l.color;
|
|
191
|
+
return a && !["primary", "secondary", "success", "warning", "danger", "info"].includes(a) ? { color: a } : {};
|
|
192
|
+
}, m = (l) => {
|
|
193
|
+
const a = l.color;
|
|
194
|
+
return a && !["primary", "secondary", "success", "warning", "danger", "info"].includes(a) ? o.iconBoxStyle === "transparent" ? { color: a } : o.variant === "solid" && !o.attached ? { backgroundColor: a, color: "#fff" } : { color: a, backgroundColor: `${a}20` } : {};
|
|
173
195
|
};
|
|
174
|
-
return (
|
|
175
|
-
class:
|
|
196
|
+
return (l, a) => (n(), r("div", {
|
|
197
|
+
class: s(z.value)
|
|
176
198
|
}, [
|
|
177
|
-
(
|
|
199
|
+
(n(!0), r(y, null, V(t.items, (e, u) => (n(), r("div", {
|
|
178
200
|
key: e.id || u,
|
|
179
|
-
class:
|
|
180
|
-
style:
|
|
201
|
+
class: s(C(e)),
|
|
202
|
+
style: b(I(e))
|
|
181
203
|
}, [
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
class: t
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
e.
|
|
204
|
+
t.layout === "title-top-icon-bottom-right" ? (n(), r(y, { key: 0 }, [
|
|
205
|
+
i("h3", {
|
|
206
|
+
class: s(t.titleSize || "text-sm font-medium text-muted-foreground truncate w-full")
|
|
207
|
+
}, c(e.titleI18n ? h(v)(e.titleI18n) : e.title), 3),
|
|
208
|
+
i("div", O, [
|
|
209
|
+
i("div", null, [
|
|
210
|
+
t.loading ? (n(), r("div", D)) : (n(), r("p", {
|
|
211
|
+
key: 1,
|
|
212
|
+
class: s(t.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
213
|
+
}, c(e.value), 3)),
|
|
214
|
+
e.trend && !t.loading ? (n(), r("div", F, [
|
|
192
215
|
f(g, {
|
|
193
216
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
194
|
-
class:
|
|
217
|
+
class: s([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
195
218
|
}, null, 8, ["icon", "class"]),
|
|
196
|
-
|
|
197
|
-
class:
|
|
198
|
-
},
|
|
199
|
-
e.trend.label ? (
|
|
219
|
+
i("span", {
|
|
220
|
+
class: s([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
221
|
+
}, c(e.trend.value), 3),
|
|
222
|
+
e.trend.label ? (n(), r("span", T, c(e.trend.label), 1)) : d("", !0)
|
|
200
223
|
])) : d("", !0)
|
|
201
224
|
]),
|
|
202
|
-
e.icon ? (
|
|
225
|
+
e.icon ? (n(), r("div", {
|
|
203
226
|
key: 0,
|
|
204
|
-
class:
|
|
205
|
-
style:
|
|
227
|
+
class: s(k(e)),
|
|
228
|
+
style: b(m(e))
|
|
206
229
|
}, [
|
|
207
230
|
f(g, {
|
|
208
231
|
icon: e.icon,
|
|
209
|
-
class: t
|
|
232
|
+
class: s(t.iconSize || "w-6 h-6")
|
|
210
233
|
}, null, 8, ["icon", "class"])
|
|
211
234
|
], 6)) : d("", !0)
|
|
212
235
|
])
|
|
213
|
-
], 64)) :
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
c(
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
e.
|
|
236
|
+
], 64)) : t.layout === "centered-value-title" ? (n(), r(y, { key: 1 }, [
|
|
237
|
+
t.loading ? (n(), r("div", q)) : (n(), r("p", {
|
|
238
|
+
key: 1,
|
|
239
|
+
class: s(t.valueSize || "text-3xl font-bold text-foreground")
|
|
240
|
+
}, c(e.value), 3)),
|
|
241
|
+
i("h3", {
|
|
242
|
+
class: s(t.titleSize || "text-sm font-medium text-muted-foreground")
|
|
243
|
+
}, c(e.titleI18n ? h(v)(e.titleI18n) : e.title), 3),
|
|
244
|
+
e.trend && !t.loading ? (n(), r("div", A, [
|
|
221
245
|
f(g, {
|
|
222
246
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
223
|
-
class:
|
|
247
|
+
class: s([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
224
248
|
}, null, 8, ["icon", "class"]),
|
|
225
|
-
|
|
226
|
-
class:
|
|
227
|
-
},
|
|
249
|
+
i("span", {
|
|
250
|
+
class: s([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium"])
|
|
251
|
+
}, c(e.trend.value), 3)
|
|
228
252
|
])) : d("", !0)
|
|
229
|
-
], 64)) :
|
|
230
|
-
e.icon ? (
|
|
253
|
+
], 64)) : t.layout === "floating-icon" ? (n(), r(y, { key: 2 }, [
|
|
254
|
+
e.icon ? (n(), r("div", {
|
|
231
255
|
key: 0,
|
|
232
|
-
class:
|
|
233
|
-
style:
|
|
256
|
+
class: s([k(e), "absolute top-4 right-4"]),
|
|
257
|
+
style: b(m(e))
|
|
234
258
|
}, [
|
|
235
259
|
f(g, {
|
|
236
260
|
icon: e.icon,
|
|
237
|
-
class: t
|
|
261
|
+
class: s(t.iconSize || "w-6 h-6")
|
|
238
262
|
}, null, 8, ["icon", "class"])
|
|
239
263
|
], 6)) : d("", !0),
|
|
240
|
-
|
|
241
|
-
class: t
|
|
242
|
-
},
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
e.
|
|
264
|
+
i("h3", {
|
|
265
|
+
class: s(t.titleSize || "text-sm font-medium text-muted-foreground truncate pr-12")
|
|
266
|
+
}, c(e.titleI18n ? h(v)(e.titleI18n) : e.title), 3),
|
|
267
|
+
t.loading ? (n(), r("div", G)) : (n(), r("p", {
|
|
268
|
+
key: 2,
|
|
269
|
+
class: s(t.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
|
|
270
|
+
}, c(e.value), 3)),
|
|
271
|
+
e.trend && !t.loading ? (n(), r("div", H, [
|
|
247
272
|
f(g, {
|
|
248
273
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
249
|
-
class:
|
|
274
|
+
class: s([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
250
275
|
}, null, 8, ["icon", "class"]),
|
|
251
|
-
|
|
252
|
-
class:
|
|
253
|
-
},
|
|
254
|
-
e.trend.label ? (
|
|
276
|
+
i("span", {
|
|
277
|
+
class: s([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
278
|
+
}, c(e.trend.value), 3),
|
|
279
|
+
e.trend.label ? (n(), r("span", J, c(e.trend.label), 1)) : d("", !0)
|
|
255
280
|
])) : d("", !0)
|
|
256
|
-
], 64)) :
|
|
257
|
-
|
|
258
|
-
class:
|
|
259
|
-
|
|
281
|
+
], 64)) : t.layout === "split-bar" ? (n(), r("div", K, [
|
|
282
|
+
i("h3", {
|
|
283
|
+
class: s(
|
|
284
|
+
t.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
|
|
260
285
|
)
|
|
261
|
-
},
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
e.
|
|
286
|
+
}, c(e.titleI18n ? h(v)(e.titleI18n) : e.title), 3),
|
|
287
|
+
t.loading ? (n(), r("div", Q)) : (n(), r("p", {
|
|
288
|
+
key: 1,
|
|
289
|
+
class: s(t.valueSize || "text-3xl font-black text-foreground truncate mt-0.5")
|
|
290
|
+
}, c(e.value), 3)),
|
|
291
|
+
e.trend && !t.loading ? (n(), r("div", R, [
|
|
266
292
|
f(g, {
|
|
267
293
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
268
|
-
class:
|
|
294
|
+
class: s([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
269
295
|
}, null, 8, ["icon", "class"]),
|
|
270
|
-
|
|
271
|
-
class:
|
|
272
|
-
},
|
|
273
|
-
e.trend.label ? (
|
|
296
|
+
i("span", {
|
|
297
|
+
class: s([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
298
|
+
}, c(e.trend.value), 3),
|
|
299
|
+
e.trend.label ? (n(), r("span", U, c(e.trend.label), 1)) : d("", !0)
|
|
274
300
|
])) : d("", !0)
|
|
275
|
-
])) :
|
|
276
|
-
e.icon ? (
|
|
301
|
+
])) : t.layout === "inline-label-value" ? (n(), r(y, { key: 4 }, [
|
|
302
|
+
e.icon ? (n(), E(g, {
|
|
277
303
|
key: 0,
|
|
278
304
|
icon: e.icon,
|
|
279
|
-
class:
|
|
280
|
-
style:
|
|
305
|
+
class: s([B(e), t.iconSize || "w-4.5 h-4.5"]),
|
|
306
|
+
style: b($(e))
|
|
281
307
|
}, null, 8, ["icon", "class", "style"])) : d("", !0),
|
|
282
|
-
|
|
283
|
-
class:
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
e.
|
|
289
|
-
|
|
290
|
-
|
|
308
|
+
i("span", {
|
|
309
|
+
class: s([t.titleSize || "-text-fs-2 font-medium text-muted-foreground truncate", "flex-1 min-w-0"])
|
|
310
|
+
}, c(e.titleI18n ? h(v)(e.titleI18n) : e.title), 3),
|
|
311
|
+
t.loading ? (n(), r("div", W)) : (n(), r("span", {
|
|
312
|
+
key: 2,
|
|
313
|
+
class: s(t.valueSize || "-text-fs-1 font-semibold text-foreground tabular-nums shrink-0")
|
|
314
|
+
}, c(e.value), 3)),
|
|
315
|
+
e.trend && !t.loading ? (n(), r("span", {
|
|
316
|
+
key: 3,
|
|
317
|
+
class: s(["shrink-0 flex items-center gap-0.5 text-xs font-medium", e.trend.isPositive ? "text-success-dark" : "text-danger-dark"])
|
|
291
318
|
}, [
|
|
292
319
|
f(g, {
|
|
293
320
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
294
321
|
class: "w-3 h-3"
|
|
295
322
|
}, null, 8, ["icon"]),
|
|
296
|
-
L(" " +
|
|
323
|
+
L(" " + c(e.trend.value), 1)
|
|
297
324
|
], 2)) : d("", !0)
|
|
298
|
-
], 64)) : (
|
|
299
|
-
e.icon &&
|
|
325
|
+
], 64)) : (n(), r(y, { key: 5 }, [
|
|
326
|
+
e.icon && t.layout !== "icon-right" ? (n(), r("div", {
|
|
300
327
|
key: 0,
|
|
301
|
-
class:
|
|
302
|
-
style:
|
|
328
|
+
class: s(k(e)),
|
|
329
|
+
style: b(m(e))
|
|
303
330
|
}, [
|
|
304
331
|
f(g, {
|
|
305
332
|
icon: e.icon,
|
|
306
|
-
class: t
|
|
333
|
+
class: s(t.iconSize || "w-6 h-6")
|
|
307
334
|
}, null, 8, ["icon", "class"])
|
|
308
335
|
], 6)) : d("", !0),
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
class: t
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
336
|
+
i("div", X, [
|
|
337
|
+
i("h3", {
|
|
338
|
+
class: s(t.titleSize || "text-sm font-medium text-muted-foreground truncate")
|
|
339
|
+
}, c(e.titleI18n ? h(v)(e.titleI18n) : e.title), 3),
|
|
340
|
+
i("div", Y, [
|
|
341
|
+
t.loading ? (n(), r("div", Z)) : (n(), r("p", {
|
|
342
|
+
key: 1,
|
|
343
|
+
class: s(t.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
344
|
+
}, c(e.value), 3))
|
|
317
345
|
]),
|
|
318
|
-
e.trend ? (
|
|
346
|
+
e.trend && !t.loading ? (n(), r("div", _, [
|
|
319
347
|
f(g, {
|
|
320
348
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
321
|
-
class:
|
|
349
|
+
class: s([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
322
350
|
}, null, 8, ["icon", "class"]),
|
|
323
|
-
|
|
324
|
-
class:
|
|
325
|
-
},
|
|
326
|
-
e.trend.label ? (
|
|
351
|
+
i("span", {
|
|
352
|
+
class: s([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
353
|
+
}, c(e.trend.value), 3),
|
|
354
|
+
e.trend.label ? (n(), r("span", ee, c(e.trend.label), 1)) : d("", !0)
|
|
327
355
|
])) : d("", !0)
|
|
328
356
|
]),
|
|
329
|
-
e.icon &&
|
|
357
|
+
e.icon && t.layout === "icon-right" ? (n(), r("div", {
|
|
330
358
|
key: 1,
|
|
331
|
-
class:
|
|
332
|
-
style:
|
|
359
|
+
class: s(k(e)),
|
|
360
|
+
style: b(m(e))
|
|
333
361
|
}, [
|
|
334
362
|
f(g, {
|
|
335
363
|
icon: e.icon,
|
|
336
|
-
class: t
|
|
364
|
+
class: s(t.iconSize || "w-6 h-6")
|
|
337
365
|
}, null, 8, ["icon", "class"])
|
|
338
366
|
], 6)) : d("", !0)
|
|
339
367
|
], 64))
|
|
@@ -342,5 +370,5 @@ const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
|
342
370
|
}
|
|
343
371
|
});
|
|
344
372
|
export {
|
|
345
|
-
|
|
373
|
+
se as default
|
|
346
374
|
};
|
|
@@ -34,9 +34,9 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
34
34
|
onDuplicate?: (id: string) => any;
|
|
35
35
|
}>, {
|
|
36
36
|
itemClass: string;
|
|
37
|
-
confirmDelete: boolean;
|
|
38
37
|
isEditing: boolean;
|
|
39
38
|
canDelete: boolean;
|
|
39
|
+
confirmDelete: boolean;
|
|
40
40
|
allowIconChange: boolean;
|
|
41
41
|
activeItemClass: string;
|
|
42
42
|
inactiveItemClass: string;
|
package/directives/vRipple.js
CHANGED
|
@@ -1,16 +1,35 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
t.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const y = (e, t) => {
|
|
2
|
+
const i = t.getBoundingClientRect(), p = e.clientX - i.left, d = e.clientY - i.top, s = Math.max(i.width, i.height), c = s / 2;
|
|
3
|
+
t.querySelectorAll(".ripple").forEach((r) => r.remove());
|
|
4
|
+
const o = document.createElement("span");
|
|
5
|
+
o.style.cssText = `
|
|
6
|
+
width: ${s}px;
|
|
7
|
+
height: ${s}px;
|
|
8
|
+
left: ${p - c}px;
|
|
9
|
+
top: ${d - c}px;
|
|
10
|
+
position: absolute;
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
border-radius: 50%;
|
|
13
|
+
transform: scale(0);
|
|
14
|
+
opacity: 0;
|
|
15
|
+
will-change: transform, opacity;
|
|
16
|
+
background-color: rgba(255, 255, 255, 1);
|
|
17
|
+
`, o.classList.add("ripple"), t.appendChild(o);
|
|
18
|
+
let a = null;
|
|
19
|
+
const m = 400, l = (r) => {
|
|
20
|
+
a || (a = r);
|
|
21
|
+
const n = Math.min((r - a) / m, 1), u = (1 - Math.pow(1 - n, 3)) * 2.5, h = n < 0.4 ? n * 0.2 : 0.08 * (1 - (n - 0.4) / 0.6);
|
|
22
|
+
o.style.transform = `scale(${u})`, o.style.opacity = `${h}`, n < 1 ? requestAnimationFrame(l) : o.remove();
|
|
23
|
+
};
|
|
24
|
+
requestAnimationFrame(l);
|
|
25
|
+
}, g = {
|
|
7
26
|
mounted(e) {
|
|
8
|
-
window.getComputedStyle(e).position === "static" && (e.style.position = "relative"), e.style.overflow = "hidden", e._rippleHandler = (
|
|
27
|
+
window.getComputedStyle(e).position === "static" && (e.style.position = "relative"), e.style.overflow = "hidden", e._rippleHandler = (t) => y(t, e), e.addEventListener("click", e._rippleHandler);
|
|
9
28
|
},
|
|
10
29
|
unmounted(e) {
|
|
11
|
-
e._rippleHandler && e.removeEventListener("click", e._rippleHandler), e.querySelectorAll(".ripple").forEach((
|
|
30
|
+
e._rippleHandler && e.removeEventListener("click", e._rippleHandler), e.querySelectorAll(".ripple").forEach((t) => t.remove());
|
|
12
31
|
}
|
|
13
32
|
};
|
|
14
33
|
export {
|
|
15
|
-
|
|
34
|
+
g as vRipple
|
|
16
35
|
};
|