vlite3 1.2.2 → 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 (38) hide show
  1. package/README.md +1 -0
  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/ChoiceBox/ChoiceBox.vue.js +4 -2
  8. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  9. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  10. package/components/Form/Form.vue.js +1 -1
  11. package/components/Form/Form.vue2.js +1 -1
  12. package/components/List/ListFieldRow.vue.js +221 -144
  13. package/components/NavbarCommandPalette.vue.js +1 -1
  14. package/components/Price/Price.vue.d.ts +1 -1
  15. package/components/Price/Price.vue.js +35 -13
  16. package/components/Rating/Rating.vue.d.ts +43 -0
  17. package/components/Rating/Rating.vue.js +7 -0
  18. package/components/Rating/Rating.vue2.js +92 -0
  19. package/components/Rating/ReviewSummary.vue.d.ts +5 -0
  20. package/components/Rating/ReviewSummary.vue.js +67 -0
  21. package/components/Rating/ReviewSummary.vue2.js +4 -0
  22. package/components/Rating/index.d.ts +3 -0
  23. package/components/Rating/types.d.ts +28 -0
  24. package/components/Screen/Screen.vue.d.ts +2 -2
  25. package/components/Screen/Screen.vue.js +3 -1
  26. package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
  27. package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +3 -1
  28. package/components/SidebarMenu/SidebarMenuItem.vue.js +198 -175
  29. package/components/Stats/StatItem.vue.js +222 -164
  30. package/components/Stats/components/StatIconBox.vue.js +42 -42
  31. package/components/Stats/components/StatTrend.vue.js +20 -20
  32. package/components/Timeline/Timeline.vue.js +21 -11
  33. package/components/Timeline/TimelineItem.vue.js +1 -1
  34. package/index.d.ts +2 -0
  35. package/index.js +108 -102
  36. package/package.json +2 -1
  37. package/style.css +23 -17
  38. package/utils/status.js +16 -16
@@ -1,29 +1,30 @@
1
- import { defineComponent as M, ref as $, computed as v, openBlock as t, createElementBlock as a, normalizeClass as s, createElementVNode as c, createBlock as f, createCommentVNode as x, toDisplayString as h, renderSlot as w, resolveDynamicComponent as L, Fragment as m, createVNode as p } from "vue";
2
- import g from "../Icon.vue.js";
3
- import k from "../Price/Price.vue.js";
4
- import { $t as j } from "../../utils/i18n.js";
5
- import { formatDate as V, formatNumber as I } from "../../utils/functions.js";
6
- import { getObjectValue as N } from "./utils.js";
7
- import { getStatusColorClass as F } from "../../utils/status.js";
8
- const D = { class: "flex items-center gap-2 min-w-0" }, E = { class: "text-xs font-normal text-muted-foreground leading-snug truncate" }, O = { class: "min-w-0" }, z = {
1
+ import { defineComponent as V, ref as I, computed as v, openBlock as t, createElementBlock as a, normalizeClass as i, createElementVNode as r, createBlock as d, createCommentVNode as H, toDisplayString as L, renderSlot as M, resolveDynamicComponent as B, Fragment as m, withCtx as k, createVNode as C } from "vue";
2
+ import h from "../Icon.vue.js";
3
+ import x from "../Price/Price.vue.js";
4
+ import w from "../Tooltip.vue.js";
5
+ import { $t as D } from "../../utils/i18n.js";
6
+ import { formatDate as E, formatNumber as $ } from "../../utils/functions.js";
7
+ import { getObjectValue as O } from "./utils.js";
8
+ import { getStatusColorClass as z } from "../../utils/status.js";
9
+ const R = { class: "flex items-center gap-2 min-w-0" }, Y = { class: "text-xs font-normal text-muted-foreground leading-snug truncate" }, q = { class: "min-w-0" }, A = {
9
10
  key: 2,
10
11
  class: "flex items-center gap-1.5"
11
- }, R = ["innerHTML"], Y = {
12
+ }, G = ["innerHTML"], J = ["innerHTML"], K = {
12
13
  key: 1,
13
14
  class: "text-sm font-semibold text-foreground tracking-widest select-none",
14
15
  "aria-hidden": "true"
15
- }, q = ["aria-label"], A = ["src", "alt"], G = ["innerHTML"], J = { class: "flex items-center gap-2 min-w-0" }, K = { class: "text-sm font-medium text-gray-800 leading-snug" }, P = { class: "w-full min-w-0 text-left" }, Q = {
16
+ }, P = ["aria-label"], Q = ["src", "alt"], U = ["innerHTML"], W = ["innerHTML"], X = { class: "flex items-center gap-2 min-w-0" }, Z = { class: "text-sm font-medium text-gray-800 leading-snug" }, _ = { class: "w-full min-w-0 text-left" }, ee = {
16
17
  key: 2,
17
18
  class: "flex items-center gap-1.5"
18
- }, U = ["innerHTML"], W = {
19
+ }, te = ["innerHTML"], le = ["innerHTML"], ae = {
19
20
  key: 1,
20
21
  class: "text-sm text-gray-600 tracking-widest select-none",
21
22
  "aria-hidden": "true"
22
- }, X = ["aria-label"], Z = ["src", "alt"], _ = ["innerHTML"], ee = { class: "flex items-center gap-2 shrink-0 min-w-0 max-w-[48%]" }, te = { class: "text-sm font-medium text-gray-800 truncate leading-snug" }, le = { class: "flex items-center justify-end gap-2 min-w-0 flex-1" }, ae = ["innerHTML"], ne = {
23
+ }, ne = ["aria-label"], ie = ["src", "alt"], se = ["innerHTML"], oe = ["innerHTML"], re = { class: "flex items-center gap-2 shrink-0 min-w-0 max-w-[48%]" }, de = { class: "text-sm font-medium text-gray-800 truncate leading-snug" }, ue = { class: "flex items-center justify-end gap-2 min-w-0 flex-1" }, ce = ["innerHTML"], fe = ["innerHTML"], ve = {
23
24
  key: 1,
24
25
  class: "text-sm text-gray-600 tracking-widest select-none",
25
26
  "aria-hidden": "true"
26
- }, ie = ["aria-label"], se = ["src", "alt"], oe = ["innerHTML"], ye = /* @__PURE__ */ M({
27
+ }, me = ["aria-label"], ye = ["src", "alt"], ge = ["innerHTML"], be = ["innerHTML"], Me = /* @__PURE__ */ V({
27
28
  __name: "ListFieldRow",
28
29
  props: {
29
30
  field: {},
@@ -38,245 +39,321 @@ const D = { class: "flex items-center gap-2 min-w-0" }, E = { class: "text-xs fo
38
39
  autoLineByLineThreshold: { default: 50 }
39
40
  },
40
41
  setup(e) {
41
- const l = e, i = $(!1), o = v(() => N(l.field.key, l.data)), r = v(() => {
42
- const n = o.value;
42
+ const l = e, c = I(!1), u = v(() => O(l.field.key, l.data)), s = v(() => {
43
+ const n = u.value;
43
44
  if (l.field.format)
44
45
  return l.field.format(n, l.data);
45
46
  if (n == null || n === "")
46
47
  return l.field.emptyText ?? "--";
47
48
  switch (l.field.type) {
48
49
  case "number":
49
- return I(n, { numberFormat: l.field.numberFormat || "compact", compactThreshold: l.field.compactThreshold });
50
+ return $(n, { numberFormat: l.field.numberFormat || "compact", compactThreshold: l.field.compactThreshold });
50
51
  case "boolean":
51
52
  return n ? "Yes" : "No";
52
53
  case "date":
53
54
  case "dateTime":
54
55
  case "time":
55
- return V(n, void 0, l.field.type);
56
+ return E(n, void 0, l.field.type);
56
57
  default:
57
58
  return String(n);
58
59
  }
59
- }), y = v(
60
- () => l.field.titleI18n ? j(l.field.titleI18n) : l.field.title ?? l.field.key
61
- ), d = v(() => {
60
+ }), y = v(() => {
61
+ if (l.field.type !== "number") return !1;
62
+ const n = l.field.numberFormat || "compact", f = l.field.compactThreshold ?? 1e3, p = Number(u.value) || 0;
63
+ return n === "compact" && Math.abs(p) >= f;
64
+ }), g = v(() => l.field.type !== "number" ? "" : $(u.value, { numberFormat: "standard" })), b = v(
65
+ () => l.field.titleI18n ? D(l.field.titleI18n) : l.field.title ?? l.field.key
66
+ ), o = v(() => {
62
67
  const n = [];
63
68
  if (l.field.addStatusColor) {
64
- const u = F(r.value);
65
- u && n.push(u);
69
+ const f = z(s.value);
70
+ f && n.push(f);
66
71
  }
67
72
  if (l.field.class)
68
73
  if (typeof l.field.class == "function") {
69
- const u = l.field.class(o.value, l.data);
70
- u && n.push(u);
74
+ const f = l.field.class(u.value, l.data);
75
+ f && n.push(f);
71
76
  } else
72
77
  n.push(l.field.class);
73
78
  return n.join(" ");
74
- }), b = v(() => l.field.type === "image"), B = v(() => l.variant === "striped" && l.index % 2 !== 0), C = v(() => l.variant === "stacked"), S = v(() => l.field.lineByLineLayout === "inline" ? !1 : l.field.lineByLineLayout === "block" || l.field.lineByLine ? !0 : l.autoLineByLineThreshold > 0 ? String(r.value ?? "").length > l.autoLineByLineThreshold : !1), H = v(() => l.stackedBorderStyle === "divider" && l.stackedColIndex !== 0 ? "border-l border-border pl-4 pr-3.5 py-2" : "px-3.5 py-2");
75
- return (n, u) => C.value ? (t(), a("div", {
79
+ }), T = v(() => l.field.type === "image"), S = v(() => l.variant === "striped" && l.index % 2 !== 0), F = v(() => l.variant === "stacked"), N = v(() => l.field.lineByLineLayout === "inline" ? !1 : l.field.lineByLineLayout === "block" || l.field.lineByLine ? !0 : l.autoLineByLineThreshold > 0 ? String(s.value ?? "").length > l.autoLineByLineThreshold : !1), j = v(() => l.stackedBorderStyle === "divider" && l.stackedColIndex !== 0 ? "border-l border-border pl-4 pr-3.5 py-2" : "px-3.5 py-2");
80
+ return (n, f) => F.value ? (t(), a("div", {
76
81
  key: 0,
77
- class: s([
82
+ class: i([
78
83
  "list-field-row list-field-row--stacked flex flex-col gap-0.5 min-w-0",
79
- H.value
84
+ j.value
80
85
  ]),
81
86
  role: "row"
82
87
  }, [
83
- c("div", D, [
84
- e.field.icon ? (t(), f(g, {
88
+ r("div", R, [
89
+ e.field.icon ? (t(), d(h, {
85
90
  key: 0,
86
91
  icon: e.field.icon,
87
92
  class: "w-3 h-3 text-muted-foreground shrink-0"
88
- }, null, 8, ["icon"])) : x("", !0),
89
- c("span", E, h(y.value), 1)
93
+ }, null, 8, ["icon"])) : H("", !0),
94
+ r("span", Y, L(b.value), 1)
90
95
  ]),
91
- c("div", O, [
92
- n.$slots[e.field.key] ? w(n.$slots, e.field.key, {
96
+ r("div", q, [
97
+ n.$slots[e.field.key] ? M(n.$slots, e.field.key, {
93
98
  key: 0,
94
- value: o.value,
95
- resolved: r.value,
99
+ value: u.value,
100
+ resolved: s.value,
96
101
  data: e.data
97
- }) : e.field.component ? (t(), f(L(e.field.component), {
102
+ }) : e.field.component ? (t(), d(B(e.field.component), {
98
103
  key: 1,
99
104
  data: e.data,
100
- value: o.value
101
- }, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a("div", z, [
102
- i.value ? (t(), a(m, { key: 0 }, [
103
- e.field.type === "price" ? (t(), f(k, {
105
+ value: u.value
106
+ }, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a("div", A, [
107
+ c.value ? (t(), a(m, { key: 0 }, [
108
+ e.field.type === "price" ? (t(), d(x, {
104
109
  key: 0,
105
- value: o.value,
106
- class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value])
107
- }, null, 8, ["value", "class"])) : (t(), a("span", {
110
+ value: u.value,
111
+ class: i(["text-sm font-semibold text-foreground wrap-break-word leading-snug", o.value])
112
+ }, null, 8, ["value", "class"])) : e.field.type === "number" ? (t(), d(w, {
108
113
  key: 1,
109
- class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value]),
110
- innerHTML: r.value
111
- }, null, 10, R))
112
- ], 64)) : (t(), a("span", Y, " •••••••• ")),
113
- c("button", {
114
+ content: g.value,
115
+ disabled: !y.value
116
+ }, {
117
+ default: k(() => [
118
+ r("span", {
119
+ class: i(["text-sm font-semibold text-foreground wrap-break-word leading-snug", o.value]),
120
+ innerHTML: s.value
121
+ }, null, 10, G)
122
+ ]),
123
+ _: 1
124
+ }, 8, ["content", "disabled"])) : (t(), a("span", {
125
+ key: 2,
126
+ class: i(["text-sm font-semibold text-foreground wrap-break-word leading-snug", o.value]),
127
+ innerHTML: s.value
128
+ }, null, 10, J))
129
+ ], 64)) : (t(), a("span", K, " •••••••• ")),
130
+ r("button", {
114
131
  type: "button",
115
132
  class: "shrink-0 p-0.5 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
116
- "aria-label": i.value ? "Hide value" : "Show value",
117
- onClick: u[0] || (u[0] = (T) => i.value = !i.value)
133
+ "aria-label": c.value ? "Hide value" : "Show value",
134
+ onClick: f[0] || (f[0] = (p) => c.value = !c.value)
118
135
  }, [
119
- p(g, {
120
- icon: i.value ? "lucide:eye-off" : "lucide:eye",
136
+ C(h, {
137
+ icon: c.value ? "lucide:eye-off" : "lucide:eye",
121
138
  class: "w-3 h-3"
122
139
  }, null, 8, ["icon"])
123
- ], 8, q)
124
- ])) : b.value ? (t(), a("img", {
140
+ ], 8, P)
141
+ ])) : T.value ? (t(), a("img", {
125
142
  key: 3,
126
- src: r.value,
127
- alt: y.value,
143
+ src: s.value,
144
+ alt: b.value,
128
145
  class: "w-8 h-8 rounded-full object-cover border border-border mt-0.5"
129
- }, null, 8, A)) : (t(), a(m, { key: 4 }, [
130
- e.field.type === "price" ? (t(), f(k, {
146
+ }, null, 8, Q)) : (t(), a(m, { key: 4 }, [
147
+ e.field.type === "price" ? (t(), d(x, {
131
148
  key: 0,
132
- value: o.value,
133
- class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value])
134
- }, null, 8, ["value", "class"])) : (t(), a("span", {
149
+ value: u.value,
150
+ class: i(["text-sm font-semibold text-foreground wrap-break-word leading-snug", o.value])
151
+ }, null, 8, ["value", "class"])) : e.field.type === "number" ? (t(), d(w, {
135
152
  key: 1,
136
- class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value]),
137
- innerHTML: r.value
138
- }, null, 10, G))
153
+ content: g.value,
154
+ disabled: !y.value
155
+ }, {
156
+ default: k(() => [
157
+ r("span", {
158
+ class: i(["text-sm font-semibold text-foreground wrap-break-word leading-snug", o.value]),
159
+ innerHTML: s.value
160
+ }, null, 10, U)
161
+ ]),
162
+ _: 1
163
+ }, 8, ["content", "disabled"])) : (t(), a("span", {
164
+ key: 2,
165
+ class: i(["text-sm font-semibold text-foreground wrap-break-word leading-snug", o.value]),
166
+ innerHTML: s.value
167
+ }, null, 10, W))
139
168
  ], 64))
140
169
  ])
141
- ], 2)) : S.value ? (t(), a("div", {
170
+ ], 2)) : N.value ? (t(), a("div", {
142
171
  key: 1,
143
- class: s(["list-field-row list-field-row--block flex flex-col gap-y-1 px-3 py-2.5 transition-colors w-full", [
172
+ class: i(["list-field-row list-field-row--block flex flex-col gap-y-1 px-3 py-2.5 transition-colors w-full", [
144
173
  e.showBorderBottom && !e.isLast ? "border-b border-border" : "",
145
- B.value ? "bg-muted/40" : "",
174
+ S.value ? "bg-muted/40" : "",
146
175
  e.variant === "compact" ? "py-1.5!" : "",
147
176
  e.variant === "minimal" ? "px-0!" : ""
148
177
  ]]),
149
178
  role: "row"
150
179
  }, [
151
- c("div", J, [
152
- e.field.icon ? (t(), f(g, {
180
+ r("div", X, [
181
+ e.field.icon ? (t(), d(h, {
153
182
  key: 0,
154
183
  icon: e.field.icon,
155
184
  class: "w-3.5 h-3.5 text-gray-800 shrink-0"
156
- }, null, 8, ["icon"])) : x("", !0),
157
- c("span", K, h(y.value) + h(e.showColon ? ":" : ""), 1)
185
+ }, null, 8, ["icon"])) : H("", !0),
186
+ r("span", Z, L(b.value) + L(e.showColon ? ":" : ""), 1)
158
187
  ]),
159
- c("div", P, [
160
- n.$slots[e.field.key] ? w(n.$slots, e.field.key, {
188
+ r("div", _, [
189
+ n.$slots[e.field.key] ? M(n.$slots, e.field.key, {
161
190
  key: 0,
162
- value: o.value,
163
- resolved: r.value,
191
+ value: u.value,
192
+ resolved: s.value,
164
193
  data: e.data
165
- }) : e.field.component ? (t(), f(L(e.field.component), {
194
+ }) : e.field.component ? (t(), d(B(e.field.component), {
166
195
  key: 1,
167
196
  data: e.data,
168
- value: o.value
169
- }, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a("div", Q, [
170
- i.value ? (t(), a(m, { key: 0 }, [
171
- e.field.type === "price" ? (t(), f(k, {
197
+ value: u.value
198
+ }, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a("div", ee, [
199
+ c.value ? (t(), a(m, { key: 0 }, [
200
+ e.field.type === "price" ? (t(), d(x, {
172
201
  key: 0,
173
- value: o.value,
174
- class: s(["text-sm text-gray-600 wrap-break-word leading-snug", d.value])
175
- }, null, 8, ["value", "class"])) : (t(), a("span", {
202
+ value: u.value,
203
+ class: i(["text-sm text-gray-600 wrap-break-word leading-snug", o.value])
204
+ }, null, 8, ["value", "class"])) : e.field.type === "number" ? (t(), d(w, {
176
205
  key: 1,
177
- class: s(["text-sm text-gray-600 wrap-break-word leading-snug", d.value]),
178
- innerHTML: r.value
179
- }, null, 10, U))
180
- ], 64)) : (t(), a("span", W, " •••••••• ")),
181
- c("button", {
206
+ content: g.value,
207
+ disabled: !y.value
208
+ }, {
209
+ default: k(() => [
210
+ r("span", {
211
+ class: i(["text-sm text-gray-600 wrap-break-word leading-snug", o.value]),
212
+ innerHTML: s.value
213
+ }, null, 10, te)
214
+ ]),
215
+ _: 1
216
+ }, 8, ["content", "disabled"])) : (t(), a("span", {
217
+ key: 2,
218
+ class: i(["text-sm text-gray-600 wrap-break-word leading-snug", o.value]),
219
+ innerHTML: s.value
220
+ }, null, 10, le))
221
+ ], 64)) : (t(), a("span", ae, " •••••••• ")),
222
+ r("button", {
182
223
  type: "button",
183
224
  class: "shrink-0 p-1 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
184
- "aria-label": i.value ? "Hide value" : "Show value",
185
- onClick: u[1] || (u[1] = (T) => i.value = !i.value)
225
+ "aria-label": c.value ? "Hide value" : "Show value",
226
+ onClick: f[1] || (f[1] = (p) => c.value = !c.value)
186
227
  }, [
187
- p(g, {
188
- icon: i.value ? "lucide:eye-off" : "lucide:eye",
228
+ C(h, {
229
+ icon: c.value ? "lucide:eye-off" : "lucide:eye",
189
230
  class: "w-3.5 h-3.5"
190
231
  }, null, 8, ["icon"])
191
- ], 8, X)
192
- ])) : b.value ? (t(), a("img", {
232
+ ], 8, ne)
233
+ ])) : T.value ? (t(), a("img", {
193
234
  key: 3,
194
- src: r.value,
195
- alt: y.value,
235
+ src: s.value,
236
+ alt: b.value,
196
237
  class: "w-8 h-8 rounded-full object-cover border border-border"
197
- }, null, 8, Z)) : (t(), a(m, { key: 4 }, [
198
- e.field.type === "price" ? (t(), f(k, {
238
+ }, null, 8, ie)) : (t(), a(m, { key: 4 }, [
239
+ e.field.type === "price" ? (t(), d(x, {
199
240
  key: 0,
200
- value: o.value,
201
- class: s(["text-sm text-gray-900 wrap-break-word leading-snug", d.value])
202
- }, null, 8, ["value", "class"])) : (t(), a("span", {
241
+ value: u.value,
242
+ class: i(["text-sm text-gray-900 wrap-break-word leading-snug", o.value])
243
+ }, null, 8, ["value", "class"])) : e.field.type === "number" ? (t(), d(w, {
203
244
  key: 1,
204
- class: s(["text-sm text-gray-900 wrap-break-word leading-snug", d.value]),
205
- innerHTML: r.value
206
- }, null, 10, _))
245
+ content: g.value,
246
+ disabled: !y.value
247
+ }, {
248
+ default: k(() => [
249
+ r("span", {
250
+ class: i(["text-sm text-gray-900 wrap-break-word leading-snug", o.value]),
251
+ innerHTML: s.value
252
+ }, null, 10, se)
253
+ ]),
254
+ _: 1
255
+ }, 8, ["content", "disabled"])) : (t(), a("span", {
256
+ key: 2,
257
+ class: i(["text-sm text-gray-900 wrap-break-word leading-snug", o.value]),
258
+ innerHTML: s.value
259
+ }, null, 10, oe))
207
260
  ], 64))
208
261
  ])
209
262
  ], 2)) : (t(), a("div", {
210
263
  key: 2,
211
- class: s(["list-field-row flex justify-between gap-3 px-3 py-2.5 transition-colors", [
264
+ class: i(["list-field-row flex justify-between gap-3 px-3 py-2.5 transition-colors", [
212
265
  e.showBorderBottom && !e.isLast ? "border-b border-border" : "",
213
- B.value ? "bg-muted/40" : "",
266
+ S.value ? "bg-muted/40" : "",
214
267
  e.variant === "compact" ? "py-1.5!" : "",
215
268
  e.variant === "minimal" ? "px-0!" : ""
216
269
  ]]),
217
270
  role: "row"
218
271
  }, [
219
- c("div", ee, [
220
- e.field.icon ? (t(), f(g, {
272
+ r("div", re, [
273
+ e.field.icon ? (t(), d(h, {
221
274
  key: 0,
222
275
  icon: e.field.icon,
223
276
  class: "w-3.5 h-3.5 text-gray-800 shrink-0"
224
- }, null, 8, ["icon"])) : x("", !0),
225
- c("span", te, h(y.value) + h(e.showColon ? ":" : ""), 1)
277
+ }, null, 8, ["icon"])) : H("", !0),
278
+ r("span", de, L(b.value) + L(e.showColon ? ":" : ""), 1)
226
279
  ]),
227
- c("div", le, [
228
- n.$slots[e.field.key] ? w(n.$slots, e.field.key, {
280
+ r("div", ue, [
281
+ n.$slots[e.field.key] ? M(n.$slots, e.field.key, {
229
282
  key: 0,
230
- value: o.value,
231
- resolved: r.value,
283
+ value: u.value,
284
+ resolved: s.value,
232
285
  data: e.data
233
- }) : e.field.component ? (t(), f(L(e.field.component), {
286
+ }) : e.field.component ? (t(), d(B(e.field.component), {
234
287
  key: 1,
235
288
  data: e.data,
236
- value: o.value
289
+ value: u.value
237
290
  }, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a(m, { key: 2 }, [
238
- i.value ? (t(), a(m, { key: 0 }, [
239
- e.field.type === "price" ? (t(), f(k, {
291
+ c.value ? (t(), a(m, { key: 0 }, [
292
+ e.field.type === "price" ? (t(), d(x, {
240
293
  key: 0,
241
- value: o.value,
242
- class: s(["text-sm text-gray-600 text-right wrap-break-word", d.value])
243
- }, null, 8, ["value", "class"])) : (t(), a("span", {
294
+ value: u.value,
295
+ class: i(["text-sm text-gray-600 text-right wrap-break-word", o.value])
296
+ }, null, 8, ["value", "class"])) : e.field.type === "number" ? (t(), d(w, {
244
297
  key: 1,
245
- class: s(["text-sm text-gray-600 text-right wrap-break-word", d.value]),
246
- innerHTML: r.value
247
- }, null, 10, ae))
248
- ], 64)) : (t(), a("span", ne, " •••••••• ")),
249
- c("button", {
298
+ content: g.value,
299
+ disabled: !y.value
300
+ }, {
301
+ default: k(() => [
302
+ r("span", {
303
+ class: i(["text-sm text-gray-600 text-right wrap-break-word", o.value]),
304
+ innerHTML: s.value
305
+ }, null, 10, ce)
306
+ ]),
307
+ _: 1
308
+ }, 8, ["content", "disabled"])) : (t(), a("span", {
309
+ key: 2,
310
+ class: i(["text-sm text-gray-600 text-right wrap-break-word", o.value]),
311
+ innerHTML: s.value
312
+ }, null, 10, fe))
313
+ ], 64)) : (t(), a("span", ve, " •••••••• ")),
314
+ r("button", {
250
315
  type: "button",
251
316
  class: "shrink-0 p-1 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
252
- "aria-label": i.value ? "Hide value" : "Show value",
253
- onClick: u[2] || (u[2] = (T) => i.value = !i.value)
317
+ "aria-label": c.value ? "Hide value" : "Show value",
318
+ onClick: f[2] || (f[2] = (p) => c.value = !c.value)
254
319
  }, [
255
- p(g, {
256
- icon: i.value ? "lucide:eye-off" : "lucide:eye",
320
+ C(h, {
321
+ icon: c.value ? "lucide:eye-off" : "lucide:eye",
257
322
  class: "w-3.5 h-3.5"
258
323
  }, null, 8, ["icon"])
259
- ], 8, ie)
260
- ], 64)) : b.value ? (t(), a("img", {
324
+ ], 8, me)
325
+ ], 64)) : T.value ? (t(), a("img", {
261
326
  key: 3,
262
- src: r.value,
263
- alt: y.value,
327
+ src: s.value,
328
+ alt: b.value,
264
329
  class: "w-8 h-8 rounded-full object-cover border border-border"
265
- }, null, 8, se)) : (t(), a(m, { key: 4 }, [
266
- e.field.type === "price" ? (t(), f(k, {
330
+ }, null, 8, ye)) : (t(), a(m, { key: 4 }, [
331
+ e.field.type === "price" ? (t(), d(x, {
267
332
  key: 0,
268
- value: o.value,
269
- class: s(["text-sm text-gray-900 text-right wrap-break-word leading-snug", d.value])
270
- }, null, 8, ["value", "class"])) : (t(), a("span", {
333
+ value: u.value,
334
+ class: i(["text-sm text-gray-900 text-right wrap-break-word leading-snug", o.value])
335
+ }, null, 8, ["value", "class"])) : e.field.type === "number" ? (t(), d(w, {
271
336
  key: 1,
272
- class: s(["text-sm text-gray-900 text-right wrap-break-word leading-snug", d.value]),
273
- innerHTML: r.value
274
- }, null, 10, oe))
337
+ content: g.value,
338
+ disabled: !y.value
339
+ }, {
340
+ default: k(() => [
341
+ r("span", {
342
+ class: i(["text-sm text-gray-900 text-right wrap-break-word leading-snug", o.value]),
343
+ innerHTML: s.value
344
+ }, null, 10, ge)
345
+ ]),
346
+ _: 1
347
+ }, 8, ["content", "disabled"])) : (t(), a("span", {
348
+ key: 2,
349
+ class: i(["text-sm text-gray-900 text-right wrap-break-word leading-snug", o.value]),
350
+ innerHTML: s.value
351
+ }, null, 10, be))
275
352
  ], 64))
276
353
  ])
277
354
  ], 2));
278
355
  }
279
356
  });
280
357
  export {
281
- ye as default
358
+ Me as default
282
359
  };
@@ -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: {
@@ -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
+ };