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.
Files changed (64) hide show
  1. package/README.md +1 -0
  2. package/components/AppShell/AppShellLayoutClassic.vue.js +67 -64
  3. package/components/AppShell/AppShellLayoutDashboard.vue.js +76 -71
  4. package/components/AppShell/AppShellLayoutDock.vue.js +27 -27
  5. package/components/AppShell/AppShellLayoutHeaderShell.vue.js +81 -76
  6. package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +56 -56
  7. package/components/AsyncSelect/createAsyncSelect.d.ts +88 -0
  8. package/components/AsyncSelect/createAsyncSelect.js +156 -0
  9. package/components/AsyncSelect/index.d.ts +1 -0
  10. package/components/ChoiceBox/ChoiceBox.vue.js +4 -2
  11. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  12. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  13. package/components/DataTable/DataTable.vue.d.ts +3 -3
  14. package/components/DataTable/DataTableRow.vue.d.ts +1 -1
  15. package/components/Form/CustomFields.vue.js +2 -2
  16. package/components/Form/CustomFields.vue2.js +15 -2
  17. package/components/Form/Form.vue.js +1 -1
  18. package/components/Form/Form.vue2.js +1 -1
  19. package/components/Invoice/InvoiceVariant1.vue.js +225 -176
  20. package/components/Invoice/InvoiceVariant2.vue.js +174 -125
  21. package/components/Invoice/InvoiceVariant3.vue.js +186 -157
  22. package/components/Invoice/InvoiceVariant4.vue.js +200 -156
  23. package/components/Invoice/types.d.ts +10 -1
  24. package/components/List/ListFieldRow.vue.js +221 -144
  25. package/components/List/utils.d.ts +2 -2
  26. package/components/List/utils.js +6 -9
  27. package/components/NavbarCommandPalette.vue.js +2 -2
  28. package/components/Price/Price.vue.d.ts +3 -1
  29. package/components/Price/Price.vue.js +35 -10
  30. package/components/Rating/Rating.vue.d.ts +43 -0
  31. package/components/Rating/Rating.vue.js +7 -0
  32. package/components/Rating/Rating.vue2.js +92 -0
  33. package/components/Rating/ReviewSummary.vue.d.ts +5 -0
  34. package/components/Rating/ReviewSummary.vue.js +67 -0
  35. package/components/Rating/ReviewSummary.vue2.js +4 -0
  36. package/components/Rating/index.d.ts +3 -0
  37. package/components/Rating/types.d.ts +28 -0
  38. package/components/Screen/Screen.vue.d.ts +38 -12
  39. package/components/Screen/Screen.vue.js +400 -304
  40. package/components/Screen/components/ScreenToolbar.vue.d.ts +62 -0
  41. package/components/Screen/components/ScreenToolbar.vue.js +116 -0
  42. package/components/Screen/components/ScreenToolbar.vue2.js +4 -0
  43. package/components/Screen/types.d.ts +9 -0
  44. package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
  45. package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +3 -1
  46. package/components/SidebarMenu/SidebarMenuItem.vue.js +198 -175
  47. package/components/Stats/StatItem.vue.js +212 -153
  48. package/components/Stats/Stats.vue.js +20 -20
  49. package/components/Stats/components/StatIconBox.vue.js +42 -42
  50. package/components/Stats/components/StatTrend.vue.js +20 -20
  51. package/components/Stats/types.d.ts +3 -1
  52. package/components/Timeline/Timeline.vue.js +21 -11
  53. package/components/Timeline/TimelineItem.vue.js +1 -1
  54. package/core/config.d.ts +10 -0
  55. package/core/config.js +11 -9
  56. package/index.d.ts +2 -0
  57. package/index.js +220 -214
  58. package/package.json +2 -1
  59. package/style.css +23 -17
  60. package/types/config.type.d.ts +2 -0
  61. package/types/list.type.d.ts +4 -0
  62. package/utils/functions.d.ts +9 -10
  63. package/utils/functions.js +78 -63
  64. package/utils/status.js +16 -16
@@ -1,30 +1,32 @@
1
- import { defineComponent as B, computed as k, openBlock as e, createElementBlock as i, normalizeStyle as I, normalizeClass as n, Fragment as b, createElementVNode as r, toDisplayString as o, unref as y, createBlock as c, createCommentVNode as d } from "vue";
2
- import { $t as s } from "../../utils/i18n.js";
3
- import { formatCurrency as C } from "../../utils/functions.js";
4
- import f from "./components/StatTrend.vue.js";
5
- import g from "./components/StatIconBox.vue.js";
6
- const j = { class: "flex items-center justify-between w-full mt-1" }, $ = {
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
- }, N = {
11
+ }, E = {
10
12
  key: 0,
11
13
  class: "h-9 w-24 bg-gray-50 animate-pulse rounded-md"
12
- }, V = {
14
+ }, D = {
13
15
  key: 1,
14
16
  class: "h-8 w-20 bg-gray-50 animate-pulse rounded-md mt-1"
15
- }, E = {
17
+ }, L = {
16
18
  key: 3,
17
19
  class: "flex-1 flex flex-col justify-center min-w-0"
18
- }, M = {
20
+ }, q = {
19
21
  key: 0,
20
22
  class: "h-9 w-24 bg-gray-50 animate-pulse rounded-md mt-0.5"
21
- }, D = {
23
+ }, A = {
22
24
  key: 1,
23
25
  class: "h-6 w-5 bg-gray-50 animate-pulse rounded-sm shrink-0"
24
- }, F = { class: "flex-1 flex flex-col justify-center min-w-0" }, L = { class: "flex items-baseline gap-2 mt-1" }, P = {
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
- }, K = /* @__PURE__ */ B({
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(t) {
42
- const l = t;
43
- function m(a) {
44
- return a.isPrice ? C(Number(a.value)) : a.value;
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 S = k(() => {
47
- const a = l.layout === "inline-label-value" ? "flex px-3.5 py-3" : "flex p-3", x = {
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-1",
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
- }, h = x[l.layout] || x["icon-left"];
57
- let u = "";
58
- if (l.attached)
59
- l.variant === "transparent" ? u = "border-b border-r border-transparent bg-transparent hover:bg-muted/30 transition-colors" : l.variant === "outline" ? u = "border-b border-r border-border bg-transparent hover:bg-muted/30 transition-colors" : u = "border-b border-r border-border bg-card hover:bg-muted/30 transition-colors";
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 (l.variant) {
72
+ switch (i.variant) {
62
73
  case "solid": {
63
- const w = l.item.color || "primary", v = {
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
- u = `${v[w] || v.primary}`;
82
+ m = `${B[N] || B.primary}`;
72
83
  break;
73
84
  }
74
85
  case "outline":
75
- u = "border border-border";
86
+ m = "border border-border";
76
87
  break;
77
88
  case "shadow":
78
- u = "bg-card shadow-md border border-border/50";
89
+ m = "bg-card shadow-md border border-border/50";
79
90
  break;
80
91
  case "transparent":
81
- u = "bg-transparent";
92
+ m = "bg-transparent";
82
93
  break;
83
94
  }
84
- u += " rounded-lg";
95
+ m += " rounded-lg";
85
96
  }
86
- return [a, h, u].join(" ");
87
- }), z = k(() => {
88
- if (l.variant === "solid" && !l.attached) {
89
- const a = l.item.color;
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 (l.layout === "split-bar") {
94
- const a = l.item.color, x = {
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: x[a] || a };
114
+ return { borderLeftColor: u[a] || a };
104
115
  }
105
116
  return {};
106
117
  });
107
- return (a, x) => (e(), i("div", {
108
- class: n(S.value),
109
- style: I(z.value)
118
+ return (a, u) => (t(), o("div", {
119
+ class: r(F.value),
120
+ style: $(j.value)
110
121
  }, [
111
- t.layout === "title-top-icon-bottom-right" ? (e(), i(b, { key: 0 }, [
112
- r("h3", {
113
- class: n(t.titleSize || "text-sm font-medium text-muted-foreground truncate w-full")
114
- }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
115
- r("div", j, [
116
- r("div", null, [
117
- t.loading ? (e(), i("div", $)) : (e(), i("p", {
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
- class: n(t.valueSize || "text-2xl font-bold text-foreground truncate")
120
- }, o(m(t.item)), 3)),
121
- t.item.trend && !t.loading ? (e(), c(f, {
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: t.item.trend,
124
- layout: t.layout
142
+ trend: e.item.trend,
143
+ layout: e.layout
125
144
  }, null, 8, ["trend", "layout"])) : d("", !0)
126
145
  ]),
127
- t.item.icon ? (e(), c(g, {
146
+ e.item.icon ? (t(), n(S, {
128
147
  key: 0,
129
- item: t.item,
130
- variant: t.variant,
131
- layout: t.layout,
132
- attached: t.attached,
133
- "icon-box-shape": t.iconBoxShape,
134
- "icon-box-style": t.iconBoxStyle,
135
- "icon-size": t.iconSize
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)) : t.layout === "centered-value-title" ? (e(), i(b, { key: 1 }, [
139
- t.loading ? (e(), i("div", N)) : (e(), i("p", {
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
- class: n(t.valueSize || "text-3xl font-bold text-foreground")
142
- }, o(m(t.item)), 3)),
143
- r("h3", {
144
- class: n(t.titleSize || "text-sm font-medium text-muted-foreground")
145
- }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
146
- t.item.trend && !t.loading ? (e(), c(f, {
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: t.item.trend,
149
- layout: t.layout
175
+ trend: e.item.trend,
176
+ layout: e.layout
150
177
  }, null, 8, ["trend", "layout"])) : d("", !0)
151
- ], 64)) : t.layout === "floating-icon" ? (e(), i(b, { key: 2 }, [
152
- t.item.icon ? (e(), c(g, {
178
+ ], 64)) : e.layout === "floating-icon" ? (t(), o(k, { key: 2 }, [
179
+ e.item.icon ? (t(), n(S, {
153
180
  key: 0,
154
- item: t.item,
155
- variant: t.variant,
156
- layout: t.layout,
157
- attached: t.attached,
158
- "icon-box-shape": t.iconBoxShape,
159
- "icon-box-style": t.iconBoxStyle,
160
- "icon-size": t.iconSize,
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
- r("h3", {
164
- class: n(t.titleSize || "text-sm font-medium text-muted-foreground truncate pr-12")
165
- }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
166
- t.loading ? (e(), i("div", V)) : (e(), i("p", {
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
- class: n(t.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
169
- }, o(m(t.item)), 3)),
170
- t.item.trend && !t.loading ? (e(), c(f, {
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: t.item.trend,
173
- layout: t.layout
207
+ trend: e.item.trend,
208
+ layout: e.layout
174
209
  }, null, 8, ["trend", "layout"])) : d("", !0)
175
- ], 64)) : t.layout === "split-bar" ? (e(), i("div", E, [
176
- r("h3", {
177
- class: n(
178
- t.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
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
- }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
181
- t.loading ? (e(), i("div", M)) : (e(), i("p", {
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
- class: n(t.valueSize || "text-3xl font-black text-foreground truncate mt-0.5")
184
- }, o(m(t.item)), 3)),
185
- t.item.trend && !t.loading ? (e(), c(f, {
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: t.item.trend,
188
- layout: t.layout
230
+ trend: e.item.trend,
231
+ layout: e.layout
189
232
  }, null, 8, ["trend", "layout"])) : d("", !0)
190
- ])) : t.layout === "inline-label-value" ? (e(), i(b, { key: 4 }, [
191
- t.item.icon ? (e(), c(g, {
233
+ ])) : e.layout === "inline-label-value" ? (t(), o(k, { key: 4 }, [
234
+ e.item.icon ? (t(), n(S, {
192
235
  key: 0,
193
- item: t.item,
194
- variant: t.variant,
195
- layout: t.layout,
196
- attached: t.attached,
197
- "icon-box-shape": t.iconBoxShape,
198
- "icon-box-style": t.iconBoxStyle,
199
- "icon-size": t.iconSize
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
- r("span", {
202
- class: n([t.titleSize || "-text-fs-2 font-medium text-muted-foreground truncate", "flex-1 min-w-0"])
203
- }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
204
- t.loading ? (e(), i("div", D)) : (e(), i("span", {
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
- class: n(t.valueSize || "-text-fs-1 font-semibold text-foreground tabular-nums shrink-0")
207
- }, o(m(t.item)), 3)),
208
- t.item.trend && !t.loading ? (e(), c(f, {
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: t.item.trend,
211
- layout: t.layout
261
+ trend: e.item.trend,
262
+ layout: e.layout
212
263
  }, null, 8, ["trend", "layout"])) : d("", !0)
213
- ], 64)) : (e(), i(b, { key: 5 }, [
214
- t.item.icon && t.layout !== "icon-right" ? (e(), c(g, {
264
+ ], 64)) : (t(), o(k, { key: 5 }, [
265
+ e.item.icon && e.layout !== "icon-right" ? (t(), n(S, {
215
266
  key: 0,
216
- item: t.item,
217
- variant: t.variant,
218
- layout: t.layout,
219
- attached: t.attached,
220
- "icon-box-shape": t.iconBoxShape,
221
- "icon-box-style": t.iconBoxStyle,
222
- "icon-size": t.iconSize
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
- r("div", F, [
225
- r("h3", {
226
- class: n(t.titleSize || "text-sm font-medium text-muted-foreground truncate")
227
- }, o(t.item.titleI18n ? y(s)(t.item.titleI18n) : t.item.title), 3),
228
- r("div", L, [
229
- t.loading ? (e(), i("div", P)) : (e(), i("p", {
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
- class: n(t.valueSize || "text-2xl font-bold text-foreground truncate")
232
- }, o(m(t.item)), 3))
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
- t.item.trend && !t.loading ? (e(), c(f, {
293
+ e.item.trend && !e.loading ? (t(), n(h, {
235
294
  key: 0,
236
- trend: t.item.trend,
237
- layout: t.layout
295
+ trend: e.item.trend,
296
+ layout: e.layout
238
297
  }, null, 8, ["trend", "layout"])) : d("", !0)
239
298
  ]),
240
- t.item.icon && t.layout === "icon-right" ? (e(), c(g, {
299
+ e.item.icon && e.layout === "icon-right" ? (t(), n(S, {
241
300
  key: 1,
242
- item: t.item,
243
- variant: t.variant,
244
- layout: t.layout,
245
- attached: t.attached,
246
- "icon-box-shape": t.iconBoxShape,
247
- "icon-box-style": t.iconBoxStyle,
248
- "icon-size": t.iconSize
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
- K as default
314
+ Y as default
256
315
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as s, computed as o, openBlock as l, createElementBlock as n, normalizeClass as u, Fragment as g, renderList as f, createBlock as m } from "vue";
2
- import S from "./StatItem.vue.js";
3
- const z = /* @__PURE__ */ s({
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 a = e, r = o(() => {
21
- const t = Number(a.columns) || 4;
22
- return t === 1 ? "grid-cols-1" : t === 2 ? "grid-cols-1 sm:grid-cols-2" : t === 3 ? "grid-cols-1 sm:grid-cols-3" : t === 4 ? "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4" : t === 5 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-5" : t === 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 = o(() => {
24
- const t = a.attached && a.variant !== "transparent" ? "border-t border-l border-border overflow-hidden" : "overflow-hidden";
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
- r.value,
28
- a.attached ? `gap-0 ${t}` : "gap-3 sm:gap-4.5",
29
- a.variant === "shadow" && a.attached ? "shadow-md" : "",
30
- a?.layout === "inline-label-value" ? "rounded-sm" : "",
31
- a.class
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 (t, h) => (l(), n("div", {
34
+ return (a, S) => (l(), r("div", {
35
35
  class: u(d.value)
36
36
  }, [
37
- (l(!0), n(g, null, f(e.items, (i, c) => (l(), m(S, {
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
- z as default
54
+ x as default
55
55
  };