adverich-kun-ui 0.1.76 → 0.1.78

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.
Files changed (35) hide show
  1. package/dist/adverich-kun-ui.css +1 -1
  2. package/dist/components/KunAlert/src/components/KunAlert.vue.js +193 -33
  3. package/dist/components/KunAppbar/src/components/KunAppbar.vue.js +69 -41
  4. package/dist/components/KunAppbarTitle/src/components/KunAppbarTitle.vue.js +9 -5
  5. package/dist/components/KunAutocomplete/src/components/KunAutocomplete.vue.js +51 -52
  6. package/dist/components/KunAutocomplete/src/composables/useAutocomplete.js +1 -1
  7. package/dist/components/KunBtn/src/components/KunBtn.vue.js +86 -77
  8. package/dist/components/KunCard/src/components/KunCard.vue.js +38 -32
  9. package/dist/components/KunCard/src/composables/kunCardProps.js +4 -8
  10. package/dist/components/KunCardActions/src/components/KunCardActions.vue.js +18 -16
  11. package/dist/components/KunCardActions/src/composables/kunCardActionsProps.js +0 -8
  12. package/dist/components/KunCardItem/src/components/KunCardItem.vue.js +17 -16
  13. package/dist/components/KunCardItem/src/composables/kunCardItemProps.js +0 -8
  14. package/dist/components/KunCardSubtitle/src/components/KunCardSubtitle.vue.js +16 -17
  15. package/dist/components/KunCardSubtitle/src/composables/kunCardSubtitleProps.js +1 -9
  16. package/dist/components/KunCardText/src/components/KunCardText.vue.js +16 -17
  17. package/dist/components/KunCardText/src/composables/kunCardTextProps.js +1 -9
  18. package/dist/components/KunCardTitle/src/components/KunCardTitle.vue.js +57 -45
  19. package/dist/components/KunCardTitle/src/composables/kunCardTitleProps.js +5 -25
  20. package/dist/components/KunChip/src/components/KunChip.vue.js +63 -47
  21. package/dist/components/KunChip/src/composables/kunChipProps.js +7 -17
  22. package/dist/components/KunChip/src/composables/useChip.js +10 -19
  23. package/dist/components/KunList/src/components/KunList.vue.js +10 -10
  24. package/dist/components/kunMenu/src/components/kunMenu.vue.js +48 -48
  25. package/dist/components/kunMenu/src/composables/kunMenuProps.js +0 -4
  26. package/dist/components/kunMenu/src/composables/useKunMenuStyles.js +31 -14
  27. package/dist/icons/IconMenuRounded.vue.js +17 -0
  28. package/dist/index.js +12 -12
  29. package/package.json +1 -1
  30. package/dist/components/KunCard/src/composables/useCard.js +0 -17
  31. package/dist/components/KunCardActions/src/composables/useCardActions.js +0 -19
  32. package/dist/components/KunCardItem/src/composables/useCardItem.js +0 -17
  33. package/dist/components/KunCardSubtitle/src/composables/useCardSubtitle.js +0 -15
  34. package/dist/components/KunCardText/src/composables/useCardText.js +0 -15
  35. package/dist/components/KunCardTitle/src/composables/useCardTitle.js +0 -25
@@ -1,22 +1,23 @@
1
- import { createElementBlock as a, openBlock as l, normalizeStyle as m, normalizeClass as c, unref as e, renderSlot as p } from "vue";
2
- import { useCardItem as u } from "../composables/useCardItem.js";
3
- import { kunCardItemProps as i } from "../composables/kunCardItemProps.js";
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: i,
7
- setup(r) {
8
- const t = r, {
9
- containerClass: o,
10
- containerStyle: n
11
- } = u(t);
12
- return (s, f) => (l(), a("div", {
13
- class: c(["w-full", e(o)]),
14
- style: m(e(n))
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
- p(s.$slots, "default")
17
- ], 6));
17
+ u(o.$slots, "default")
18
+ ], 2));
18
19
  }
19
20
  };
20
21
  export {
21
- k as default
22
+ x as default
22
23
  };
@@ -6,14 +6,6 @@ const e = {
6
6
  dense: {
7
7
  type: Boolean,
8
8
  default: !1
9
- },
10
- class: {
11
- type: [String, Array, Object],
12
- default: null
13
- },
14
- style: {
15
- type: Object,
16
- default: null
17
9
  }
18
10
  };
19
11
  export {
@@ -1,24 +1,23 @@
1
- import { createElementBlock as a, openBlock as n, normalizeStyle as i, normalizeClass as u, unref as e, renderSlot as m, createTextVNode as p, toDisplayString as c } from "vue";
2
- import { useCardSubtitle as d } from "../composables/useCardSubtitle.js";
3
- import { kunCardSubtitleProps as f } from "../composables/kunCardSubtitleProps.js";
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: f,
7
- setup(r) {
8
- const o = r, {
9
- subtitleClass: s,
10
- subtitleStyle: l
11
- } = d(o);
12
- return (t, S) => (n(), a("div", {
13
- class: u(["text-sm text-gray-500 font-normal", e(s)]),
14
- style: i(e(l))
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(t.$slots, "default", {}, () => [
17
- p(c(t.subtitle), 1)
15
+ m(e.$slots, "default", {}, () => [
16
+ p(i(e.subtitle), 1)
18
17
  ])
19
- ], 6));
18
+ ], 2));
20
19
  }
21
20
  };
22
21
  export {
23
- _ as default
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-600"
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 { createElementBlock as l, openBlock as n, normalizeStyle as p, normalizeClass as c, unref as t, renderSlot as m, createTextVNode as i, toDisplayString as u } from "vue";
2
- import { useCardText as d } from "../composables/useCardText.js";
3
- import { kunCardTextProps as f } from "../composables/kunCardTextProps.js";
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: f,
7
- setup(r) {
8
- const o = r, {
9
- textClass: s,
10
- textStyle: a
11
- } = d(o);
12
- return (e, x) => (n(), l("div", {
13
- class: c(["block", t(s)]),
14
- style: p(t(a))
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
- m(e.$slots, "default", {}, () => [
17
- i(u(e.text), 1)
15
+ u(e.$slots, "default", {}, () => [
16
+ m(d(e.text), 1)
18
17
  ])
19
- ], 6));
18
+ ], 2));
20
19
  }
21
20
  };
22
21
  export {
23
- S as default
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 $, normalizeClass as l, unref as t, createCommentVNode as n, createElementVNode as c, renderSlot as o, createBlock as p, createTextVNode as v, toDisplayString as d } from "vue";
2
- import { useCardTitle as w } from "../composables/useCardTitle.js";
3
- import { kunCardTitleProps as S } from "../composables/kunCardTitleProps.js";
4
- import u from "../../../KunIcon/src/components/KunIcon.vue.js";
5
- const T = {
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: "flex items-center justify-center w-6 h-6 mx-2"
8
- }, _ = { class: "flex items-center w-full flex-grow truncate" }, b = {
8
+ class: "kun-card-title__prepend"
9
+ }, w = { class: "kun-card-title__content" }, B = {
9
10
  key: 1,
10
- class: "flex items-center justify-center w-6 h-6 mx-2"
11
- }, z = {
11
+ class: "kun-card-title__append"
12
+ }, S = {
12
13
  __name: "KunCardTitle",
13
- props: S,
14
- setup(m) {
15
- const f = m, {
16
- hasPrependIcon: i,
17
- hasAppendIcon: a,
18
- containerClass: y,
19
- containerStyle: h,
20
- titleClass: k,
21
- subtitleClass: C
22
- } = w(f);
23
- return (e, B) => (s(), r("div", {
24
- class: l(t(y)),
25
- style: $(t(h))
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 || t(i) ? (s(), r("div", T, [
28
- o(e.$slots, "prepend", {}, () => [
29
- t(i) ? (s(), p(u, {
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"])) : n("", !0)
33
- ])
34
- ])) : n("", !0),
35
- c("div", _, [
36
- c("h3", {
37
- class: l(t(k))
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
- o(e.$slots, "default", {}, () => [
40
- v(d(e.title), 1)
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: l(t(C))
46
- }, d(e.subtitle), 3)) : n("", !0)
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 || t(a) ? (s(), r("div", b, [
49
- o(e.$slots, "append", {}, () => [
50
- t(a) ? (s(), p(u, {
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"])) : n("", !0)
54
- ])
55
- ])) : n("", !0)
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
- z as default
72
+ A as default
61
73
  };
@@ -1,27 +1,15 @@
1
1
  const e = {
2
- title: {
3
- type: String,
4
- default: null
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 n, openBlock as o, resolveDynamicComponent as C, unref as s, mergeProps as $, withModifiers as b, withCtx as I, createCommentVNode as l, renderSlot as t, createElementVNode as V, createElementBlock as g, toDisplayString as B } from "vue";
2
- import { useChip as S } from "../composables/useChip.js";
3
- import { kunChipProps as w } from "../composables/kunChipProps.js";
4
- import r from "../../../KunIcon/src/components/KunIcon.vue.js";
5
- const D = {
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
- }, E = { class: "truncate" }, K = {
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: w,
15
+ props: E,
11
16
  emits: ["update:modelValue", "click:close"],
12
- setup(p, { emit: a }) {
13
- const d = p, m = a, {
14
- componentTag: c,
15
- componentAttrs: u,
16
- chipClass: k,
17
- chipStyle: f,
18
- isLink: h,
19
- handleClose: y
20
- } = S(d, m);
21
- return (e, i) => (o(), n(C(s(c)), $(s(u), {
22
- class: s(k),
23
- style: s(f),
24
- disabled: s(h) ? void 0 : e.disabled ? "" : void 0,
25
- onClick: i[0] || (i[0] = b(() => {
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: I(() => [
29
- e.prependIcon ? (o(), n(r, {
30
- key: 0,
31
- icon: e.prependIcon,
32
- class: "mr-1 flex-shrink-0"
33
- }, null, 8, ["icon"])) : l("", !0),
34
- t(e.$slots, "prepend", {}, () => [
35
- e.$slots.prepend ? (o(), g("span", D)) : l("", !0)
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
- V("span", E, B(e.label || e.text), 1),
38
- e.$slots.default && !(e.label || e.text) ? t(e.$slots, "default", { key: 1 }) : l("", !0),
39
- e.appendIcon ? (o(), n(r, {
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
- icon: e.appendIcon,
42
- class: "ml-1 flex-shrink-0"
43
- }, null, 8, ["icon"])) : e.$slots.append ? t(e.$slots, "append", {
44
- key: 3,
45
- class: "ml-1"
46
- }) : l("", !0),
47
- e.closable && e.modelValue ? (o(), n(r, {
48
- key: 4,
49
- icon: "$mdi-close",
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
- K as default
75
+ O as default
60
76
  };
@@ -17,17 +17,21 @@ const e = {
17
17
  },
18
18
  color: {
19
19
  type: String,
20
- default: "bg-indigo-600"
20
+ default: "bg-slate-200 dark:bg-slate-800"
21
21
  },
22
22
  textColor: {
23
23
  type: String,
24
- default: "text-white"
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 n } from "vue";
2
- function s(e, l) {
3
- const r = n(() => !!e.to || !!e.href), a = n(() => e.href ? "a" : e.to ? "router-link" : "button"), o = n(() => e.href ? {
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
- type: "button",
12
- disabled: e.disabled
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.filter(Boolean);
34
- }), u = n(() => e.style || {});
25
+ return t;
26
+ });
35
27
  return {
36
- isLink: r,
28
+ isLink: n,
37
29
  componentTag: a,
38
30
  componentAttrs: o,
39
- chipClass: c,
40
- chipStyle: u,
31
+ computedClass: u,
41
32
  handleClose: (t) => {
42
33
  e.disabled || (l("update:modelValue", !1), l("click:close", t));
43
34
  }
@@ -1,4 +1,4 @@
1
- import { ref as c, provide as v, createElementBlock as b, openBlock as h, normalizeClass as k, renderSlot as A } from "vue";
1
+ import { ref as c, provide as y, createElementBlock as b, openBlock as h, normalizeClass 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",
@@ -18,8 +18,8 @@ const K = {
18
18
  },
19
19
  emits: ["keyDown"],
20
20
  setup(o, { expose: d, emit: m }) {
21
- const g = o, w = m;
22
- B(g);
21
+ const w = o, g = m;
22
+ B(w);
23
23
  const u = c(null), l = c([]);
24
24
  d({
25
25
  focusWithKey: (e) => {
@@ -31,27 +31,27 @@ const K = {
31
31
  var e, n;
32
32
  (n = (e = u.value) == null ? void 0 : e.focus) == null || n.call(e);
33
33
  }
34
- }), v("registerListItemRef", (e) => {
34
+ }), y("registerListItemRef", (e) => {
35
35
  e ? l.value.includes(e) || l.value.push(e) : l.value = l.value.filter((n) => n !== e);
36
36
  });
37
37
  function p(e) {
38
- var i, a, f;
38
+ var i, f, a;
39
39
  const n = e.key;
40
- if (w("keyDown", e), !["ArrowDown", "ArrowUp"].includes(n)) return;
40
+ if (g("keyDown", e), !["ArrowDown", "ArrowUp"].includes(n)) return;
41
41
  e.preventDefault();
42
42
  const t = l.value.filter(Boolean);
43
43
  if (t.length === 0) return;
44
- const r = t.findIndex((y) => y === document.activeElement);
44
+ const r = t.findIndex((v) => v === document.activeElement);
45
45
  if (r === -1) {
46
- n === "ArrowDown" ? (i = t[0]) == null || i.focus() : n === "ArrowUp" && ((a = t[t.length - 1]) == null || a.focus());
46
+ n === "ArrowDown" ? (i = t[0]) == null || i.focus() : n === "ArrowUp" && ((f = t[t.length - 1]) == null || f.focus());
47
47
  return;
48
48
  }
49
49
  let s = r;
50
- n === "ArrowDown" ? s = (r + 1) % t.length : n === "ArrowUp" && (s = (r - 1 + t.length) % t.length), (f = t[s]) == null || f.focus();
50
+ n === "ArrowDown" ? s = (r + 1) % t.length : n === "ArrowUp" && (s = (r - 1 + t.length) % t.length), (a = t[s]) == null || a.focus();
51
51
  }
52
52
  return (e, n) => (h(), b("ul", {
53
53
  role: "list",
54
- class: k(["w-full bg-gray-500", [
54
+ class: k(["w-full", [
55
55
  "kun-list",
56
56
  o.bgList,
57
57
  {