adverich-kun-ui 0.1.320 → 0.1.322

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 (41) hide show
  1. package/dist/adverich-kun-ui.css +1 -1
  2. package/dist/components/KunBadge/examples/Default.vue.js +23 -0
  3. package/dist/components/KunCardActions/exaples/Default.vue.js +58 -0
  4. package/dist/components/KunCardItem/exaples/Default.vue.js +37 -0
  5. package/dist/components/KunCardSubtitle/exaples/Default.vue.js +26 -0
  6. package/dist/components/KunCardText/exaples/Default.vue.js +26 -0
  7. package/dist/components/KunCardTitle/exaples/Default.vue.js +41 -0
  8. package/dist/components/KunCheckbox/src/components/KunCheckbox.vue.js +154 -0
  9. package/dist/components/KunCheckbox/src/composables/useCheckboxModel.js +21 -0
  10. package/dist/components/KunCheckbox/src/composables/useValidation.js +31 -0
  11. package/dist/components/KunDialog/src/components/KunDialog.vue.js +2 -112
  12. package/dist/components/KunDialog/src/components/KunDialog.vue2.js +112 -2
  13. package/dist/components/KunDialog/src/components/KunDialogOverlay.vue.js +2 -18
  14. package/dist/components/KunDialog/src/components/KunDialogOverlay.vue2.js +18 -2
  15. package/dist/components/KunInfiniteScroll/examples/Default.vue.js +52 -0
  16. package/dist/components/KunList/examples/Default.vue.js +46 -0
  17. package/dist/components/KunList/examples/WhiteGroups.vue.js +72 -0
  18. package/dist/components/KunListGroup/examples/Default.vue.js +67 -0
  19. package/dist/components/KunListImg/examples/Default.vue.js +31 -0
  20. package/dist/components/KunListItem/examples/Default.vue.js +39 -0
  21. package/dist/components/KunListItem/examples/WithAction.vue.js +104 -0
  22. package/dist/components/KunListItem/examples/WithAvatar.vue.js +71 -0
  23. package/dist/components/KunListSubheader/examples/Default.vue.js +49 -0
  24. package/dist/components/KunRadio/src/components/KunRadio.vue.js +65 -0
  25. package/dist/components/KunRadioGroup/src/components/KunRadioGroup.vue.js +47 -0
  26. package/dist/components/KunSlider/examples/ExampleBasic.vue.js +18 -0
  27. package/dist/components/KunSlider/examples/ExampleCustomThumb.vue.js +24 -0
  28. package/dist/components/KunSlider/examples/ExampleRange.vue.js +20 -0
  29. package/dist/components/KunSlider/examples/ExampleVertical.vue.js +23 -0
  30. package/dist/components/KunTable/src/components/KunTableFilter.vue.js +1 -1
  31. package/dist/components/KunTable/src/components/KunTableVirtual.vue.js +9 -0
  32. package/dist/components/KunTabs/src/components/KunTabWindow.vue.js +82 -0
  33. package/dist/components/KunToolbar/src/components/KunToolbarItems.vue.js +42 -0
  34. package/dist/components/KunTooltip/examples/Default.vue.js +59 -0
  35. package/dist/components/KunVirtualScroller/examples/Default.vue.js +29 -0
  36. package/dist/directives/ripple.js +15 -0
  37. package/dist/icons/IconRadioboxBlank.vue.js +20 -0
  38. package/dist/icons/IconRadioboxMarked.vue.js +20 -0
  39. package/dist/icons/index.js +24 -20
  40. package/dist/index.js +173 -155
  41. package/package.json +1 -1
@@ -0,0 +1,104 @@
1
+ import { createElementBlock as i, openBlock as d, createElementVNode as l, createVNode as o, withCtx as e, createTextVNode as n } from "vue";
2
+ import r from "../src/components/KunListItem.vue.js";
3
+ import s from "../../KunListItemText/src/components/KunListItemText.vue.js";
4
+ import m from "../../KunListItemAvatar/src/components/KunListItemAvatar.vue.js";
5
+ import u from "../../KunListItemAction/src/components/KunListItemAction.vue.js";
6
+ const a = { class: "p-4 max-w-md" }, _ = { class: "space-y-2" }, v = {
7
+ __name: "WithAction",
8
+ setup(f) {
9
+ return (p, t) => (d(), i("div", a, [
10
+ t[6] || (t[6] = l("h2", { class: "text-lg font-semibold mb-2" }, "Items con acciones:", -1)),
11
+ l("ul", _, [
12
+ o(r, null, {
13
+ default: e(() => [
14
+ o(s, null, {
15
+ default: e(() => t[0] || (t[0] = [
16
+ n("Notificación por correo")
17
+ ])),
18
+ _: 1,
19
+ __: [0]
20
+ }),
21
+ o(u, null, {
22
+ default: e(() => t[1] || (t[1] = [
23
+ l("input", {
24
+ type: "checkbox",
25
+ checked: "",
26
+ class: "form-checkbox text-blue-600"
27
+ }, null, -1)
28
+ ])),
29
+ _: 1,
30
+ __: [1]
31
+ })
32
+ ]),
33
+ _: 1
34
+ }),
35
+ o(r, null, {
36
+ default: e(() => [
37
+ o(s, null, {
38
+ default: e(() => t[2] || (t[2] = [
39
+ n("Modo oscuro")
40
+ ])),
41
+ _: 1,
42
+ __: [2]
43
+ }),
44
+ o(u, null, {
45
+ default: e(() => t[3] || (t[3] = [
46
+ l("input", {
47
+ type: "checkbox",
48
+ class: "form-switch text-blue-600"
49
+ }, null, -1)
50
+ ])),
51
+ _: 1,
52
+ __: [3]
53
+ })
54
+ ]),
55
+ _: 1
56
+ }),
57
+ o(r, null, {
58
+ default: e(() => [
59
+ o(m, { text: "JD" }),
60
+ o(s, null, {
61
+ default: e(() => t[4] || (t[4] = [
62
+ n("John Doe")
63
+ ])),
64
+ _: 1,
65
+ __: [4]
66
+ }),
67
+ o(u, null, {
68
+ default: e(() => t[5] || (t[5] = [
69
+ l("button", { class: "text-blue-500 hover:text-blue-700" }, [
70
+ l("svg", {
71
+ xmlns: "http://www.w3.org/2000/svg",
72
+ class: "h-5 w-5",
73
+ fill: "none",
74
+ viewBox: "0 0 24 24",
75
+ stroke: "currentColor"
76
+ }, [
77
+ l("path", {
78
+ "stroke-linecap": "round",
79
+ "stroke-linejoin": "round",
80
+ "stroke-width": "2",
81
+ d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
82
+ }),
83
+ l("path", {
84
+ "stroke-linecap": "round",
85
+ "stroke-linejoin": "round",
86
+ "stroke-width": "2",
87
+ d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
88
+ })
89
+ ])
90
+ ], -1)
91
+ ])),
92
+ _: 1,
93
+ __: [5]
94
+ })
95
+ ]),
96
+ _: 1
97
+ })
98
+ ])
99
+ ]));
100
+ }
101
+ };
102
+ export {
103
+ v as default
104
+ };
@@ -0,0 +1,71 @@
1
+ import { createElementBlock as u, openBlock as i, createElementVNode as o, createVNode as l, withCtx as e, createTextVNode as a } from "vue";
2
+ import r from "../src/components/KunListItem.vue.js";
3
+ import s from "../../KunListItemText/src/components/KunListItemText.vue.js";
4
+ import m from "../../KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js";
5
+ import n from "../../KunListItemAvatar/src/components/KunListItemAvatar.vue.js";
6
+ const _ = { class: "p-4 max-w-md" }, f = { class: "space-y-2" }, g = {
7
+ __name: "WithAvatar",
8
+ setup(d) {
9
+ return (p, t) => (i(), u("div", _, [
10
+ t[5] || (t[5] = o("h2", { class: "text-lg font-semibold mb-2" }, "Items con avatar:", -1)),
11
+ o("ul", f, [
12
+ l(r, null, {
13
+ default: e(() => [
14
+ l(n, { text: "JD" }),
15
+ l(s, null, {
16
+ default: e(() => t[0] || (t[0] = [
17
+ a("John Doe")
18
+ ])),
19
+ _: 1,
20
+ __: [0]
21
+ }),
22
+ l(m, null, {
23
+ default: e(() => t[1] || (t[1] = [
24
+ a("Administrador")
25
+ ])),
26
+ _: 1,
27
+ __: [1]
28
+ })
29
+ ]),
30
+ _: 1
31
+ }),
32
+ l(r, {
33
+ active: "",
34
+ "active-class": "bg-blue-100 text-blue-600"
35
+ }, {
36
+ default: e(() => [
37
+ l(n, null, {
38
+ default: e(() => t[2] || (t[2] = [
39
+ o("img", {
40
+ src: "https://i.pravatar.cc/40 ",
41
+ alt: "Avatar",
42
+ class: "w-full h-full object-cover"
43
+ }, null, -1)
44
+ ])),
45
+ _: 1,
46
+ __: [2]
47
+ }),
48
+ l(s, null, {
49
+ default: e(() => t[3] || (t[3] = [
50
+ a("Jane Smith")
51
+ ])),
52
+ _: 1,
53
+ __: [3]
54
+ }),
55
+ l(m, null, {
56
+ default: e(() => t[4] || (t[4] = [
57
+ a("Desarrollador")
58
+ ])),
59
+ _: 1,
60
+ __: [4]
61
+ })
62
+ ]),
63
+ _: 1
64
+ })
65
+ ])
66
+ ]));
67
+ }
68
+ };
69
+ export {
70
+ g as default
71
+ };
@@ -0,0 +1,49 @@
1
+ import { createElementBlock as a, openBlock as u, createElementVNode as r, createVNode as e, withCtx as o, createTextVNode as s } from "vue";
2
+ import n from "../src/components/KunListSubheader.vue.js";
3
+ import l from "../../KunListItem/src/components/KunListItem.vue.js";
4
+ const d = { class: "p-4 max-w-md" }, i = { class: "space-y-2 bg-white dark:bg-gray-800 rounded-md shadow-sm p-2" }, b = {
5
+ __name: "Default",
6
+ setup(m) {
7
+ return (_, t) => (u(), a("div", d, [
8
+ t[4] || (t[4] = r("h2", { class: "text-lg font-semibold mb-2" }, "Lista con Subheaders:", -1)),
9
+ r("ul", i, [
10
+ e(n, { text: "Usuarios" }),
11
+ e(l, null, {
12
+ default: o(() => t[0] || (t[0] = [
13
+ s("Juan Pérez")
14
+ ])),
15
+ _: 1,
16
+ __: [0]
17
+ }),
18
+ e(l, null, {
19
+ default: o(() => t[1] || (t[1] = [
20
+ s("Ana Gómez")
21
+ ])),
22
+ _: 1,
23
+ __: [1]
24
+ }),
25
+ e(n, {
26
+ text: "Configuraciones",
27
+ class: "text-blue-600 dark:text-blue-400"
28
+ }),
29
+ e(l, null, {
30
+ default: o(() => t[2] || (t[2] = [
31
+ s("Perfil")
32
+ ])),
33
+ _: 1,
34
+ __: [2]
35
+ }),
36
+ e(l, null, {
37
+ default: o(() => t[3] || (t[3] = [
38
+ s("Notificaciones")
39
+ ])),
40
+ _: 1,
41
+ __: [3]
42
+ })
43
+ ])
44
+ ]));
45
+ }
46
+ };
47
+ export {
48
+ b as default
49
+ };
@@ -0,0 +1,65 @@
1
+ import { inject as y, computed as o, createElementBlock as s, openBlock as c, normalizeClass as u, createElementVNode as S, createVNode as V, renderSlot as h, createCommentVNode as x, toDisplayString as k } from "vue";
2
+ import B from "../../../KunIcon/src/components/KunIcon.vue.js";
3
+ import { icons as d } from "../../../../icons/index.js";
4
+ const C = ["for"], j = ["id", "name", "disabled", "checked"], I = {
5
+ key: 0,
6
+ class: "text-sm"
7
+ }, E = {
8
+ __name: "KunRadio",
9
+ props: {
10
+ modelValue: [String, Number, Boolean, Object],
11
+ label: String,
12
+ color: String,
13
+ baseColor: String,
14
+ trueValue: { default: !0 },
15
+ falseValue: { default: !1 },
16
+ trueIcon: { type: [String, Object], default: null },
17
+ falseIcon: { type: [String, Object], default: null },
18
+ value: [String, Number, Boolean, Object],
19
+ disabled: Boolean,
20
+ readonly: Boolean,
21
+ error: Boolean,
22
+ name: String,
23
+ id: String
24
+ },
25
+ emits: ["update:modelValue"],
26
+ setup(l, { emit: m }) {
27
+ const e = l, b = m, t = y("kun-radio-group", null), n = o(() => {
28
+ var r;
29
+ return (((r = t == null ? void 0 : t.modelValue) == null ? void 0 : r.value) ?? e.modelValue) === (e.value ?? e.trueValue);
30
+ }), f = o(
31
+ () => n.value ? e.trueIcon ?? d.radioboxMarked : e.falseIcon ?? d.radioboxBlank
32
+ ), g = o(
33
+ () => e.disabled ? "text-gray-400" : n.value ? e.color || "text-primary" : e.baseColor || "text-gray-500"
34
+ ), v = Math.random().toString(36).slice(2, 10), i = o(() => e.id || `kun-radio-${v}`);
35
+ function p() {
36
+ if (e.readonly || e.disabled) return;
37
+ const a = e.value ?? e.trueValue;
38
+ t ? t.update(a) : b("update:modelValue", a);
39
+ }
40
+ return (a, r) => (c(), s("label", {
41
+ for: i.value,
42
+ class: u(["inline-flex items-center cursor-pointer gap-2 select-none", { "opacity-50 pointer-events-none": l.disabled || l.readonly }])
43
+ }, [
44
+ S("input", {
45
+ class: "sr-only",
46
+ type: "radio",
47
+ id: i.value,
48
+ name: l.name,
49
+ disabled: l.disabled,
50
+ checked: n.value,
51
+ onChange: p
52
+ }, null, 40, j),
53
+ V(B, {
54
+ icon: f.value,
55
+ class: u([g.value, "text-xl transition-colors"])
56
+ }, null, 8, ["icon", "class"]),
57
+ h(a.$slots, "label", {}, () => [
58
+ l.label ? (c(), s("span", I, k(l.label), 1)) : x("", !0)
59
+ ])
60
+ ], 10, C));
61
+ }
62
+ };
63
+ export {
64
+ E as default
65
+ };
@@ -0,0 +1,47 @@
1
+ import { provide as c, computed as s, createElementBlock as t, openBlock as a, renderSlot as n, createElementVNode as m, createCommentVNode as u, toDisplayString as b, normalizeClass as f } from "vue";
2
+ const p = { class: "w-full" }, g = {
3
+ key: 0,
4
+ class: "block mb-1 text-sm font-medium"
5
+ }, k = {
6
+ __name: "KunRadioGroup",
7
+ props: {
8
+ modelValue: [String, Number, Boolean, Object],
9
+ color: String,
10
+ baseColor: String,
11
+ name: String,
12
+ disabled: Boolean,
13
+ readonly: Boolean,
14
+ direction: { type: String, default: "vertical" },
15
+ // 'horizontal' | 'vertical'
16
+ inline: Boolean,
17
+ error: Boolean,
18
+ trueIcon: { type: [String, Object], default: "mdi-radiobox-marked" },
19
+ falseIcon: { type: [String, Object], default: "mdi-radiobox-blank" },
20
+ label: String
21
+ },
22
+ emits: ["update:modelValue"],
23
+ setup(e, { emit: i }) {
24
+ const o = e, r = i, d = (l) => {
25
+ !o.readonly && !o.disabled && r("update:modelValue", l);
26
+ };
27
+ return c("kun-radio-group", {
28
+ modelValue: s(() => o.modelValue),
29
+ update: d
30
+ }), (l, S) => (a(), t("div", p, [
31
+ n(l.$slots, "label", {}, () => [
32
+ e.label ? (a(), t("label", g, b(e.label), 1)) : u("", !0)
33
+ ]),
34
+ m("div", {
35
+ class: f([
36
+ e.direction === "horizontal" || e.inline ? "flex flex-wrap gap-4" : "flex flex-col gap-2",
37
+ e.disabled ? "opacity-60 pointer-events-none" : ""
38
+ ])
39
+ }, [
40
+ n(l.$slots, "default")
41
+ ], 2)
42
+ ]));
43
+ }
44
+ };
45
+ export {
46
+ k as default
47
+ };
@@ -0,0 +1,18 @@
1
+ import { ref as a, createBlock as r, openBlock as m } from "vue";
2
+ import t from "../src/components/KunSlider.vue.js";
3
+ const c = {
4
+ __name: "ExampleBasic",
5
+ setup(u) {
6
+ const e = a(50);
7
+ return (n, l) => (m(), r(t, {
8
+ modelValue: e.value,
9
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => e.value = o),
10
+ min: 0,
11
+ max: 100,
12
+ label: "Básico"
13
+ }, null, 8, ["modelValue"]));
14
+ }
15
+ };
16
+ export {
17
+ c as default
18
+ };
@@ -0,0 +1,24 @@
1
+ import { ref as r, createBlock as a, openBlock as u, withCtx as n, createElementVNode as m, normalizeStyle as s, toDisplayString as i } from "vue";
2
+ import p from "../src/components/KunSlider.vue.js";
3
+ const b = {
4
+ __name: "ExampleCustomThumb",
5
+ setup(d) {
6
+ const t = r(42);
7
+ return (c, l) => (u(), a(p, {
8
+ modelValue: t.value,
9
+ "onUpdate:modelValue": l[0] || (l[0] = (e) => t.value = e),
10
+ label: "Con Thumb personalizado"
11
+ }, {
12
+ thumb: n(({ value: e, style: o }) => [
13
+ m("div", {
14
+ class: "absolute z-40 w-6 h-6 flex items-center justify-center rounded-full bg-purple-600 text-white text-xs font-bold",
15
+ style: s(o)
16
+ }, " 🔥" + i(e), 5)
17
+ ]),
18
+ _: 1
19
+ }, 8, ["modelValue"]));
20
+ }
21
+ };
22
+ export {
23
+ b as default
24
+ };
@@ -0,0 +1,20 @@
1
+ import { ref as o, createBlock as r, openBlock as n } from "vue";
2
+ import t from "../src/components/KunSlider.vue.js";
3
+ const d = {
4
+ __name: "ExampleRange",
5
+ setup(u) {
6
+ const e = o([20, 80]);
7
+ return (m, a) => (n(), r(t, {
8
+ modelValue: e.value,
9
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => e.value = l),
10
+ min: 0,
11
+ max: 100,
12
+ step: 5,
13
+ range: !0,
14
+ label: "Rango de valores"
15
+ }, null, 8, ["modelValue"]));
16
+ }
17
+ };
18
+ export {
19
+ d as default
20
+ };
@@ -0,0 +1,23 @@
1
+ import { ref as a, createElementBlock as o, openBlock as r, createVNode as s, createElementVNode as n, toDisplayString as c } from "vue";
2
+ import m from "../src/components/KunSlider.vue.js";
3
+ const u = { class: "flex gap-4" }, i = { class: "self-end text-sm" }, V = {
4
+ __name: "ExampleVertical",
5
+ setup(d) {
6
+ const e = a(70);
7
+ return (p, l) => (r(), o("div", u, [
8
+ s(m, {
9
+ modelValue: e.value,
10
+ "onUpdate:modelValue": l[0] || (l[0] = (t) => e.value = t),
11
+ min: 0,
12
+ max: 100,
13
+ vertical: !0,
14
+ label: "Vertical",
15
+ class: "h-64"
16
+ }, null, 8, ["modelValue"]),
17
+ n("span", i, c(e.value), 1)
18
+ ]));
19
+ }
20
+ };
21
+ export {
22
+ V as default
23
+ };
@@ -1,5 +1,5 @@
1
1
  import { computed as k, ref as g, onMounted as C, createBlock as x, createCommentVNode as $, openBlock as d, withCtx as l, createElementVNode as c, createVNode as o, createElementBlock as N, Fragment as b, renderList as h, createTextVNode as V } from "vue";
2
- import z from "../../../KunDialog/src/components/KunDialog.vue.js";
2
+ import z from "../../../KunDialog/src/components/KunDialog.vue2.js";
3
3
  import B from "../../../KunRow/src/components/KunRow.vue.js";
4
4
  import j from "../../../KunCol/src/components/KunCol.vue.js";
5
5
  import w from "../../../KunAutocomplete/src/components/KunAutocomplete.vue.js";
@@ -0,0 +1,9 @@
1
+ import r from "../../../../_virtual/_plugin-vue_export-helper.js";
2
+ const e = {};
3
+ function n(t, c) {
4
+ return null;
5
+ }
6
+ const o = /* @__PURE__ */ r(e, [["render", n]]);
7
+ export {
8
+ o as default
9
+ };
@@ -0,0 +1,82 @@
1
+ import { provide as y, computed as v, createBlock as o, openBlock as n, resolveDynamicComponent as w, withCtx as r, createElementBlock as h, Fragment as b, renderList as g, Transition as i, withDirectives as s, createElementVNode as m, normalizeClass as V, renderSlot as u, vShow as c } from "vue";
2
+ /* empty css */
3
+ import k from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const S = { class: "w-full h-full" }, B = {
5
+ __name: "KunTabWindow",
6
+ props: {
7
+ modelValue: [String, Number, Array],
8
+ items: {
9
+ type: Array,
10
+ default: () => []
11
+ },
12
+ show: {
13
+ type: Boolean,
14
+ default: !0
15
+ },
16
+ selectedClass: {
17
+ type: String,
18
+ default: "border-b-2 border-primary"
19
+ },
20
+ tag: {
21
+ type: String,
22
+ default: "div"
23
+ },
24
+ transition: {
25
+ type: [String, Object],
26
+ default: "fade"
27
+ // puedes pasar nombre de transición o un objeto de transición
28
+ },
29
+ multiple: {
30
+ type: Boolean,
31
+ default: !1
32
+ }
33
+ },
34
+ emits: ["update:modelValue"],
35
+ setup(e, { emit: f }) {
36
+ const a = e, p = f, d = (t) => a.multiple && Array.isArray(a.modelValue) ? a.modelValue.includes(t) : a.modelValue === t;
37
+ return y("kun-tab-window", {
38
+ modelValue: v(() => a.modelValue),
39
+ select: (t) => p("update:modelValue", t)
40
+ }), (t, C) => (n(), o(w(e.tag), { class: "w-full h-full relative" }, {
41
+ default: r(() => [
42
+ e.items.length ? (n(!0), h(b, { key: 0 }, g(e.items, (l) => (n(), o(i, {
43
+ key: l.value,
44
+ name: e.transition,
45
+ mode: "out-in",
46
+ appear: ""
47
+ }, {
48
+ default: r(() => [
49
+ s(m("div", {
50
+ class: V(["w-full h-full absolute top-0 left-0", d(l.value) ? e.selectedClass : ""])
51
+ }, [
52
+ u(t.$slots, `item.${l.value}`, { item: l }, () => [
53
+ u(t.$slots, "item", { item: l }, void 0, !0)
54
+ ], !0)
55
+ ], 2), [
56
+ [c, d(l.value)]
57
+ ])
58
+ ]),
59
+ _: 2
60
+ }, 1032, ["name"]))), 128)) : (n(), o(i, {
61
+ key: 1,
62
+ name: e.transition,
63
+ mode: "out-in",
64
+ appear: ""
65
+ }, {
66
+ default: r(() => [
67
+ s(m("div", S, [
68
+ u(t.$slots, "default", {}, void 0, !0)
69
+ ], 512), [
70
+ [c, e.show]
71
+ ])
72
+ ]),
73
+ _: 3
74
+ }, 8, ["name"]))
75
+ ]),
76
+ _: 3
77
+ }));
78
+ }
79
+ }, D = /* @__PURE__ */ k(B, [["__scopeId", "data-v-4b579ca8"]]);
80
+ export {
81
+ D as default
82
+ };
@@ -0,0 +1,42 @@
1
+ import { createElementBlock as s, openBlock as l, mergeProps as c, unref as a, renderSlot as u } from "vue";
2
+ const p = {
3
+ __name: "KunToolbarItems",
4
+ props: {
5
+ color: String,
6
+ variant: {
7
+ type: String,
8
+ default: "text",
9
+ validator: (e) => ["flat", "text", "elevated", "tonal", "outlined", "plain"].includes(e)
10
+ }
11
+ },
12
+ setup(e) {
13
+ const t = e, n = computed(
14
+ () => t.color ? `bg-${t.color}` : ""
15
+ ), o = computed(() => {
16
+ switch (t.variant) {
17
+ case "flat":
18
+ return "bg-transparent shadow-none";
19
+ case "text":
20
+ return "bg-transparent";
21
+ case "elevated":
22
+ return "shadow-md";
23
+ case "tonal":
24
+ return "bg-gray-100 text-gray-800";
25
+ case "outlined":
26
+ return "border border-gray-300";
27
+ case "plain":
28
+ return "";
29
+ default:
30
+ return "";
31
+ }
32
+ });
33
+ return (r, d) => (l(), s("div", c({
34
+ class: ["inline-flex gap-2 items-center", [a(n), a(o)]]
35
+ }, r.$attrs), [
36
+ u(r.$slots, "default")
37
+ ], 16));
38
+ }
39
+ };
40
+ export {
41
+ p as default
42
+ };
@@ -0,0 +1,59 @@
1
+ import { createElementBlock as n, openBlock as p, createElementVNode as o, createVNode as e, withCtx as a, mergeProps as l } from "vue";
2
+ import i from "../src/components/KunTooltip.vue.js";
3
+ const c = { class: "p-8 flex flex-col gap-4 items-center" }, b = {
4
+ __name: "Default",
5
+ setup(s) {
6
+ return (x, r) => (p(), n("div", c, [
7
+ r[0] || (r[0] = o("h2", { class: "text-xl font-bold mb-4" }, "Tooltips con slot activator", -1)),
8
+ e(i, {
9
+ text: "Tooltip arriba",
10
+ location: "top"
11
+ }, {
12
+ activator: a(({ props: t }) => [
13
+ o("button", l(t, { class: "px-4 py-2 bg-blue-500 text-white rounded" }), "Top", 16)
14
+ ]),
15
+ _: 1
16
+ }),
17
+ e(i, {
18
+ text: "Tooltip abajo",
19
+ location: "bottom"
20
+ }, {
21
+ activator: a(({ props: t }) => [
22
+ o("button", l(t, { class: "px-4 py-2 bg-green-500 text-white rounded" }), "Bottom", 16)
23
+ ]),
24
+ _: 1
25
+ }),
26
+ e(i, {
27
+ text: "Tooltip izquierda",
28
+ location: "left"
29
+ }, {
30
+ activator: a(({ props: t }) => [
31
+ o("button", l(t, { class: "px-4 py-2 bg-yellow-500 text-white rounded" }), "Left", 16)
32
+ ]),
33
+ _: 1
34
+ }),
35
+ e(i, {
36
+ text: "Tooltip derecha",
37
+ location: "right"
38
+ }, {
39
+ activator: a(({ props: t }) => [
40
+ o("button", l(t, { class: "px-4 py-2 bg-purple-500 text-white rounded" }), "Right", 16)
41
+ ]),
42
+ _: 1
43
+ }),
44
+ e(i, {
45
+ text: "Con delay",
46
+ location: "top",
47
+ delay: 500
48
+ }, {
49
+ activator: a(({ props: t }) => [
50
+ o("button", l(t, { class: "px-4 py-2 bg-indigo-500 text-white rounded" }), "Delay", 16)
51
+ ]),
52
+ _: 1
53
+ })
54
+ ]));
55
+ }
56
+ };
57
+ export {
58
+ b as default
59
+ };
@@ -0,0 +1,29 @@
1
+ import { createElementBlock as m, openBlock as c, createVNode as i, unref as _, withCtx as l, createElementVNode as t, createTextVNode as d, toDisplayString as o } from "vue";
2
+ import f from "../src/components/KunVirtualScroller.vue.js";
3
+ const p = { class: "p-4 max-h-[400px] border overflow-y-auto" }, u = { class: "p-4 border-b bg-white" }, g = {
4
+ __name: "Default",
5
+ setup(h) {
6
+ const r = Array.from({ length: 1e3 }, (a, e) => ({
7
+ id: e,
8
+ name: `Item #${e}`
9
+ }));
10
+ return (a, e) => (c(), m("div", p, [
11
+ i(f, {
12
+ items: _(r),
13
+ "item-height": "auto",
14
+ buffer: 5
15
+ }, {
16
+ default: l(({ item: s, index: n }) => [
17
+ t("div", u, [
18
+ t("strong", null, "#" + o(n), 1),
19
+ d(": " + o(s.name), 1)
20
+ ])
21
+ ]),
22
+ _: 1
23
+ }, 8, ["items"])
24
+ ]));
25
+ }
26
+ };
27
+ export {
28
+ g as default
29
+ };
@@ -0,0 +1,15 @@
1
+ const c = {
2
+ mounted(e, s) {
3
+ e.style.position = "relative", e.style.overflow = "hidden", e.addEventListener("click", (i) => {
4
+ const t = document.createElement("span"), o = Math.max(e.clientWidth, e.clientHeight), l = o / 2;
5
+ t.style.width = t.style.height = `${o}px`, t.style.left = `${i.offsetX - l}px`, t.style.top = `${i.offsetY - l}px`, t.classList.add("ripple");
6
+ const a = typeof s.value == "object" && s.value.class;
7
+ a && t.classList.add(a), e.appendChild(t), setTimeout(() => {
8
+ t.remove();
9
+ }, 600);
10
+ });
11
+ }
12
+ };
13
+ export {
14
+ c as vRipple
15
+ };