vlite3 1.4.19 → 1.4.20
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/CategoryManager/CategoryManager.vue2.js +3 -3
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
- package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +3 -3
- package/components/Stats/StatItem.vue.js +122 -122
- package/components/Stats/Stats.vue.js +47 -47
- package/components/Stats/components/StatIconBox.vue.js +1 -1
- package/components/Stats/components/StatTrend.vue.js +17 -17
- package/components/Stats/types.d.ts +1 -1
- package/package.json +1 -1
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
- /package/components/Dropdown/{DropdownMenu.vue3.js → DropdownMenu.vue2.js} +0 -0
- /package/components/RichTextEditor/{RichTextLinkPopover.vue2.js → RichTextLinkPopover.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue2.js → RichTextToolbar.vue.js} +0 -0
|
@@ -17,13 +17,13 @@ import "v-datepicker-lite";
|
|
|
17
17
|
import "v-datepicker-lite/style.css";
|
|
18
18
|
import "@jaames/iro";
|
|
19
19
|
import "@vueuse/core";
|
|
20
|
-
/* empty css
|
|
20
|
+
/* empty css */
|
|
21
21
|
import qe from "../IconPicker.vue.js";
|
|
22
22
|
/* empty css */
|
|
23
23
|
/* empty css */
|
|
24
24
|
/* empty css */
|
|
25
|
-
/* empty css
|
|
26
|
-
/* empty css
|
|
25
|
+
/* empty css */
|
|
26
|
+
/* empty css */
|
|
27
27
|
import "../../core/config.js";
|
|
28
28
|
/* empty css */
|
|
29
29
|
/* empty css */
|
|
@@ -7,8 +7,8 @@ import "../../core/config.js";
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
import E from "../Button.vue.js";
|
|
10
|
-
import _ from "./ColorIro.
|
|
11
|
-
/* empty css
|
|
10
|
+
import _ from "./ColorIro.vue2.js";
|
|
11
|
+
/* empty css */
|
|
12
12
|
import { useEyeDropper as I } from "@vueuse/core";
|
|
13
13
|
const N = { class: "absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center z-20 pointer-events-none" }, j = {
|
|
14
14
|
key: 0,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as te, ref as v, shallowRef as ne, watch as oe, computed as h, onMounted as le, onUnmounted as ae, openBlock as C, createElementBlock as L, normalizeClass as re, toDisplayString as I, createCommentVNode as U, createElementVNode as w, createVNode as q, unref as a, normalizeStyle as ie } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import se from "./RichTextToolbar.
|
|
4
|
-
/* empty css
|
|
5
|
-
import de from "./RichTextLinkPopover.
|
|
6
|
-
/* empty css
|
|
3
|
+
import se from "./RichTextToolbar.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import de from "./RichTextLinkPopover.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
7
|
import { useRichTextImageUpload as ue } from "./composables/useRichTextImageUpload.js";
|
|
8
8
|
import { useRichTextLinks as ce } from "./composables/useRichTextLinks.js";
|
|
9
9
|
const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { class: "rte-wrapper" }, ye = { class: "rte-body-wrap" }, ge = ["id", "contenteditable", "aria-label", "aria-readonly", "aria-disabled", "aria-invalid"], be = ["id"], Se = /* @__PURE__ */ te({
|
|
@@ -15,14 +15,14 @@ import "v-datepicker-lite";
|
|
|
15
15
|
import "v-datepicker-lite/style.css";
|
|
16
16
|
import "@jaames/iro";
|
|
17
17
|
import "@vueuse/core";
|
|
18
|
-
/* empty css
|
|
18
|
+
/* empty css */
|
|
19
19
|
import "iconify-icon-picker";
|
|
20
20
|
import "iconify-icon-picker/style.css";
|
|
21
21
|
/* empty css */
|
|
22
22
|
/* empty css */
|
|
23
23
|
/* empty css */
|
|
24
|
-
/* empty css
|
|
25
|
-
/* empty css
|
|
24
|
+
/* empty css */
|
|
25
|
+
/* empty css */
|
|
26
26
|
import "../../core/config.js";
|
|
27
27
|
/* empty css */
|
|
28
28
|
/* empty css */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as T, computed as w, openBlock as
|
|
1
|
+
import { defineComponent as T, computed as w, openBlock as e, createElementBlock as o, normalizeStyle as $, normalizeClass as r, Fragment as k, createElementVNode as l, toDisplayString as c, unref as b, createBlock as i, withCtx as g, createCommentVNode as d } from "vue";
|
|
2
2
|
import { $t as x } from "../../utils/i18n.js";
|
|
3
3
|
import { formatCurrency as C, formatNumber as I } from "../../utils/functions.js";
|
|
4
4
|
import h from "./components/StatTrend.vue.js";
|
|
@@ -31,7 +31,7 @@ const V = { class: "flex items-center justify-between w-full mt-1" }, M = {
|
|
|
31
31
|
props: {
|
|
32
32
|
item: {},
|
|
33
33
|
variant: { default: "outline" },
|
|
34
|
-
layout: { default: "
|
|
34
|
+
layout: { default: "layout-1" },
|
|
35
35
|
attached: { type: Boolean, default: !1 },
|
|
36
36
|
loading: { type: Boolean, default: !1 },
|
|
37
37
|
titleSize: { default: "" },
|
|
@@ -40,38 +40,38 @@ const V = { class: "flex items-center justify-between w-full mt-1" }, M = {
|
|
|
40
40
|
iconBoxShape: { default: "rounded" },
|
|
41
41
|
iconBoxStyle: { default: "filled" }
|
|
42
42
|
},
|
|
43
|
-
setup(
|
|
44
|
-
const
|
|
43
|
+
setup(t) {
|
|
44
|
+
const n = t;
|
|
45
45
|
function s(a) {
|
|
46
46
|
const u = Number(a.value);
|
|
47
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;
|
|
48
48
|
}
|
|
49
49
|
const y = w(() => {
|
|
50
|
-
const a = Number(
|
|
51
|
-
if (!
|
|
52
|
-
const z =
|
|
50
|
+
const a = Number(n.item.value) || 0;
|
|
51
|
+
if (!n.item.isPrice && !n.item.numberFormat || (n.item.numberFormat || (n.item.isPrice ? "compact" : "standard")) !== "compact") return !1;
|
|
52
|
+
const z = n.item.compactThreshold ?? P?.components?.price?.compactThreshold ?? 1e3;
|
|
53
53
|
return Math.abs(a) >= z;
|
|
54
54
|
}), f = w(() => {
|
|
55
|
-
const a = Number(
|
|
56
|
-
return
|
|
55
|
+
const a = Number(n.item.value) || 0;
|
|
56
|
+
return n.item.isPrice ? C(a, { numberFormat: "standard" }) : n.item.numberFormat ? I(a, { numberFormat: "standard" }) : String(n.item.value);
|
|
57
57
|
}), F = w(() => {
|
|
58
|
-
const a =
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
}, z = u[
|
|
58
|
+
const a = n.layout === "layout-8" ? "flex px-3.5 py-3" : n.layout === "layout-5" ? "flex px-1 py-1" : "flex p-3", u = {
|
|
59
|
+
"layout-1": "flex-row items-center gap-3 text-left",
|
|
60
|
+
"layout-2": "flex-row items-center justify-between gap-3 text-left",
|
|
61
|
+
"layout-3": "flex-col items-start gap-1 px-5! pt-2! text-left",
|
|
62
|
+
"layout-4": "flex-col items-start gap-0 text-left px-5! py-4!",
|
|
63
|
+
"layout-5": "flex-col items-center justify-center text-center gap-0",
|
|
64
|
+
"layout-6": "flex-col items-start gap-1 text-left relative",
|
|
65
|
+
"layout-7": "flex-row items-center gap-3 text-left border-l-4",
|
|
66
|
+
"layout-8": "flex-row items-center gap-2.5 text-left"
|
|
67
|
+
}, z = u[n.layout] || u["layout-1"];
|
|
68
68
|
let m = "";
|
|
69
|
-
if (
|
|
70
|
-
|
|
69
|
+
if (n.attached)
|
|
70
|
+
n.variant === "transparent" ? m = "border-b border-r border-transparent bg-transparent hover:bg-muted/30 transition-colors" : n.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";
|
|
71
71
|
else {
|
|
72
|
-
switch (
|
|
72
|
+
switch (n.variant) {
|
|
73
73
|
case "solid": {
|
|
74
|
-
const N =
|
|
74
|
+
const N = n.item.color || "primary", B = {
|
|
75
75
|
primary: "bg-primary-light dark:ring-1 dark:ring-inset dark:ring-primary/20",
|
|
76
76
|
secondary: "bg-secondary dark:ring-1 dark:ring-inset dark:ring-secondary-foreground/20",
|
|
77
77
|
success: "bg-success-light dark:ring-1 dark:ring-inset dark:ring-success/20",
|
|
@@ -96,13 +96,13 @@ const V = { class: "flex items-center justify-between w-full mt-1" }, M = {
|
|
|
96
96
|
}
|
|
97
97
|
return [a, z, m].join(" ");
|
|
98
98
|
}), j = w(() => {
|
|
99
|
-
if (
|
|
100
|
-
const a =
|
|
99
|
+
if (n.variant === "solid" && !n.attached) {
|
|
100
|
+
const a = n.item.color;
|
|
101
101
|
if (a && !["primary", "secondary", "success", "warning", "danger", "info"].includes(a))
|
|
102
102
|
return { backgroundColor: `${a}15` };
|
|
103
103
|
}
|
|
104
|
-
if (
|
|
105
|
-
const a =
|
|
104
|
+
if (n.layout === "layout-7") {
|
|
105
|
+
const a = n.item.color, u = {
|
|
106
106
|
primary: "var(--color-primary)",
|
|
107
107
|
secondary: "var(--color-secondary)",
|
|
108
108
|
success: "var(--color-success)",
|
|
@@ -115,196 +115,196 @@ const V = { class: "flex items-center justify-between w-full mt-1" }, M = {
|
|
|
115
115
|
}
|
|
116
116
|
return {};
|
|
117
117
|
});
|
|
118
|
-
return (a, u) => (
|
|
118
|
+
return (a, u) => (e(), o("div", {
|
|
119
119
|
class: r(F.value),
|
|
120
120
|
style: $(j.value)
|
|
121
121
|
}, [
|
|
122
|
-
|
|
122
|
+
t.layout === "layout-4" ? (e(), o(k, { key: 0 }, [
|
|
123
123
|
l("h3", {
|
|
124
|
-
class: r(
|
|
125
|
-
}, c(
|
|
124
|
+
class: r(t.titleSize || "text-sm font-medium text-muted-foreground truncate w-full")
|
|
125
|
+
}, c(t.item.titleI18n ? b(x)(t.item.titleI18n) : t.item.title), 3),
|
|
126
126
|
l("div", V, [
|
|
127
127
|
l("div", null, [
|
|
128
|
-
|
|
128
|
+
t.loading ? (e(), o("div", M)) : (e(), i(v, {
|
|
129
129
|
key: 1,
|
|
130
130
|
content: f.value,
|
|
131
131
|
disabled: !y.value
|
|
132
132
|
}, {
|
|
133
133
|
default: g(() => [
|
|
134
134
|
l("p", {
|
|
135
|
-
class: r(
|
|
136
|
-
}, c(s(
|
|
135
|
+
class: r(t.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
136
|
+
}, c(s(t.item)), 3)
|
|
137
137
|
]),
|
|
138
138
|
_: 1
|
|
139
139
|
}, 8, ["content", "disabled"])),
|
|
140
|
-
|
|
140
|
+
t.item.trend && !t.loading ? (e(), i(h, {
|
|
141
141
|
key: 2,
|
|
142
|
-
trend:
|
|
143
|
-
layout:
|
|
142
|
+
trend: t.item.trend,
|
|
143
|
+
layout: t.layout
|
|
144
144
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
145
145
|
]),
|
|
146
|
-
|
|
146
|
+
t.item.icon ? (e(), i(S, {
|
|
147
147
|
key: 0,
|
|
148
|
-
item:
|
|
149
|
-
variant:
|
|
150
|
-
layout:
|
|
151
|
-
attached:
|
|
152
|
-
"icon-box-shape":
|
|
153
|
-
"icon-box-style":
|
|
154
|
-
"icon-size":
|
|
148
|
+
item: t.item,
|
|
149
|
+
variant: t.variant,
|
|
150
|
+
layout: t.layout,
|
|
151
|
+
attached: t.attached,
|
|
152
|
+
"icon-box-shape": t.iconBoxShape,
|
|
153
|
+
"icon-box-style": t.iconBoxStyle,
|
|
154
|
+
"icon-size": t.iconSize
|
|
155
155
|
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0)
|
|
156
156
|
])
|
|
157
|
-
], 64)) :
|
|
158
|
-
|
|
157
|
+
], 64)) : t.layout === "layout-5" ? (e(), o(k, { key: 1 }, [
|
|
158
|
+
t.loading ? (e(), o("div", E)) : (e(), i(v, {
|
|
159
159
|
key: 1,
|
|
160
160
|
content: f.value,
|
|
161
161
|
disabled: !y.value
|
|
162
162
|
}, {
|
|
163
163
|
default: g(() => [
|
|
164
164
|
l("p", {
|
|
165
|
-
class: r(
|
|
166
|
-
}, c(s(
|
|
165
|
+
class: r(t.valueSize || "text-3xl font-bold text-foreground")
|
|
166
|
+
}, c(s(t.item)), 3)
|
|
167
167
|
]),
|
|
168
168
|
_: 1
|
|
169
169
|
}, 8, ["content", "disabled"])),
|
|
170
170
|
l("h3", {
|
|
171
|
-
class: r(
|
|
172
|
-
}, c(
|
|
173
|
-
|
|
171
|
+
class: r(t.titleSize || "text-sm font-medium text-muted-foreground")
|
|
172
|
+
}, c(t.item.titleI18n ? b(x)(t.item.titleI18n) : t.item.title), 3),
|
|
173
|
+
t.item.trend && !t.loading ? (e(), i(h, {
|
|
174
174
|
key: 2,
|
|
175
|
-
trend:
|
|
176
|
-
layout:
|
|
175
|
+
trend: t.item.trend,
|
|
176
|
+
layout: t.layout
|
|
177
177
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
178
|
-
], 64)) :
|
|
179
|
-
|
|
178
|
+
], 64)) : t.layout === "layout-6" ? (e(), o(k, { key: 2 }, [
|
|
179
|
+
t.item.icon ? (e(), i(S, {
|
|
180
180
|
key: 0,
|
|
181
|
-
item:
|
|
182
|
-
variant:
|
|
183
|
-
layout:
|
|
184
|
-
attached:
|
|
185
|
-
"icon-box-shape":
|
|
186
|
-
"icon-box-style":
|
|
187
|
-
"icon-size":
|
|
181
|
+
item: t.item,
|
|
182
|
+
variant: t.variant,
|
|
183
|
+
layout: t.layout,
|
|
184
|
+
attached: t.attached,
|
|
185
|
+
"icon-box-shape": t.iconBoxShape,
|
|
186
|
+
"icon-box-style": t.iconBoxStyle,
|
|
187
|
+
"icon-size": t.iconSize,
|
|
188
188
|
class: "absolute top-4 right-4"
|
|
189
189
|
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
|
|
190
190
|
l("h3", {
|
|
191
|
-
class: r(
|
|
192
|
-
}, c(
|
|
193
|
-
|
|
191
|
+
class: r(t.titleSize || "text-sm font-medium text-muted-foreground truncate pr-12")
|
|
192
|
+
}, c(t.item.titleI18n ? b(x)(t.item.titleI18n) : t.item.title), 3),
|
|
193
|
+
t.loading ? (e(), o("div", D)) : (e(), i(v, {
|
|
194
194
|
key: 2,
|
|
195
195
|
content: f.value,
|
|
196
196
|
disabled: !y.value
|
|
197
197
|
}, {
|
|
198
198
|
default: g(() => [
|
|
199
199
|
l("p", {
|
|
200
|
-
class: r(
|
|
201
|
-
}, c(s(
|
|
200
|
+
class: r(t.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
|
|
201
|
+
}, c(s(t.item)), 3)
|
|
202
202
|
]),
|
|
203
203
|
_: 1
|
|
204
204
|
}, 8, ["content", "disabled"])),
|
|
205
|
-
|
|
205
|
+
t.item.trend && !t.loading ? (e(), i(h, {
|
|
206
206
|
key: 3,
|
|
207
|
-
trend:
|
|
208
|
-
layout:
|
|
207
|
+
trend: t.item.trend,
|
|
208
|
+
layout: t.layout
|
|
209
209
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
210
|
-
], 64)) :
|
|
210
|
+
], 64)) : t.layout === "layout-7" ? (e(), o("div", L, [
|
|
211
211
|
l("h3", {
|
|
212
212
|
class: r(
|
|
213
|
-
|
|
213
|
+
t.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
|
|
214
214
|
)
|
|
215
|
-
}, c(
|
|
216
|
-
|
|
215
|
+
}, c(t.item.titleI18n ? b(x)(t.item.titleI18n) : t.item.title), 3),
|
|
216
|
+
t.loading ? (e(), o("div", q)) : (e(), i(v, {
|
|
217
217
|
key: 1,
|
|
218
218
|
content: f.value,
|
|
219
219
|
disabled: !y.value
|
|
220
220
|
}, {
|
|
221
221
|
default: g(() => [
|
|
222
222
|
l("p", {
|
|
223
|
-
class: r(
|
|
224
|
-
}, c(s(
|
|
223
|
+
class: r(t.valueSize || "text-3xl font-black text-foreground truncate mt-0.5")
|
|
224
|
+
}, c(s(t.item)), 3)
|
|
225
225
|
]),
|
|
226
226
|
_: 1
|
|
227
227
|
}, 8, ["content", "disabled"])),
|
|
228
|
-
|
|
228
|
+
t.item.trend && !t.loading ? (e(), i(h, {
|
|
229
229
|
key: 2,
|
|
230
|
-
trend:
|
|
231
|
-
layout:
|
|
230
|
+
trend: t.item.trend,
|
|
231
|
+
layout: t.layout
|
|
232
232
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
233
|
-
])) :
|
|
234
|
-
|
|
233
|
+
])) : t.layout === "layout-8" ? (e(), o(k, { key: 4 }, [
|
|
234
|
+
t.item.icon ? (e(), i(S, {
|
|
235
235
|
key: 0,
|
|
236
|
-
item:
|
|
237
|
-
variant:
|
|
238
|
-
layout:
|
|
239
|
-
attached:
|
|
240
|
-
"icon-box-shape":
|
|
241
|
-
"icon-box-style":
|
|
242
|
-
"icon-size":
|
|
236
|
+
item: t.item,
|
|
237
|
+
variant: t.variant,
|
|
238
|
+
layout: t.layout,
|
|
239
|
+
attached: t.attached,
|
|
240
|
+
"icon-box-shape": t.iconBoxShape,
|
|
241
|
+
"icon-box-style": t.iconBoxStyle,
|
|
242
|
+
"icon-size": t.iconSize
|
|
243
243
|
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
|
|
244
244
|
l("span", {
|
|
245
|
-
class: r([
|
|
246
|
-
}, c(
|
|
247
|
-
|
|
245
|
+
class: r([t.titleSize || "-text-fs-2 font-medium text-muted-foreground truncate", "flex-1 min-w-0"])
|
|
246
|
+
}, c(t.item.titleI18n ? b(x)(t.item.titleI18n) : t.item.title), 3),
|
|
247
|
+
t.loading ? (e(), o("div", A)) : (e(), i(v, {
|
|
248
248
|
key: 2,
|
|
249
249
|
content: f.value,
|
|
250
250
|
disabled: !y.value
|
|
251
251
|
}, {
|
|
252
252
|
default: g(() => [
|
|
253
253
|
l("span", {
|
|
254
|
-
class: r(
|
|
255
|
-
}, c(s(
|
|
254
|
+
class: r(t.valueSize || "-text-fs-1 font-semibold text-foreground tabular-nums shrink-0")
|
|
255
|
+
}, c(s(t.item)), 3)
|
|
256
256
|
]),
|
|
257
257
|
_: 1
|
|
258
258
|
}, 8, ["content", "disabled"])),
|
|
259
|
-
|
|
259
|
+
t.item.trend && !t.loading ? (e(), i(h, {
|
|
260
260
|
key: 3,
|
|
261
|
-
trend:
|
|
262
|
-
layout:
|
|
261
|
+
trend: t.item.trend,
|
|
262
|
+
layout: t.layout
|
|
263
263
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
264
|
-
], 64)) : (
|
|
265
|
-
|
|
264
|
+
], 64)) : (e(), o(k, { key: 5 }, [
|
|
265
|
+
t.item.icon && t.layout !== "layout-2" ? (e(), i(S, {
|
|
266
266
|
key: 0,
|
|
267
|
-
item:
|
|
268
|
-
variant:
|
|
269
|
-
layout:
|
|
270
|
-
attached:
|
|
271
|
-
"icon-box-shape":
|
|
272
|
-
"icon-box-style":
|
|
273
|
-
"icon-size":
|
|
267
|
+
item: t.item,
|
|
268
|
+
variant: t.variant,
|
|
269
|
+
layout: t.layout,
|
|
270
|
+
attached: t.attached,
|
|
271
|
+
"icon-box-shape": t.iconBoxShape,
|
|
272
|
+
"icon-box-style": t.iconBoxStyle,
|
|
273
|
+
"icon-size": t.iconSize
|
|
274
274
|
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
|
|
275
275
|
l("div", G, [
|
|
276
276
|
l("h3", {
|
|
277
|
-
class: r(
|
|
278
|
-
}, c(
|
|
277
|
+
class: r(t.titleSize || "text-sm font-medium text-muted-foreground truncate")
|
|
278
|
+
}, c(t.item.titleI18n ? b(x)(t.item.titleI18n) : t.item.title), 3),
|
|
279
279
|
l("div", H, [
|
|
280
|
-
|
|
280
|
+
t.loading ? (e(), o("div", J)) : (e(), i(v, {
|
|
281
281
|
key: 1,
|
|
282
282
|
content: f.value,
|
|
283
283
|
disabled: !y.value
|
|
284
284
|
}, {
|
|
285
285
|
default: g(() => [
|
|
286
286
|
l("p", {
|
|
287
|
-
class: r(
|
|
288
|
-
}, c(s(
|
|
287
|
+
class: r(t.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
288
|
+
}, c(s(t.item)), 3)
|
|
289
289
|
]),
|
|
290
290
|
_: 1
|
|
291
291
|
}, 8, ["content", "disabled"]))
|
|
292
292
|
]),
|
|
293
|
-
|
|
293
|
+
t.item.trend && !t.loading ? (e(), i(h, {
|
|
294
294
|
key: 0,
|
|
295
|
-
trend:
|
|
296
|
-
layout:
|
|
295
|
+
trend: t.item.trend,
|
|
296
|
+
layout: t.layout
|
|
297
297
|
}, null, 8, ["trend", "layout"])) : d("", !0)
|
|
298
298
|
]),
|
|
299
|
-
|
|
299
|
+
t.item.icon && t.layout === "layout-2" ? (e(), i(S, {
|
|
300
300
|
key: 1,
|
|
301
|
-
item:
|
|
302
|
-
variant:
|
|
303
|
-
layout:
|
|
304
|
-
attached:
|
|
305
|
-
"icon-box-shape":
|
|
306
|
-
"icon-box-style":
|
|
307
|
-
"icon-size":
|
|
301
|
+
item: t.item,
|
|
302
|
+
variant: t.variant,
|
|
303
|
+
layout: t.layout,
|
|
304
|
+
attached: t.attached,
|
|
305
|
+
"icon-box-shape": t.iconBoxShape,
|
|
306
|
+
"icon-box-style": t.iconBoxStyle,
|
|
307
|
+
"icon-size": t.iconSize
|
|
308
308
|
}, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0)
|
|
309
309
|
], 64))
|
|
310
310
|
], 6));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as y, computed as l, openBlock as i, createElementBlock as r, normalizeClass as d, createElementVNode as h, Fragment as u, renderList as s, createBlock as g } from "vue";
|
|
2
|
+
import S from "./StatItem.vue.js";
|
|
3
|
+
const C = /* @__PURE__ */ y({
|
|
4
4
|
__name: "Stats",
|
|
5
5
|
props: {
|
|
6
6
|
items: {},
|
|
7
7
|
variant: { default: "outline" },
|
|
8
|
-
layout: { default: "
|
|
8
|
+
layout: { default: "layout-1" },
|
|
9
9
|
columns: { default: 4 },
|
|
10
10
|
attached: { type: Boolean, default: !1 },
|
|
11
11
|
loading: { type: Boolean, default: !1 },
|
|
@@ -16,68 +16,68 @@ const b = /* @__PURE__ */ h({
|
|
|
16
16
|
iconBoxStyle: { default: "filled" },
|
|
17
17
|
class: { default: "" }
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
return
|
|
23
|
-
}),
|
|
19
|
+
setup(a) {
|
|
20
|
+
const t = a, c = l(() => {
|
|
21
|
+
const e = Number(t.columns) || 4;
|
|
22
|
+
return e === 1 ? "grid-cols-1" : e === 2 ? "grid-cols-1 sm:grid-cols-2" : e === 3 ? "grid-cols-1 sm:grid-cols-3" : e === 4 ? "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4" : e === 5 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-5" : e === 6 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-6" : "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";
|
|
23
|
+
}), m = l(() => [
|
|
24
24
|
"grid",
|
|
25
25
|
c.value,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
].join(" ")),
|
|
30
|
-
|
|
26
|
+
t.variant === "transparent-header" ? "gap-2 md:gap-3.5" : "gap-3 sm:gap-4.5",
|
|
27
|
+
t?.layout === "layout-8" ? "rounded-sm" : "",
|
|
28
|
+
t.class
|
|
29
|
+
].join(" ")), v = l(() => [
|
|
30
|
+
t.layout === "layout-8" ? "rounded-sm" : "rounded-lg",
|
|
31
31
|
"overflow-hidden",
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
].join(" ")), f =
|
|
32
|
+
t.variant !== "transparent" ? "border border-border" : "",
|
|
33
|
+
t.variant === "shadow" ? "shadow-md bg-card" : "",
|
|
34
|
+
t.class
|
|
35
|
+
].join(" ")), f = l(() => [
|
|
36
36
|
"grid",
|
|
37
37
|
c.value,
|
|
38
38
|
"w-[calc(100%+1px)] -mb-px -mr-px gap-0"
|
|
39
39
|
].join(" "));
|
|
40
|
-
return (
|
|
40
|
+
return (e, x) => a.attached ? (i(), r("div", {
|
|
41
41
|
key: 0,
|
|
42
|
-
class: d(
|
|
42
|
+
class: d(v.value)
|
|
43
43
|
}, [
|
|
44
|
-
|
|
44
|
+
h("div", {
|
|
45
45
|
class: d(f.value)
|
|
46
46
|
}, [
|
|
47
|
-
(i(!0), r(u, null, s(
|
|
48
|
-
key:
|
|
49
|
-
item:
|
|
50
|
-
variant:
|
|
51
|
-
layout:
|
|
52
|
-
attached:
|
|
53
|
-
loading:
|
|
54
|
-
titleSize:
|
|
55
|
-
valueSize:
|
|
56
|
-
iconSize:
|
|
57
|
-
iconBoxShape:
|
|
58
|
-
iconBoxStyle:
|
|
47
|
+
(i(!0), r(u, null, s(a.items, (n, o) => (i(), g(S, {
|
|
48
|
+
key: n.id || o,
|
|
49
|
+
item: n,
|
|
50
|
+
variant: a.variant.startsWith("transparent") ? "transparent" : a.variant,
|
|
51
|
+
layout: a.variant === "transparent-header" ? "layout-5" : a.layout,
|
|
52
|
+
attached: a.attached,
|
|
53
|
+
loading: a.loading,
|
|
54
|
+
titleSize: a.variant === "transparent-header" && !a.titleSize ? "text-sm font-normal! text-gray-900" : a.titleSize,
|
|
55
|
+
valueSize: a.variant === "transparent-header" && !a.valueSize ? "text-lg font-bold text-gray-900" : a.valueSize,
|
|
56
|
+
iconSize: a.iconSize,
|
|
57
|
+
iconBoxShape: a.iconBoxShape,
|
|
58
|
+
iconBoxStyle: a.iconBoxStyle
|
|
59
59
|
}, null, 8, ["item", "variant", "layout", "attached", "loading", "titleSize", "valueSize", "iconSize", "iconBoxShape", "iconBoxStyle"]))), 128))
|
|
60
60
|
], 2)
|
|
61
61
|
], 2)) : (i(), r("div", {
|
|
62
62
|
key: 1,
|
|
63
|
-
class: d(
|
|
63
|
+
class: d(m.value)
|
|
64
64
|
}, [
|
|
65
|
-
(i(!0), r(u, null, s(
|
|
66
|
-
key:
|
|
67
|
-
item:
|
|
68
|
-
variant:
|
|
69
|
-
layout:
|
|
70
|
-
attached:
|
|
71
|
-
loading:
|
|
72
|
-
titleSize:
|
|
73
|
-
valueSize:
|
|
74
|
-
iconSize:
|
|
75
|
-
iconBoxShape:
|
|
76
|
-
iconBoxStyle:
|
|
65
|
+
(i(!0), r(u, null, s(a.items, (n, o) => (i(), g(S, {
|
|
66
|
+
key: n.id || o,
|
|
67
|
+
item: n,
|
|
68
|
+
variant: a.variant.startsWith("transparent") ? "transparent" : a.variant,
|
|
69
|
+
layout: a.variant === "transparent-header" ? "layout-5" : a.layout,
|
|
70
|
+
attached: a.attached,
|
|
71
|
+
loading: a.loading,
|
|
72
|
+
titleSize: a.variant === "transparent-header" && !a.titleSize ? "text-sm font-normal! text-gray-900" : a.titleSize,
|
|
73
|
+
valueSize: a.variant === "transparent-header" && !a.valueSize ? "text-lg font-bold text-gray-900" : a.valueSize,
|
|
74
|
+
iconSize: a.iconSize,
|
|
75
|
+
iconBoxShape: a.iconBoxShape,
|
|
76
|
+
iconBoxStyle: a.iconBoxStyle
|
|
77
77
|
}, null, 8, ["item", "variant", "layout", "attached", "loading", "titleSize", "valueSize", "iconSize", "iconBoxShape", "iconBoxStyle"]))), 128))
|
|
78
78
|
], 2));
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
C as default
|
|
83
83
|
};
|
|
@@ -13,7 +13,7 @@ const S = /* @__PURE__ */ y({
|
|
|
13
13
|
class: {}
|
|
14
14
|
},
|
|
15
15
|
setup(r) {
|
|
16
|
-
const e = r, o = s(() => e.layout === "
|
|
16
|
+
const e = r, o = s(() => e.layout === "layout-8"), d = s(() => e.iconBoxShape === "full-rounded" ? "rounded-full" : e.iconBoxShape === "none" ? "rounded-none" : "rounded-lg"), i = s(() => {
|
|
17
17
|
if (o.value) {
|
|
18
18
|
const t = e.item.color || "primary";
|
|
19
19
|
return `shrink-0 ${{
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { defineComponent as f, computed as s, openBlock as
|
|
1
|
+
import { defineComponent as f, computed as s, openBlock as l, createElementBlock as i, normalizeClass as a, createVNode as d, createTextVNode as g, toDisplayString as o, createElementVNode as y, createCommentVNode as x } from "vue";
|
|
2
2
|
import m from "../../Icon.vue.js";
|
|
3
|
-
const
|
|
3
|
+
const v = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "text-muted-foreground truncate"
|
|
6
|
-
},
|
|
6
|
+
}, p = /* @__PURE__ */ f({
|
|
7
7
|
__name: "StatTrend",
|
|
8
8
|
props: {
|
|
9
9
|
trend: {},
|
|
10
10
|
layout: {}
|
|
11
11
|
},
|
|
12
12
|
setup(e) {
|
|
13
|
-
const t = e,
|
|
14
|
-
if (
|
|
13
|
+
const t = e, u = s(() => t.layout === "layout-8"), r = s(() => t.layout === "layout-5"), c = s(() => {
|
|
14
|
+
if (u.value)
|
|
15
15
|
return [
|
|
16
16
|
"shrink-0 flex items-center gap-0.5 text-xs font-medium",
|
|
17
17
|
t.trend.isPositive ? "text-success-subtle-fg" : "text-danger-subtle-fg"
|
|
18
18
|
].join(" ");
|
|
19
19
|
const n = "flex items-center text-sm";
|
|
20
|
-
return r.value ? `${n} gap-1` : t.layout === "
|
|
20
|
+
return r.value ? `${n} gap-1` : t.layout === "layout-6" || t.layout === "layout-1" || t.layout === "layout-2" || t.layout === "layout-3" ? `${n} mt-2 gap-1.5` : `${n} mt-1 gap-1`;
|
|
21
21
|
});
|
|
22
|
-
return (n, b) =>
|
|
22
|
+
return (n, b) => u.value ? (l(), i("span", {
|
|
23
23
|
key: 0,
|
|
24
|
-
class:
|
|
24
|
+
class: a(c.value)
|
|
25
25
|
}, [
|
|
26
26
|
d(m, {
|
|
27
27
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
28
28
|
class: "w-3 h-3"
|
|
29
29
|
}, null, 8, ["icon"]),
|
|
30
|
-
g(" " +
|
|
31
|
-
], 2)) : (
|
|
30
|
+
g(" " + o(e.trend.value), 1)
|
|
31
|
+
], 2)) : (l(), i("div", {
|
|
32
32
|
key: 1,
|
|
33
|
-
class:
|
|
33
|
+
class: a(c.value)
|
|
34
34
|
}, [
|
|
35
35
|
d(m, {
|
|
36
36
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
37
|
-
class:
|
|
37
|
+
class: a([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
|
|
38
38
|
}, null, 8, ["icon", "class"]),
|
|
39
|
-
|
|
40
|
-
class:
|
|
41
|
-
},
|
|
42
|
-
e.trend.label && !r.value ? (
|
|
39
|
+
y("span", {
|
|
40
|
+
class: a([e.trend.isPositive ? "text-success-subtle-fg" : "text-danger-subtle-fg", "font-medium whitespace-nowrap"])
|
|
41
|
+
}, o(e.trend.value), 3),
|
|
42
|
+
e.trend.label && !r.value ? (l(), i("span", v, o(e.trend.label), 1)) : x("", !0)
|
|
43
43
|
], 2));
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
export {
|
|
47
|
-
|
|
47
|
+
p as default
|
|
48
48
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type StatsVariant = 'solid' | 'outline' | 'shadow' | 'transparent' | 'transparent-header';
|
|
2
|
-
export type StatsLayout = '
|
|
2
|
+
export type StatsLayout = 'layout-1' | 'layout-2' | 'layout-3' | 'layout-4' | 'layout-5' | 'layout-6' | 'layout-7' | 'layout-8';
|
|
3
3
|
export type IconBoxShape = 'rounded' | 'full-rounded' | 'none';
|
|
4
4
|
export type IconBoxStyle = 'filled' | 'transparent';
|
|
5
5
|
export interface StatTrend {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
/package/components/RichTextEditor/{RichTextLinkPopover.vue2.js → RichTextLinkPopover.vue.js}
RENAMED
|
File without changes
|
|
File without changes
|