vlite3 0.4.7 → 0.4.10
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/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/Dropdown/Dropdown.vue.d.ts +2 -1
- package/components/Dropdown/Dropdown.vue.js +1 -0
- package/components/Dropdown/DropdownBooleanItem.vue.js +9 -8
- package/components/Dropdown/DropdownGroupedLayout.vue.js +35 -34
- package/components/Dropdown/DropdownItem.vue.js +11 -10
- package/components/Dropdown/DropdownMenu.vue.js +17 -17
- package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
- package/components/Dropdown/DropdownTrigger.vue.js +9 -7
- package/components/Form/composables/useForm.js +81 -74
- package/components/Icon.vue.d.ts +2 -0
- package/components/Icon.vue.js +12 -11
- package/components/Navbar/Navbar.vue.d.ts +35 -4
- package/components/Navbar/Navbar.vue.js +334 -131
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +10 -1
- package/components/SidebarMenu/SidebarMenu.vue.js +63 -47
- package/components/SidebarMenu/SidebarMenuItem.vue.js +150 -146
- package/components/SidebarMenu/types.d.ts +24 -5
- package/package.json +1 -1
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -4,8 +4,8 @@ import "@iconify/vue";
|
|
|
4
4
|
import O from "../Input.vue.js";
|
|
5
5
|
import "../../core/config.js";
|
|
6
6
|
import y from "../Button.vue.js";
|
|
7
|
-
import E from "./ColorIro.
|
|
8
|
-
/* empty css
|
|
7
|
+
import E from "./ColorIro.vue2.js";
|
|
8
|
+
/* empty css */
|
|
9
9
|
import { useEyeDropper as P } from "@vueuse/core";
|
|
10
10
|
const I = {
|
|
11
11
|
key: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDropdownOptions, IDropdownOption } from '../../types';
|
|
1
|
+
import { IDropdownOptions, IDropdownOption, ButtonProps } from '../../types';
|
|
2
2
|
import { TooltTipPlacement } from 'v-tooltip-lite/types';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
selected?: any;
|
|
@@ -30,6 +30,7 @@ type __VLS_Props = {
|
|
|
30
30
|
hasMore?: boolean;
|
|
31
31
|
searchable?: boolean;
|
|
32
32
|
remote?: boolean;
|
|
33
|
+
triggerProps?: ButtonProps;
|
|
33
34
|
direction?: 'ltr' | 'rtl';
|
|
34
35
|
};
|
|
35
36
|
declare function __VLS_template(): {
|
|
@@ -38,6 +38,7 @@ const se = /* @__PURE__ */ z({
|
|
|
38
38
|
hasMore: { type: Boolean, default: !1 },
|
|
39
39
|
searchable: { type: Boolean, default: !0 },
|
|
40
40
|
remote: { type: Boolean, default: !1 },
|
|
41
|
+
triggerProps: {},
|
|
41
42
|
direction: { default: "ltr" }
|
|
42
43
|
},
|
|
43
44
|
emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as r, computed as d, openBlock as l, createElementBlock as u, withModifiers as p, normalizeClass as f, createElementVNode as a, createBlock as g, createCommentVNode as v, toDisplayString as h, createVNode as x } from "vue";
|
|
2
2
|
import y from "../Switch.vue.js";
|
|
3
3
|
import b from "../Icon.vue.js";
|
|
4
4
|
import { $t as k } from "../../utils/i18n.js";
|
|
5
|
-
const w = { class: "flex items-center gap-2 flex-1 min-w-0" }, B = { class: "truncate font-medium" },
|
|
5
|
+
const w = { class: "flex items-center gap-2 flex-1 min-w-0" }, B = { class: "truncate font-medium" }, N = /* @__PURE__ */ r({
|
|
6
6
|
__name: "DropdownBooleanItem",
|
|
7
7
|
props: {
|
|
8
8
|
option: {},
|
|
@@ -11,7 +11,7 @@ const w = { class: "flex items-center gap-2 flex-1 min-w-0" }, B = { class: "tru
|
|
|
11
11
|
},
|
|
12
12
|
emits: ["change"],
|
|
13
13
|
setup(e, { emit: c }) {
|
|
14
|
-
const o = e, s = c,
|
|
14
|
+
const o = e, s = c, m = d(() => o.option.labelI18n ? k(o.option.labelI18n) : o.option.label), t = (n) => {
|
|
15
15
|
s("change", n, o.option);
|
|
16
16
|
};
|
|
17
17
|
return (n, i) => (l(), u("div", {
|
|
@@ -19,15 +19,16 @@ const w = { class: "flex items-center gap-2 flex-1 min-w-0" }, B = { class: "tru
|
|
|
19
19
|
class: f(["relative flex cursor-pointer select-none items-center justify-between rounded-sm px-2 py-1.5 text-sm outline-none transition-colors", [
|
|
20
20
|
e.focused ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground"
|
|
21
21
|
]]),
|
|
22
|
-
onClick: i[0] || (i[0] = p((
|
|
22
|
+
onClick: i[0] || (i[0] = p((j) => t(!e.value), ["stop"]))
|
|
23
23
|
}, [
|
|
24
24
|
a("div", w, [
|
|
25
|
-
e.option.icon ? (l(), g(b, {
|
|
25
|
+
e.option.icon || e.option.emoji ? (l(), g(b, {
|
|
26
26
|
key: 0,
|
|
27
27
|
icon: e.option.icon,
|
|
28
|
+
emoji: e.option.emoji,
|
|
28
29
|
class: "h-4 w-4 shrink-0 opacity-70"
|
|
29
|
-
}, null, 8, ["icon"])) : v("", !0),
|
|
30
|
-
a("span", B, h(
|
|
30
|
+
}, null, 8, ["icon", "emoji"])) : v("", !0),
|
|
31
|
+
a("span", B, h(m.value), 1)
|
|
31
32
|
]),
|
|
32
33
|
x(y, {
|
|
33
34
|
"model-value": e.value,
|
|
@@ -38,5 +39,5 @@ const w = { class: "flex items-center gap-2 flex-1 min-w-0" }, B = { class: "tru
|
|
|
38
39
|
}
|
|
39
40
|
});
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
N as default
|
|
42
43
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as _, computed as C, openBlock as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as _, computed as C, openBlock as l, createElementBlock as c, normalizeStyle as $, Fragment as a, renderList as i, createElementVNode as m, normalizeClass as h, toDisplayString as j, createBlock as u, createCommentVNode as f, createVNode as w } from "vue";
|
|
2
|
+
import B from "../Icon.vue.js";
|
|
3
3
|
import y from "./DropdownItem.vue.js";
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
4
|
+
import { $t as N } from "../../utils/i18n.js";
|
|
5
|
+
const S = { class: "font-semibold text-sm text-foreground" }, L = { class: "flex flex-col space-y-1" }, V = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "flex flex-col space-y-1 ml-3 pl-3 border-l border-border mt-0.5 mb-1.5"
|
|
8
|
-
},
|
|
8
|
+
}, z = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "px-2 text-xs text-muted-foreground italic"
|
|
11
|
-
},
|
|
11
|
+
}, q = /* @__PURE__ */ _({
|
|
12
12
|
__name: "DropdownGroupedLayout",
|
|
13
13
|
props: {
|
|
14
14
|
options: { default: () => [] },
|
|
@@ -19,56 +19,57 @@ const L = { class: "font-semibold text-sm text-foreground" }, V = { class: "flex
|
|
|
19
19
|
headerClass: {}
|
|
20
20
|
},
|
|
21
21
|
emits: ["select", "mouseenter"],
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
const e =
|
|
22
|
+
setup(r, { emit: A }) {
|
|
23
|
+
const s = r, k = C(() => {
|
|
24
|
+
const e = s.columns;
|
|
25
25
|
return typeof e == "number" ? { gridTemplateColumns: `repeat(${e}, minmax(0, 1fr))` } : { gridTemplateColumns: e };
|
|
26
|
-
}),
|
|
27
|
-
return (e,
|
|
26
|
+
}), d = (e) => s.selected ? Array.isArray(s.selected) ? s.selected.includes(e.value) : typeof s.selected == "object" && s.selected !== null && e.key && e.key in s.selected ? s.selected[e.key] === e.value : s.selected === e.value : !1, b = (e) => e.labelI18n ? N(e.labelI18n) : e.label;
|
|
27
|
+
return (e, D) => (l(), c("div", {
|
|
28
28
|
class: "grid gap-6 p-4",
|
|
29
29
|
style: $(k.value)
|
|
30
30
|
}, [
|
|
31
|
-
(
|
|
32
|
-
key:
|
|
31
|
+
(l(!0), c(a, null, i(r.options, (t, x) => (l(), c("div", {
|
|
32
|
+
key: t.key || t.value || x,
|
|
33
33
|
class: "flex flex-col space-y-2 min-w-[150px]"
|
|
34
34
|
}, [
|
|
35
35
|
m("div", {
|
|
36
|
-
class: h(["flex items-center gap-2 px-2 py-1 mb-1",
|
|
36
|
+
class: h(["flex items-center gap-2 px-2 py-1 mb-1", r.headerClass])
|
|
37
37
|
}, [
|
|
38
|
-
m("span",
|
|
39
|
-
|
|
38
|
+
m("span", S, j(b(t)), 1),
|
|
39
|
+
t.icon || t.emoji ? (l(), u(B, {
|
|
40
40
|
key: 0,
|
|
41
|
-
icon:
|
|
41
|
+
icon: t.icon,
|
|
42
|
+
emoji: t.emoji,
|
|
42
43
|
class: "w-4 h-4 text-muted-foreground"
|
|
43
|
-
}, null, 8, ["icon"])) : f("", !0)
|
|
44
|
+
}, null, 8, ["icon", "emoji"])) : f("", !0)
|
|
44
45
|
], 2),
|
|
45
|
-
m("div",
|
|
46
|
-
|
|
47
|
-
key: n.key || n.value ||
|
|
46
|
+
m("div", L, [
|
|
47
|
+
t.children && t.children.length ? (l(!0), c(a, { key: 0 }, i(t.children, (n, p) => (l(), c(a, {
|
|
48
|
+
key: n.key || n.value || p
|
|
48
49
|
}, [
|
|
49
|
-
|
|
50
|
+
w(y, {
|
|
50
51
|
option: n,
|
|
51
|
-
selected:
|
|
52
|
-
selectable:
|
|
52
|
+
selected: d(n),
|
|
53
|
+
selectable: r.selectable,
|
|
53
54
|
class: "w-full",
|
|
54
|
-
onClick: (
|
|
55
|
+
onClick: (o) => e.$emit("select", n)
|
|
55
56
|
}, null, 8, ["option", "selected", "selectable", "onClick"]),
|
|
56
|
-
n.children && n.children.length ? (
|
|
57
|
-
(
|
|
58
|
-
key:
|
|
59
|
-
option:
|
|
60
|
-
selected:
|
|
61
|
-
selectable:
|
|
57
|
+
n.children && n.children.length ? (l(), c("div", V, [
|
|
58
|
+
(l(!0), c(a, null, i(n.children, (o, v) => (l(), u(y, {
|
|
59
|
+
key: o.key || o.value || v,
|
|
60
|
+
option: o,
|
|
61
|
+
selected: d(o),
|
|
62
|
+
selectable: r.selectable,
|
|
62
63
|
class: "w-full text-xs",
|
|
63
|
-
onClick: (
|
|
64
|
+
onClick: (E) => e.$emit("select", o)
|
|
64
65
|
}, null, 8, ["option", "selected", "selectable", "onClick"]))), 128))
|
|
65
66
|
])) : f("", !0)
|
|
66
|
-
], 64))), 128)) : (
|
|
67
|
+
], 64))), 128)) : (l(), c("div", z, "No items"))
|
|
67
68
|
])
|
|
68
69
|
]))), 128))
|
|
69
70
|
], 4));
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
q as default
|
|
74
75
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as k, computed as l, openBlock as o, createElementBlock as s, normalizeClass as h, renderSlot as g, normalizeProps as w, guardReactiveProps as I, createBlock as p, createCommentVNode as i, createElementVNode as a, toDisplayString as c } from "vue";
|
|
2
2
|
import f from "../Icon.vue.js";
|
|
3
3
|
import { $t as d } from "../../utils/i18n.js";
|
|
4
|
-
const B = ["data-disabled"], $ = { class: "flex flex-col flex-1 min-w-0" },
|
|
4
|
+
const B = ["data-disabled"], $ = { class: "flex flex-col flex-1 min-w-0" }, j = { class: "flex items-center justify-between gap-2" }, C = { class: "truncate font-medium" }, D = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "text-xs text-muted-foreground whitespace-nowrap opacity-90"
|
|
7
|
-
},
|
|
7
|
+
}, S = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-[10px] text-muted-foreground truncate opacity-70"
|
|
10
|
-
},
|
|
10
|
+
}, P = /* @__PURE__ */ k({
|
|
11
11
|
__name: "DropdownItem",
|
|
12
12
|
props: {
|
|
13
13
|
option: {},
|
|
@@ -31,17 +31,18 @@ const B = ["data-disabled"], $ = { class: "flex flex-col flex-1 min-w-0" }, C =
|
|
|
31
31
|
onMouseenter: n[1] || (n[1] = (v) => m.$emit("mouseenter", e.index ?? -1))
|
|
32
32
|
}, [
|
|
33
33
|
g(m.$slots, "default", w(I({ option: e.option, index: e.index, selected: e.selected })), () => [
|
|
34
|
-
e.option.icon ? (o(), p(f, {
|
|
34
|
+
e.option.icon || e.option.emoji ? (o(), p(f, {
|
|
35
35
|
key: 0,
|
|
36
36
|
icon: e.option.icon,
|
|
37
|
+
emoji: e.option.emoji,
|
|
37
38
|
class: "mr-2 h-4 w-4 shrink-0 mt-0.5"
|
|
38
|
-
}, null, 8, ["icon"])) : i("", !0),
|
|
39
|
+
}, null, 8, ["icon", "emoji"])) : i("", !0),
|
|
39
40
|
a("div", $, [
|
|
40
|
-
a("div",
|
|
41
|
-
a("span",
|
|
42
|
-
r.value ? (o(), s("span",
|
|
41
|
+
a("div", j, [
|
|
42
|
+
a("span", C, c(y.value), 1),
|
|
43
|
+
r.value ? (o(), s("span", D, c(r.value), 1)) : i("", !0)
|
|
43
44
|
]),
|
|
44
|
-
u.value ? (o(), s("span",
|
|
45
|
+
u.value ? (o(), s("span", S, c(u.value), 1)) : i("", !0)
|
|
45
46
|
]),
|
|
46
47
|
e.selectable && e.selected ? (o(), p(f, {
|
|
47
48
|
key: 1,
|
|
@@ -53,5 +54,5 @@ const B = ["data-disabled"], $ = { class: "flex flex-col flex-1 min-w-0" }, C =
|
|
|
53
54
|
}
|
|
54
55
|
});
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
P as default
|
|
57
58
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Y, defineAsyncComponent as Z, ref as C, computed as v, watch as
|
|
1
|
+
import { defineComponent as Y, defineAsyncComponent as Z, ref as C, computed as v, watch as j, toRef as ee, onMounted as te, onBeforeUnmount as le, openBlock as o, createElementBlock as c, createVNode as x, createCommentVNode as i, renderSlot as g, unref as n, normalizeStyle as se, normalizeClass as T, toDisplayString as D, createBlock as m, Fragment as E, renderList as oe, withCtx as N, createElementVNode as S, createSlots as ne, mergeProps as re, nextTick as de } from "vue";
|
|
2
2
|
import $ from "../Icon.vue.js";
|
|
3
3
|
import ce from "../Input.vue.js";
|
|
4
4
|
import ae from "./DropdownItem.vue.js";
|
|
@@ -25,7 +25,7 @@ const he = ["dir"], ye = {
|
|
|
25
25
|
}, Se = {
|
|
26
26
|
key: 3,
|
|
27
27
|
class: "shrink-0 border-t mt-1 pt-1"
|
|
28
|
-
},
|
|
28
|
+
}, Ee = /* @__PURE__ */ Y({
|
|
29
29
|
__name: "DropdownMenu",
|
|
30
30
|
props: {
|
|
31
31
|
options: { default: () => [] },
|
|
@@ -46,8 +46,8 @@ const he = ["dir"], ye = {
|
|
|
46
46
|
direction: { default: "ltr" }
|
|
47
47
|
},
|
|
48
48
|
emits: ["select", "close", "load-more", "search"],
|
|
49
|
-
setup(r, { emit:
|
|
50
|
-
const P = Z(() => import("./Dropdown.vue2.js")), t = r, u =
|
|
49
|
+
setup(r, { emit: V }) {
|
|
50
|
+
const P = Z(() => import("./Dropdown.vue2.js")), t = r, u = V, M = C(null), f = C(""), { getMenuId: _, getAllRecursiveIds: H } = me(), R = v(() => {
|
|
51
51
|
const e = I("vlite.dropdown.empty");
|
|
52
52
|
return e !== "vlite.dropdown.empty" ? e : "No options found";
|
|
53
53
|
}), z = v(() => {
|
|
@@ -55,7 +55,7 @@ const he = ["dir"], ye = {
|
|
|
55
55
|
return e !== "vlite.dropdown.search" ? e : "Search...";
|
|
56
56
|
}), A = v(() => t.remote ? t.searchable : t.searchable && (t.options?.length || 0) > 9);
|
|
57
57
|
let k = null;
|
|
58
|
-
|
|
58
|
+
j(f, (e) => {
|
|
59
59
|
t.remote && (k && clearTimeout(k), k = setTimeout(() => {
|
|
60
60
|
e && u("search", e);
|
|
61
61
|
}, 100));
|
|
@@ -69,7 +69,6 @@ const he = ["dir"], ye = {
|
|
|
69
69
|
focusedIndex: h,
|
|
70
70
|
isKeyboardMode: w,
|
|
71
71
|
filteredOptions: F,
|
|
72
|
-
// rename
|
|
73
72
|
handleKeyDown: O,
|
|
74
73
|
handleMouseMove: B,
|
|
75
74
|
onMouseEnterItem: p,
|
|
@@ -107,7 +106,7 @@ const he = ["dir"], ye = {
|
|
|
107
106
|
let e = -1;
|
|
108
107
|
t.layout !== "grouped" && (t.selectedIndex !== null && t.selectedIndex >= 0 ? e = t.selectedIndex : t.selected !== void 0 && typeof t.selected != "object" && (e = t.options.findIndex((s) => s.value === t.selected)), e !== -1 && K(e));
|
|
109
108
|
};
|
|
110
|
-
|
|
109
|
+
j(
|
|
111
110
|
() => y.value,
|
|
112
111
|
() => {
|
|
113
112
|
h.value = -1;
|
|
@@ -143,7 +142,7 @@ const he = ["dir"], ye = {
|
|
|
143
142
|
ref: M,
|
|
144
143
|
tabindex: "0",
|
|
145
144
|
role: "menu",
|
|
146
|
-
class:
|
|
145
|
+
class: T([
|
|
147
146
|
"w-full p-1 space-y-0.5 overflow-y-auto overflow-x-hidden focus:outline-none flex-1",
|
|
148
147
|
t.class
|
|
149
148
|
]),
|
|
@@ -152,7 +151,7 @@ const he = ["dir"], ye = {
|
|
|
152
151
|
(...l) => n(B) && n(B)(...l)),
|
|
153
152
|
onScroll: L
|
|
154
153
|
}, [
|
|
155
|
-
y.value.length === 0 && r.options?.length > 0 && !r.loading ? (o(), c("div", ge,
|
|
154
|
+
y.value.length === 0 && r.options?.length > 0 && !r.loading ? (o(), c("div", ge, D(R.value), 1)) : i("", !0),
|
|
156
155
|
r.layout === "grouped" ? (o(), m(ue, {
|
|
157
156
|
key: 1,
|
|
158
157
|
options: y.value,
|
|
@@ -160,7 +159,7 @@ const he = ["dir"], ye = {
|
|
|
160
159
|
selectable: r.selectable,
|
|
161
160
|
columns: r.columns,
|
|
162
161
|
onSelect: b
|
|
163
|
-
}, null, 8, ["options", "selected", "selectable", "columns"])) : (o(!0), c(
|
|
162
|
+
}, null, 8, ["options", "selected", "selectable", "columns"])) : (o(!0), c(E, { key: 2 }, oe(y.value, (l, d) => (o(), c(E, { key: d }, [
|
|
164
163
|
l.label === "---" ? (o(), c("div", ke)) : l.data?.isBoolean ? (o(), m(ie, {
|
|
165
164
|
key: 1,
|
|
166
165
|
option: l,
|
|
@@ -183,22 +182,23 @@ const he = ["dir"], ye = {
|
|
|
183
182
|
direction: r.direction,
|
|
184
183
|
onOnSelect: (a) => Q(l, a)
|
|
185
184
|
}, {
|
|
186
|
-
trigger:
|
|
185
|
+
trigger: N(() => [
|
|
187
186
|
S("div", {
|
|
188
187
|
"data-dropdown-item": "",
|
|
189
|
-
class:
|
|
188
|
+
class: T(["relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium outline-none transition-colors justify-between w-full", [
|
|
190
189
|
n(w) && n(h) === d ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground",
|
|
191
190
|
l.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
192
191
|
]]),
|
|
193
192
|
onMouseenter: (a) => n(p)(d)
|
|
194
193
|
}, [
|
|
195
194
|
S("div", we, [
|
|
196
|
-
l.icon ? (o(), m($, {
|
|
195
|
+
l.icon || l.emoji ? (o(), m($, {
|
|
197
196
|
key: 0,
|
|
198
197
|
icon: l.icon,
|
|
198
|
+
emoji: l.emoji,
|
|
199
199
|
class: "mr-2 h-4 w-4 shrink-0 mt-0.5"
|
|
200
|
-
}, null, 8, ["icon"])) : i("", !0),
|
|
201
|
-
S("span", pe,
|
|
200
|
+
}, null, 8, ["icon", "emoji"])) : i("", !0),
|
|
201
|
+
S("span", pe, D(X(l)), 1)
|
|
202
202
|
]),
|
|
203
203
|
x($, {
|
|
204
204
|
icon: r.direction === "rtl" ? "lucide:chevron-left" : "lucide:chevron-right",
|
|
@@ -219,7 +219,7 @@ const he = ["dir"], ye = {
|
|
|
219
219
|
}, ne({ _: 2 }, [
|
|
220
220
|
e.$slots.item ? {
|
|
221
221
|
name: "default",
|
|
222
|
-
fn:
|
|
222
|
+
fn: N((a) => [
|
|
223
223
|
g(e.$slots, "item", re({ ref_for: !0 }, a))
|
|
224
224
|
]),
|
|
225
225
|
key: "0"
|
|
@@ -241,5 +241,5 @@ const he = ["dir"], ye = {
|
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
243
|
export {
|
|
244
|
-
|
|
244
|
+
Ee as default
|
|
245
245
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonProps } from '../../types';
|
|
1
2
|
interface Props {
|
|
2
3
|
selectedLabel?: string;
|
|
3
4
|
placeholder?: string;
|
|
@@ -5,6 +6,7 @@ interface Props {
|
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
className?: string;
|
|
7
8
|
direction?: 'ltr' | 'rtl';
|
|
9
|
+
triggerProps?: ButtonProps;
|
|
8
10
|
}
|
|
9
11
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
10
12
|
disabled: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as t, openBlock as a, createBlock as l, mergeProps as o } from "vue";
|
|
2
2
|
import n from "../Button.vue.js";
|
|
3
|
-
const s = /* @__PURE__ */
|
|
3
|
+
const s = /* @__PURE__ */ t({
|
|
4
4
|
__name: "DropdownTrigger",
|
|
5
5
|
props: {
|
|
6
6
|
selectedLabel: { default: "" },
|
|
@@ -8,17 +8,19 @@ const s = /* @__PURE__ */ a({
|
|
|
8
8
|
isOpen: { type: Boolean },
|
|
9
9
|
disabled: { type: Boolean, default: !1 },
|
|
10
10
|
className: {},
|
|
11
|
-
direction: { default: "ltr" }
|
|
11
|
+
direction: { default: "ltr" },
|
|
12
|
+
triggerProps: {}
|
|
12
13
|
},
|
|
13
14
|
setup(e) {
|
|
14
|
-
return (
|
|
15
|
+
return (r, i) => (a(), l(n, o({
|
|
15
16
|
text: e.selectedLabel || e.placeholder,
|
|
16
17
|
iconRight: "iconamoon:arrow-down-2",
|
|
17
18
|
variant: "outline",
|
|
18
19
|
disabled: e.disabled,
|
|
19
|
-
dir: e.direction
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
dir: e.direction
|
|
21
|
+
}, e.triggerProps, {
|
|
22
|
+
class: ["w-full justify-between! font-normal", e.className]
|
|
23
|
+
}), null, 16, ["text", "disabled", "dir", "class"]));
|
|
22
24
|
}
|
|
23
25
|
});
|
|
24
26
|
export {
|