vlite3 1.3.3 → 1.3.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.
- package/components/Button.vue.js +36 -36
- package/components/DataTable/DataTable.vue.d.ts +1 -1
- package/components/Dropdown/Dropdown.vue.js +17 -16
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +64 -64
- package/components/FileTree/FileTree.vue.d.ts +17 -1
- package/components/FileTree/FileTree.vue.js +1 -1
- package/components/FileTree/FileTree.vue2.js +54 -44
- package/components/FileTree/FileTreeNode.vue.d.ts +22 -2
- package/components/FileTree/FileTreeNode.vue.js +119 -94
- package/components/FileTree/types.d.ts +2 -0
- package/components/Form/Form.vue.d.ts +2 -0
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +258 -229
- package/components/Form/FormField.vue.js +5 -4
- package/components/Form/FormFields.vue.d.ts +18 -1
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +117 -105
- package/components/Form/types.d.ts +2 -0
- package/components/ImportData/ImportData.vue.js +3 -2
- package/components/NavbarCommandPalette.vue.d.ts +1 -1
- package/components/Pagination/Pagination.vue.d.ts +1 -0
- package/components/Pagination/Pagination.vue.js +121 -119
- package/components/Pagination/index.d.ts +1 -0
- package/components/Persona.vue.js +134 -0
- package/components/Persona.vue2.js +4 -0
- package/components/Screen/Screen.vue.d.ts +2 -0
- package/components/Screen/Screen.vue.js +160 -157
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/Stats/Stats.vue.js +50 -22
- package/components/Stats/Stats.vue3.js +5 -0
- package/components/StatusChip/status-map.js +1 -0
- package/components/Switch.vue.d.ts +3 -0
- package/components/Switch.vue.js +13 -9
- package/components/Tabes/Tabes.vue.js +2 -2
- package/components/Timeline/TimelineItem.vue.js +74 -91
- package/index.d.ts +1 -0
- package/index.js +382 -379
- package/package.json +2 -2
- package/style.css +18 -4
- package/components/Stats/Stats.vue2.js +0 -4
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as G, computed as u, openBlock as r, createElementBlock as i, normalizeClass as l, createElementVNode as f, toDisplayString as o, Fragment as k, renderList as N, createVNode as C, createCommentVNode as P, createTextVNode as h, createBlock as b, withCtx as z } from "vue";
|
|
2
|
+
import H from "../Icon.vue.js";
|
|
3
3
|
import c from "../Button.vue.js";
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
4
|
+
import { $t as x } from "../../utils/i18n.js";
|
|
5
|
+
const J = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "flex flex-wrap items-center justify-center md:justify-start gap-4 order-2 md:order-1"
|
|
8
|
-
},
|
|
8
|
+
}, K = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex items-center gap-2 text-sm text-muted-foreground"
|
|
11
|
-
},
|
|
11
|
+
}, Q = { class: "whitespace-nowrap" }, U = { class: "relative" }, W = ["value", "disabled"], X = ["value"], Y = { class: "whitespace-nowrap" }, Z = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "hidden md:block w-px h-4 bg-border"
|
|
14
|
-
},
|
|
14
|
+
}, p = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "text-sm text-muted-foreground whitespace-nowrap"
|
|
17
|
-
},
|
|
17
|
+
}, _ = { class: "font-medium text-foreground" }, ee = { class: "font-medium text-foreground" }, te = {
|
|
18
18
|
class: "flex items-center justify-center gap-1 order-1 md:order-2",
|
|
19
19
|
"aria-label": "Pagination"
|
|
20
|
-
},
|
|
20
|
+
}, ae = {
|
|
21
21
|
key: 0,
|
|
22
|
-
class: "
|
|
23
|
-
}, le = /* @__PURE__ */
|
|
22
|
+
class: "w-8 h-8 flex items-center justify-center text-muted-foreground select-none"
|
|
23
|
+
}, le = /* @__PURE__ */ G({
|
|
24
24
|
__name: "Pagination",
|
|
25
25
|
props: {
|
|
26
26
|
currentPage: { default: 1 },
|
|
27
27
|
totalPages: {},
|
|
28
|
-
totalItems: { default:
|
|
28
|
+
totalItems: { default: 0 },
|
|
29
|
+
siblingCount: { default: 1 },
|
|
29
30
|
disabled: { type: Boolean, default: !1 },
|
|
30
31
|
showEdges: { type: Boolean, default: !1 },
|
|
31
32
|
showPageInfo: { type: Boolean, default: !1 },
|
|
@@ -38,35 +39,36 @@ const H = {
|
|
|
38
39
|
rounded: { default: "full" }
|
|
39
40
|
},
|
|
40
41
|
emits: ["update:currentPage", "change", "update:itemsPerPage", "change:itemsPerPage"],
|
|
41
|
-
setup(e, { emit:
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
setup(e, { emit: O }) {
|
|
43
|
+
const s = e, m = O, g = (t) => {
|
|
44
|
+
s.disabled || t < 1 || t > s.totalPages || t !== s.currentPage && (m("update:currentPage", t), m("change", t));
|
|
45
|
+
}, B = (t) => {
|
|
46
|
+
const n = t.target, a = parseInt(n.value);
|
|
47
|
+
m("update:itemsPerPage", a), m("change:itemsPerPage", a), m("update:currentPage", 1), m("change", 1);
|
|
48
|
+
}, R = u(() => {
|
|
49
|
+
const t = s.siblingCount ?? 1;
|
|
50
|
+
if (t * 2 + 5 >= s.totalPages)
|
|
51
|
+
return I(1, s.totalPages);
|
|
52
|
+
const a = Math.max(s.currentPage - t, 1), y = Math.min(s.currentPage + t, s.totalPages), v = a > 2, j = y < s.totalPages - 2, $ = 1, T = s.totalPages;
|
|
53
|
+
if (!v && j) {
|
|
54
|
+
const w = 3 + 2 * t;
|
|
55
|
+
return [...I(1, w), "DOTS", T];
|
|
54
56
|
}
|
|
55
|
-
if (v && !
|
|
56
|
-
const w = 3 + 2 *
|
|
57
|
-
return [$, "DOTS", ...
|
|
57
|
+
if (v && !j) {
|
|
58
|
+
const w = 3 + 2 * t, D = I(s.totalPages - w + 1, s.totalPages);
|
|
59
|
+
return [$, "DOTS", ...D];
|
|
58
60
|
}
|
|
59
|
-
if (v &&
|
|
60
|
-
const w = I(
|
|
61
|
-
return [$, "DOTS", ...w, "DOTS",
|
|
61
|
+
if (v && j) {
|
|
62
|
+
const w = I(a, y);
|
|
63
|
+
return [$, "DOTS", ...w, "DOTS", T];
|
|
62
64
|
}
|
|
63
65
|
return [];
|
|
64
|
-
}), I = (t,
|
|
65
|
-
const a =
|
|
66
|
-
return Array.from({ length: a }, (
|
|
67
|
-
},
|
|
68
|
-
if (
|
|
69
|
-
switch (
|
|
66
|
+
}), I = (t, n) => {
|
|
67
|
+
const a = n - t + 1;
|
|
68
|
+
return Array.from({ length: a }, (y, v) => v + t);
|
|
69
|
+
}, V = u(() => {
|
|
70
|
+
if (s.alignment)
|
|
71
|
+
switch (s.alignment) {
|
|
70
72
|
case "start":
|
|
71
73
|
return "justify-start";
|
|
72
74
|
case "end":
|
|
@@ -76,9 +78,9 @@ const H = {
|
|
|
76
78
|
default:
|
|
77
79
|
return "justify-center";
|
|
78
80
|
}
|
|
79
|
-
return
|
|
81
|
+
return s.showPageInfo || s.showItemsPerPage ? "justify-between" : "justify-center";
|
|
80
82
|
}), d = u(() => {
|
|
81
|
-
switch (
|
|
83
|
+
switch (s.rounded) {
|
|
82
84
|
case "none":
|
|
83
85
|
return "rounded-none";
|
|
84
86
|
case "sm":
|
|
@@ -91,7 +93,7 @@ const H = {
|
|
|
91
93
|
return "rounded-md";
|
|
92
94
|
}
|
|
93
95
|
}), S = u(() => {
|
|
94
|
-
switch (
|
|
96
|
+
switch (s.activeVariant) {
|
|
95
97
|
case "solid":
|
|
96
98
|
return {
|
|
97
99
|
variant: "primary",
|
|
@@ -108,163 +110,163 @@ const H = {
|
|
|
108
110
|
extraClass: "bg-white text-primary border-primary ring-1 ring-primary pointer-events-none z-10"
|
|
109
111
|
};
|
|
110
112
|
}
|
|
111
|
-
}), V = u(() => {
|
|
112
|
-
const t = y("vlite.pagination.show");
|
|
113
|
-
return t !== "vlite.pagination.show" ? t : "Show";
|
|
114
113
|
}), E = u(() => {
|
|
115
|
-
const t =
|
|
116
|
-
return t !== "vlite.pagination.
|
|
114
|
+
const t = x("vlite.pagination.show");
|
|
115
|
+
return t !== "vlite.pagination.show" ? t : "Show";
|
|
117
116
|
}), A = u(() => {
|
|
118
|
-
const t =
|
|
119
|
-
return t !== "vlite.pagination.
|
|
117
|
+
const t = x("vlite.pagination.perPage");
|
|
118
|
+
return t !== "vlite.pagination.perPage" ? t : "per page";
|
|
120
119
|
}), L = u(() => {
|
|
121
|
-
const t =
|
|
122
|
-
return t !== "vlite.pagination.
|
|
120
|
+
const t = x("vlite.pagination.page");
|
|
121
|
+
return t !== "vlite.pagination.page" ? t : "Page";
|
|
123
122
|
}), M = u(() => {
|
|
124
|
-
const t =
|
|
125
|
-
return t !== "vlite.pagination.
|
|
123
|
+
const t = x("vlite.pagination.of");
|
|
124
|
+
return t !== "vlite.pagination.of" ? t : "of";
|
|
126
125
|
}), F = u(() => {
|
|
127
|
-
const t =
|
|
126
|
+
const t = x("vlite.pagination.previous");
|
|
127
|
+
return t !== "vlite.pagination.previous" ? t : "Previous";
|
|
128
|
+
}), q = u(() => {
|
|
129
|
+
const t = x("vlite.pagination.next");
|
|
128
130
|
return t !== "vlite.pagination.next" ? t : "Next";
|
|
129
131
|
});
|
|
130
|
-
return (t,
|
|
131
|
-
class:
|
|
132
|
+
return (t, n) => (r(), i("div", {
|
|
133
|
+
class: l(["flex flex-col md:flex-row items-center gap-4 w-full", [V.value]])
|
|
132
134
|
}, [
|
|
133
|
-
e.showPageInfo || e.showItemsPerPage ? (r(),
|
|
134
|
-
e.showItemsPerPage ? (r(),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
e.showPageInfo || e.showItemsPerPage ? (r(), i("div", J, [
|
|
136
|
+
e.showItemsPerPage ? (r(), i("div", K, [
|
|
137
|
+
f("span", Q, o(E.value), 1),
|
|
138
|
+
f("div", U, [
|
|
139
|
+
f("select", {
|
|
138
140
|
value: e.itemsPerPage,
|
|
139
141
|
class: "appearance-none bg-background border border-border hover:border-accent text-foreground py-1 pl-2 pr-6 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-primary text-sm cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
140
142
|
disabled: e.disabled,
|
|
141
|
-
onChange:
|
|
143
|
+
onChange: B
|
|
142
144
|
}, [
|
|
143
|
-
(r(!0),
|
|
145
|
+
(r(!0), i(k, null, N(e.itemsPerPageOptions, (a) => (r(), i("option", {
|
|
144
146
|
key: a,
|
|
145
147
|
value: a
|
|
146
|
-
}, o(a), 9,
|
|
147
|
-
], 40,
|
|
148
|
-
C(
|
|
148
|
+
}, o(a), 9, X))), 128))
|
|
149
|
+
], 40, W),
|
|
150
|
+
C(H, {
|
|
149
151
|
icon: "lucide:chevron-down",
|
|
150
152
|
class: "absolute right-1.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground pointer-events-none"
|
|
151
153
|
})
|
|
152
154
|
]),
|
|
153
|
-
|
|
154
|
-
])) :
|
|
155
|
-
e.showItemsPerPage && e.showPageInfo ? (r(),
|
|
156
|
-
e.showPageInfo ? (r(),
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
])) :
|
|
162
|
-
])) :
|
|
163
|
-
|
|
164
|
-
e.showEdges ? (r(),
|
|
155
|
+
f("span", Y, o(A.value), 1)
|
|
156
|
+
])) : P("", !0),
|
|
157
|
+
e.showItemsPerPage && e.showPageInfo ? (r(), i("div", Z)) : P("", !0),
|
|
158
|
+
e.showPageInfo ? (r(), i("span", p, [
|
|
159
|
+
h(o(L.value) + " ", 1),
|
|
160
|
+
f("span", _, o(e.currentPage), 1),
|
|
161
|
+
h(" " + o(M.value) + " ", 1),
|
|
162
|
+
f("span", ee, o(e.totalPages), 1)
|
|
163
|
+
])) : P("", !0)
|
|
164
|
+
])) : P("", !0),
|
|
165
|
+
f("nav", te, [
|
|
166
|
+
e.showEdges ? (r(), b(c, {
|
|
165
167
|
key: 0,
|
|
166
168
|
variant: "ghost",
|
|
167
|
-
size: "
|
|
169
|
+
size: "sm2",
|
|
168
170
|
icon: "lucide:chevrons-left",
|
|
169
|
-
class:
|
|
171
|
+
class: l(d.value),
|
|
170
172
|
disabled: e.disabled || e.currentPage === 1,
|
|
171
|
-
onClick:
|
|
172
|
-
}, null, 8, ["class", "disabled"])) :
|
|
173
|
-
e.navType === "icon" ? (r(),
|
|
173
|
+
onClick: n[0] || (n[0] = (a) => g(1))
|
|
174
|
+
}, null, 8, ["class", "disabled"])) : P("", !0),
|
|
175
|
+
e.navType === "icon" ? (r(), b(c, {
|
|
174
176
|
key: 1,
|
|
175
177
|
variant: "ghost",
|
|
176
|
-
size: "
|
|
178
|
+
size: "sm2",
|
|
177
179
|
icon: "lucide:chevron-left",
|
|
178
|
-
class:
|
|
180
|
+
class: l(d.value),
|
|
179
181
|
disabled: e.disabled || e.currentPage === 1,
|
|
180
|
-
onClick:
|
|
181
|
-
}, null, 8, ["class", "disabled"])) : (r(),
|
|
182
|
+
onClick: n[1] || (n[1] = (a) => g(e.currentPage - 1))
|
|
183
|
+
}, null, 8, ["class", "disabled"])) : (r(), i(k, { key: 2 }, [
|
|
182
184
|
C(c, {
|
|
183
185
|
variant: "ghost",
|
|
184
|
-
size: "
|
|
185
|
-
class:
|
|
186
|
+
size: "sm2",
|
|
187
|
+
class: l(["hidden sm:flex", d.value]),
|
|
186
188
|
disabled: e.disabled || e.currentPage === 1,
|
|
187
|
-
onClick:
|
|
189
|
+
onClick: n[2] || (n[2] = (a) => g(e.currentPage - 1))
|
|
188
190
|
}, {
|
|
189
191
|
default: z(() => [
|
|
190
|
-
|
|
192
|
+
h(o(F.value), 1)
|
|
191
193
|
]),
|
|
192
194
|
_: 1
|
|
193
195
|
}, 8, ["class", "disabled"]),
|
|
194
196
|
C(c, {
|
|
195
197
|
variant: "ghost",
|
|
196
|
-
size: "
|
|
198
|
+
size: "sm2",
|
|
197
199
|
icon: "lucide:chevron-left",
|
|
198
|
-
class:
|
|
200
|
+
class: l(["flex sm:hidden", d.value]),
|
|
199
201
|
disabled: e.disabled || e.currentPage === 1,
|
|
200
|
-
onClick:
|
|
202
|
+
onClick: n[3] || (n[3] = (a) => g(e.currentPage - 1))
|
|
201
203
|
}, null, 8, ["class", "disabled"])
|
|
202
204
|
], 64)),
|
|
203
|
-
(r(!0),
|
|
204
|
-
a === "DOTS" ? (r(),
|
|
205
|
+
(r(!0), i(k, null, N(R.value, (a, y) => (r(), i(k, { key: y }, [
|
|
206
|
+
a === "DOTS" ? (r(), i("div", ae, "...")) : a === e.currentPage ? (r(), b(c, {
|
|
205
207
|
key: 1,
|
|
206
|
-
size: "
|
|
208
|
+
size: "sm2",
|
|
207
209
|
variant: S.value.variant,
|
|
208
|
-
class:
|
|
210
|
+
class: l(["w-8! h-8! px-0! py-0! flex items-center justify-center min-w-[2rem]", S.value.extraClass, d.value]),
|
|
209
211
|
disabled: e.disabled
|
|
210
212
|
}, {
|
|
211
213
|
default: z(() => [
|
|
212
|
-
|
|
214
|
+
h(o(a), 1)
|
|
213
215
|
]),
|
|
214
216
|
_: 2
|
|
215
|
-
}, 1032, ["variant", "class", "disabled"])) : (r(),
|
|
217
|
+
}, 1032, ["variant", "class", "disabled"])) : (r(), b(c, {
|
|
216
218
|
key: 2,
|
|
217
|
-
size: "
|
|
219
|
+
size: "sm2",
|
|
218
220
|
variant: "ghost",
|
|
219
|
-
class:
|
|
221
|
+
class: l(["w-8! h-8! px-0! py-0! border border-transparent flex items-center justify-center min-w-[2rem] text-gray-600 hover:bg-gray-100", d.value]),
|
|
220
222
|
disabled: e.disabled,
|
|
221
|
-
onClick: (
|
|
223
|
+
onClick: (v) => g(a)
|
|
222
224
|
}, {
|
|
223
225
|
default: z(() => [
|
|
224
|
-
|
|
226
|
+
h(o(a), 1)
|
|
225
227
|
]),
|
|
226
228
|
_: 2
|
|
227
229
|
}, 1032, ["class", "disabled", "onClick"]))
|
|
228
230
|
], 64))), 128)),
|
|
229
|
-
e.navType === "icon" ? (r(),
|
|
231
|
+
e.navType === "icon" ? (r(), b(c, {
|
|
230
232
|
key: 3,
|
|
231
233
|
variant: "ghost",
|
|
232
|
-
size: "
|
|
234
|
+
size: "sm2",
|
|
233
235
|
icon: "lucide:chevron-right",
|
|
234
|
-
class:
|
|
236
|
+
class: l(d.value),
|
|
235
237
|
disabled: e.disabled || e.currentPage === e.totalPages,
|
|
236
|
-
onClick:
|
|
237
|
-
}, null, 8, ["class", "disabled"])) : (r(),
|
|
238
|
+
onClick: n[4] || (n[4] = (a) => g(e.currentPage + 1))
|
|
239
|
+
}, null, 8, ["class", "disabled"])) : (r(), i(k, { key: 4 }, [
|
|
238
240
|
C(c, {
|
|
239
241
|
variant: "ghost",
|
|
240
|
-
size: "
|
|
241
|
-
class:
|
|
242
|
+
size: "sm2",
|
|
243
|
+
class: l(["hidden sm:flex", d.value]),
|
|
242
244
|
disabled: e.disabled || e.currentPage === e.totalPages,
|
|
243
|
-
onClick:
|
|
245
|
+
onClick: n[5] || (n[5] = (a) => g(e.currentPage + 1))
|
|
244
246
|
}, {
|
|
245
247
|
default: z(() => [
|
|
246
|
-
|
|
248
|
+
h(o(q.value), 1)
|
|
247
249
|
]),
|
|
248
250
|
_: 1
|
|
249
251
|
}, 8, ["class", "disabled"]),
|
|
250
252
|
C(c, {
|
|
251
253
|
variant: "ghost",
|
|
252
|
-
size: "
|
|
254
|
+
size: "sm2",
|
|
253
255
|
icon: "lucide:chevron-right",
|
|
254
|
-
class:
|
|
256
|
+
class: l(["flex sm:hidden", d.value]),
|
|
255
257
|
disabled: e.disabled || e.currentPage === e.totalPages,
|
|
256
|
-
onClick:
|
|
258
|
+
onClick: n[6] || (n[6] = (a) => g(e.currentPage + 1))
|
|
257
259
|
}, null, 8, ["class", "disabled"])
|
|
258
260
|
], 64)),
|
|
259
|
-
e.showEdges ? (r(),
|
|
261
|
+
e.showEdges ? (r(), b(c, {
|
|
260
262
|
key: 5,
|
|
261
263
|
variant: "ghost",
|
|
262
|
-
size: "
|
|
264
|
+
size: "sm2",
|
|
263
265
|
icon: "lucide:chevrons-right",
|
|
264
|
-
class:
|
|
266
|
+
class: l(d.value),
|
|
265
267
|
disabled: e.disabled || e.currentPage === e.totalPages,
|
|
266
|
-
onClick:
|
|
267
|
-
}, null, 8, ["class", "disabled"])) :
|
|
268
|
+
onClick: n[7] || (n[7] = (a) => g(e.totalPages))
|
|
269
|
+
}, null, 8, ["class", "disabled"])) : P("", !0)
|
|
268
270
|
])
|
|
269
271
|
], 2));
|
|
270
272
|
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { defineComponent as b, computed as s, openBlock as n, createBlock as h, resolveDynamicComponent as y, mergeProps as k, withCtx as w, createElementVNode as i, createVNode as z, createElementBlock as l, normalizeClass as r, createCommentVNode as a, toDisplayString as d } from "vue";
|
|
2
|
+
import v from "./Avatar.vue.js";
|
|
3
|
+
const C = { class: "relative inline-flex flex-shrink-0" }, _ = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "absolute inset-0 flex items-center justify-center"
|
|
6
|
+
}, D = /* @__PURE__ */ b({
|
|
7
|
+
__name: "Persona",
|
|
8
|
+
props: {
|
|
9
|
+
src: {},
|
|
10
|
+
link: {},
|
|
11
|
+
alt: {},
|
|
12
|
+
fallback: {},
|
|
13
|
+
size: { default: "md" },
|
|
14
|
+
rounded: { default: "full" },
|
|
15
|
+
presence: {},
|
|
16
|
+
label: {},
|
|
17
|
+
secondaryLabel: {},
|
|
18
|
+
labelTheme: { default: "default" },
|
|
19
|
+
hideDetails: { type: Boolean, default: !1 },
|
|
20
|
+
class: { default: "" }
|
|
21
|
+
},
|
|
22
|
+
setup(c) {
|
|
23
|
+
const e = c, u = s(() => {
|
|
24
|
+
switch (e.presence) {
|
|
25
|
+
case "online":
|
|
26
|
+
return "bg-success";
|
|
27
|
+
case "busy":
|
|
28
|
+
case "dnd":
|
|
29
|
+
return "bg-danger";
|
|
30
|
+
case "away":
|
|
31
|
+
return "bg-warning";
|
|
32
|
+
default:
|
|
33
|
+
return "bg-muted";
|
|
34
|
+
}
|
|
35
|
+
}), m = s(() => {
|
|
36
|
+
const t = {
|
|
37
|
+
xs: "h-1.5 w-1.5 ring-1 border-[0.5px]",
|
|
38
|
+
sm: "h-2 w-2 ring-[1.5px] border-[0.5px]",
|
|
39
|
+
md: "h-2.5 w-2.5 ring-2 border-[0.5px]",
|
|
40
|
+
lg: "h-3.5 w-3.5 ring-2 border-1",
|
|
41
|
+
xl: "h-4 w-4 ring-2 border-1",
|
|
42
|
+
"2xl": "h-5 w-5 ring-[3px] border-1.5"
|
|
43
|
+
};
|
|
44
|
+
return t[e.size] || t.md;
|
|
45
|
+
}), g = s(() => {
|
|
46
|
+
const t = {
|
|
47
|
+
xs: "gap-0",
|
|
48
|
+
sm: "gap-0",
|
|
49
|
+
md: "gap-0.5",
|
|
50
|
+
lg: "gap-0.5",
|
|
51
|
+
xl: "gap-1",
|
|
52
|
+
"2xl": "gap-1"
|
|
53
|
+
};
|
|
54
|
+
return t[e.size] || t.md;
|
|
55
|
+
}), x = s(() => {
|
|
56
|
+
const t = {
|
|
57
|
+
xs: "text-[10px] font-medium leading-none",
|
|
58
|
+
sm: "text-xs font-semibold leading-none",
|
|
59
|
+
md: "text-sm font-semibold leading-none",
|
|
60
|
+
lg: "text-fs-4.5 font-semibold leading-none",
|
|
61
|
+
xl: "text-fs-5.5 font-semibold leading-tight",
|
|
62
|
+
"2xl": "text-fs-6.5 font-bold leading-tight"
|
|
63
|
+
};
|
|
64
|
+
return t[e.size] || t.md;
|
|
65
|
+
}), f = s(() => ({
|
|
66
|
+
default: "text-foreground",
|
|
67
|
+
primary: "text-primary",
|
|
68
|
+
secondary: "text-secondary-foreground",
|
|
69
|
+
danger: "text-danger",
|
|
70
|
+
warning: "text-warning",
|
|
71
|
+
success: "text-success",
|
|
72
|
+
info: "text-info",
|
|
73
|
+
muted: "text-muted-foreground"
|
|
74
|
+
})[e.labelTheme] || e.labelTheme), p = s(() => {
|
|
75
|
+
const t = {
|
|
76
|
+
xs: "text-[9px] leading-none mt-0.5",
|
|
77
|
+
sm: "text-[10px] leading-none mt-1",
|
|
78
|
+
md: "-text-fs-3 leading-none mt-0.5",
|
|
79
|
+
lg: "-text-fs-1.5 leading-none mt-1",
|
|
80
|
+
xl: "text-base leading-tight",
|
|
81
|
+
"2xl": "text-fs-1 leading-tight"
|
|
82
|
+
};
|
|
83
|
+
return t[e.size] || t.md;
|
|
84
|
+
});
|
|
85
|
+
return (t, o) => (n(), h(y(e.link ? "router-link" : "div"), k(e.link ? { to: e.link } : {}, {
|
|
86
|
+
class: [
|
|
87
|
+
"inline-flex items-center gap-2.5",
|
|
88
|
+
e.class,
|
|
89
|
+
e.link && "cursor-pointer hover:opacity-80 transition-opacity"
|
|
90
|
+
]
|
|
91
|
+
}), {
|
|
92
|
+
default: w(() => [
|
|
93
|
+
i("div", C, [
|
|
94
|
+
z(v, {
|
|
95
|
+
src: e.src,
|
|
96
|
+
alt: e.alt,
|
|
97
|
+
fallback: e.fallback,
|
|
98
|
+
size: e.size,
|
|
99
|
+
rounded: e.rounded
|
|
100
|
+
}, null, 8, ["src", "alt", "fallback", "size", "rounded"]),
|
|
101
|
+
e.presence ? (n(), l("span", {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: r([
|
|
104
|
+
"absolute bottom-0 right-0 rounded-full ring-background border-background",
|
|
105
|
+
u.value,
|
|
106
|
+
m.value
|
|
107
|
+
])
|
|
108
|
+
}, [
|
|
109
|
+
e.presence === "dnd" ? (n(), l("span", _, [...o[0] || (o[0] = [
|
|
110
|
+
i("span", { class: "w-1/2 h-[1px] bg-white rounded-full" }, null, -1)
|
|
111
|
+
])])) : a("", !0)
|
|
112
|
+
], 2)) : a("", !0)
|
|
113
|
+
]),
|
|
114
|
+
!e.hideDetails && (e.label || e.secondaryLabel) ? (n(), l("div", {
|
|
115
|
+
key: 0,
|
|
116
|
+
class: r(["flex flex-col justify-center", g.value])
|
|
117
|
+
}, [
|
|
118
|
+
e.label ? (n(), l("span", {
|
|
119
|
+
key: 0,
|
|
120
|
+
class: r([f.value, x.value])
|
|
121
|
+
}, d(e.label), 3)) : a("", !0),
|
|
122
|
+
e.secondaryLabel ? (n(), l("span", {
|
|
123
|
+
key: 1,
|
|
124
|
+
class: r(["text-muted-foreground", p.value])
|
|
125
|
+
}, d(e.secondaryLabel), 3)) : a("", !0)
|
|
126
|
+
], 2)) : a("", !0)
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
}, 16, ["class"]));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
export {
|
|
133
|
+
D as default
|
|
134
|
+
};
|
|
@@ -333,9 +333,11 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
333
333
|
declare const __VLS_component: import('vue').DefineComponent<ScreenProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
334
334
|
delete: (items: any[]) => any;
|
|
335
335
|
add: () => any;
|
|
336
|
+
"change-view": (view: string) => any;
|
|
336
337
|
}, string, import('vue').PublicProps, Readonly<ScreenProps> & Readonly<{
|
|
337
338
|
onDelete?: (items: any[]) => any;
|
|
338
339
|
onAdd?: () => any;
|
|
340
|
+
"onChange-view"?: (view: string) => any;
|
|
339
341
|
}>, {
|
|
340
342
|
name: string;
|
|
341
343
|
data: any[];
|