vlite3 1.3.5 → 1.3.7
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/CategoryManager/CategoryManager.vue2.js +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/FileTree/FileTree.vue.d.ts +1 -0
- package/components/FileTree/FileTree.vue.js +3 -3
- package/components/FileTree/FileTree.vue2.js +33 -31
- package/components/FileTree/FileTreeNode.vue.d.ts +2 -0
- package/components/FileTree/FileTreeNode.vue.js +72 -70
- package/components/FileTree/types.d.ts +1 -0
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/CustomFields.vue2.js +1 -1
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +20 -20
- package/components/Form/FormFields.vue.js +1 -1
- package/components/Form/FormFields.vue2.js +8 -8
- package/components/ImportData/ImportStep1.vue.d.ts +2 -2
- package/components/ImportData/ImportStep2.vue.d.ts +2 -2
- package/components/Input.vue.js +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +1 -1
- package/components/Navbar/NavbarTabs.vue.js +82 -82
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/PermissionMatrix/PermissionTopBar.vue.js +36 -36
- package/components/Screen/Screen.vue.d.ts +2 -2
- package/components/Screen/Screen.vue.js +187 -185
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/SidebarMenu/SidebarMenuItem.vue.js +193 -187
- package/components/ThemeToggle.vue.d.ts +1 -1
- package/components/ThemeToggle.vue.js +2 -2
- package/composables/useTheme.d.ts +1 -1
- package/composables/useTheme.js +15 -15
- package/package.json +1 -1
- package/style.css +67 -47
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
- /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as we, inject as Ae, computed as r, onMounted as se, onUnmounted as O, ref as K, watch as ne, openBlock as s, createElementBlock as c, withKeys as oe, withModifiers as J, normalizeClass as m, createElementVNode as f, createVNode as w, mergeProps as z, toDisplayString as B, unref as a, renderSlot as re, createCommentVNode as u, createBlock as
|
|
1
|
+
import { defineComponent as we, inject as Ae, computed as r, onMounted as se, onUnmounted as O, ref as K, watch as ne, openBlock as s, createElementBlock as c, withKeys as oe, withModifiers as J, normalizeClass as m, createElementVNode as f, createVNode as w, mergeProps as z, toDisplayString as B, unref as a, renderSlot as re, createCommentVNode as u, createBlock as p, withCtx as Te, Fragment as Pe, renderList as Re } from "vue";
|
|
2
2
|
import { useForm as Ue } from "./composables/useForm.js";
|
|
3
3
|
import Q from "./FormFields.vue.js";
|
|
4
4
|
import Ve from "./FormField.vue.js";
|
|
@@ -15,7 +15,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
15
15
|
class: "w-full order-first lg:order-last lg:min-w-100 lg:max-w-[380px] shrink-0"
|
|
16
16
|
}, Ke = { key: 0 }, Me = {
|
|
17
17
|
key: 0,
|
|
18
|
-
class: "flex gap-3 items-end
|
|
18
|
+
class: "flex gap-3 items-end ml-auto"
|
|
19
19
|
}, Ge = { class: "text-base font-semibold text-foreground" }, je = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "text-sm text-muted-foreground mt-1"
|
|
@@ -153,9 +153,9 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
153
153
|
return i;
|
|
154
154
|
}, ke = r(() => d.value ? n.value < F.value.length - 1 : !1), te = r(() => d.value ? n.value > 0 : !1), E = r(() => d.value ? n.value === F.value.length - 1 : !0), ae = async () => {
|
|
155
155
|
!ke.value || !await xe() || (n.value++, y("onStepChange", n.value));
|
|
156
|
-
},
|
|
156
|
+
}, Ce = () => {
|
|
157
157
|
te.value && (n.value--, y("onStepChange", n.value));
|
|
158
|
-
},
|
|
158
|
+
}, pe = (l, i) => {
|
|
159
159
|
i <= n.value && (n.value = i, y("onStepChange", n.value));
|
|
160
160
|
}, k = async () => {
|
|
161
161
|
if (d.value) {
|
|
@@ -165,7 +165,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
165
165
|
}
|
|
166
166
|
if (!await ee()) {
|
|
167
167
|
const i = F.value.findIndex(
|
|
168
|
-
(o) => o.some((
|
|
168
|
+
(o) => o.some((C) => !!x.value[C.name])
|
|
169
169
|
);
|
|
170
170
|
i !== -1 && i !== n.value && (n.value = i, y("onStepChange", n.value));
|
|
171
171
|
return;
|
|
@@ -249,13 +249,13 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
249
249
|
direction: "horizontal",
|
|
250
250
|
textPosition: e.timelineTextPosition,
|
|
251
251
|
clickable: !0,
|
|
252
|
-
onStepClick:
|
|
252
|
+
onStepClick: pe
|
|
253
253
|
}, null, 8, ["steps", "activeStep", "textPosition"])
|
|
254
254
|
], 2)) : u("", !0),
|
|
255
255
|
f("div", {
|
|
256
256
|
class: m(e.footer && R.value ? "pb-2" : "")
|
|
257
257
|
}, [
|
|
258
|
-
e.schemaLoading ? (s(),
|
|
258
|
+
e.schemaLoading ? (s(), p(ze, {
|
|
259
259
|
key: 0,
|
|
260
260
|
isGrouped: T.value
|
|
261
261
|
}, null, 8, ["isGrouped"])) : (s(), c("div", {
|
|
@@ -263,7 +263,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
263
263
|
class: m(P.value ? "flex flex-col lg:flex-row gap-10 lg:gap-16" : "")
|
|
264
264
|
}, [
|
|
265
265
|
P.value ? (s(), c("div", Ee, [
|
|
266
|
-
g.value && a(U)(g.value) ? (s(),
|
|
266
|
+
g.value && a(U)(g.value) ? (s(), p(Ve, {
|
|
267
267
|
key: 0,
|
|
268
268
|
field: g.value,
|
|
269
269
|
value: a(h)[g.value.name],
|
|
@@ -287,20 +287,20 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
287
287
|
key: 1,
|
|
288
288
|
class: m(["form-groups space-y-6", e.groupContainerClass])
|
|
289
289
|
}, [
|
|
290
|
-
(s(!0), c(Pe, null, Re(F.value, (o,
|
|
291
|
-
key:
|
|
290
|
+
(s(!0), c(Pe, null, Re(F.value, (o, C) => (s(), c("div", {
|
|
291
|
+
key: C,
|
|
292
292
|
class: m([
|
|
293
293
|
"form-group overflow-hidden bg-body",
|
|
294
294
|
e.groupClass,
|
|
295
295
|
F.value?.length > 1 ? "border rounded" : ""
|
|
296
296
|
])
|
|
297
297
|
}, [
|
|
298
|
-
e.groupsHeadings?.[
|
|
298
|
+
e.groupsHeadings?.[C] ? (s(), c("div", {
|
|
299
299
|
key: 0,
|
|
300
300
|
class: m(["form-group-header bg-muted/50 px-4 py-2.5 border-b", e.headerClass])
|
|
301
301
|
}, [
|
|
302
|
-
f("h3", Ge, B(e.groupsHeadings[
|
|
303
|
-
e.groupHeadingsDescription?.[
|
|
302
|
+
f("h3", Ge, B(e.groupsHeadings[C]), 1),
|
|
303
|
+
e.groupHeadingsDescription?.[C] ? (s(), c("p", je, B(e.groupHeadingsDescription[C]), 1)) : u("", !0)
|
|
304
304
|
], 2)) : u("", !0),
|
|
305
305
|
f("div", {
|
|
306
306
|
class: m(["form-group-body", [e.groupBodyClass, F.value?.length > 1 ? "p-4.5" : ""]])
|
|
@@ -373,7 +373,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
373
373
|
}, {
|
|
374
374
|
default: Te(() => [
|
|
375
375
|
t.layout === "inline" && e.footer ? (s(), c("div", Me, [
|
|
376
|
-
W.value ? (s(),
|
|
376
|
+
W.value ? (s(), p(S, {
|
|
377
377
|
key: 0,
|
|
378
378
|
type: "button",
|
|
379
379
|
variant: "outline",
|
|
@@ -433,7 +433,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
433
433
|
])
|
|
434
434
|
}, [
|
|
435
435
|
f("div", We, [
|
|
436
|
-
W.value ? (s(),
|
|
436
|
+
W.value ? (s(), p(S, {
|
|
437
437
|
key: 0,
|
|
438
438
|
type: "button",
|
|
439
439
|
variant: "outline",
|
|
@@ -441,7 +441,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
441
441
|
disabled: e.loading || a(b),
|
|
442
442
|
onClick: ie
|
|
443
443
|
}, null, 8, ["text", "disabled"])) : u("", !0),
|
|
444
|
-
d.value && e.isUpdate && !E.value ? (s(),
|
|
444
|
+
d.value && e.isUpdate && !E.value ? (s(), p(S, z({
|
|
445
445
|
key: 1,
|
|
446
446
|
type: "button",
|
|
447
447
|
variant: "primary",
|
|
@@ -454,15 +454,15 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
454
454
|
f("div", {
|
|
455
455
|
class: m(["flex gap-3 items-center", d.value && "ml-auto"])
|
|
456
456
|
}, [
|
|
457
|
-
d.value && te.value ? (s(),
|
|
457
|
+
d.value && te.value ? (s(), p(S, {
|
|
458
458
|
key: 0,
|
|
459
459
|
type: "button",
|
|
460
460
|
variant: "outline",
|
|
461
461
|
icon: "lucide:arrow-left",
|
|
462
462
|
text: "Previous",
|
|
463
|
-
onClick:
|
|
463
|
+
onClick: Ce
|
|
464
464
|
})) : u("", !0),
|
|
465
|
-
d.value && !E.value ? (s(),
|
|
465
|
+
d.value && !E.value ? (s(), p(S, {
|
|
466
466
|
key: 1,
|
|
467
467
|
type: "button",
|
|
468
468
|
variant: e.isUpdate ? "outline" : "primary",
|
|
@@ -470,7 +470,7 @@ const He = ["onKeydown"], $e = { class: "flex items-center gap-3" }, Ie = { clas
|
|
|
470
470
|
iconRight: "lucide:arrow-right",
|
|
471
471
|
onClick: ae
|
|
472
472
|
}, null, 8, ["variant"])) : u("", !0),
|
|
473
|
-
!d.value || E.value ? (s(),
|
|
473
|
+
!d.value || E.value ? (s(), p(S, z({
|
|
474
474
|
key: 2,
|
|
475
475
|
type: "submit",
|
|
476
476
|
variant: "primary",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FormFields.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0497a604"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as J, computed as K, ref as Q, openBlock as o, createElementBlock as u, normalizeClass as d, Fragment as
|
|
1
|
+
import { defineComponent as J, computed as K, ref as Q, openBlock as o, createElementBlock as u, normalizeClass as d, Fragment as p, renderList as W, withMemo as X, unref as m, createBlock as b, withCtx as U, resolveDynamicComponent as D, createTextVNode as A, toDisplayString as x, createCommentVNode as c, createElementVNode as Y, createVNode as Z, renderSlot as _, markRaw as ee } from "vue";
|
|
2
2
|
import { isComponent as v, getNestedValue as V, resolveFieldType as te } from "./utils/form.utils.js";
|
|
3
3
|
import B from "../Label.vue.js";
|
|
4
4
|
import ae from "./FormField.vue.js";
|
|
@@ -91,7 +91,7 @@ const se = {
|
|
|
91
91
|
q.value
|
|
92
92
|
])
|
|
93
93
|
}, [
|
|
94
|
-
(o(!0), u(
|
|
94
|
+
(o(!0), u(p, null, W(n.schema, (e) => (o(), u(p, {
|
|
95
95
|
key: e.name
|
|
96
96
|
}, [
|
|
97
97
|
I(e) && E(e) ? X([
|
|
@@ -116,17 +116,17 @@ const se = {
|
|
|
116
116
|
class: d([
|
|
117
117
|
"max-md:col-span-full! form-field-item relative",
|
|
118
118
|
j(e),
|
|
119
|
-
n.layout === "inline" ? "
|
|
119
|
+
n.layout === "inline" ? " " : ""
|
|
120
120
|
])
|
|
121
121
|
}, [
|
|
122
|
-
l(e) && s(e) !== "switch" && s(e) !== "check" && s(e) !== "customFields" && s(e) !== "choiceBox" && !w(e) ? (o(),
|
|
122
|
+
l(e) && s(e) !== "switch" && s(e) !== "check" && s(e) !== "customFields" && s(e) !== "choiceBox" && !w(e) ? (o(), b(B, {
|
|
123
123
|
key: 0,
|
|
124
124
|
size: "md",
|
|
125
125
|
for: e.name,
|
|
126
126
|
class: "mb-2 block font-medium"
|
|
127
127
|
}, {
|
|
128
128
|
default: U(() => [
|
|
129
|
-
m(v)(l(e)) ? (o(),
|
|
129
|
+
m(v)(l(e)) ? (o(), b(D(R(l(e))), { key: 0 })) : (o(), u(p, { key: 1 }, [
|
|
130
130
|
A(x(l(e)) + " ", 1),
|
|
131
131
|
e.required && n.showRequiredAsterisk ? (o(), u("span", se, "*")) : c("", !0)
|
|
132
132
|
], 64))
|
|
@@ -149,7 +149,7 @@ const se = {
|
|
|
149
149
|
L(e) ? "-top-2.5 left-3 text-xs bg-background px-1 text-black shadow-[0_4px_4px_-4px_bg-background]" : `top-1/2 -translate-y-1/2 text-sm text-muted-foreground/70 ${G(e)}`
|
|
150
150
|
])
|
|
151
151
|
}, [
|
|
152
|
-
m(v)(l(e)) ? (o(),
|
|
152
|
+
m(v)(l(e)) ? (o(), b(D(R(l(e))), { key: 0 })) : (o(), u(p, { key: 1 }, [
|
|
153
153
|
A(x(l(e)) + " ", 1),
|
|
154
154
|
e.required ? (o(), u("span", ue, "*")) : c("", !0)
|
|
155
155
|
], 64))
|
|
@@ -179,7 +179,7 @@ const se = {
|
|
|
179
179
|
onAddonAction: H
|
|
180
180
|
}, null, 8, ["field", "value", "floatingActive", "label", "values", "errors", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "loading", "onChange"])
|
|
181
181
|
], 42, re),
|
|
182
|
-
s(e) === "check" || s(e) === "switch" && e.props?.switchVariant === "basic" ? (o(),
|
|
182
|
+
s(e) === "check" || s(e) === "switch" && e.props?.switchVariant === "basic" ? (o(), b(B, {
|
|
183
183
|
key: 1,
|
|
184
184
|
for: e.name,
|
|
185
185
|
class: "ml-2 text-sm font-medium cursor-pointer"
|
|
@@ -193,7 +193,7 @@ const se = {
|
|
|
193
193
|
h(e) ? (o(), u("p", {
|
|
194
194
|
key: 2,
|
|
195
195
|
class: d([
|
|
196
|
-
n.layout === "inline" ? "
|
|
196
|
+
n.layout === "inline" ? "pt-2 capitalize bottom-0 left-0 mt-0 -text-fs-2.5 text-destructive whitespace-nowrap" : "mt-1 -text-fs-2.5 text-destructive"
|
|
197
197
|
])
|
|
198
198
|
}, x(h(e)), 3)) : c("", !0)
|
|
199
199
|
], 2)), a, 0) : c("", !0)
|
|
@@ -8,21 +8,21 @@ type __VLS_Props = {
|
|
|
8
8
|
importData: any[];
|
|
9
9
|
};
|
|
10
10
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
-
next: (...args: any[]) => void;
|
|
12
11
|
"update:importMethod": (...args: any[]) => void;
|
|
13
12
|
"update:csvFile": (...args: any[]) => void;
|
|
14
13
|
"update:mappings": (...args: any[]) => void;
|
|
15
14
|
"update:headers": (...args: any[]) => void;
|
|
16
15
|
"update:preview": (...args: any[]) => void;
|
|
17
16
|
"update:importData": (...args: any[]) => void;
|
|
17
|
+
next: (...args: any[]) => void;
|
|
18
18
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
-
onNext?: (...args: any[]) => any;
|
|
20
19
|
"onUpdate:importMethod"?: (...args: any[]) => any;
|
|
21
20
|
"onUpdate:csvFile"?: (...args: any[]) => any;
|
|
22
21
|
"onUpdate:mappings"?: (...args: any[]) => any;
|
|
23
22
|
"onUpdate:headers"?: (...args: any[]) => any;
|
|
24
23
|
"onUpdate:preview"?: (...args: any[]) => any;
|
|
25
24
|
"onUpdate:importData"?: (...args: any[]) => any;
|
|
25
|
+
onNext?: (...args: any[]) => any;
|
|
26
26
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
27
27
|
fileInput: HTMLInputElement;
|
|
28
28
|
}, HTMLDivElement>;
|
|
@@ -9,12 +9,12 @@ type __VLS_Props = {
|
|
|
9
9
|
}[];
|
|
10
10
|
};
|
|
11
11
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
-
next: (...args: any[]) => void;
|
|
13
12
|
"update:mappings": (...args: any[]) => void;
|
|
13
|
+
next: (...args: any[]) => void;
|
|
14
14
|
prev: (...args: any[]) => void;
|
|
15
15
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
-
onNext?: (...args: any[]) => any;
|
|
17
16
|
"onUpdate:mappings"?: (...args: any[]) => any;
|
|
17
|
+
onNext?: (...args: any[]) => any;
|
|
18
18
|
onPrev?: (...args: any[]) => any;
|
|
19
19
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
20
20
|
export default _default;
|
package/components/Input.vue.js
CHANGED
|
@@ -230,7 +230,7 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
|
|
|
230
230
|
key: 3,
|
|
231
231
|
tabindex: "-1",
|
|
232
232
|
class: u([
|
|
233
|
-
"absolute left-
|
|
233
|
+
"absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center text-muted-foreground z-20 pointer-events-none",
|
|
234
234
|
t.disabled ? "opacity-50" : ""
|
|
235
235
|
])
|
|
236
236
|
}, [
|
package/components/Modal.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Modal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ec288b97"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
package/components/Modal.vue2.js
CHANGED
|
@@ -111,7 +111,7 @@ const Z = ["data-testid"], _ = ["data-testid"], ee = {
|
|
|
111
111
|
size: "sm",
|
|
112
112
|
icon: "lucide:x",
|
|
113
113
|
variant: "ghost",
|
|
114
|
-
class: i(
|
|
114
|
+
class: i({ "blink-bg": b.value }),
|
|
115
115
|
"data-testid": "modal-close-btn",
|
|
116
116
|
onClick: m
|
|
117
117
|
}, null, 8, ["class"])
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as A, ref as
|
|
2
|
-
import { useRoute as
|
|
1
|
+
import { defineComponent as A, ref as d, onMounted as F, nextTick as k, onUnmounted as H, watch as T, openBlock as s, createElementBlock as b, normalizeClass as v, createVNode as g, Transition as _, withCtx as w, createElementVNode as l, createCommentVNode as p, Fragment as U, renderList as q, isMemoSame as G, createBlock as C, resolveDynamicComponent as J, mergeProps as K, toDisplayString as O, unref as Q } from "vue";
|
|
2
|
+
import { useRoute as X } from "vue-router";
|
|
3
3
|
import m from "../Icon.vue.js";
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
4
|
+
import { $t as Y } from "../../utils/i18n.js";
|
|
5
|
+
const Z = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "absolute left-0 top-0 bottom-0 z-10 flex items-center pointer-events-none"
|
|
8
|
-
},
|
|
8
|
+
}, ee = { class: "truncate" }, te = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "absolute right-0 top-0 bottom-0 z-10 flex items-center justify-end pointer-events-none"
|
|
11
|
-
},
|
|
11
|
+
}, le = /* @__PURE__ */ A({
|
|
12
12
|
__name: "NavbarTabs",
|
|
13
13
|
props: {
|
|
14
14
|
items: {},
|
|
@@ -19,91 +19,93 @@ const Q = {
|
|
|
19
19
|
class: { default: "" }
|
|
20
20
|
},
|
|
21
21
|
setup(a) {
|
|
22
|
-
const n = a, i =
|
|
23
|
-
const o = i.value;
|
|
24
|
-
o && (C.value = o.scrollLeft > 2, I.value = o.scrollLeft + o.clientWidth < o.scrollWidth - 2);
|
|
25
|
-
}, R = (o) => {
|
|
22
|
+
const n = a, i = d(null), I = d(!1), z = d(!1), c = () => {
|
|
26
23
|
const t = i.value;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
t && (I.value = t.scrollLeft > 2, z.value = t.scrollLeft + t.clientWidth < t.scrollWidth - 2);
|
|
25
|
+
}, R = (t) => {
|
|
26
|
+
const r = i.value;
|
|
27
|
+
if (!r) return;
|
|
28
|
+
const e = r.clientWidth * 0.6;
|
|
29
|
+
r.scrollBy({ left: t === "right" ? e : -e, behavior: "smooth" });
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
F(() => {
|
|
32
|
+
k(() => {
|
|
33
|
+
c(), i.value?.addEventListener("scroll", c, { passive: !0 });
|
|
34
34
|
});
|
|
35
|
-
}),
|
|
36
|
-
i.value?.removeEventListener("scroll",
|
|
35
|
+
}), H(() => {
|
|
36
|
+
i.value?.removeEventListener("scroll", c);
|
|
37
37
|
});
|
|
38
|
-
const h =
|
|
39
|
-
|
|
38
|
+
const h = X();
|
|
39
|
+
T(
|
|
40
40
|
() => h.path,
|
|
41
|
-
() =>
|
|
41
|
+
() => k(c)
|
|
42
42
|
);
|
|
43
|
-
const x =
|
|
44
|
-
const e =
|
|
45
|
-
e instanceof HTMLElement ? x.value.set(
|
|
43
|
+
const x = d(/* @__PURE__ */ new Map()), E = (t, r) => {
|
|
44
|
+
const e = t?.$el ?? t;
|
|
45
|
+
e instanceof HTMLElement ? x.value.set(r, e) : x.value.delete(r);
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
T(
|
|
48
48
|
() => h.path,
|
|
49
|
-
(
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
x.value.get(
|
|
49
|
+
(t) => {
|
|
50
|
+
k(() => {
|
|
51
|
+
const r = n.items.findIndex((o) => u(o));
|
|
52
|
+
if (r === -1) return;
|
|
53
|
+
x.value.get(r)?.scrollIntoView({ block: "nearest", inline: "center", behavior: "smooth" });
|
|
54
54
|
});
|
|
55
55
|
},
|
|
56
56
|
{ immediate: !0 }
|
|
57
57
|
);
|
|
58
|
-
const
|
|
58
|
+
const V = {
|
|
59
59
|
line: "flex border-b border-border gap-0",
|
|
60
60
|
pill: "flex gap-1 p-1 bg-secondary/80 rounded-lg",
|
|
61
61
|
solid: "flex gap-0",
|
|
62
62
|
ghost: "flex gap-1"
|
|
63
|
-
},
|
|
63
|
+
}, $ = {
|
|
64
64
|
sm: "px-2.5 py-1.5 text-xs",
|
|
65
65
|
md: "px-3.5 py-2 text-sm",
|
|
66
66
|
lg: "px-5 py-2.5 text-base"
|
|
67
|
-
},
|
|
67
|
+
}, M = {
|
|
68
68
|
line: "text-primary border-b-2 border-primary -mb-px",
|
|
69
69
|
pill: "bg-background text-foreground shadow-sm",
|
|
70
70
|
solid: "bg-primary-light text-primary-dark",
|
|
71
71
|
ghost: "bg-accent text-accent-foreground"
|
|
72
|
-
},
|
|
72
|
+
}, N = {
|
|
73
73
|
line: "text-muted-foreground border-b-2 border-transparent hover:text-foreground hover:border-border",
|
|
74
74
|
pill: "text-muted-foreground hover:text-foreground hover:bg-accent/50",
|
|
75
75
|
solid: "text-muted-foreground hover:text-foreground hover:bg-accent/50",
|
|
76
76
|
ghost: "text-muted-foreground hover:text-foreground hover:bg-accent/50"
|
|
77
|
-
},
|
|
78
|
-
const
|
|
79
|
-
if (!
|
|
80
|
-
const e = typeof
|
|
77
|
+
}, u = (t) => {
|
|
78
|
+
const r = h.path;
|
|
79
|
+
if (!t.to) return !1;
|
|
80
|
+
const e = typeof t.to == "string" ? t.to : t.to.path;
|
|
81
81
|
if (!e) return !1;
|
|
82
|
-
if (
|
|
83
|
-
return
|
|
84
|
-
if (
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
return
|
|
82
|
+
if (t.exact || e === "/")
|
|
83
|
+
return r === e;
|
|
84
|
+
if (r === e) return !0;
|
|
85
|
+
if (r.startsWith(e)) {
|
|
86
|
+
const o = r[e.length];
|
|
87
|
+
return o === "/" || o === "?" || o === "#" || o === void 0;
|
|
88
88
|
}
|
|
89
89
|
return !1;
|
|
90
|
-
},
|
|
91
|
-
const
|
|
92
|
-
return [
|
|
90
|
+
}, W = (t) => {
|
|
91
|
+
const r = "group relative inline-flex items-center justify-center gap-2 font-medium whitespace-nowrap shrink-0 select-none cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-1", e = t.disabled ? "opacity-50 pointer-events-none cursor-not-allowed" : "", S = u(t) ? n.activeClass || M[n.variant] : n.inactiveClass || N[n.variant];
|
|
92
|
+
return [r, $[n.size], S, e].filter(Boolean).join(" ");
|
|
93
|
+
}, j = (t) => t.to ? "router-link" : t.href ? "a" : "button", D = (t) => t.to ? { to: t.to } : t.href ? { href: t.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" }, P = (t, r) => {
|
|
94
|
+
r.disabled && t.preventDefault();
|
|
93
95
|
};
|
|
94
|
-
return (
|
|
95
|
-
class:
|
|
96
|
+
return (t, r) => (s(), b("div", {
|
|
97
|
+
class: v(["relative flex items-center w-full min-w-0 border-b", n.class])
|
|
96
98
|
}, [
|
|
97
|
-
g(
|
|
98
|
-
default:
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
g(_, { name: "fade-x" }, {
|
|
100
|
+
default: w(() => [
|
|
101
|
+
I.value ? (s(), b("div", Z, [
|
|
102
|
+
r[4] || (r[4] = l("div", { class: "w-8 h-full bg-gradient-to-r from-background to-transparent" }, null, -1)),
|
|
101
103
|
l("button", {
|
|
102
104
|
type: "button",
|
|
103
105
|
class: "pointer-events-auto absolute left-0 bg-body h-full px-1 flex items-center text-muted-foreground hover:text-foreground transition-colors",
|
|
104
106
|
"aria-label": "Scroll tabs left",
|
|
105
107
|
tabindex: "-1",
|
|
106
|
-
onClick:
|
|
108
|
+
onClick: r[0] || (r[0] = (e) => R("left"))
|
|
107
109
|
}, [
|
|
108
110
|
g(m, {
|
|
109
111
|
icon: "lucide:chevron-left",
|
|
@@ -118,56 +120,54 @@ const Q = {
|
|
|
118
120
|
ref_key: "scrollRef",
|
|
119
121
|
ref: i,
|
|
120
122
|
role: "tablist",
|
|
121
|
-
class:
|
|
123
|
+
class: v([
|
|
122
124
|
"flex-1 overflow-x-auto scroll-smooth navbar-tabs-no-scrollbar",
|
|
123
|
-
|
|
125
|
+
V[a.variant]
|
|
124
126
|
]),
|
|
125
127
|
style: { "will-change": "transform", contain: "layout style" },
|
|
126
128
|
"aria-label": "Page tabs"
|
|
127
129
|
}, [
|
|
128
|
-
(s(!0),
|
|
129
|
-
const L = [e,
|
|
130
|
-
if (f && f.key ===
|
|
131
|
-
const
|
|
132
|
-
key: r,
|
|
130
|
+
(s(!0), b(U, null, q(a.items, (e, o, S, f) => {
|
|
131
|
+
const L = [e, u(e), e.disabled];
|
|
132
|
+
if (f && f.key === o && G(f, L)) return f;
|
|
133
|
+
const B = (s(), C(J(j(e)), K({ key: o }, { ref_for: !0 }, D(e), {
|
|
133
134
|
ref_for: !0,
|
|
134
|
-
ref: (
|
|
135
|
-
to: e.to || "",
|
|
135
|
+
ref: (y) => E(y, o),
|
|
136
136
|
role: "tab",
|
|
137
|
-
"aria-selected":
|
|
137
|
+
"aria-selected": u(e),
|
|
138
138
|
"aria-disabled": e.disabled || void 0,
|
|
139
139
|
tabindex: e.disabled ? -1 : 0,
|
|
140
|
-
class:
|
|
141
|
-
onClick:
|
|
142
|
-
}, {
|
|
143
|
-
default:
|
|
144
|
-
e.icon ? (s(),
|
|
140
|
+
class: W(e),
|
|
141
|
+
onClick: (y) => P(y, e)
|
|
142
|
+
}), {
|
|
143
|
+
default: w(() => [
|
|
144
|
+
e.icon ? (s(), C(m, {
|
|
145
145
|
key: 0,
|
|
146
146
|
icon: e.icon,
|
|
147
|
-
class:
|
|
147
|
+
class: v(["shrink-0", a.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4"])
|
|
148
148
|
}, null, 8, ["icon", "class"])) : p("", !0),
|
|
149
|
-
l("span",
|
|
150
|
-
e.iconRight ? (s(),
|
|
149
|
+
l("span", ee, O(e.labelI18n ? Q(Y)(e.labelI18n) : e.label), 1),
|
|
150
|
+
e.iconRight ? (s(), C(m, {
|
|
151
151
|
key: 1,
|
|
152
152
|
icon: e.iconRight,
|
|
153
|
-
class:
|
|
153
|
+
class: v(["shrink-0 opacity-70", a.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4"])
|
|
154
154
|
}, null, 8, ["icon", "class"])) : p("", !0)
|
|
155
155
|
]),
|
|
156
156
|
_: 2
|
|
157
|
-
},
|
|
158
|
-
return
|
|
159
|
-
},
|
|
157
|
+
}, 1040, ["aria-selected", "aria-disabled", "tabindex", "class", "onClick"]));
|
|
158
|
+
return B.memo = L, B;
|
|
159
|
+
}, r, 1), 128))
|
|
160
160
|
], 2),
|
|
161
|
-
g(
|
|
162
|
-
default:
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
g(_, { name: "fade-x" }, {
|
|
162
|
+
default: w(() => [
|
|
163
|
+
z.value ? (s(), b("div", te, [
|
|
164
|
+
r[5] || (r[5] = l("div", { class: "w-8 h-full bg-gradient-to-l from-background to-transparent" }, null, -1)),
|
|
165
165
|
l("button", {
|
|
166
166
|
type: "button",
|
|
167
167
|
class: "pointer-events-auto absolute right-0 h-full px-1 flex items-center text-muted-foreground hover:text-foreground transition-colors bg-body",
|
|
168
168
|
"aria-label": "Scroll tabs right",
|
|
169
169
|
tabindex: "-1",
|
|
170
|
-
onClick:
|
|
170
|
+
onClick: r[3] || (r[3] = (e) => R("right"))
|
|
171
171
|
}, [
|
|
172
172
|
g(m, {
|
|
173
173
|
icon: "lucide:chevron-right",
|
|
@@ -182,5 +182,5 @@ const Q = {
|
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
export {
|
|
185
|
-
|
|
185
|
+
le as default
|
|
186
186
|
};
|
|
@@ -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: {
|