vlite3 1.4.25 → 1.4.27

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.
Files changed (32) hide show
  1. package/components/CategoryManager/CategoryManager.vue2.js +3 -2
  2. package/components/Chart/BarChart.vue.d.ts +1 -1
  3. package/components/Chart/ChartLegend.vue.d.ts +22 -0
  4. package/components/Chart/ChartLegend.vue.js +91 -0
  5. package/components/Chart/ChartLegend.vue2.js +4 -0
  6. package/components/Chart/GanttChart.vue.d.ts +2 -2
  7. package/components/Chart/LineChart.vue.d.ts +5 -2
  8. package/components/Chart/LineChart.vue.js +1 -1
  9. package/components/Chart/LineChart.vue2.js +40 -39
  10. package/components/Chart/PieChart.vue.d.ts +11 -4
  11. package/components/Chart/PieChart.vue.js +118 -114
  12. package/components/Chart/SegmentBarChart.vue.d.ts +1 -1
  13. package/components/Chart/TimelineChart.vue.d.ts +2 -2
  14. package/components/Chart/index.d.ts +2 -1
  15. package/components/Chart/types.d.ts +25 -0
  16. package/components/ColorPicker/ColorPicker.vue.d.ts +20 -1
  17. package/components/ColorPicker/ColorPicker.vue.js +72 -59
  18. package/components/DateRangePicker.vue.js +5 -239
  19. package/components/DateRangePicker.vue2.js +239 -2
  20. package/components/Form/FormField.vue.js +10 -10
  21. package/components/Heatmap/Heatmap.vue.d.ts +1 -1
  22. package/components/Screen/ScreenFilter.vue.js +3 -2
  23. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  24. package/components/Stats/StatItem.vue.d.ts +2 -0
  25. package/components/Stats/StatItem.vue.js +234 -134
  26. package/components/Stats/Stats.vue.d.ts +1 -0
  27. package/components/Stats/Stats.vue.js +45 -41
  28. package/components/Stats/components/StatTrend.vue.js +35 -32
  29. package/components/Stats/types.d.ts +32 -2
  30. package/index.js +138 -136
  31. package/package.json +2 -2
  32. package/style.css +1 -1
@@ -1,6 +1,6 @@
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";
1
+ import { defineComponent as y, computed as n, openBlock as i, createElementBlock as r, normalizeClass as d, createElementVNode as f, Fragment as u, renderList as s, createBlock as g } from "vue";
2
2
  import S from "./StatItem.vue.js";
3
- const C = /* @__PURE__ */ y({
3
+ const k = /* @__PURE__ */ y({
4
4
  __name: "Stats",
5
5
  props: {
6
6
  items: {},
@@ -14,70 +14,74 @@ const C = /* @__PURE__ */ y({
14
14
  iconSize: { default: "" },
15
15
  iconBoxShape: { default: "rounded" },
16
16
  iconBoxStyle: { default: "filled" },
17
+ sparklineHeight: { default: 56 },
17
18
  class: { default: "" }
18
19
  },
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(() => [
20
+ setup(e) {
21
+ const t = e, c = n(() => {
22
+ const a = Number(t.columns) || 4;
23
+ 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";
24
+ }), h = n(() => [
24
25
  "grid",
25
26
  c.value,
27
+ t.layout === "layout-9" ? "items-stretch" : "",
26
28
  t.variant === "transparent-header" ? "gap-2 md:gap-3.5" : "gap-3 sm:gap-4.5",
27
29
  t?.layout === "layout-8" ? "rounded-sm" : "",
28
30
  t.class
29
- ].join(" ")), v = l(() => [
31
+ ].join(" ")), m = n(() => [
30
32
  t.layout === "layout-8" ? "rounded-sm" : "rounded-lg",
31
33
  "overflow-hidden",
32
34
  t.variant !== "transparent" ? "border border-border" : "",
33
35
  t.variant === "shadow" ? "shadow-md bg-card" : "",
34
36
  t.class
35
- ].join(" ")), f = l(() => [
37
+ ].join(" ")), v = n(() => [
36
38
  "grid",
37
39
  c.value,
38
40
  "w-[calc(100%+1px)] -mb-px -mr-px gap-0"
39
41
  ].join(" "));
40
- return (e, x) => a.attached ? (i(), r("div", {
42
+ return (a, x) => e.attached ? (i(), r("div", {
41
43
  key: 0,
42
- class: d(v.value)
44
+ class: d(m.value)
43
45
  }, [
44
- h("div", {
45
- class: d(f.value)
46
+ f("div", {
47
+ class: d(v.value)
46
48
  }, [
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
- }, null, 8, ["item", "variant", "layout", "attached", "loading", "titleSize", "valueSize", "iconSize", "iconBoxShape", "iconBoxStyle"]))), 128))
49
+ (i(!0), r(u, null, s(e.items, (l, o) => (i(), g(S, {
50
+ key: l.id || o,
51
+ item: l,
52
+ variant: e.variant.startsWith("transparent") ? "transparent" : e.variant,
53
+ layout: e.variant === "transparent-header" ? "layout-5" : e.layout,
54
+ attached: e.attached,
55
+ loading: e.loading,
56
+ titleSize: e.variant === "transparent-header" && !e.titleSize ? "text-sm font-normal! text-gray-900" : e.titleSize,
57
+ valueSize: e.variant === "transparent-header" && !e.valueSize ? "text-lg font-bold text-gray-900" : e.valueSize,
58
+ iconSize: e.iconSize,
59
+ iconBoxShape: e.iconBoxShape,
60
+ iconBoxStyle: e.iconBoxStyle,
61
+ sparklineHeight: e.sparklineHeight
62
+ }, null, 8, ["item", "variant", "layout", "attached", "loading", "titleSize", "valueSize", "iconSize", "iconBoxShape", "iconBoxStyle", "sparklineHeight"]))), 128))
60
63
  ], 2)
61
64
  ], 2)) : (i(), r("div", {
62
65
  key: 1,
63
- class: d(m.value)
66
+ class: d(h.value)
64
67
  }, [
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
- }, null, 8, ["item", "variant", "layout", "attached", "loading", "titleSize", "valueSize", "iconSize", "iconBoxShape", "iconBoxStyle"]))), 128))
68
+ (i(!0), r(u, null, s(e.items, (l, o) => (i(), g(S, {
69
+ key: l.id || o,
70
+ item: l,
71
+ variant: e.variant.startsWith("transparent") ? "transparent" : e.variant,
72
+ layout: e.variant === "transparent-header" ? "layout-5" : e.layout,
73
+ attached: e.attached,
74
+ loading: e.loading,
75
+ titleSize: e.variant === "transparent-header" && !e.titleSize ? "text-sm font-normal! text-gray-900" : e.titleSize,
76
+ valueSize: e.variant === "transparent-header" && !e.valueSize ? "text-lg font-bold text-gray-900" : e.valueSize,
77
+ iconSize: e.iconSize,
78
+ iconBoxShape: e.iconBoxShape,
79
+ iconBoxStyle: e.iconBoxStyle,
80
+ sparklineHeight: e.sparklineHeight
81
+ }, null, 8, ["item", "variant", "layout", "attached", "loading", "titleSize", "valueSize", "iconSize", "iconBoxShape", "iconBoxStyle", "sparklineHeight"]))), 128))
78
82
  ], 2));
79
83
  }
80
84
  });
81
85
  export {
82
- C as default
86
+ k as default
83
87
  };
@@ -1,48 +1,51 @@
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
- import m from "../../Icon.vue.js";
3
- const v = {
4
- key: 0,
5
- class: "text-muted-foreground truncate"
6
- }, p = /* @__PURE__ */ f({
1
+ import { defineComponent as k, computed as t, openBlock as u, createElementBlock as s, normalizeClass as l, createBlock as g, createCommentVNode as i, createTextVNode as h, toDisplayString as c, createElementVNode as C } from "vue";
2
+ import x from "../../Icon.vue.js";
3
+ const w = {
4
+ key: 1,
5
+ class: "text-muted-foreground truncate font-normal"
6
+ }, B = /* @__PURE__ */ k({
7
7
  __name: "StatTrend",
8
8
  props: {
9
9
  trend: {},
10
10
  layout: {}
11
11
  },
12
- setup(e) {
13
- const t = e, u = s(() => t.layout === "layout-8"), r = s(() => t.layout === "layout-5"), c = s(() => {
14
- if (u.value)
15
- return [
16
- "shrink-0 flex items-center gap-0.5 text-xs font-medium",
17
- t.trend.isPositive ? "text-success-subtle-fg" : "text-danger-subtle-fg"
18
- ].join(" ");
19
- const n = "flex items-center text-sm";
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`;
12
+ setup(n) {
13
+ const e = n, d = t(() => e.layout === "layout-8"), f = t(() => e.layout === "layout-5"), m = t(() => e.layout === "layout-9"), a = t(() => e.trend.neutral || e.trend.isPositive === null ? "neutral" : e.trend.isPositive === !1 ? "negative" : "positive"), o = t(() => a.value === "neutral" ? "text-muted-foreground" : a.value === "negative" ? "text-danger-subtle-fg" : "text-success-subtle-fg"), p = t(() => a.value === "neutral" ? "text-muted-foreground" : a.value === "negative" ? "text-danger" : "text-success"), v = t(() => a.value === "neutral" ? "lucide:minus" : a.value === "negative" ? "lucide:trending-down" : "lucide:trending-up"), y = t(() => {
14
+ if (d.value)
15
+ return ["shrink-0 flex items-center gap-0.5 text-xs font-medium", o.value].join(
16
+ " "
17
+ );
18
+ if (m.value)
19
+ return ["flex items-center gap-1 mt-1.5 text-xs", o.value].join(" ");
20
+ const r = "flex items-center text-sm";
21
+ return f.value ? `${r} gap-1` : e.layout === "layout-6" || e.layout === "layout-1" || e.layout === "layout-2" || e.layout === "layout-3" ? `${r} mt-2 gap-1.5` : `${r} mt-1 gap-1`;
21
22
  });
22
- return (n, b) => u.value ? (l(), i("span", {
23
+ return (r, b) => d.value ? (u(), s("span", {
23
24
  key: 0,
24
- class: a(c.value)
25
+ class: l(y.value)
25
26
  }, [
26
- d(m, {
27
- icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
27
+ n.trend.hideIcon ? i("", !0) : (u(), g(x, {
28
+ key: 0,
29
+ icon: v.value,
28
30
  class: "w-3 h-3"
29
- }, null, 8, ["icon"]),
30
- g(" " + o(e.trend.value), 1)
31
- ], 2)) : (l(), i("div", {
31
+ }, null, 8, ["icon"])),
32
+ h(" " + c(n.trend.value), 1)
33
+ ], 2)) : (u(), s("div", {
32
34
  key: 1,
33
- class: a(c.value)
35
+ class: l(y.value)
34
36
  }, [
35
- d(m, {
36
- icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
37
- class: a([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
38
- }, null, 8, ["icon", "class"]),
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)
37
+ n.trend.hideIcon ? i("", !0) : (u(), g(x, {
38
+ key: 0,
39
+ icon: v.value,
40
+ class: l([p.value, m.value ? "w-3.5 h-3.5" : "w-4 h-4", "shrink-0"])
41
+ }, null, 8, ["icon", "class"])),
42
+ C("span", {
43
+ class: l([o.value, "font-medium whitespace-nowrap"])
44
+ }, c(n.trend.value), 3),
45
+ n.trend.label && !f.value ? (u(), s("span", w, c(n.trend.label), 1)) : i("", !0)
43
46
  ], 2));
44
47
  }
45
48
  });
46
49
  export {
47
- p as default
50
+ B as default
48
51
  };
@@ -1,11 +1,28 @@
1
1
  export type StatsVariant = 'solid' | 'outline' | 'shadow' | 'transparent' | 'transparent-header';
2
- export type StatsLayout = 'layout-1' | 'layout-2' | 'layout-3' | 'layout-4' | 'layout-5' | 'layout-6' | 'layout-7' | 'layout-8';
2
+ export type StatsLayout = 'layout-1' | 'layout-2' | 'layout-3' | 'layout-4' | 'layout-5' | 'layout-6' | 'layout-7' | 'layout-8'
3
+ /** Executive / sparkline card: icon → title → value → trend → sparkline */
4
+ | 'layout-9';
3
5
  export type IconBoxShape = 'rounded' | 'full-rounded' | 'none';
4
6
  export type IconBoxStyle = 'filled' | 'transparent';
5
7
  export interface StatTrend {
6
8
  value: string | number;
7
- isPositive?: boolean;
9
+ /**
10
+ * Trend direction. `true` = positive/up, `false` = negative/down,
11
+ * `null`/`undefined` with no explicit flag falls back to positive styling
12
+ * unless `neutral` is set.
13
+ */
14
+ isPositive?: boolean | null;
15
+ /** Force neutral (muted) trend styling */
16
+ neutral?: boolean;
17
+ /** Comparison text, e.g. "vs last period" */
8
18
  label?: string;
19
+ /** Hide the trending arrow icon */
20
+ hideIcon?: boolean;
21
+ }
22
+ export interface StatSparklinePoint {
23
+ label?: string;
24
+ value: number;
25
+ color?: string;
9
26
  }
10
27
  export interface StatItemSchema {
11
28
  id: string | number;
@@ -18,6 +35,17 @@ export interface StatItemSchema {
18
35
  icon?: string;
19
36
  color?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | string;
20
37
  trend?: StatTrend;
38
+ /**
39
+ * Optional sparkline data for `layout-9`.
40
+ * Accepts chart points or a plain number series.
41
+ */
42
+ sparkline?: StatSparklinePoint[] | number[];
43
+ /** Override sparkline stroke/fill color (defaults to item.color) */
44
+ sparklineColor?: string;
45
+ /** Fill area under the sparkline (default: true for layout-9) */
46
+ sparklineFill?: boolean;
47
+ /** Per-item sparkline height override */
48
+ sparklineHeight?: number;
21
49
  [key: string]: any;
22
50
  }
23
51
  export interface StatsProps {
@@ -32,5 +60,7 @@ export interface StatsProps {
32
60
  iconSize?: string;
33
61
  iconBoxShape?: IconBoxShape;
34
62
  iconBoxStyle?: IconBoxStyle;
63
+ /** Default sparkline height for layout-9 (px) */
64
+ sparklineHeight?: number;
35
65
  class?: string;
36
66
  }