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,6 +1,6 @@
1
- import { defineComponent as y, computed as c, openBlock as d, createElementBlock as m, normalizeStyle as u, normalizeClass as i, createVNode as x, createBlock as p, createCommentVNode as k } from "vue";
2
- import g from "../../Icon.vue.js";
3
- const w = /* @__PURE__ */ y({
1
+ import { defineComponent as y, computed as s, openBlock as u, createElementBlock as m, normalizeStyle as g, normalizeClass as c, createVNode as x, createBlock as b, createCommentVNode as p } from "vue";
2
+ import f from "../../Icon.vue.js";
3
+ const S = /* @__PURE__ */ y({
4
4
  __name: "StatIconBox",
5
5
  props: {
6
6
  item: {},
@@ -12,31 +12,31 @@ const w = /* @__PURE__ */ y({
12
12
  iconSize: {},
13
13
  class: {}
14
14
  },
15
- setup(t) {
16
- const e = t, a = c(() => e.layout === "inline-label-value"), f = c(() => e.iconBoxShape === "full-rounded" ? "rounded-full" : e.iconBoxShape === "none" ? "rounded-none" : "rounded-lg"), s = c(() => {
17
- if (a.value) {
18
- const n = e.item.color || "primary";
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(() => {
17
+ if (o.value) {
18
+ const t = e.item.color || "primary";
19
19
  return `shrink-0 ${{
20
20
  primary: "text-primary",
21
21
  secondary: "text-secondary-foreground",
22
- success: "text-success-dark",
23
- warning: "text-warning-dark",
24
- danger: "text-danger-dark",
25
- info: "text-info-dark"
26
- }[n] || "text-primary"} ${e.class || ""}`;
22
+ success: "text-success-subtle-fg",
23
+ warning: "text-warning-subtle-fg",
24
+ danger: "text-danger-subtle-fg",
25
+ info: "text-info-subtle-fg"
26
+ }[t] || "text-primary"} ${e.class || ""}`;
27
27
  }
28
- const r = `flex items-center justify-center shrink-0 ${f.value} p-3 ${e.class || ""}`, o = e.item.color || "primary";
28
+ const n = `flex items-center justify-center shrink-0 ${d.value} p-3 ${e.class || ""}`, a = e.item.color || "primary";
29
29
  if (e.iconBoxStyle === "transparent")
30
- return `${r} bg-transparent ${{
30
+ return `${n} bg-transparent ${{
31
31
  primary: "text-primary",
32
32
  secondary: "text-secondary-foreground",
33
- success: "text-success-dark",
34
- warning: "text-warning-dark",
35
- danger: "text-danger-dark",
36
- info: "text-info-dark"
37
- }[o] || "text-primary"}`;
33
+ success: "text-success-subtle-fg",
34
+ warning: "text-warning-subtle-fg",
35
+ danger: "text-danger-subtle-fg",
36
+ info: "text-info-subtle-fg"
37
+ }[a] || "text-primary"}`;
38
38
  if (e.variant === "solid" && !e.attached) {
39
- const n = {
39
+ const t = {
40
40
  primary: "bg-primary text-primary-fg",
41
41
  secondary: "bg-foreground text-background",
42
42
  success: "bg-success text-success-fg",
@@ -44,39 +44,39 @@ const w = /* @__PURE__ */ y({
44
44
  danger: "bg-danger text-danger-fg",
45
45
  info: "bg-info text-info-fg"
46
46
  };
47
- return `${r} ${n[o] || n.primary}`;
47
+ return `${n} ${t[a] || t.primary}`;
48
48
  } else {
49
- const n = {
49
+ const t = {
50
50
  primary: "bg-primary-light text-primary",
51
51
  secondary: "bg-secondary text-secondary-foreground",
52
- success: "bg-success-light text-success-dark",
53
- warning: "bg-warning-light text-warning-dark",
54
- danger: "bg-danger-light text-danger-dark",
55
- info: "bg-info-light text-info-dark"
52
+ success: "bg-success-subtle text-success-subtle-fg",
53
+ warning: "bg-warning-subtle text-warning-subtle-fg",
54
+ danger: "bg-danger-subtle text-danger-subtle-fg",
55
+ info: "bg-info-subtle text-info-subtle-fg"
56
56
  };
57
- return `${r} ${n[o] || n.primary}`;
57
+ return `${n} ${t[a] || t.primary}`;
58
58
  }
59
- }), l = c(() => {
60
- const r = e.item.color;
61
- return a.value ? r && !["primary", "secondary", "success", "warning", "danger", "info"].includes(r) ? { color: r } : {} : r && !["primary", "secondary", "success", "warning", "danger", "info"].includes(r) ? e.iconBoxStyle === "transparent" ? { color: r } : e.variant === "solid" && !e.attached ? { backgroundColor: r, color: "#fff" } : { color: r, backgroundColor: `${r}20` } : {};
59
+ }), l = s(() => {
60
+ const n = e.item.color;
61
+ return o.value ? n && !["primary", "secondary", "success", "warning", "danger", "info"].includes(n) ? { color: n } : {} : n && !["primary", "secondary", "success", "warning", "danger", "info"].includes(n) ? e.iconBoxStyle === "transparent" ? { color: n } : e.variant === "solid" && !e.attached ? { backgroundColor: n, color: "#fff" } : { color: n, backgroundColor: `${n}20` } : {};
62
62
  });
63
- return (r, o) => !a.value && t.item.icon ? (d(), m("div", {
63
+ return (n, a) => !o.value && r.item.icon ? (u(), m("div", {
64
64
  key: 0,
65
- class: i(s.value),
66
- style: u(l.value)
65
+ class: c(i.value),
66
+ style: g(l.value)
67
67
  }, [
68
- x(g, {
69
- icon: t.item.icon,
70
- class: i(t.iconSize || "w-6 h-6")
68
+ x(f, {
69
+ icon: r.item.icon,
70
+ class: c(r.iconSize || "w-6 h-6")
71
71
  }, null, 8, ["icon", "class"])
72
- ], 6)) : a.value && t.item.icon ? (d(), p(g, {
72
+ ], 6)) : o.value && r.item.icon ? (u(), b(f, {
73
73
  key: 1,
74
- icon: t.item.icon,
75
- class: i([s.value, t.iconSize || "w-4.5 h-4.5"]),
76
- style: u(l.value)
77
- }, null, 8, ["icon", "class", "style"])) : k("", !0);
74
+ icon: r.item.icon,
75
+ class: c([i.value, r.iconSize || "w-4.5 h-4.5"]),
76
+ style: g(l.value)
77
+ }, null, 8, ["icon", "class", "style"])) : p("", !0);
78
78
  }
79
79
  });
80
80
  export {
81
- w as default
81
+ S as default
82
82
  };
@@ -1,48 +1,48 @@
1
- import { defineComponent as f, computed as i, openBlock as s, createElementBlock as l, normalizeClass as a, createVNode as u, createTextVNode as v, toDisplayString as r, createElementVNode as g, createCommentVNode as x } from "vue";
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";
2
2
  import m from "../../Icon.vue.js";
3
- const k = {
3
+ const y = {
4
4
  key: 0,
5
5
  class: "text-muted-foreground truncate"
6
- }, w = /* @__PURE__ */ f({
6
+ }, k = /* @__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, c = i(() => t.layout === "inline-label-value"), o = i(() => t.layout === "centered-value-title"), d = i(() => {
14
- if (c.value)
13
+ const t = e, o = s(() => t.layout === "inline-label-value"), r = s(() => t.layout === "centered-value-title"), u = s(() => {
14
+ if (o.value)
15
15
  return [
16
16
  "shrink-0 flex items-center gap-0.5 text-xs font-medium",
17
- t.trend.isPositive ? "text-success-dark" : "text-danger-dark"
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 o.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 === "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`;
21
21
  });
22
- return (n, y) => c.value ? (s(), l("span", {
22
+ return (n, b) => o.value ? (a(), l("span", {
23
23
  key: 0,
24
- class: a(d.value)
24
+ class: i(u.value)
25
25
  }, [
26
- u(m, {
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
- v(" " + r(e.trend.value), 1)
31
- ], 2)) : (s(), l("div", {
30
+ g(" " + c(e.trend.value), 1)
31
+ ], 2)) : (a(), l("div", {
32
32
  key: 1,
33
- class: a(d.value)
33
+ class: i(u.value)
34
34
  }, [
35
- u(m, {
35
+ d(m, {
36
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"])
37
+ class: i([e.trend.isPositive ? "text-success" : "text-danger", "w-4 h-4 shrink-0"])
38
38
  }, null, 8, ["icon", "class"]),
39
- g("span", {
40
- class: a([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
41
- }, r(e.trend.value), 3),
42
- e.trend.label && !o.value ? (s(), l("span", k, r(e.trend.label), 1)) : x("", !0)
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)
43
43
  ], 2));
44
44
  }
45
45
  });
46
46
  export {
47
- w as default
47
+ k as default
48
48
  };
@@ -1,4 +1,4 @@
1
- export type StatsVariant = 'solid' | 'outline' | 'shadow' | 'transparent';
1
+ export type StatsVariant = 'solid' | 'outline' | 'shadow' | 'transparent' | 'transparent-header';
2
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';
3
3
  export type IconBoxShape = 'rounded' | 'full-rounded' | 'none';
4
4
  export type IconBoxStyle = 'filled' | 'transparent';
@@ -13,6 +13,8 @@ export interface StatItemSchema {
13
13
  titleI18n?: string;
14
14
  value: string | number;
15
15
  isPrice?: boolean;
16
+ numberFormat?: 'standard' | 'compact';
17
+ compactThreshold?: number;
16
18
  icon?: string;
17
19
  color?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | string;
18
20
  trend?: StatTrend;
@@ -1,4 +1,4 @@
1
- import { defineComponent as C, computed as g, openBlock as r, createElementBlock as d, normalizeClass as k, createElementVNode as y, normalizeStyle as S, createCommentVNode as P, Fragment as p, renderList as B, isMemoSame as T, createBlock as z, withCtx as o, renderSlot as n, mergeProps as s } from "vue";
1
+ import { defineComponent as p, computed as g, openBlock as r, createElementBlock as d, normalizeClass as k, createElementVNode as b, normalizeStyle as S, createCommentVNode as P, Fragment as C, renderList as B, isMemoSame as T, createBlock as z, withCtx as o, renderSlot as n, mergeProps as s } from "vue";
2
2
  import V from "./TimelineItem.vue.js";
3
3
  const E = {
4
4
  key: 0,
@@ -8,7 +8,7 @@ const E = {
8
8
  key: 1,
9
9
  class: "absolute top-4 left-4 right-4 h-0.5 bg-border block sm:hidden",
10
10
  "aria-hidden": "true"
11
- }, L = /* @__PURE__ */ C({
11
+ }, L = /* @__PURE__ */ p({
12
12
  __name: "Timeline",
13
13
  props: {
14
14
  steps: {},
@@ -22,14 +22,14 @@ const E = {
22
22
  },
23
23
  emits: ["step-click"],
24
24
  setup(e, { emit: w }) {
25
- const l = e, x = w, a = g(() => l.direction === "vertical"), b = g(() => l.steps.length <= 1 ? 0 : Math.min(l.activeStep, l.steps.length - 1) / (l.steps.length - 1) * 100), $ = (i, f) => {
25
+ const l = e, x = w, a = g(() => l.direction === "vertical"), y = g(() => l.steps.length <= 1 ? 0 : Math.min(l.activeStep, l.steps.length - 1) / (l.steps.length - 1) * 100), $ = (i, f) => {
26
26
  x("step-click", i, f);
27
27
  };
28
28
  return (i, f) => (r(), d("nav", {
29
29
  "aria-label": "Progress",
30
- class: k(["w-full", l.class])
30
+ class: k(["w-full pb-5", l.class])
31
31
  }, [
32
- y("ol", {
32
+ b("ol", {
33
33
  role: "list",
34
34
  class: k([
35
35
  "relative flex",
@@ -39,19 +39,29 @@ const E = {
39
39
  ])
40
40
  }, [
41
41
  !a.value && e.textPosition === "bottom" ? (r(), d("div", E, [
42
- y("div", {
42
+ b("div", {
43
43
  class: "h-full bg-primary transition-all duration-300 ease-in-out",
44
- style: S({ width: `${b.value}%` })
44
+ style: S({ width: `${y.value}%` })
45
45
  }, null, 4)
46
46
  ])) : P("", !0),
47
47
  !a.value && e.textPosition === "right" ? (r(), d("div", M, [
48
- y("div", {
48
+ b("div", {
49
49
  class: "h-full bg-primary transition-all duration-300 ease-in-out",
50
- style: S({ width: `${b.value}%` })
50
+ style: S({ width: `${y.value}%` })
51
51
  }, null, 4)
52
52
  ])) : P("", !0),
53
- (r(!0), d(p, null, B(e.steps, (c, m, N, u) => {
54
- const v = [c, m, e.activeStep, e.direction, e.textPosition, e.lineStyle, e.indicatorType, e.clickable, e.steps.length];
53
+ (r(!0), d(C, null, B(e.steps, (c, m, N, u) => {
54
+ const v = [
55
+ c,
56
+ m,
57
+ e.activeStep,
58
+ e.direction,
59
+ e.textPosition,
60
+ e.lineStyle,
61
+ e.indicatorType,
62
+ e.clickable,
63
+ e.steps.length
64
+ ];
55
65
  if (u && u.key === c.id && T(u, v)) return u;
56
66
  const h = (r(), z(V, {
57
67
  key: c.id,
@@ -60,7 +60,7 @@ const B = { class: "flex flex-col items-center shrink-0 mr-4 w-9" }, V = { class
60
60
  }, null, 2))
61
61
  ]),
62
62
  i("div", {
63
- class: o(["flex-1 flex flex-col pt-0.5", e.isLast ? "pb-0" : "pb-10"])
63
+ class: o(["flex-1 flex flex-col pt-0.5", e.isLast ? "pb-0" : "pb-5"])
64
64
  }, [
65
65
  a(t.$slots, "content", {
66
66
  step: e.step,
package/core/config.d.ts CHANGED
@@ -32,6 +32,8 @@ export declare const configState: {
32
32
  };
33
33
  price?: {
34
34
  currency?: string;
35
+ numberFormat?: "standard" | "compact";
36
+ compactThreshold?: number;
35
37
  };
36
38
  datetime?: {
37
39
  format?: string;
@@ -87,6 +89,7 @@ export declare const configState: {
87
89
  due?: string;
88
90
  from?: string;
89
91
  billedTo?: string;
92
+ shipTo?: string;
90
93
  status?: string;
91
94
  item?: string;
92
95
  price?: string;
@@ -97,6 +100,8 @@ export declare const configState: {
97
100
  notes?: string;
98
101
  sku?: string;
99
102
  taxId?: string;
103
+ paymentMethod?: string;
104
+ shippingMethod?: string;
100
105
  };
101
106
  };
102
107
  footer?: {
@@ -142,6 +147,8 @@ export declare function useVLiteConfig(): {
142
147
  };
143
148
  price?: {
144
149
  currency?: string;
150
+ numberFormat?: "standard" | "compact";
151
+ compactThreshold?: number;
145
152
  };
146
153
  datetime?: {
147
154
  format?: string;
@@ -197,6 +204,7 @@ export declare function useVLiteConfig(): {
197
204
  due?: string;
198
205
  from?: string;
199
206
  billedTo?: string;
207
+ shipTo?: string;
200
208
  status?: string;
201
209
  item?: string;
202
210
  price?: string;
@@ -207,6 +215,8 @@ export declare function useVLiteConfig(): {
207
215
  notes?: string;
208
216
  sku?: string;
209
217
  taxId?: string;
218
+ paymentMethod?: string;
219
+ shippingMethod?: string;
210
220
  };
211
221
  };
212
222
  footer?: {
package/core/config.js CHANGED
@@ -1,11 +1,13 @@
1
- import { reactive as n, inject as i } from "vue";
2
- import { deepMerge as c } from "../utils/object.js";
3
- const r = /* @__PURE__ */ Symbol("vlite-config"), s = {
1
+ import { reactive as n, inject as c } from "vue";
2
+ import { deepMerge as r } from "../utils/object.js";
3
+ const i = /* @__PURE__ */ Symbol("vlite-config"), s = {
4
4
  services: {},
5
5
  components: {
6
6
  form: {},
7
7
  price: {
8
- currency: "USD"
8
+ currency: "USD",
9
+ numberFormat: "standard",
10
+ compactThreshold: 1e3
9
11
  },
10
12
  datetime: {
11
13
  format: "MM/DD/YYYY"
@@ -16,16 +18,16 @@ const r = /* @__PURE__ */ Symbol("vlite-config"), s = {
16
18
  }
17
19
  }
18
20
  }, e = n({ ...s });
19
- function a(t) {
20
- const o = c(e, t);
21
+ function f(t) {
22
+ const o = r(e, t);
21
23
  Object.assign(e, o);
22
24
  }
23
25
  function u() {
24
- return i(r, e);
26
+ return c(i, e);
25
27
  }
26
28
  export {
27
- r as VLITE_CONFIG_KEY,
29
+ i as VLITE_CONFIG_KEY,
28
30
  e as configState,
29
- a as updateConfig,
31
+ f as updateConfig,
30
32
  u as useVLiteConfig
31
33
  };
package/index.d.ts CHANGED
@@ -56,6 +56,8 @@ export * from './components/Calendar';
56
56
  export * from './components/Skeleton';
57
57
  export * from './components/Chart';
58
58
  export * from './components/AppShell';
59
+ export * from './components/Rating';
60
+ export * from './components/AsyncSelect';
59
61
  export { default as Icon } from './components/Icon.vue';
60
62
  export { default as Logo } from './components/Logo.vue';
61
63
  export { default as Alert } from './components/Alert.vue';