vlite3 1.4.32 → 1.4.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/CategoryManager/CategoryManager.vue2.js +1 -1
- package/components/CategoryManager/CategoryNode.vue.js +30 -30
- package/components/CategoryMenu/CategoryMenu.vue.js +9 -11
- package/components/Chart/GanttChart.vue.d.ts +5 -1
- package/components/Chart/GanttChart.vue.js +2 -2
- package/components/Chart/GanttChart.vue2.js +977 -812
- package/components/Chart/GanttChartConnectorRouting.d.ts +83 -0
- package/components/Chart/GanttChartConnectorRouting.js +405 -0
- package/components/Chart/GanttChartDependencyUtils.js +43 -47
- package/components/Chart/types.d.ts +16 -1
- package/components/ColorPicker/ColorIro.vue2.js +78 -64
- package/components/ColorPicker/ColorPicker.vue.d.ts +5 -0
- package/components/ColorPicker/ColorPicker.vue.js +110 -64
- package/components/ColorPicker/constants.d.ts +2 -0
- package/components/ColorPicker/constants.js +4 -0
- package/components/ColorPicker/index.d.ts +1 -0
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/Dropdown/Dropdown.vue.js +100 -97
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Form/{AccordionView.vue2.js → AccordionView.vue.js} +1 -1
- package/components/Form/FormField.vue.js +9 -8
- package/components/Form/index.vue2.js +1 -1
- package/components/Kanban/Kanban.vue.d.ts +16 -2
- package/components/Kanban/Kanban.vue.js +2 -2
- package/components/Kanban/Kanban.vue2.js +150 -86
- package/components/Kanban/types.d.ts +37 -0
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/ToastNotification.vue.js +1 -1
- package/components/ToastNotification.vue2.js +3 -3
- package/components/index.d.ts +1 -1
- package/composables/useKeyStroke.d.ts +18 -0
- package/composables/useKeyStroke.js +103 -77
- package/composables/useTheme.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +235 -233
- package/package.json +10 -3
- package/style.css +1 -1
- package/utils/environment.d.ts +29 -0
- package/utils/environment.js +4 -0
- package/utils/functions.js +14 -13
- /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useEyeDropper as
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as T, ref as x, computed as _, watch as u, onMounted as B, onUnmounted as P, openBlock as a, createElementBlock as b, createVNode as R, unref as S, createBlock as z, createCommentVNode as p, createElementVNode as L, normalizeStyle as V, renderSlot as I, nextTick as M } from "vue";
|
|
2
|
+
import c from "@jaames/iro";
|
|
3
|
+
import { useEyeDropper as N } from "@vueuse/core";
|
|
4
|
+
import d from "../Button.vue.js";
|
|
5
|
+
import { COLOR_PICKER_RESET_VALUE as $ } from "./constants.js";
|
|
6
|
+
const D = { class: "space-y-3 w-max" }, F = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "flex gap-2 mb-2.5 -text-fs-3 pr-0.5"
|
|
8
|
-
},
|
|
9
|
+
}, j = /* @__PURE__ */ T({
|
|
9
10
|
__name: "ColorIro",
|
|
10
11
|
props: {
|
|
11
12
|
color: {},
|
|
@@ -13,9 +14,14 @@ const V = { class: "space-y-3 w-max" }, $ = {
|
|
|
13
14
|
size: { default: "md" }
|
|
14
15
|
},
|
|
15
16
|
emits: ["update:color", "close"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
|
|
17
|
+
setup(l, { emit: E }) {
|
|
18
|
+
const n = l, s = E, t = x(), o = x(null);
|
|
19
|
+
let i = !1;
|
|
20
|
+
const { isSupported: f, open: w, sRGBHex: H } = N(), m = (e) => {
|
|
21
|
+
const r = (e || "").toLowerCase();
|
|
22
|
+
return r === $ || r === "#00000000";
|
|
23
|
+
}, C = (e) => m(e) || !e ? "#000000" : e, v = _(() => {
|
|
24
|
+
switch (n.size) {
|
|
19
25
|
case "sm":
|
|
20
26
|
return 140;
|
|
21
27
|
case "lg":
|
|
@@ -23,119 +29,127 @@ const V = { class: "space-y-3 w-max" }, $ = {
|
|
|
23
29
|
default:
|
|
24
30
|
return 162;
|
|
25
31
|
}
|
|
26
|
-
}),
|
|
32
|
+
}), y = {
|
|
27
33
|
sm: 120,
|
|
28
34
|
md: 140,
|
|
29
35
|
lg: 150
|
|
30
|
-
},
|
|
31
|
-
if (!(!
|
|
32
|
-
await
|
|
36
|
+
}, h = async () => {
|
|
37
|
+
if (!(!t.value || o.value)) {
|
|
38
|
+
await M();
|
|
33
39
|
try {
|
|
34
|
-
|
|
35
|
-
width:
|
|
36
|
-
color:
|
|
40
|
+
o.value && (o.value.off("color:change"), o.value = null), t.value && (t.value.innerHTML = ""), o.value = c.ColorPicker(t.value, {
|
|
41
|
+
width: v.value,
|
|
42
|
+
color: C(n.color),
|
|
37
43
|
margin: 9,
|
|
38
|
-
boxHeight:
|
|
44
|
+
boxHeight: y[n.size],
|
|
39
45
|
sliderSize: 14,
|
|
40
46
|
layout: [
|
|
41
47
|
{
|
|
42
|
-
component:
|
|
48
|
+
component: c.ui.Box
|
|
43
49
|
},
|
|
44
50
|
{
|
|
45
|
-
component:
|
|
51
|
+
component: c.ui.Slider,
|
|
46
52
|
options: {
|
|
47
53
|
sliderType: "hue"
|
|
48
54
|
}
|
|
49
55
|
},
|
|
50
56
|
{
|
|
51
|
-
component:
|
|
57
|
+
component: c.ui.Slider,
|
|
52
58
|
options: {
|
|
53
59
|
sliderType: "saturation"
|
|
54
60
|
}
|
|
55
61
|
},
|
|
56
62
|
{
|
|
57
|
-
component:
|
|
63
|
+
component: c.ui.Slider,
|
|
58
64
|
options: {
|
|
59
65
|
sliderType: "value"
|
|
60
66
|
}
|
|
61
67
|
}
|
|
62
68
|
]
|
|
63
|
-
}),
|
|
64
|
-
|
|
69
|
+
}), o.value.on("color:change", (e) => {
|
|
70
|
+
i || s("update:color", e.hexString);
|
|
65
71
|
});
|
|
66
|
-
} catch (
|
|
67
|
-
console.error("Failed to initialize color picker:",
|
|
72
|
+
} catch (e) {
|
|
73
|
+
console.error("Failed to initialize color picker:", e);
|
|
68
74
|
}
|
|
69
75
|
}
|
|
70
|
-
},
|
|
71
|
-
|
|
76
|
+
}, k = () => {
|
|
77
|
+
o.value && (o.value.off("color:change"), o.value = null), t.value && (t.value.innerHTML = "");
|
|
72
78
|
};
|
|
73
|
-
|
|
74
|
-
() =>
|
|
75
|
-
(
|
|
76
|
-
if (
|
|
79
|
+
u(
|
|
80
|
+
() => n.color,
|
|
81
|
+
(e) => {
|
|
82
|
+
if (o.value && !m(e) && o.value.color.hexString !== e) {
|
|
83
|
+
i = !0;
|
|
77
84
|
try {
|
|
78
|
-
|
|
79
|
-
} catch (
|
|
80
|
-
console.error("Error updating color:",
|
|
85
|
+
o.value.color.hexString = e;
|
|
86
|
+
} catch (r) {
|
|
87
|
+
console.error("Error updating color:", r);
|
|
88
|
+
} finally {
|
|
89
|
+
i = !1;
|
|
81
90
|
}
|
|
91
|
+
}
|
|
82
92
|
}
|
|
83
|
-
),
|
|
84
|
-
() =>
|
|
93
|
+
), u(
|
|
94
|
+
() => n.size,
|
|
85
95
|
() => {
|
|
86
|
-
|
|
96
|
+
k(), h();
|
|
87
97
|
}
|
|
88
|
-
),
|
|
89
|
-
if (
|
|
98
|
+
), u(H, (e) => {
|
|
99
|
+
if (e && (s("update:color", e), o.value)) {
|
|
100
|
+
i = !0;
|
|
90
101
|
try {
|
|
91
|
-
|
|
92
|
-
} catch (
|
|
93
|
-
console.error("Error updating color from eyedropper:",
|
|
102
|
+
o.value.color.hexString = e;
|
|
103
|
+
} catch (r) {
|
|
104
|
+
console.error("Error updating color from eyedropper:", r);
|
|
105
|
+
} finally {
|
|
106
|
+
i = !1;
|
|
94
107
|
}
|
|
108
|
+
}
|
|
95
109
|
});
|
|
96
|
-
const
|
|
110
|
+
const g = async () => {
|
|
97
111
|
try {
|
|
98
|
-
await
|
|
99
|
-
} catch (
|
|
100
|
-
console.error("Error opening eyedropper:",
|
|
112
|
+
await w();
|
|
113
|
+
} catch (e) {
|
|
114
|
+
console.error("Error opening eyedropper:", e);
|
|
101
115
|
}
|
|
102
116
|
};
|
|
103
117
|
return B(() => {
|
|
104
|
-
v();
|
|
105
|
-
}), T(() => {
|
|
106
118
|
h();
|
|
107
|
-
}), (
|
|
108
|
-
|
|
109
|
-
|
|
119
|
+
}), P(() => {
|
|
120
|
+
k();
|
|
121
|
+
}), (e, r) => (a(), b("div", D, [
|
|
122
|
+
l.showHeader ? (a(), b("div", F, [
|
|
123
|
+
R(d, {
|
|
110
124
|
icon: "typcn:arrow-back",
|
|
111
|
-
onClick:
|
|
125
|
+
onClick: r[0] || (r[0] = (O) => s("close")),
|
|
112
126
|
class: "flex-1 px-2 py-1 bg-background hover:bg-accent rounded text-xs border border-border transition-colors"
|
|
113
127
|
}),
|
|
114
|
-
|
|
128
|
+
S(f) ? (a(), z(d, {
|
|
115
129
|
key: 0,
|
|
116
|
-
onClick:
|
|
130
|
+
onClick: g,
|
|
117
131
|
icon: "pepicons-pop:color-picker",
|
|
118
132
|
class: "flex-1 px-2 py-1 bg-background hover:bg-accent rounded text-xs border border-border transition-colors"
|
|
119
|
-
})) :
|
|
120
|
-
])) :
|
|
121
|
-
|
|
133
|
+
})) : p("", !0)
|
|
134
|
+
])) : p("", !0),
|
|
135
|
+
L("div", {
|
|
122
136
|
ref_key: "pickerRef",
|
|
123
|
-
ref:
|
|
124
|
-
style:
|
|
137
|
+
ref: t,
|
|
138
|
+
style: V({ width: v.value + "px", minHeight: y[l.size] + "px" })
|
|
125
139
|
}, null, 4),
|
|
126
|
-
|
|
127
|
-
|
|
140
|
+
I(e.$slots, "bottom", {}, () => [
|
|
141
|
+
S(f) && !l.showHeader ? (a(), z(d, {
|
|
128
142
|
key: 0,
|
|
129
|
-
onClick:
|
|
143
|
+
onClick: g,
|
|
130
144
|
icon: "pepicons-pop:color-picker",
|
|
131
145
|
variant: "outline",
|
|
132
146
|
size: "sm",
|
|
133
147
|
class: "w-full"
|
|
134
|
-
})) :
|
|
148
|
+
})) : p("", !0)
|
|
135
149
|
])
|
|
136
150
|
]));
|
|
137
151
|
}
|
|
138
152
|
});
|
|
139
153
|
export {
|
|
140
|
-
|
|
154
|
+
j as default
|
|
141
155
|
};
|
|
@@ -10,6 +10,8 @@ interface Props {
|
|
|
10
10
|
btnProps?: ButtonProps;
|
|
11
11
|
showInput?: boolean;
|
|
12
12
|
trigger?: 'input' | 'button' | 'swatch';
|
|
13
|
+
/** When true, shows a reset control that sets the value to `#0000` (transparent). */
|
|
14
|
+
allowReset?: boolean;
|
|
13
15
|
}
|
|
14
16
|
declare function __VLS_template(): {
|
|
15
17
|
attrs: Partial<{}>;
|
|
@@ -23,9 +25,11 @@ declare function __VLS_template(): {
|
|
|
23
25
|
};
|
|
24
26
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
27
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
28
|
+
reset: (value: string) => any;
|
|
26
29
|
change: (value: string) => any;
|
|
27
30
|
"update:modelValue": (value: string) => any;
|
|
28
31
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
32
|
+
onReset?: (value: string) => any;
|
|
29
33
|
onChange?: (value: string) => any;
|
|
30
34
|
"onUpdate:modelValue"?: (value: string) => any;
|
|
31
35
|
}>, {
|
|
@@ -37,6 +41,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
37
41
|
trigger: "input" | "button" | "swatch";
|
|
38
42
|
position: TooltTipPlacement;
|
|
39
43
|
showInput: boolean;
|
|
44
|
+
allowReset: boolean;
|
|
40
45
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
41
46
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
42
47
|
export default _default;
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as S, ref as k, computed as w, watch as v, openBlock as o, createBlock as c, unref as V, withCtx as h, createElementBlock as s, createVNode as u, createCommentVNode as n, renderSlot as j, mergeProps as D, createElementVNode as m, normalizeStyle as C, toDisplayString as L, normalizeClass as N } from "vue";
|
|
2
|
+
import U from "../Dropdown/Dropdown.vue.js";
|
|
3
|
+
import z from "../Icon.vue.js";
|
|
4
|
+
import R from "../Input.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
import "../../core/config.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import y from "../Button.vue.js";
|
|
10
|
+
import A from "./ColorIro.vue2.js";
|
|
11
11
|
/* empty css */
|
|
12
|
-
import { useEyeDropper as
|
|
13
|
-
|
|
12
|
+
import { useEyeDropper as T } from "@vueuse/core";
|
|
13
|
+
import { COLOR_PICKER_RESET_VALUE as g } from "./constants.js";
|
|
14
|
+
const F = ["disabled", "aria-label"], G = { class: "min-w-0 flex-1 truncate text-foreground" }, K = { class: "absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center z-20 pointer-events-none" }, q = {
|
|
14
15
|
key: 0,
|
|
15
16
|
class: "p-1 w-max flex flex-col justify-center"
|
|
16
|
-
},
|
|
17
|
+
}, J = {
|
|
17
18
|
key: 0,
|
|
18
19
|
class: "flex items-center gap-1.5 w-full"
|
|
19
|
-
},
|
|
20
|
+
}, M = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "flex-1 w-0 min-w-0"
|
|
23
|
+
}, ne = /* @__PURE__ */ S({
|
|
20
24
|
__name: "ColorPicker",
|
|
21
25
|
props: {
|
|
22
26
|
modelValue: { default: "#000000" },
|
|
@@ -27,45 +31,51 @@ const I = ["disabled", "aria-label"], U = { class: "min-w-0 truncate text-foregr
|
|
|
27
31
|
position: { default: "bottom" },
|
|
28
32
|
btnProps: {},
|
|
29
33
|
showInput: { type: Boolean, default: !0 },
|
|
30
|
-
trigger: { default: "input" }
|
|
34
|
+
trigger: { default: "input" },
|
|
35
|
+
allowReset: { type: Boolean, default: !1 }
|
|
31
36
|
},
|
|
32
|
-
emits: ["update:modelValue", "change"],
|
|
33
|
-
setup(e, { emit:
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
emits: ["update:modelValue", "change", "reset"],
|
|
38
|
+
setup(e, { emit: $ }) {
|
|
39
|
+
const l = e, f = $, p = k(!1), a = k(l.modelValue || "#000000"), x = w(() => {
|
|
40
|
+
const t = (l.modelValue || "").toLowerCase();
|
|
41
|
+
return !t || t === g;
|
|
42
|
+
}), d = w(() => l.allowReset && !l.disabled && !x.value), { isSupported: E, open: O, sRGBHex: B } = T();
|
|
43
|
+
v(B, (t) => {
|
|
44
|
+
t && (a.value = t);
|
|
37
45
|
});
|
|
38
|
-
const
|
|
46
|
+
const P = async () => {
|
|
39
47
|
try {
|
|
40
|
-
await
|
|
41
|
-
} catch (
|
|
42
|
-
console.error("Error opening eyedropper:",
|
|
48
|
+
await O();
|
|
49
|
+
} catch (t) {
|
|
50
|
+
console.error("Error opening eyedropper:", t);
|
|
43
51
|
}
|
|
44
52
|
};
|
|
45
|
-
|
|
46
|
-
() =>
|
|
47
|
-
(
|
|
48
|
-
|
|
53
|
+
v(
|
|
54
|
+
() => l.modelValue,
|
|
55
|
+
(t) => {
|
|
56
|
+
t && t !== a.value && (a.value = t);
|
|
49
57
|
}
|
|
50
|
-
),
|
|
51
|
-
/^#([0-9A-F]{3,8})$/i.test(
|
|
58
|
+
), v(a, (t) => {
|
|
59
|
+
/^#([0-9A-F]{3,8})$/i.test(t) && t !== l.modelValue && (f("update:modelValue", t), f("change", t));
|
|
52
60
|
});
|
|
53
|
-
const
|
|
54
|
-
|
|
61
|
+
const I = (t) => {
|
|
62
|
+
a.value = t;
|
|
63
|
+
}, b = (t) => {
|
|
64
|
+
t?.stopPropagation(), t?.preventDefault(), !(!l.allowReset || l.disabled) && (x.value || (a.value = g, f("reset", g)));
|
|
55
65
|
};
|
|
56
|
-
return (
|
|
66
|
+
return (t, r) => (o(), c(V(U), {
|
|
57
67
|
disabled: e.disabled,
|
|
58
68
|
class: "w-full",
|
|
59
69
|
position: e.position,
|
|
60
70
|
offset: [0, 8],
|
|
61
71
|
searchable: !1,
|
|
62
72
|
"close-on-select": !1,
|
|
63
|
-
onOnOpen:
|
|
64
|
-
onOnClose:
|
|
73
|
+
onOnOpen: r[1] || (r[1] = (i) => p.value = !0),
|
|
74
|
+
onOnClose: r[2] || (r[2] = (i) => p.value = !1)
|
|
65
75
|
}, {
|
|
66
|
-
trigger:
|
|
67
|
-
|
|
68
|
-
e.trigger === "button" ? (
|
|
76
|
+
trigger: h(({ isOpen: i }) => [
|
|
77
|
+
j(t.$slots, "trigger", { isOpen: i }, () => [
|
|
78
|
+
e.trigger === "button" ? (o(), c(y, D({
|
|
69
79
|
key: 0,
|
|
70
80
|
style: { backgroundColor: e.modelValue }
|
|
71
81
|
}, {
|
|
@@ -74,24 +84,37 @@ const I = ["disabled", "aria-label"], U = { class: "min-w-0 truncate text-foregr
|
|
|
74
84
|
icon: " ",
|
|
75
85
|
variant: "outline",
|
|
76
86
|
...e.btnProps || {}
|
|
77
|
-
}), null, 16, ["style"])) : e.trigger === "swatch" ? (
|
|
87
|
+
}), null, 16, ["style"])) : e.trigger === "swatch" ? (o(), s("button", {
|
|
78
88
|
key: 1,
|
|
79
89
|
type: "button",
|
|
80
90
|
disabled: e.disabled,
|
|
81
91
|
"aria-label": `Choose color ${e.modelValue}`,
|
|
82
92
|
class: "flex min-h-10 w-full items-center gap-2.5 px-3 text-left font-mono text-xs uppercase transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary disabled:cursor-not-allowed disabled:opacity-50"
|
|
83
93
|
}, [
|
|
84
|
-
|
|
94
|
+
m("span", {
|
|
85
95
|
"aria-hidden": "true",
|
|
86
96
|
class: "h-5 w-5 shrink-0 rounded-full border border-black/10 shadow-sm dark:border-white/15",
|
|
87
|
-
style:
|
|
97
|
+
style: C({ backgroundColor: e.modelValue })
|
|
88
98
|
}, null, 4),
|
|
89
|
-
|
|
90
|
-
|
|
99
|
+
m("span", G, L(e.modelValue), 1),
|
|
100
|
+
d.value ? (o(), s("span", {
|
|
101
|
+
key: 0,
|
|
102
|
+
role: "button",
|
|
103
|
+
tabindex: "-1",
|
|
104
|
+
"aria-label": "Reset color",
|
|
105
|
+
class: "shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground focus:outline-none",
|
|
106
|
+
onClick: b
|
|
107
|
+
}, [
|
|
108
|
+
u(z, {
|
|
109
|
+
icon: "lucide:x-circle",
|
|
110
|
+
class: "h-4 w-4"
|
|
111
|
+
})
|
|
112
|
+
])) : n("", !0)
|
|
113
|
+
], 8, F)) : (o(), s("div", {
|
|
91
114
|
key: 2,
|
|
92
|
-
class:
|
|
115
|
+
class: N(["w-full relative cursor-pointer", [e.disabled ? "opacity-50 pointer-events-none" : ""]])
|
|
93
116
|
}, [
|
|
94
|
-
|
|
117
|
+
u(R, {
|
|
95
118
|
"model-value": e.modelValue,
|
|
96
119
|
readonly: "",
|
|
97
120
|
disabled: e.disabled,
|
|
@@ -99,56 +122,79 @@ const I = ["disabled", "aria-label"], U = { class: "min-w-0 truncate text-foregr
|
|
|
99
122
|
variant: e.variant,
|
|
100
123
|
rounded: e.rounded,
|
|
101
124
|
class: "pointer-events-none",
|
|
102
|
-
"input-class": "pl-9 font-mono uppercase cursor-pointer"
|
|
103
|
-
}, null, 8, ["model-value", "disabled", "size", "variant", "rounded"]),
|
|
104
|
-
|
|
105
|
-
|
|
125
|
+
"input-class": d.value ? "pl-9 pr-9 font-mono uppercase cursor-pointer" : "pl-9 font-mono uppercase cursor-pointer"
|
|
126
|
+
}, null, 8, ["model-value", "disabled", "size", "variant", "rounded", "input-class"]),
|
|
127
|
+
m("div", K, [
|
|
128
|
+
m("div", {
|
|
106
129
|
class: "w-4 h-4 rounded-full shadow-[inset_0_0_0_1px_rgba(0,0,0,0.1)] dark:shadow-[inset_0_0_0_1px_rgba(255,255,255,0.1)]",
|
|
107
|
-
style:
|
|
130
|
+
style: C({ backgroundColor: e.modelValue })
|
|
108
131
|
}, null, 4)
|
|
109
|
-
])
|
|
132
|
+
]),
|
|
133
|
+
d.value ? (o(), s("button", {
|
|
134
|
+
key: 0,
|
|
135
|
+
type: "button",
|
|
136
|
+
tabindex: "-1",
|
|
137
|
+
"aria-label": "Reset color",
|
|
138
|
+
class: "absolute right-2.5 top-1/2 -translate-y-1/2 z-20 flex items-center justify-center text-muted-foreground hover:text-foreground focus:outline-none pointer-events-auto",
|
|
139
|
+
onClick: b
|
|
140
|
+
}, [
|
|
141
|
+
u(z, {
|
|
142
|
+
icon: "lucide:x-circle",
|
|
143
|
+
class: "h-4 w-4"
|
|
144
|
+
})
|
|
145
|
+
])) : n("", !0)
|
|
110
146
|
], 2))
|
|
111
147
|
])
|
|
112
148
|
]),
|
|
113
|
-
default:
|
|
114
|
-
|
|
115
|
-
|
|
149
|
+
default: h(() => [
|
|
150
|
+
p.value ? (o(), s("div", q, [
|
|
151
|
+
u(A, {
|
|
116
152
|
color: e.modelValue,
|
|
117
153
|
"show-header": !1,
|
|
118
154
|
size: e.size,
|
|
119
|
-
"onUpdate:color":
|
|
155
|
+
"onUpdate:color": I
|
|
120
156
|
}, {
|
|
121
|
-
bottom:
|
|
122
|
-
e.showInput ? (
|
|
123
|
-
|
|
157
|
+
bottom: h(() => [
|
|
158
|
+
e.showInput || e.allowReset ? (o(), s("div", J, [
|
|
159
|
+
e.showInput && V(E) ? (o(), c(y, {
|
|
124
160
|
key: 0,
|
|
125
|
-
onClick:
|
|
161
|
+
onClick: P,
|
|
126
162
|
icon: "pepicons-pop:color-picker",
|
|
127
163
|
variant: "outline",
|
|
128
164
|
size: "sm",
|
|
129
165
|
class: "px-2 shrink-0"
|
|
130
|
-
})) :
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
modelValue:
|
|
134
|
-
"onUpdate:modelValue":
|
|
166
|
+
})) : n("", !0),
|
|
167
|
+
e.showInput ? (o(), s("div", M, [
|
|
168
|
+
u(R, {
|
|
169
|
+
modelValue: a.value,
|
|
170
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => a.value = i),
|
|
135
171
|
size: "sm",
|
|
136
172
|
"show-clear-button": !1,
|
|
137
173
|
placeholder: "#000000",
|
|
138
174
|
class: "w-full",
|
|
139
175
|
"input-class": "font-mono text-xs uppercase "
|
|
140
176
|
}, null, 8, ["modelValue"])
|
|
141
|
-
])
|
|
142
|
-
|
|
177
|
+
])) : n("", !0),
|
|
178
|
+
d.value ? (o(), c(y, {
|
|
179
|
+
key: 2,
|
|
180
|
+
onClick: b,
|
|
181
|
+
icon: "lucide:rotate-ccw",
|
|
182
|
+
variant: "outline",
|
|
183
|
+
size: "sm",
|
|
184
|
+
class: "px-2 shrink-0",
|
|
185
|
+
"aria-label": "Reset color",
|
|
186
|
+
title: "Reset to transparent"
|
|
187
|
+
})) : n("", !0)
|
|
188
|
+
])) : n("", !0)
|
|
143
189
|
]),
|
|
144
190
|
_: 1
|
|
145
191
|
}, 8, ["color", "size"])
|
|
146
|
-
])) :
|
|
192
|
+
])) : n("", !0)
|
|
147
193
|
]),
|
|
148
194
|
_: 3
|
|
149
195
|
}, 8, ["disabled", "position"]));
|
|
150
196
|
}
|
|
151
197
|
});
|
|
152
198
|
export {
|
|
153
|
-
|
|
199
|
+
ne as default
|
|
154
200
|
};
|
|
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
|
|
|
4
4
|
import { $t as E } from "../../utils/i18n.js";
|
|
5
5
|
import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
|
|
6
6
|
import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
|
|
7
|
-
import ee from "./CommandPaletteItem.
|
|
7
|
+
import ee from "./CommandPaletteItem.vue2.js";
|
|
8
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 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
|