vlite3 1.2.2 → 1.2.5

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 (57) hide show
  1. package/README.md +18 -7
  2. package/components/AppShell/AppShellLayoutDashboard.vue.js +1 -1
  3. package/components/AppShell/AppShellLayoutHeaderShell.vue.js +1 -1
  4. package/components/AsyncSelect/createAsyncSelect.d.ts +88 -0
  5. package/components/AsyncSelect/createAsyncSelect.js +156 -0
  6. package/components/AsyncSelect/index.d.ts +1 -0
  7. package/components/AvatarGroup/AvatarGroup.vue.js +10 -9
  8. package/components/Beacon.vue.d.ts +13 -0
  9. package/components/CategoryManager/CategoryManager.vue.js +1 -1
  10. package/components/ChoiceBox/ChoiceBox.vue.js +4 -2
  11. package/components/{CopyButton.vue.d.ts → Clipboard.vue.d.ts} +4 -3
  12. package/components/{CopyButton.vue.js → Clipboard.vue.js} +19 -19
  13. package/components/Clipboard.vue2.js +4 -0
  14. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  15. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  16. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  17. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  18. package/components/DataTable/types.d.ts +1 -1
  19. package/components/Form/Form.vue.js +1 -1
  20. package/components/Form/Form.vue2.js +1 -1
  21. package/components/List/ListFieldRow.vue.js +221 -144
  22. package/components/Modal.vue.js +1 -1
  23. package/components/Modal.vue2.js +92 -86
  24. package/components/NavbarCommandPalette.vue.js +1 -1
  25. package/components/Persona.vue.d.ts +25 -0
  26. package/components/Price/Price.vue.d.ts +1 -1
  27. package/components/Price/Price.vue.js +35 -13
  28. package/components/Rating/Rating.vue.d.ts +43 -0
  29. package/components/Rating/Rating.vue.js +7 -0
  30. package/components/Rating/Rating.vue2.js +92 -0
  31. package/components/Rating/ReviewSummary.vue.d.ts +5 -0
  32. package/components/Rating/ReviewSummary.vue.js +67 -0
  33. package/components/Rating/ReviewSummary.vue2.js +4 -0
  34. package/components/Rating/index.d.ts +3 -0
  35. package/components/Rating/types.d.ts +28 -0
  36. package/components/Screen/Screen.vue.d.ts +2 -2
  37. package/components/Screen/Screen.vue.js +3 -1
  38. package/components/Screen/ScreenFilter.vue.js +1 -1
  39. package/components/SidePanel.vue.js +3 -3
  40. package/components/SidePanel.vue2.js +44 -56
  41. package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
  42. package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +3 -1
  43. package/components/SidebarMenu/SidebarMenuItem.vue.js +197 -178
  44. package/components/Stats/StatItem.vue.js +222 -164
  45. package/components/Stats/components/StatIconBox.vue.js +42 -42
  46. package/components/Stats/components/StatTrend.vue.js +20 -20
  47. package/components/ThemeToggle.vue.js +10 -10
  48. package/components/Timeline/Timeline.vue.js +21 -11
  49. package/components/Timeline/TimelineItem.vue.js +1 -1
  50. package/components/index.d.ts +2 -0
  51. package/index.d.ts +3 -1
  52. package/index.js +113 -107
  53. package/package.json +2 -1
  54. package/style.css +47 -32
  55. package/utils/status.js +16 -16
  56. package/components/CopyButton.vue2.js +0 -4
  57. /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
@@ -1,14 +1,14 @@
1
- import { defineComponent as P, ref as f, inject as R, computed as h, markRaw as V, watch as T, provide as W, nextTick as K, onMounted as L, onUnmounted as A, openBlock as s, createElementBlock as d, Fragment as U, mergeProps as B, withModifiers as S, renderSlot as v, createCommentVNode as n, createBlock as I, Teleport as q, normalizeClass as i, createElementVNode as b, toDisplayString as z, createVNode as G, resolveDynamicComponent as H } from "vue";
2
- import J from "./Button.vue.js";
3
- import { useKeyStroke as Q } from "../composables/useKeyStroke.js";
4
- import { $t as F } from "../utils/i18n.js";
5
- const X = ["data-testid"], Y = ["data-testid"], Z = {
1
+ import { defineComponent as R, ref as f, inject as V, computed as p, markRaw as W, watch as T, provide as K, nextTick as L, onMounted as A, onUnmounted as U, openBlock as s, createElementBlock as a, Fragment as q, mergeProps as B, withModifiers as S, renderSlot as v, createCommentVNode as r, createBlock as I, Teleport as G, normalizeClass as i, createVNode as z, Transition as H, withCtx as J, createElementVNode as h, toDisplayString as F, resolveDynamicComponent as Q } from "vue";
2
+ import X from "./Button.vue.js";
3
+ import { useKeyStroke as Y } from "../composables/useKeyStroke.js";
4
+ import { $t as O } from "../utils/i18n.js";
5
+ const Z = ["data-testid"], _ = ["data-testid"], ee = {
6
6
  key: 0,
7
7
  class: "flex-none flex flex-col space-y-1.5 pb-0 border-b border-border/90"
8
- }, _ = { class: "text-lg font-semibold leading-none tracking-tight" }, ee = {
8
+ }, te = { class: "text-lg font-semibold leading-none tracking-tight" }, oe = {
9
9
  key: 0,
10
10
  class: "text-sm text-muted-foreground mb-3.5"
11
- }, ae = /* @__PURE__ */ P({
11
+ }, de = /* @__PURE__ */ R({
12
12
  inheritAttrs: !1,
13
13
  __name: "Modal",
14
14
  props: {
@@ -28,113 +28,119 @@ const X = ["data-testid"], Y = ["data-testid"], Z = {
28
28
  bodyProps: {}
29
29
  },
30
30
  emits: ["close", "update:show", "onOpen"],
31
- setup(t, { emit: O }) {
32
- const o = t, u = O, l = f(o.show), k = f(!1), g = f(!1), C = f(null);
31
+ setup(o, { emit: j }) {
32
+ const t = o, u = j, l = f(t.show), k = f(!1), b = f(!1), C = f(null);
33
33
  let c = null;
34
- const y = f(!1), a = R("dropdown-context", null), w = h(() => o.body ? V(o.body) : void 0);
34
+ const g = f(!1), d = V("dropdown-context", null), w = p(() => t.body ? W(t.body) : void 0);
35
35
  T(
36
- () => o.show,
36
+ () => t.show,
37
37
  (e) => {
38
- l.value = e, e && (u("onOpen"), a?.close());
38
+ l.value = e, e && (u("onOpen"), d?.close());
39
39
  }
40
40
  );
41
- const j = () => {
42
- l.value = !0, a?.close();
43
- }, D = (e) => {
44
- k.value = e;
41
+ const D = () => {
42
+ l.value = !0, d?.close();
45
43
  }, E = (e) => {
46
- y.value = e;
44
+ k.value = e;
45
+ }, M = (e) => {
46
+ g.value = e;
47
47
  }, m = () => {
48
48
  if (k.value) {
49
- g.value = !0, c && clearTimeout(c), c = setTimeout(() => {
50
- g.value = !1;
49
+ b.value = !0, c && clearTimeout(c), c = setTimeout(() => {
50
+ b.value = !1;
51
51
  }, 1e3);
52
52
  return;
53
53
  }
54
54
  l.value = !1, u("update:show", !1), u("close");
55
- }, p = () => {
55
+ }, y = () => {
56
56
  l.value = !1, u("update:show", !1), u("close");
57
57
  };
58
- W("modal-context", { close: m, setSubmitting: D, registerFormFooter: E });
59
- const M = () => {
60
- o.closeOutside && m();
61
- }, { onKeyStroke: N } = Q();
62
- N("Escape", m), T(l, async (e) => {
63
- e ? (a?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await K(), C.value?.focus()) : (document.body.style.overflow = "", a?.onChildToggle?.(!1), y.value = !1);
64
- }), L(() => {
65
- l.value && a?.onChildToggle?.(!0);
58
+ K("modal-context", { close: m, setSubmitting: E, registerFormFooter: M });
59
+ const N = () => {
60
+ t.closeOutside && m();
61
+ }, { onKeyStroke: P } = Y();
62
+ P("Escape", m), T(l, async (e) => {
63
+ e ? (d?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await L(), C.value?.focus()) : (document.body.style.overflow = "", d?.onChildToggle?.(!1), g.value = !1);
66
64
  }), A(() => {
67
- l.value && a?.onChildToggle?.(!1), document.body.style.overflow = "", c && clearTimeout(c);
65
+ l.value && d?.onChildToggle?.(!0);
66
+ }), U(() => {
67
+ l.value && d?.onChildToggle?.(!1), document.body.style.overflow = "", c && clearTimeout(c);
68
68
  });
69
- const r = h(() => o.titleI18n ? F(o.titleI18n) : o.title), x = h(
70
- () => o.descriptionI18n ? F(o.descriptionI18n) : o.description
69
+ const n = p(() => t.titleI18n ? O(t.titleI18n) : t.title), x = p(
70
+ () => t.descriptionI18n ? O(t.descriptionI18n) : t.description
71
71
  );
72
- return (e, $) => (s(), d(U, null, [
73
- e.$slots?.trigger || e.$slots?.default ? (s(), d("span", B({
72
+ return (e, $) => (s(), a(q, null, [
73
+ e.$slots?.trigger || e.$slots?.default ? (s(), a("span", B({
74
74
  key: 0,
75
- onClick: S(j, ["stop"]),
76
- class: `${t.triggerClass}`
75
+ onClick: S(D, ["stop"]),
76
+ class: `${o.triggerClass}`
77
77
  }, e.$attrs, {
78
- "data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : r.value ? `modal-trigger-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal-trigger"
78
+ "data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : n.value ? `modal-trigger-${n.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal-trigger"
79
79
  }), [
80
80
  v(e.$slots, "trigger", {}, () => [
81
- t.body ? v(e.$slots, "default", { key: 0 }, void 0, !0) : n("", !0)
81
+ o.body ? v(e.$slots, "default", { key: 0 }, void 0, !0) : r("", !0)
82
82
  ], !0)
83
- ], 16, X)) : n("", !0),
84
- (s(), I(q, { to: "body" }, [
85
- l.value ? (s(), d("div", {
83
+ ], 16, Z)) : r("", !0),
84
+ (s(), I(G, { to: "body" }, [
85
+ l.value ? (s(), a("div", {
86
86
  key: 0,
87
- class: i(["fixed inset-0 z-50 flex items-center justify-center p-4 v-modal-overlay", t.backdrop ? "v-modal-backdrop" : ""]),
88
- onClick: M
87
+ class: i(["fixed inset-0 z-50 flex items-center justify-center p-4 v-modal-overlay", o.backdrop ? "v-modal-backdrop" : ""]),
88
+ onClick: N
89
89
  }, [
90
- b("div", {
91
- ref_key: "modalRef",
92
- ref: C,
93
- tabindex: "-1",
94
- role: "dialog",
95
- "aria-modal": "true",
96
- class: i(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [t.maxWidth]]),
97
- "data-testid": e.$attrs["data-testid"] || (r.value ? `modal-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal"),
98
- onClick: $[0] || ($[0] = S(() => {
99
- }, ["stop"]))
100
- }, [
101
- r.value ? (s(), d("div", Z, [
102
- b("div", {
103
- class: i(["flex items-center justify-between py-2 px-4 rounded-t-md", t.headerClass])
90
+ z(H, { name: "modal-dialog" }, {
91
+ default: J(() => [
92
+ l.value ? (s(), a("div", {
93
+ key: 0,
94
+ ref_key: "modalRef",
95
+ ref: C,
96
+ tabindex: "-1",
97
+ role: "dialog",
98
+ "aria-modal": "true",
99
+ class: i(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [o.maxWidth]]),
100
+ "data-testid": e.$attrs["data-testid"] || (n.value ? `modal-${n.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal"),
101
+ onClick: $[0] || ($[0] = S(() => {
102
+ }, ["stop"]))
104
103
  }, [
105
- b("h3", _, z(r.value), 1),
106
- G(J, {
107
- rounded: "full",
108
- size: "sm",
109
- icon: "lucide:x",
110
- variant: "ghost",
111
- class: i(["hover:bg-gray-250/25!", { "blink-bg": g.value }]),
112
- "data-testid": "modal-close-btn",
113
- onClick: m
114
- }, null, 8, ["class"])
115
- ], 2)
116
- ])) : n("", !0),
117
- b("div", {
118
- class: i(["flex-1 overflow-y-auto px-4 pt-4 min-h-0 scrollbar-thin scrollbar-stable", [y.value ? "pb-0" : "pb-3.5", t.bodyClass]])
119
- }, [
120
- x.value ? (s(), d("p", ee, z(x.value), 1)) : n("", !0),
121
- w.value ? (s(), I(H(w.value), B({ key: 1 }, { ...t.bodyProps, ...e.$attrs }, { close: p }), null, 16)) : v(e.$slots, "default", {
122
- key: 2,
123
- close: p
124
- }, void 0, !0)
125
- ], 2),
126
- e.$slots.footer ? (s(), d("div", {
127
- key: 1,
128
- class: i([t.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/75 rounded-b-xl bg-body"])
129
- }, [
130
- v(e.$slots, "footer", { close: p }, void 0, !0)
131
- ], 2)) : n("", !0)
132
- ], 10, Y)
133
- ], 2)) : n("", !0)
104
+ n.value ? (s(), a("div", ee, [
105
+ h("div", {
106
+ class: i(["flex items-center justify-between py-2 px-4 rounded-t-md", o.headerClass])
107
+ }, [
108
+ h("h3", te, F(n.value), 1),
109
+ z(X, {
110
+ rounded: "full",
111
+ size: "sm",
112
+ icon: "lucide:x",
113
+ variant: "ghost",
114
+ class: i(["hover:bg-gray-250/25!", { "blink-bg": b.value }]),
115
+ "data-testid": "modal-close-btn",
116
+ onClick: m
117
+ }, null, 8, ["class"])
118
+ ], 2)
119
+ ])) : r("", !0),
120
+ h("div", {
121
+ class: i(["flex-1 overflow-y-auto px-4 pt-4 min-h-0 scrollbar-thin scrollbar-stable", [g.value ? "pb-0" : "pb-3.5", o.bodyClass]])
122
+ }, [
123
+ x.value ? (s(), a("p", oe, F(x.value), 1)) : r("", !0),
124
+ w.value ? (s(), I(Q(w.value), B({ key: 1 }, { ...o.bodyProps, ...e.$attrs }, { close: y }), null, 16)) : v(e.$slots, "default", {
125
+ key: 2,
126
+ close: y
127
+ }, void 0, !0)
128
+ ], 2),
129
+ e.$slots.footer ? (s(), a("div", {
130
+ key: 1,
131
+ class: i([o.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/75 rounded-b-xl bg-body"])
132
+ }, [
133
+ v(e.$slots, "footer", { close: y }, void 0, !0)
134
+ ], 2)) : r("", !0)
135
+ ], 10, _)) : r("", !0)
136
+ ]),
137
+ _: 3
138
+ })
139
+ ], 2)) : r("", !0)
134
140
  ]))
135
141
  ], 64));
136
142
  }
137
143
  });
138
144
  export {
139
- ae as default
145
+ de as default
140
146
  };
@@ -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: {
@@ -0,0 +1,25 @@
1
+ import { AvatarSize, AvatarRounded } from '../types';
2
+ export type PresenceType = 'online' | 'offline' | 'busy' | 'dnd' | 'away';
3
+ export type PersonaLabelTheme = 'default' | 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'info' | 'muted' | string;
4
+ interface Props {
5
+ src?: string;
6
+ link?: string;
7
+ alt?: string;
8
+ fallback?: string;
9
+ size?: AvatarSize;
10
+ rounded?: AvatarRounded;
11
+ presence?: PresenceType;
12
+ label?: string;
13
+ secondaryLabel?: string;
14
+ labelTheme?: PersonaLabelTheme;
15
+ hideDetails?: boolean;
16
+ class?: string;
17
+ }
18
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
19
+ class: string;
20
+ size: AvatarSize;
21
+ rounded: AvatarRounded;
22
+ labelTheme: PersonaLabelTheme;
23
+ hideDetails: boolean;
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
25
+ export default _default;
@@ -6,5 +6,5 @@ type __VLS_Props = {
6
6
  };
7
7
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
8
  value: number | string;
9
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSpanElement>;
9
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
10
10
  export default _default;
@@ -1,6 +1,7 @@
1
- import { defineComponent as p, computed as o, openBlock as i, createElementBlock as l, toDisplayString as h } from "vue";
2
- import { useVLiteConfig as f } from "../../core/config.js";
3
- const v = /* @__PURE__ */ p({
1
+ import { defineComponent as i, computed as r, openBlock as d, createBlock as h, withCtx as f, createElementVNode as y, toDisplayString as v } from "vue";
2
+ import { useVLiteConfig as b } from "../../core/config.js";
3
+ import F from "../Tooltip.vue.js";
4
+ const C = /* @__PURE__ */ i({
4
5
  __name: "Price",
5
6
  props: {
6
7
  value: { default: 0 },
@@ -8,22 +9,43 @@ const v = /* @__PURE__ */ p({
8
9
  numberFormat: {},
9
10
  compactThreshold: {}
10
11
  },
11
- setup(n) {
12
- const t = n, c = f(), a = o(() => t.currency || c?.components?.price?.currency || "USD"), m = o(() => t.numberFormat || c?.components?.price?.numberFormat || "compact"), u = o(() => {
13
- const r = Number(t.value) || 0;
12
+ setup(u) {
13
+ const c = u, o = b(), n = r(() => c.currency || o?.components?.price?.currency || "USD"), a = r(() => c.numberFormat || o?.components?.price?.numberFormat || "compact"), m = r(() => {
14
+ const e = Number(c.value) || 0;
14
15
  try {
15
- const e = {
16
+ const t = {
16
17
  style: "currency",
17
- currency: a.value
18
- }, s = t.compactThreshold ?? c?.components?.price?.compactThreshold ?? 1e3;
19
- return m.value === "compact" && Math.abs(r) >= s && (e.notation = "compact", e.compactDisplay = "short"), new Intl.NumberFormat("en-US", e).format(r);
18
+ currency: n.value
19
+ }, p = c.compactThreshold ?? o?.components?.price?.compactThreshold ?? 1e3;
20
+ return a.value === "compact" && Math.abs(e) >= p && (t.notation = "compact", t.compactDisplay = "short"), new Intl.NumberFormat("en-US", t).format(e);
20
21
  } catch {
21
- return `$${r.toFixed(2)}`;
22
+ return `$${e.toFixed(2)}`;
22
23
  }
24
+ }), s = r(() => {
25
+ const e = Number(c.value) || 0;
26
+ try {
27
+ return new Intl.NumberFormat("en-US", {
28
+ style: "currency",
29
+ currency: n.value
30
+ }).format(e);
31
+ } catch {
32
+ return `$${e.toFixed(2)}`;
33
+ }
34
+ }), l = r(() => {
35
+ const e = Number(c.value) || 0, t = c.compactThreshold ?? o?.components?.price?.compactThreshold ?? 1e3;
36
+ return a.value === "compact" && Math.abs(e) >= t;
23
37
  });
24
- return (r, e) => (i(), l("span", null, h(u.value), 1));
38
+ return (e, t) => (d(), h(F, {
39
+ content: s.value,
40
+ disabled: !l.value
41
+ }, {
42
+ default: f(() => [
43
+ y("span", null, v(m.value), 1)
44
+ ]),
45
+ _: 1
46
+ }, 8, ["content", "disabled"]));
25
47
  }
26
48
  });
27
49
  export {
28
- v as default
50
+ C as default
29
51
  };
@@ -0,0 +1,43 @@
1
+ import { RatingProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ text?(_: {
6
+ value: number;
7
+ max: number;
8
+ }): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLDivElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<RatingProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
+ change: (value: number) => any;
16
+ "update:modelValue": (value: number) => any;
17
+ hover: (value: number) => any;
18
+ }, string, import('vue').PublicProps, Readonly<RatingProps> & Readonly<{
19
+ onChange?: (value: number) => any;
20
+ "onUpdate:modelValue"?: (value: number) => any;
21
+ onHover?: (value: number) => any;
22
+ }>, {
23
+ icon: string | string[];
24
+ size: "sm" | "md" | "lg" | "xl";
25
+ solid: boolean;
26
+ readonly: boolean;
27
+ disabled: boolean;
28
+ modelValue: number;
29
+ max: number;
30
+ allowHalf: boolean;
31
+ showText: boolean;
32
+ activeIcon: string | string[];
33
+ activeColor: string;
34
+ inactiveColor: string;
35
+ clearable: boolean;
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
37
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
38
+ export default _default;
39
+ type __VLS_WithTemplateSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./Rating.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-33afc5cb"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,92 @@
1
+ import { defineComponent as M, ref as z, computed as I, openBlock as r, createElementBlock as c, normalizeClass as u, Fragment as N, renderList as S, createVNode as h, unref as x, createElementVNode as y, normalizeStyle as T, renderSlot as $, createTextVNode as A, toDisplayString as g, createCommentVNode as E } from "vue";
2
+ import { Icon as w } from "@iconify/vue";
3
+ const F = ["onMousemove", "onClick"], H = {
4
+ key: 0,
5
+ class: "ml-2 text-sm text-foreground/80 font-medium whitespace-nowrap"
6
+ }, L = { class: "text-xs text-muted-foreground font-normal" }, D = /* @__PURE__ */ M({
7
+ __name: "Rating",
8
+ props: {
9
+ modelValue: { default: 0 },
10
+ max: { default: 5 },
11
+ allowHalf: { type: Boolean, default: !1 },
12
+ readonly: { type: Boolean, default: !1 },
13
+ showText: { type: Boolean, default: !1 },
14
+ icon: { default: "lucide:star" },
15
+ activeIcon: { default: "lucide:star" },
16
+ activeColor: { default: "text-amber-400" },
17
+ inactiveColor: { default: "text-muted-foreground/30" },
18
+ size: { default: "md" },
19
+ clearable: { type: Boolean, default: !1 },
20
+ disabled: { type: Boolean, default: !1 },
21
+ solid: { type: Boolean, default: !0 },
22
+ class: {}
23
+ },
24
+ emits: ["update:modelValue", "change", "hover"],
25
+ setup(t, { emit: C }) {
26
+ const l = t, s = C, n = z(0), d = I(() => n.value > 0 ? n.value : l.modelValue), m = {
27
+ sm: "w-4 h-4",
28
+ md: "w-5 h-5",
29
+ lg: "w-6 h-6",
30
+ xl: "w-8 h-8"
31
+ }, v = (o, e) => {
32
+ const a = e === "active" ? l.activeIcon : l.icon;
33
+ return Array.isArray(a) ? a[Math.min(o - 1, a.length - 1)] : a;
34
+ }, V = (o, e) => {
35
+ if (!(l.readonly || l.disabled))
36
+ if (l.allowHalf) {
37
+ const i = o.currentTarget.getBoundingClientRect(), f = o.clientX - i.left < i.width / 2 ? e - 0.5 : e;
38
+ n.value !== f && (n.value = f, s("hover", f));
39
+ } else
40
+ n.value !== e && (n.value = e, s("hover", e));
41
+ }, b = () => {
42
+ l.readonly || l.disabled || (n.value = 0, s("hover", 0));
43
+ }, B = (o) => {
44
+ if (l.readonly || l.disabled) return;
45
+ let e = n.value || o;
46
+ l.clearable && l.modelValue === e && (e = 0), s("update:modelValue", e), s("change", e);
47
+ }, k = (o) => {
48
+ const e = d.value - o + 1;
49
+ return e >= 1 ? 100 : e > 0 ? e * 100 : 0;
50
+ };
51
+ return (o, e) => (r(), c("div", {
52
+ class: u(["inline-flex items-center gap-1.5", [l.class, { "opacity-50 cursor-not-allowed": t.disabled }]]),
53
+ onMouseleave: b
54
+ }, [
55
+ (r(!0), c(N, null, S(t.max, (a) => (r(), c("div", {
56
+ key: a,
57
+ class: u(["relative flex items-center justify-center isolate transition-transform", {
58
+ "cursor-pointer hover:scale-110 active:scale-95": !t.readonly && !t.disabled,
59
+ "cursor-default pointer-events-none": t.readonly || t.disabled
60
+ }]),
61
+ onMousemove: (i) => V(i, a),
62
+ onClick: (i) => B(a)
63
+ }, [
64
+ h(x(w), {
65
+ icon: v(a, "inactive"),
66
+ class: u([m[t.size], t.inactiveColor])
67
+ }, null, 8, ["icon", "class"]),
68
+ y("div", {
69
+ class: "absolute inset-0 overflow-hidden",
70
+ style: T({ width: `${k(a)}%` })
71
+ }, [
72
+ h(x(w), {
73
+ icon: v(a, "active"),
74
+ class: u([m[t.size], t.activeColor, { "is-solid": t.solid }])
75
+ }, null, 8, ["icon", "class"])
76
+ ], 4)
77
+ ], 42, F))), 128)),
78
+ $(o.$slots, "text", {
79
+ value: d.value,
80
+ max: t.max
81
+ }, () => [
82
+ t.showText ? (r(), c("span", H, [
83
+ A(g(d.value) + " ", 1),
84
+ y("span", L, "/ " + g(t.max), 1)
85
+ ])) : E("", !0)
86
+ ], !0)
87
+ ], 34));
88
+ }
89
+ });
90
+ export {
91
+ D as default
92
+ };
@@ -0,0 +1,5 @@
1
+ import { ReviewSummaryProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<ReviewSummaryProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ReviewSummaryProps> & Readonly<{}>, {
3
+ showTotal: boolean;
4
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
5
+ export default _default;
@@ -0,0 +1,67 @@
1
+ import { defineComponent as w, computed as u, openBlock as l, createElementBlock as i, normalizeClass as d, createElementVNode as r, toDisplayString as s, Fragment as m, renderList as f, createVNode as g, unref as x, createCommentVNode as _, createTextVNode as b, normalizeStyle as y } from "vue";
2
+ import { Icon as v } from "@iconify/vue";
3
+ const k = { class: "flex flex-col items-center justify-center py-4 sm:w-1/3 w-full shrink-0" }, R = { class: "text-5xl font-bold tracking-tighter text-foreground" }, D = { class: "flex items-center gap-1 mt-3 text-amber-400" }, N = {
4
+ key: 0,
5
+ class: "text-sm text-muted-foreground mt-2 font-medium"
6
+ }, B = { class: "flex flex-col gap-2 w-full flex-grow" }, C = { class: "flex items-center gap-1 text-sm font-medium text-foreground min-w-[70px]" }, T = { class: "h-3.5 bg-muted rounded-full w-full overflow-hidden flex-grow shrink-0 relative shadow-inner" }, V = { class: "text-sm font-medium text-muted-foreground text-right min-w-[36px]" }, E = /* @__PURE__ */ w({
7
+ __name: "ReviewSummary",
8
+ props: {
9
+ ratingDistribution: {},
10
+ totalReviews: {},
11
+ averageRating: {},
12
+ showTotal: { type: Boolean, default: !0 },
13
+ class: {}
14
+ },
15
+ setup(c) {
16
+ const e = c, p = u(() => [...e.ratingDistribution].sort((n, o) => o.rating - n.rating)), a = u(() => {
17
+ if (e.averageRating !== void 0) return e.averageRating;
18
+ if (e.ratingDistribution.length === 0) return 0;
19
+ let n = 0, o = 0;
20
+ for (const t of e.ratingDistribution)
21
+ t.count !== void 0 && (n += t.rating * t.count, o += t.count);
22
+ return o > 0 ? Number((n / o).toFixed(1)) : 0;
23
+ }), h = u(() => e.totalReviews !== void 0 ? e.totalReviews : e.ratingDistribution.reduce((n, o) => n + (o.count || 0), 0));
24
+ return (n, o) => (l(), i("div", {
25
+ class: d(["flex flex-col sm:flex-row gap-6 md:gap-10 items-start w-full", e.class])
26
+ }, [
27
+ r("div", k, [
28
+ r("div", R, s(a.value), 1),
29
+ r("div", D, [
30
+ (l(), i(m, null, f(5, (t) => g(x(v), {
31
+ key: t,
32
+ icon: "lucide:star",
33
+ class: d(["w-5 h-5 transition-all", {
34
+ "fill-amber-400 text-amber-400": a.value >= t,
35
+ "fill-muted/20 text-muted-foreground/30": a.value < t
36
+ }])
37
+ }, null, 8, ["class"])), 64))
38
+ ]),
39
+ c.showTotal ? (l(), i("p", N, " Based on " + s(h.value) + " global ratings ", 1)) : _("", !0)
40
+ ]),
41
+ r("div", B, [
42
+ (l(!0), i(m, null, f(p.value, (t) => (l(), i("div", {
43
+ key: t.rating,
44
+ class: "flex items-center gap-3 w-full"
45
+ }, [
46
+ r("div", C, [
47
+ b(s(t.rating) + " ", 1),
48
+ g(x(v), {
49
+ icon: "lucide:star",
50
+ class: "w-4 h-4 text-amber-400 fill-amber-400"
51
+ })
52
+ ]),
53
+ r("div", T, [
54
+ r("div", {
55
+ class: "h-full bg-amber-400 rounded-full transition-all duration-1000 ease-out",
56
+ style: y({ width: `${t.percentage}%` })
57
+ }, null, 4)
58
+ ]),
59
+ r("div", V, s(t.percentage) + "% ", 1)
60
+ ]))), 128))
61
+ ])
62
+ ], 2));
63
+ }
64
+ });
65
+ export {
66
+ E as default
67
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ReviewSummary.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export { default as Rating } from './Rating.vue';
3
+ export { default as ReviewSummary } from './ReviewSummary.vue';
@@ -0,0 +1,28 @@
1
+ export interface RatingProps {
2
+ modelValue?: number;
3
+ max?: number;
4
+ allowHalf?: boolean;
5
+ readonly?: boolean;
6
+ showText?: boolean;
7
+ icon?: string | string[];
8
+ activeIcon?: string | string[];
9
+ activeColor?: string;
10
+ inactiveColor?: string;
11
+ size?: 'sm' | 'md' | 'lg' | 'xl';
12
+ clearable?: boolean;
13
+ disabled?: boolean;
14
+ solid?: boolean;
15
+ class?: string;
16
+ }
17
+ export interface ReviewSummaryData {
18
+ rating: number;
19
+ percentage: number;
20
+ count?: number;
21
+ }
22
+ export interface ReviewSummaryProps {
23
+ ratingDistribution: ReviewSummaryData[];
24
+ totalReviews?: number;
25
+ averageRating?: number;
26
+ showTotal?: boolean;
27
+ class?: string;
28
+ }
@@ -341,10 +341,10 @@ declare const __VLS_component: import('vue').DefineComponent<ScreenProps, {}, {}
341
341
  data: any[];
342
342
  variant: "one" | "two";
343
343
  loading: boolean;
344
+ emptyIcon: string;
345
+ canAdd: boolean;
344
346
  exportProps: Record<string, any> | boolean;
345
347
  importProps: Record<string, any> | boolean;
346
- canAdd: boolean;
347
- emptyIcon: string;
348
348
  hideSelectable: boolean;
349
349
  hideDeleteBtn: boolean;
350
350
  showRefresh: boolean;
@@ -33,7 +33,9 @@ const ze = { key: 0 }, Xe = {
33
33
  loading: { type: Boolean, default: !1 },
34
34
  variant: { default: "one" },
35
35
  stats: { default: () => [] },
36
- statsProps: { default: () => ({}) },
36
+ statsProps: { default: () => ({
37
+ variant: "transparent-header"
38
+ }) },
37
39
  refetch: {},
38
40
  paginationProps: { default: () => ({
39
41
  alignment: "between",
@@ -14,7 +14,7 @@ import "v-datepicker-lite";
14
14
  import "v-datepicker-lite/style.css";
15
15
  import "@jaames/iro";
16
16
  import "@vueuse/core";
17
- /* empty css */
17
+ /* empty css */
18
18
  import "iconify-icon-picker";
19
19
  import "iconify-icon-picker/style.css";
20
20
  /* empty css */
@@ -1,7 +1,7 @@
1
1
  import o from "./SidePanel.vue2.js";
2
2
  /* empty css */
3
- import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3446a690"]]);
3
+ import a from "../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ a(o, [["__scopeId", "data-v-d7a169fa"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };