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.
- package/README.md +1 -0
- package/components/AppShell/AppShellLayoutDashboard.vue.js +1 -1
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +1 -1
- package/components/AsyncSelect/createAsyncSelect.d.ts +88 -0
- package/components/AsyncSelect/createAsyncSelect.js +156 -0
- package/components/AsyncSelect/index.d.ts +1 -0
- package/components/ChoiceBox/ChoiceBox.vue.js +4 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +1 -1
- package/components/List/ListFieldRow.vue.js +221 -144
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/Price/Price.vue.d.ts +1 -1
- package/components/Price/Price.vue.js +35 -13
- package/components/Rating/Rating.vue.d.ts +43 -0
- package/components/Rating/Rating.vue.js +7 -0
- package/components/Rating/Rating.vue2.js +92 -0
- package/components/Rating/ReviewSummary.vue.d.ts +5 -0
- package/components/Rating/ReviewSummary.vue.js +67 -0
- package/components/Rating/ReviewSummary.vue2.js +4 -0
- package/components/Rating/index.d.ts +3 -0
- package/components/Rating/types.d.ts +28 -0
- package/components/Screen/Screen.vue.d.ts +2 -2
- package/components/Screen/Screen.vue.js +3 -1
- package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
- package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +3 -1
- package/components/SidebarMenu/SidebarMenuItem.vue.js +198 -175
- package/components/Stats/StatItem.vue.js +222 -164
- package/components/Stats/components/StatIconBox.vue.js +42 -42
- package/components/Stats/components/StatTrend.vue.js +20 -20
- package/components/Timeline/Timeline.vue.js +21 -11
- package/components/Timeline/TimelineItem.vue.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +108 -102
- package/package.json +2 -1
- package/style.css +23 -17
- package/utils/status.js +16 -16
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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,
|
|
42
|
-
const n =
|
|
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
|
|
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
|
|
56
|
+
return E(n, void 0, l.field.type);
|
|
56
57
|
default:
|
|
57
58
|
return String(n);
|
|
58
59
|
}
|
|
59
|
-
}), y = v(
|
|
60
|
-
(
|
|
61
|
-
|
|
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
|
|
65
|
-
|
|
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
|
|
70
|
-
|
|
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
|
-
}),
|
|
75
|
-
return (n,
|
|
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:
|
|
82
|
+
class: i([
|
|
78
83
|
"list-field-row list-field-row--stacked flex flex-col gap-0.5 min-w-0",
|
|
79
|
-
|
|
84
|
+
j.value
|
|
80
85
|
]),
|
|
81
86
|
role: "row"
|
|
82
87
|
}, [
|
|
83
|
-
|
|
84
|
-
e.field.icon ? (t(),
|
|
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"])) :
|
|
89
|
-
|
|
93
|
+
}, null, 8, ["icon"])) : H("", !0),
|
|
94
|
+
r("span", Y, L(b.value), 1)
|
|
90
95
|
]),
|
|
91
|
-
|
|
92
|
-
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:
|
|
95
|
-
resolved:
|
|
99
|
+
value: u.value,
|
|
100
|
+
resolved: s.value,
|
|
96
101
|
data: e.data
|
|
97
|
-
}) : e.field.component ? (t(),
|
|
102
|
+
}) : e.field.component ? (t(), d(B(e.field.component), {
|
|
98
103
|
key: 1,
|
|
99
104
|
data: e.data,
|
|
100
|
-
value:
|
|
101
|
-
}, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a("div",
|
|
102
|
-
|
|
103
|
-
e.field.type === "price" ? (t(),
|
|
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:
|
|
106
|
-
class:
|
|
107
|
-
}, null, 8, ["value", "class"])) : (t(),
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
|
|
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":
|
|
117
|
-
onClick:
|
|
133
|
+
"aria-label": c.value ? "Hide value" : "Show value",
|
|
134
|
+
onClick: f[0] || (f[0] = (p) => c.value = !c.value)
|
|
118
135
|
}, [
|
|
119
|
-
|
|
120
|
-
icon:
|
|
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,
|
|
124
|
-
])) :
|
|
140
|
+
], 8, P)
|
|
141
|
+
])) : T.value ? (t(), a("img", {
|
|
125
142
|
key: 3,
|
|
126
|
-
src:
|
|
127
|
-
alt:
|
|
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,
|
|
130
|
-
e.field.type === "price" ? (t(),
|
|
146
|
+
}, null, 8, Q)) : (t(), a(m, { key: 4 }, [
|
|
147
|
+
e.field.type === "price" ? (t(), d(x, {
|
|
131
148
|
key: 0,
|
|
132
|
-
value:
|
|
133
|
-
class:
|
|
134
|
-
}, null, 8, ["value", "class"])) : (t(),
|
|
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
|
-
|
|
137
|
-
|
|
138
|
-
},
|
|
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)) :
|
|
170
|
+
], 2)) : N.value ? (t(), a("div", {
|
|
142
171
|
key: 1,
|
|
143
|
-
class:
|
|
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
|
-
|
|
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
|
-
|
|
152
|
-
e.field.icon ? (t(),
|
|
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"])) :
|
|
157
|
-
|
|
185
|
+
}, null, 8, ["icon"])) : H("", !0),
|
|
186
|
+
r("span", Z, L(b.value) + L(e.showColon ? ":" : ""), 1)
|
|
158
187
|
]),
|
|
159
|
-
|
|
160
|
-
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:
|
|
163
|
-
resolved:
|
|
191
|
+
value: u.value,
|
|
192
|
+
resolved: s.value,
|
|
164
193
|
data: e.data
|
|
165
|
-
}) : e.field.component ? (t(),
|
|
194
|
+
}) : e.field.component ? (t(), d(B(e.field.component), {
|
|
166
195
|
key: 1,
|
|
167
196
|
data: e.data,
|
|
168
|
-
value:
|
|
169
|
-
}, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a("div",
|
|
170
|
-
|
|
171
|
-
e.field.type === "price" ? (t(),
|
|
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:
|
|
174
|
-
class:
|
|
175
|
-
}, null, 8, ["value", "class"])) : (t(),
|
|
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
|
-
|
|
178
|
-
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
|
|
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":
|
|
185
|
-
onClick:
|
|
225
|
+
"aria-label": c.value ? "Hide value" : "Show value",
|
|
226
|
+
onClick: f[1] || (f[1] = (p) => c.value = !c.value)
|
|
186
227
|
}, [
|
|
187
|
-
|
|
188
|
-
icon:
|
|
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,
|
|
192
|
-
])) :
|
|
232
|
+
], 8, ne)
|
|
233
|
+
])) : T.value ? (t(), a("img", {
|
|
193
234
|
key: 3,
|
|
194
|
-
src:
|
|
195
|
-
alt:
|
|
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,
|
|
198
|
-
e.field.type === "price" ? (t(),
|
|
238
|
+
}, null, 8, ie)) : (t(), a(m, { key: 4 }, [
|
|
239
|
+
e.field.type === "price" ? (t(), d(x, {
|
|
199
240
|
key: 0,
|
|
200
|
-
value:
|
|
201
|
-
class:
|
|
202
|
-
}, null, 8, ["value", "class"])) : (t(),
|
|
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
|
-
|
|
205
|
-
|
|
206
|
-
},
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
220
|
-
e.field.icon ? (t(),
|
|
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"])) :
|
|
225
|
-
|
|
277
|
+
}, null, 8, ["icon"])) : H("", !0),
|
|
278
|
+
r("span", de, L(b.value) + L(e.showColon ? ":" : ""), 1)
|
|
226
279
|
]),
|
|
227
|
-
|
|
228
|
-
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:
|
|
231
|
-
resolved:
|
|
283
|
+
value: u.value,
|
|
284
|
+
resolved: s.value,
|
|
232
285
|
data: e.data
|
|
233
|
-
}) : e.field.component ? (t(),
|
|
286
|
+
}) : e.field.component ? (t(), d(B(e.field.component), {
|
|
234
287
|
key: 1,
|
|
235
288
|
data: e.data,
|
|
236
|
-
value:
|
|
289
|
+
value: u.value
|
|
237
290
|
}, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a(m, { key: 2 }, [
|
|
238
|
-
|
|
239
|
-
e.field.type === "price" ? (t(),
|
|
291
|
+
c.value ? (t(), a(m, { key: 0 }, [
|
|
292
|
+
e.field.type === "price" ? (t(), d(x, {
|
|
240
293
|
key: 0,
|
|
241
|
-
value:
|
|
242
|
-
class:
|
|
243
|
-
}, null, 8, ["value", "class"])) : (t(),
|
|
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
|
-
|
|
246
|
-
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
|
|
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":
|
|
253
|
-
onClick:
|
|
317
|
+
"aria-label": c.value ? "Hide value" : "Show value",
|
|
318
|
+
onClick: f[2] || (f[2] = (p) => c.value = !c.value)
|
|
254
319
|
}, [
|
|
255
|
-
|
|
256
|
-
icon:
|
|
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,
|
|
260
|
-
], 64)) :
|
|
324
|
+
], 8, me)
|
|
325
|
+
], 64)) : T.value ? (t(), a("img", {
|
|
261
326
|
key: 3,
|
|
262
|
-
src:
|
|
263
|
-
alt:
|
|
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,
|
|
266
|
-
e.field.type === "price" ? (t(),
|
|
330
|
+
}, null, 8, ye)) : (t(), a(m, { key: 4 }, [
|
|
331
|
+
e.field.type === "price" ? (t(), d(x, {
|
|
267
332
|
key: 0,
|
|
268
|
-
value:
|
|
269
|
-
class:
|
|
270
|
-
}, null, 8, ["value", "class"])) : (t(),
|
|
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
|
-
|
|
273
|
-
|
|
274
|
-
},
|
|
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
|
-
|
|
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, {},
|
|
9
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
10
10
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useVLiteConfig as
|
|
3
|
-
|
|
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(
|
|
12
|
-
const
|
|
13
|
-
const
|
|
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
|
|
16
|
+
const t = {
|
|
16
17
|
style: "currency",
|
|
17
|
-
currency:
|
|
18
|
-
},
|
|
19
|
-
return
|
|
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 `$${
|
|
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 (
|
|
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
|
-
|
|
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
|
+
};
|