vlite3 1.2.2 → 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/AppShellLayoutDashboard.vue.js +1 -1
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +1 -1
- 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/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +1 -1
- package/components/List/ListFieldRow.vue.js +221 -144
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/Price/Price.vue.d.ts +1 -1
- package/components/Price/Price.vue.js +35 -13
- 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 +2 -2
- package/components/Screen/Screen.vue.js +3 -1
- 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 +222 -164
- package/components/Stats/components/StatIconBox.vue.js +42 -42
- package/components/Stats/components/StatTrend.vue.js +20 -20
- package/components/Timeline/Timeline.vue.js +21 -11
- package/components/Timeline/TimelineItem.vue.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +108 -102
- package/package.json +2 -1
- package/style.css +23 -17
- package/utils/status.js +16 -16
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineComponent as M, ref as z, computed as I, openBlock as r, createElementBlock as c, normalizeClass as u, Fragment as N, renderList as S, createVNode as h, unref as x, createElementVNode as y, normalizeStyle as T, renderSlot as $, createTextVNode as A, toDisplayString as g, createCommentVNode as E } from "vue";
|
|
2
|
+
import { Icon as w } from "@iconify/vue";
|
|
3
|
+
const F = ["onMousemove", "onClick"], H = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "ml-2 text-sm text-foreground/80 font-medium whitespace-nowrap"
|
|
6
|
+
}, L = { class: "text-xs text-muted-foreground font-normal" }, D = /* @__PURE__ */ M({
|
|
7
|
+
__name: "Rating",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { default: 0 },
|
|
10
|
+
max: { default: 5 },
|
|
11
|
+
allowHalf: { type: Boolean, default: !1 },
|
|
12
|
+
readonly: { type: Boolean, default: !1 },
|
|
13
|
+
showText: { type: Boolean, default: !1 },
|
|
14
|
+
icon: { default: "lucide:star" },
|
|
15
|
+
activeIcon: { default: "lucide:star" },
|
|
16
|
+
activeColor: { default: "text-amber-400" },
|
|
17
|
+
inactiveColor: { default: "text-muted-foreground/30" },
|
|
18
|
+
size: { default: "md" },
|
|
19
|
+
clearable: { type: Boolean, default: !1 },
|
|
20
|
+
disabled: { type: Boolean, default: !1 },
|
|
21
|
+
solid: { type: Boolean, default: !0 },
|
|
22
|
+
class: {}
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:modelValue", "change", "hover"],
|
|
25
|
+
setup(t, { emit: C }) {
|
|
26
|
+
const l = t, s = C, n = z(0), d = I(() => n.value > 0 ? n.value : l.modelValue), m = {
|
|
27
|
+
sm: "w-4 h-4",
|
|
28
|
+
md: "w-5 h-5",
|
|
29
|
+
lg: "w-6 h-6",
|
|
30
|
+
xl: "w-8 h-8"
|
|
31
|
+
}, v = (o, e) => {
|
|
32
|
+
const a = e === "active" ? l.activeIcon : l.icon;
|
|
33
|
+
return Array.isArray(a) ? a[Math.min(o - 1, a.length - 1)] : a;
|
|
34
|
+
}, V = (o, e) => {
|
|
35
|
+
if (!(l.readonly || l.disabled))
|
|
36
|
+
if (l.allowHalf) {
|
|
37
|
+
const i = o.currentTarget.getBoundingClientRect(), f = o.clientX - i.left < i.width / 2 ? e - 0.5 : e;
|
|
38
|
+
n.value !== f && (n.value = f, s("hover", f));
|
|
39
|
+
} else
|
|
40
|
+
n.value !== e && (n.value = e, s("hover", e));
|
|
41
|
+
}, b = () => {
|
|
42
|
+
l.readonly || l.disabled || (n.value = 0, s("hover", 0));
|
|
43
|
+
}, B = (o) => {
|
|
44
|
+
if (l.readonly || l.disabled) return;
|
|
45
|
+
let e = n.value || o;
|
|
46
|
+
l.clearable && l.modelValue === e && (e = 0), s("update:modelValue", e), s("change", e);
|
|
47
|
+
}, k = (o) => {
|
|
48
|
+
const e = d.value - o + 1;
|
|
49
|
+
return e >= 1 ? 100 : e > 0 ? e * 100 : 0;
|
|
50
|
+
};
|
|
51
|
+
return (o, e) => (r(), c("div", {
|
|
52
|
+
class: u(["inline-flex items-center gap-1.5", [l.class, { "opacity-50 cursor-not-allowed": t.disabled }]]),
|
|
53
|
+
onMouseleave: b
|
|
54
|
+
}, [
|
|
55
|
+
(r(!0), c(N, null, S(t.max, (a) => (r(), c("div", {
|
|
56
|
+
key: a,
|
|
57
|
+
class: u(["relative flex items-center justify-center isolate transition-transform", {
|
|
58
|
+
"cursor-pointer hover:scale-110 active:scale-95": !t.readonly && !t.disabled,
|
|
59
|
+
"cursor-default pointer-events-none": t.readonly || t.disabled
|
|
60
|
+
}]),
|
|
61
|
+
onMousemove: (i) => V(i, a),
|
|
62
|
+
onClick: (i) => B(a)
|
|
63
|
+
}, [
|
|
64
|
+
h(x(w), {
|
|
65
|
+
icon: v(a, "inactive"),
|
|
66
|
+
class: u([m[t.size], t.inactiveColor])
|
|
67
|
+
}, null, 8, ["icon", "class"]),
|
|
68
|
+
y("div", {
|
|
69
|
+
class: "absolute inset-0 overflow-hidden",
|
|
70
|
+
style: T({ width: `${k(a)}%` })
|
|
71
|
+
}, [
|
|
72
|
+
h(x(w), {
|
|
73
|
+
icon: v(a, "active"),
|
|
74
|
+
class: u([m[t.size], t.activeColor, { "is-solid": t.solid }])
|
|
75
|
+
}, null, 8, ["icon", "class"])
|
|
76
|
+
], 4)
|
|
77
|
+
], 42, F))), 128)),
|
|
78
|
+
$(o.$slots, "text", {
|
|
79
|
+
value: d.value,
|
|
80
|
+
max: t.max
|
|
81
|
+
}, () => [
|
|
82
|
+
t.showText ? (r(), c("span", H, [
|
|
83
|
+
A(g(d.value) + " ", 1),
|
|
84
|
+
y("span", L, "/ " + g(t.max), 1)
|
|
85
|
+
])) : E("", !0)
|
|
86
|
+
], !0)
|
|
87
|
+
], 34));
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export {
|
|
91
|
+
D as default
|
|
92
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReviewSummaryProps } from './types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<ReviewSummaryProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ReviewSummaryProps> & Readonly<{}>, {
|
|
3
|
+
showTotal: boolean;
|
|
4
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent as w, computed as u, openBlock as l, createElementBlock as i, normalizeClass as d, createElementVNode as r, toDisplayString as s, Fragment as m, renderList as f, createVNode as g, unref as x, createCommentVNode as _, createTextVNode as b, normalizeStyle as y } from "vue";
|
|
2
|
+
import { Icon as v } from "@iconify/vue";
|
|
3
|
+
const k = { class: "flex flex-col items-center justify-center py-4 sm:w-1/3 w-full shrink-0" }, R = { class: "text-5xl font-bold tracking-tighter text-foreground" }, D = { class: "flex items-center gap-1 mt-3 text-amber-400" }, N = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "text-sm text-muted-foreground mt-2 font-medium"
|
|
6
|
+
}, B = { class: "flex flex-col gap-2 w-full flex-grow" }, C = { class: "flex items-center gap-1 text-sm font-medium text-foreground min-w-[70px]" }, T = { class: "h-3.5 bg-muted rounded-full w-full overflow-hidden flex-grow shrink-0 relative shadow-inner" }, V = { class: "text-sm font-medium text-muted-foreground text-right min-w-[36px]" }, E = /* @__PURE__ */ w({
|
|
7
|
+
__name: "ReviewSummary",
|
|
8
|
+
props: {
|
|
9
|
+
ratingDistribution: {},
|
|
10
|
+
totalReviews: {},
|
|
11
|
+
averageRating: {},
|
|
12
|
+
showTotal: { type: Boolean, default: !0 },
|
|
13
|
+
class: {}
|
|
14
|
+
},
|
|
15
|
+
setup(c) {
|
|
16
|
+
const e = c, p = u(() => [...e.ratingDistribution].sort((n, o) => o.rating - n.rating)), a = u(() => {
|
|
17
|
+
if (e.averageRating !== void 0) return e.averageRating;
|
|
18
|
+
if (e.ratingDistribution.length === 0) return 0;
|
|
19
|
+
let n = 0, o = 0;
|
|
20
|
+
for (const t of e.ratingDistribution)
|
|
21
|
+
t.count !== void 0 && (n += t.rating * t.count, o += t.count);
|
|
22
|
+
return o > 0 ? Number((n / o).toFixed(1)) : 0;
|
|
23
|
+
}), h = u(() => e.totalReviews !== void 0 ? e.totalReviews : e.ratingDistribution.reduce((n, o) => n + (o.count || 0), 0));
|
|
24
|
+
return (n, o) => (l(), i("div", {
|
|
25
|
+
class: d(["flex flex-col sm:flex-row gap-6 md:gap-10 items-start w-full", e.class])
|
|
26
|
+
}, [
|
|
27
|
+
r("div", k, [
|
|
28
|
+
r("div", R, s(a.value), 1),
|
|
29
|
+
r("div", D, [
|
|
30
|
+
(l(), i(m, null, f(5, (t) => g(x(v), {
|
|
31
|
+
key: t,
|
|
32
|
+
icon: "lucide:star",
|
|
33
|
+
class: d(["w-5 h-5 transition-all", {
|
|
34
|
+
"fill-amber-400 text-amber-400": a.value >= t,
|
|
35
|
+
"fill-muted/20 text-muted-foreground/30": a.value < t
|
|
36
|
+
}])
|
|
37
|
+
}, null, 8, ["class"])), 64))
|
|
38
|
+
]),
|
|
39
|
+
c.showTotal ? (l(), i("p", N, " Based on " + s(h.value) + " global ratings ", 1)) : _("", !0)
|
|
40
|
+
]),
|
|
41
|
+
r("div", B, [
|
|
42
|
+
(l(!0), i(m, null, f(p.value, (t) => (l(), i("div", {
|
|
43
|
+
key: t.rating,
|
|
44
|
+
class: "flex items-center gap-3 w-full"
|
|
45
|
+
}, [
|
|
46
|
+
r("div", C, [
|
|
47
|
+
b(s(t.rating) + " ", 1),
|
|
48
|
+
g(x(v), {
|
|
49
|
+
icon: "lucide:star",
|
|
50
|
+
class: "w-4 h-4 text-amber-400 fill-amber-400"
|
|
51
|
+
})
|
|
52
|
+
]),
|
|
53
|
+
r("div", T, [
|
|
54
|
+
r("div", {
|
|
55
|
+
class: "h-full bg-amber-400 rounded-full transition-all duration-1000 ease-out",
|
|
56
|
+
style: y({ width: `${t.percentage}%` })
|
|
57
|
+
}, null, 4)
|
|
58
|
+
]),
|
|
59
|
+
r("div", V, s(t.percentage) + "% ", 1)
|
|
60
|
+
]))), 128))
|
|
61
|
+
])
|
|
62
|
+
], 2));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
E as default
|
|
67
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface RatingProps {
|
|
2
|
+
modelValue?: number;
|
|
3
|
+
max?: number;
|
|
4
|
+
allowHalf?: boolean;
|
|
5
|
+
readonly?: boolean;
|
|
6
|
+
showText?: boolean;
|
|
7
|
+
icon?: string | string[];
|
|
8
|
+
activeIcon?: string | string[];
|
|
9
|
+
activeColor?: string;
|
|
10
|
+
inactiveColor?: string;
|
|
11
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
12
|
+
clearable?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
solid?: boolean;
|
|
15
|
+
class?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ReviewSummaryData {
|
|
18
|
+
rating: number;
|
|
19
|
+
percentage: number;
|
|
20
|
+
count?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ReviewSummaryProps {
|
|
23
|
+
ratingDistribution: ReviewSummaryData[];
|
|
24
|
+
totalReviews?: number;
|
|
25
|
+
averageRating?: number;
|
|
26
|
+
showTotal?: boolean;
|
|
27
|
+
class?: string;
|
|
28
|
+
}
|
|
@@ -341,10 +341,10 @@ declare const __VLS_component: import('vue').DefineComponent<ScreenProps, {}, {}
|
|
|
341
341
|
data: any[];
|
|
342
342
|
variant: "one" | "two";
|
|
343
343
|
loading: boolean;
|
|
344
|
+
emptyIcon: string;
|
|
345
|
+
canAdd: boolean;
|
|
344
346
|
exportProps: Record<string, any> | boolean;
|
|
345
347
|
importProps: Record<string, any> | boolean;
|
|
346
|
-
canAdd: boolean;
|
|
347
|
-
emptyIcon: string;
|
|
348
348
|
hideSelectable: boolean;
|
|
349
349
|
hideDeleteBtn: boolean;
|
|
350
350
|
showRefresh: boolean;
|
|
@@ -33,7 +33,9 @@ const ze = { key: 0 }, Xe = {
|
|
|
33
33
|
loading: { type: Boolean, default: !1 },
|
|
34
34
|
variant: { default: "one" },
|
|
35
35
|
stats: { default: () => [] },
|
|
36
|
-
statsProps: { default: () => ({
|
|
36
|
+
statsProps: { default: () => ({
|
|
37
|
+
variant: "transparent-header"
|
|
38
|
+
}) },
|
|
37
39
|
refetch: {},
|
|
38
40
|
paginationProps: { default: () => ({
|
|
39
41
|
alignment: "between",
|
|
@@ -25,7 +25,7 @@ const ue = {
|
|
|
25
25
|
compactIconSize: { default: "21px" },
|
|
26
26
|
labelClass: { default: "text-sm" },
|
|
27
27
|
compactLabelClass: { default: "text-[11.5px] mt-1" },
|
|
28
|
-
itemPadding: { default: "py-
|
|
28
|
+
itemPadding: { default: "py-2 px-2" },
|
|
29
29
|
compactItemPadding: { default: "py-2 px-1" },
|
|
30
30
|
nestedMenuWidth: { default: "220px" },
|
|
31
31
|
nestedMenuMaxHeight: { default: "300px" },
|
|
@@ -7,5 +7,7 @@ interface Props {
|
|
|
7
7
|
}
|
|
8
8
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
9
9
|
depth: number;
|
|
10
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
10
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
11
|
+
itemRef: HTMLDivElement;
|
|
12
|
+
}, HTMLDivElement>;
|
|
11
13
|
export default _default;
|