adverich-kun-ui 0.1.124 → 0.1.126
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/dist/adverich-kun-ui.css +1 -1
- package/dist/components/KunAutocomplete/src/components/KunAutocomplete.vue.js +235 -210
- package/dist/components/KunAutocomplete/src/composables/KunAutocompleteProps.js +5 -11
- package/dist/components/KunAutocomplete/src/composables/useAutocomplete.js +95 -93
- package/dist/components/KunAvatar/src/components/KunAvatar.vue.js +26 -26
- package/dist/components/KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js +41 -30
- package/dist/components/KunNumberField/src/components/KunNumberField.vue.js +135 -137
- package/dist/components/KunTextField/src/components/KunTextField.vue.js +62 -56
- package/dist/components/KunTextField/src/composables/useKunTextFieldComposable.js +25 -24
- package/dist/components/kunMenu/src/components/kunMenu.vue.js +35 -34
- package/dist/components/kunMenu/src/composables/kunMenuProps.js +21 -5
- package/dist/components/kunMenu/src/composables/useKunMenuStyles.js +29 -31
- package/dist/icons/IconAccountOutline.vue.js +20 -0
- package/dist/icons/IconClose.vue.js +14 -10
- package/dist/icons/IconPencil.vue.js +20 -0
- package/dist/icons/IconTrashOutline.vue.js +20 -0
- package/dist/icons/index.js +18 -12
- package/package.json +1 -1
|
@@ -1,86 +1,87 @@
|
|
|
1
|
-
import { onMounted as S, nextTick as T, onUnmounted as
|
|
2
|
-
import { useKunMenu as
|
|
3
|
-
import { kunMenuProps as
|
|
4
|
-
import { useKunMenuStyles as
|
|
1
|
+
import { onMounted as S, nextTick as T, onUnmounted as B, watch as V, onBeforeUnmount as z, createBlock as P, createCommentVNode as A, openBlock as D, Teleport as N, createVNode as W, Transition as $, withCtx as I, withDirectives as R, createElementVNode as U, mergeProps as F, unref as n, withKeys as O, withModifiers as Y, renderSlot as j, vShow as q } from "vue";
|
|
2
|
+
import { useKunMenu as G } from "../composables/useKunMenu.js";
|
|
3
|
+
import { kunMenuProps as J } from "../composables/kunMenuProps.js";
|
|
4
|
+
import { useKunMenuStyles as Q } from "../composables/useKunMenuStyles.js";
|
|
5
5
|
import { useKunMenuComposable as X } from "../composables/useKunMenuComposable.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import Z from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
8
|
const x = {
|
|
9
9
|
__name: "kunMenu",
|
|
10
|
-
props:
|
|
10
|
+
props: J,
|
|
11
11
|
emits: ["update:modelValue", "click:outside", "handleEscape"],
|
|
12
12
|
setup(f, { emit: h }) {
|
|
13
|
-
|
|
13
|
+
var v;
|
|
14
|
+
const r = f, u = h, {
|
|
14
15
|
menuVisible: d,
|
|
15
16
|
handleActivatorClick: m,
|
|
16
|
-
handleHover:
|
|
17
|
+
handleHover: s,
|
|
17
18
|
handleFocus: c,
|
|
18
|
-
handleEscape:
|
|
19
|
+
handleEscape: p,
|
|
19
20
|
hideMenu: w
|
|
20
|
-
} =
|
|
21
|
-
initializeMenu:
|
|
22
|
-
repositionMenu:
|
|
21
|
+
} = G(r, u), {
|
|
22
|
+
initializeMenu: g,
|
|
23
|
+
repositionMenu: a,
|
|
23
24
|
contentEl: o,
|
|
24
|
-
|
|
25
|
-
originClass: g,
|
|
25
|
+
originClass: E,
|
|
26
26
|
computedMaxHeight: k,
|
|
27
27
|
menuPositionStyle: y
|
|
28
|
-
} =
|
|
28
|
+
} = Q(r, m, s, c), { onClickOutside: L } = X(), { addEventListeners: M, removeEventListeners: b } = L(
|
|
29
29
|
o,
|
|
30
30
|
() => {
|
|
31
31
|
w(), u("click:outside");
|
|
32
32
|
},
|
|
33
|
-
[
|
|
33
|
+
[(v = r.parentRef) == null ? void 0 : v.$el]
|
|
34
34
|
);
|
|
35
35
|
S(() => {
|
|
36
36
|
T(() => {
|
|
37
|
-
|
|
37
|
+
g(), window.addEventListener("resize", a);
|
|
38
38
|
});
|
|
39
|
-
}),
|
|
39
|
+
}), B(() => {
|
|
40
40
|
const e = o.value;
|
|
41
|
-
e && e.removeEventListener("wheel",
|
|
42
|
-
}),
|
|
41
|
+
e && e.removeEventListener("wheel", l), window.removeEventListener("resize", a);
|
|
42
|
+
}), V(d, (e) => {
|
|
43
43
|
const t = o.value;
|
|
44
|
-
t && (e ? (
|
|
44
|
+
t && (e ? (a(), t.addEventListener("wheel", l, { passive: !1 }), M()) : (t.removeEventListener("wheel", l), b()));
|
|
45
45
|
});
|
|
46
|
-
function
|
|
46
|
+
function l(e) {
|
|
47
47
|
const t = o.value;
|
|
48
48
|
if (!t) return;
|
|
49
|
-
const
|
|
50
|
-
(
|
|
49
|
+
const i = e.deltaY > 0, H = t.scrollTop + t.clientHeight >= t.scrollHeight, K = t.scrollTop <= 0;
|
|
50
|
+
(i && H || !i && K) && e.preventDefault();
|
|
51
51
|
}
|
|
52
52
|
function C() {
|
|
53
|
-
|
|
54
|
-
e
|
|
53
|
+
var t;
|
|
54
|
+
const e = (t = r.parentRef) == null ? void 0 : t.$el;
|
|
55
|
+
e && (e.removeEventListener("click", m), e.removeEventListener("mouseenter", () => s("enter")), e.removeEventListener("mouseleave", () => s("leave")), e.removeEventListener("focus", c));
|
|
55
56
|
}
|
|
56
|
-
return
|
|
57
|
+
return z(() => {
|
|
57
58
|
C();
|
|
58
59
|
}), (e, t) => e.attach !== !0 ? (D(), P(N, {
|
|
59
60
|
key: 0,
|
|
60
61
|
to: e.attach || "body"
|
|
61
62
|
}, [
|
|
62
|
-
W(
|
|
63
|
-
default:
|
|
64
|
-
|
|
63
|
+
W($, { name: e.transition }, {
|
|
64
|
+
default: I(() => [
|
|
65
|
+
R(U("div", F({
|
|
65
66
|
ref_key: "contentEl",
|
|
66
67
|
ref: o,
|
|
67
68
|
role: "menu",
|
|
68
69
|
tabindex: "-1",
|
|
69
|
-
class: ["relative shadow-xl overflow-y-auto focus:outline-none
|
|
70
|
+
class: ["relative shadow-xl rounded-b overflow-y-auto focus:outline-none bg-gray-200 dark:bg-gray-800 border border-gray-300 dark:border-gray-700", [e.contentClass, n(E), e.width, e.height, e.minWidth, e.maxWidth, e.minHeight, e.maxHeight, e.zIndex]],
|
|
70
71
|
style: { ...n(y), maxHeight: n(k) }
|
|
71
72
|
}, e.contentProps, {
|
|
72
|
-
onKeydown: t[0] || (t[0] =
|
|
73
|
+
onKeydown: t[0] || (t[0] = O(Y((...i) => n(p) && n(p)(...i), ["stop"]), ["escape"]))
|
|
73
74
|
}), [
|
|
74
|
-
|
|
75
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
75
76
|
], 16), [
|
|
76
|
-
[
|
|
77
|
+
[q, n(d)]
|
|
77
78
|
])
|
|
78
79
|
]),
|
|
79
80
|
_: 3
|
|
80
81
|
}, 8, ["name"])
|
|
81
82
|
], 8, ["to"])) : A("", !0);
|
|
82
83
|
}
|
|
83
|
-
}, se = /* @__PURE__ */ Z(x, [["__scopeId", "data-v-
|
|
84
|
+
}, se = /* @__PURE__ */ Z(x, [["__scopeId", "data-v-8cdd3474"]]);
|
|
84
85
|
export {
|
|
85
86
|
se as default
|
|
86
87
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o = {
|
|
2
2
|
modelValue: Boolean,
|
|
3
3
|
activator: [String, Object],
|
|
4
4
|
activatorProps: {
|
|
@@ -38,6 +38,7 @@ const t = {
|
|
|
38
38
|
type: [String, Number],
|
|
39
39
|
default: "w-full"
|
|
40
40
|
},
|
|
41
|
+
zIndex: { type: String, default: "z-50" },
|
|
41
42
|
offset: [String, Number, Array],
|
|
42
43
|
openDelay: {
|
|
43
44
|
type: [String, Number],
|
|
@@ -50,16 +51,31 @@ const t = {
|
|
|
50
51
|
location: {
|
|
51
52
|
type: String,
|
|
52
53
|
default: "bottom",
|
|
53
|
-
validator: (
|
|
54
|
+
validator: (t) => ["top", "bottom", "left", "right"].includes(t)
|
|
54
55
|
},
|
|
55
56
|
origin: {
|
|
56
57
|
type: String,
|
|
57
|
-
default: "auto"
|
|
58
|
+
default: "auto",
|
|
59
|
+
validator: (t) => [
|
|
60
|
+
"auto",
|
|
61
|
+
"top left",
|
|
62
|
+
"top center",
|
|
63
|
+
"top right",
|
|
64
|
+
"bottom left",
|
|
65
|
+
"bottom center",
|
|
66
|
+
"bottom right",
|
|
67
|
+
"left top",
|
|
68
|
+
"left center",
|
|
69
|
+
"left bottom",
|
|
70
|
+
"right top",
|
|
71
|
+
"right center",
|
|
72
|
+
"right bottom"
|
|
73
|
+
].includes(t)
|
|
58
74
|
},
|
|
59
75
|
transition: {
|
|
60
76
|
type: String,
|
|
61
77
|
default: "scale",
|
|
62
|
-
validator: (
|
|
78
|
+
validator: (t) => ["fade", "slide-y", "slide-x", "scale"].includes(t)
|
|
63
79
|
},
|
|
64
80
|
persistent: Boolean,
|
|
65
81
|
zIndex: [String, Number],
|
|
@@ -78,5 +94,5 @@ const t = {
|
|
|
78
94
|
}
|
|
79
95
|
};
|
|
80
96
|
export {
|
|
81
|
-
|
|
97
|
+
o as kunMenuProps
|
|
82
98
|
};
|
|
@@ -1,51 +1,49 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
1
|
+
import { ref as a, computed as c } from "vue";
|
|
2
|
+
function E(n, u, o, f) {
|
|
3
|
+
const l = a({}), s = a(null), d = {
|
|
4
4
|
top: { class: "origin-bottom" },
|
|
5
5
|
bottom: { class: "origin-top" },
|
|
6
6
|
left: { class: "origin-right" },
|
|
7
7
|
right: { class: "origin-left" }
|
|
8
|
-
},
|
|
8
|
+
}, m = c(() => {
|
|
9
9
|
var t;
|
|
10
|
-
return ((t =
|
|
10
|
+
return ((t = d[n.location]) == null ? void 0 : t.class) || "origin-top";
|
|
11
11
|
});
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
requestAnimationFrame(() => f(t + 1));
|
|
12
|
+
function r(t = 0) {
|
|
13
|
+
const i = n.parentRef;
|
|
14
|
+
if (!(i instanceof HTMLElement)) return;
|
|
15
|
+
const e = i.getBoundingClientRect();
|
|
16
|
+
if ((e.width < 10 || e.height < 10) && t < 10) {
|
|
17
|
+
requestAnimationFrame(() => r(t + 1));
|
|
19
18
|
return;
|
|
20
19
|
}
|
|
21
|
-
const
|
|
22
|
-
|
|
20
|
+
const x = i.offsetWidth - i.clientWidth, p = n.hideDetails ? 0 : 19;
|
|
21
|
+
l.value = {
|
|
23
22
|
position: "absolute",
|
|
24
|
-
top: `${
|
|
25
|
-
left: `${
|
|
26
|
-
width: `${
|
|
23
|
+
top: `${e.bottom - p}px`,
|
|
24
|
+
left: `${e.left}px`,
|
|
25
|
+
width: `${e.width + x}px`
|
|
27
26
|
};
|
|
28
27
|
}
|
|
29
|
-
function
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
if (
|
|
28
|
+
function g() {
|
|
29
|
+
var i, e;
|
|
30
|
+
const t = ((i = n.parentRef) == null ? void 0 : i.$el) || ((e = s.value) == null ? void 0 : e.parentElement);
|
|
31
|
+
if (!(t instanceof HTMLElement)) {
|
|
33
32
|
console.warn("[KunMenu] Activator no válido:", t);
|
|
34
33
|
return;
|
|
35
34
|
}
|
|
36
|
-
t
|
|
35
|
+
t.addEventListener("click", u), t.addEventListener("mouseenter", () => o("enter")), t.addEventListener("mouseleave", () => o("leave")), t.addEventListener("focus", f);
|
|
37
36
|
}
|
|
38
|
-
const
|
|
37
|
+
const h = c(() => typeof n.maxHeight == "number" ? n.maxHeight + "px" : n.maxHeight);
|
|
39
38
|
return {
|
|
40
|
-
initializeMenu:
|
|
41
|
-
repositionMenu:
|
|
42
|
-
contentEl:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
menuPositionStyle: s
|
|
39
|
+
initializeMenu: g,
|
|
40
|
+
repositionMenu: r,
|
|
41
|
+
contentEl: s,
|
|
42
|
+
originClass: m,
|
|
43
|
+
computedMaxHeight: h,
|
|
44
|
+
menuPositionStyle: l
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
47
|
export {
|
|
50
|
-
|
|
48
|
+
E as useKunMenuStyles
|
|
51
49
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as o, createElementVNode as c } from "vue";
|
|
2
|
+
import n from "../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const r = {}, a = {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: "24",
|
|
6
|
+
height: "24",
|
|
7
|
+
viewBox: "0 0 24 24"
|
|
8
|
+
};
|
|
9
|
+
function l(m, t) {
|
|
10
|
+
return o(), e("svg", a, t[0] || (t[0] = [
|
|
11
|
+
c("path", {
|
|
12
|
+
fill: "currentColor",
|
|
13
|
+
d: "M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 2a2 2 0 0 0-2 2a2 2 0 0 0 2 2a2 2 0 0 0 2-2a2 2 0 0 0-2-2m0 7c2.67 0 8 1.33 8 4v3H4v-3c0-2.67 5.33-4 8-4m0 1.9c-2.97 0-6.1 1.46-6.1 2.1v1.1h12.2V17c0-.64-3.13-2.1-6.1-2.1"
|
|
14
|
+
}, null, -1)
|
|
15
|
+
]));
|
|
16
|
+
}
|
|
17
|
+
const f = /* @__PURE__ */ n(r, [["render", l]]);
|
|
18
|
+
export {
|
|
19
|
+
f as default
|
|
20
|
+
};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { createElementBlock as e, openBlock as o, createElementVNode as l } from "vue";
|
|
2
|
+
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const n = {}, c = {
|
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
width: "24",
|
|
6
|
+
height: "24",
|
|
7
|
+
viewBox: "0 0 24 24"
|
|
7
8
|
};
|
|
8
|
-
function s(
|
|
9
|
-
return
|
|
10
|
-
|
|
9
|
+
function s(i, t) {
|
|
10
|
+
return o(), e("svg", c, t[0] || (t[0] = [
|
|
11
|
+
l("path", {
|
|
12
|
+
fill: "currentColor",
|
|
13
|
+
d: "m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"
|
|
14
|
+
}, null, -1)
|
|
11
15
|
]));
|
|
12
16
|
}
|
|
13
|
-
const
|
|
17
|
+
const _ = /* @__PURE__ */ r(n, [["render", s]]);
|
|
14
18
|
export {
|
|
15
|
-
|
|
19
|
+
_ as default
|
|
16
20
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createElementBlock as t, openBlock as o, createElementVNode as r } from "vue";
|
|
2
|
+
import l from "../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const n = {}, c = {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: "24",
|
|
6
|
+
height: "24",
|
|
7
|
+
viewBox: "0 0 24 24"
|
|
8
|
+
};
|
|
9
|
+
function m(s, e) {
|
|
10
|
+
return o(), t("svg", c, e[0] || (e[0] = [
|
|
11
|
+
r("path", {
|
|
12
|
+
fill: "currentColor",
|
|
13
|
+
d: "m14.06 9l.94.94L5.92 19H5v-.92zm3.6-6c-.25 0-.51.1-.7.29l-1.83 1.83l3.75 3.75l1.83-1.83c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"
|
|
14
|
+
}, null, -1)
|
|
15
|
+
]));
|
|
16
|
+
}
|
|
17
|
+
const _ = /* @__PURE__ */ l(n, [["render", m]]);
|
|
18
|
+
export {
|
|
19
|
+
_ as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as o, createElementVNode as r } from "vue";
|
|
2
|
+
import n from "../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const l = {}, c = {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: "24",
|
|
6
|
+
height: "24",
|
|
7
|
+
viewBox: "0 0 24 24"
|
|
8
|
+
};
|
|
9
|
+
function s(h, t) {
|
|
10
|
+
return o(), e("svg", c, t[0] || (t[0] = [
|
|
11
|
+
r("path", {
|
|
12
|
+
fill: "currentColor",
|
|
13
|
+
d: "M6 19a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z"
|
|
14
|
+
}, null, -1)
|
|
15
|
+
]));
|
|
16
|
+
}
|
|
17
|
+
const a = /* @__PURE__ */ n(l, [["render", s]]);
|
|
18
|
+
export {
|
|
19
|
+
a as default
|
|
20
|
+
};
|
package/dist/icons/index.js
CHANGED
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import o from "./IconAsterisk.vue.js";
|
|
2
2
|
import e from "./IconCheck.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import t from "./IconClose.vue.js";
|
|
4
|
+
import n from "./IconDelete.vue.js";
|
|
5
|
+
import r from "./IconEdit.vue.js";
|
|
6
6
|
import i from "./IconMenuDownOutline.vue.js";
|
|
7
7
|
import m from "./IconMenuUpOutline.vue.js";
|
|
8
8
|
import c from "./IconSearch.vue.js";
|
|
9
9
|
import f from "./IconStar.vue.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
10
|
+
import l from "./IconEyeOutline.vue.js";
|
|
11
|
+
import p from "./IconEyeOffOutline.vue.js";
|
|
12
|
+
import u from "./IconAccountOutline.vue.js";
|
|
13
|
+
import I from "./IconPencil.vue.js";
|
|
14
|
+
import O from "./IconTrashOutline.vue.js";
|
|
15
|
+
const x = {
|
|
13
16
|
asterisk: o,
|
|
14
17
|
check: e,
|
|
15
|
-
close:
|
|
16
|
-
delete:
|
|
17
|
-
edit:
|
|
18
|
+
close: t,
|
|
19
|
+
delete: n,
|
|
20
|
+
edit: r,
|
|
18
21
|
menuDownOutline: i,
|
|
19
22
|
menuUpOutline: m,
|
|
20
23
|
search: c,
|
|
21
24
|
star: f,
|
|
22
|
-
eyeOutline:
|
|
23
|
-
eyeOffOutline:
|
|
25
|
+
eyeOutline: l,
|
|
26
|
+
eyeOffOutline: p,
|
|
27
|
+
accountOutline: u,
|
|
28
|
+
pencil: I,
|
|
29
|
+
trashOutline: O
|
|
24
30
|
};
|
|
25
31
|
export {
|
|
26
|
-
|
|
32
|
+
x as icons
|
|
27
33
|
};
|