vlite3 1.4.19 → 1.4.21

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.
@@ -22,8 +22,8 @@ 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 */
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
4
4
  import { $t as E } from "../../utils/i18n.js";
5
5
  import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
6
6
  import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
7
- import ee from "./CommandPaletteItem.vue.js";
7
+ import ee from "./CommandPaletteItem.vue2.js";
8
8
  const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
9
9
  key: 0,
10
10
  class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
@@ -1,5 +1,5 @@
1
1
  import t from "./CommandPaletteItem.vue3.js";
2
- /* empty css */
2
+ /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-66b1ae06"]]);
5
5
  export {
@@ -1,27 +1,27 @@
1
- import { defineComponent as E, computed as s, markRaw as M, openBlock as c, createBlock as m, mergeProps as p, toHandlers as L, createSlots as q, unref as P, withCtx as u, createVNode as N, createTextVNode as b, toDisplayString as y, createCommentVNode as B, resolveDynamicComponent as G } from "vue";
2
- import { resolveFieldType as J, isComponent as R, isAddonObject as x } from "./utils/form.utils.js";
3
- import K from "../NumberInput.vue.js";
1
+ import { defineComponent as E, computed as f, markRaw as O, openBlock as c, createBlock as m, mergeProps as p, toHandlers as C, createSlots as M, unref as P, withCtx as u, createVNode as L, createTextVNode as y, toDisplayString as x, createCommentVNode as N, resolveDynamicComponent as q } from "vue";
2
+ import { resolveFieldType as G, isComponent as k, isAddonObject as B } from "./utils/form.utils.js";
3
+ import J from "../NumberInput.vue.js";
4
4
  import z from "../Button.vue.js";
5
- import { $t as Q } from "../../utils/i18n.js";
5
+ import { $t as K } from "../../utils/i18n.js";
6
6
  import V from "../Input.vue.js";
7
7
  /* empty css */
8
- import W from "../Switch.vue.js";
9
- import X from "../CheckBox.vue.js";
10
- import Y from "../FilePicker/index.vue.js";
11
- import Z from "../AvatarUploader/AvatarUploader.vue.js";
12
- import _ from "../ThumbnailSelector/ThumbnailSelector.vue.js";
13
- import ee from "../TagInput/TagInput.vue.js";
14
- import w from "../Dropdown/Dropdown.vue.js";
15
- import ae from "../MultiSelect/MultiSelect.vue.js";
16
- import le from "../DatePicker.vue.js";
17
- import ie from "../DateRangePicker.vue.js";
18
- import te from "../ColorPicker/ColorPicker.vue.js";
19
- import re from "../IconPicker.vue.js";
20
- import ne from "./index.vue.js";
21
- import de from "../ChoiceBox/ChoiceBox.vue.js";
22
- import oe from "../RichTextEditor/RichTextEditor.vue.js";
8
+ import Q from "../Switch.vue.js";
9
+ import W from "../CheckBox.vue.js";
10
+ import X from "../FilePicker/index.vue.js";
11
+ import Y from "../AvatarUploader/AvatarUploader.vue.js";
12
+ import Z from "../ThumbnailSelector/ThumbnailSelector.vue.js";
13
+ import _ from "../TagInput/TagInput.vue.js";
14
+ import R from "../Dropdown/Dropdown.vue.js";
15
+ import ee from "../MultiSelect/MultiSelect.vue.js";
16
+ import ae from "../DatePicker.vue.js";
17
+ import le from "../DateRangePicker.vue.js";
18
+ import ie from "../ColorPicker/ColorPicker.vue.js";
19
+ import te from "../IconPicker.vue.js";
20
+ import re from "./index.vue.js";
21
+ import ne from "../ChoiceBox/ChoiceBox.vue.js";
22
+ import de from "../RichTextEditor/RichTextEditor.vue.js";
23
23
  /* empty css */
24
- const Be = /* @__PURE__ */ E({
24
+ const Ne = /* @__PURE__ */ E({
25
25
  __name: "FormField",
26
26
  props: {
27
27
  field: {},
@@ -45,16 +45,16 @@ const Be = /* @__PURE__ */ E({
45
45
  v("change", { value: a, data: l });
46
46
  }, S = (a) => {
47
47
  v("change", { value: a });
48
- }, f = s(() => J(e.field, {
48
+ }, o = f(() => G(e.field, {
49
49
  values: e.values,
50
50
  globalValues: e.values,
51
51
  isUpdate: e.isUpdate
52
- })), k = s(
53
- () => f.value === "number" && e.field.isSensitiveField === !0
54
- ), U = s(() => {
55
- const a = f.value;
56
- if (R(a))
57
- return M(a);
52
+ })), b = f(
53
+ () => o.value === "number" && e.field.isSensitiveField === !0
54
+ ), U = f(() => {
55
+ const a = o.value;
56
+ if (k(a))
57
+ return O(a);
58
58
  switch (a) {
59
59
  case "text":
60
60
  case "email":
@@ -65,57 +65,57 @@ const Be = /* @__PURE__ */ E({
65
65
  case "textarea":
66
66
  return V;
67
67
  case "number":
68
- return k.value ? V : K;
68
+ return b.value ? V : J;
69
69
  case "switch":
70
- return W;
70
+ return Q;
71
71
  case "check":
72
- return X;
72
+ return W;
73
73
  case "select":
74
- return w;
74
+ return R;
75
75
  case "multiSelect":
76
- return ae;
76
+ return ee;
77
77
  case "choiceBox":
78
- return de;
78
+ return ne;
79
79
  case "date":
80
80
  case "time":
81
- return le;
81
+ return ae;
82
82
  case "dateRangePicker":
83
- return ie;
83
+ return le;
84
84
  case "file":
85
85
  case "fileUploader":
86
- return Y;
86
+ return X;
87
87
  case "avatarUpload":
88
- return Z;
88
+ return Y;
89
89
  case "color":
90
- return te;
90
+ return ie;
91
91
  case "iconPicker":
92
- return re;
92
+ return te;
93
93
  case "customFields":
94
- return ne;
94
+ return re;
95
95
  case "thumbnailSelector":
96
- return _;
96
+ return Z;
97
97
  case "tags":
98
- return ee;
98
+ return _;
99
99
  case "richTextEditor":
100
- return oe;
100
+ return de;
101
101
  default:
102
102
  return V;
103
103
  }
104
- }), A = s(() => {
105
- const a = f.value, { disabled: l, readonly: r, ...g } = e.field, t = {
104
+ }), w = f(() => {
105
+ const a = o.value, { disabled: l, readonly: r, ...g } = e.field, t = {
106
106
  ...g,
107
107
  disabled: e.disabled || l === !0,
108
108
  readonly: e.readonly || r === !0,
109
109
  ...e.field.props || {},
110
110
  label: "",
111
111
  labelI18n: ""
112
- }, h = e.field.placeholderI18n ? Q(e.field.placeholderI18n) : e.field.placeholder, I = e.variant === "floating" && e.label && !e.floatingActive, o = I ? "" : h;
112
+ }, h = e.field.placeholderI18n ? K(e.field.placeholderI18n) : e.field.placeholder, I = e.variant === "floating" && e.label && !e.floatingActive, s = I ? "" : h;
113
113
  if (a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || a === "textarea" || !a)
114
114
  return {
115
115
  ...t,
116
116
  modelValue: e.value ?? "",
117
117
  type: a || "text",
118
- placeholder: o,
118
+ placeholder: s,
119
119
  label: e.label,
120
120
  icon: e.field.icon,
121
121
  iconRight: e.field.iconRight,
@@ -131,14 +131,14 @@ const Be = /* @__PURE__ */ E({
131
131
  rows: a === "textarea" ? e.field.props?.rows || 3 : void 0,
132
132
  class: `${e.field.className || ""}`
133
133
  };
134
- if (a === "number" && k.value)
134
+ if (a === "number" && b.value)
135
135
  return {
136
136
  ...t,
137
137
  // Convert numeric value to string so Input.vue (string-based) displays it correctly
138
138
  modelValue: e.value !== void 0 && e.value !== null ? String(e.value) : "",
139
139
  // 'password' activates the eye-toggle inside Input.vue
140
140
  type: "password",
141
- placeholder: o,
141
+ placeholder: s,
142
142
  label: e.label,
143
143
  variant: e.variant,
144
144
  size: e.size,
@@ -159,15 +159,15 @@ const Be = /* @__PURE__ */ E({
159
159
  mode: e.field.props?.mode ?? (e.variant === "transparent" ? "ghost" : "outline"),
160
160
  size: e.size,
161
161
  rounded: e.rounded,
162
- placeholder: o,
162
+ placeholder: s,
163
163
  class: e.field.className
164
164
  };
165
165
  if (a === "switch") {
166
166
  const {
167
167
  variant: n,
168
- rounded: se,
169
- error: ue,
170
- switchVariant: fe,
168
+ rounded: oe,
169
+ error: se,
170
+ switchVariant: ue,
171
171
  ...D
172
172
  } = t;
173
173
  return {
@@ -194,7 +194,7 @@ const Be = /* @__PURE__ */ E({
194
194
  ...t,
195
195
  modelValue: e.value,
196
196
  options: e.field.options || [],
197
- placeholder: o,
197
+ placeholder: s,
198
198
  selectable: !0,
199
199
  closeOnSelect: !0,
200
200
  triggerProps: {
@@ -243,7 +243,7 @@ const Be = /* @__PURE__ */ E({
243
243
  ...t,
244
244
  modelValue: e.value,
245
245
  mode: a === "time" ? "time" : "date",
246
- placeholder: o,
246
+ placeholder: s,
247
247
  btnProps: {
248
248
  variant: e.variant === "floating" ? "outline-floating" : e.variant || "outline",
249
249
  size: e.size,
@@ -267,7 +267,7 @@ const Be = /* @__PURE__ */ E({
267
267
  fileTypes: e.field.props?.accept ? e.field.props.accept.split(",") : [],
268
268
  returnFormat: "base64",
269
269
  variant: e.field.props?.variant ?? (a === "file" ? "input" : "dropzone"),
270
- placeholder: o,
270
+ placeholder: s,
271
271
  size: e.size,
272
272
  rounded: e.rounded,
273
273
  maxSize: e.field.maxFileSize ? e.field.maxFileSize * 1024 * 1024 : void 0,
@@ -287,7 +287,7 @@ const Be = /* @__PURE__ */ E({
287
287
  return {
288
288
  ...t,
289
289
  modelValue: Array.isArray(e.value) ? e.value : [],
290
- placeholder: o,
290
+ placeholder: s,
291
291
  variant: e.variant,
292
292
  size: e.size,
293
293
  rounded: e.rounded,
@@ -298,7 +298,7 @@ const Be = /* @__PURE__ */ E({
298
298
  return {
299
299
  ...t,
300
300
  modelValue: e.value ?? "",
301
- placeholder: o,
301
+ placeholder: s,
302
302
  label: void 0,
303
303
  error: e.error,
304
304
  minHeight: e.field.props?.minHeight || "140px",
@@ -348,16 +348,16 @@ const Be = /* @__PURE__ */ E({
348
348
  label: e.field.label
349
349
  };
350
350
  }
351
- return R(a) ? {
351
+ return k(a) ? {
352
352
  ...t,
353
353
  value: e.field.props?.multiple && (e.value === null || e.value === void 0) ? [] : e.value,
354
354
  values: e.values
355
355
  } : t;
356
- }), $ = s(() => {
357
- const a = f.value;
356
+ }), $ = f(() => {
357
+ const a = o.value;
358
358
  return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || a === "textarea" || a === "switch" || a === "check" || !a ? {
359
359
  "update:modelValue": S
360
- } : a === "number" && k.value ? {
360
+ } : a === "number" && b.value ? {
361
361
  "update:modelValue": (l) => {
362
362
  const r = l === "" ? void 0 : Number(l);
363
363
  v("change", { value: isNaN(r) ? void 0 : r });
@@ -417,37 +417,37 @@ const Be = /* @__PURE__ */ E({
417
417
  const r = e.value && typeof e.value == "object" ? e.value : { images: [], thumbnail: null };
418
418
  d({ ...r, thumbnail: l });
419
419
  }
420
- } : R(a) ? {
420
+ } : k(a) ? {
421
421
  onChange: (l) => {
422
422
  d(l.value, l.data);
423
423
  }
424
424
  } : {};
425
- }), j = s(() => x(e.field.addonLeft) || x(e.field.addonRight)), H = s(() => {
426
- const a = f.value;
425
+ }), H = f(() => {
426
+ const a = o.value;
427
427
  return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || !a;
428
- }), O = s(() => j.value && H.value), F = (a, l) => {
428
+ }), j = f(() => H.value || o.value === "textarea" || b.value), A = (a, l) => {
429
429
  v("addonChange", a.name, { value: l.value });
430
- }, C = (a) => {
430
+ }, F = (a) => {
431
431
  a.action && v("addonAction", a.action);
432
432
  };
433
- return (a, l) => O.value ? (c(), m(V, p({ key: 0 }, {
434
- ...A.value,
433
+ return (a, l) => j.value ? (c(), m(V, p({ key: 0 }, {
434
+ ...w.value,
435
435
  ...i.field?.props || {}
436
- }, L($.value)), q({ _: 2 }, [
437
- P(x)(i.field.addonLeft) ? {
436
+ }, C($.value)), M({ _: 2 }, [
437
+ P(B)(i.field.addonLeft) ? {
438
438
  name: "addon-left",
439
439
  fn: u(() => [
440
- i.field.addonLeft.type === "select" ? (c(), m(w, p({
440
+ i.field.addonLeft.type === "select" ? (c(), m(R, p({
441
441
  key: 0,
442
442
  modelValue: i.field.addonLeft.name ? i.values[i.field.addonLeft.name] : void 0,
443
443
  options: i.field.addonLeft.options || []
444
444
  }, i.field.addonLeft.props || {}, {
445
- onOnSelect: l[0] || (l[0] = (r) => F(i.field.addonLeft, r))
445
+ onOnSelect: l[0] || (l[0] = (r) => A(i.field.addonLeft, r))
446
446
  }), {
447
447
  trigger: u(({ selectedLabel: r }) => [
448
- N(z, { variant: "outline" }, {
448
+ L(z, { variant: "outline" }, {
449
449
  default: u(() => [
450
- b(y(r), 1)
450
+ y(x(r), 1)
451
451
  ]),
452
452
  _: 2
453
453
  }, 1024)
@@ -457,30 +457,30 @@ const Be = /* @__PURE__ */ E({
457
457
  key: 1,
458
458
  variant: "outline"
459
459
  }, i.field.addonLeft.props || {}, {
460
- onClick: l[1] || (l[1] = (r) => C(i.field.addonLeft))
460
+ onClick: l[1] || (l[1] = (r) => F(i.field.addonLeft))
461
461
  }), {
462
462
  default: u(() => [
463
- b(y(i.field.addonLeft.text), 1)
463
+ y(x(i.field.addonLeft.text), 1)
464
464
  ]),
465
465
  _: 1
466
- }, 16)) : B("", !0)
466
+ }, 16)) : N("", !0)
467
467
  ]),
468
468
  key: "0"
469
469
  } : void 0,
470
- P(x)(i.field.addonRight) ? {
470
+ P(B)(i.field.addonRight) ? {
471
471
  name: "addon-right",
472
472
  fn: u(() => [
473
- i.field.addonRight.type === "select" ? (c(), m(w, p({
473
+ i.field.addonRight.type === "select" ? (c(), m(R, p({
474
474
  key: 0,
475
475
  modelValue: i.field.addonRight.name ? i.values[i.field.addonRight.name] : void 0,
476
476
  options: i.field.addonRight.options || []
477
477
  }, i.field.addonRight.props || {}, {
478
- onOnSelect: l[2] || (l[2] = (r) => F(i.field.addonRight, r))
478
+ onOnSelect: l[2] || (l[2] = (r) => A(i.field.addonRight, r))
479
479
  }), {
480
480
  trigger: u(({ selectedLabel: r }) => [
481
- N(z, { variant: "outline" }, {
481
+ L(z, { variant: "outline" }, {
482
482
  default: u(() => [
483
- b(y(r), 1)
483
+ y(x(r), 1)
484
484
  ]),
485
485
  _: 2
486
486
  }, 1024)
@@ -490,25 +490,25 @@ const Be = /* @__PURE__ */ E({
490
490
  key: 1,
491
491
  variant: "outline"
492
492
  }, i.field.addonRight.props || {}, {
493
- onClick: l[3] || (l[3] = (r) => C(i.field.addonRight))
493
+ onClick: l[3] || (l[3] = (r) => F(i.field.addonRight))
494
494
  }), {
495
495
  default: u(() => [
496
- b(y(i.field.addonRight.text), 1)
496
+ y(x(i.field.addonRight.text), 1)
497
497
  ]),
498
498
  _: 1
499
- }, 16)) : B("", !0)
499
+ }, 16)) : N("", !0)
500
500
  ]),
501
501
  key: "1"
502
502
  } : void 0
503
- ]), 1040)) : (c(), m(G(U.value), p({
503
+ ]), 1040)) : (c(), m(q(U.value), p({
504
504
  key: 1,
505
- class: f.value === "check" || f.value === "switch" && i.field.props?.switchVariant === "basic" ? "" : "w-full"
505
+ class: o.value === "check" || o.value === "switch" && i.field.props?.switchVariant === "basic" ? "" : "w-full"
506
506
  }, {
507
- ...A.value,
507
+ ...w.value,
508
508
  ...i.field?.props || {}
509
- }, L($.value)), null, 16, ["class"]));
509
+ }, C($.value)), null, 16, ["class"]));
510
510
  }
511
511
  });
512
512
  export {
513
- Be as default
513
+ Ne as default
514
514
  };
@@ -3,7 +3,7 @@ import L from "./Icon.vue.js";
3
3
  import v from "./Modal.vue.js";
4
4
  import N from "./CommandPalette/CommandPaletteContent.vue.js";
5
5
  import { $t as U } from "../utils/i18n.js";
6
- /* empty css */
6
+ /* empty css */
7
7
  const V = { class: "block truncate -text-fs-1.5" }, S = { class: "ml-auto inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border border-border/80 bg-background text-muted-foreground ml-1" }, A = /* @__PURE__ */ x({
8
8
  __name: "NavbarCommandPalette",
9
9
  props: {
@@ -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.vue2.js";
4
- /* empty css */
5
- import de from "./RichTextLinkPopover.vue2.js";
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({
@@ -1,5 +1,5 @@
1
- import o from "./RichTextLinkPopover.vue2.js";
2
- /* empty css */
1
+ import o from "./RichTextLinkPopover.vue.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1,5 +1,5 @@
1
- import o from "./RichTextToolbar.vue2.js";
2
- /* empty css */
1
+ import o from "./RichTextToolbar.vue.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -21,8 +21,8 @@ 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 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";
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: "icon-left" },
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(e) {
44
- const i = e;
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(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;
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(i.item.value) || 0;
56
- return i.item.isPrice ? C(a, { numberFormat: "standard" }) : i.item.numberFormat ? I(a, { numberFormat: "standard" }) : String(i.item.value);
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 = 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 = {
59
- "icon-left": "flex-row items-center gap-3 text-left",
60
- "icon-right": "flex-row items-center justify-between gap-3 text-left",
61
- "icon-top": "flex-col items-start gap-1 px-5! pt-2! text-left",
62
- "title-top-icon-bottom-right": "flex-col items-start gap-0 text-left px-5! py-4!",
63
- "centered-value-title": "flex-col items-center justify-center text-center gap-0",
64
- "floating-icon": "flex-col items-start gap-1 text-left relative",
65
- "split-bar": "flex-row items-center gap-3 text-left border-l-4",
66
- "inline-label-value": "flex-row items-center gap-2.5 text-left"
67
- }, z = u[i.layout] || u["icon-left"];
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 (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";
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 (i.variant) {
72
+ switch (n.variant) {
73
73
  case "solid": {
74
- const N = i.item.color || "primary", B = {
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 (i.variant === "solid" && !i.attached) {
100
- const a = i.item.color;
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 (i.layout === "split-bar") {
105
- const a = i.item.color, u = {
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) => (t(), o("div", {
118
+ return (a, u) => (e(), o("div", {
119
119
  class: r(F.value),
120
120
  style: $(j.value)
121
121
  }, [
122
- e.layout === "title-top-icon-bottom-right" ? (t(), o(k, { key: 0 }, [
122
+ t.layout === "layout-4" ? (e(), o(k, { key: 0 }, [
123
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),
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
- e.loading ? (t(), o("div", M)) : (t(), n(v, {
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(e.valueSize || "text-2xl font-bold text-foreground truncate")
136
- }, c(s(e.item)), 3)
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
- e.item.trend && !e.loading ? (t(), n(h, {
140
+ t.item.trend && !t.loading ? (e(), i(h, {
141
141
  key: 2,
142
- trend: e.item.trend,
143
- layout: e.layout
142
+ trend: t.item.trend,
143
+ layout: t.layout
144
144
  }, null, 8, ["trend", "layout"])) : d("", !0)
145
145
  ]),
146
- e.item.icon ? (t(), n(S, {
146
+ t.item.icon ? (e(), i(S, {
147
147
  key: 0,
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
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)) : e.layout === "centered-value-title" ? (t(), o(k, { key: 1 }, [
158
- e.loading ? (t(), o("div", E)) : (t(), n(v, {
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(e.valueSize || "text-3xl font-bold text-foreground")
166
- }, c(s(e.item)), 3)
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(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, {
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: e.item.trend,
176
- layout: e.layout
175
+ trend: t.item.trend,
176
+ layout: t.layout
177
177
  }, null, 8, ["trend", "layout"])) : d("", !0)
178
- ], 64)) : e.layout === "floating-icon" ? (t(), o(k, { key: 2 }, [
179
- e.item.icon ? (t(), n(S, {
178
+ ], 64)) : t.layout === "layout-6" ? (e(), o(k, { key: 2 }, [
179
+ t.item.icon ? (e(), i(S, {
180
180
  key: 0,
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,
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(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, {
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(e.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
201
- }, c(s(e.item)), 3)
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
- e.item.trend && !e.loading ? (t(), n(h, {
205
+ t.item.trend && !t.loading ? (e(), i(h, {
206
206
  key: 3,
207
- trend: e.item.trend,
208
- layout: e.layout
207
+ trend: t.item.trend,
208
+ layout: t.layout
209
209
  }, null, 8, ["trend", "layout"])) : d("", !0)
210
- ], 64)) : e.layout === "split-bar" ? (t(), o("div", L, [
210
+ ], 64)) : t.layout === "layout-7" ? (e(), o("div", L, [
211
211
  l("h3", {
212
212
  class: r(
213
- e.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
213
+ t.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
214
214
  )
215
- }, c(e.item.titleI18n ? b(x)(e.item.titleI18n) : e.item.title), 3),
216
- e.loading ? (t(), o("div", q)) : (t(), n(v, {
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(e.valueSize || "text-3xl font-black text-foreground truncate mt-0.5")
224
- }, c(s(e.item)), 3)
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
- e.item.trend && !e.loading ? (t(), n(h, {
228
+ t.item.trend && !t.loading ? (e(), i(h, {
229
229
  key: 2,
230
- trend: e.item.trend,
231
- layout: e.layout
230
+ trend: t.item.trend,
231
+ layout: t.layout
232
232
  }, null, 8, ["trend", "layout"])) : d("", !0)
233
- ])) : e.layout === "inline-label-value" ? (t(), o(k, { key: 4 }, [
234
- e.item.icon ? (t(), n(S, {
233
+ ])) : t.layout === "layout-8" ? (e(), o(k, { key: 4 }, [
234
+ t.item.icon ? (e(), i(S, {
235
235
  key: 0,
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
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([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, {
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(e.valueSize || "-text-fs-1 font-semibold text-foreground tabular-nums shrink-0")
255
- }, c(s(e.item)), 3)
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
- e.item.trend && !e.loading ? (t(), n(h, {
259
+ t.item.trend && !t.loading ? (e(), i(h, {
260
260
  key: 3,
261
- trend: e.item.trend,
262
- layout: e.layout
261
+ trend: t.item.trend,
262
+ layout: t.layout
263
263
  }, null, 8, ["trend", "layout"])) : d("", !0)
264
- ], 64)) : (t(), o(k, { key: 5 }, [
265
- e.item.icon && e.layout !== "icon-right" ? (t(), n(S, {
264
+ ], 64)) : (e(), o(k, { key: 5 }, [
265
+ t.item.icon && t.layout !== "layout-2" ? (e(), i(S, {
266
266
  key: 0,
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
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(e.titleSize || "text-sm font-medium text-muted-foreground truncate")
278
- }, c(e.item.titleI18n ? b(x)(e.item.titleI18n) : e.item.title), 3),
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
- e.loading ? (t(), o("div", J)) : (t(), n(v, {
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(e.valueSize || "text-2xl font-bold text-foreground truncate")
288
- }, c(s(e.item)), 3)
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
- e.item.trend && !e.loading ? (t(), n(h, {
293
+ t.item.trend && !t.loading ? (e(), i(h, {
294
294
  key: 0,
295
- trend: e.item.trend,
296
- layout: e.layout
295
+ trend: t.item.trend,
296
+ layout: t.layout
297
297
  }, null, 8, ["trend", "layout"])) : d("", !0)
298
298
  ]),
299
- e.item.icon && e.layout === "icon-right" ? (t(), n(S, {
299
+ t.item.icon && t.layout === "layout-2" ? (e(), i(S, {
300
300
  key: 1,
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
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 h, computed as n, openBlock as i, createElementBlock as r, normalizeClass as d, createElementVNode as x, Fragment as u, renderList as s, createBlock as g } from "vue";
2
- import v from "./StatItem.vue.js";
3
- const b = /* @__PURE__ */ h({
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: "icon-left" },
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(e) {
20
- const a = e, c = n(() => {
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
- }), S = n(() => [
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
- a.variant === "transparent-header" ? "gap-2 md:gap-3.5" : "gap-3 sm:gap-4.5",
27
- a?.layout === "inline-label-value" ? "rounded-sm" : "",
28
- a.class
29
- ].join(" ")), m = n(() => [
30
- a.layout === "inline-label-value" ? "rounded-sm" : "rounded-lg",
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
- a.variant !== "transparent" ? "border border-border" : "",
33
- a.variant === "shadow" ? "shadow-md bg-card" : "",
34
- a.class
35
- ].join(" ")), f = n(() => [
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 (t, y) => e.attached ? (i(), r("div", {
40
+ return (e, x) => a.attached ? (i(), r("div", {
41
41
  key: 0,
42
- class: d(m.value)
42
+ class: d(v.value)
43
43
  }, [
44
- x("div", {
44
+ h("div", {
45
45
  class: d(f.value)
46
46
  }, [
47
- (i(!0), r(u, null, s(e.items, (l, o) => (i(), g(v, {
48
- key: l.id || o,
49
- item: l,
50
- variant: e.variant.startsWith("transparent") ? "transparent" : e.variant,
51
- layout: e.variant === "transparent-header" ? "centered-value-title" : e.layout,
52
- attached: e.attached,
53
- loading: e.loading,
54
- titleSize: e.variant === "transparent-header" && !e.titleSize ? "text-sm font-normal! text-gray-900" : e.titleSize,
55
- valueSize: e.variant === "transparent-header" && !e.valueSize ? "text-lg font-bold text-gray-900" : e.valueSize,
56
- iconSize: e.iconSize,
57
- iconBoxShape: e.iconBoxShape,
58
- iconBoxStyle: e.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(S.value)
63
+ class: d(m.value)
64
64
  }, [
65
- (i(!0), r(u, null, s(e.items, (l, o) => (i(), g(v, {
66
- key: l.id || o,
67
- item: l,
68
- variant: e.variant.startsWith("transparent") ? "transparent" : e.variant,
69
- layout: e.variant === "transparent-header" ? "centered-value-title" : e.layout,
70
- attached: e.attached,
71
- loading: e.loading,
72
- titleSize: e.variant === "transparent-header" && !e.titleSize ? "text-sm font-normal! text-gray-900" : e.titleSize,
73
- valueSize: e.variant === "transparent-header" && !e.valueSize ? "text-lg font-bold text-gray-900" : e.valueSize,
74
- iconSize: e.iconSize,
75
- iconBoxShape: e.iconBoxShape,
76
- iconBoxStyle: e.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
- b as default
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 === "inline-label-value"), d = s(() => e.iconBoxShape === "full-rounded" ? "rounded-full" : e.iconBoxShape === "none" ? "rounded-none" : "rounded-lg"), i = s(() => {
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 a, createElementBlock as l, normalizeClass as i, createVNode as d, createTextVNode as g, toDisplayString as c, createElementVNode as v, createCommentVNode as x } from "vue";
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 y = {
3
+ const v = {
4
4
  key: 0,
5
5
  class: "text-muted-foreground truncate"
6
- }, k = /* @__PURE__ */ f({
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, o = s(() => t.layout === "inline-label-value"), r = s(() => t.layout === "centered-value-title"), u = s(() => {
14
- if (o.value)
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 === "floating-icon" || t.layout === "icon-left" || t.layout === "icon-right" || t.layout === "icon-top" ? `${n} mt-2 gap-1.5` : `${n} mt-1 gap-1`;
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) => o.value ? (a(), l("span", {
22
+ return (n, b) => u.value ? (l(), i("span", {
23
23
  key: 0,
24
- class: i(u.value)
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(" " + c(e.trend.value), 1)
31
- ], 2)) : (a(), l("div", {
30
+ g(" " + o(e.trend.value), 1)
31
+ ], 2)) : (l(), i("div", {
32
32
  key: 1,
33
- class: i(u.value)
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: i([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
37
+ class: a([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
38
38
  }, null, 8, ["icon", "class"]),
39
- v("span", {
40
- class: i([e.trend.isPositive ? "text-success-subtle-fg" : "text-danger-subtle-fg", "font-medium whitespace-nowrap"])
41
- }, c(e.trend.value), 3),
42
- e.trend.label && !r.value ? (a(), l("span", y, c(e.trend.label), 1)) : x("", !0)
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
- k as default
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 = 'icon-left' | 'icon-right' | 'icon-top' | 'title-top-icon-bottom-right' | 'centered-value-title' | 'floating-icon' | 'split-bar' | 'inline-label-value';
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
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "description": "A Vue 3 UI component library built with Tailwind CSS.",
5
5
  "license": "MIT",
6
- "version": "1.4.19",
6
+ "version": "1.4.21",
7
7
  "type": "module",
8
8
  "main": "index.js",
9
9
  "module": "index.js",