vlite3 0.7.13 → 0.7.14
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 +1 -1
- package/components/{CommandPaletteContent.vue.d.ts → CommandPalette/CommandPaletteContent.vue.d.ts} +3 -3
- package/components/CommandPalette/CommandPaletteContent.vue.js +7 -0
- package/components/CommandPalette/CommandPaletteContent.vue2.js +180 -0
- package/components/CommandPalette/CommandPaletteItem.vue.d.ts +15 -0
- package/components/CommandPalette/CommandPaletteItem.vue2.js +7 -0
- package/components/CommandPalette/CommandPaletteItem.vue3.js +60 -0
- package/components/CommandPalette/index.d.ts +5 -0
- package/components/CommandPalette/types.d.ts +40 -0
- package/components/CommandPalette/useCommandPaletteItems.d.ts +15 -0
- package/components/CommandPalette/useCommandPaletteItems.js +99 -0
- package/components/CommandPalette/useCommandPaletteNav.d.ts +13 -0
- package/components/CommandPalette/useCommandPaletteNav.js +49 -0
- package/components/NavbarCommandPalette.vue.d.ts +7 -30
- package/components/NavbarCommandPalette.vue.js +40 -40
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/components/CommandPaletteContent.vue.js +0 -7
- package/components/CommandPaletteContent.vue2.js +0 -311
package/components/Button.vue.js
CHANGED
package/components/{CommandPaletteContent.vue.d.ts → CommandPalette/CommandPaletteContent.vue.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SidebarMenuItemSchema } from '
|
|
2
|
-
import { CommandPaletteItem } from './
|
|
1
|
+
import { SidebarMenuItemSchema } from '../SidebarMenu/types';
|
|
2
|
+
import { CommandPaletteItem } from './types';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
close: () => void;
|
|
5
5
|
items: CommandPaletteItem[];
|
|
@@ -7,7 +7,7 @@ type __VLS_Props = {
|
|
|
7
7
|
placeholder: string;
|
|
8
8
|
placeholderI18n?: string;
|
|
9
9
|
maxResultsPerGroup: number;
|
|
10
|
-
onOpenDynamicModal: (body: any,
|
|
10
|
+
onOpenDynamicModal: (body: any, modalProps: any) => void;
|
|
11
11
|
};
|
|
12
12
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
13
13
|
inputRef: HTMLInputElement;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { defineComponent as j, computed as r, ref as g, watch as U, onMounted as z, nextTick as A, openBlock as i, createElementBlock as c, createElementVNode as o, createVNode as y, withDirectives as H, unref as u, vModelText as J, createTextVNode as f, toDisplayString as l, createCommentVNode as V, Fragment as _, renderList as B, isMemoSame as Q, createBlock as W } from "vue";
|
|
2
|
+
import { useRouter as X } from "vue-router";
|
|
3
|
+
import k from "../Icon.vue.js";
|
|
4
|
+
import { $t as E } from "../../utils/i18n.js";
|
|
5
|
+
import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
|
|
6
|
+
import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
|
|
7
|
+
import ee from "./CommandPaletteItem.vue2.js";
|
|
8
|
+
const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3.5 border-b border-border/60 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
|
|
11
|
+
"aria-live": "polite"
|
|
12
|
+
}, le = { class: "text-sm font-medium text-muted-foreground" }, ae = { class: "text-foreground font-semibold" }, de = { class: "text-xs text-muted-foreground/60 mt-1" }, ie = ["aria-label"], ue = ["aria-label"], ce = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "my-1.5 mx-3 h-px bg-border/40",
|
|
15
|
+
"aria-hidden": "true"
|
|
16
|
+
}, me = {
|
|
17
|
+
class: "px-4 py-2.5 border-t border-border/40 flex items-center gap-4 shrink-0 bg-muted/30",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, pe = { class: "flex items-center gap-1 text-[11px] text-muted-foreground/60" }, xe = { class: "flex items-center gap-1 text-[11px] text-muted-foreground/60" }, fe = { class: "flex items-center gap-1 text-[11px] text-muted-foreground/60" }, be = { class: "ml-auto text-[11px] text-muted-foreground/50" }, Ce = /* @__PURE__ */ j({
|
|
20
|
+
__name: "CommandPaletteContent",
|
|
21
|
+
props: {
|
|
22
|
+
close: { type: Function },
|
|
23
|
+
items: {},
|
|
24
|
+
menuItems: {},
|
|
25
|
+
placeholder: {},
|
|
26
|
+
placeholderI18n: {},
|
|
27
|
+
maxResultsPerGroup: {},
|
|
28
|
+
onOpenDynamicModal: { type: Function }
|
|
29
|
+
},
|
|
30
|
+
setup(b) {
|
|
31
|
+
const n = b, a = (e, s) => {
|
|
32
|
+
const t = E(e);
|
|
33
|
+
return t !== e ? t : s;
|
|
34
|
+
}, G = r(() => {
|
|
35
|
+
if (n.placeholderI18n) {
|
|
36
|
+
const e = E(n.placeholderI18n);
|
|
37
|
+
if (e !== n.placeholderI18n) return e;
|
|
38
|
+
}
|
|
39
|
+
return n.placeholder;
|
|
40
|
+
}), $ = r(() => a("vlite.commandPalette.noResults", "No results for")), L = r(
|
|
41
|
+
() => a("vlite.commandPalette.noResultsDesc", "Try a different term or browse with arrow keys")
|
|
42
|
+
), O = r(() => a("vlite.commandPalette.navigate", "Navigate")), T = r(() => a("vlite.commandPalette.open", "Open")), F = r(() => a("vlite.commandPalette.close", "Close")), P = r(() => a("vlite.commandPalette.result", "result")), w = r(() => a("vlite.commandPalette.results", "results")), m = g(""), R = g(null), C = g(null), q = X(), { flatList: v } = Y({
|
|
43
|
+
items: () => n.items,
|
|
44
|
+
menuItems: () => n.menuItems,
|
|
45
|
+
query: () => m.value,
|
|
46
|
+
maxResultsPerGroup: () => n.maxResultsPerGroup
|
|
47
|
+
}), p = r(() => v.value.total), I = (e) => {
|
|
48
|
+
if (!e.disabled) {
|
|
49
|
+
if (n.close(), e.modalBody) {
|
|
50
|
+
n.onOpenDynamicModal(e.modalBody, e.modalProps);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (e.action) {
|
|
54
|
+
e.action();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (e.to) {
|
|
58
|
+
q.push(e.to).catch(() => {
|
|
59
|
+
});
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
e.href && window.open(e.href, "_blank", "noopener,noreferrer");
|
|
63
|
+
}
|
|
64
|
+
}, { activeIndex: h, isPointerLocked: K, handleKeydown: N, handleItemMouseenter: S } = Z({
|
|
65
|
+
flatList: v,
|
|
66
|
+
listRef: C,
|
|
67
|
+
onExecute: I,
|
|
68
|
+
onClose: n.close
|
|
69
|
+
});
|
|
70
|
+
return U(m, () => {
|
|
71
|
+
h.value = 0;
|
|
72
|
+
}), z(() => {
|
|
73
|
+
A(() => R.value?.focus());
|
|
74
|
+
}), (e, s) => (i(), c("div", te, [
|
|
75
|
+
o("div", oe, [
|
|
76
|
+
y(k, {
|
|
77
|
+
icon: "lucide:search",
|
|
78
|
+
class: "w-4 h-4 text-muted-foreground shrink-0"
|
|
79
|
+
}),
|
|
80
|
+
H(o("input", {
|
|
81
|
+
ref_key: "inputRef",
|
|
82
|
+
ref: R,
|
|
83
|
+
"onUpdate:modelValue": s[0] || (s[0] = (t) => m.value = t),
|
|
84
|
+
type: "text",
|
|
85
|
+
autocomplete: "off",
|
|
86
|
+
autocorrect: "off",
|
|
87
|
+
spellcheck: "false",
|
|
88
|
+
placeholder: G.value,
|
|
89
|
+
class: "flex-1 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/60 outline-none min-w-0",
|
|
90
|
+
"aria-autocomplete": "list",
|
|
91
|
+
"aria-controls": "cp-listbox",
|
|
92
|
+
onKeydown: s[1] || (s[1] = //@ts-ignore
|
|
93
|
+
(...t) => u(N) && u(N)(...t))
|
|
94
|
+
}, null, 40, se), [
|
|
95
|
+
[J, m.value]
|
|
96
|
+
]),
|
|
97
|
+
o("button", {
|
|
98
|
+
type: "button",
|
|
99
|
+
class: "shrink-0 p-1 rounded text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
|
|
100
|
+
"aria-label": "Close",
|
|
101
|
+
tabindex: "-1",
|
|
102
|
+
onClick: s[2] || (s[2] = //@ts-ignore
|
|
103
|
+
(...t) => b.close && b.close(...t))
|
|
104
|
+
}, [
|
|
105
|
+
y(k, {
|
|
106
|
+
icon: "lucide:x",
|
|
107
|
+
class: "w-3.5 h-3.5"
|
|
108
|
+
})
|
|
109
|
+
])
|
|
110
|
+
]),
|
|
111
|
+
o("div", {
|
|
112
|
+
id: "cp-listbox",
|
|
113
|
+
ref_key: "listRef",
|
|
114
|
+
ref: C,
|
|
115
|
+
role: "listbox",
|
|
116
|
+
class: "flex-1 overflow-y-auto py-2 scrollbar-thin cp-scroll-container",
|
|
117
|
+
"aria-label": `${p.value} ${p.value === 1 ? P.value : w.value}`
|
|
118
|
+
}, [
|
|
119
|
+
p.value === 0 ? (i(), c("div", re, [
|
|
120
|
+
y(k, {
|
|
121
|
+
icon: "lucide:search-x",
|
|
122
|
+
class: "w-9 h-9 text-muted-foreground/40 mb-3"
|
|
123
|
+
}),
|
|
124
|
+
o("p", le, [
|
|
125
|
+
f(l($.value) + " ", 1),
|
|
126
|
+
o("span", ae, '"' + l(m.value) + '"', 1)
|
|
127
|
+
]),
|
|
128
|
+
o("p", de, l(L.value), 1)
|
|
129
|
+
])) : V("", !0),
|
|
130
|
+
(i(!0), c(_, null, B(u(v).groups, (t) => (i(), c(_, {
|
|
131
|
+
key: t.key
|
|
132
|
+
}, [
|
|
133
|
+
o("div", {
|
|
134
|
+
class: "px-4 py-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60 select-none",
|
|
135
|
+
"aria-label": `Group: ${t.label}`
|
|
136
|
+
}, l(t.label), 9, ie),
|
|
137
|
+
o("div", {
|
|
138
|
+
role: "group",
|
|
139
|
+
"aria-label": t.label,
|
|
140
|
+
class: "px-2"
|
|
141
|
+
}, [
|
|
142
|
+
(i(!0), c(_, null, B(t.rows, (d, ve, he, x) => {
|
|
143
|
+
const M = [d.index === u(h), d.item.id];
|
|
144
|
+
if (x && x.key === d.item.id && Q(x, M)) return x;
|
|
145
|
+
const D = (i(), W(ee, {
|
|
146
|
+
key: d.item.id,
|
|
147
|
+
item: d.item,
|
|
148
|
+
index: d.index,
|
|
149
|
+
"is-active": d.index === u(h),
|
|
150
|
+
"is-pointer-locked": u(K),
|
|
151
|
+
onExecute: I,
|
|
152
|
+
onMouseenter: u(S)
|
|
153
|
+
}, null, 8, ["item", "index", "is-active", "is-pointer-locked", "onMouseenter"]));
|
|
154
|
+
return D.memo = M, D;
|
|
155
|
+
}, s, 3), 128))
|
|
156
|
+
], 8, ue),
|
|
157
|
+
t.rows.length && t.rows[t.rows.length - 1].isLastInGroup ? (i(), c("div", ce)) : V("", !0)
|
|
158
|
+
], 64))), 128))
|
|
159
|
+
], 8, ne),
|
|
160
|
+
o("div", me, [
|
|
161
|
+
o("span", pe, [
|
|
162
|
+
s[5] || (s[5] = o("kbd", { class: "px-1 rounded border border-border/60 bg-background text-[10px]" }, "↑↓", -1)),
|
|
163
|
+
f(" " + l(O.value), 1)
|
|
164
|
+
]),
|
|
165
|
+
o("span", xe, [
|
|
166
|
+
s[6] || (s[6] = o("kbd", { class: "px-1 rounded border border-border/60 bg-background text-[10px]" }, "↵", -1)),
|
|
167
|
+
f(" " + l(T.value), 1)
|
|
168
|
+
]),
|
|
169
|
+
o("span", fe, [
|
|
170
|
+
s[7] || (s[7] = o("kbd", { class: "px-1 rounded border border-border/60 bg-background text-[10px]" }, "Esc", -1)),
|
|
171
|
+
f(" " + l(F.value), 1)
|
|
172
|
+
]),
|
|
173
|
+
o("span", be, l(p.value) + " " + l(p.value === 1 ? P.value : w.value), 1)
|
|
174
|
+
])
|
|
175
|
+
]));
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
export {
|
|
179
|
+
Ce as default
|
|
180
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CommandPaletteItem } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
item: CommandPaletteItem;
|
|
4
|
+
isActive: boolean;
|
|
5
|
+
isPointerLocked: boolean;
|
|
6
|
+
index: number;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
9
|
+
mouseenter: (index: number) => any;
|
|
10
|
+
execute: (item: CommandPaletteItem) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onMouseenter?: (index: number) => any;
|
|
13
|
+
onExecute?: (item: CommandPaletteItem) => any;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineComponent as f, openBlock as i, createElementBlock as n, normalizeClass as c, createElementVNode as o, createVNode as x, toDisplayString as s, unref as a, createCommentVNode as r, createBlock as g } from "vue";
|
|
2
|
+
import m from "../Icon.vue.js";
|
|
3
|
+
import { getEffectiveLabel as b, getEffectiveDesc as k } from "./useCommandPaletteItems.js";
|
|
4
|
+
const v = ["id", "aria-selected", "aria-disabled", "data-active"], h = { class: "flex-1 min-w-0" }, y = { class: "block font-medium truncate text-inherit leading-tight" }, w = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "block text-xs text-muted-foreground/70 truncate mt-0.5"
|
|
7
|
+
}, A = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "shrink-0 hidden sm:inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono border border-border/60 bg-background/80 text-muted-foreground ml-1"
|
|
10
|
+
}, L = /* @__PURE__ */ f({
|
|
11
|
+
__name: "CommandPaletteItem",
|
|
12
|
+
props: {
|
|
13
|
+
item: {},
|
|
14
|
+
isActive: { type: Boolean },
|
|
15
|
+
isPointerLocked: { type: Boolean },
|
|
16
|
+
index: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["execute", "mouseenter"],
|
|
19
|
+
setup(e, { emit: l }) {
|
|
20
|
+
const d = l;
|
|
21
|
+
return (B, t) => (i(), n("button", {
|
|
22
|
+
id: `cp-item-${e.item.id}`,
|
|
23
|
+
type: "button",
|
|
24
|
+
role: "option",
|
|
25
|
+
"aria-selected": e.isActive,
|
|
26
|
+
"aria-disabled": e.item.disabled || void 0,
|
|
27
|
+
"data-active": e.isActive,
|
|
28
|
+
class: c(["command-palette-item w-full flex items-center gap-3 px-3! py-2.5 mx-1 rounded-lg text-sm text-left cursor-pointer select-none focus-visible:outline-none cp-item-transition", [
|
|
29
|
+
e.isActive ? "bg-gray-200/80 text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
|
|
30
|
+
e.item.disabled ? "opacity-40 cursor-not-allowed" : "",
|
|
31
|
+
e.isPointerLocked ? "pointer-events-none" : ""
|
|
32
|
+
]]),
|
|
33
|
+
style: { width: "calc(100% - 8px)" },
|
|
34
|
+
onClick: t[0] || (t[0] = (u) => d("execute", e.item)),
|
|
35
|
+
onMouseenter: t[1] || (t[1] = (u) => d("mouseenter", e.index))
|
|
36
|
+
}, [
|
|
37
|
+
o("span", {
|
|
38
|
+
class: c(["shrink-0 flex items-center justify-center w-7 h-7 rounded-md", e.isActive ? "bg-gray-300/80 text-gray-900" : "bg-muted/80 text-muted-foreground"])
|
|
39
|
+
}, [
|
|
40
|
+
x(m, {
|
|
41
|
+
icon: e.item.icon ?? "lucide:arrow-right",
|
|
42
|
+
class: "w-3.5 h-3.5"
|
|
43
|
+
}, null, 8, ["icon"])
|
|
44
|
+
], 2),
|
|
45
|
+
o("span", h, [
|
|
46
|
+
o("span", y, s(a(b)(e.item)), 1),
|
|
47
|
+
e.item.description || e.item.descriptionI18n ? (i(), n("span", w, s(a(k)(e.item)), 1)) : r("", !0)
|
|
48
|
+
]),
|
|
49
|
+
e.item.href ? (i(), g(m, {
|
|
50
|
+
key: 0,
|
|
51
|
+
icon: "lucide:external-link",
|
|
52
|
+
class: "shrink-0 w-3 h-3 text-muted-foreground/50"
|
|
53
|
+
})) : r("", !0),
|
|
54
|
+
e.isActive ? (i(), n("kbd", A, " ↵ ")) : r("", !0)
|
|
55
|
+
], 42, v));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
L as default
|
|
60
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as CommandPaletteContent } from './CommandPaletteContent.vue';
|
|
2
|
+
export { default as CommandPaletteItemComponent } from './CommandPaletteItem.vue';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export * from './useCommandPaletteItems';
|
|
5
|
+
export * from './useCommandPaletteNav';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface CommandPaletteItem {
|
|
2
|
+
id?: string;
|
|
3
|
+
label: string;
|
|
4
|
+
labelI18n?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
descriptionI18n?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
group?: string;
|
|
9
|
+
to?: string;
|
|
10
|
+
href?: string;
|
|
11
|
+
action?: () => void;
|
|
12
|
+
keywords?: string[];
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
modalBody?: any;
|
|
15
|
+
modalProps?: Record<string, any>;
|
|
16
|
+
show?: boolean | (() => boolean);
|
|
17
|
+
children?: CommandPaletteItem[];
|
|
18
|
+
}
|
|
19
|
+
export interface CommandPaletteGroup {
|
|
20
|
+
key: string;
|
|
21
|
+
label: string;
|
|
22
|
+
items: CommandPaletteItem[];
|
|
23
|
+
}
|
|
24
|
+
/** A pre-indexed row used by the flat render list — index is baked in at compute time */
|
|
25
|
+
export interface FlatRow {
|
|
26
|
+
item: CommandPaletteItem;
|
|
27
|
+
/** Absolute 0-based position across all groups — used directly in v-memo */
|
|
28
|
+
index: number;
|
|
29
|
+
/** Whether a divider should be rendered after this row's group */
|
|
30
|
+
isLastInGroup: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface FlatGrouped {
|
|
33
|
+
key: string;
|
|
34
|
+
label: string;
|
|
35
|
+
rows: FlatRow[];
|
|
36
|
+
}
|
|
37
|
+
export interface FlatList {
|
|
38
|
+
groups: FlatGrouped[];
|
|
39
|
+
total: number;
|
|
40
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SidebarMenuItemSchema } from '../SidebarMenu/types';
|
|
2
|
+
import { CommandPaletteItem, CommandPaletteGroup, FlatList } from './types';
|
|
3
|
+
export declare function getEffectiveLabel(item: CommandPaletteItem): string;
|
|
4
|
+
export declare function getEffectiveDesc(item: CommandPaletteItem): string;
|
|
5
|
+
export declare function flattenCommandItems(items: CommandPaletteItem[], parentLabel?: string, depth?: number): CommandPaletteItem[];
|
|
6
|
+
export declare function flattenSidebarItems(items: SidebarMenuItemSchema[], parentLabel?: string, depth?: number): CommandPaletteItem[];
|
|
7
|
+
export declare function useCommandPaletteItems(options: {
|
|
8
|
+
items: () => CommandPaletteItem[];
|
|
9
|
+
menuItems: () => SidebarMenuItemSchema[];
|
|
10
|
+
query: () => string;
|
|
11
|
+
maxResultsPerGroup: () => number;
|
|
12
|
+
}): {
|
|
13
|
+
filteredGroups: import('vue').ComputedRef<CommandPaletteGroup[]>;
|
|
14
|
+
flatList: import('vue').ComputedRef<FlatList>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { computed as f } from "vue";
|
|
2
|
+
import { $t as d } from "../../utils/i18n.js";
|
|
3
|
+
function b(e) {
|
|
4
|
+
if (e.labelI18n) {
|
|
5
|
+
const r = d(e.labelI18n);
|
|
6
|
+
if (r !== e.labelI18n) return r;
|
|
7
|
+
}
|
|
8
|
+
return e.label;
|
|
9
|
+
}
|
|
10
|
+
function I(e) {
|
|
11
|
+
if (e.descriptionI18n) {
|
|
12
|
+
const r = d(e.descriptionI18n);
|
|
13
|
+
if (r !== e.descriptionI18n) return r;
|
|
14
|
+
}
|
|
15
|
+
return e.description ?? "";
|
|
16
|
+
}
|
|
17
|
+
function m(e) {
|
|
18
|
+
return typeof e == "function" ? e() : e !== void 0 ? e : !0;
|
|
19
|
+
}
|
|
20
|
+
function p(e, r, s = 0) {
|
|
21
|
+
const l = [];
|
|
22
|
+
for (const t of e) {
|
|
23
|
+
if (!m(t.show)) continue;
|
|
24
|
+
const o = s === 0 ? t.label : r ?? "Navigation";
|
|
25
|
+
(t.to || t.href || t.action || t.modalBody) && l.push({
|
|
26
|
+
...t,
|
|
27
|
+
id: t.id ?? t.to ?? t.label ?? Math.random().toString(),
|
|
28
|
+
group: t.group ?? o
|
|
29
|
+
}), t.children?.length && l.push(...p(t.children, o, s + 1));
|
|
30
|
+
}
|
|
31
|
+
return l;
|
|
32
|
+
}
|
|
33
|
+
function g(e, r, s = 0) {
|
|
34
|
+
const l = [];
|
|
35
|
+
for (const t of e) {
|
|
36
|
+
if (!m(t.show)) continue;
|
|
37
|
+
const o = s === 0 ? t.label : r ?? "Navigation";
|
|
38
|
+
(t.to || t.href || t.action || t.modalBody) && l.push({
|
|
39
|
+
id: t.id ?? (typeof t.to == "string" ? t.to : "") ?? t.label ?? Math.random().toString(),
|
|
40
|
+
label: t.label,
|
|
41
|
+
labelI18n: t.labelI18n,
|
|
42
|
+
icon: t.icon,
|
|
43
|
+
group: t.group ?? o,
|
|
44
|
+
to: typeof t.to == "string" ? t.to : t.to?.path,
|
|
45
|
+
href: t.href,
|
|
46
|
+
action: t.action ? () => t.action(t) : void 0,
|
|
47
|
+
disabled: t.disabled,
|
|
48
|
+
modalBody: t.modalBody,
|
|
49
|
+
modalProps: t.modalProps
|
|
50
|
+
}), t.children?.length && l.push(...g(t.children, o, s + 1));
|
|
51
|
+
}
|
|
52
|
+
return l;
|
|
53
|
+
}
|
|
54
|
+
function u(e) {
|
|
55
|
+
return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
56
|
+
}
|
|
57
|
+
function y(e, r) {
|
|
58
|
+
const s = u(b(e)), l = u(I(e)), t = (e.keywords ?? []).map(u).join(" "), o = u(r);
|
|
59
|
+
return s === o ? 100 : s.startsWith(o) ? 80 : s.includes(o) ? 60 : l.includes(o) || t.includes(o) ? 40 : 0;
|
|
60
|
+
}
|
|
61
|
+
function w(e) {
|
|
62
|
+
const r = f(() => {
|
|
63
|
+
const t = g(e.menuItems()), o = p(e.items()), i = /* @__PURE__ */ new Set(), c = [];
|
|
64
|
+
for (const n of [...o, ...t])
|
|
65
|
+
n.id && !i.has(n.id) && (i.add(n.id), c.push(n));
|
|
66
|
+
return c;
|
|
67
|
+
}), s = f(() => {
|
|
68
|
+
const t = e.query().trim();
|
|
69
|
+
let o = r.value.filter((n) => !n.disabled);
|
|
70
|
+
t && (o = o.map((n) => ({ item: n, s: y(n, t) })).filter(({ s: n }) => n > 0).sort((n, a) => a.s - n.s).map(({ item: n }) => n));
|
|
71
|
+
const i = /* @__PURE__ */ new Map();
|
|
72
|
+
for (const n of o) {
|
|
73
|
+
const a = n.group ?? "Actions";
|
|
74
|
+
i.has(a) || i.set(a, []), i.get(a).push(n);
|
|
75
|
+
}
|
|
76
|
+
const c = [];
|
|
77
|
+
for (const [n, a] of i)
|
|
78
|
+
c.push({ key: n, label: n, items: a.slice(0, e.maxResultsPerGroup()) });
|
|
79
|
+
return c;
|
|
80
|
+
}), l = f(() => {
|
|
81
|
+
let t = 0;
|
|
82
|
+
return { groups: s.value.map((i, c) => {
|
|
83
|
+
const n = i.items.map((a, h) => ({
|
|
84
|
+
item: a,
|
|
85
|
+
index: t++,
|
|
86
|
+
isLastInGroup: h === i.items.length - 1 && c < s.value.length - 1
|
|
87
|
+
}));
|
|
88
|
+
return { key: i.key, label: i.label, rows: n };
|
|
89
|
+
}), total: t };
|
|
90
|
+
});
|
|
91
|
+
return { filteredGroups: s, flatList: l };
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
p as flattenCommandItems,
|
|
95
|
+
g as flattenSidebarItems,
|
|
96
|
+
I as getEffectiveDesc,
|
|
97
|
+
b as getEffectiveLabel,
|
|
98
|
+
w as useCommandPaletteItems
|
|
99
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { FlatList, CommandPaletteItem } from './types';
|
|
3
|
+
export declare function useCommandPaletteNav(options: {
|
|
4
|
+
flatList: Ref<FlatList>;
|
|
5
|
+
listRef: Ref<HTMLElement | null>;
|
|
6
|
+
onExecute: (item: CommandPaletteItem) => void;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
}): {
|
|
9
|
+
activeIndex: Ref<number, number>;
|
|
10
|
+
isPointerLocked: Ref<boolean, boolean>;
|
|
11
|
+
handleKeydown: (e: KeyboardEvent) => void;
|
|
12
|
+
handleItemMouseenter: (index: number) => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ref as c, onUnmounted as m, nextTick as d } from "vue";
|
|
2
|
+
function w(r) {
|
|
3
|
+
const t = c(0), o = c(!1);
|
|
4
|
+
let l = null;
|
|
5
|
+
const a = () => {
|
|
6
|
+
o.value = !0, l && clearTimeout(l), l = setTimeout(() => {
|
|
7
|
+
o.value = !1;
|
|
8
|
+
}, 200);
|
|
9
|
+
};
|
|
10
|
+
let n = null;
|
|
11
|
+
const f = (e) => {
|
|
12
|
+
o.value || (n !== null && cancelAnimationFrame(n), n = requestAnimationFrame(() => {
|
|
13
|
+
t.value = e, n = null;
|
|
14
|
+
}));
|
|
15
|
+
}, u = () => {
|
|
16
|
+
d(() => {
|
|
17
|
+
const e = r.listRef.value?.querySelector('[data-active="true"]');
|
|
18
|
+
e && e.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
19
|
+
});
|
|
20
|
+
}, s = (e) => {
|
|
21
|
+
if (e.key === "Escape") {
|
|
22
|
+
r.onClose();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (e.key === "ArrowDown") {
|
|
26
|
+
e.preventDefault(), a(), t.value = Math.min(t.value + 1, r.flatList.value.total - 1), u();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (e.key === "ArrowUp") {
|
|
30
|
+
e.preventDefault(), a(), t.value = Math.max(t.value - 1, 0), u();
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (e.key === "Enter") {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
for (const v of r.flatList.value.groups)
|
|
36
|
+
for (const i of v.rows)
|
|
37
|
+
if (i.index === t.value) {
|
|
38
|
+
r.onExecute(i.item);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return m(() => {
|
|
44
|
+
n !== null && cancelAnimationFrame(n), l && clearTimeout(l);
|
|
45
|
+
}), { activeIndex: t, isPointerLocked: o, handleKeydown: s, handleItemMouseenter: f };
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
w as useCommandPaletteNav
|
|
49
|
+
};
|
|
@@ -1,54 +1,31 @@
|
|
|
1
1
|
import { SidebarMenuItemSchema } from './SidebarMenu/types';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
label: string;
|
|
5
|
-
labelI18n?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
descriptionI18n?: string;
|
|
8
|
-
icon?: string;
|
|
9
|
-
group?: string;
|
|
10
|
-
to?: string;
|
|
11
|
-
href?: string;
|
|
12
|
-
action?: () => void;
|
|
13
|
-
keywords?: string[];
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
modalBody?: any;
|
|
16
|
-
modalProps?: Record<string, any>;
|
|
17
|
-
show?: boolean | (() => boolean);
|
|
18
|
-
children?: CommandPlateSchema[];
|
|
19
|
-
}
|
|
20
|
-
export type CommandPaletteItem = CommandPlateSchema;
|
|
21
|
-
export interface CommandPaletteGroup {
|
|
22
|
-
key: string;
|
|
23
|
-
label: string;
|
|
24
|
-
items: CommandPaletteItem[];
|
|
25
|
-
}
|
|
2
|
+
export type { CommandPaletteItem, CommandPaletteGroup } from './CommandPalette';
|
|
3
|
+
export type CommandPlateSchema = import('./CommandPalette').CommandPaletteItem;
|
|
26
4
|
interface Props {
|
|
27
5
|
/** Items directly supplied to the palette (static list or pre-mapped) */
|
|
28
|
-
items?: CommandPaletteItem[];
|
|
6
|
+
items?: import('./CommandPalette').CommandPaletteItem[];
|
|
29
7
|
/**
|
|
30
8
|
* Raw SidebarMenuItemSchema tree — the palette auto-flattens and groups these.
|
|
31
|
-
* Supports top-level links, nested children, and grouped items.
|
|
32
9
|
*/
|
|
33
10
|
menuItems?: SidebarMenuItemSchema[];
|
|
34
11
|
/** Keyboard shortcut that opens the palette (default: Meta+K / Ctrl+K) */
|
|
35
12
|
shortcutKey?: string;
|
|
36
13
|
/** Placeholder text for the search input */
|
|
37
14
|
placeholder?: string;
|
|
38
|
-
/**
|
|
15
|
+
/** i18n translation key for placeholder */
|
|
39
16
|
placeholderI18n?: string;
|
|
40
17
|
/** Maximum number of results shown per group */
|
|
41
18
|
maxResultsPerGroup?: number;
|
|
42
|
-
/**
|
|
19
|
+
/** When false, nothing renders and no shortcut listener is registered */
|
|
43
20
|
enabled?: boolean;
|
|
44
21
|
triggerClass?: string;
|
|
45
22
|
}
|
|
46
23
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
47
24
|
placeholder: string;
|
|
48
|
-
items: CommandPaletteItem[];
|
|
25
|
+
items: import('./CommandPalette').CommandPaletteItem[];
|
|
49
26
|
enabled: boolean;
|
|
50
27
|
menuItems: SidebarMenuItemSchema[];
|
|
51
|
-
shortcutKey: string;
|
|
52
28
|
maxResultsPerGroup: number;
|
|
29
|
+
shortcutKey: string;
|
|
53
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
54
31
|
export default _default;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as x, ref as m, shallowRef as k, onMounted as C, onUnmounted as P, watch as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as x, ref as m, shallowRef as k, onMounted as C, onUnmounted as P, watch as I, computed as y, openBlock as M, createElementBlock as E, Fragment as K, createElementVNode as a, normalizeClass as D, createVNode as c, toDisplayString as p, unref as O, mergeProps as B, createCommentVNode as G } from "vue";
|
|
2
|
+
import L from "./Icon.vue.js";
|
|
3
3
|
import v from "./Modal.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import { $t as
|
|
6
|
-
|
|
4
|
+
import N from "./CommandPalette/CommandPaletteContent.vue.js";
|
|
5
|
+
import { $t as R } from "../utils/i18n.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
const U = { class: "block truncate -text-fs-1.5" }, V = { 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" }, q = /* @__PURE__ */ x({
|
|
7
8
|
__name: "NavbarCommandPalette",
|
|
8
9
|
props: {
|
|
9
10
|
items: { default: () => [] },
|
|
@@ -15,77 +16,76 @@ const R = { class: "block truncate -text-fs-1.5" }, U = { class: "ml-auto inline
|
|
|
15
16
|
enabled: { type: Boolean, default: !0 },
|
|
16
17
|
triggerClass: {}
|
|
17
18
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
|
|
19
|
+
setup(o) {
|
|
20
|
+
const t = o, n = m(!1), s = m(!1), f = k(null), d = m({}), b = () => {
|
|
21
|
+
n.value = !0;
|
|
21
22
|
}, u = () => {
|
|
22
|
-
|
|
23
|
-
}, h = (e,
|
|
24
|
-
u(), f.value = e, d.value =
|
|
23
|
+
n.value = !1;
|
|
24
|
+
}, h = (e, l) => {
|
|
25
|
+
u(), f.value = e, d.value = l || {}, s.value = !0;
|
|
25
26
|
}, r = (e) => {
|
|
26
|
-
|
|
27
|
-
(e.metaKey || e.ctrlKey) && e.key === o.shortcutKey && (e.preventDefault(), l.value ? u() : b());
|
|
27
|
+
t.enabled && (e.metaKey || e.ctrlKey) && e.key === t.shortcutKey && (e.preventDefault(), n.value ? u() : b());
|
|
28
28
|
};
|
|
29
29
|
C(() => {
|
|
30
|
-
|
|
30
|
+
t.enabled && window.addEventListener("keydown", r);
|
|
31
31
|
}), P(() => {
|
|
32
32
|
window.removeEventListener("keydown", r);
|
|
33
|
-
}),
|
|
34
|
-
() =>
|
|
33
|
+
}), I(
|
|
34
|
+
() => t.enabled,
|
|
35
35
|
(e) => {
|
|
36
|
-
e ? window.addEventListener("keydown", r) : (window.removeEventListener("keydown", r),
|
|
36
|
+
e ? window.addEventListener("keydown", r) : (window.removeEventListener("keydown", r), n.value && u());
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
const w = y(() => {
|
|
40
|
-
if (
|
|
41
|
-
const e =
|
|
42
|
-
if (e !==
|
|
40
|
+
if (t.placeholderI18n) {
|
|
41
|
+
const e = R(t.placeholderI18n);
|
|
42
|
+
if (e !== t.placeholderI18n) return e;
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return t.placeholder;
|
|
45
45
|
}), g = y(
|
|
46
46
|
() => typeof navigator < "u" ? /mac/i.test(navigator.platform) : !0
|
|
47
47
|
);
|
|
48
|
-
return (e,
|
|
48
|
+
return (e, l) => o.enabled ? (M(), E(K, { key: 0 }, [
|
|
49
49
|
a("button", {
|
|
50
50
|
type: "button",
|
|
51
|
-
class: D(["command-palette-trigger inline-flex items-center gap-2 px-3 py-1.5 rounded-md text-sm text-muted-foreground bg-muted/60 hover:bg-muted border border-border/60 focus-visible:outline-none justify-between focus-visible:ring-2 focus-visible:ring-primary/50 select-none cursor-pointer shrink-0",
|
|
51
|
+
class: D(["command-palette-trigger inline-flex items-center gap-2 px-3 py-1.5 rounded-md text-sm text-muted-foreground bg-muted/60 hover:bg-muted border border-border/60 focus-visible:outline-none justify-between focus-visible:ring-2 focus-visible:ring-primary/50 select-none cursor-pointer shrink-0", o.triggerClass]),
|
|
52
52
|
"aria-label": "Open command palette",
|
|
53
53
|
onClick: b
|
|
54
54
|
}, [
|
|
55
|
-
c(
|
|
55
|
+
c(L, {
|
|
56
56
|
icon: "lucide:search",
|
|
57
57
|
class: "w-3.5 h-3.5 shrink-0"
|
|
58
58
|
}),
|
|
59
|
-
a("span",
|
|
60
|
-
a("kbd",
|
|
59
|
+
a("span", U, p(w.value.split(",")[0]) + "...", 1),
|
|
60
|
+
a("kbd", V, [
|
|
61
61
|
a("span", null, p(g.value ? "⌘" : "Ctrl"), 1),
|
|
62
|
-
a("span", null, p(
|
|
62
|
+
a("span", null, p(o.shortcutKey.toUpperCase()), 1)
|
|
63
63
|
])
|
|
64
64
|
], 2),
|
|
65
65
|
c(v, {
|
|
66
|
-
show:
|
|
67
|
-
"onUpdate:show":
|
|
66
|
+
show: n.value,
|
|
67
|
+
"onUpdate:show": l[0] || (l[0] = (i) => n.value = i),
|
|
68
68
|
maxWidth: "max-w-2xl",
|
|
69
69
|
bodyClass: "!p-0 flex flex-col h-full",
|
|
70
|
-
body:
|
|
70
|
+
body: O(N),
|
|
71
71
|
bodyProps: {
|
|
72
|
-
items:
|
|
73
|
-
menuItems:
|
|
74
|
-
placeholder:
|
|
75
|
-
placeholderI18n:
|
|
76
|
-
maxResultsPerGroup:
|
|
72
|
+
items: o.items,
|
|
73
|
+
menuItems: o.menuItems,
|
|
74
|
+
placeholder: o.placeholder,
|
|
75
|
+
placeholderI18n: o.placeholderI18n,
|
|
76
|
+
maxResultsPerGroup: o.maxResultsPerGroup,
|
|
77
77
|
onOpenDynamicModal: h
|
|
78
78
|
}
|
|
79
|
-
}, null, 8, ["show", "bodyProps"]),
|
|
80
|
-
c(v,
|
|
79
|
+
}, null, 8, ["show", "body", "bodyProps"]),
|
|
80
|
+
c(v, B(d.value, {
|
|
81
81
|
show: s.value,
|
|
82
|
-
"onUpdate:show":
|
|
82
|
+
"onUpdate:show": l[1] || (l[1] = (i) => s.value = i),
|
|
83
83
|
body: f.value,
|
|
84
84
|
bodyProps: d.value
|
|
85
85
|
}), null, 16, ["show", "body", "bodyProps"])
|
|
86
|
-
], 64)) :
|
|
86
|
+
], 64)) : G("", !0);
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
export {
|
|
90
|
-
|
|
90
|
+
q as default
|
|
91
91
|
};
|
package/index.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export { default as GoogleLogin } from './components/GoogleLogin.vue';
|
|
|
65
65
|
export { default as ColorPicker } from './components/ColorPicker/ColorPicker.vue';
|
|
66
66
|
export { default as ConfirmationModal } from './components/ConfirmationModal.vue';
|
|
67
67
|
export { default as ToastNotification } from './components/ToastNotification.vue';
|
|
68
|
-
export { default as CommandPaletteContent } from './components/CommandPaletteContent.vue';
|
|
68
|
+
export { default as CommandPaletteContent } from './components/CommandPalette/CommandPaletteContent.vue';
|
|
69
69
|
export { default as NavbarCommandPalette } from './components/NavbarCommandPalette.vue';
|
|
70
70
|
export { default as DateRangePicker } from './components/DateRangePicker.vue';
|
|
71
71
|
export { $t } from './utils/i18n';
|
package/index.js
CHANGED
|
@@ -107,7 +107,7 @@ import { default as Dt } from "./components/GoogleLogin.vue.js";
|
|
|
107
107
|
import { default as Nt } from "./components/ColorPicker/ColorPicker.vue.js";
|
|
108
108
|
import { default as At } from "./components/ConfirmationModal.vue.js";
|
|
109
109
|
import { default as Ft } from "./components/ToastNotification.vue.js";
|
|
110
|
-
import { default as Mt } from "./components/CommandPaletteContent.vue.js";
|
|
110
|
+
import { default as Mt } from "./components/CommandPalette/CommandPaletteContent.vue.js";
|
|
111
111
|
import { default as wt } from "./components/NavbarCommandPalette.vue.js";
|
|
112
112
|
import { default as Lt } from "./components/DateRangePicker.vue.js";
|
|
113
113
|
import { createVLite as Kt } from "./core/index.js";
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -894,5 +894,5 @@ textarea::-webkit-scrollbar-thumb {
|
|
|
894
894
|
}
|
|
895
895
|
|
|
896
896
|
/* --- Vite Generated CSS --- */
|
|
897
|
-
input[data-v-66452678]::-webkit-outer-spin-button,input[data-v-66452678]::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0}input[type=number][data-v-66452678]{-moz-appearance:textfield;appearance:textfield}@keyframes onAutoFillStart{0%{opacity:1}to{opacity:1}}@keyframes onAutoFillCancel{0%{opacity:1}to{opacity:1}}input.autofill-detect:-webkit-autofill{animation-name:onAutoFillStart;animation-duration:1ms;animation-fill-mode:both}input.autofill-detect:not(:-webkit-autofill){animation-name:onAutoFillCancel;animation-duration:1ms;animation-fill-mode:both}.blink-bg[data-v-d2085008]{animation:blink-animation-d2085008 1s infinite}@keyframes blink-animation-d2085008{0%{background-color:inherit}15%{background-color:var(--color-gray-250)}35%{background-color:inherit}75%{background-color:var(--color-gray-250)}to{background-color:inherit}}.IroBox{border-radius:8px!important}.custom-fields-table[data-v-112b16b5] .form-field-item{margin-bottom:0!important;height:100%}.custom-fields-table[data-v-112b16b5] input,.custom-fields-table[data-v-112b16b5] textarea{padding-left:1em;padding-right:.5em}.custom-fields-table[data-v-112b16b5] input,.custom-fields-table[data-v-112b16b5] textarea,.custom-fields-table[data-v-112b16b5] select,.custom-fields-table[data-v-112b16b5] .input-wrapper,.custom-fields-table[data-v-112b16b5] .tooltip-trigger button{border:none!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;height:100%!important;min-height:40px}.custom-fields-table[data-v-112b16b5] .tooltip-trigger button{justify-content:space-between!important}.custom-fields-table[data-v-112b16b5] input:focus,.custom-fields-table[data-v-112b16b5] textarea:focus,.custom-fields-table[data-v-112b16b5] select:focus,.custom-fields-table[data-v-112b16b5] .input-wrapper:focus-within{background-color:hsla(var(--primary) / .03)!important;box-shadow:inset 0 0 0 2px hsla(var(--primary) / .1)!important}.custom-fields-table[data-v-112b16b5] .w-full{width:100%;height:100%}.list-enter-active[data-v-112b16b5]{transition:all .15s cubic-bezier(.16,1,.3,1)}.list-enter-from[data-v-112b16b5]{opacity:0;transform:translateY(-5px)}.form-field-item[data-v-a86554e2]{display:flex;flex-direction:column}.form-field-item[data-v-a86554e2]:has([role=switch]),.form-field-item[data-v-a86554e2]:has([role=checkbox]){flex-direction:row;align-items:center;justify-content:flex-start}.form-container[data-v-1a2b21d0]{width:100%}.custom-scrollbar[data-v-3849c10a]::-webkit-scrollbar{width:0px}.custom-scrollbar[data-v-3849c10a]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-3849c10a]::-webkit-scrollbar-thumb{background-color:var(--color-border);border-radius:10px}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar{height:8px}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar-thumb{background-color:var(--color-border);border-radius:10px}.navbar-tabs-no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.navbar-tabs-no-scrollbar::-webkit-scrollbar{display:none}.fade-x-enter-active,.fade-x-leave-active{transition:opacity .15s ease}.fade-x-enter-from,.fade-x-leave-to{opacity:0}.breadcrumb-item[data-v-ecb5df7c]{display:inline-flex;align-items:center;cursor:pointer}.breadcrumb-link[data-v-ecb5df7c]{display:inline-flex;align-items:center;gap:.35em;color:var(--color-muted-foreground);text-decoration:none;transition:color .15s ease,background-color .15s ease;border-radius:var(--radius-sm)}.breadcrumb-link[data-v-ecb5df7c]:not(.current):not(.disabled):hover{color:var(--color-foreground)}.breadcrumb-link.current[data-v-ecb5df7c]{color:var(--color-foreground);font-weight:600;cursor:default}.breadcrumb-link.disabled[data-v-ecb5df7c]{opacity:.45;cursor:not-allowed;pointer-events:none}.breadcrumb-icon[data-v-ecb5df7c]{flex-shrink:0}.breadcrumb-list[data-v-12cf2491]{display:flex;flex-wrap:wrap;align-items:center;list-style:none;margin:0;padding:0;gap:.45em}.breadcrumb--sm[data-v-12cf2491]{font-size:var(--text--fs-2)}.breadcrumb--md[data-v-12cf2491]{font-size:var(--text-fs-0.5, 1em)}.breadcrumb--lg[data-v-12cf2491]{font-size:var(--text-fs-2)}.breadcrumb-separator[data-v-12cf2491]{display:inline-flex;align-items:center;color:var(--color-gray-500);-webkit-user-select:none;user-select:none;font-size:.9em;line-height:1;padding:0 .1em}.breadcrumb-ellipsis[data-v-12cf2491]{display:inline-flex;align-items:center}.breadcrumb-ellipsis-btn[data-v-12cf2491]{display:inline-flex;align-items:center;justify-content:center;width:1.6em;height:1.6em;border-radius:var(--radius-sm);border:1px solid var(--color-border);background:transparent;color:var(--color-muted-foreground);cursor:pointer;font-size:.9em;line-height:1;letter-spacing:.05em;transition:all .15s ease}.breadcrumb-ellipsis-btn[data-v-12cf2491]:hover{background:var(--color-accent);color:var(--color-foreground);border-color:var(--color-gray-350)}.breadcrumb--contained[data-v-12cf2491]{background:var(--color-secondary);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:.45em 1em}.breadcrumb--pills[data-v-12cf2491] .breadcrumb-link{padding:.2em .7em;border-radius:9999px;background:var(--color-secondary);border:1px solid var(--color-border)}.breadcrumb--pills[data-v-12cf2491] .breadcrumb-link:not(.current):not(.disabled):hover{background:var(--color-accent);border-color:var(--color-gray-350)}.breadcrumb--pills[data-v-12cf2491] .breadcrumb-link.current{background:var(--color-primary);color:var(--color-primary-foreground);border-color:var(--color-primary)}.breadcrumb--arrow .breadcrumb-list[data-v-12cf2491]{gap:0}.breadcrumb--arrow[data-v-12cf2491] .breadcrumb-link{padding:.35em .9em .35em 1.4em;background:var(--color-secondary);clip-path:polygon(0 0,calc(100% - .6em) 0,100% 50%,calc(100% - .6em) 100%,0 100%,.6em 50%);border:none;margin-left:-.3em}.breadcrumb--arrow[data-v-12cf2491] .breadcrumb-item:first-child .breadcrumb-link{padding-left:.9em;clip-path:polygon(0 0,calc(100% - .6em) 0,100% 50%,calc(100% - .6em) 100%,0 100%);border-radius:var(--radius-sm) 0 0 var(--radius-sm);margin-left:0}.breadcrumb--arrow[data-v-12cf2491] .breadcrumb-link:not(.current):not(.disabled):hover{background:var(--color-accent)}.breadcrumb--arrow[data-v-12cf2491] .breadcrumb-link.current{background:var(--color-primary);color:var(--color-primary-foreground)}.breadcrumb--arrow .breadcrumb-separator[data-v-12cf2491]{display:none}.heatmap-container[data-v-00476f00]{width:100%;height:100%;display:flex;flex-direction:column;min-height:0}.heatmap-wrapper[data-v-00476f00]{width:100%;height:100%;overflow:auto;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;position:relative}.heatmap-grid[data-v-00476f00]{width:fit-content;height:fit-content;transition:all .2s ease-in-out}.heatmap-cell[data-v-00476f00]{aspect-ratio:1 / 1;border-radius:2px;transition:all .15s ease-in-out;border:1px solid transparent;box-sizing:border-box}.heatmap-cell-interactive[data-v-00476f00]{cursor:pointer}.heatmap-cell-interactive[data-v-00476f00]:hover{transform:scale(1.1);border-color:var(--border);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;z-index:10;position:relative}.heatmap-cell-empty[data-v-00476f00]{opacity:.6}.heatmap-cell-hovered[data-v-00476f00]{outline:2px solid var(--primary);outline-offset:1px}.heatmap-cell-label[data-v-00476f00]{font-size:8px;font-weight:500;color:var(--foreground);opacity:.8;display:flex;align-items:center;justify-content:center;height:100%;width:100%;pointer-events:none}.heatmap-legend[data-v-00476f00]{display:flex;align-items:center;gap:.5rem;margin-top:1rem;font-size:.75rem;color:var(--muted-foreground);flex-shrink:0}.heatmap-legend-label[data-v-00476f00]{font-weight:500}.heatmap-legend-colors[data-v-00476f00]{display:flex;gap:.125rem}.heatmap-legend-item[data-v-00476f00]{width:.75rem;height:.75rem;border-radius:.375rem;border:1px solid var(--border)}@media(max-width:640px){.heatmap-wrapper[data-v-00476f00]{padding:12px}.heatmap-cell[data-v-00476f00]{border-radius:2px}.heatmap-cell-label[data-v-00476f00]{font-size:7px}}@media(min-width:641px)and (max-width:1023px){.heatmap-wrapper[data-v-00476f00]{padding:14px}.heatmap-cell[data-v-00476f00]{border-radius:2px}}@media(min-width:1024px){.heatmap-wrapper[data-v-00476f00]{padding:16px}.heatmap-cell[data-v-00476f00]{border-radius:3px}}.masonry-item[data-v-c29d0159]{content-visibility:auto;contain-intrinsic-size:1px 200px}.carousel-wrapper[data-v-655a78c8]{width:100%;position:relative}.accordion-enter-active[data-v-aa189e08],.accordion-leave-active[data-v-aa189e08]{transition:height .3s ease-in-out}.sidebar-manu-item .tooltip-trigger{width:100%!important}.sidebar-menu-tooltip{margin-left:4px!important}[dir=rtl] .sidebar-menu-tooltip{margin-right:4px!important}.bg-stripe[data-v-454a1505]{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.animate-progress-stripe[data-v-454a1505]{animation:progress-stripe-454a1505 1s linear infinite}@keyframes progress-stripe-454a1505{0%{background-position:1rem 0}to{background-position:0 0}}.animate-progress-indeterminate[data-v-454a1505]{animation:progress-indeterminate-454a1505 1.5s infinite cubic-bezier(.65,.815,.735,.395)}@keyframes progress-indeterminate-454a1505{0%{transform:translate(-100%) scaleX(.2)}50%{transform:translate(0) scaleX(.5)}to{transform:translate(100%) scaleX(.2)}}.permission-matrix-wrapper[data-v-09b401c2]{max-height:70vh}.permission-matrix-wrapper[data-v-09b401c2]::-webkit-scrollbar{width:6px;height:6px}.permission-matrix-wrapper[data-v-09b401c2]::-webkit-scrollbar-track{background:transparent}.permission-matrix-wrapper[data-v-09b401c2]::-webkit-scrollbar-thumb{background:var(--color-gray-350);border-radius:3px}.permission-matrix-wrapper[data-v-09b401c2]::-webkit-scrollbar-thumb:hover{background:var(--color-gray-400)}.permission-list-wrapper[data-v-fc14e574]{border:1px solid var(--color-border);border-radius:.5rem;overflow:hidden;background-color:var(--color-background)}.custom-list-header[data-v-fc14e574]{background-color:var(--color-muted);border-bottom:1px solid var(--color-border);padding:var(--cell-py) var(--cell-px)}.custom-list-group-content .custom-list-item[data-v-fc14e574]{border-bottom:1px solid var(--color-border);padding:var(--cell-py) var(--cell-px);background-color:var(--color-background)}.custom-list-group-content .custom-list-item[data-v-fc14e574]:hover{background-color:var(--color-accent)}.custom-list-group-content .custom-list-item[data-v-fc14e574]:last-child{border-bottom:none}.custom-list-group-content+.custom-list-header[data-v-fc14e574],.custom-list-header+.custom-list-header[data-v-fc14e574]{border-top:1px solid var(--color-border)}.permission-list-wrapper>.custom-list-header[data-v-fc14e574]:last-child{border-bottom:none}.permission-matrix-wrapper[data-v-e9fed8ed]{border:1px solid var(--color-border);background-color:var(--color-gray-100);border-radius:.5rem;overflow:auto}.custom-table[data-v-e9fed8ed]{width:100%;border-collapse:collapse}.custom-th[data-v-e9fed8ed]{background-color:var(--color-gray-150);color:var(--color-foreground);border-bottom:1px solid var(--color-border);border-left:1px solid var(--color-border);padding:var(--cell-py) var(--cell-px);text-align:left;font-weight:600;min-width:200px}.custom-th.text-center[data-v-e9fed8ed]{text-align:center;min-width:100px}.custom-th[data-v-e9fed8ed]:first-child{border-left:none}.custom-td[data-v-e9fed8ed]{border-bottom:1px solid var(--color-border);border-left:1px solid var(--color-border);padding:var(--cell-py) var(--cell-px)}.custom-td.text-center[data-v-e9fed8ed]{text-align:center}.custom-td[data-v-e9fed8ed]:first-child{border-left:none}.custom-group-row td[data-v-e9fed8ed]{background-color:var(--color-gray-100);border-top:1px solid var(--color-border);border-bottom:1px solid var(--color-border)}.custom-entity-row[data-v-e9fed8ed]{background-color:var(--color-background);transition:background-color .1s ease}.custom-entity-row[data-v-e9fed8ed]:hover{background-color:var(--color-gray-50)}.custom-entity-row:last-child td[data-v-e9fed8ed]{border-bottom:none}.custom-active-cell[data-v-e9fed8ed]{cursor:pointer}.custom-active-cell[data-v-e9fed8ed]:hover{background-color:var(--color-accent)}.button-group[data-v-ba735fac] button{align-self:stretch;height:auto!important;min-height:unset!important;min-width:unset!important;width:auto!important}.button-group[data-v-ba735fac]:not(.vertical-group) button{aspect-ratio:unset}.attached-group[data-v-ba735fac] button{position:relative;--radius: .375rem}.attached-group[data-v-ba735fac] button:focus-visible,.attached-group[data-v-ba735fac] button:hover{z-index:10}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child){margin-left:-1px}.attached-group[data-v-ba735fac]:not(.vertical-group) button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius);border-top-right-radius:0;border-bottom-right-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child):not(:last-child){border-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-bottom-left-radius:0}.vertical-group[data-v-ba735fac] button:not(:first-child){margin-top:-1px}.vertical-group[data-v-ba735fac] button:first-child{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.vertical-group[data-v-ba735fac] button:not(:first-child):not(:last-child){border-radius:0}.vertical-group[data-v-ba735fac] button:last-child{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-top-right-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child):not(.border):before{content:"";position:absolute;left:0;top:0;bottom:0;width:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none;height:100%}.vertical-group[data-v-ba735fac] button:not(:first-child):not(.border):before{content:"";position:absolute;top:0;left:0;right:0;height:1px;width:100%;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none}.first-toast-enter-active[data-v-dc3a3b49]{animation:first-toast-in-dc3a3b49 .45s cubic-bezier(.23,1,.32,1) forwards}.first-toast-leave-active[data-v-dc3a3b49]{transition:all .25s ease-in}.first-toast-leave-to[data-v-dc3a3b49]{opacity:0;transform:scale(.98)}@keyframes first-toast-in-dc3a3b49{0%{opacity:var(--entrance-opacity, .6);transform:translateY(var(--entrance-offset, 25px)) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.stack-toast-enter-active[data-v-dc3a3b49],.stack-toast-leave-active[data-v-dc3a3b49]{transition:all .3s cubic-bezier(.16,1,.3,1)}.stack-toast-enter-from[data-v-dc3a3b49]{opacity:0;transform:scale(.95) translateY(10px)}.stack-toast-leave-to[data-v-dc3a3b49]{opacity:0;transform:scale(.95)}.stack-toast-move[data-v-dc3a3b49]{transition:transform .4s cubic-bezier(.16,1,.3,1)}.command-palette-content[data-v-e919f56b] ::-webkit-scrollbar{width:4px}.command-palette-content[data-v-e919f56b] ::-webkit-scrollbar-track{background:transparent}.command-palette-content[data-v-e919f56b] ::-webkit-scrollbar-thumb{background:var(--border);border-radius:9999px}
|
|
897
|
+
input[data-v-66452678]::-webkit-outer-spin-button,input[data-v-66452678]::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0}input[type=number][data-v-66452678]{-moz-appearance:textfield;appearance:textfield}@keyframes onAutoFillStart{0%{opacity:1}to{opacity:1}}@keyframes onAutoFillCancel{0%{opacity:1}to{opacity:1}}input.autofill-detect:-webkit-autofill{animation-name:onAutoFillStart;animation-duration:1ms;animation-fill-mode:both}input.autofill-detect:not(:-webkit-autofill){animation-name:onAutoFillCancel;animation-duration:1ms;animation-fill-mode:both}.blink-bg[data-v-d2085008]{animation:blink-animation-d2085008 1s infinite}@keyframes blink-animation-d2085008{0%{background-color:inherit}15%{background-color:var(--color-gray-250)}35%{background-color:inherit}75%{background-color:var(--color-gray-250)}to{background-color:inherit}}.IroBox{border-radius:8px!important}.custom-fields-table[data-v-112b16b5] .form-field-item{margin-bottom:0!important;height:100%}.custom-fields-table[data-v-112b16b5] input,.custom-fields-table[data-v-112b16b5] textarea{padding-left:1em;padding-right:.5em}.custom-fields-table[data-v-112b16b5] input,.custom-fields-table[data-v-112b16b5] textarea,.custom-fields-table[data-v-112b16b5] select,.custom-fields-table[data-v-112b16b5] .input-wrapper,.custom-fields-table[data-v-112b16b5] .tooltip-trigger button{border:none!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;height:100%!important;min-height:40px}.custom-fields-table[data-v-112b16b5] .tooltip-trigger button{justify-content:space-between!important}.custom-fields-table[data-v-112b16b5] input:focus,.custom-fields-table[data-v-112b16b5] textarea:focus,.custom-fields-table[data-v-112b16b5] select:focus,.custom-fields-table[data-v-112b16b5] .input-wrapper:focus-within{background-color:hsla(var(--primary) / .03)!important;box-shadow:inset 0 0 0 2px hsla(var(--primary) / .1)!important}.custom-fields-table[data-v-112b16b5] .w-full{width:100%;height:100%}.list-enter-active[data-v-112b16b5]{transition:all .15s cubic-bezier(.16,1,.3,1)}.list-enter-from[data-v-112b16b5]{opacity:0;transform:translateY(-5px)}.form-field-item[data-v-a86554e2]{display:flex;flex-direction:column}.form-field-item[data-v-a86554e2]:has([role=switch]),.form-field-item[data-v-a86554e2]:has([role=checkbox]){flex-direction:row;align-items:center;justify-content:flex-start}.form-container[data-v-1a2b21d0]{width:100%}.custom-scrollbar[data-v-3849c10a]::-webkit-scrollbar{width:0px}.custom-scrollbar[data-v-3849c10a]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-3849c10a]::-webkit-scrollbar-thumb{background-color:var(--color-border);border-radius:10px}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar{height:8px}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar-thumb{background-color:var(--color-border);border-radius:10px}.navbar-tabs-no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.navbar-tabs-no-scrollbar::-webkit-scrollbar{display:none}.fade-x-enter-active,.fade-x-leave-active{transition:opacity .15s ease}.fade-x-enter-from,.fade-x-leave-to{opacity:0}.breadcrumb-item[data-v-ecb5df7c]{display:inline-flex;align-items:center;cursor:pointer}.breadcrumb-link[data-v-ecb5df7c]{display:inline-flex;align-items:center;gap:.35em;color:var(--color-muted-foreground);text-decoration:none;transition:color .15s ease,background-color .15s ease;border-radius:var(--radius-sm)}.breadcrumb-link[data-v-ecb5df7c]:not(.current):not(.disabled):hover{color:var(--color-foreground)}.breadcrumb-link.current[data-v-ecb5df7c]{color:var(--color-foreground);font-weight:600;cursor:default}.breadcrumb-link.disabled[data-v-ecb5df7c]{opacity:.45;cursor:not-allowed;pointer-events:none}.breadcrumb-icon[data-v-ecb5df7c]{flex-shrink:0}.breadcrumb-list[data-v-12cf2491]{display:flex;flex-wrap:wrap;align-items:center;list-style:none;margin:0;padding:0;gap:.45em}.breadcrumb--sm[data-v-12cf2491]{font-size:var(--text--fs-2)}.breadcrumb--md[data-v-12cf2491]{font-size:var(--text-fs-0.5, 1em)}.breadcrumb--lg[data-v-12cf2491]{font-size:var(--text-fs-2)}.breadcrumb-separator[data-v-12cf2491]{display:inline-flex;align-items:center;color:var(--color-gray-500);-webkit-user-select:none;user-select:none;font-size:.9em;line-height:1;padding:0 .1em}.breadcrumb-ellipsis[data-v-12cf2491]{display:inline-flex;align-items:center}.breadcrumb-ellipsis-btn[data-v-12cf2491]{display:inline-flex;align-items:center;justify-content:center;width:1.6em;height:1.6em;border-radius:var(--radius-sm);border:1px solid var(--color-border);background:transparent;color:var(--color-muted-foreground);cursor:pointer;font-size:.9em;line-height:1;letter-spacing:.05em;transition:all .15s ease}.breadcrumb-ellipsis-btn[data-v-12cf2491]:hover{background:var(--color-accent);color:var(--color-foreground);border-color:var(--color-gray-350)}.breadcrumb--contained[data-v-12cf2491]{background:var(--color-secondary);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:.45em 1em}.breadcrumb--pills[data-v-12cf2491] .breadcrumb-link{padding:.2em .7em;border-radius:9999px;background:var(--color-secondary);border:1px solid var(--color-border)}.breadcrumb--pills[data-v-12cf2491] .breadcrumb-link:not(.current):not(.disabled):hover{background:var(--color-accent);border-color:var(--color-gray-350)}.breadcrumb--pills[data-v-12cf2491] .breadcrumb-link.current{background:var(--color-primary);color:var(--color-primary-foreground);border-color:var(--color-primary)}.breadcrumb--arrow .breadcrumb-list[data-v-12cf2491]{gap:0}.breadcrumb--arrow[data-v-12cf2491] .breadcrumb-link{padding:.35em .9em .35em 1.4em;background:var(--color-secondary);clip-path:polygon(0 0,calc(100% - .6em) 0,100% 50%,calc(100% - .6em) 100%,0 100%,.6em 50%);border:none;margin-left:-.3em}.breadcrumb--arrow[data-v-12cf2491] .breadcrumb-item:first-child .breadcrumb-link{padding-left:.9em;clip-path:polygon(0 0,calc(100% - .6em) 0,100% 50%,calc(100% - .6em) 100%,0 100%);border-radius:var(--radius-sm) 0 0 var(--radius-sm);margin-left:0}.breadcrumb--arrow[data-v-12cf2491] .breadcrumb-link:not(.current):not(.disabled):hover{background:var(--color-accent)}.breadcrumb--arrow[data-v-12cf2491] .breadcrumb-link.current{background:var(--color-primary);color:var(--color-primary-foreground)}.breadcrumb--arrow .breadcrumb-separator[data-v-12cf2491]{display:none}.heatmap-container[data-v-00476f00]{width:100%;height:100%;display:flex;flex-direction:column;min-height:0}.heatmap-wrapper[data-v-00476f00]{width:100%;height:100%;overflow:auto;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;position:relative}.heatmap-grid[data-v-00476f00]{width:fit-content;height:fit-content;transition:all .2s ease-in-out}.heatmap-cell[data-v-00476f00]{aspect-ratio:1 / 1;border-radius:2px;transition:all .15s ease-in-out;border:1px solid transparent;box-sizing:border-box}.heatmap-cell-interactive[data-v-00476f00]{cursor:pointer}.heatmap-cell-interactive[data-v-00476f00]:hover{transform:scale(1.1);border-color:var(--border);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;z-index:10;position:relative}.heatmap-cell-empty[data-v-00476f00]{opacity:.6}.heatmap-cell-hovered[data-v-00476f00]{outline:2px solid var(--primary);outline-offset:1px}.heatmap-cell-label[data-v-00476f00]{font-size:8px;font-weight:500;color:var(--foreground);opacity:.8;display:flex;align-items:center;justify-content:center;height:100%;width:100%;pointer-events:none}.heatmap-legend[data-v-00476f00]{display:flex;align-items:center;gap:.5rem;margin-top:1rem;font-size:.75rem;color:var(--muted-foreground);flex-shrink:0}.heatmap-legend-label[data-v-00476f00]{font-weight:500}.heatmap-legend-colors[data-v-00476f00]{display:flex;gap:.125rem}.heatmap-legend-item[data-v-00476f00]{width:.75rem;height:.75rem;border-radius:.375rem;border:1px solid var(--border)}@media(max-width:640px){.heatmap-wrapper[data-v-00476f00]{padding:12px}.heatmap-cell[data-v-00476f00]{border-radius:2px}.heatmap-cell-label[data-v-00476f00]{font-size:7px}}@media(min-width:641px)and (max-width:1023px){.heatmap-wrapper[data-v-00476f00]{padding:14px}.heatmap-cell[data-v-00476f00]{border-radius:2px}}@media(min-width:1024px){.heatmap-wrapper[data-v-00476f00]{padding:16px}.heatmap-cell[data-v-00476f00]{border-radius:3px}}.masonry-item[data-v-c29d0159]{content-visibility:auto;contain-intrinsic-size:1px 200px}.carousel-wrapper[data-v-655a78c8]{width:100%;position:relative}.accordion-enter-active[data-v-aa189e08],.accordion-leave-active[data-v-aa189e08]{transition:height .3s ease-in-out}.sidebar-manu-item .tooltip-trigger{width:100%!important}.sidebar-menu-tooltip{margin-left:4px!important}[dir=rtl] .sidebar-menu-tooltip{margin-right:4px!important}.bg-stripe[data-v-454a1505]{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.animate-progress-stripe[data-v-454a1505]{animation:progress-stripe-454a1505 1s linear infinite}@keyframes progress-stripe-454a1505{0%{background-position:1rem 0}to{background-position:0 0}}.animate-progress-indeterminate[data-v-454a1505]{animation:progress-indeterminate-454a1505 1.5s infinite cubic-bezier(.65,.815,.735,.395)}@keyframes progress-indeterminate-454a1505{0%{transform:translate(-100%) scaleX(.2)}50%{transform:translate(0) scaleX(.5)}to{transform:translate(100%) scaleX(.2)}}.permission-matrix-wrapper[data-v-09b401c2]{max-height:70vh}.permission-matrix-wrapper[data-v-09b401c2]::-webkit-scrollbar{width:6px;height:6px}.permission-matrix-wrapper[data-v-09b401c2]::-webkit-scrollbar-track{background:transparent}.permission-matrix-wrapper[data-v-09b401c2]::-webkit-scrollbar-thumb{background:var(--color-gray-350);border-radius:3px}.permission-matrix-wrapper[data-v-09b401c2]::-webkit-scrollbar-thumb:hover{background:var(--color-gray-400)}.permission-list-wrapper[data-v-fc14e574]{border:1px solid var(--color-border);border-radius:.5rem;overflow:hidden;background-color:var(--color-background)}.custom-list-header[data-v-fc14e574]{background-color:var(--color-muted);border-bottom:1px solid var(--color-border);padding:var(--cell-py) var(--cell-px)}.custom-list-group-content .custom-list-item[data-v-fc14e574]{border-bottom:1px solid var(--color-border);padding:var(--cell-py) var(--cell-px);background-color:var(--color-background)}.custom-list-group-content .custom-list-item[data-v-fc14e574]:hover{background-color:var(--color-accent)}.custom-list-group-content .custom-list-item[data-v-fc14e574]:last-child{border-bottom:none}.custom-list-group-content+.custom-list-header[data-v-fc14e574],.custom-list-header+.custom-list-header[data-v-fc14e574]{border-top:1px solid var(--color-border)}.permission-list-wrapper>.custom-list-header[data-v-fc14e574]:last-child{border-bottom:none}.permission-matrix-wrapper[data-v-e9fed8ed]{border:1px solid var(--color-border);background-color:var(--color-gray-100);border-radius:.5rem;overflow:auto}.custom-table[data-v-e9fed8ed]{width:100%;border-collapse:collapse}.custom-th[data-v-e9fed8ed]{background-color:var(--color-gray-150);color:var(--color-foreground);border-bottom:1px solid var(--color-border);border-left:1px solid var(--color-border);padding:var(--cell-py) var(--cell-px);text-align:left;font-weight:600;min-width:200px}.custom-th.text-center[data-v-e9fed8ed]{text-align:center;min-width:100px}.custom-th[data-v-e9fed8ed]:first-child{border-left:none}.custom-td[data-v-e9fed8ed]{border-bottom:1px solid var(--color-border);border-left:1px solid var(--color-border);padding:var(--cell-py) var(--cell-px)}.custom-td.text-center[data-v-e9fed8ed]{text-align:center}.custom-td[data-v-e9fed8ed]:first-child{border-left:none}.custom-group-row td[data-v-e9fed8ed]{background-color:var(--color-gray-100);border-top:1px solid var(--color-border);border-bottom:1px solid var(--color-border)}.custom-entity-row[data-v-e9fed8ed]{background-color:var(--color-background);transition:background-color .1s ease}.custom-entity-row[data-v-e9fed8ed]:hover{background-color:var(--color-gray-50)}.custom-entity-row:last-child td[data-v-e9fed8ed]{border-bottom:none}.custom-active-cell[data-v-e9fed8ed]{cursor:pointer}.custom-active-cell[data-v-e9fed8ed]:hover{background-color:var(--color-accent)}.button-group[data-v-ba735fac] button{align-self:stretch;height:auto!important;min-height:unset!important;min-width:unset!important;width:auto!important}.button-group[data-v-ba735fac]:not(.vertical-group) button{aspect-ratio:unset}.attached-group[data-v-ba735fac] button{position:relative;--radius: .375rem}.attached-group[data-v-ba735fac] button:focus-visible,.attached-group[data-v-ba735fac] button:hover{z-index:10}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child){margin-left:-1px}.attached-group[data-v-ba735fac]:not(.vertical-group) button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius);border-top-right-radius:0;border-bottom-right-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child):not(:last-child){border-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-bottom-left-radius:0}.vertical-group[data-v-ba735fac] button:not(:first-child){margin-top:-1px}.vertical-group[data-v-ba735fac] button:first-child{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.vertical-group[data-v-ba735fac] button:not(:first-child):not(:last-child){border-radius:0}.vertical-group[data-v-ba735fac] button:last-child{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-top-right-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child):not(.border):before{content:"";position:absolute;left:0;top:0;bottom:0;width:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none;height:100%}.vertical-group[data-v-ba735fac] button:not(:first-child):not(.border):before{content:"";position:absolute;top:0;left:0;right:0;height:1px;width:100%;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none}.first-toast-enter-active[data-v-dc3a3b49]{animation:first-toast-in-dc3a3b49 .45s cubic-bezier(.23,1,.32,1) forwards}.first-toast-leave-active[data-v-dc3a3b49]{transition:all .25s ease-in}.first-toast-leave-to[data-v-dc3a3b49]{opacity:0;transform:scale(.98)}@keyframes first-toast-in-dc3a3b49{0%{opacity:var(--entrance-opacity, .6);transform:translateY(var(--entrance-offset, 25px)) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.stack-toast-enter-active[data-v-dc3a3b49],.stack-toast-leave-active[data-v-dc3a3b49]{transition:all .3s cubic-bezier(.16,1,.3,1)}.stack-toast-enter-from[data-v-dc3a3b49]{opacity:0;transform:scale(.95) translateY(10px)}.stack-toast-leave-to[data-v-dc3a3b49]{opacity:0;transform:scale(.95)}.stack-toast-move[data-v-dc3a3b49]{transition:transform .4s cubic-bezier(.16,1,.3,1)}.cp-item-transition[data-v-66b1ae06]{transition:background-color 80ms ease,color 80ms ease}.command-palette-content[data-v-1ace469f] ::-webkit-scrollbar{width:4px}.command-palette-content[data-v-1ace469f] ::-webkit-scrollbar-track{background:transparent}.command-palette-content[data-v-1ace469f] ::-webkit-scrollbar-thumb{background:var(--border);border-radius:9999px}.cp-scroll-container[data-v-1ace469f]{transform:translateZ(0);will-change:transform;touch-action:pan-y;backface-visibility:hidden}
|
|
898
898
|
|
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Z, computed as c, ref as _, watch as ee, onMounted as te, nextTick as G, openBlock as u, createElementBlock as f, createElementVNode as s, createVNode as w, withDirectives as oe, vModelText as ne, createTextVNode as I, toDisplayString as i, createCommentVNode as b, Fragment as P, renderList as O, normalizeClass as T, createBlock as re } from "vue";
|
|
2
|
-
import { useRouter as le } from "vue-router";
|
|
3
|
-
import h from "./Icon.vue.js";
|
|
4
|
-
import { $t as C } from "../utils/i18n.js";
|
|
5
|
-
const se = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, ae = { class: "flex items-center gap-3 px-4 py-3.5 border-b border-border/60 shrink-0" }, ce = ["placeholder", "aria-activedescendant"], ie = ["aria-label"], de = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
|
|
8
|
-
"aria-live": "polite"
|
|
9
|
-
}, ue = { class: "text-sm font-medium text-muted-foreground" }, fe = { class: "text-foreground font-semibold" }, pe = { class: "text-xs text-muted-foreground/60 mt-1" }, me = ["aria-label"], xe = ["aria-label"], ve = ["id", "aria-selected", "aria-disabled", "data-active", "onClick", "onMouseenter"], be = { class: "flex-1 min-w-0" }, he = { class: "block font-medium truncate text-inherit leading-tight" }, ge = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "block text-xs text-muted-foreground/70 truncate mt-0.5"
|
|
12
|
-
}, ye = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "shrink-0 hidden sm:inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono border border-border/60 bg-background/80 text-muted-foreground ml-1"
|
|
15
|
-
}, ke = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "my-1.5 mx-3 h-px bg-border/40",
|
|
18
|
-
"aria-hidden": "true"
|
|
19
|
-
}, _e = {
|
|
20
|
-
class: "px-4 py-2.5 border-t border-border/40 flex items-center gap-4 shrink-0 bg-muted/30",
|
|
21
|
-
"aria-hidden": "true"
|
|
22
|
-
}, we = { class: "flex items-center gap-1 text-[11px] text-muted-foreground/60" }, Ie = { class: "flex items-center gap-1 text-[11px] text-muted-foreground/60" }, Ce = { class: "flex items-center gap-1 text-[11px] text-muted-foreground/60" }, Me = { class: "ml-auto text-[11px] text-muted-foreground/50" }, Be = /* @__PURE__ */ Z({
|
|
23
|
-
__name: "CommandPaletteContent",
|
|
24
|
-
props: {
|
|
25
|
-
close: { type: Function },
|
|
26
|
-
items: {},
|
|
27
|
-
menuItems: {},
|
|
28
|
-
placeholder: {},
|
|
29
|
-
placeholderI18n: {},
|
|
30
|
-
maxResultsPerGroup: {},
|
|
31
|
-
onOpenDynamicModal: { type: Function }
|
|
32
|
-
},
|
|
33
|
-
setup(M) {
|
|
34
|
-
const d = M, p = (t, o) => {
|
|
35
|
-
const n = C(t);
|
|
36
|
-
return n !== t ? n : o;
|
|
37
|
-
}, j = c(() => {
|
|
38
|
-
if (d.placeholderI18n) {
|
|
39
|
-
const t = C(d.placeholderI18n);
|
|
40
|
-
if (t !== d.placeholderI18n) return t;
|
|
41
|
-
}
|
|
42
|
-
return d.placeholder;
|
|
43
|
-
}), z = c(() => p("vlite.commandPalette.noResults", "No results for")), L = c(
|
|
44
|
-
() => p("vlite.commandPalette.noResultsDesc", "Try a different term or browse with arrow keys")
|
|
45
|
-
), K = c(() => p("vlite.commandPalette.navigate", "Navigate")), U = c(() => p("vlite.commandPalette.open", "Open")), W = c(() => p("vlite.commandPalette.close", "Close")), R = c(() => p("vlite.commandPalette.result", "result")), D = c(() => p("vlite.commandPalette.results", "results"));
|
|
46
|
-
function N(t) {
|
|
47
|
-
if (t.labelI18n) {
|
|
48
|
-
const o = C(t.labelI18n);
|
|
49
|
-
if (o !== t.labelI18n) return o;
|
|
50
|
-
}
|
|
51
|
-
return t.label;
|
|
52
|
-
}
|
|
53
|
-
function B(t) {
|
|
54
|
-
if (t.descriptionI18n) {
|
|
55
|
-
const o = C(t.descriptionI18n);
|
|
56
|
-
if (o !== t.descriptionI18n) return o;
|
|
57
|
-
}
|
|
58
|
-
return t.description ?? "";
|
|
59
|
-
}
|
|
60
|
-
const v = _(""), a = _(0), $ = _(null), S = _(null), H = le();
|
|
61
|
-
function E(t) {
|
|
62
|
-
return typeof t == "function" ? t() : t !== void 0 ? t : !0;
|
|
63
|
-
}
|
|
64
|
-
function V(t, o, n = 0) {
|
|
65
|
-
const r = [];
|
|
66
|
-
for (const e of t) {
|
|
67
|
-
if (!E(e.show)) continue;
|
|
68
|
-
const l = n === 0 ? e.label : o ?? "Navigation";
|
|
69
|
-
(e.to || e.href || e.action || e.modalBody) && r.push({
|
|
70
|
-
...e,
|
|
71
|
-
id: e.id ?? e.to ?? e.label ?? Math.random().toString(),
|
|
72
|
-
group: e.group ?? l
|
|
73
|
-
}), e.children?.length && r.push(...V(e.children, l, n + 1));
|
|
74
|
-
}
|
|
75
|
-
return r;
|
|
76
|
-
}
|
|
77
|
-
function q(t, o, n = 0) {
|
|
78
|
-
const r = [];
|
|
79
|
-
for (const e of t) {
|
|
80
|
-
if (!E(e.show)) continue;
|
|
81
|
-
const l = n === 0 ? e.label : o ?? "Navigation";
|
|
82
|
-
(e.to || e.href || e.action || e.modalBody) && r.push({
|
|
83
|
-
id: e.id ?? (typeof e.to == "string" ? e.to : "") ?? e.label ?? Math.random().toString(),
|
|
84
|
-
label: e.label,
|
|
85
|
-
labelI18n: e.labelI18n,
|
|
86
|
-
icon: e.icon,
|
|
87
|
-
group: e.group ?? l,
|
|
88
|
-
to: typeof e.to == "string" ? e.to : e.to?.path,
|
|
89
|
-
href: e.href,
|
|
90
|
-
action: e.action ? () => e.action(e) : void 0,
|
|
91
|
-
disabled: e.disabled,
|
|
92
|
-
modalBody: e.modalBody,
|
|
93
|
-
modalProps: e.modalProps
|
|
94
|
-
}), e.children?.length && r.push(...q(e.children, l, n + 1));
|
|
95
|
-
}
|
|
96
|
-
return r;
|
|
97
|
-
}
|
|
98
|
-
const J = c(() => {
|
|
99
|
-
const t = q(d.menuItems || []), o = V(d.items || []), n = /* @__PURE__ */ new Set(), r = [];
|
|
100
|
-
for (const e of [...o, ...t])
|
|
101
|
-
e.id && !n.has(e.id) && (n.add(e.id), r.push(e));
|
|
102
|
-
return r;
|
|
103
|
-
});
|
|
104
|
-
function g(t) {
|
|
105
|
-
return t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
106
|
-
}
|
|
107
|
-
function Q(t, o) {
|
|
108
|
-
const n = g(N(t)), r = g(B(t)), e = (t.keywords ?? []).map(g).join(" "), l = g(o);
|
|
109
|
-
return n === l ? 100 : n.startsWith(l) ? 80 : n.includes(l) ? 60 : r.includes(l) || e.includes(l) ? 40 : 0;
|
|
110
|
-
}
|
|
111
|
-
const y = c(() => {
|
|
112
|
-
const t = v.value.trim();
|
|
113
|
-
let o = J.value.filter((e) => !e.disabled);
|
|
114
|
-
t && (o = o.map((e) => ({ item: e, s: Q(e, t) })).filter(({ s: e }) => e > 0).sort((e, l) => l.s - e.s).map(({ item: e }) => e));
|
|
115
|
-
const n = /* @__PURE__ */ new Map();
|
|
116
|
-
for (const e of o) {
|
|
117
|
-
const l = e.group ?? "Actions";
|
|
118
|
-
n.has(l) || n.set(l, []), n.get(l).push(e);
|
|
119
|
-
}
|
|
120
|
-
const r = [];
|
|
121
|
-
for (const [e, l] of n)
|
|
122
|
-
r.push({
|
|
123
|
-
key: e,
|
|
124
|
-
label: e,
|
|
125
|
-
items: l.slice(0, d.maxResultsPerGroup)
|
|
126
|
-
});
|
|
127
|
-
return r;
|
|
128
|
-
}), k = c(() => y.value.flatMap((t) => t.items)), m = c(() => k.value.length), X = (t) => {
|
|
129
|
-
if (t.key === "Escape") {
|
|
130
|
-
d.close();
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
if (t.key === "ArrowDown") {
|
|
134
|
-
t.preventDefault(), a.value = Math.min(a.value + 1, m.value - 1), A();
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
if (t.key === "ArrowUp") {
|
|
138
|
-
t.preventDefault(), a.value = Math.max(a.value - 1, 0), A();
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
if (t.key === "Enter") {
|
|
142
|
-
t.preventDefault();
|
|
143
|
-
const o = k.value[a.value];
|
|
144
|
-
o && F(o);
|
|
145
|
-
}
|
|
146
|
-
}, A = () => {
|
|
147
|
-
G(() => {
|
|
148
|
-
S.value?.querySelector('[data-active="true"]')?.scrollIntoView({ block: "nearest" });
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
ee(v, () => {
|
|
152
|
-
a.value = 0;
|
|
153
|
-
});
|
|
154
|
-
const F = (t) => {
|
|
155
|
-
if (!t.disabled) {
|
|
156
|
-
if (d.close(), t.modalBody) {
|
|
157
|
-
d.onOpenDynamicModal(t.modalBody, t.modalProps);
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
if (t.action) {
|
|
161
|
-
t.action();
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
if (t.to) {
|
|
165
|
-
H.push(t.to).catch(() => {
|
|
166
|
-
});
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
t.href && window.open(t.href, "_blank", "noopener,noreferrer");
|
|
170
|
-
}
|
|
171
|
-
}, x = (t, o) => {
|
|
172
|
-
let n = 0;
|
|
173
|
-
for (let r = 0; r < t; r++)
|
|
174
|
-
n += y.value[r].items.length;
|
|
175
|
-
return n + o;
|
|
176
|
-
};
|
|
177
|
-
return te(() => {
|
|
178
|
-
G(() => {
|
|
179
|
-
$.value?.focus();
|
|
180
|
-
});
|
|
181
|
-
}), (t, o) => (u(), f("div", se, [
|
|
182
|
-
s("div", ae, [
|
|
183
|
-
w(h, {
|
|
184
|
-
icon: "lucide:search",
|
|
185
|
-
class: "w-4 h-4 text-muted-foreground shrink-0"
|
|
186
|
-
}),
|
|
187
|
-
oe(s("input", {
|
|
188
|
-
ref_key: "inputRef",
|
|
189
|
-
ref: $,
|
|
190
|
-
"onUpdate:modelValue": o[0] || (o[0] = (n) => v.value = n),
|
|
191
|
-
type: "text",
|
|
192
|
-
autocomplete: "off",
|
|
193
|
-
autocorrect: "off",
|
|
194
|
-
spellcheck: "false",
|
|
195
|
-
placeholder: j.value,
|
|
196
|
-
class: "flex-1 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/60 outline-none min-w-0",
|
|
197
|
-
"aria-autocomplete": "list",
|
|
198
|
-
"aria-activedescendant": k.value[a.value] ? `cp-item-${k.value[a.value].id}` : void 0,
|
|
199
|
-
"aria-controls": "cp-listbox",
|
|
200
|
-
onKeydown: X
|
|
201
|
-
}, null, 40, ce), [
|
|
202
|
-
[ne, v.value]
|
|
203
|
-
]),
|
|
204
|
-
s("button", {
|
|
205
|
-
type: "button",
|
|
206
|
-
class: "shrink-0 p-1 rounded text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
|
|
207
|
-
"aria-label": "Close",
|
|
208
|
-
tabindex: "-1",
|
|
209
|
-
onClick: o[1] || (o[1] = //@ts-ignore
|
|
210
|
-
(...n) => M.close && M.close(...n))
|
|
211
|
-
}, [
|
|
212
|
-
w(h, {
|
|
213
|
-
icon: "lucide:x",
|
|
214
|
-
class: "w-3.5 h-3.5"
|
|
215
|
-
})
|
|
216
|
-
])
|
|
217
|
-
]),
|
|
218
|
-
s("div", {
|
|
219
|
-
id: "cp-listbox",
|
|
220
|
-
ref_key: "listRef",
|
|
221
|
-
ref: S,
|
|
222
|
-
role: "listbox",
|
|
223
|
-
class: "flex-1 overflow-y-auto py-2 scrollbar-thin",
|
|
224
|
-
"aria-label": `${m.value} ${m.value === 1 ? R.value : D.value}`
|
|
225
|
-
}, [
|
|
226
|
-
m.value === 0 ? (u(), f("div", de, [
|
|
227
|
-
w(h, {
|
|
228
|
-
icon: "lucide:search-x",
|
|
229
|
-
class: "w-9 h-9 text-muted-foreground/40 mb-3"
|
|
230
|
-
}),
|
|
231
|
-
s("p", ue, [
|
|
232
|
-
I(i(z.value) + " ", 1),
|
|
233
|
-
s("span", fe, '"' + i(v.value) + '"', 1)
|
|
234
|
-
]),
|
|
235
|
-
s("p", pe, i(L.value), 1)
|
|
236
|
-
])) : b("", !0),
|
|
237
|
-
(u(!0), f(P, null, O(y.value, (n, r) => (u(), f(P, {
|
|
238
|
-
key: n.key
|
|
239
|
-
}, [
|
|
240
|
-
s("div", {
|
|
241
|
-
class: "px-4 py-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60 select-none",
|
|
242
|
-
"aria-label": `Group: ${n.label}`
|
|
243
|
-
}, i(n.label), 9, me),
|
|
244
|
-
s("div", {
|
|
245
|
-
role: "group",
|
|
246
|
-
"aria-label": n.label,
|
|
247
|
-
class: "px-2"
|
|
248
|
-
}, [
|
|
249
|
-
(u(!0), f(P, null, O(n.items, (e, l) => (u(), f("button", {
|
|
250
|
-
key: e.id,
|
|
251
|
-
id: `cp-item-${e.id}`,
|
|
252
|
-
type: "button",
|
|
253
|
-
role: "option",
|
|
254
|
-
"aria-selected": x(r, l) === a.value,
|
|
255
|
-
"aria-disabled": e.disabled || void 0,
|
|
256
|
-
"data-active": x(r, l) === a.value,
|
|
257
|
-
class: T(["command-palette-item w-full flex items-center gap-3 px-3! py-2.5 mx-1 rounded-lg text-sm transition-colors duration-100 text-left cursor-pointer select-none focus-visible:outline-none", [
|
|
258
|
-
x(r, l) === a.value ? "bg-gray-200/80 text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
|
|
259
|
-
e.disabled ? "opacity-40 cursor-not-allowed" : ""
|
|
260
|
-
]]),
|
|
261
|
-
style: { width: "calc(100% - 8px)" },
|
|
262
|
-
onClick: (Y) => F(e),
|
|
263
|
-
onMouseenter: (Y) => a.value = x(r, l)
|
|
264
|
-
}, [
|
|
265
|
-
s("span", {
|
|
266
|
-
class: T([
|
|
267
|
-
"shrink-0 flex items-center justify-center w-7 h-7 rounded-md",
|
|
268
|
-
x(r, l) === a.value ? "bg-gray-300/80 text-gray-900" : "bg-muted/80 text-muted-foreground"
|
|
269
|
-
])
|
|
270
|
-
}, [
|
|
271
|
-
w(h, {
|
|
272
|
-
icon: e.icon ?? "lucide:arrow-right",
|
|
273
|
-
class: "w-3.5 h-3.5"
|
|
274
|
-
}, null, 8, ["icon"])
|
|
275
|
-
], 2),
|
|
276
|
-
s("span", be, [
|
|
277
|
-
s("span", he, i(N(e)), 1),
|
|
278
|
-
e.description || e.descriptionI18n ? (u(), f("span", ge, i(B(e)), 1)) : b("", !0)
|
|
279
|
-
]),
|
|
280
|
-
e.href ? (u(), re(h, {
|
|
281
|
-
key: 0,
|
|
282
|
-
icon: "lucide:external-link",
|
|
283
|
-
class: "shrink-0 w-3 h-3 text-muted-foreground/50"
|
|
284
|
-
})) : b("", !0),
|
|
285
|
-
x(r, l) === a.value ? (u(), f("kbd", ye, " ↵ ")) : b("", !0)
|
|
286
|
-
], 42, ve))), 128))
|
|
287
|
-
], 8, xe),
|
|
288
|
-
r < y.value.length - 1 ? (u(), f("div", ke)) : b("", !0)
|
|
289
|
-
], 64))), 128))
|
|
290
|
-
], 8, ie),
|
|
291
|
-
s("div", _e, [
|
|
292
|
-
s("span", we, [
|
|
293
|
-
o[2] || (o[2] = s("kbd", { class: "px-1 rounded border border-border/60 bg-background text-[10px]" }, "↑↓", -1)),
|
|
294
|
-
I(" " + i(K.value), 1)
|
|
295
|
-
]),
|
|
296
|
-
s("span", Ie, [
|
|
297
|
-
o[3] || (o[3] = s("kbd", { class: "px-1 rounded border border-border/60 bg-background text-[10px]" }, "↵", -1)),
|
|
298
|
-
I(" " + i(U.value), 1)
|
|
299
|
-
]),
|
|
300
|
-
s("span", Ce, [
|
|
301
|
-
o[4] || (o[4] = s("kbd", { class: "px-1 rounded border border-border/60 bg-background text-[10px]" }, "Esc", -1)),
|
|
302
|
-
I(" " + i(W.value), 1)
|
|
303
|
-
]),
|
|
304
|
-
s("span", Me, i(m.value) + " " + i(m.value === 1 ? R.value : D.value), 1)
|
|
305
|
-
])
|
|
306
|
-
]));
|
|
307
|
-
}
|
|
308
|
-
});
|
|
309
|
-
export {
|
|
310
|
-
Be as default
|
|
311
|
-
};
|