adverich-kun-ui 0.1.75 → 0.1.77
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 +193 -33
- package/dist/components/KunAppbar/src/components/KunAppbar.vue.js +69 -41
- package/dist/components/KunAppbarTitle/src/components/KunAppbarTitle.vue.js +9 -5
- package/dist/components/KunAutocomplete/src/components/KunAutocomplete.vue.js +51 -52
- package/dist/components/KunAutocomplete/src/composables/useAutocomplete.js +1 -1
- package/dist/components/KunBtn/src/components/KunBtn.vue.js +86 -77
- package/dist/components/KunCard/src/components/KunCard.vue.js +38 -32
- package/dist/components/KunCard/src/composables/kunCardProps.js +4 -8
- package/dist/components/KunCardActions/src/components/KunCardActions.vue.js +18 -16
- package/dist/components/KunCardActions/src/composables/kunCardActionsProps.js +0 -8
- package/dist/components/KunCardItem/src/components/KunCardItem.vue.js +17 -16
- package/dist/components/KunCardItem/src/composables/kunCardItemProps.js +0 -8
- package/dist/components/KunCardSubtitle/src/components/KunCardSubtitle.vue.js +16 -17
- package/dist/components/KunCardSubtitle/src/composables/kunCardSubtitleProps.js +1 -9
- package/dist/components/KunCardText/src/components/KunCardText.vue.js +16 -17
- package/dist/components/KunCardText/src/composables/kunCardTextProps.js +1 -9
- package/dist/components/KunCardTitle/src/components/KunCardTitle.vue.js +57 -45
- package/dist/components/KunCardTitle/src/composables/kunCardTitleProps.js +5 -25
- package/dist/components/KunChip/src/components/KunChip.vue.js +63 -47
- package/dist/components/KunChip/src/composables/kunChipProps.js +7 -17
- package/dist/components/KunChip/src/composables/useChip.js +10 -19
- package/dist/components/KunList/src/components/KunList.vue.js +31 -35
- package/dist/components/kunMenu/src/components/kunMenu.vue.js +48 -48
- package/dist/components/kunMenu/src/composables/kunMenuProps.js +0 -4
- package/dist/components/kunMenu/src/composables/useKunMenuStyles.js +31 -14
- package/dist/icons/IconMenuRounded.vue.js +17 -0
- package/dist/index.js +68 -65
- package/package.json +1 -1
- package/dist/components/KunCard/src/composables/useCard.js +0 -17
- package/dist/components/KunCardActions/src/composables/useCardActions.js +0 -19
- package/dist/components/KunCardItem/src/composables/useCardItem.js +0 -17
- package/dist/components/KunCardSubtitle/src/composables/useCardSubtitle.js +0 -15
- package/dist/components/KunCardText/src/composables/useCardText.js +0 -15
- package/dist/components/KunCardTitle/src/composables/useCardTitle.js +0 -25
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const k = {
|
|
1
|
+
import { useAttrs as l, computed as a, createElementBlock as n, openBlock as p, normalizeClass as c, renderSlot as u } from "vue";
|
|
2
|
+
import { kunCardItemProps as m } from "../composables/kunCardItemProps.js";
|
|
3
|
+
const x = {
|
|
5
4
|
__name: "KunCardItem",
|
|
6
|
-
props:
|
|
7
|
-
setup(
|
|
8
|
-
const t =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class
|
|
14
|
-
|
|
5
|
+
props: m,
|
|
6
|
+
setup(t) {
|
|
7
|
+
const e = t, r = l(), s = a(() => [
|
|
8
|
+
"flex",
|
|
9
|
+
"flex-col",
|
|
10
|
+
e.dense ? "py-1 px-2" : "py-3 px-4",
|
|
11
|
+
e.gap,
|
|
12
|
+
r.class
|
|
13
|
+
].filter(Boolean));
|
|
14
|
+
return (o, f) => (p(), n("div", {
|
|
15
|
+
class: c(["w-full", s.value])
|
|
15
16
|
}, [
|
|
16
|
-
|
|
17
|
-
],
|
|
17
|
+
u(o.$slots, "default")
|
|
18
|
+
], 2));
|
|
18
19
|
}
|
|
19
20
|
};
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
x as default
|
|
22
23
|
};
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const _ = {
|
|
1
|
+
import { useAttrs as a, computed as l, createElementBlock as n, openBlock as c, normalizeClass as u, renderSlot as m, createTextVNode as p, toDisplayString as i } from "vue";
|
|
2
|
+
import { kunCardSubtitleProps as d } from "../composables/kunCardSubtitleProps.js";
|
|
3
|
+
const S = {
|
|
5
4
|
__name: "KunCardSubtitle",
|
|
6
|
-
props:
|
|
7
|
-
setup(
|
|
8
|
-
const o =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
props: d,
|
|
6
|
+
setup(s) {
|
|
7
|
+
const t = s, o = a(), r = l(() => [
|
|
8
|
+
t.color,
|
|
9
|
+
t.dense ? "text-xs" : "text-sm",
|
|
10
|
+
o.class
|
|
11
|
+
].filter(Boolean));
|
|
12
|
+
return (e, f) => (c(), n("div", {
|
|
13
|
+
class: u(["text-sm text-gray-500 font-normal", r.value])
|
|
15
14
|
}, [
|
|
16
|
-
m(
|
|
17
|
-
p(
|
|
15
|
+
m(e.$slots, "default", {}, () => [
|
|
16
|
+
p(i(e.subtitle), 1)
|
|
18
17
|
])
|
|
19
|
-
],
|
|
18
|
+
], 2));
|
|
20
19
|
}
|
|
21
20
|
};
|
|
22
21
|
export {
|
|
23
|
-
|
|
22
|
+
S as default
|
|
24
23
|
};
|
|
@@ -9,15 +9,7 @@ const t = {
|
|
|
9
9
|
},
|
|
10
10
|
color: {
|
|
11
11
|
type: String,
|
|
12
|
-
default: "text-gray-
|
|
13
|
-
},
|
|
14
|
-
class: {
|
|
15
|
-
type: [String, Array, Object],
|
|
16
|
-
default: null
|
|
17
|
-
},
|
|
18
|
-
style: {
|
|
19
|
-
type: Object,
|
|
20
|
-
default: null
|
|
12
|
+
default: "text-gray-700 dark:text-gray-300"
|
|
21
13
|
}
|
|
22
14
|
};
|
|
23
15
|
export {
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const S = {
|
|
1
|
+
import { useAttrs as a, computed as l, createElementBlock as n, openBlock as c, normalizeClass as p, renderSlot as u, createTextVNode as m, toDisplayString as d } from "vue";
|
|
2
|
+
import { kunCardTextProps as i } from "../composables/kunCardTextProps.js";
|
|
3
|
+
const C = {
|
|
5
4
|
__name: "KunCardText",
|
|
6
|
-
props:
|
|
7
|
-
setup(
|
|
8
|
-
const o =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
props: i,
|
|
6
|
+
setup(s) {
|
|
7
|
+
const t = s, o = a(), r = l(() => [
|
|
8
|
+
t.color,
|
|
9
|
+
t.dense ? "text-xs" : "text-sm",
|
|
10
|
+
o.class
|
|
11
|
+
].filter(Boolean));
|
|
12
|
+
return (e, x) => (c(), n("div", {
|
|
13
|
+
class: p(["block", r.value])
|
|
15
14
|
}, [
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
u(e.$slots, "default", {}, () => [
|
|
16
|
+
m(d(e.text), 1)
|
|
18
17
|
])
|
|
19
|
-
],
|
|
18
|
+
], 2));
|
|
20
19
|
}
|
|
21
20
|
};
|
|
22
21
|
export {
|
|
23
|
-
|
|
22
|
+
C as default
|
|
24
23
|
};
|
|
@@ -5,19 +5,11 @@ const t = {
|
|
|
5
5
|
},
|
|
6
6
|
color: {
|
|
7
7
|
type: String,
|
|
8
|
-
default: "text-gray-700"
|
|
8
|
+
default: "text-gray-700 dark:text-gray-300"
|
|
9
9
|
},
|
|
10
10
|
dense: {
|
|
11
11
|
type: Boolean,
|
|
12
12
|
default: !1
|
|
13
|
-
},
|
|
14
|
-
class: {
|
|
15
|
-
type: [String, Array, Object],
|
|
16
|
-
default: null
|
|
17
|
-
},
|
|
18
|
-
style: {
|
|
19
|
-
type: Object,
|
|
20
|
-
default: null
|
|
21
13
|
}
|
|
22
14
|
};
|
|
23
15
|
export {
|
|
@@ -1,61 +1,73 @@
|
|
|
1
|
-
import { createElementBlock as r, openBlock as s, normalizeStyle as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { useAttrs as $, computed as n, createElementBlock as r, openBlock as s, normalizeStyle as v, normalizeClass as d, createCommentVNode as o, createElementVNode as i, renderSlot as l, createBlock as p, createTextVNode as u, toDisplayString as c } from "vue";
|
|
2
|
+
import { kunCardTitleProps as C } from "../composables/kunCardTitleProps.js";
|
|
3
|
+
import m from "../../../KunIcon/src/components/KunIcon.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import _ from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const g = {
|
|
6
7
|
key: 0,
|
|
7
|
-
class: "
|
|
8
|
-
},
|
|
8
|
+
class: "kun-card-title__prepend"
|
|
9
|
+
}, w = { class: "kun-card-title__content" }, B = {
|
|
9
10
|
key: 1,
|
|
10
|
-
class: "
|
|
11
|
-
},
|
|
11
|
+
class: "kun-card-title__append"
|
|
12
|
+
}, S = {
|
|
12
13
|
__name: "KunCardTitle",
|
|
13
|
-
props:
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
props: C,
|
|
15
|
+
setup(h) {
|
|
16
|
+
const a = $(), t = h, f = n(() => [
|
|
17
|
+
"kun-card-title",
|
|
18
|
+
t.dense ? "py-1 px-2 text-sm" : "py-3 px-4 text-base",
|
|
19
|
+
t.flat ? "shadow-none" : "shadow",
|
|
20
|
+
t.rounded === !0 ? "rounded-md" : t.rounded ? `rounded-${t.rounded}` : "",
|
|
21
|
+
t.bgColor,
|
|
22
|
+
t.textColor,
|
|
23
|
+
a.class
|
|
24
|
+
// External class
|
|
25
|
+
].filter(Boolean)), y = n(() => ({
|
|
26
|
+
height: typeof t.height == "number" ? `${t.height}px` : t.height,
|
|
27
|
+
width: typeof t.width == "number" ? `${t.width}px` : t.width,
|
|
28
|
+
...a.style
|
|
29
|
+
// External style
|
|
30
|
+
})), k = n(() => t.dense ? "font-medium" : "font-semibold"), b = n(() => "text-xs opacity-75 mt-1");
|
|
31
|
+
return (e, T) => (s(), r("div", {
|
|
32
|
+
class: d(f.value),
|
|
33
|
+
style: v(y.value)
|
|
26
34
|
}, [
|
|
27
|
-
e.$slots.prepend ||
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
e.$slots.prepend || e.prepend ? (s(), r("div", g, [
|
|
36
|
+
l(e.$slots, "prepend", {}, () => [
|
|
37
|
+
e.prepend ? (s(), p(m, {
|
|
30
38
|
key: 0,
|
|
31
39
|
icon: e.prepend
|
|
32
|
-
}, null, 8, ["icon"])) :
|
|
33
|
-
])
|
|
34
|
-
])) :
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class:
|
|
40
|
+
}, null, 8, ["icon"])) : o("", !0)
|
|
41
|
+
], !0)
|
|
42
|
+
])) : o("", !0),
|
|
43
|
+
i("div", w, [
|
|
44
|
+
i("h3", {
|
|
45
|
+
class: d(k.value)
|
|
38
46
|
}, [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
])
|
|
47
|
+
l(e.$slots, "default", {}, () => [
|
|
48
|
+
u(c(e.title), 1)
|
|
49
|
+
], !0)
|
|
42
50
|
], 2),
|
|
43
|
-
e.subtitle ? (s(), r("div", {
|
|
51
|
+
e.$slots.subtitle || e.subtitle ? (s(), r("div", {
|
|
44
52
|
key: 0,
|
|
45
|
-
class:
|
|
46
|
-
},
|
|
53
|
+
class: d(b.value)
|
|
54
|
+
}, [
|
|
55
|
+
l(e.$slots, "subtitle", {}, () => [
|
|
56
|
+
u(c(e.subtitle), 1)
|
|
57
|
+
], !0)
|
|
58
|
+
], 2)) : o("", !0)
|
|
47
59
|
]),
|
|
48
|
-
e.$slots.append ||
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
e.$slots.append || e.append ? (s(), r("div", B, [
|
|
61
|
+
l(e.$slots, "append", {}, () => [
|
|
62
|
+
e.append ? (s(), p(m, {
|
|
51
63
|
key: 0,
|
|
52
64
|
icon: e.append
|
|
53
|
-
}, null, 8, ["icon"])) :
|
|
54
|
-
])
|
|
55
|
-
])) :
|
|
65
|
+
}, null, 8, ["icon"])) : o("", !0)
|
|
66
|
+
], !0)
|
|
67
|
+
])) : o("", !0)
|
|
56
68
|
], 6));
|
|
57
69
|
}
|
|
58
|
-
};
|
|
70
|
+
}, A = /* @__PURE__ */ _(S, [["__scopeId", "data-v-b4ca8b81"]]);
|
|
59
71
|
export {
|
|
60
|
-
|
|
72
|
+
A as default
|
|
61
73
|
};
|
|
@@ -1,27 +1,15 @@
|
|
|
1
1
|
const e = {
|
|
2
|
-
title:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
subtitle: {
|
|
7
|
-
type: String,
|
|
8
|
-
default: null
|
|
9
|
-
},
|
|
10
|
-
prepend: {
|
|
11
|
-
type: [String, Object, Function],
|
|
12
|
-
default: null
|
|
13
|
-
},
|
|
14
|
-
append: {
|
|
15
|
-
type: [String, Object, Function],
|
|
16
|
-
default: null
|
|
17
|
-
},
|
|
2
|
+
title: String,
|
|
3
|
+
subtitle: String,
|
|
4
|
+
prepend: [String, Object, Function],
|
|
5
|
+
append: [String, Object, Function],
|
|
18
6
|
bgColor: {
|
|
19
7
|
type: String,
|
|
20
8
|
default: "bg-white"
|
|
21
9
|
},
|
|
22
10
|
textColor: {
|
|
23
11
|
type: String,
|
|
24
|
-
default: "text-gray-800"
|
|
12
|
+
default: "text-gray-800 dark:text-gray-200"
|
|
25
13
|
},
|
|
26
14
|
dense: {
|
|
27
15
|
type: Boolean,
|
|
@@ -43,14 +31,6 @@ const e = {
|
|
|
43
31
|
width: {
|
|
44
32
|
type: [String, Number],
|
|
45
33
|
default: "full"
|
|
46
|
-
},
|
|
47
|
-
class: {
|
|
48
|
-
type: [String, Array, Object],
|
|
49
|
-
default: null
|
|
50
|
-
},
|
|
51
|
-
style: {
|
|
52
|
-
type: Object,
|
|
53
|
-
default: null
|
|
54
34
|
}
|
|
55
35
|
};
|
|
56
36
|
export {
|
|
@@ -1,60 +1,76 @@
|
|
|
1
|
-
import { createBlock as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { useAttrs as I, computed as V, createBlock as p, openBlock as o, resolveDynamicComponent as _, unref as s, mergeProps as B, withModifiers as u, withCtx as N, createElementBlock as r, createCommentVNode as t, createElementVNode as g, renderSlot as l, createTextVNode as w, toDisplayString as A, createVNode as D } from "vue";
|
|
2
|
+
import { kunChipProps as E } from "../composables/kunChipProps.js";
|
|
3
|
+
import { useChip as K } from "../composables/useChip.js";
|
|
4
|
+
import a from "../../../KunIcon/src/components/KunIcon.vue.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import L from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
+
const P = {
|
|
6
8
|
key: 0,
|
|
7
|
-
class: "mr-1"
|
|
8
|
-
},
|
|
9
|
+
class: "kun-chip__prepend mr-1"
|
|
10
|
+
}, S = { class: "kun-chip__content truncate" }, T = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "kun-chip__append ml-1"
|
|
13
|
+
}, M = ["aria-label"], j = {
|
|
9
14
|
__name: "KunChip",
|
|
10
|
-
props:
|
|
15
|
+
props: E,
|
|
11
16
|
emits: ["update:modelValue", "click:close"],
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
componentTag:
|
|
15
|
-
componentAttrs:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
setup(c, { emit: m }) {
|
|
18
|
+
const k = c, f = m, i = I(), {
|
|
19
|
+
componentTag: h,
|
|
20
|
+
componentAttrs: y,
|
|
21
|
+
computedClass: C,
|
|
22
|
+
isLink: b,
|
|
23
|
+
handleClose: d
|
|
24
|
+
} = K(k, f), $ = V(() => [
|
|
25
|
+
"kun-chip",
|
|
26
|
+
...C.value,
|
|
27
|
+
i.class
|
|
28
|
+
].filter(Boolean));
|
|
29
|
+
return (e, n) => (o(), p(_(s(h)), B(s(y), {
|
|
30
|
+
class: $.value,
|
|
31
|
+
style: s(i).style,
|
|
32
|
+
disabled: !s(b) && e.disabled ? !0 : void 0,
|
|
33
|
+
onClick: n[1] || (n[1] = u(() => {
|
|
26
34
|
}, ["stop"]))
|
|
27
35
|
}), {
|
|
28
|
-
default:
|
|
29
|
-
e.prependIcon ? (o(),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
default: N(() => [
|
|
37
|
+
e.$slots.prepend || e.prependIcon ? (o(), r("div", P, [
|
|
38
|
+
l(e.$slots, "prepend", {}, () => [
|
|
39
|
+
e.prependIcon ? (o(), p(a, {
|
|
40
|
+
key: 0,
|
|
41
|
+
icon: e.prependIcon
|
|
42
|
+
}, null, 8, ["icon"])) : t("", !0)
|
|
43
|
+
], !0)
|
|
44
|
+
])) : t("", !0),
|
|
45
|
+
g("div", S, [
|
|
46
|
+
e.$slots.default ? l(e.$slots, "default", { key: 0 }, () => [
|
|
47
|
+
w(A(e.label || e.text), 1)
|
|
48
|
+
], !0) : t("", !0)
|
|
36
49
|
]),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
e.$slots.append || e.appendIcon ? (o(), r("div", T, [
|
|
51
|
+
l(e.$slots, "append", {}, () => [
|
|
52
|
+
e.appendIcon ? (o(), p(a, {
|
|
53
|
+
key: 0,
|
|
54
|
+
icon: e.appendIcon
|
|
55
|
+
}, null, 8, ["icon"])) : t("", !0)
|
|
56
|
+
], !0)
|
|
57
|
+
])) : t("", !0),
|
|
58
|
+
e.closable && e.modelValue ? (o(), r("button", {
|
|
40
59
|
key: 2,
|
|
41
|
-
|
|
42
|
-
class: "ml-1
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class: "ml-1 flex-shrink-0 cursor-pointer",
|
|
51
|
-
onClick: s(y)
|
|
52
|
-
}, null, 8, ["onClick"])) : l("", !0)
|
|
60
|
+
type: "button",
|
|
61
|
+
class: "kun-chip__close ml-1",
|
|
62
|
+
"aria-label": e.closeLabel,
|
|
63
|
+
onClick: n[0] || (n[0] = u((...v) => s(d) && s(d)(...v), ["stop", "prevent"]))
|
|
64
|
+
}, [
|
|
65
|
+
l(e.$slots, "close", {}, () => [
|
|
66
|
+
D(a, { icon: "$mdi-close" })
|
|
67
|
+
], !0)
|
|
68
|
+
], 8, M)) : t("", !0)
|
|
53
69
|
]),
|
|
54
70
|
_: 3
|
|
55
71
|
}, 16, ["class", "style", "disabled"]));
|
|
56
72
|
}
|
|
57
|
-
};
|
|
73
|
+
}, O = /* @__PURE__ */ L(j, [["__scopeId", "data-v-2b855a0d"]]);
|
|
58
74
|
export {
|
|
59
|
-
|
|
75
|
+
O as default
|
|
60
76
|
};
|
|
@@ -17,17 +17,21 @@ const e = {
|
|
|
17
17
|
},
|
|
18
18
|
color: {
|
|
19
19
|
type: String,
|
|
20
|
-
default: "bg-
|
|
20
|
+
default: "bg-slate-200 dark:bg-slate-800"
|
|
21
21
|
},
|
|
22
22
|
textColor: {
|
|
23
23
|
type: String,
|
|
24
|
-
default: "text-
|
|
24
|
+
default: "text-slate-700 dark:text-slate-300"
|
|
25
25
|
},
|
|
26
26
|
variant: {
|
|
27
27
|
type: String,
|
|
28
28
|
default: "default",
|
|
29
29
|
validator: (t) => ["default", "outlined", "flat", "pill"].includes(t)
|
|
30
30
|
},
|
|
31
|
+
clickable: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !0
|
|
34
|
+
},
|
|
31
35
|
closable: {
|
|
32
36
|
type: Boolean,
|
|
33
37
|
default: !1
|
|
@@ -41,10 +45,6 @@ const e = {
|
|
|
41
45
|
default: "default",
|
|
42
46
|
validator: (t) => ["default", "comfortable", "compact"].includes(t)
|
|
43
47
|
},
|
|
44
|
-
icon: {
|
|
45
|
-
type: [String, Object, Function],
|
|
46
|
-
default: null
|
|
47
|
-
},
|
|
48
48
|
prependIcon: {
|
|
49
49
|
type: [String, Object, Function],
|
|
50
50
|
default: null
|
|
@@ -68,17 +68,7 @@ const e = {
|
|
|
68
68
|
target: {
|
|
69
69
|
type: String,
|
|
70
70
|
default: null
|
|
71
|
-
}
|
|
72
|
-
class: {
|
|
73
|
-
type: [String, Array, Object],
|
|
74
|
-
default: null
|
|
75
|
-
},
|
|
76
|
-
style: {
|
|
77
|
-
type: Object,
|
|
78
|
-
default: null
|
|
79
|
-
},
|
|
80
|
-
to: [String, Object],
|
|
81
|
-
href: String
|
|
71
|
+
}
|
|
82
72
|
};
|
|
83
73
|
export {
|
|
84
74
|
e as kunChipProps
|
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
function s(e, l) {
|
|
3
|
-
const
|
|
1
|
+
import { computed as r } from "vue";
|
|
2
|
+
function s(e, l, c) {
|
|
3
|
+
const n = r(() => !!e.to || !!e.href), a = r(() => e.href ? "a" : e.to ? "router-link" : "div"), o = r(() => e.href ? {
|
|
4
4
|
href: e.href,
|
|
5
5
|
target: e.target ?? "_self",
|
|
6
6
|
rel: e.target === "_blank" ? "noopener noreferrer" : null
|
|
7
7
|
} : e.to ? {
|
|
8
8
|
to: e.to,
|
|
9
9
|
replace: e.replace
|
|
10
|
-
} : {
|
|
11
|
-
|
|
12
|
-
disabled: e.
|
|
13
|
-
}), c = n(() => {
|
|
14
|
-
const t = [
|
|
15
|
-
"inline-flex items-center whitespace-nowrap select-none",
|
|
16
|
-
e.density === "compact" ? "px-2 py-0.5 text-xs" : "px-3 py-1 text-sm",
|
|
17
|
-
e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
18
|
-
e.class
|
|
19
|
-
];
|
|
20
|
-
switch (e.variant) {
|
|
10
|
+
} : {}), u = r(() => {
|
|
11
|
+
const t = [];
|
|
12
|
+
switch (e.density === "compact" ? t.push("px-2 py-0.5 text-xs") : e.density === "comfortable" ? t.push("px-2.5 py-1 text-sm") : t.push("px-3 py-1.5 text-sm"), e.clickable ? e.disabled ? t.push("opacity-50 cursor-not-allowed") : t.push("cursor-pointer") : t.push("cursor-default"), e.variant) {
|
|
21
13
|
case "flat":
|
|
22
14
|
t.push(`${e.color} ${e.textColor} shadow-none`);
|
|
23
15
|
break;
|
|
@@ -30,14 +22,13 @@ function s(e, l) {
|
|
|
30
22
|
default:
|
|
31
23
|
t.push(`${e.color} ${e.textColor} rounded-md shadow`);
|
|
32
24
|
}
|
|
33
|
-
return t
|
|
34
|
-
})
|
|
25
|
+
return t;
|
|
26
|
+
});
|
|
35
27
|
return {
|
|
36
|
-
isLink:
|
|
28
|
+
isLink: n,
|
|
37
29
|
componentTag: a,
|
|
38
30
|
componentAttrs: o,
|
|
39
|
-
|
|
40
|
-
chipStyle: u,
|
|
31
|
+
computedClass: u,
|
|
41
32
|
handleClose: (t) => {
|
|
42
33
|
e.disabled || (l("update:modelValue", !1), l("click:close", t));
|
|
43
34
|
}
|