vlite3 0.5.7 → 0.5.9
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/Badge.vue.d.ts +3 -3
- package/components/Badge.vue.js +27 -16
- package/components/Breadcrumb/Breadcrumb.vue.js +2 -2
- package/components/Chip/Chip.vue.d.ts +6 -3
- package/components/Chip/Chip.vue.js +48 -40
- package/components/CommandPaletteContent.vue.d.ts +1 -0
- package/components/CommandPaletteContent.vue.js +1 -1
- package/components/CommandPaletteContent.vue2.js +129 -105
- package/components/NavbarCommandPalette.vue.d.ts +7 -2
- package/components/NavbarCommandPalette.vue.js +52 -43
- package/components/PermissionMatrix/PermissionMatrix.vue.js +2 -2
- package/components/Screen/Screen.vue.js +35 -34
- package/components/StatusChip/StatusChip.vue.d.ts +21 -0
- package/components/StatusChip/StatusChip.vue.js +28 -0
- package/components/StatusChip/StatusChip.vue2.js +4 -0
- package/components/StatusChip/index.d.ts +3 -0
- package/components/StatusChip/status-map.d.ts +23 -0
- package/components/StatusChip/status-map.js +112 -0
- package/index.d.ts +1 -0
- package/index.js +101 -95
- package/package.json +1 -1
- package/style.css +184 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type BadgeVariant = 'default' | 'secondary' | 'danger' | 'outline' | 'warning' | 'info' | 'success';
|
|
1
|
+
export type BadgeVariant = 'default' | 'secondary' | 'danger' | 'outline' | 'warning' | 'info' | 'success' | 'purple' | 'teal' | 'indigo' | 'orange' | 'pink' | 'cyan';
|
|
2
2
|
interface Props {
|
|
3
|
-
variant?: BadgeVariant;
|
|
3
|
+
variant?: BadgeVariant | string;
|
|
4
4
|
class?: string;
|
|
5
5
|
}
|
|
6
6
|
declare function __VLS_template(): {
|
|
@@ -13,7 +13,7 @@ declare function __VLS_template(): {
|
|
|
13
13
|
};
|
|
14
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
15
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
16
|
-
variant: BadgeVariant;
|
|
16
|
+
variant: BadgeVariant | string;
|
|
17
17
|
class: string;
|
|
18
18
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
19
19
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
package/components/Badge.vue.js
CHANGED
|
@@ -1,27 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as b, computed as n, openBlock as a, createElementBlock as l, normalizeClass as u, renderSlot as d } from "vue";
|
|
2
|
+
const c = /* @__PURE__ */ b({
|
|
3
3
|
__name: "Badge",
|
|
4
4
|
props: {
|
|
5
5
|
variant: { default: "default" },
|
|
6
6
|
class: { default: "" }
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
setup(o) {
|
|
9
|
+
const t = o, s = n(() => {
|
|
10
|
+
const e = "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", r = {
|
|
11
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
12
|
+
outline: "text-foreground border-border",
|
|
13
|
+
/* Base Semantics */
|
|
14
|
+
secondary: "border-secondary-subtle-border bg-secondary-subtle text-secondary-subtle-fg hover:opacity-80",
|
|
15
|
+
danger: "border-danger-subtle-border bg-danger-subtle text-danger-subtle-fg hover:opacity-80",
|
|
16
|
+
warning: "border-warning-subtle-border bg-warning-subtle text-warning-subtle-fg hover:opacity-80",
|
|
17
|
+
info: "border-info-subtle-border bg-info-subtle text-info-subtle-fg hover:opacity-80",
|
|
18
|
+
success: "border-success-subtle-border bg-success-subtle text-success-subtle-fg hover:opacity-80",
|
|
19
|
+
/* Extended Semantics */
|
|
20
|
+
purple: "border-purple-subtle-border bg-purple-subtle text-purple-subtle-fg hover:opacity-80",
|
|
21
|
+
teal: "border-teal-subtle-border bg-teal-subtle text-teal-subtle-fg hover:opacity-80",
|
|
22
|
+
indigo: "border-indigo-subtle-border bg-indigo-subtle text-indigo-subtle-fg hover:opacity-80",
|
|
23
|
+
orange: "border-orange-subtle-border bg-orange-subtle text-orange-subtle-fg hover:opacity-80",
|
|
24
|
+
pink: "border-pink-subtle-border bg-pink-subtle text-pink-subtle-fg hover:opacity-80",
|
|
25
|
+
cyan: "border-cyan-subtle-border bg-cyan-subtle text-cyan-subtle-fg hover:opacity-80"
|
|
26
|
+
};
|
|
27
|
+
return [e, r[t.variant] || r.default, t.class].join(" ");
|
|
28
|
+
});
|
|
29
|
+
return (e, r) => (a(), l("div", {
|
|
30
|
+
class: u(s.value)
|
|
20
31
|
}, [
|
|
21
|
-
|
|
32
|
+
d(e.$slots, "default")
|
|
22
33
|
], 2));
|
|
23
34
|
}
|
|
24
35
|
});
|
|
25
36
|
export {
|
|
26
|
-
|
|
37
|
+
c as default
|
|
27
38
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Breadcrumb.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ae18a95c"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ChipProps, ChipVariant } from './types';
|
|
2
|
+
interface ExtendedProps extends Omit<ChipProps, 'variant'> {
|
|
3
|
+
variant?: ChipVariant | string;
|
|
4
|
+
}
|
|
2
5
|
declare function __VLS_template(): {
|
|
3
6
|
attrs: Partial<{}>;
|
|
4
7
|
slots: {
|
|
@@ -9,15 +12,15 @@ declare function __VLS_template(): {
|
|
|
9
12
|
rootEl: HTMLDivElement;
|
|
10
13
|
};
|
|
11
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<ExtendedProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
13
16
|
click: (event: MouseEvent) => any;
|
|
14
17
|
delete: (event: MouseEvent) => any;
|
|
15
|
-
}, string, import('vue').PublicProps, Readonly<
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<ExtendedProps> & Readonly<{
|
|
16
19
|
onClick?: (event: MouseEvent) => any;
|
|
17
20
|
onDelete?: (event: MouseEvent) => any;
|
|
18
21
|
}>, {
|
|
19
22
|
text: string;
|
|
20
|
-
variant: ChipVariant;
|
|
23
|
+
variant: ChipVariant | string;
|
|
21
24
|
size: import('./types').ChipSize;
|
|
22
25
|
class: string;
|
|
23
26
|
disabled: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as C, computed as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as C, computed as l, openBlock as n, createElementBlock as d, normalizeClass as i, renderSlot as b, createBlock as f, createCommentVNode as c, createTextVNode as z, toDisplayString as B, withCtx as D, createVNode as I } from "vue";
|
|
2
|
+
import g from "../Icon.vue.js";
|
|
3
3
|
import S from "../Button.vue.js";
|
|
4
4
|
import { $t as N } from "../../utils/i18n.js";
|
|
5
5
|
const V = ["role", "tabindex"], j = {
|
|
@@ -8,10 +8,10 @@ const V = ["role", "tabindex"], j = {
|
|
|
8
8
|
}, E = "inline-flex items-center justify-center font-medium rounded-full transition-all duration-200 border box-border whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary", q = /* @__PURE__ */ C({
|
|
9
9
|
__name: "Chip",
|
|
10
10
|
props: {
|
|
11
|
+
variant: { default: "subtle" },
|
|
11
12
|
text: { default: "" },
|
|
12
13
|
textI18n: {},
|
|
13
14
|
icon: {},
|
|
14
|
-
variant: { default: "subtle" },
|
|
15
15
|
size: { default: "medium" },
|
|
16
16
|
disabled: { type: Boolean, default: !1 },
|
|
17
17
|
clickable: { type: Boolean, default: !1 },
|
|
@@ -19,38 +19,46 @@ const V = ["role", "tabindex"], j = {
|
|
|
19
19
|
class: { default: "" }
|
|
20
20
|
},
|
|
21
21
|
emits: ["click", "delete"],
|
|
22
|
-
setup(
|
|
23
|
-
const e =
|
|
24
|
-
e.disabled || e.clickable &&
|
|
22
|
+
setup(a, { emit: v }) {
|
|
23
|
+
const e = a, s = v, o = l(() => e.textI18n ? N(e.textI18n) : e.text), r = l(() => e.clickable && !e.disabled), p = (t) => {
|
|
24
|
+
e.disabled || e.clickable && s("click", t);
|
|
25
25
|
}, m = (t) => {
|
|
26
|
-
e.disabled || (t.stopPropagation(),
|
|
26
|
+
e.disabled || (t.stopPropagation(), s("delete", t));
|
|
27
27
|
}, h = (t) => {
|
|
28
|
-
e.disabled || !e.clickable && !e.deletable || ((t.key === "Enter" || t.key === " ") && (t.preventDefault(), e.clickable &&
|
|
29
|
-
},
|
|
28
|
+
e.disabled || !e.clickable && !e.deletable || ((t.key === "Enter" || t.key === " ") && (t.preventDefault(), e.clickable && s("click", t)), (t.key === "Backspace" || t.key === "Delete") && e.deletable && (t.preventDefault(), s("delete", t)));
|
|
29
|
+
}, x = l(() => {
|
|
30
30
|
switch (e.size) {
|
|
31
31
|
case "small":
|
|
32
|
-
return "h-5 text-[
|
|
32
|
+
return "h-5.5 text-[11px] px-2.5 gap-1";
|
|
33
33
|
case "large":
|
|
34
34
|
return "h-8 text-sm px-3 gap-2";
|
|
35
35
|
default:
|
|
36
36
|
return "h-6 text-xs px-2.5 gap-1.5";
|
|
37
37
|
}
|
|
38
|
-
}),
|
|
38
|
+
}), y = l(() => {
|
|
39
39
|
if (e.disabled)
|
|
40
40
|
return "bg-muted text-muted-foreground border-transparent opacity-50 cursor-not-allowed";
|
|
41
|
-
const t =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
secondary: `bg-secondary text-secondary-
|
|
48
|
-
success: `bg-success text-success-fg border-
|
|
49
|
-
warning: `bg-warning text-warning-fg border-
|
|
50
|
-
danger: `bg-
|
|
51
|
-
info: `bg-info text-info-fg border-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
const t = r.value ? "cursor-pointer hover:shadow-sm active:scale-[0.98]" : "cursor-default", u = {
|
|
42
|
+
solid: `bg-primary text-primary-fg border-transparent ${r.value ? "hover:bg-primary/90" : ""}`,
|
|
43
|
+
outline: `bg-transparent border-input text-foreground ${r.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
|
|
44
|
+
ghost: `bg-transparent border-transparent text-muted-foreground ${r.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
|
|
45
|
+
subtle: `bg-accent/50 text-foreground border-transparent ${r.value ? "hover:bg-accent" : ""}`,
|
|
46
|
+
/* Base Semantics */
|
|
47
|
+
secondary: `bg-secondary-subtle text-secondary-subtle-fg border-secondary-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
48
|
+
success: `bg-success-subtle text-success-subtle-fg border-success-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
49
|
+
warning: `bg-warning-subtle text-warning-subtle-fg border-warning-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
50
|
+
danger: `bg-danger-subtle text-danger-subtle-fg border-danger-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
51
|
+
info: `bg-info-subtle text-info-subtle-fg border-info-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
52
|
+
/* Extended Semantics */
|
|
53
|
+
purple: `bg-purple-subtle text-purple-subtle-fg border-purple-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
54
|
+
teal: `bg-teal-subtle text-teal-subtle-fg border-teal-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
55
|
+
indigo: `bg-indigo-subtle text-indigo-subtle-fg border-indigo-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
56
|
+
orange: `bg-orange-subtle text-orange-subtle-fg border-orange-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
57
|
+
pink: `bg-pink-subtle text-pink-subtle-fg border-pink-subtle-border ${r.value ? "hover:opacity-80" : ""}`,
|
|
58
|
+
cyan: `bg-cyan-subtle text-cyan-subtle-fg border-cyan-subtle-border ${r.value ? "hover:opacity-80" : ""}`
|
|
59
|
+
};
|
|
60
|
+
return `${u[e.variant] || u.subtle} ${t}`;
|
|
61
|
+
}), k = l(() => [E, x.value, y.value, e.class].join(" ")), $ = l(() => {
|
|
54
62
|
switch (e.size) {
|
|
55
63
|
case "small":
|
|
56
64
|
return "h-3 w-3";
|
|
@@ -59,7 +67,7 @@ const V = ["role", "tabindex"], j = {
|
|
|
59
67
|
default:
|
|
60
68
|
return "h-3.5 w-3.5";
|
|
61
69
|
}
|
|
62
|
-
}), w =
|
|
70
|
+
}), w = l(() => {
|
|
63
71
|
switch (e.size) {
|
|
64
72
|
case "small":
|
|
65
73
|
return "h-2.5 w-2.5";
|
|
@@ -69,36 +77,36 @@ const V = ["role", "tabindex"], j = {
|
|
|
69
77
|
return "h-3 w-3";
|
|
70
78
|
}
|
|
71
79
|
});
|
|
72
|
-
return (t,
|
|
80
|
+
return (t, u) => (n(), d("div", {
|
|
73
81
|
class: i(k.value),
|
|
74
|
-
role:
|
|
75
|
-
tabindex:
|
|
76
|
-
onClick:
|
|
82
|
+
role: a.clickable ? "button" : "status",
|
|
83
|
+
tabindex: r.value || a.deletable ? 0 : void 0,
|
|
84
|
+
onClick: p,
|
|
77
85
|
onKeydown: h
|
|
78
86
|
}, [
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
b(t.$slots, "icon", {}, () => [
|
|
88
|
+
a.icon ? (n(), f(g, {
|
|
81
89
|
key: 0,
|
|
82
|
-
icon:
|
|
83
|
-
class: i([
|
|
90
|
+
icon: a.icon,
|
|
91
|
+
class: i([$.value, "shrink-0", o.value ? "-ml-0.5" : ""])
|
|
84
92
|
}, null, 8, ["icon", "class"])) : c("", !0)
|
|
85
93
|
]),
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
z(B(
|
|
94
|
+
o.value || t.$slots.default ? (n(), d("span", j, [
|
|
95
|
+
b(t.$slots, "default", {}, () => [
|
|
96
|
+
z(B(o.value), 1)
|
|
89
97
|
])
|
|
90
98
|
])) : c("", !0),
|
|
91
|
-
|
|
99
|
+
a.deletable ? (n(), f(S, {
|
|
92
100
|
key: 1,
|
|
93
101
|
variant: "ghost",
|
|
94
102
|
size: "xs",
|
|
95
103
|
rounded: "full",
|
|
96
|
-
disabled:
|
|
97
|
-
class: i(["ml-auto p-0.5! h-auto! w-auto! hover:bg-[#8282823c]", [
|
|
104
|
+
disabled: a.disabled,
|
|
105
|
+
class: i(["ml-auto p-0.5! h-auto! w-auto! hover:bg-[#8282823c]", [o.value ? a.size === "small" ? "-mr-0.5" : "-mr-1" : ""]]),
|
|
98
106
|
onClick: m
|
|
99
107
|
}, {
|
|
100
108
|
default: D(() => [
|
|
101
|
-
I(
|
|
109
|
+
I(g, {
|
|
102
110
|
icon: "lucide:x",
|
|
103
111
|
class: i(w.value)
|
|
104
112
|
}, null, 8, ["class"])
|
|
@@ -7,6 +7,7 @@ type __VLS_Props = {
|
|
|
7
7
|
placeholder: string;
|
|
8
8
|
placeholderI18n?: string;
|
|
9
9
|
maxResultsPerGroup: number;
|
|
10
|
+
onOpenDynamicModal: (body: any, props: any) => void;
|
|
10
11
|
};
|
|
11
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, {
|
|
12
13
|
inputRef: HTMLInputElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./CommandPaletteContent.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-6b4a4b96"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|