vlite3 1.2.1 → 1.2.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/README.md +1 -0
- package/components/AppShell/AppShellLayoutClassic.vue.js +67 -64
- package/components/AppShell/AppShellLayoutDashboard.vue.js +76 -71
- package/components/AppShell/AppShellLayoutDock.vue.js +27 -27
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +81 -76
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +56 -56
- package/components/AsyncSelect/createAsyncSelect.d.ts +88 -0
- package/components/AsyncSelect/createAsyncSelect.js +156 -0
- package/components/AsyncSelect/index.d.ts +1 -0
- package/components/ChoiceBox/ChoiceBox.vue.js +4 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTableRow.vue.d.ts +1 -1
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +15 -2
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +1 -1
- package/components/Invoice/InvoiceVariant1.vue.js +225 -176
- package/components/Invoice/InvoiceVariant2.vue.js +174 -125
- package/components/Invoice/InvoiceVariant3.vue.js +186 -157
- package/components/Invoice/InvoiceVariant4.vue.js +200 -156
- package/components/Invoice/types.d.ts +10 -1
- package/components/List/ListFieldRow.vue.js +221 -144
- package/components/List/utils.d.ts +2 -2
- package/components/List/utils.js +6 -9
- package/components/NavbarCommandPalette.vue.js +2 -2
- package/components/Price/Price.vue.d.ts +3 -1
- package/components/Price/Price.vue.js +35 -10
- package/components/Rating/Rating.vue.d.ts +43 -0
- package/components/Rating/Rating.vue.js +7 -0
- package/components/Rating/Rating.vue2.js +92 -0
- package/components/Rating/ReviewSummary.vue.d.ts +5 -0
- package/components/Rating/ReviewSummary.vue.js +67 -0
- package/components/Rating/ReviewSummary.vue2.js +4 -0
- package/components/Rating/index.d.ts +3 -0
- package/components/Rating/types.d.ts +28 -0
- package/components/Screen/Screen.vue.d.ts +38 -12
- package/components/Screen/Screen.vue.js +400 -304
- package/components/Screen/components/ScreenToolbar.vue.d.ts +62 -0
- package/components/Screen/components/ScreenToolbar.vue.js +116 -0
- package/components/Screen/components/ScreenToolbar.vue2.js +4 -0
- package/components/Screen/types.d.ts +9 -0
- package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
- package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +3 -1
- package/components/SidebarMenu/SidebarMenuItem.vue.js +198 -175
- package/components/Stats/StatItem.vue.js +212 -153
- package/components/Stats/Stats.vue.js +20 -20
- package/components/Stats/components/StatIconBox.vue.js +42 -42
- package/components/Stats/components/StatTrend.vue.js +20 -20
- package/components/Stats/types.d.ts +3 -1
- package/components/Timeline/Timeline.vue.js +21 -11
- package/components/Timeline/TimelineItem.vue.js +1 -1
- package/core/config.d.ts +10 -0
- package/core/config.js +11 -9
- package/index.d.ts +2 -0
- package/index.js +220 -214
- package/package.json +2 -1
- package/style.css +23 -17
- package/types/config.type.d.ts +2 -0
- package/types/list.type.d.ts +4 -0
- package/utils/functions.d.ts +9 -10
- package/utils/functions.js +78 -63
- package/utils/status.js +16 -16
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { $t as
|
|
3
|
-
import { formatCurrency as C } from "../../utils/functions.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as T, computed as w, openBlock as t, createElementBlock as o, normalizeStyle as $, normalizeClass as r, Fragment as k, createElementVNode as l, toDisplayString as c, unref as b, createBlock as n, withCtx as g, createCommentVNode as d } from "vue";
|
|
2
|
+
import { $t as x } from "../../utils/i18n.js";
|
|
3
|
+
import { formatCurrency as C, formatNumber as I } from "../../utils/functions.js";
|
|
4
|
+
import h from "./components/StatTrend.vue.js";
|
|
5
|
+
import S from "./components/StatIconBox.vue.js";
|
|
6
|
+
import v from "../Tooltip.vue.js";
|
|
7
|
+
import { configState as P } from "../../core/config.js";
|
|
8
|
+
const V = { class: "flex items-center justify-between w-full mt-1" }, M = {
|
|
7
9
|
key: 0,
|
|
8
10
|
class: "h-8 w-24 bg-gray-50 animate-pulse rounded-md"
|
|
9
|
-
},
|
|
11
|
+
}, E = {
|
|
10
12
|
key: 0,
|
|
11
13
|
class: "h-9 w-24 bg-gray-50 animate-pulse rounded-md"
|
|
12
|
-
},
|
|
14
|
+
}, D = {
|
|
13
15
|
key: 1,
|
|
14
16
|
class: "h-8 w-20 bg-gray-50 animate-pulse rounded-md mt-1"
|
|
15
|
-
},
|
|
17
|
+
}, L = {
|
|
16
18
|
key: 3,
|
|
17
19
|
class: "flex-1 flex flex-col justify-center min-w-0"
|
|
18
|
-
},
|
|
20
|
+
}, q = {
|
|
19
21
|
key: 0,
|
|
20
22
|
class: "h-9 w-24 bg-gray-50 animate-pulse rounded-md mt-0.5"
|
|
21
|
-
},
|
|
23
|
+
}, A = {
|
|
22
24
|
key: 1,
|
|
23
25
|
class: "h-6 w-5 bg-gray-50 animate-pulse rounded-sm shrink-0"
|
|
24
|
-
},
|
|
26
|
+
}, G = { class: "flex-1 flex flex-col justify-center min-w-0" }, H = { class: "flex items-baseline gap-2 mt-1" }, J = {
|
|
25
27
|
key: 0,
|
|
26
28
|
class: "h-8 w-24 bg-gray-50 animate-pulse rounded-md"
|
|
27
|
-
},
|
|
29
|
+
}, Y = /* @__PURE__ */ T({
|
|
28
30
|
__name: "StatItem",
|
|
29
31
|
props: {
|
|
30
32
|
item: {},
|
|
@@ -38,60 +40,69 @@ const j = { class: "flex items-center justify-between w-full mt-1" }, $ = {
|
|
|
38
40
|
iconBoxShape: { default: "rounded" },
|
|
39
41
|
iconBoxStyle: { default: "filled" }
|
|
40
42
|
},
|
|
41
|
-
setup(
|
|
42
|
-
const
|
|
43
|
-
function
|
|
44
|
-
|
|
43
|
+
setup(e) {
|
|
44
|
+
const i = e;
|
|
45
|
+
function s(a) {
|
|
46
|
+
const u = Number(a.value);
|
|
47
|
+
return a.isPrice ? C(u, { numberFormat: a.numberFormat || "compact", compactThreshold: a.compactThreshold }) : a.numberFormat ? I(u, { numberFormat: a.numberFormat, compactThreshold: a.compactThreshold }) : a.value;
|
|
45
48
|
}
|
|
46
|
-
const
|
|
47
|
-
const a =
|
|
49
|
+
const y = w(() => {
|
|
50
|
+
const a = Number(i.item.value) || 0;
|
|
51
|
+
if (!i.item.isPrice && !i.item.numberFormat || (i.item.numberFormat || (i.item.isPrice ? "compact" : "standard")) !== "compact") return !1;
|
|
52
|
+
const z = i.item.compactThreshold ?? P?.components?.price?.compactThreshold ?? 1e3;
|
|
53
|
+
return Math.abs(a) >= z;
|
|
54
|
+
}), f = w(() => {
|
|
55
|
+
const a = Number(i.item.value) || 0;
|
|
56
|
+
return i.item.isPrice ? C(a, { numberFormat: "standard" }) : i.item.numberFormat ? I(a, { numberFormat: "standard" }) : String(i.item.value);
|
|
57
|
+
}), F = w(() => {
|
|
58
|
+
const a = i.layout === "inline-label-value" ? "flex px-3.5 py-3" : i.layout === "centered-value-title" ? "flex px-1 py-1" : "flex p-3", u = {
|
|
48
59
|
"icon-left": "flex-row items-center gap-3 text-left",
|
|
49
60
|
"icon-right": "flex-row items-center justify-between gap-3 text-left",
|
|
50
61
|
"icon-top": "flex-col items-start gap-1 px-5! pt-2! text-left",
|
|
51
62
|
"title-top-icon-bottom-right": "flex-col items-start gap-0 text-left px-5! py-4!",
|
|
52
|
-
"centered-value-title": "flex-col items-center justify-center text-center gap-
|
|
63
|
+
"centered-value-title": "flex-col items-center justify-center text-center gap-0",
|
|
53
64
|
"floating-icon": "flex-col items-start gap-1 text-left relative",
|
|
54
65
|
"split-bar": "flex-row items-center gap-3 text-left border-l-4",
|
|
55
66
|
"inline-label-value": "flex-row items-center gap-2.5 text-left"
|
|
56
|
-
},
|
|
57
|
-
let
|
|
58
|
-
if (
|
|
59
|
-
|
|
67
|
+
}, z = u[i.layout] || u["icon-left"];
|
|
68
|
+
let m = "";
|
|
69
|
+
if (i.attached)
|
|
70
|
+
i.variant === "transparent" ? m = "border-b border-r border-transparent bg-transparent hover:bg-muted/30 transition-colors" : i.variant === "outline" ? m = "border-b border-r border-border bg-transparent hover:bg-muted/30 transition-colors" : m = "border-b border-r border-border bg-card hover:bg-muted/30 transition-colors";
|
|
60
71
|
else {
|
|
61
|
-
switch (
|
|
72
|
+
switch (i.variant) {
|
|
62
73
|
case "solid": {
|
|
63
|
-
const
|
|
64
|
-
primary: "bg-primary-light",
|
|
65
|
-
secondary: "bg-secondary",
|
|
66
|
-
success: "bg-success-light",
|
|
67
|
-
warning: "bg-warning-light",
|
|
68
|
-
danger: "bg-danger-light",
|
|
69
|
-
info: "bg-info-light"
|
|
74
|
+
const N = i.item.color || "primary", B = {
|
|
75
|
+
primary: "bg-primary-light dark:ring-1 dark:ring-inset dark:ring-primary/20",
|
|
76
|
+
secondary: "bg-secondary dark:ring-1 dark:ring-inset dark:ring-secondary-foreground/20",
|
|
77
|
+
success: "bg-success-light dark:ring-1 dark:ring-inset dark:ring-success/20",
|
|
78
|
+
warning: "bg-warning-light dark:ring-1 dark:ring-inset dark:ring-warning/20",
|
|
79
|
+
danger: "bg-danger-light dark:ring-1 dark:ring-inset dark:ring-danger/20",
|
|
80
|
+
info: "bg-info-light dark:ring-1 dark:ring-inset dark:ring-info/20"
|
|
70
81
|
};
|
|
71
|
-
|
|
82
|
+
m = `${B[N] || B.primary}`;
|
|
72
83
|
break;
|
|
73
84
|
}
|
|
74
85
|
case "outline":
|
|
75
|
-
|
|
86
|
+
m = "border border-border";
|
|
76
87
|
break;
|
|
77
88
|
case "shadow":
|
|
78
|
-
|
|
89
|
+
m = "bg-card shadow-md border border-border/50";
|
|
79
90
|
break;
|
|
80
91
|
case "transparent":
|
|
81
|
-
|
|
92
|
+
m = "bg-transparent";
|
|
82
93
|
break;
|
|
83
94
|
}
|
|
84
|
-
|
|
95
|
+
m += " rounded-lg";
|
|
85
96
|
}
|
|
86
|
-
return [a,
|
|
87
|
-
}),
|
|
88
|
-
if (
|
|
89
|
-
const a =
|
|
97
|
+
return [a, z, m].join(" ");
|
|
98
|
+
}), j = w(() => {
|
|
99
|
+
if (i.variant === "solid" && !i.attached) {
|
|
100
|
+
const a = i.item.color;
|
|
90
101
|
if (a && !["primary", "secondary", "success", "warning", "danger", "info"].includes(a))
|
|
91
102
|
return { backgroundColor: `${a}15` };
|
|
92
103
|
}
|
|
93
|
-
if (
|
|
94
|
-
const a =
|
|
104
|
+
if (i.layout === "split-bar") {
|
|
105
|
+
const a = i.item.color, u = {
|
|
95
106
|
primary: "var(--color-primary)",
|
|
96
107
|
secondary: "var(--color-secondary)",
|
|
97
108
|
success: "var(--color-success)",
|
|
@@ -100,157 +111,205 @@ const j = { class: "flex items-center justify-between w-full mt-1" }, $ = {
|
|
|
100
111
|
info: "var(--color-info)"
|
|
101
112
|
};
|
|
102
113
|
if (a)
|
|
103
|
-
return { borderLeftColor:
|
|
114
|
+
return { borderLeftColor: u[a] || a };
|
|
104
115
|
}
|
|
105
116
|
return {};
|
|
106
117
|
});
|
|
107
|
-
return (a,
|
|
108
|
-
class:
|
|
109
|
-
style:
|
|
118
|
+
return (a, u) => (t(), o("div", {
|
|
119
|
+
class: r(F.value),
|
|
120
|
+
style: $(j.value)
|
|
110
121
|
}, [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
class:
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
122
|
+
e.layout === "title-top-icon-bottom-right" ? (t(), o(k, { key: 0 }, [
|
|
123
|
+
l("h3", {
|
|
124
|
+
class: r(e.titleSize || "text-sm font-medium text-muted-foreground truncate w-full")
|
|
125
|
+
}, c(e.item.titleI18n ? b(x)(e.item.titleI18n) : e.item.title), 3),
|
|
126
|
+
l("div", V, [
|
|
127
|
+
l("div", null, [
|
|
128
|
+
e.loading ? (t(), o("div", M)) : (t(), n(v, {
|
|
118
129
|
key: 1,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
130
|
+
content: f.value,
|
|
131
|
+
disabled: !y.value
|
|
132
|
+
}, {
|
|
133
|
+
default: g(() => [
|
|
134
|
+
l("p", {
|
|
135
|
+
class: r(e.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
136
|
+
}, c(s(e.item)), 3)
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
}, 8, ["content", "disabled"])),
|
|
140
|
+
e.item.trend && !e.loading ? (t(), n(h, {
|
|
122
141
|
key: 2,
|
|
123
|
-
trend:
|
|
124
|
-
layout:
|
|
142
|
+
trend: e.item.trend,
|
|
143
|
+
layout: e.layout
|
|
125
144
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
126
145
|
]),
|
|
127
|
-
|
|
146
|
+
e.item.icon ? (t(), n(S, {
|
|
128
147
|
key: 0,
|
|
129
|
-
item:
|
|
130
|
-
variant:
|
|
131
|
-
layout:
|
|
132
|
-
attached:
|
|
133
|
-
"icon-box-shape":
|
|
134
|
-
"icon-box-style":
|
|
135
|
-
"icon-size":
|
|
148
|
+
item: e.item,
|
|
149
|
+
variant: e.variant,
|
|
150
|
+
layout: e.layout,
|
|
151
|
+
attached: e.attached,
|
|
152
|
+
"icon-box-shape": e.iconBoxShape,
|
|
153
|
+
"icon-box-style": e.iconBoxStyle,
|
|
154
|
+
"icon-size": e.iconSize
|
|
136
155
|
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0)
|
|
137
156
|
])
|
|
138
|
-
], 64)) :
|
|
139
|
-
|
|
157
|
+
], 64)) : e.layout === "centered-value-title" ? (t(), o(k, { key: 1 }, [
|
|
158
|
+
e.loading ? (t(), o("div", E)) : (t(), n(v, {
|
|
140
159
|
key: 1,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
160
|
+
content: f.value,
|
|
161
|
+
disabled: !y.value
|
|
162
|
+
}, {
|
|
163
|
+
default: g(() => [
|
|
164
|
+
l("p", {
|
|
165
|
+
class: r(e.valueSize || "text-3xl font-bold text-foreground")
|
|
166
|
+
}, c(s(e.item)), 3)
|
|
167
|
+
]),
|
|
168
|
+
_: 1
|
|
169
|
+
}, 8, ["content", "disabled"])),
|
|
170
|
+
l("h3", {
|
|
171
|
+
class: r(e.titleSize || "text-sm font-medium text-muted-foreground")
|
|
172
|
+
}, c(e.item.titleI18n ? b(x)(e.item.titleI18n) : e.item.title), 3),
|
|
173
|
+
e.item.trend && !e.loading ? (t(), n(h, {
|
|
147
174
|
key: 2,
|
|
148
|
-
trend:
|
|
149
|
-
layout:
|
|
175
|
+
trend: e.item.trend,
|
|
176
|
+
layout: e.layout
|
|
150
177
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
151
|
-
], 64)) :
|
|
152
|
-
|
|
178
|
+
], 64)) : e.layout === "floating-icon" ? (t(), o(k, { key: 2 }, [
|
|
179
|
+
e.item.icon ? (t(), n(S, {
|
|
153
180
|
key: 0,
|
|
154
|
-
item:
|
|
155
|
-
variant:
|
|
156
|
-
layout:
|
|
157
|
-
attached:
|
|
158
|
-
"icon-box-shape":
|
|
159
|
-
"icon-box-style":
|
|
160
|
-
"icon-size":
|
|
181
|
+
item: e.item,
|
|
182
|
+
variant: e.variant,
|
|
183
|
+
layout: e.layout,
|
|
184
|
+
attached: e.attached,
|
|
185
|
+
"icon-box-shape": e.iconBoxShape,
|
|
186
|
+
"icon-box-style": e.iconBoxStyle,
|
|
187
|
+
"icon-size": e.iconSize,
|
|
161
188
|
class: "absolute top-4 right-4"
|
|
162
189
|
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
|
|
163
|
-
|
|
164
|
-
class:
|
|
165
|
-
},
|
|
166
|
-
|
|
190
|
+
l("h3", {
|
|
191
|
+
class: r(e.titleSize || "text-sm font-medium text-muted-foreground truncate pr-12")
|
|
192
|
+
}, c(e.item.titleI18n ? b(x)(e.item.titleI18n) : e.item.title), 3),
|
|
193
|
+
e.loading ? (t(), o("div", D)) : (t(), n(v, {
|
|
167
194
|
key: 2,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
195
|
+
content: f.value,
|
|
196
|
+
disabled: !y.value
|
|
197
|
+
}, {
|
|
198
|
+
default: g(() => [
|
|
199
|
+
l("p", {
|
|
200
|
+
class: r(e.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
|
|
201
|
+
}, c(s(e.item)), 3)
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
}, 8, ["content", "disabled"])),
|
|
205
|
+
e.item.trend && !e.loading ? (t(), n(h, {
|
|
171
206
|
key: 3,
|
|
172
|
-
trend:
|
|
173
|
-
layout:
|
|
207
|
+
trend: e.item.trend,
|
|
208
|
+
layout: e.layout
|
|
174
209
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
175
|
-
], 64)) :
|
|
176
|
-
|
|
177
|
-
class:
|
|
178
|
-
|
|
210
|
+
], 64)) : e.layout === "split-bar" ? (t(), o("div", L, [
|
|
211
|
+
l("h3", {
|
|
212
|
+
class: r(
|
|
213
|
+
e.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
|
|
179
214
|
)
|
|
180
|
-
},
|
|
181
|
-
|
|
215
|
+
}, c(e.item.titleI18n ? b(x)(e.item.titleI18n) : e.item.title), 3),
|
|
216
|
+
e.loading ? (t(), o("div", q)) : (t(), n(v, {
|
|
182
217
|
key: 1,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
218
|
+
content: f.value,
|
|
219
|
+
disabled: !y.value
|
|
220
|
+
}, {
|
|
221
|
+
default: g(() => [
|
|
222
|
+
l("p", {
|
|
223
|
+
class: r(e.valueSize || "text-3xl font-black text-foreground truncate mt-0.5")
|
|
224
|
+
}, c(s(e.item)), 3)
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
}, 8, ["content", "disabled"])),
|
|
228
|
+
e.item.trend && !e.loading ? (t(), n(h, {
|
|
186
229
|
key: 2,
|
|
187
|
-
trend:
|
|
188
|
-
layout:
|
|
230
|
+
trend: e.item.trend,
|
|
231
|
+
layout: e.layout
|
|
189
232
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
190
|
-
])) :
|
|
191
|
-
|
|
233
|
+
])) : e.layout === "inline-label-value" ? (t(), o(k, { key: 4 }, [
|
|
234
|
+
e.item.icon ? (t(), n(S, {
|
|
192
235
|
key: 0,
|
|
193
|
-
item:
|
|
194
|
-
variant:
|
|
195
|
-
layout:
|
|
196
|
-
attached:
|
|
197
|
-
"icon-box-shape":
|
|
198
|
-
"icon-box-style":
|
|
199
|
-
"icon-size":
|
|
236
|
+
item: e.item,
|
|
237
|
+
variant: e.variant,
|
|
238
|
+
layout: e.layout,
|
|
239
|
+
attached: e.attached,
|
|
240
|
+
"icon-box-shape": e.iconBoxShape,
|
|
241
|
+
"icon-box-style": e.iconBoxStyle,
|
|
242
|
+
"icon-size": e.iconSize
|
|
200
243
|
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
|
|
201
|
-
|
|
202
|
-
class:
|
|
203
|
-
},
|
|
204
|
-
|
|
244
|
+
l("span", {
|
|
245
|
+
class: r([e.titleSize || "-text-fs-2 font-medium text-muted-foreground truncate", "flex-1 min-w-0"])
|
|
246
|
+
}, c(e.item.titleI18n ? b(x)(e.item.titleI18n) : e.item.title), 3),
|
|
247
|
+
e.loading ? (t(), o("div", A)) : (t(), n(v, {
|
|
205
248
|
key: 2,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
249
|
+
content: f.value,
|
|
250
|
+
disabled: !y.value
|
|
251
|
+
}, {
|
|
252
|
+
default: g(() => [
|
|
253
|
+
l("span", {
|
|
254
|
+
class: r(e.valueSize || "-text-fs-1 font-semibold text-foreground tabular-nums shrink-0")
|
|
255
|
+
}, c(s(e.item)), 3)
|
|
256
|
+
]),
|
|
257
|
+
_: 1
|
|
258
|
+
}, 8, ["content", "disabled"])),
|
|
259
|
+
e.item.trend && !e.loading ? (t(), n(h, {
|
|
209
260
|
key: 3,
|
|
210
|
-
trend:
|
|
211
|
-
layout:
|
|
261
|
+
trend: e.item.trend,
|
|
262
|
+
layout: e.layout
|
|
212
263
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
213
|
-
], 64)) : (
|
|
214
|
-
|
|
264
|
+
], 64)) : (t(), o(k, { key: 5 }, [
|
|
265
|
+
e.item.icon && e.layout !== "icon-right" ? (t(), n(S, {
|
|
215
266
|
key: 0,
|
|
216
|
-
item:
|
|
217
|
-
variant:
|
|
218
|
-
layout:
|
|
219
|
-
attached:
|
|
220
|
-
"icon-box-shape":
|
|
221
|
-
"icon-box-style":
|
|
222
|
-
"icon-size":
|
|
267
|
+
item: e.item,
|
|
268
|
+
variant: e.variant,
|
|
269
|
+
layout: e.layout,
|
|
270
|
+
attached: e.attached,
|
|
271
|
+
"icon-box-shape": e.iconBoxShape,
|
|
272
|
+
"icon-box-style": e.iconBoxStyle,
|
|
273
|
+
"icon-size": e.iconSize
|
|
223
274
|
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
class:
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
|
|
275
|
+
l("div", G, [
|
|
276
|
+
l("h3", {
|
|
277
|
+
class: r(e.titleSize || "text-sm font-medium text-muted-foreground truncate")
|
|
278
|
+
}, c(e.item.titleI18n ? b(x)(e.item.titleI18n) : e.item.title), 3),
|
|
279
|
+
l("div", H, [
|
|
280
|
+
e.loading ? (t(), o("div", J)) : (t(), n(v, {
|
|
230
281
|
key: 1,
|
|
231
|
-
|
|
232
|
-
|
|
282
|
+
content: f.value,
|
|
283
|
+
disabled: !y.value
|
|
284
|
+
}, {
|
|
285
|
+
default: g(() => [
|
|
286
|
+
l("p", {
|
|
287
|
+
class: r(e.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
288
|
+
}, c(s(e.item)), 3)
|
|
289
|
+
]),
|
|
290
|
+
_: 1
|
|
291
|
+
}, 8, ["content", "disabled"]))
|
|
233
292
|
]),
|
|
234
|
-
|
|
293
|
+
e.item.trend && !e.loading ? (t(), n(h, {
|
|
235
294
|
key: 0,
|
|
236
|
-
trend:
|
|
237
|
-
layout:
|
|
295
|
+
trend: e.item.trend,
|
|
296
|
+
layout: e.layout
|
|
238
297
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
239
298
|
]),
|
|
240
|
-
|
|
299
|
+
e.item.icon && e.layout === "icon-right" ? (t(), n(S, {
|
|
241
300
|
key: 1,
|
|
242
|
-
item:
|
|
243
|
-
variant:
|
|
244
|
-
layout:
|
|
245
|
-
attached:
|
|
246
|
-
"icon-box-shape":
|
|
247
|
-
"icon-box-style":
|
|
248
|
-
"icon-size":
|
|
301
|
+
item: e.item,
|
|
302
|
+
variant: e.variant,
|
|
303
|
+
layout: e.layout,
|
|
304
|
+
attached: e.attached,
|
|
305
|
+
"icon-box-shape": e.iconBoxShape,
|
|
306
|
+
"icon-box-style": e.iconBoxStyle,
|
|
307
|
+
"icon-size": e.iconSize
|
|
249
308
|
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0)
|
|
250
309
|
], 64))
|
|
251
310
|
], 6));
|
|
252
311
|
}
|
|
253
312
|
});
|
|
254
313
|
export {
|
|
255
|
-
|
|
314
|
+
Y as default
|
|
256
315
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as s, computed as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as s, computed as n, openBlock as l, createElementBlock as r, normalizeClass as u, Fragment as g, renderList as f, createBlock as m } from "vue";
|
|
2
|
+
import v from "./StatItem.vue.js";
|
|
3
|
+
const x = /* @__PURE__ */ s({
|
|
4
4
|
__name: "Stats",
|
|
5
5
|
props: {
|
|
6
6
|
items: {},
|
|
@@ -17,32 +17,32 @@ const z = /* @__PURE__ */ s({
|
|
|
17
17
|
class: { default: "" }
|
|
18
18
|
},
|
|
19
19
|
setup(e) {
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
return
|
|
23
|
-
}), d =
|
|
24
|
-
const
|
|
20
|
+
const t = e, o = n(() => {
|
|
21
|
+
const a = Number(t.columns) || 4;
|
|
22
|
+
return a === 1 ? "grid-cols-1" : a === 2 ? "grid-cols-1 sm:grid-cols-2" : a === 3 ? "grid-cols-1 sm:grid-cols-3" : a === 4 ? "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4" : a === 5 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-5" : a === 6 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-6" : "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";
|
|
23
|
+
}), d = n(() => {
|
|
24
|
+
const a = t.attached && t.variant !== "transparent" ? "border-t border-l border-border overflow-hidden" : "overflow-hidden";
|
|
25
25
|
return [
|
|
26
26
|
"grid",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
o.value,
|
|
28
|
+
t.attached ? `gap-0 ${a}` : t.variant === "transparent-header" ? "gap-2 md:gap-3.5" : "gap-3 sm:gap-4.5",
|
|
29
|
+
t.variant === "shadow" && t.attached ? "shadow-md" : "",
|
|
30
|
+
t?.layout === "inline-label-value" ? "rounded-sm" : "",
|
|
31
|
+
t.class
|
|
32
32
|
].join(" ");
|
|
33
33
|
});
|
|
34
|
-
return (
|
|
34
|
+
return (a, S) => (l(), r("div", {
|
|
35
35
|
class: u(d.value)
|
|
36
36
|
}, [
|
|
37
|
-
(l(!0),
|
|
37
|
+
(l(!0), r(g, null, f(e.items, (i, c) => (l(), m(v, {
|
|
38
38
|
key: i.id || c,
|
|
39
39
|
item: i,
|
|
40
|
-
variant: e.variant,
|
|
41
|
-
layout: e.layout,
|
|
40
|
+
variant: e.variant.startsWith("transparent") ? "transparent" : e.variant,
|
|
41
|
+
layout: e.variant === "transparent-header" ? "centered-value-title" : e.layout,
|
|
42
42
|
attached: e.attached,
|
|
43
43
|
loading: e.loading,
|
|
44
|
-
titleSize: e.titleSize,
|
|
45
|
-
valueSize: e.valueSize,
|
|
44
|
+
titleSize: e.variant === "transparent-header" && !e.titleSize ? "text-sm font-normal! text-gray-900" : e.titleSize,
|
|
45
|
+
valueSize: e.variant === "transparent-header" && !e.valueSize ? "text-lg font-bold text-gray-900" : e.valueSize,
|
|
46
46
|
iconSize: e.iconSize,
|
|
47
47
|
iconBoxShape: e.iconBoxShape,
|
|
48
48
|
iconBoxStyle: e.iconBoxStyle
|
|
@@ -51,5 +51,5 @@ const z = /* @__PURE__ */ s({
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
export {
|
|
54
|
-
|
|
54
|
+
x as default
|
|
55
55
|
};
|