adverich-kun-ui 0.1.79 → 0.1.81
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/KunAlert/src/components/KunAlert.vue.js +18 -18
- package/dist/components/KunAppbar/src/components/KunAppbar.vue.js +37 -33
- package/dist/components/KunAppbarTitle/src/components/KunAppbarTitle.vue.js +9 -9
- package/dist/components/KunBtn/src/components/KunBtn.vue.js +1 -1
- package/dist/components/KunBudge/src/components/KunBudge.vue.js +19 -14
- package/dist/components/KunCard/src/components/KunCard.vue.js +35 -41
- package/dist/components/KunCardActions/src/components/KunCardActions.vue.js +13 -14
- package/dist/components/KunCardItem/src/components/KunCardItem.vue.js +13 -14
- package/dist/components/KunCardSubtitle/src/components/KunCardSubtitle.vue.js +12 -15
- package/dist/components/KunCardText/src/components/KunCardText.vue.js +14 -15
- package/dist/components/KunCardTitle/src/components/KunCardTitle.vue.js +40 -44
- package/dist/components/KunChip/src/components/KunChip.vue.js +35 -35
- package/dist/components/KunChip/src/composables/useChip.js +5 -5
- package/dist/components/KunCol/src/components/KunCol.vue.js +9 -11
- package/dist/components/KunContainer/src/components/KunContainer.vue.js +14 -25
- package/dist/components/KunDivider/src/components/KunDivider.vue.js +11 -11
- package/dist/components/KunForm/src/components/KunForm.vue.js +17 -17
- package/dist/components/KunIcon/src/components/KunIcon.vue.js +19 -19
- package/dist/components/KunList/src/components/KunList.vue.js +36 -31
- package/dist/components/KunListGroup/src/components/KunListGroup.vue.js +75 -23
- package/dist/components/KunListImg/src/components/KunListImg.vue.js +17 -17
- package/dist/components/KunListItem/src/components/KunListItem.vue.js +37 -29
- package/dist/components/KunListItemAction/src/components/KunListItemAction.vue.js +25 -18
- package/dist/components/KunListItemAvatar/src/components/KunListItemAvatar.vue.js +42 -20
- package/dist/components/KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js +26 -17
- package/dist/components/KunListItemText/src/components/KunListItemText.vue.js +18 -19
- package/dist/components/KunListItemTitle/src/components/KunListItemTitle.vue.js +17 -18
- package/dist/components/KunListSubheader/src/components/KunListSubheader.vue.js +25 -17
- package/dist/components/KunLoaderCircular/src/components/KunLoaderCircular.vue.js +4 -4
- package/dist/components/KunRow/src/components/KunRow.vue.js +8 -10
- package/dist/components/KunSlider/src/components/KunSlider.vue.js +22 -23
- package/dist/components/KunSpacer/src/components/KunSpacer.vue.js +5 -5
- package/dist/components/KunSwitch/src/components/KunSwitch.vue.js +25 -25
- package/dist/components/KunTooltip/src/components/KunTooltip.vue.js +26 -26
- package/dist/index.js +24 -24
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as c, provide as
|
|
1
|
+
import { ref as c, provide as v, createElementBlock as b, openBlock as h, mergeProps as k, renderSlot as A } from "vue";
|
|
2
2
|
import { useKunList as B } from "../composables/useKunList.js";
|
|
3
3
|
const K = {
|
|
4
4
|
__name: "KunList",
|
|
@@ -9,65 +9,70 @@ const K = {
|
|
|
9
9
|
selectable: {
|
|
10
10
|
type: [Boolean, String],
|
|
11
11
|
default: !1,
|
|
12
|
-
validator: (
|
|
12
|
+
validator: (r) => ["single", "multiple", !0, !1].includes(r)
|
|
13
13
|
},
|
|
14
14
|
bgList: {
|
|
15
15
|
type: String,
|
|
16
16
|
default: "bg-transparent"
|
|
17
|
+
},
|
|
18
|
+
borderColor: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "border-gray-300 dark:border-gray-700"
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
emits: ["keyDown"],
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
22
|
-
B(
|
|
24
|
+
setup(r, { expose: d, emit: m }) {
|
|
25
|
+
const g = r, w = m;
|
|
26
|
+
B(g);
|
|
23
27
|
const u = c(null), l = c([]);
|
|
24
28
|
d({
|
|
25
29
|
focusWithKey: (e) => {
|
|
26
|
-
var
|
|
27
|
-
const
|
|
28
|
-
|
|
30
|
+
var n, o;
|
|
31
|
+
const t = l.value.filter(Boolean);
|
|
32
|
+
t.length !== 0 && (e === "ArrowDown" ? (n = t[0]) == null || n.focus() : e === "ArrowUp" && ((o = t[t.length - 1]) == null || o.focus()));
|
|
29
33
|
},
|
|
30
34
|
focus: () => {
|
|
31
|
-
var e,
|
|
32
|
-
(
|
|
35
|
+
var e, t;
|
|
36
|
+
(t = (e = u.value) == null ? void 0 : e.focus) == null || t.call(e);
|
|
33
37
|
}
|
|
34
|
-
}),
|
|
35
|
-
e ? l.value.includes(e) || l.value.push(e) : l.value = l.value.filter((
|
|
38
|
+
}), v("registerListItemRef", (e) => {
|
|
39
|
+
e ? l.value.includes(e) || l.value.push(e) : l.value = l.value.filter((t) => t !== e);
|
|
36
40
|
});
|
|
37
41
|
function p(e) {
|
|
38
42
|
var i, f, a;
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
43
|
+
const t = e.key;
|
|
44
|
+
if (w("keyDown", e), !["ArrowDown", "ArrowUp"].includes(t)) return;
|
|
41
45
|
e.preventDefault();
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
|
|
46
|
+
const n = l.value.filter(Boolean);
|
|
47
|
+
if (n.length === 0) return;
|
|
48
|
+
const o = n.findIndex((y) => y === document.activeElement);
|
|
49
|
+
if (o === -1) {
|
|
50
|
+
t === "ArrowDown" ? (i = n[0]) == null || i.focus() : t === "ArrowUp" && ((f = n[n.length - 1]) == null || f.focus());
|
|
47
51
|
return;
|
|
48
52
|
}
|
|
49
|
-
let s =
|
|
50
|
-
|
|
53
|
+
let s = o;
|
|
54
|
+
t === "ArrowDown" ? s = (o + 1) % n.length : t === "ArrowUp" && (s = (o - 1 + n.length) % n.length), (a = n[s]) == null || a.focus();
|
|
51
55
|
}
|
|
52
|
-
return (e,
|
|
56
|
+
return (e, t) => (h(), b("ul", k({
|
|
53
57
|
role: "list",
|
|
54
|
-
class:
|
|
58
|
+
class: ["w-full", [
|
|
55
59
|
"kun-list",
|
|
56
|
-
|
|
60
|
+
r.bgList,
|
|
61
|
+
r.borderColor,
|
|
57
62
|
{
|
|
58
|
-
"space-y-1": !
|
|
59
|
-
"space-y-0.5":
|
|
60
|
-
"pl-4 border-l-2
|
|
61
|
-
"p-2 rounded-md":
|
|
63
|
+
"space-y-1": !r.dense,
|
|
64
|
+
"space-y-0.5": r.dense,
|
|
65
|
+
"pl-4 border-l-2": r.sub,
|
|
66
|
+
"p-2 rounded-md": r.nav
|
|
62
67
|
}
|
|
63
|
-
]]
|
|
68
|
+
]],
|
|
64
69
|
ref_key: "ulRef",
|
|
65
70
|
ref: u,
|
|
66
71
|
tabindex: "-1",
|
|
67
72
|
onKeydown: p
|
|
68
|
-
}, [
|
|
73
|
+
}, e.$attrs), [
|
|
69
74
|
A(e.$slots, "default")
|
|
70
|
-
],
|
|
75
|
+
], 16));
|
|
71
76
|
}
|
|
72
77
|
};
|
|
73
78
|
export {
|
|
@@ -1,31 +1,83 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
|
|
1
|
+
import { ref as c, computed as y, watch as V, nextTick as w, onMounted as $, onBeforeUnmount as x, createElementBlock as k, openBlock as S, mergeProps as z, createElementVNode as i, withDirectives as R, withKeys as f, normalizeClass as m, withModifiers as B, renderSlot as v, createVNode as I, toDisplayString as H, vShow as K } from "vue";
|
|
2
|
+
import M from "../../../KunIcon/src/components/KunIcon.vue.js";
|
|
3
|
+
const O = ["aria-expanded", "aria-controls", "aria-disabled"], C = { class: "flex items-center gap-2" }, D = ["id"], j = {
|
|
3
4
|
__name: "KunListGroup",
|
|
4
5
|
props: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
type: [String, Object, Array],
|
|
11
|
-
default: null
|
|
12
|
-
}
|
|
6
|
+
modelValue: { type: Boolean, default: !1 },
|
|
7
|
+
title: { type: String, default: "" },
|
|
8
|
+
expandIcon: { type: String, default: "$mdi-chevron-up" },
|
|
9
|
+
collapseIcon: { type: String, default: "$mdi-chevron-down" },
|
|
10
|
+
disabled: { type: Boolean, default: !1 }
|
|
13
11
|
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
emits: ["update:modelValue"],
|
|
13
|
+
setup(t, { emit: g }) {
|
|
14
|
+
const a = t, h = g, o = c(null);
|
|
15
|
+
c(0);
|
|
16
|
+
const d = y(() => `kun-list-group-content-${Math.random().toString(36).slice(2)}`), s = () => {
|
|
17
|
+
h("update:modelValue", !a.modelValue);
|
|
18
|
+
}, r = () => {
|
|
19
|
+
if (!o.value) return;
|
|
20
|
+
const e = o.value;
|
|
21
|
+
e.style.height = "auto";
|
|
22
|
+
const n = `${e.scrollHeight}px`;
|
|
23
|
+
e.style.height = "0px", e.offsetHeight, e.style.height = n;
|
|
24
|
+
};
|
|
25
|
+
V(() => a.modelValue, async (e) => {
|
|
26
|
+
await w(), e ? r() : o.value && (o.value.style.height = "0px");
|
|
27
|
+
});
|
|
28
|
+
let l = null;
|
|
29
|
+
function p(e, n) {
|
|
30
|
+
!e || typeof ResizeObserver > "u" || (l = new ResizeObserver(() => {
|
|
31
|
+
n();
|
|
32
|
+
}), l.observe(e));
|
|
33
|
+
}
|
|
34
|
+
function b() {
|
|
35
|
+
l && (l.disconnect(), l = null);
|
|
36
|
+
}
|
|
37
|
+
return $(() => {
|
|
38
|
+
o.value && p(o.value, () => {
|
|
39
|
+
a.modelValue && r();
|
|
40
|
+
});
|
|
41
|
+
}), x(() => {
|
|
42
|
+
b();
|
|
43
|
+
}), (e, n) => (S(), k("div", z({ class: "kun-list-group" }, e.$attrs), [
|
|
44
|
+
i("div", {
|
|
45
|
+
class: m(["kun-list-group__activator flex items-center justify-between cursor-pointer select-none", { "opacity-50 pointer-events-none": t.disabled }]),
|
|
46
|
+
onClick: n[0] || (n[0] = (u) => !t.disabled && s()),
|
|
47
|
+
role: "button",
|
|
48
|
+
"aria-expanded": t.modelValue,
|
|
49
|
+
"aria-controls": d.value,
|
|
50
|
+
"aria-disabled": t.disabled,
|
|
51
|
+
tabindex: "0",
|
|
52
|
+
onKeydown: [
|
|
53
|
+
n[1] || (n[1] = f((u) => !t.disabled && s(), ["enter"])),
|
|
54
|
+
n[2] || (n[2] = f(B((u) => !t.disabled && s(), ["prevent"]), ["space"]))
|
|
55
|
+
]
|
|
56
|
+
}, [
|
|
57
|
+
v(e.$slots, "activator", {}, () => [
|
|
58
|
+
i("div", C, [
|
|
59
|
+
i("span", null, H(t.title), 1)
|
|
60
|
+
])
|
|
61
|
+
]),
|
|
62
|
+
I(M, {
|
|
63
|
+
icon: t.modelValue ? t.expandIcon : t.collapseIcon,
|
|
64
|
+
class: m(["transition-transform duration-300", { "rotate-180": t.modelValue }])
|
|
65
|
+
}, null, 8, ["icon", "class"])
|
|
66
|
+
], 42, O),
|
|
67
|
+
R(i("div", {
|
|
68
|
+
ref_key: "contentRef",
|
|
69
|
+
ref: o,
|
|
70
|
+
class: "kun-list-group__content pl-4 overflow-hidden transition-[height] duration-300 ease-in-out",
|
|
71
|
+
id: d.value,
|
|
72
|
+
role: "region"
|
|
73
|
+
}, [
|
|
74
|
+
v(e.$slots, "default")
|
|
75
|
+
], 8, D), [
|
|
76
|
+
[K, t.modelValue]
|
|
25
77
|
])
|
|
26
|
-
],
|
|
78
|
+
], 16));
|
|
27
79
|
}
|
|
28
80
|
};
|
|
29
81
|
export {
|
|
30
|
-
|
|
82
|
+
j as default
|
|
31
83
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
const c = ["src", "alt"],
|
|
1
|
+
import { createElementBlock as l, openBlock as o, mergeProps as s, createElementVNode as a } from "vue";
|
|
2
|
+
const c = ["src", "alt"], d = {
|
|
3
3
|
__name: "KunListImg",
|
|
4
4
|
props: {
|
|
5
5
|
src: {
|
|
@@ -10,28 +10,28 @@ const c = ["src", "alt"], i = {
|
|
|
10
10
|
type: String,
|
|
11
11
|
default: ""
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
type:
|
|
15
|
-
default:
|
|
13
|
+
bgColor: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "bg-gray-200 dark:bg-gray-700"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
return (
|
|
21
|
-
class:
|
|
18
|
+
setup(e) {
|
|
19
|
+
const t = e;
|
|
20
|
+
return (r, n) => (o(), l("div", s({
|
|
21
|
+
class: [
|
|
22
22
|
"kun-list-img",
|
|
23
|
-
"overflow-hidden rounded-md
|
|
24
|
-
e.
|
|
25
|
-
]
|
|
26
|
-
}, [
|
|
23
|
+
"overflow-hidden rounded-md",
|
|
24
|
+
e.bgColor
|
|
25
|
+
]
|
|
26
|
+
}, r.$attrs), [
|
|
27
27
|
a("img", {
|
|
28
|
-
src:
|
|
29
|
-
alt:
|
|
28
|
+
src: t.src,
|
|
29
|
+
alt: t.alt,
|
|
30
30
|
class: "w-full h-full object-cover"
|
|
31
31
|
}, null, 8, c)
|
|
32
|
-
],
|
|
32
|
+
], 16));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
d as default
|
|
37
37
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
const
|
|
1
|
+
import { ref as c, inject as o, onMounted as f, onBeforeUnmount as b, computed as s, createElementBlock as g, openBlock as m, mergeProps as v, renderSlot as y } from "vue";
|
|
2
|
+
const k = ["aria-selected", "aria-disabled"], h = {
|
|
3
3
|
__name: "KunListItem",
|
|
4
4
|
props: {
|
|
5
5
|
value: {
|
|
@@ -8,7 +8,6 @@ const S = {
|
|
|
8
8
|
},
|
|
9
9
|
disabled: Boolean,
|
|
10
10
|
active: Boolean,
|
|
11
|
-
// usado si se controla desde afuera
|
|
12
11
|
activeClass: {
|
|
13
12
|
type: String,
|
|
14
13
|
default: "bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-300"
|
|
@@ -17,6 +16,10 @@ const S = {
|
|
|
17
16
|
type: String,
|
|
18
17
|
default: "bg-transparent"
|
|
19
18
|
},
|
|
19
|
+
textColor: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "text-black dark:text-white"
|
|
22
|
+
},
|
|
20
23
|
hoverBg: {
|
|
21
24
|
type: String,
|
|
22
25
|
default: "hover:bg-gray-100 dark:hover:bg-gray-600"
|
|
@@ -24,47 +27,52 @@ const S = {
|
|
|
24
27
|
noGutters: {
|
|
25
28
|
type: Boolean,
|
|
26
29
|
default: !1
|
|
30
|
+
},
|
|
31
|
+
itemPosition: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "items-start"
|
|
27
34
|
}
|
|
28
35
|
},
|
|
29
36
|
setup(e) {
|
|
30
|
-
const
|
|
37
|
+
const a = e, i = c(null), r = o("registerListItemRef", null), t = o("kun-list", null);
|
|
31
38
|
f(() => {
|
|
32
|
-
|
|
33
|
-
}),
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
const u = i(l.active);
|
|
37
|
-
g(() => l.active, (a) => {
|
|
38
|
-
u.value = a;
|
|
39
|
-
});
|
|
40
|
-
const s = v(() => {
|
|
41
|
-
var a;
|
|
42
|
-
return ((a = t == null ? void 0 : t.isSelected) == null ? void 0 : a.call(t, l.value)) ?? !1;
|
|
39
|
+
r && i.value && r(i.value);
|
|
40
|
+
}), b(() => {
|
|
41
|
+
r && r(null);
|
|
43
42
|
});
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const n = s(() => {
|
|
44
|
+
var l;
|
|
45
|
+
return ((l = t == null ? void 0 : t.isSelected) == null ? void 0 : l.call(t, a.value)) ?? !1;
|
|
46
|
+
}), u = s(() => a.active);
|
|
47
|
+
function d() {
|
|
48
|
+
var l;
|
|
49
|
+
a.disabled || t && a.value !== null && ((l = t.toggleItem) == null || l.call(t, a.value));
|
|
46
50
|
}
|
|
47
|
-
return (
|
|
51
|
+
return (l, B) => (m(), g("li", v({
|
|
48
52
|
ref_key: "liRef",
|
|
49
|
-
ref:
|
|
50
|
-
role: "
|
|
53
|
+
ref: i,
|
|
54
|
+
role: "option",
|
|
55
|
+
"aria-selected": n.value || u.value,
|
|
56
|
+
"aria-disabled": e.disabled,
|
|
51
57
|
tabindex: "-1",
|
|
52
|
-
class:
|
|
58
|
+
class: ["w-full flex flex-col", [
|
|
53
59
|
"kun-list-item",
|
|
54
60
|
e.bgItems,
|
|
61
|
+
e.itemPosition,
|
|
62
|
+
e.textColor,
|
|
55
63
|
{
|
|
56
|
-
"cursor-not-allowed": e.disabled,
|
|
64
|
+
"cursor-not-allowed opacity-50": e.disabled,
|
|
57
65
|
[`cursor-pointer ${e.hoverBg}`]: !e.disabled,
|
|
58
|
-
[e.activeClass]:
|
|
66
|
+
[e.activeClass]: n.value || u.value,
|
|
59
67
|
"px-4 py-2": !e.noGutters
|
|
60
68
|
}
|
|
61
|
-
]]
|
|
62
|
-
onClick:
|
|
63
|
-
}, [
|
|
64
|
-
y(
|
|
65
|
-
],
|
|
69
|
+
]],
|
|
70
|
+
onClick: d
|
|
71
|
+
}, l.$attrs), [
|
|
72
|
+
y(l.$slots, "default")
|
|
73
|
+
], 16, k));
|
|
66
74
|
}
|
|
67
75
|
};
|
|
68
76
|
export {
|
|
69
|
-
|
|
77
|
+
h as default
|
|
70
78
|
};
|
|
@@ -1,31 +1,38 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
const
|
|
1
|
+
import { createElementBlock as n, openBlock as r, mergeProps as o, renderSlot as a, createTextVNode as l, toDisplayString as i } from "vue";
|
|
2
|
+
const s = {
|
|
3
3
|
__name: "KunListItemAction",
|
|
4
4
|
props: {
|
|
5
5
|
text: {
|
|
6
6
|
type: [String, Number],
|
|
7
7
|
default: null
|
|
8
8
|
},
|
|
9
|
-
|
|
10
|
-
type:
|
|
11
|
-
default:
|
|
9
|
+
textColor: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "text-black dark:text-white"
|
|
12
|
+
},
|
|
13
|
+
fontSize: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "text-sm"
|
|
16
|
+
},
|
|
17
|
+
fontWeight: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "font-medium"
|
|
12
20
|
}
|
|
13
21
|
},
|
|
14
|
-
setup(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
o(c(t.text), 1)
|
|
22
|
+
setup(t) {
|
|
23
|
+
return (e, f) => (r(), n("span", o({
|
|
24
|
+
class: [
|
|
25
|
+
t.textColor,
|
|
26
|
+
t.fontSize,
|
|
27
|
+
t.fontWeight
|
|
28
|
+
]
|
|
29
|
+
}, e.$attrs), [
|
|
30
|
+
a(e.$slots, "default", {}, () => [
|
|
31
|
+
l(i(t.text), 1)
|
|
25
32
|
])
|
|
26
|
-
],
|
|
33
|
+
], 16));
|
|
27
34
|
}
|
|
28
35
|
};
|
|
29
36
|
export {
|
|
30
|
-
|
|
37
|
+
s as default
|
|
31
38
|
};
|
|
@@ -1,31 +1,53 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
|
|
1
|
+
import { createElementBlock as r, openBlock as a, mergeProps as n, unref as s, renderSlot as l, createCommentVNode as d, toDisplayString as i } from "vue";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import u from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "truncate"
|
|
7
|
+
}, f = {
|
|
3
8
|
__name: "KunListItemAvatar",
|
|
4
9
|
props: {
|
|
5
10
|
text: {
|
|
6
11
|
type: [String, Number],
|
|
7
12
|
default: null
|
|
8
13
|
},
|
|
9
|
-
|
|
10
|
-
type:
|
|
11
|
-
default:
|
|
14
|
+
size: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "md"
|
|
17
|
+
// sm, md, lg
|
|
18
|
+
},
|
|
19
|
+
rounded: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "rounded-full"
|
|
22
|
+
},
|
|
23
|
+
bgColor: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "bg-gray-300 dark:bg-gray-700"
|
|
26
|
+
},
|
|
27
|
+
textColor: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "text-white"
|
|
30
|
+
},
|
|
31
|
+
fontWeight: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "font-medium"
|
|
12
34
|
}
|
|
13
35
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
]
|
|
22
|
-
}, [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
])
|
|
26
|
-
],
|
|
36
|
+
setup(t) {
|
|
37
|
+
const o = {
|
|
38
|
+
sm: "w-6 h-6 text-xs",
|
|
39
|
+
md: "w-8 h-8 text-sm",
|
|
40
|
+
lg: "w-10 h-10 text-base"
|
|
41
|
+
}[t.size] || "w-8 h-8 text-sm";
|
|
42
|
+
return (e, g) => (a(), r("div", n({
|
|
43
|
+
class: ["kun-list-item-avatar", [s(o), t.rounded, t.bgColor, t.textColor, t.fontWeight]]
|
|
44
|
+
}, e.$attrs), [
|
|
45
|
+
l(e.$slots, "default", {}, () => [
|
|
46
|
+
t.text ? (a(), r("span", m, i(t.text), 1)) : d("", !0)
|
|
47
|
+
], !0)
|
|
48
|
+
], 16));
|
|
27
49
|
}
|
|
28
|
-
};
|
|
50
|
+
}, h = /* @__PURE__ */ u(f, [["__scopeId", "data-v-fd4532c9"]]);
|
|
29
51
|
export {
|
|
30
|
-
|
|
52
|
+
h as default
|
|
31
53
|
};
|
|
@@ -1,31 +1,40 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
const
|
|
1
|
+
import { createElementBlock as r, openBlock as n, mergeProps as a, renderSlot as l, createTextVNode as o, toDisplayString as i } from "vue";
|
|
2
|
+
const f = {
|
|
3
3
|
__name: "KunListItemSubtitle",
|
|
4
4
|
props: {
|
|
5
5
|
text: {
|
|
6
6
|
type: [String, Number],
|
|
7
7
|
default: null
|
|
8
8
|
},
|
|
9
|
-
|
|
10
|
-
type:
|
|
11
|
-
default:
|
|
9
|
+
textColor: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "text-gray-500 dark:text-gray-400"
|
|
12
|
+
},
|
|
13
|
+
fontSize: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "text-xs"
|
|
16
|
+
},
|
|
17
|
+
fontWeight: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "font-medium"
|
|
12
20
|
}
|
|
13
21
|
},
|
|
14
|
-
setup(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class: l([
|
|
22
|
+
setup(t) {
|
|
23
|
+
return (e, u) => (n(), r("span", a({
|
|
24
|
+
class: [
|
|
18
25
|
"kun-list-item-subtitle",
|
|
19
|
-
"
|
|
20
|
-
t.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
"truncate",
|
|
27
|
+
t.textColor,
|
|
28
|
+
t.fontSize,
|
|
29
|
+
t.fontWeight
|
|
30
|
+
]
|
|
31
|
+
}, e.$attrs), [
|
|
32
|
+
l(e.$slots, "default", {}, () => [
|
|
33
|
+
o(i(t.text), 1)
|
|
25
34
|
])
|
|
26
|
-
],
|
|
35
|
+
], 16));
|
|
27
36
|
}
|
|
28
37
|
};
|
|
29
38
|
export {
|
|
30
|
-
|
|
39
|
+
f as default
|
|
31
40
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createElementBlock as r, openBlock as
|
|
2
|
-
const
|
|
1
|
+
import { createElementBlock as r, openBlock as n, mergeProps as a, renderSlot as o, createTextVNode as l, toDisplayString as i } from "vue";
|
|
2
|
+
const s = {
|
|
3
3
|
__name: "KunListItemText",
|
|
4
4
|
props: {
|
|
5
5
|
text: {
|
|
@@ -10,31 +10,30 @@ const p = {
|
|
|
10
10
|
type: String,
|
|
11
11
|
default: "text-sm"
|
|
12
12
|
},
|
|
13
|
+
textColor: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "text-gray-500 dark:text-gray-400"
|
|
16
|
+
},
|
|
13
17
|
fontWeight: {
|
|
14
18
|
type: String,
|
|
15
19
|
default: "font-medium"
|
|
16
|
-
},
|
|
17
|
-
class: {
|
|
18
|
-
type: [String, Object, Array],
|
|
19
|
-
default: null
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
setup(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
setup(t) {
|
|
23
|
+
return (e, u) => (n(), r("span", a({
|
|
24
|
+
class: [
|
|
25
|
+
"truncate",
|
|
26
26
|
t.fontSize,
|
|
27
|
-
t.
|
|
28
|
-
t.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
o(i(t.text), 1)
|
|
27
|
+
t.textColor,
|
|
28
|
+
t.fontWeight
|
|
29
|
+
]
|
|
30
|
+
}, e.$attrs), [
|
|
31
|
+
o(e.$slots, "default", {}, () => [
|
|
32
|
+
l(i(t.text), 1)
|
|
34
33
|
])
|
|
35
|
-
],
|
|
34
|
+
], 16));
|
|
36
35
|
}
|
|
37
36
|
};
|
|
38
37
|
export {
|
|
39
|
-
|
|
38
|
+
s as default
|
|
40
39
|
};
|