vlite3 0.8.11 → 0.9.2
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/components/AttachmentsList/AttachmentsList.vue.d.ts +6 -0
- package/components/AttachmentsList/AttachmentsList.vue.js +82 -0
- package/components/AttachmentsList/AttachmentsList.vue2.js +4 -0
- package/components/AttachmentsList/index.d.ts +2 -0
- package/components/AttachmentsList/types.d.ts +11 -0
- package/components/Button.vue.js +6 -6
- package/components/Chat/ChatBubble.vue.d.ts +18 -0
- package/components/Chat/ChatInterface.vue.d.ts +45 -0
- package/components/Chat/index.d.ts +2 -0
- package/components/DataList/DataList.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTable.vue.js +22 -22
- package/components/DataTable/types.d.ts +1 -1
- package/components/DatePicker.vue.d.ts +3 -2
- package/components/DatePicker.vue.js +1 -1
- package/components/Dropdown/Dropdown.vue.d.ts +2 -0
- package/components/Dropdown/Dropdown.vue.js +106 -90
- package/components/Dropdown/DropdownItem.vue.js +8 -8
- package/components/Dropdown/DropdownMenu.vue.js +2 -2
- package/components/Dropdown/DropdownMenu.vue2.js +1 -1
- package/components/ExportData/ExportData.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.d.ts +4 -1
- package/components/FilePicker/FilePicker.vue.js +189 -139
- package/components/FilePreview/FilePreview.vue.d.ts +5 -0
- package/components/FilePreview/FilePreview.vue.js +27 -0
- package/components/FilePreview/FilePreview.vue2.js +4 -0
- package/components/FilePreview/index.d.ts +2 -0
- package/components/FilePreview/types.d.ts +5 -0
- package/components/Form/FormField.vue.js +3 -1
- package/components/Form/composables/useForm.js +50 -47
- package/components/Input.vue.d.ts +1 -0
- package/components/Input.vue.js +18 -15
- package/components/Modal.vue.js +2 -2
- package/components/Modal.vue2.js +31 -31
- package/components/MultiSelect/MultiSelect.vue.js +92 -84
- package/components/Navbar/Navbar.vue.js +61 -60
- package/components/Screen/Screen.vue.d.ts +200 -7
- package/components/Screen/Screen.vue.js +306 -502
- package/components/Screen/ScreenFilter.vue.js +45 -42
- package/components/Screen/components/ScreenAddAction.vue.d.ts +15 -0
- package/components/Screen/components/ScreenAddAction.vue.js +107 -0
- package/components/Screen/components/ScreenAddAction.vue2.js +4 -0
- package/components/Screen/components/ScreenEmptyState.vue.d.ts +14 -0
- package/components/Screen/components/ScreenEmptyState.vue.js +105 -0
- package/components/Screen/components/ScreenEmptyState.vue2.js +4 -0
- package/components/Screen/components/ScreenExportModal.vue.d.ts +49 -0
- package/components/Screen/components/ScreenExportModal.vue.js +83 -0
- package/components/Screen/components/ScreenExportModal.vue2.js +4 -0
- package/components/Screen/components/ScreenHeaderTitle.vue.d.ts +28 -0
- package/components/Screen/components/ScreenHeaderTitle.vue.js +57 -0
- package/components/Screen/components/ScreenHeaderTitle.vue2.js +4 -0
- package/components/Screen/components/ScreenOptionsDropdown.vue.d.ts +10 -0
- package/components/Screen/components/ScreenOptionsDropdown.vue.js +43 -0
- package/components/Screen/components/ScreenOptionsDropdown.vue2.js +4 -0
- package/components/Screen/components/ScreenQuickFilters.vue.d.ts +15 -0
- package/components/Screen/components/ScreenQuickFilters.vue.js +36 -0
- package/components/Screen/components/ScreenQuickFilters.vue2.js +4 -0
- package/components/Screen/components/ScreenViewToggle.vue.d.ts +9 -0
- package/components/Screen/components/ScreenViewToggle.vue.js +48 -0
- package/components/Screen/components/ScreenViewToggle.vue2.js +4 -0
- package/components/Screen/index.d.ts +1 -0
- package/components/Screen/types.d.ts +41 -2
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel.vue2.js +7 -7
- package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
- package/components/Stats/Stats.vue.js +50 -49
- package/components/StatusChip/StatusChip.vue.d.ts +2 -2
- package/components/StatusChip/StatusChip.vue.js +15 -14
- package/components/StatusChip/status-map.d.ts +2 -1
- package/components/StatusChip/status-map.js +16 -6
- package/components/Tabes/Tabes.vue.d.ts +1 -1
- package/components/Tabes/Tabes.vue.js +5 -143
- package/components/Tabes/Tabes.vue2.js +144 -2
- package/components/Timeline/TimelineIndicator.vue.js +6 -6
- package/components/Workbook/Sheet.vue.d.ts +1 -1
- package/core/config.d.ts +8 -0
- package/core/config.js +10 -6
- package/core/index.js +28 -20
- package/index.d.ts +2 -0
- package/index.js +209 -203
- package/package.json +3 -2
- package/style.css +80 -6
- package/types/config.type.d.ts +10 -0
- package/types/form.type.d.ts +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as N, computed as w, openBlock as s, createElementBlock as a, normalizeClass as t, Fragment as y, renderList as V, normalizeStyle as
|
|
1
|
+
import { defineComponent as N, computed as w, openBlock as s, createElementBlock as a, normalizeClass as t, Fragment as y, renderList as V, normalizeStyle as v, createElementVNode as c, toDisplayString as l, unref as b, createVNode as f, createCommentVNode as d, createBlock as E, createTextVNode as L } from "vue";
|
|
2
2
|
import g from "../Icon.vue.js";
|
|
3
3
|
import { $t as h } from "../../utils/i18n.js";
|
|
4
|
-
const O = { class: "flex items-
|
|
4
|
+
const O = { class: "flex items-center justify-between w-full mt-1" }, D = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "mt-1 flex items-center gap-1 text-sm"
|
|
7
7
|
}, F = {
|
|
@@ -47,22 +47,23 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
47
47
|
class: { default: "" }
|
|
48
48
|
},
|
|
49
49
|
setup(n) {
|
|
50
|
-
const
|
|
51
|
-
const i = Number(
|
|
50
|
+
const o = n, S = w(() => {
|
|
51
|
+
const i = Number(o.columns) || 4;
|
|
52
52
|
return i === 1 ? "grid-cols-1" : i === 2 ? "grid-cols-1 sm:grid-cols-2" : i === 3 ? "grid-cols-1 sm:grid-cols-3" : i === 4 ? "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4" : i === 5 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-5" : i === 6 ? "grid-cols-1 sm:grid-cols-3 lg:grid-cols-6" : "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";
|
|
53
53
|
}), z = w(() => [
|
|
54
54
|
"grid",
|
|
55
55
|
S.value,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
o.attached ? "gap-0 border-t border-l overflow-hidden" : "gap-3 sm:gap-4.5",
|
|
57
|
+
o.variant === "shadow" && o.attached ? "shadow-md" : "",
|
|
58
|
+
o?.layout === "inline-label-value" ? "rounded-sm overflow-hidden" : "",
|
|
59
|
+
o.class
|
|
59
60
|
].join(" ")), I = (i, r) => {
|
|
60
|
-
const e =
|
|
61
|
+
const e = o.layout === "inline-label-value" ? "flex px-3.5 py-3 relative transition-all duration-200" : "flex p-3 relative transition-all duration-200", u = {
|
|
61
62
|
"icon-left": "flex-row items-center gap-3 text-left",
|
|
62
63
|
"icon-right": "flex-row items-center justify-between gap-3 text-left",
|
|
63
|
-
"icon-top": "flex-col items-start gap-
|
|
64
|
+
"icon-top": "flex-col items-start gap-1 px-5! pt-2! text-left",
|
|
64
65
|
// title top, value bottom-left, icon bottom-right
|
|
65
|
-
"title-top-icon-bottom-right": "flex-col items-start gap-0 text-left",
|
|
66
|
+
"title-top-icon-bottom-right": "flex-col items-start gap-0 text-left px-5! py-4!",
|
|
66
67
|
// centered: value on top (bigger/bold), title below — no icon
|
|
67
68
|
"centered-value-title": "flex-col items-center justify-center text-center gap-1",
|
|
68
69
|
// floating icon overlapping card top-right corner
|
|
@@ -71,12 +72,12 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
71
72
|
"split-bar": "flex-row items-center gap-3 text-left border-l-4",
|
|
72
73
|
// inline-label-value: icon + label left, value right — compact row
|
|
73
74
|
"inline-label-value": "flex-row items-center gap-2.5 text-left"
|
|
74
|
-
}, j = u[
|
|
75
|
+
}, j = u[o.layout] || u["icon-left"];
|
|
75
76
|
let x = "";
|
|
76
|
-
if (
|
|
77
|
-
x = "border-b border-r hover:bg-muted/30",
|
|
77
|
+
if (o.attached)
|
|
78
|
+
x = "border-b border-r hover:bg-muted/30", o.variant !== "transparent" && (x += " bg-card");
|
|
78
79
|
else {
|
|
79
|
-
switch (
|
|
80
|
+
switch (o.variant) {
|
|
80
81
|
case "solid": {
|
|
81
82
|
const M = i.color || "primary", m = {
|
|
82
83
|
primary: "bg-primary-light",
|
|
@@ -103,12 +104,12 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
103
104
|
}
|
|
104
105
|
return [e, j, x].join(" ");
|
|
105
106
|
}, C = (i) => {
|
|
106
|
-
if (
|
|
107
|
+
if (o.variant === "solid" && !o.attached) {
|
|
107
108
|
const r = i.color;
|
|
108
109
|
if (r && !["primary", "secondary", "success", "warning", "danger", "info"].includes(r))
|
|
109
110
|
return { backgroundColor: `${r}15` };
|
|
110
111
|
}
|
|
111
|
-
if (
|
|
112
|
+
if (o.layout === "split-bar") {
|
|
112
113
|
const r = i.color, e = {
|
|
113
114
|
primary: "var(--color-primary)",
|
|
114
115
|
secondary: "var(--color-secondary)",
|
|
@@ -121,9 +122,9 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
121
122
|
return { borderLeftColor: e[r] || r };
|
|
122
123
|
}
|
|
123
124
|
return {};
|
|
124
|
-
}, P = w(() =>
|
|
125
|
+
}, P = w(() => o.iconBoxShape === "full-rounded" ? "rounded-full" : o.iconBoxShape === "none" ? "rounded-none" : "rounded-lg"), p = (i) => {
|
|
125
126
|
const r = `flex items-center justify-center shrink-0 ${P.value} p-3`, e = i.color || "primary";
|
|
126
|
-
if (
|
|
127
|
+
if (o.iconBoxStyle === "transparent")
|
|
127
128
|
return `${r} bg-transparent ${{
|
|
128
129
|
primary: "text-primary",
|
|
129
130
|
secondary: "text-secondary-foreground",
|
|
@@ -132,7 +133,7 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
132
133
|
danger: "text-danger-dark",
|
|
133
134
|
info: "text-info-dark"
|
|
134
135
|
}[e] || "text-primary"}`;
|
|
135
|
-
if (
|
|
136
|
+
if (o.variant === "solid" && !o.attached) {
|
|
136
137
|
const u = {
|
|
137
138
|
primary: "bg-primary text-primary-fg",
|
|
138
139
|
secondary: "bg-foreground text-background",
|
|
@@ -168,7 +169,7 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
168
169
|
return r && !["primary", "secondary", "success", "warning", "danger", "info"].includes(r) ? { color: r } : {};
|
|
169
170
|
}, k = (i) => {
|
|
170
171
|
const r = i.color;
|
|
171
|
-
return r && !["primary", "secondary", "success", "warning", "danger", "info"].includes(r) ?
|
|
172
|
+
return r && !["primary", "secondary", "success", "warning", "danger", "info"].includes(r) ? o.iconBoxStyle === "transparent" ? { color: r } : o.variant === "solid" && !o.attached ? { backgroundColor: r, color: "#fff" } : { color: r, backgroundColor: `${r}20` } : {};
|
|
172
173
|
};
|
|
173
174
|
return (i, r) => (s(), a("div", {
|
|
174
175
|
class: t(z.value)
|
|
@@ -176,17 +177,17 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
176
177
|
(s(!0), a(y, null, V(n.items, (e, u) => (s(), a("div", {
|
|
177
178
|
key: e.id || u,
|
|
178
179
|
class: t(I(e)),
|
|
179
|
-
style:
|
|
180
|
+
style: v(C(e))
|
|
180
181
|
}, [
|
|
181
182
|
n.layout === "title-top-icon-bottom-right" ? (s(), a(y, { key: 0 }, [
|
|
182
183
|
c("h3", {
|
|
183
184
|
class: t(n.titleSize || "text-sm font-medium text-muted-foreground truncate w-full")
|
|
184
|
-
},
|
|
185
|
+
}, l(e.titleI18n ? b(h)(e.titleI18n) : e.title), 3),
|
|
185
186
|
c("div", O, [
|
|
186
187
|
c("div", null, [
|
|
187
188
|
c("p", {
|
|
188
189
|
class: t(n.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
189
|
-
},
|
|
190
|
+
}, l(e.value), 3),
|
|
190
191
|
e.trend ? (s(), a("div", D, [
|
|
191
192
|
f(g, {
|
|
192
193
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
@@ -194,14 +195,14 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
194
195
|
}, null, 8, ["icon", "class"]),
|
|
195
196
|
c("span", {
|
|
196
197
|
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
197
|
-
},
|
|
198
|
-
e.trend.label ? (s(), a("span", F,
|
|
198
|
+
}, l(e.trend.value), 3),
|
|
199
|
+
e.trend.label ? (s(), a("span", F, l(e.trend.label), 1)) : d("", !0)
|
|
199
200
|
])) : d("", !0)
|
|
200
201
|
]),
|
|
201
202
|
e.icon ? (s(), a("div", {
|
|
202
203
|
key: 0,
|
|
203
204
|
class: t(p(e)),
|
|
204
|
-
style:
|
|
205
|
+
style: v(k(e))
|
|
205
206
|
}, [
|
|
206
207
|
f(g, {
|
|
207
208
|
icon: e.icon,
|
|
@@ -212,10 +213,10 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
212
213
|
], 64)) : n.layout === "centered-value-title" ? (s(), a(y, { key: 1 }, [
|
|
213
214
|
c("p", {
|
|
214
215
|
class: t(n.valueSize || "text-3xl font-bold text-foreground")
|
|
215
|
-
},
|
|
216
|
+
}, l(e.value), 3),
|
|
216
217
|
c("h3", {
|
|
217
218
|
class: t(n.titleSize || "text-sm font-medium text-muted-foreground")
|
|
218
|
-
},
|
|
219
|
+
}, l(e.titleI18n ? b(h)(e.titleI18n) : e.title), 3),
|
|
219
220
|
e.trend ? (s(), a("div", T, [
|
|
220
221
|
f(g, {
|
|
221
222
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
@@ -223,13 +224,13 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
223
224
|
}, null, 8, ["icon", "class"]),
|
|
224
225
|
c("span", {
|
|
225
226
|
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium"])
|
|
226
|
-
},
|
|
227
|
+
}, l(e.trend.value), 3)
|
|
227
228
|
])) : d("", !0)
|
|
228
229
|
], 64)) : n.layout === "floating-icon" ? (s(), a(y, { key: 2 }, [
|
|
229
230
|
e.icon ? (s(), a("div", {
|
|
230
231
|
key: 0,
|
|
231
232
|
class: t([p(e), "absolute top-4 right-4"]),
|
|
232
|
-
style:
|
|
233
|
+
style: v(k(e))
|
|
233
234
|
}, [
|
|
234
235
|
f(g, {
|
|
235
236
|
icon: e.icon,
|
|
@@ -238,10 +239,10 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
238
239
|
], 6)) : d("", !0),
|
|
239
240
|
c("h3", {
|
|
240
241
|
class: t(n.titleSize || "text-sm font-medium text-muted-foreground truncate pr-12")
|
|
241
|
-
},
|
|
242
|
+
}, l(e.titleI18n ? b(h)(e.titleI18n) : e.title), 3),
|
|
242
243
|
c("p", {
|
|
243
244
|
class: t(n.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
|
|
244
|
-
},
|
|
245
|
+
}, l(e.value), 3),
|
|
245
246
|
e.trend ? (s(), a("div", q, [
|
|
246
247
|
f(g, {
|
|
247
248
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
@@ -249,18 +250,18 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
249
250
|
}, null, 8, ["icon", "class"]),
|
|
250
251
|
c("span", {
|
|
251
252
|
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
252
|
-
},
|
|
253
|
-
e.trend.label ? (s(), a("span", A,
|
|
253
|
+
}, l(e.trend.value), 3),
|
|
254
|
+
e.trend.label ? (s(), a("span", A, l(e.trend.label), 1)) : d("", !0)
|
|
254
255
|
])) : d("", !0)
|
|
255
256
|
], 64)) : n.layout === "split-bar" ? (s(), a("div", G, [
|
|
256
257
|
c("h3", {
|
|
257
258
|
class: t(
|
|
258
259
|
n.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
|
|
259
260
|
)
|
|
260
|
-
},
|
|
261
|
+
}, l(e.titleI18n ? b(h)(e.titleI18n) : e.title), 3),
|
|
261
262
|
c("p", {
|
|
262
263
|
class: t(n.valueSize || "text-3xl font-black text-foreground truncate mt-0.5")
|
|
263
|
-
},
|
|
264
|
+
}, l(e.value), 3),
|
|
264
265
|
e.trend ? (s(), a("div", H, [
|
|
265
266
|
f(g, {
|
|
266
267
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
@@ -268,22 +269,22 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
268
269
|
}, null, 8, ["icon", "class"]),
|
|
269
270
|
c("span", {
|
|
270
271
|
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
271
|
-
},
|
|
272
|
-
e.trend.label ? (s(), a("span", J,
|
|
272
|
+
}, l(e.trend.value), 3),
|
|
273
|
+
e.trend.label ? (s(), a("span", J, l(e.trend.label), 1)) : d("", !0)
|
|
273
274
|
])) : d("", !0)
|
|
274
275
|
])) : n.layout === "inline-label-value" ? (s(), a(y, { key: 4 }, [
|
|
275
276
|
e.icon ? (s(), E(g, {
|
|
276
277
|
key: 0,
|
|
277
278
|
icon: e.icon,
|
|
278
279
|
class: t([$(e), n.iconSize || "w-4.5 h-4.5"]),
|
|
279
|
-
style:
|
|
280
|
+
style: v(B(e))
|
|
280
281
|
}, null, 8, ["icon", "class", "style"])) : d("", !0),
|
|
281
282
|
c("span", {
|
|
282
283
|
class: t([n.titleSize || "-text-fs-2 font-medium text-muted-foreground truncate", "flex-1 min-w-0"])
|
|
283
|
-
},
|
|
284
|
+
}, l(e.titleI18n ? b(h)(e.titleI18n) : e.title), 3),
|
|
284
285
|
c("span", {
|
|
285
|
-
class: t(n.valueSize || "text-
|
|
286
|
-
},
|
|
286
|
+
class: t(n.valueSize || "-text-fs-1 font-semibold text-foreground tabular-nums shrink-0")
|
|
287
|
+
}, l(e.value), 3),
|
|
287
288
|
e.trend ? (s(), a("span", {
|
|
288
289
|
key: 1,
|
|
289
290
|
class: t(["shrink-0 flex items-center gap-0.5 text-xs font-medium", e.trend.isPositive ? "text-success-dark" : "text-danger-dark"])
|
|
@@ -292,13 +293,13 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
292
293
|
icon: e.trend.isPositive ? "lucide:trending-up" : "lucide:trending-down",
|
|
293
294
|
class: "w-3 h-3"
|
|
294
295
|
}, null, 8, ["icon"]),
|
|
295
|
-
L(" " +
|
|
296
|
+
L(" " + l(e.trend.value), 1)
|
|
296
297
|
], 2)) : d("", !0)
|
|
297
298
|
], 64)) : (s(), a(y, { key: 5 }, [
|
|
298
299
|
e.icon && n.layout !== "icon-right" ? (s(), a("div", {
|
|
299
300
|
key: 0,
|
|
300
301
|
class: t(p(e)),
|
|
301
|
-
style:
|
|
302
|
+
style: v(k(e))
|
|
302
303
|
}, [
|
|
303
304
|
f(g, {
|
|
304
305
|
icon: e.icon,
|
|
@@ -308,11 +309,11 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
308
309
|
c("div", K, [
|
|
309
310
|
c("h3", {
|
|
310
311
|
class: t(n.titleSize || "text-sm font-medium text-muted-foreground truncate")
|
|
311
|
-
},
|
|
312
|
+
}, l(e.titleI18n ? b(h)(e.titleI18n) : e.title), 3),
|
|
312
313
|
c("div", Q, [
|
|
313
314
|
c("p", {
|
|
314
315
|
class: t(n.valueSize || "text-2xl font-bold text-foreground truncate")
|
|
315
|
-
},
|
|
316
|
+
}, l(e.value), 3)
|
|
316
317
|
]),
|
|
317
318
|
e.trend ? (s(), a("div", R, [
|
|
318
319
|
f(g, {
|
|
@@ -321,14 +322,14 @@ const O = { class: "flex items-end justify-between w-full mt-3" }, D = {
|
|
|
321
322
|
}, null, 8, ["icon", "class"]),
|
|
322
323
|
c("span", {
|
|
323
324
|
class: t([e.trend.isPositive ? "text-success-dark" : "text-danger-dark", "font-medium whitespace-nowrap"])
|
|
324
|
-
},
|
|
325
|
-
e.trend.label ? (s(), a("span", U,
|
|
325
|
+
}, l(e.trend.value), 3),
|
|
326
|
+
e.trend.label ? (s(), a("span", U, l(e.trend.label), 1)) : d("", !0)
|
|
326
327
|
])) : d("", !0)
|
|
327
328
|
]),
|
|
328
329
|
e.icon && n.layout === "icon-right" ? (s(), a("div", {
|
|
329
330
|
key: 1,
|
|
330
331
|
class: t(p(e)),
|
|
331
|
-
style:
|
|
332
|
+
style: v(k(e))
|
|
332
333
|
}, [
|
|
333
334
|
f(g, {
|
|
334
335
|
icon: e.icon,
|
|
@@ -7,7 +7,7 @@ interface Props {
|
|
|
7
7
|
/** i18n key for the label */
|
|
8
8
|
labelI18n?: string;
|
|
9
9
|
/** Hide the icon even when one is resolved */
|
|
10
|
-
hideIcon?: boolean;
|
|
10
|
+
hideIcon?: boolean | null;
|
|
11
11
|
/** Override chip size */
|
|
12
12
|
size?: ChipProps['size'];
|
|
13
13
|
/** Extra classes */
|
|
@@ -15,7 +15,7 @@ interface Props {
|
|
|
15
15
|
}
|
|
16
16
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
17
17
|
size: ChipProps["size"];
|
|
18
|
+
hideIcon: boolean | null;
|
|
18
19
|
class: string;
|
|
19
|
-
hideIcon: boolean;
|
|
20
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
21
|
export default _default;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { resolveStatus as
|
|
4
|
-
import { $t as
|
|
5
|
-
|
|
1
|
+
import { defineComponent as u, computed as a, openBlock as c, createBlock as f, unref as p, normalizeClass as m } from "vue";
|
|
2
|
+
import d from "../Chip/Chip.vue.js";
|
|
3
|
+
import { resolveStatus as v } from "./status-map.js";
|
|
4
|
+
import { $t as b } from "../../utils/i18n.js";
|
|
5
|
+
import { useVLiteConfig as I } from "../../core/config.js";
|
|
6
|
+
const S = /* @__PURE__ */ u({
|
|
6
7
|
__name: "StatusChip",
|
|
7
8
|
props: {
|
|
8
9
|
status: {},
|
|
9
10
|
label: {},
|
|
10
11
|
labelI18n: {},
|
|
11
|
-
hideIcon: { type: Boolean, default:
|
|
12
|
+
hideIcon: { type: [Boolean, null], default: null },
|
|
12
13
|
size: { default: "small" },
|
|
13
14
|
class: { default: "" }
|
|
14
15
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const e = a, t =
|
|
17
|
-
return (
|
|
18
|
-
text:
|
|
16
|
+
setup(l) {
|
|
17
|
+
const e = l, s = I(), n = a(() => s?.components?.statusChip), i = a(() => e.hideIcon !== null ? e.hideIcon : n.value?.hideIcon ?? !1), t = a(() => v(e.status, n.value?.customStatuses)), r = a(() => e.labelI18n ? b(e.labelI18n) : t.value.label ? t.value.label : e.label ? e.label : e.status.replace(/[_\-]+/g, " ").replace(/\b\w/g, (o) => o.toUpperCase()));
|
|
18
|
+
return (o, g) => (c(), f(p(d), {
|
|
19
|
+
text: r.value,
|
|
19
20
|
variant: t.value.variant,
|
|
20
|
-
icon:
|
|
21
|
-
size:
|
|
22
|
-
class:
|
|
21
|
+
icon: i.value ? void 0 : t.value.icon,
|
|
22
|
+
size: l.size,
|
|
23
|
+
class: m(e.class)
|
|
23
24
|
}, null, 8, ["text", "variant", "icon", "size", "class"]));
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
S as default
|
|
28
29
|
};
|
|
@@ -18,6 +18,7 @@ export declare const STATUS_MAP: Record<string, StatusConfig>;
|
|
|
18
18
|
export declare function normalizeStatus(status: string): string;
|
|
19
19
|
/**
|
|
20
20
|
* Resolves a status string to its StatusConfig.
|
|
21
|
+
* Checks global custom statuses first to allow overwriting defaults.
|
|
21
22
|
* Falls back to a secondary chip with the raw label if not found.
|
|
22
23
|
*/
|
|
23
|
-
export declare function resolveStatus(status: string): StatusConfig;
|
|
24
|
+
export declare function resolveStatus(status: string, customStatuses?: Record<string, StatusConfig>): StatusConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const d = {
|
|
2
2
|
// ── Active / Positive ──────────────────────────────────────────────────────
|
|
3
3
|
active: { variant: "success", icon: "lucide:check-circle-2" },
|
|
4
4
|
activated: { variant: "success", icon: "lucide:check-circle-2" },
|
|
@@ -61,6 +61,8 @@ const e = {
|
|
|
61
61
|
late: { variant: "orange", icon: "lucide:alarm-clock" },
|
|
62
62
|
partiallyapproved: { variant: "orange", icon: "lucide:check" },
|
|
63
63
|
awaitingapproval: { variant: "warning", icon: "lucide:clock" },
|
|
64
|
+
onleave: { variant: "warning", icon: "lucide:calendar-clock" },
|
|
65
|
+
earlycheckout: { variant: "warning", icon: "lucide:clock-4" },
|
|
64
66
|
// ── Error / Danger / Alternative Warnings ──────────────────────────────────
|
|
65
67
|
inactive: { variant: "secondary", icon: "lucide:circle-slash" },
|
|
66
68
|
deactivated: { variant: "secondary", icon: "lucide:circle-slash" },
|
|
@@ -85,6 +87,7 @@ const e = {
|
|
|
85
87
|
offline: { variant: "secondary", icon: "lucide:wifi-off" },
|
|
86
88
|
danger: { variant: "danger", icon: "lucide:alert-circle" },
|
|
87
89
|
declined: { variant: "danger", icon: "lucide:thumbs-down" },
|
|
90
|
+
laidoff: { variant: "danger", icon: "lucide:user-minus" },
|
|
88
91
|
// ── Neutral / Secondary ────────────────────────────────────────────────────
|
|
89
92
|
new: { variant: "secondary", icon: "lucide:sparkles" },
|
|
90
93
|
unassigned: { variant: "secondary", icon: "lucide:user-x" },
|
|
@@ -95,18 +98,25 @@ const e = {
|
|
|
95
98
|
queued: { variant: "secondary", icon: "lucide:list-ordered" },
|
|
96
99
|
requested: { variant: "secondary", icon: "lucide:send" },
|
|
97
100
|
invited: { variant: "secondary", icon: "lucide:mail" },
|
|
101
|
+
offday: { variant: "secondary", icon: "lucide:calendar-off" },
|
|
102
|
+
resigned: { variant: "secondary", icon: "lucide:user-minus" },
|
|
98
103
|
default: { variant: "secondary" },
|
|
99
104
|
none: { variant: "secondary" }
|
|
100
105
|
};
|
|
101
106
|
function n(i) {
|
|
102
107
|
return i.toLowerCase().replace(/[\s_\-]+/g, "");
|
|
103
108
|
}
|
|
104
|
-
function
|
|
105
|
-
const
|
|
106
|
-
|
|
109
|
+
function o(i, c) {
|
|
110
|
+
const e = n(i);
|
|
111
|
+
if (c) {
|
|
112
|
+
for (const [a, r] of Object.entries(c))
|
|
113
|
+
if (n(a) === e)
|
|
114
|
+
return r;
|
|
115
|
+
}
|
|
116
|
+
return d[e] ?? { variant: "secondary" };
|
|
107
117
|
}
|
|
108
118
|
export {
|
|
109
|
-
|
|
119
|
+
d as STATUS_MAP,
|
|
110
120
|
n as normalizeStatus,
|
|
111
|
-
|
|
121
|
+
o as resolveStatus
|
|
112
122
|
};
|
|
@@ -25,5 +25,5 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
25
25
|
wrap: boolean;
|
|
26
26
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
27
27
|
containerRef: HTMLDivElement;
|
|
28
|
-
},
|
|
28
|
+
}, any>;
|
|
29
29
|
export default _default;
|
|
@@ -1,145 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const Z = /* @__PURE__ */ E({
|
|
6
|
-
__name: "Tabes",
|
|
7
|
-
props: {
|
|
8
|
-
options: {},
|
|
9
|
-
modelValue: {},
|
|
10
|
-
size: { default: "md" },
|
|
11
|
-
variant: { default: "surface" },
|
|
12
|
-
block: { type: Boolean, default: !1 },
|
|
13
|
-
textClass: {},
|
|
14
|
-
wrap: { type: Boolean, default: !1 }
|
|
15
|
-
},
|
|
16
|
-
emits: ["update:modelValue", "change"],
|
|
17
|
-
setup(s, { emit: h }) {
|
|
18
|
-
const n = s, v = h, d = b(null), f = b(/* @__PURE__ */ new Map()), k = (e, a) => {
|
|
19
|
-
e ? f.value.set(a, e) : f.value.delete(a);
|
|
20
|
-
}, m = b({
|
|
21
|
-
width: "0px",
|
|
22
|
-
height: "0px",
|
|
23
|
-
transform: "translate(0px, 0px)",
|
|
24
|
-
opacity: 0
|
|
25
|
-
}), o = async () => {
|
|
26
|
-
await H();
|
|
27
|
-
const e = d.value, a = f.value.get(n.modelValue);
|
|
28
|
-
if (!e || !a) {
|
|
29
|
-
m.value.opacity = 0;
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
const t = e.getBoundingClientRect(), r = a.getBoundingClientRect(), c = r.left - t.left, M = r.top - t.top, j = r.width, A = r.height;
|
|
33
|
-
m.value = {
|
|
34
|
-
width: `${j}px`,
|
|
35
|
-
height: `${A}px`,
|
|
36
|
-
transform: `translate(${c}px, ${M}px)`,
|
|
37
|
-
opacity: 1
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
J(d, o), l(() => n.modelValue, o), l(() => n.options, o, { deep: !0 }), l(() => n.size, o), l(() => n.block, o), l(() => n.wrap, o), D(o);
|
|
41
|
-
const C = (e) => {
|
|
42
|
-
e.disabled || (v("update:modelValue", e.value), v("change", e.value));
|
|
43
|
-
}, w = g(() => {
|
|
44
|
-
const e = n.variant === "line", a = {
|
|
45
|
-
surface: "bg-secondary/80 p-1",
|
|
46
|
-
primary: "bg-secondary p-1",
|
|
47
|
-
secondary: "bg-secondary p-1",
|
|
48
|
-
danger: "bg-danger/10 p-1",
|
|
49
|
-
success: "bg-success/10 p-1",
|
|
50
|
-
outline: "bg-transparent border border-border p-1",
|
|
51
|
-
line: "bg-transparent gap-6 rounded-none p-0 border-b border-border"
|
|
52
|
-
}, t = n.wrap && !e ? "flex-wrap" : "";
|
|
53
|
-
return [`${n.block || e ? "flex w-full" : "inline-flex"} rounded-lg relative isolate ${t}`, a[n.variant]];
|
|
54
|
-
}), z = {
|
|
55
|
-
sm: "text-xs px-2.5 py-1",
|
|
56
|
-
md: "-text-fs-2 px-3 py-1",
|
|
57
|
-
lg: "-text-fs-1 px-4 py-1"
|
|
58
|
-
}, $ = g(() => {
|
|
59
|
-
const e = n.variant === "line", a = e ? "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none outline-none focus-visible:ring-2 focus-visible:ring-primary/50 pb-2 border-b-2 border-transparent hover:text-foreground" : "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-primary/50", t = (n.block || n.wrap) && !e ? "flex-1" : "";
|
|
60
|
-
return [a, t];
|
|
61
|
-
}), V = (e) => {
|
|
62
|
-
const a = e.value === n.modelValue, t = n.variant === "line";
|
|
63
|
-
let r = "";
|
|
64
|
-
if (a)
|
|
65
|
-
if (t)
|
|
66
|
-
r = "text-primary";
|
|
67
|
-
else
|
|
68
|
-
switch (n.variant) {
|
|
69
|
-
case "surface":
|
|
70
|
-
r = "text-foreground";
|
|
71
|
-
break;
|
|
72
|
-
case "primary":
|
|
73
|
-
r = "text-primary-foreground";
|
|
74
|
-
break;
|
|
75
|
-
case "secondary":
|
|
76
|
-
r = "text-secondary";
|
|
77
|
-
break;
|
|
78
|
-
case "danger":
|
|
79
|
-
r = "text-danger-fg";
|
|
80
|
-
break;
|
|
81
|
-
case "success":
|
|
82
|
-
r = "text-success-fg";
|
|
83
|
-
break;
|
|
84
|
-
case "outline":
|
|
85
|
-
r = "text-accent-foreground";
|
|
86
|
-
break;
|
|
87
|
-
default:
|
|
88
|
-
r = "text-foreground";
|
|
89
|
-
}
|
|
90
|
-
else
|
|
91
|
-
r = t ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
|
|
92
|
-
const c = e.disabled ? "opacity-50 cursor-not-allowed" : "";
|
|
93
|
-
return [$.value, r, c].join(" ");
|
|
94
|
-
}, R = g(() => {
|
|
95
|
-
const e = "absolute left-0 top-0 transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)] z-0 pointer-events-none";
|
|
96
|
-
return n.variant === "line" ? `${e} !h-[2px] !top-auto bottom-0` : `${e} rounded-md shadow-sm`;
|
|
97
|
-
}), B = () => ({
|
|
98
|
-
surface: "bg-background",
|
|
99
|
-
primary: "bg-primary",
|
|
100
|
-
secondary: "bg-secondary-foreground",
|
|
101
|
-
danger: "bg-danger",
|
|
102
|
-
success: "bg-success",
|
|
103
|
-
outline: "bg-accent/50 ring-1 ring-border",
|
|
104
|
-
line: "bg-primary"
|
|
105
|
-
})[n.variant], S = (e) => e.labelI18n ? Q(e.labelI18n) : e.label, I = (e) => e.to ? "router-link" : e.href ? "a" : "button", L = (e) => e.to ? { to: e.to } : e.href ? { href: e.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" };
|
|
106
|
-
return (e, a) => (i(), p("div", {
|
|
107
|
-
ref_key: "containerRef",
|
|
108
|
-
ref: d,
|
|
109
|
-
class: u(w.value),
|
|
110
|
-
role: "tablist"
|
|
111
|
-
}, [
|
|
112
|
-
s.modelValue !== void 0 && !s.wrap ? (i(), p("div", {
|
|
113
|
-
key: 0,
|
|
114
|
-
class: u([R.value, B()]),
|
|
115
|
-
style: N(m.value)
|
|
116
|
-
}, null, 6)) : y("", !0),
|
|
117
|
-
(i(!0), p(O, null, P(s.options, (t) => (i(), x(T(I(t)), F({
|
|
118
|
-
key: t.value,
|
|
119
|
-
ref_for: !0,
|
|
120
|
-
ref: (r) => k(r?.$el || r, t.value),
|
|
121
|
-
role: "tab",
|
|
122
|
-
"aria-selected": s.modelValue === t.value,
|
|
123
|
-
disabled: t.disabled,
|
|
124
|
-
class: [V(t), z[n.size]]
|
|
125
|
-
}, { ref_for: !0 }, L(t), {
|
|
126
|
-
onClick: (r) => C(t)
|
|
127
|
-
}), {
|
|
128
|
-
default: _(() => [
|
|
129
|
-
t.icon ? (i(), x(K, {
|
|
130
|
-
key: 0,
|
|
131
|
-
icon: t.icon,
|
|
132
|
-
class: u(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
|
|
133
|
-
}, null, 8, ["icon", "class"])) : y("", !0),
|
|
134
|
-
q("span", {
|
|
135
|
-
class: u(["whitespace-nowrap z-20 relative", s.textClass])
|
|
136
|
-
}, G(S(t)), 3)
|
|
137
|
-
]),
|
|
138
|
-
_: 2
|
|
139
|
-
}, 1040, ["aria-selected", "disabled", "class", "onClick"]))), 128))
|
|
140
|
-
], 2));
|
|
141
|
-
}
|
|
142
|
-
});
|
|
1
|
+
import o from "./Tabes.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-262d5698"]]);
|
|
143
5
|
export {
|
|
144
|
-
|
|
6
|
+
p as default
|
|
145
7
|
};
|