adverich-kun-ui 0.1.365 → 0.1.367
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/components/KunAutocomplete/src/composables/KunAutocompleteProps.js +2 -2
- package/dist/components/KunDialog/src/components/KunDialog.vue.js +112 -2
- package/dist/components/KunListItem/src/components/KunListItem.vue.js +63 -59
- package/dist/components/KunTable/src/components/KunTableFilter.vue.js +1 -1
- package/dist/components/KunTextarea/src/components/KunTextarea.vue.js +104 -113
- package/dist/components/KunTextarea/src/composables/KunTextareaProps.js +1 -0
- package/dist/index.js +70 -70
- package/package.json +1 -1
- package/dist/components/KunDialog/src/components/KunDialog.vue2.js +0 -114
|
@@ -62,8 +62,8 @@ const e = {
|
|
|
62
62
|
// ***** STYLE ***** //
|
|
63
63
|
height: { default: "h-[500px]" },
|
|
64
64
|
maxHeight: { default: "max-h-1/2" },
|
|
65
|
-
density: { type: String, default: "
|
|
66
|
-
zIndex: { type: String, default: "z-
|
|
65
|
+
density: { type: String, default: "default" },
|
|
66
|
+
zIndex: { type: String, default: "z-250" },
|
|
67
67
|
hideDetails: {
|
|
68
68
|
type: Boolean,
|
|
69
69
|
default: !0
|
|
@@ -1,4 +1,114 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { watch as x, onMounted as f, onBeforeUnmount as C, onUnmounted as S, createBlock as m, openBlock as a, Teleport as k, createVNode as o, Transition as u, withCtx as n, createElementBlock as P, createCommentVNode as h, mergeProps as B, renderSlot as V } from "vue";
|
|
2
|
+
import E from "./KunDialogOverlay.vue2.js";
|
|
3
|
+
import H from "./KunDialogContent.vue.js";
|
|
4
|
+
const W = "fixed inset-0 z-250 flex", N = {
|
|
5
|
+
__name: "KunDialog",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: Boolean,
|
|
8
|
+
overlay: { type: Boolean, default: !0 },
|
|
9
|
+
fullscreen: { type: Boolean, default: !1 },
|
|
10
|
+
scrollable: { type: Boolean, default: !1 },
|
|
11
|
+
persistent: { type: Boolean, default: !1 },
|
|
12
|
+
dialogClass: { type: String, default: "" },
|
|
13
|
+
xPosition: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "center",
|
|
16
|
+
// 'start' | 'center' | 'end'
|
|
17
|
+
validator: (e) => ["start", "center", "end"].includes(e)
|
|
18
|
+
},
|
|
19
|
+
yPosition: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "center",
|
|
22
|
+
// 'start' | 'center' | 'end'
|
|
23
|
+
validator: (e) => ["top", "center", "bottom"].includes(e)
|
|
24
|
+
},
|
|
25
|
+
contentClass: { type: String, default: "" },
|
|
26
|
+
bgColor: { type: String, default: "bg-slate-100 dark:bg-slate-900" },
|
|
27
|
+
minHeight: { type: String, default: "h-fit" },
|
|
28
|
+
height: { type: String, default: "h-fit" },
|
|
29
|
+
maxHeight: { type: String, default: "max-h-[100vh]" },
|
|
30
|
+
minWidth: { type: String, default: "min-w-1/3" },
|
|
31
|
+
width: { type: String, default: "w-full" },
|
|
32
|
+
maxWidth: { type: String, default: "max-w-full" }
|
|
33
|
+
},
|
|
34
|
+
emits: ["update:modelValue"],
|
|
35
|
+
setup(e, { emit: y }) {
|
|
36
|
+
const t = e, i = y, g = "justify-" + t.xPosition, p = "items-" + t.yPosition, w = t.yPosition === "top" ? "pt-15" : t.yPosition === "bottom" ? "pb-15" : "", b = [W, t.dialogClass, g, p, w], s = () => {
|
|
37
|
+
t.persistent || i("update:modelValue", !1);
|
|
38
|
+
}, v = () => {
|
|
39
|
+
s();
|
|
40
|
+
}, r = () => {
|
|
41
|
+
document.body.style.overflow = "hidden";
|
|
42
|
+
}, d = () => {
|
|
43
|
+
document.body.style.overflow = "";
|
|
44
|
+
};
|
|
45
|
+
x(() => t.modelValue, (l) => {
|
|
46
|
+
l && !t.fullscreen ? r() : d();
|
|
47
|
+
}), f(() => {
|
|
48
|
+
t.modelValue && !t.fullscreen && r();
|
|
49
|
+
}), C(() => {
|
|
50
|
+
d();
|
|
51
|
+
});
|
|
52
|
+
function c(l) {
|
|
53
|
+
l.stopPropagation(), l.key === "Escape" && (t.persistent || i("update:modelValue", !1));
|
|
54
|
+
}
|
|
55
|
+
return f(() => {
|
|
56
|
+
window.addEventListener("keydown", c);
|
|
57
|
+
}), S(() => {
|
|
58
|
+
window.removeEventListener("keydown", c);
|
|
59
|
+
}), (l, $) => (a(), m(k, { to: "body" }, [
|
|
60
|
+
o(u, {
|
|
61
|
+
name: "fade",
|
|
62
|
+
appear: ""
|
|
63
|
+
}, {
|
|
64
|
+
default: n(() => [
|
|
65
|
+
e.modelValue ? (a(), P("div", B({
|
|
66
|
+
key: 0,
|
|
67
|
+
class: b
|
|
68
|
+
}, l.$attrs), [
|
|
69
|
+
e.overlay ? (a(), m(E, {
|
|
70
|
+
key: 0,
|
|
71
|
+
persistent: e.persistent,
|
|
72
|
+
onClick: v
|
|
73
|
+
}, null, 8, ["persistent"])) : h("", !0),
|
|
74
|
+
o(u, {
|
|
75
|
+
name: "scale",
|
|
76
|
+
"enter-active-class": "transition transform ease-out duration-300",
|
|
77
|
+
"enter-from-class": "opacity-0 scale-95",
|
|
78
|
+
"enter-to-class": "opacity-100 scale-100",
|
|
79
|
+
"leave-active-class": "transition transform ease-in duration-200",
|
|
80
|
+
"leave-from-class": "opacity-100 scale-100",
|
|
81
|
+
"leave-to-class": "opacity-0 scale-95"
|
|
82
|
+
}, {
|
|
83
|
+
default: n(() => [
|
|
84
|
+
o(H, {
|
|
85
|
+
fullscreen: e.fullscreen,
|
|
86
|
+
scrollable: e.scrollable,
|
|
87
|
+
"min-width": e.minWidth,
|
|
88
|
+
width: e.width,
|
|
89
|
+
"max-width": e.maxWidth,
|
|
90
|
+
"min-height": e.minHeight,
|
|
91
|
+
height: e.height,
|
|
92
|
+
"max-height": e.maxHeight,
|
|
93
|
+
"bg-color": e.bgColor,
|
|
94
|
+
"content-class": e.contentClass,
|
|
95
|
+
onClose: s
|
|
96
|
+
}, {
|
|
97
|
+
default: n(() => [
|
|
98
|
+
V(l.$slots, "default")
|
|
99
|
+
]),
|
|
100
|
+
_: 3
|
|
101
|
+
}, 8, ["fullscreen", "scrollable", "min-width", "width", "max-width", "min-height", "height", "max-height", "bg-color", "content-class"])
|
|
102
|
+
]),
|
|
103
|
+
_: 3
|
|
104
|
+
})
|
|
105
|
+
], 16)) : h("", !0)
|
|
106
|
+
]),
|
|
107
|
+
_: 3
|
|
108
|
+
})
|
|
109
|
+
]));
|
|
110
|
+
}
|
|
111
|
+
};
|
|
2
112
|
export {
|
|
3
|
-
|
|
113
|
+
N as default
|
|
4
114
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useAttrs as H, computed as r, ref as J, inject as R, getCurrentInstance as Q, onMounted as T, onBeforeUnmount as W, createBlock as
|
|
1
|
+
import { useAttrs as H, computed as r, ref as J, inject as R, getCurrentInstance as Q, onMounted as T, onBeforeUnmount as W, createBlock as u, openBlock as a, unref as X, withCtx as $, resolveDynamicComponent as v, mergeProps as C, withKeys as L, withModifiers as P, createElementVNode as I, createElementBlock as l, createCommentVNode as s, renderSlot as o, normalizeClass as i, toDisplayString as S } from "vue";
|
|
2
2
|
import M from "../../../KunIcon/src/components/KunIcon.vue.js";
|
|
3
3
|
import { RouterLink as Y } from "vue-router";
|
|
4
4
|
const Z = { class: "flex w-full items-center" }, _ = {
|
|
@@ -7,7 +7,7 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
7
7
|
}, ee = ["src"], te = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "shrink-0 flex items-center gap-2 ms-3"
|
|
10
|
-
}, ne = ["src"],
|
|
10
|
+
}, ne = ["src"], ae = { class: "flex w-full items-center" }, le = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "shrink-0 flex items-center gap-2 me-2"
|
|
13
13
|
}, se = ["src"], re = {
|
|
@@ -54,7 +54,7 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
54
54
|
const B = H(), x = r(() => B.class), j = r(() => {
|
|
55
55
|
const { class: n, ...m } = B;
|
|
56
56
|
return m;
|
|
57
|
-
}), t = e, G = D, f = J(null), g = R("registerListItemRef", null),
|
|
57
|
+
}), t = e, G = D, f = J(null), g = R("registerListItemRef", null), c = R("kunListContext", null), E = r(() => {
|
|
58
58
|
var n;
|
|
59
59
|
return t.id ? t.id : `kun-list-item-${((n = Q()) == null ? void 0 : n.uid) ?? Math.random().toString(36).slice(2, 7)}`;
|
|
60
60
|
});
|
|
@@ -63,16 +63,20 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
63
63
|
}), W(() => {
|
|
64
64
|
g && g(null);
|
|
65
65
|
});
|
|
66
|
-
const
|
|
66
|
+
const b = (n) => typeof n == "object" || typeof n == "function", K = r(() => !!(t.prependIcon || t.prependAvatar)), N = r(() => !!(t.appendIcon || t.appendAvatar)), w = r(() => {
|
|
67
67
|
var n;
|
|
68
|
-
return ((n =
|
|
69
|
-
}),
|
|
70
|
-
function
|
|
71
|
-
var p,
|
|
68
|
+
return ((n = c == null ? void 0 : c.isSelected) == null ? void 0 : n.call(c, t.value)) ?? !1;
|
|
69
|
+
}), A = r(() => t.active), V = r(() => !!t.to);
|
|
70
|
+
function k(n, m = null) {
|
|
71
|
+
var p, h;
|
|
72
72
|
if (t.disabled) return;
|
|
73
|
-
G("click", n)
|
|
73
|
+
if (G("click", n), (n.ctrlKey || n.metaKey) && t.to) {
|
|
74
|
+
const y = typeof t.to == "string" ? t.to : t.to.path;
|
|
75
|
+
window.open(y, "_blank");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
74
78
|
const d = ((p = f.value) == null ? void 0 : p.$el) ?? f.value;
|
|
75
|
-
d != null && d.dispatchEvent && d.dispatchEvent(new CustomEvent("select", { detail: t.value, bubbles: !0 })),
|
|
79
|
+
d != null && d.dispatchEvent && d.dispatchEvent(new CustomEvent("select", { detail: t.value, bubbles: !0 })), c && t.selectable && t.value !== null && ((h = c.toggleItem) == null || h.call(c, t.value), d != null && d.dispatchEvent && d.dispatchEvent(new CustomEvent("selected", { detail: t.value, bubbles: !0 }))), m && m(n);
|
|
76
80
|
}
|
|
77
81
|
const z = r(() => {
|
|
78
82
|
switch (t.variant) {
|
|
@@ -110,78 +114,78 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
110
114
|
{
|
|
111
115
|
"cursor-not-allowed opacity-50": t.disabled,
|
|
112
116
|
[`cursor-pointer ${t.hoverBg}`]: t.selectable && !t.disabled,
|
|
113
|
-
[t.activeClass]:
|
|
117
|
+
[t.activeClass]: w.value || A.value,
|
|
114
118
|
"px-4": !t.noGutters
|
|
115
119
|
},
|
|
116
120
|
t.containerClass
|
|
117
121
|
]);
|
|
118
|
-
return (n, m) => V.value ? (
|
|
122
|
+
return (n, m) => V.value ? (a(), u(X(Y), {
|
|
119
123
|
key: 0,
|
|
120
124
|
to: e.to,
|
|
121
125
|
replace: e.replace,
|
|
122
126
|
custom: !0
|
|
123
127
|
}, {
|
|
124
|
-
default: $(({ href: d, navigate: p, isActive:
|
|
125
|
-
(
|
|
128
|
+
default: $(({ href: d, navigate: p, isActive: h }) => [
|
|
129
|
+
(a(), u(v(e.tag), C({
|
|
126
130
|
id: E.value,
|
|
127
131
|
ref_key: "liRef",
|
|
128
132
|
ref: f,
|
|
129
133
|
href: d,
|
|
130
134
|
role: "option",
|
|
131
|
-
"aria-selected":
|
|
135
|
+
"aria-selected": w.value || A.value || h,
|
|
132
136
|
"aria-disabled": e.disabled,
|
|
133
137
|
tabindex: "-1",
|
|
134
138
|
class: O.value,
|
|
135
|
-
onClick: (
|
|
136
|
-
onKeydown: L(P((
|
|
139
|
+
onClick: (y) => k(y, p),
|
|
140
|
+
onKeydown: L(P((y) => k(y, p), ["prevent"]), ["enter"])
|
|
137
141
|
}, n.$attrs), {
|
|
138
142
|
default: $(() => [
|
|
139
|
-
|
|
140
|
-
K.value || n.$slots.prepend ? (
|
|
141
|
-
|
|
142
|
-
e.prependAvatar ? (
|
|
143
|
+
I("div", Z, [
|
|
144
|
+
K.value || n.$slots.prepend ? (a(), l("div", _, [
|
|
145
|
+
o(n.$slots, "prepend", {}, () => [
|
|
146
|
+
e.prependAvatar ? (a(), l("img", {
|
|
143
147
|
key: 0,
|
|
144
148
|
src: e.prependAvatar,
|
|
145
149
|
class: i(["rounded-full", e.prependClass])
|
|
146
|
-
}, null, 10, ee)) :
|
|
150
|
+
}, null, 10, ee)) : b(e.prependIcon) ? (a(), u(v(e.prependIcon), {
|
|
147
151
|
key: 1,
|
|
148
152
|
class: i(e.prependClass)
|
|
149
|
-
}, null, 8, ["class"])) : typeof e.prependIcon == "string" ? (
|
|
153
|
+
}, null, 8, ["class"])) : typeof e.prependIcon == "string" ? (a(), u(M, {
|
|
150
154
|
key: 2,
|
|
151
155
|
icon: e.prependIcon,
|
|
152
156
|
class: i(e.prependClass)
|
|
153
157
|
}, null, 8, ["icon", "class"])) : s("", !0)
|
|
154
158
|
])
|
|
155
159
|
])) : s("", !0),
|
|
156
|
-
|
|
160
|
+
I("div", C({
|
|
157
161
|
class: ["flex flex-col min-w-0 flex-1", x.value]
|
|
158
162
|
}, j.value), [
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
e.title ? (
|
|
163
|
+
o(n.$slots, "default", {}, () => [
|
|
164
|
+
o(n.$slots, "title", {}, () => [
|
|
165
|
+
e.title ? (a(), l("div", {
|
|
162
166
|
key: 0,
|
|
163
167
|
class: i(["truncate", e.titleClass])
|
|
164
|
-
},
|
|
168
|
+
}, S(e.title), 3)) : s("", !0)
|
|
165
169
|
]),
|
|
166
|
-
|
|
167
|
-
e.subtitle ? (
|
|
170
|
+
o(n.$slots, "subtitle", {}, () => [
|
|
171
|
+
e.subtitle ? (a(), l("div", {
|
|
168
172
|
key: 0,
|
|
169
173
|
class: i(["truncate", e.subtitleClass])
|
|
170
|
-
},
|
|
174
|
+
}, S(e.subtitle), 3)) : s("", !0)
|
|
171
175
|
])
|
|
172
176
|
])
|
|
173
177
|
], 16),
|
|
174
|
-
N.value ? (
|
|
175
|
-
|
|
176
|
-
e.appendAvatar ? (
|
|
178
|
+
N.value ? (a(), l("div", te, [
|
|
179
|
+
o(n.$slots, "append", {}, () => [
|
|
180
|
+
e.appendAvatar ? (a(), l("img", {
|
|
177
181
|
key: 0,
|
|
178
182
|
src: e.appendAvatar,
|
|
179
183
|
class: "w-8 h-8 rounded-full"
|
|
180
184
|
}, null, 8, ne)) : s("", !0),
|
|
181
|
-
|
|
185
|
+
b(e.appendIcon) ? (a(), u(v(e.appendIcon), {
|
|
182
186
|
key: 1,
|
|
183
187
|
class: "w-5 h-5"
|
|
184
|
-
})) : e.appendIcon ? (
|
|
188
|
+
})) : e.appendIcon ? (a(), l("i", {
|
|
185
189
|
key: 2,
|
|
186
190
|
class: i([e.appendClass, "text-xl leading-none"])
|
|
187
191
|
}, null, 2)) : s("", !0)
|
|
@@ -193,66 +197,66 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
193
197
|
}, 1040, ["id", "href", "aria-selected", "aria-disabled", "class", "onClick", "onKeydown"]))
|
|
194
198
|
]),
|
|
195
199
|
_: 3
|
|
196
|
-
}, 8, ["to", "replace"])) : (
|
|
200
|
+
}, 8, ["to", "replace"])) : (a(), u(v(e.tag), C({
|
|
197
201
|
key: 1,
|
|
198
202
|
id: E.value,
|
|
199
203
|
ref_key: "liRef",
|
|
200
204
|
ref: f,
|
|
201
205
|
role: "option",
|
|
202
|
-
"aria-selected":
|
|
206
|
+
"aria-selected": w.value || A.value,
|
|
203
207
|
"aria-disabled": e.disabled,
|
|
204
208
|
tabindex: "-1",
|
|
205
209
|
class: [O.value],
|
|
206
|
-
onClick:
|
|
207
|
-
onKeydown: L(P(
|
|
210
|
+
onClick: k,
|
|
211
|
+
onKeydown: L(P(k, ["prevent"]), ["enter"])
|
|
208
212
|
}, n.$attrs), {
|
|
209
213
|
default: $(() => [
|
|
210
|
-
|
|
211
|
-
K.value || n.$slots.prepend ? (
|
|
212
|
-
|
|
213
|
-
e.prependAvatar ? (
|
|
214
|
+
I("div", ae, [
|
|
215
|
+
K.value || n.$slots.prepend ? (a(), l("div", le, [
|
|
216
|
+
o(n.$slots, "prepend", {}, () => [
|
|
217
|
+
e.prependAvatar ? (a(), l("img", {
|
|
214
218
|
key: 0,
|
|
215
219
|
src: e.prependAvatar,
|
|
216
220
|
class: i(["rounded-full", e.prependClass])
|
|
217
|
-
}, null, 10, se)) :
|
|
221
|
+
}, null, 10, se)) : b(e.prependIcon) ? (a(), u(v(e.prependIcon), {
|
|
218
222
|
key: 1,
|
|
219
223
|
class: i(e.prependClass)
|
|
220
|
-
}, null, 8, ["class"])) : typeof e.prependIcon == "string" ? (
|
|
224
|
+
}, null, 8, ["class"])) : typeof e.prependIcon == "string" ? (a(), u(M, {
|
|
221
225
|
key: 2,
|
|
222
226
|
icon: e.prependIcon,
|
|
223
227
|
class: i(e.prependClass)
|
|
224
228
|
}, null, 8, ["icon", "class"])) : s("", !0)
|
|
225
229
|
])
|
|
226
230
|
])) : s("", !0),
|
|
227
|
-
|
|
231
|
+
I("div", C({
|
|
228
232
|
class: ["flex flex-col min-w-0 flex-1", x.value]
|
|
229
233
|
}, j.value), [
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
e.title ? (
|
|
234
|
+
o(n.$slots, "default", {}, () => [
|
|
235
|
+
o(n.$slots, "title", {}, () => [
|
|
236
|
+
e.title ? (a(), l("div", {
|
|
233
237
|
key: 0,
|
|
234
238
|
class: i(["truncate", e.titleClass])
|
|
235
|
-
},
|
|
239
|
+
}, S(e.title), 3)) : s("", !0)
|
|
236
240
|
]),
|
|
237
|
-
|
|
238
|
-
e.subtitle ? (
|
|
241
|
+
o(n.$slots, "subtitle", {}, () => [
|
|
242
|
+
e.subtitle ? (a(), l("div", {
|
|
239
243
|
key: 0,
|
|
240
244
|
class: i(["truncate", e.subtitleClass])
|
|
241
|
-
},
|
|
245
|
+
}, S(e.subtitle), 3)) : s("", !0)
|
|
242
246
|
])
|
|
243
247
|
])
|
|
244
248
|
], 16),
|
|
245
|
-
N.value ? (
|
|
246
|
-
|
|
247
|
-
e.appendAvatar ? (
|
|
249
|
+
N.value ? (a(), l("div", re, [
|
|
250
|
+
o(n.$slots, "append", {}, () => [
|
|
251
|
+
e.appendAvatar ? (a(), l("img", {
|
|
248
252
|
key: 0,
|
|
249
253
|
src: e.appendAvatar,
|
|
250
254
|
class: "w-8 h-8 rounded-full"
|
|
251
255
|
}, null, 8, ie)) : s("", !0),
|
|
252
|
-
|
|
256
|
+
b(e.appendIcon) ? (a(), u(v(e.appendIcon), {
|
|
253
257
|
key: 1,
|
|
254
258
|
class: "w-5 h-5"
|
|
255
|
-
})) : e.appendIcon ? (
|
|
259
|
+
})) : e.appendIcon ? (a(), l("i", {
|
|
256
260
|
key: 2,
|
|
257
261
|
class: i([e.appendIcon, "text-xl leading-none"])
|
|
258
262
|
}, null, 2)) : s("", !0)
|
|
@@ -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.
|
|
2
|
+
import z from "../../../KunDialog/src/components/KunDialog.vue.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";
|
|
@@ -1,48 +1,45 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { kunTextareaProps as
|
|
3
|
-
import { useKunTextarea as
|
|
4
|
-
import { renderIconSlot as
|
|
5
|
-
const
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "block text-sm font-medium mb-1"
|
|
8
|
-
}, _ = { class: "relative" }, ee = {
|
|
1
|
+
import { ref as Q, getCurrentInstance as U, computed as p, createElementBlock as l, openBlock as s, mergeProps as B, renderSlot as i, createElementVNode as a, unref as t, createCommentVNode as d, normalizeClass as g, toDisplayString as y, normalizeProps as w, guardReactiveProps as I, createBlock as m, resolveDynamicComponent as k, Fragment as W, renderList as X, withDirectives as Y, vShow as Z, createTextVNode as x } from "vue";
|
|
2
|
+
import { kunTextareaProps as _ } from "../composables/KunTextareaProps.js";
|
|
3
|
+
import { useKunTextarea as ee } from "../composables/useKunTextareaComposable.js";
|
|
4
|
+
import { renderIconSlot as h } from "../../../../utils/renderIcon.js";
|
|
5
|
+
const oe = { class: "relative" }, re = {
|
|
9
6
|
key: 0,
|
|
10
7
|
class: "absolute left-2 top-2 flex items-center"
|
|
11
|
-
},
|
|
8
|
+
}, te = {
|
|
12
9
|
key: 1,
|
|
13
10
|
class: "absolute left-2 top-2 ml-1"
|
|
14
|
-
},
|
|
11
|
+
}, ne = ["value", "rows", "disabled", "readonly", "placeholder"], se = {
|
|
15
12
|
key: 3,
|
|
16
13
|
class: "absolute right-2 top-2 mr-1"
|
|
17
|
-
},
|
|
14
|
+
}, le = {
|
|
18
15
|
key: 4,
|
|
19
16
|
class: "absolute right-2 top-2 flex items-center"
|
|
20
|
-
},
|
|
17
|
+
}, ae = {
|
|
21
18
|
key: 5,
|
|
22
19
|
class: "mt-1"
|
|
23
|
-
},
|
|
20
|
+
}, ie = { class: "h-1 w-full bg-gray-200 rounded overflow-hidden" }, de = {
|
|
24
21
|
key: 7,
|
|
25
22
|
class: "text-xs text-right mt-1 text-gray-400"
|
|
26
|
-
},
|
|
23
|
+
}, ue = { key: 0 }, ge = {
|
|
27
24
|
__name: "KunTextarea",
|
|
28
|
-
props:
|
|
25
|
+
props: _,
|
|
29
26
|
emits: ["update:modelValue", "click:clear", "click:control", "update:focused", "mousedown:control"],
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
27
|
+
setup(S, { expose: D, emit: F }) {
|
|
28
|
+
const o = S, R = F, u = Q(null), A = `textarea-${U().uid}`, M = p(() => v.value || !!c.value || o.dirty), {
|
|
32
29
|
isFocused: v,
|
|
33
30
|
internalValue: c,
|
|
34
31
|
rootRef: V,
|
|
35
|
-
updateValue:
|
|
32
|
+
updateValue: P,
|
|
36
33
|
handleClear: z,
|
|
37
|
-
adjustHeight:
|
|
38
|
-
validate:
|
|
39
|
-
reset:
|
|
40
|
-
resetValidation:
|
|
34
|
+
adjustHeight: T,
|
|
35
|
+
validate: E,
|
|
36
|
+
reset: G,
|
|
37
|
+
resetValidation: N,
|
|
41
38
|
hasError: f,
|
|
42
|
-
displayedMessages:
|
|
43
|
-
} =
|
|
44
|
-
const e = !!
|
|
45
|
-
switch (
|
|
39
|
+
displayedMessages: C
|
|
40
|
+
} = ee(o, R, u), H = p(() => {
|
|
41
|
+
const e = !!o.bgColor;
|
|
42
|
+
switch (o.variant) {
|
|
46
43
|
case "filled":
|
|
47
44
|
return [
|
|
48
45
|
e ? "" : "bg-gray-100 dark:bg-gray-900",
|
|
@@ -60,82 +57,76 @@ const x = {
|
|
|
60
57
|
default:
|
|
61
58
|
return "";
|
|
62
59
|
}
|
|
63
|
-
}),
|
|
64
|
-
switch (r.density) {
|
|
65
|
-
case "comfortable":
|
|
66
|
-
return "py-2";
|
|
67
|
-
case "compact":
|
|
68
|
-
return "py-1 text-sm";
|
|
69
|
-
default:
|
|
70
|
-
return "";
|
|
71
|
-
}
|
|
72
|
-
}), N = p(() => [
|
|
60
|
+
}), K = p(() => o.density === "compact" ? "p-1" : o.density === "comfortable" ? "p-2" : "p-3"), j = p(() => [
|
|
73
61
|
"w-full resize-none p-2 transition-colors duration-150",
|
|
74
|
-
|
|
62
|
+
o.inputClass,
|
|
75
63
|
{
|
|
76
|
-
"rounded-md": !
|
|
77
|
-
"rounded-none":
|
|
78
|
-
[`rounded-${
|
|
79
|
-
"shadow-md":
|
|
80
|
-
"shadow-none":
|
|
81
|
-
[`text-${
|
|
82
|
-
[`${
|
|
83
|
-
"text-gray-500 bg-gray-200":
|
|
84
|
-
"focus:outline-none focus:ring-2": !
|
|
85
|
-
[`focus:ring-${
|
|
64
|
+
"rounded-md": !o.tile,
|
|
65
|
+
"rounded-none": o.tile,
|
|
66
|
+
[`rounded-${o.rounded}`]: typeof o.rounded == "string" || typeof o.rounded == "number",
|
|
67
|
+
"shadow-md": o.variant === "solo" && !o.flat,
|
|
68
|
+
"shadow-none": o.flat,
|
|
69
|
+
[`text-${o.textColor}`]: o.textColor,
|
|
70
|
+
[`${o.bgColor}`]: o.bgColor,
|
|
71
|
+
"text-gray-500 bg-gray-200": o.disabled,
|
|
72
|
+
"focus:outline-none focus:ring-2": !o.disabled,
|
|
73
|
+
[`focus:ring-${o.color}`]: o.color && !o.disabled && !f.value,
|
|
86
74
|
"border-red-500 ring-red-500 focus:ring-red-500": f.value,
|
|
87
|
-
"resize-none":
|
|
88
|
-
resize: !
|
|
75
|
+
"resize-none": o.noResize || o.autoGrow,
|
|
76
|
+
resize: !o.noResize && !o.autoGrow
|
|
89
77
|
}
|
|
90
|
-
]),
|
|
91
|
-
"relative w-full",
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
]),
|
|
78
|
+
]), L = p(() => [
|
|
79
|
+
"relative w-full flex flex-col",
|
|
80
|
+
o.class,
|
|
81
|
+
o.wrapperClass
|
|
82
|
+
]), $ = p(() => o.counter === !0 ? 25 : typeof o.counter == "number" || typeof o.counter == "string" ? o.counter : null), q = p(() => o.persistentCounter ? !0 : !!o.counter && v.value), J = p(() => typeof o.clearIcon == "string" ? o.clearIcon : "i-heroicons-x-mark-20-solid");
|
|
95
83
|
function b(e, n) {
|
|
96
84
|
R(`click:${n}`, e);
|
|
97
85
|
}
|
|
98
|
-
return
|
|
99
|
-
validate:
|
|
100
|
-
reset:
|
|
101
|
-
resetValidation:
|
|
102
|
-
errorMessages:
|
|
86
|
+
return D({
|
|
87
|
+
validate: E,
|
|
88
|
+
reset: G,
|
|
89
|
+
resetValidation: N,
|
|
90
|
+
errorMessages: C,
|
|
103
91
|
isValid: p(() => !f.value),
|
|
104
92
|
rootRef: V,
|
|
105
93
|
focus: () => {
|
|
106
94
|
var e;
|
|
107
95
|
return (e = u.value) == null ? void 0 : e.focus();
|
|
108
96
|
}
|
|
109
|
-
}), (e, n) => (s(), l("div",
|
|
110
|
-
class:
|
|
97
|
+
}), (e, n) => (s(), l("div", B({
|
|
98
|
+
class: L.value,
|
|
111
99
|
ref_key: "rootRef",
|
|
112
100
|
ref: V
|
|
113
101
|
}, e.$attrs), [
|
|
114
|
-
i(e.$slots, "label",
|
|
115
|
-
var
|
|
116
|
-
return (
|
|
102
|
+
i(e.$slots, "label", B({ for: A }, { label: e.label, isFocused: t(v), isActive: !!t(c), controlRef: u.value, focus: () => {
|
|
103
|
+
var r;
|
|
104
|
+
return (r = u.value) == null ? void 0 : r.focus();
|
|
117
105
|
}, blur: () => {
|
|
118
|
-
var
|
|
119
|
-
return (
|
|
120
|
-
}, props:
|
|
121
|
-
e.label ? (s(), l("label",
|
|
106
|
+
var r;
|
|
107
|
+
return (r = u.value) == null ? void 0 : r.blur();
|
|
108
|
+
}, props: o }), () => [
|
|
109
|
+
e.label ? (s(), l("label", {
|
|
110
|
+
key: 0,
|
|
111
|
+
class: g(["absolute left-2 transition-all duration-200 ease-in-out pointer-events-none select-none z-10", M.value || e.placeholder ? "-top-2.25 text-xs opacity-80" : "top-3 text-sm opacity-80"])
|
|
112
|
+
}, y(e.label), 3)) : d("", !0)
|
|
122
113
|
]),
|
|
123
|
-
a("div",
|
|
124
|
-
e.prependIcon || e.$slots.prepend ? (s(), l("div",
|
|
125
|
-
i(e.$slots, "prepend",
|
|
114
|
+
a("div", oe, [
|
|
115
|
+
e.prependIcon || e.$slots.prepend ? (s(), l("div", re, [
|
|
116
|
+
i(e.$slots, "prepend", w(I(e.prependSlotBindings)), () => [
|
|
126
117
|
a("div", {
|
|
127
|
-
onClick: n[0] || (n[0] = (
|
|
118
|
+
onClick: n[0] || (n[0] = (r) => b(r, "prepend"))
|
|
128
119
|
}, [
|
|
129
|
-
(s(),
|
|
120
|
+
(s(), m(k(t(h)(e.prependIcon))))
|
|
130
121
|
])
|
|
131
122
|
])
|
|
132
123
|
])) : d("", !0),
|
|
133
|
-
e.prependInnerIcon || e.$slots["prepend-inner"] ? (s(), l("div",
|
|
124
|
+
e.prependInnerIcon || e.$slots["prepend-inner"] ? (s(), l("div", te, [
|
|
134
125
|
i(e.$slots, "prepend-inner", {}, () => [
|
|
135
126
|
a("div", {
|
|
136
|
-
onClick: n[1] || (n[1] = (
|
|
127
|
+
onClick: n[1] || (n[1] = (r) => b(r, "prependInner"))
|
|
137
128
|
}, [
|
|
138
|
-
(s(),
|
|
129
|
+
(s(), m(k(t(h)(e.prependInnerIcon))))
|
|
139
130
|
])
|
|
140
131
|
])
|
|
141
132
|
])) : d("", !0),
|
|
@@ -147,65 +138,65 @@ const x = {
|
|
|
147
138
|
disabled: e.disabled,
|
|
148
139
|
readonly: e.readonly,
|
|
149
140
|
placeholder: e.placeholder,
|
|
150
|
-
onInput: n[2] || (n[2] = (
|
|
151
|
-
t(
|
|
141
|
+
onInput: n[2] || (n[2] = (r) => {
|
|
142
|
+
t(P)(r.target.value), e.autoGrow && t(T)();
|
|
152
143
|
}),
|
|
153
|
-
onFocus: n[3] || (n[3] = (
|
|
144
|
+
onFocus: n[3] || (n[3] = (r) => {
|
|
154
145
|
v.value = !0, e.$emit("update:focused", !0);
|
|
155
146
|
}),
|
|
156
|
-
onBlur: n[4] || (n[4] = (
|
|
147
|
+
onBlur: n[4] || (n[4] = (r) => {
|
|
157
148
|
v.value = !1, e.$emit("update:focused", !1);
|
|
158
149
|
}),
|
|
159
|
-
onClick: n[5] || (n[5] = (
|
|
160
|
-
onMousedown: n[6] || (n[6] = (
|
|
161
|
-
class: g([
|
|
162
|
-
}, null, 42,
|
|
150
|
+
onClick: n[5] || (n[5] = (r) => e.$emit("click:control", r)),
|
|
151
|
+
onMousedown: n[6] || (n[6] = (r) => e.$emit("mousedown:control", r)),
|
|
152
|
+
class: g([[H.value, K.value, j.value], "py-3"])
|
|
153
|
+
}, null, 42, ne),
|
|
163
154
|
e.clearable && t(c) ? (s(), l("div", {
|
|
164
155
|
key: 2,
|
|
165
156
|
class: g(["absolute right-2 top-2", { "opacity-100": e.persistentClear, "hover:opacity-100 opacity-0 transition-opacity duration-200": !e.persistentClear }])
|
|
166
157
|
}, [
|
|
167
|
-
i(e.$slots, "clear",
|
|
168
|
-
var
|
|
169
|
-
return (
|
|
158
|
+
i(e.$slots, "clear", w(I({ isActive: !!t(c), isFocused: t(v), controlRef: u.value, focus: () => {
|
|
159
|
+
var r;
|
|
160
|
+
return (r = u.value) == null ? void 0 : r.focus();
|
|
170
161
|
}, blur: () => {
|
|
171
|
-
var
|
|
172
|
-
return (
|
|
173
|
-
}, props:
|
|
162
|
+
var r;
|
|
163
|
+
return (r = u.value) == null ? void 0 : r.blur();
|
|
164
|
+
}, props: o })), () => [
|
|
174
165
|
a("button", {
|
|
175
166
|
type: "button",
|
|
176
|
-
onClick: n[7] || (n[7] = (...
|
|
167
|
+
onClick: n[7] || (n[7] = (...r) => t(z) && t(z)(...r)),
|
|
177
168
|
class: "text-gray-500 hover:text-gray-700"
|
|
178
169
|
}, [
|
|
179
170
|
a("span", {
|
|
180
|
-
class: g(
|
|
171
|
+
class: g(J.value)
|
|
181
172
|
}, null, 2)
|
|
182
173
|
])
|
|
183
174
|
])
|
|
184
175
|
], 2)) : d("", !0),
|
|
185
|
-
e.appendInnerIcon || e.$slots["append-inner"] ? (s(), l("div",
|
|
176
|
+
e.appendInnerIcon || e.$slots["append-inner"] ? (s(), l("div", se, [
|
|
186
177
|
i(e.$slots, "append-inner", {}, () => [
|
|
187
178
|
a("div", {
|
|
188
|
-
onClick: n[8] || (n[8] = (
|
|
179
|
+
onClick: n[8] || (n[8] = (r) => b(r, "appendInner"))
|
|
189
180
|
}, [
|
|
190
|
-
(s(),
|
|
181
|
+
(s(), m(k(t(h)(e.appendInnerIcon))))
|
|
191
182
|
])
|
|
192
183
|
])
|
|
193
184
|
])) : d("", !0),
|
|
194
|
-
e.appendIcon || e.$slots.append ? (s(), l("div",
|
|
195
|
-
i(e.$slots, "append",
|
|
185
|
+
e.appendIcon || e.$slots.append ? (s(), l("div", le, [
|
|
186
|
+
i(e.$slots, "append", w(I(e.appendSlotBindings)), () => [
|
|
196
187
|
a("div", {
|
|
197
|
-
onClick: n[9] || (n[9] = (
|
|
188
|
+
onClick: n[9] || (n[9] = (r) => b(r, "append"))
|
|
198
189
|
}, [
|
|
199
|
-
(s(),
|
|
190
|
+
(s(), m(k(t(h)(e.appendIcon))))
|
|
200
191
|
])
|
|
201
192
|
])
|
|
202
193
|
])) : d("", !0),
|
|
203
|
-
e.loading ? (s(), l("div",
|
|
194
|
+
e.loading ? (s(), l("div", ae, [
|
|
204
195
|
i(e.$slots, "loader", {
|
|
205
196
|
color: e.loadingColor,
|
|
206
197
|
isActive: !0
|
|
207
198
|
}, () => [
|
|
208
|
-
a("div",
|
|
199
|
+
a("div", ie, [
|
|
209
200
|
a("div", {
|
|
210
201
|
class: g(["h-full transition-all duration-300", [`${e.loadingColor}`]]),
|
|
211
202
|
style: { width: "100%" }
|
|
@@ -213,34 +204,34 @@ const x = {
|
|
|
213
204
|
])
|
|
214
205
|
])
|
|
215
206
|
])) : d("", !0),
|
|
216
|
-
!e.hideDetails || e.hideDetails === "auto" && (t(
|
|
207
|
+
!e.hideDetails || e.hideDetails === "auto" && (t(C).length || e.hint) ? (s(), l("div", {
|
|
217
208
|
key: 6,
|
|
218
209
|
class: g(["text-xs mt-1 space-y-1", { "text-red-500": t(f), "text-gray-500": !t(f) }])
|
|
219
210
|
}, [
|
|
220
211
|
i(e.$slots, "details", {}, () => [
|
|
221
|
-
t(f) ? (s(!0), l(
|
|
222
|
-
key:
|
|
223
|
-
message:
|
|
212
|
+
t(f) ? (s(!0), l(W, { key: 0 }, X(t(C), (r, O) => i(e.$slots, "message", {
|
|
213
|
+
key: O,
|
|
214
|
+
message: r
|
|
224
215
|
}, () => [
|
|
225
|
-
a("div", null,
|
|
216
|
+
a("div", null, y(r), 1)
|
|
226
217
|
])), 128)) : e.hint ? i(e.$slots, "hint", {
|
|
227
218
|
key: 1,
|
|
228
219
|
hint: e.hint
|
|
229
220
|
}, () => [
|
|
230
|
-
|
|
231
|
-
[
|
|
221
|
+
Y(a("div", null, y(e.hint), 513), [
|
|
222
|
+
[Z, e.persistentHint || t(v)]
|
|
232
223
|
])
|
|
233
224
|
]) : d("", !0)
|
|
234
225
|
])
|
|
235
226
|
], 2)) : d("", !0),
|
|
236
|
-
|
|
227
|
+
q.value ? (s(), l("div", de, [
|
|
237
228
|
i(e.$slots, "counter", {
|
|
238
229
|
counter: t(c).length,
|
|
239
|
-
max:
|
|
230
|
+
max: $.value,
|
|
240
231
|
value: t(c).length
|
|
241
232
|
}, () => [
|
|
242
|
-
|
|
243
|
-
|
|
233
|
+
x(y(t(c).length), 1),
|
|
234
|
+
$.value ? (s(), l("span", ue, " / " + y($.value), 1)) : d("", !0)
|
|
244
235
|
])
|
|
245
236
|
])) : d("", !0)
|
|
246
237
|
])
|
|
@@ -248,5 +239,5 @@ const x = {
|
|
|
248
239
|
}
|
|
249
240
|
};
|
|
250
241
|
export {
|
|
251
|
-
|
|
242
|
+
ge as default
|
|
252
243
|
};
|
package/dist/index.js
CHANGED
|
@@ -35,66 +35,67 @@ import { default as an } from "./components/KunContainer/src/components/KunConta
|
|
|
35
35
|
import * as A from "./components/KunCurrency/src/components/KunCurrency.vue.js";
|
|
36
36
|
import { default as ln } from "./components/KunCurrency/src/components/KunCurrency.vue.js";
|
|
37
37
|
import * as F from "./components/KunDialog/src/components/KunDialog.vue.js";
|
|
38
|
+
import { default as dn } from "./components/KunDialog/src/components/KunDialog.vue.js";
|
|
38
39
|
import * as g from "./components/KunDialog/src/components/KunDialogContent.vue.js";
|
|
39
40
|
import * as R from "./components/KunDialog/src/components/KunDialogOverlay.vue.js";
|
|
40
41
|
import * as h from "./components/KunDivider/src/components/KunDivider.vue.js";
|
|
41
|
-
import { default as
|
|
42
|
+
import { default as Tn } from "./components/KunDivider/src/components/KunDivider.vue.js";
|
|
42
43
|
import * as D from "./components/KunDrawer/src/components/KunDrawer.vue.js";
|
|
43
|
-
import { default as
|
|
44
|
+
import { default as xn } from "./components/KunDrawer/src/components/KunDrawer.vue.js";
|
|
44
45
|
import * as w from "./components/KunFileInput/src/components/KunFileInput.vue.js";
|
|
45
|
-
import { default as
|
|
46
|
+
import { default as In } from "./components/KunFileInput/src/components/KunFileInput.vue.js";
|
|
46
47
|
import * as M from "./components/KunForm/src/components/KunForm.vue.js";
|
|
47
|
-
import { default as
|
|
48
|
+
import { default as Sn } from "./components/KunForm/src/components/KunForm.vue.js";
|
|
48
49
|
import * as B from "./components/KunIcon/src/components/KunIcon.vue.js";
|
|
49
|
-
import { default as
|
|
50
|
+
import { default as Fn } from "./components/KunIcon/src/components/KunIcon.vue.js";
|
|
50
51
|
import * as G from "./components/KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
|
|
51
|
-
import { default as
|
|
52
|
+
import { default as Rn } from "./components/KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
|
|
52
53
|
import * as y from "./components/KunList/src/components/KunList.vue.js";
|
|
53
|
-
import { default as
|
|
54
|
+
import { default as Dn } from "./components/KunList/src/components/KunList.vue.js";
|
|
54
55
|
import * as V from "./components/KunListGroup/src/components/KunListGroup.vue.js";
|
|
55
|
-
import { default as
|
|
56
|
+
import { default as Mn } from "./components/KunListGroup/src/components/KunListGroup.vue.js";
|
|
56
57
|
import * as O from "./components/KunListImg/src/components/KunListImg.vue.js";
|
|
57
|
-
import { default as
|
|
58
|
+
import { default as Gn } from "./components/KunListImg/src/components/KunListImg.vue.js";
|
|
58
59
|
import * as N from "./components/KunListItem/src/components/KunListItem.vue.js";
|
|
59
|
-
import { default as
|
|
60
|
+
import { default as Vn } from "./components/KunListItem/src/components/KunListItem.vue.js";
|
|
60
61
|
import * as k from "./components/KunListItemAction/src/components/KunListItemAction.vue.js";
|
|
61
|
-
import { default as
|
|
62
|
+
import { default as Nn } from "./components/KunListItemAction/src/components/KunListItemAction.vue.js";
|
|
62
63
|
import * as j from "./components/KunListItemAvatar/src/components/KunListItemAvatar.vue.js";
|
|
63
|
-
import { default as
|
|
64
|
+
import { default as jn } from "./components/KunListItemAvatar/src/components/KunListItemAvatar.vue.js";
|
|
64
65
|
import * as H from "./components/KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js";
|
|
65
|
-
import { default as
|
|
66
|
+
import { default as Wn } from "./components/KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js";
|
|
66
67
|
import * as W from "./components/KunListItemText/src/components/KunListItemText.vue.js";
|
|
67
|
-
import { default as
|
|
68
|
+
import { default as _n } from "./components/KunListItemText/src/components/KunListItemText.vue.js";
|
|
68
69
|
import * as E from "./components/KunListItemTitle/src/components/KunListItemTitle.vue.js";
|
|
69
|
-
import { default as
|
|
70
|
+
import { default as zn } from "./components/KunListItemTitle/src/components/KunListItemTitle.vue.js";
|
|
70
71
|
import * as _ from "./components/KunListSubheader/src/components/KunListSubheader.vue.js";
|
|
71
|
-
import { default as
|
|
72
|
+
import { default as Pn } from "./components/KunListSubheader/src/components/KunListSubheader.vue.js";
|
|
72
73
|
import * as q from "./components/KunLoaderCircular/src/components/KunLoaderCircular.vue.js";
|
|
73
|
-
import { default as
|
|
74
|
+
import { default as Un } from "./components/KunLoaderCircular/src/components/KunLoaderCircular.vue.js";
|
|
74
75
|
import * as z from "./components/KunMenu/src/components/KunMenu.vue.js";
|
|
75
|
-
import { default as
|
|
76
|
+
import { default as Yn } from "./components/KunMenu/src/components/KunMenu.vue.js";
|
|
76
77
|
import * as J from "./components/KunModalFooter/src/components/KunModalFooter.vue.js";
|
|
77
|
-
import { default as
|
|
78
|
+
import { default as $n } from "./components/KunModalFooter/src/components/KunModalFooter.vue.js";
|
|
78
79
|
import * as P from "./components/KunModalFooter/src/components/KunMultipleModalFooter.vue.js";
|
|
79
80
|
import * as Q from "./components/KunNumberField/src/components/KunNumberField.vue.js";
|
|
80
|
-
import { default as
|
|
81
|
+
import { default as ne } from "./components/KunNumberField/src/components/KunNumberField.vue.js";
|
|
81
82
|
import * as U from "./components/KunRadio/src/components/KunRadio.vue.js";
|
|
82
|
-
import { default as
|
|
83
|
+
import { default as te } from "./components/KunRadio/src/components/KunRadio.vue.js";
|
|
83
84
|
import * as X from "./components/KunRadioGroup/src/components/KunRadioGroup.vue.js";
|
|
84
|
-
import { default as
|
|
85
|
+
import { default as ue } from "./components/KunRadioGroup/src/components/KunRadioGroup.vue.js";
|
|
85
86
|
import * as Y from "./components/KunRelationMatrix/src/components/KunRelationMatrix.vue.js";
|
|
86
|
-
import { default as
|
|
87
|
+
import { default as me } from "./components/KunRelationMatrix/src/components/KunRelationMatrix.vue.js";
|
|
87
88
|
import * as Z from "./components/KunRow/src/components/KunRow.vue.js";
|
|
88
|
-
import { default as
|
|
89
|
+
import { default as ce } from "./components/KunRow/src/components/KunRow.vue.js";
|
|
89
90
|
import * as $ from "./components/KunSlider/src/components/KunSlider.vue.js";
|
|
90
|
-
import { default as
|
|
91
|
+
import { default as Ke } from "./components/KunSlider/src/components/KunSlider.vue.js";
|
|
91
92
|
import * as oo from "./components/KunSlider/src/components/KunThumb.vue.js";
|
|
92
93
|
import * as no from "./components/KunSpacer/src/components/KunSpacer.vue.js";
|
|
93
|
-
import { default as
|
|
94
|
+
import { default as le } from "./components/KunSpacer/src/components/KunSpacer.vue.js";
|
|
94
95
|
import * as eo from "./components/KunSwitch/src/components/KunSwitch.vue.js";
|
|
95
|
-
import { default as
|
|
96
|
+
import { default as de } from "./components/KunSwitch/src/components/KunSwitch.vue.js";
|
|
96
97
|
import * as to from "./components/KunTable/src/components/KunTable.vue.js";
|
|
97
|
-
import { default as
|
|
98
|
+
import { default as Te } from "./components/KunTable/src/components/KunTable.vue.js";
|
|
98
99
|
import * as ro from "./components/KunTable/src/components/KunTableFilter.vue.js";
|
|
99
100
|
import * as uo from "./components/KunTable/src/components/KunTableFooter.vue.js";
|
|
100
101
|
import * as so from "./components/KunTable/src/components/KunTableHeaders.vue.js";
|
|
@@ -106,22 +107,21 @@ import * as Ko from "./components/KunTable/src/components/KunTableVirtual.vue.js
|
|
|
106
107
|
import * as io from "./components/KunTabs/src/components/KunTab.vue.js";
|
|
107
108
|
import * as lo from "./components/KunTabs/src/components/KunTabWindow.vue.js";
|
|
108
109
|
import * as fo from "./components/KunTabs/src/components/KunTabs.vue.js";
|
|
109
|
-
import { default as
|
|
110
|
+
import { default as xe } from "./components/KunTabs/src/components/KunTabs.vue.js";
|
|
110
111
|
import * as vo from "./components/KunTextField/src/components/KunTextField.vue.js";
|
|
111
|
-
import { default as
|
|
112
|
+
import { default as Ie } from "./components/KunTextField/src/components/KunTextField.vue.js";
|
|
112
113
|
import * as To from "./components/KunTextarea/src/components/KunTextarea.vue.js";
|
|
113
|
-
import { default as
|
|
114
|
+
import { default as Se } from "./components/KunTextarea/src/components/KunTextarea.vue.js";
|
|
114
115
|
import * as bo from "./components/KunToolbar/src/components/KunToolbar.vue.js";
|
|
115
|
-
import { default as
|
|
116
|
+
import { default as Fe } from "./components/KunToolbar/src/components/KunToolbar.vue.js";
|
|
116
117
|
import * as xo from "./components/KunToolbar/src/components/KunToolbarItems.vue.js";
|
|
117
118
|
import * as Co from "./components/KunToolbar/src/components/KunToolbarTitle.vue.js";
|
|
118
119
|
import * as Io from "./components/KunTooltip/src/components/KunTooltip.vue.js";
|
|
119
|
-
import { default as
|
|
120
|
+
import { default as Re } from "./components/KunTooltip/src/components/KunTooltip.vue.js";
|
|
120
121
|
import * as Lo from "./components/KunVirtualScroller/src/components/KunVirtualScroller.vue.js";
|
|
121
|
-
import { default as
|
|
122
|
+
import { default as De } from "./components/KunVirtualScroller/src/components/KunVirtualScroller.vue.js";
|
|
122
123
|
import { defineAsyncComponent as So } from "vue";
|
|
123
124
|
/* empty css */
|
|
124
|
-
import { default as De } from "./components/KunDialog/src/components/KunDialog.vue2.js";
|
|
125
125
|
const Ao = /* @__PURE__ */ Object.assign({ "./components/KunAlert/src/components/KunAlert.vue": () => import("./components/KunAlert/src/components/KunAlert.vue.js"), "./components/KunAppbar/src/components/KunAppbar.vue": () => import("./components/KunAppbar/src/components/KunAppbar.vue.js"), "./components/KunAppbarTitle/src/components/KunAppbarTitle.vue": () => import("./components/KunAppbarTitle/src/components/KunAppbarTitle.vue.js"), "./components/KunAutocomplete/src/components/KunAutocomplete.vue": () => import("./components/KunAutocomplete/src/components/KunAutocomplete.vue.js"), "./components/KunAvatar/src/components/KunAvatar.vue": () => import("./components/KunAvatar/src/components/KunAvatar.vue.js"), "./components/KunBadge/src/components/KunBadge.vue": () => import("./components/KunBadge/src/components/KunBadge.vue.js"), "./components/KunBtn/src/components/KunBtn.vue": () => import("./components/KunBtn/src/components/KunBtn.vue.js"), "./components/KunCard/src/components/KunCard.vue": () => import("./components/KunCard/src/components/KunCard.vue.js"), "./components/KunCardActions/src/components/KunCardActions.vue": () => import("./components/KunCardActions/src/components/KunCardActions.vue.js"), "./components/KunCardItem/src/components/KunCardItem.vue": () => import("./components/KunCardItem/src/components/KunCardItem.vue.js"), "./components/KunCardSubtitle/src/components/KunCardSubtitle.vue": () => import("./components/KunCardSubtitle/src/components/KunCardSubtitle.vue.js"), "./components/KunCardText/src/components/KunCardText.vue": () => import("./components/KunCardText/src/components/KunCardText.vue.js"), "./components/KunCardTitle/src/components/KunCardTitle.vue": () => import("./components/KunCardTitle/src/components/KunCardTitle.vue.js"), "./components/KunCheckbox/src/components/KunCheckbox.vue": () => import("./components/KunCheckbox/src/components/KunCheckbox.vue.js"), "./components/KunChip/src/components/KunChip.vue": () => import("./components/KunChip/src/components/KunChip.vue.js"), "./components/KunCol/src/components/KunCol.vue": () => import("./components/KunCol/src/components/KunCol.vue.js"), "./components/KunContainer/src/components/KunContainer.vue": () => import("./components/KunContainer/src/components/KunContainer.vue.js"), "./components/KunCurrency/src/components/KunCurrency.vue": () => import("./components/KunCurrency/src/components/KunCurrency.vue.js"), "./components/KunDialog/src/components/KunDialog.vue": () => import("./components/KunDialog/src/components/KunDialog.vue.js"), "./components/KunDialog/src/components/KunDialogContent.vue": () => import("./components/KunDialog/src/components/KunDialogContent.vue.js"), "./components/KunDialog/src/components/KunDialogOverlay.vue": () => import("./components/KunDialog/src/components/KunDialogOverlay.vue.js"), "./components/KunDivider/src/components/KunDivider.vue": () => import("./components/KunDivider/src/components/KunDivider.vue.js"), "./components/KunDrawer/src/components/KunDrawer.vue": () => import("./components/KunDrawer/src/components/KunDrawer.vue.js"), "./components/KunFileInput/src/components/KunFileInput.vue": () => import("./components/KunFileInput/src/components/KunFileInput.vue.js"), "./components/KunForm/src/components/KunForm.vue": () => import("./components/KunForm/src/components/KunForm.vue.js"), "./components/KunIcon/src/components/KunIcon.vue": () => import("./components/KunIcon/src/components/KunIcon.vue.js"), "./components/KunInfiniteScroll/src/components/KunInfiniteScroll.vue": () => import("./components/KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js"), "./components/KunList/src/components/KunList.vue": () => import("./components/KunList/src/components/KunList.vue.js"), "./components/KunListGroup/src/components/KunListGroup.vue": () => import("./components/KunListGroup/src/components/KunListGroup.vue.js"), "./components/KunListImg/src/components/KunListImg.vue": () => import("./components/KunListImg/src/components/KunListImg.vue.js"), "./components/KunListItem/src/components/KunListItem.vue": () => import("./components/KunListItem/src/components/KunListItem.vue.js"), "./components/KunListItemAction/src/components/KunListItemAction.vue": () => import("./components/KunListItemAction/src/components/KunListItemAction.vue.js"), "./components/KunListItemAvatar/src/components/KunListItemAvatar.vue": () => import("./components/KunListItemAvatar/src/components/KunListItemAvatar.vue.js"), "./components/KunListItemSubtitle/src/components/KunListItemSubtitle.vue": () => import("./components/KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js"), "./components/KunListItemText/src/components/KunListItemText.vue": () => import("./components/KunListItemText/src/components/KunListItemText.vue.js"), "./components/KunListItemTitle/src/components/KunListItemTitle.vue": () => import("./components/KunListItemTitle/src/components/KunListItemTitle.vue.js"), "./components/KunListSubheader/src/components/KunListSubheader.vue": () => import("./components/KunListSubheader/src/components/KunListSubheader.vue.js"), "./components/KunLoaderCircular/src/components/KunLoaderCircular.vue": () => import("./components/KunLoaderCircular/src/components/KunLoaderCircular.vue.js"), "./components/KunMenu/src/components/KunMenu.vue": () => import("./components/KunMenu/src/components/KunMenu.vue.js"), "./components/KunModalFooter/src/components/KunModalFooter.vue": () => import("./components/KunModalFooter/src/components/KunModalFooter.vue.js"), "./components/KunModalFooter/src/components/KunMultipleModalFooter.vue": () => import("./components/KunModalFooter/src/components/KunMultipleModalFooter.vue.js"), "./components/KunNumberField/src/components/KunNumberField.vue": () => import("./components/KunNumberField/src/components/KunNumberField.vue.js"), "./components/KunRadio/src/components/KunRadio.vue": () => import("./components/KunRadio/src/components/KunRadio.vue.js"), "./components/KunRadioGroup/src/components/KunRadioGroup.vue": () => import("./components/KunRadioGroup/src/components/KunRadioGroup.vue.js"), "./components/KunRelationMatrix/src/components/KunRelationMatrix.vue": () => import("./components/KunRelationMatrix/src/components/KunRelationMatrix.vue.js"), "./components/KunRow/src/components/KunRow.vue": () => import("./components/KunRow/src/components/KunRow.vue.js"), "./components/KunSlider/src/components/KunSlider.vue": () => import("./components/KunSlider/src/components/KunSlider.vue.js"), "./components/KunSlider/src/components/KunThumb.vue": () => import("./components/KunSlider/src/components/KunThumb.vue.js"), "./components/KunSpacer/src/components/KunSpacer.vue": () => import("./components/KunSpacer/src/components/KunSpacer.vue.js"), "./components/KunSwitch/src/components/KunSwitch.vue": () => import("./components/KunSwitch/src/components/KunSwitch.vue.js"), "./components/KunTable/src/components/KunTable.vue": () => import("./components/KunTable/src/components/KunTable.vue.js"), "./components/KunTable/src/components/KunTableFilter.vue": () => import("./components/KunTable/src/components/KunTableFilter.vue.js"), "./components/KunTable/src/components/KunTableFooter.vue": () => import("./components/KunTable/src/components/KunTableFooter.vue.js"), "./components/KunTable/src/components/KunTableHeaders.vue": () => import("./components/KunTable/src/components/KunTableHeaders.vue.js"), "./components/KunTable/src/components/KunTableIterator.vue": () => import("./components/KunTable/src/components/KunTableIterator.vue.js"), "./components/KunTable/src/components/KunTableIterators.vue": () => import("./components/KunTable/src/components/KunTableIterators.vue.js"), "./components/KunTable/src/components/KunTableRow.vue": () => import("./components/KunTable/src/components/KunTableRow.vue.js"), "./components/KunTable/src/components/KunTableRows.vue": () => import("./components/KunTable/src/components/KunTableRows.vue.js"), "./components/KunTable/src/components/KunTableVirtual.vue": () => import("./components/KunTable/src/components/KunTableVirtual.vue.js"), "./components/KunTabs/src/components/KunTab.vue": () => import("./components/KunTabs/src/components/KunTab.vue.js"), "./components/KunTabs/src/components/KunTabWindow.vue": () => import("./components/KunTabs/src/components/KunTabWindow.vue.js"), "./components/KunTabs/src/components/KunTabs.vue": () => import("./components/KunTabs/src/components/KunTabs.vue.js"), "./components/KunTextField/src/components/KunTextField.vue": () => import("./components/KunTextField/src/components/KunTextField.vue.js"), "./components/KunTextarea/src/components/KunTextarea.vue": () => import("./components/KunTextarea/src/components/KunTextarea.vue.js"), "./components/KunToolbar/src/components/KunToolbar.vue": () => import("./components/KunToolbar/src/components/KunToolbar.vue.js"), "./components/KunToolbar/src/components/KunToolbarItems.vue": () => import("./components/KunToolbar/src/components/KunToolbarItems.vue.js"), "./components/KunToolbar/src/components/KunToolbarTitle.vue": () => import("./components/KunToolbar/src/components/KunToolbarTitle.vue.js"), "./components/KunTooltip/src/components/KunTooltip.vue": () => import("./components/KunTooltip/src/components/KunTooltip.vue.js"), "./components/KunVirtualScroller/src/components/KunVirtualScroller.vue": () => import("./components/KunVirtualScroller/src/components/KunVirtualScroller.vue.js") });
|
|
126
126
|
function t(o) {
|
|
127
127
|
return o.split("/").at(-1).replace(".vue", "");
|
|
@@ -158,41 +158,41 @@ export {
|
|
|
158
158
|
pn as KunCol,
|
|
159
159
|
an as KunContainer,
|
|
160
160
|
ln as KunCurrency,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
161
|
+
dn as KunDialog,
|
|
162
|
+
Tn as KunDivider,
|
|
163
|
+
xn as KunDrawer,
|
|
164
|
+
In as KunFileInput,
|
|
165
|
+
Sn as KunForm,
|
|
166
|
+
Fn as KunIcon,
|
|
167
|
+
Rn as KunInfiniteScroll,
|
|
168
|
+
Dn as KunList,
|
|
169
|
+
Mn as KunListGroup,
|
|
170
|
+
Gn as KunListImg,
|
|
171
|
+
Vn as KunListItem,
|
|
172
|
+
Nn as KunListItemAction,
|
|
173
|
+
jn as KunListItemAvatar,
|
|
174
|
+
Wn as KunListItemSubtitle,
|
|
175
|
+
_n as KunListItemText,
|
|
176
|
+
zn as KunListItemTitle,
|
|
177
|
+
Pn as KunListSubheader,
|
|
178
|
+
Un as KunLoaderCircular,
|
|
179
|
+
Yn as KunMenu,
|
|
180
|
+
$n as KunModalFooter,
|
|
181
|
+
ne as KunNumberField,
|
|
182
|
+
te as KunRadio,
|
|
183
|
+
ue as KunRadioGroup,
|
|
184
|
+
me as KunRelationMatrix,
|
|
185
|
+
ce as KunRow,
|
|
186
|
+
Ke as KunSlider,
|
|
187
|
+
le as KunSpacer,
|
|
188
|
+
de as KunSwitch,
|
|
189
|
+
Te as KunTable,
|
|
190
|
+
xe as KunTabs,
|
|
191
|
+
Ie as KunTextField,
|
|
192
|
+
Se as KunTextarea,
|
|
193
|
+
Fe as KunToolbar,
|
|
194
|
+
Re as KunTooltip,
|
|
195
|
+
De as KunVirtualScroller,
|
|
196
196
|
Fo as components,
|
|
197
197
|
Do as default,
|
|
198
198
|
go as install
|
package/package.json
CHANGED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { defineComponent as x, watch as C, onMounted as f, onBeforeUnmount as S, onUnmounted as k, createBlock as m, openBlock as a, Teleport as P, createVNode as o, Transition as u, withCtx as n, createElementBlock as B, createCommentVNode as h, mergeProps as V, renderSlot as E } from "vue";
|
|
2
|
-
import H from "./KunDialogOverlay.vue2.js";
|
|
3
|
-
import W from "./KunDialogContent.vue.js";
|
|
4
|
-
const $ = "fixed inset-0 z-250 flex", T = /* @__PURE__ */ x({
|
|
5
|
-
__name: "KunDialog",
|
|
6
|
-
props: {
|
|
7
|
-
modelValue: Boolean,
|
|
8
|
-
overlay: { type: Boolean, default: !0 },
|
|
9
|
-
fullscreen: { type: Boolean, default: !1 },
|
|
10
|
-
scrollable: { type: Boolean, default: !1 },
|
|
11
|
-
persistent: { type: Boolean, default: !1 },
|
|
12
|
-
dialogClass: { type: String, default: "" },
|
|
13
|
-
xPosition: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: "center",
|
|
16
|
-
// 'start' | 'center' | 'end'
|
|
17
|
-
validator: (e) => ["start", "center", "end"].includes(e)
|
|
18
|
-
},
|
|
19
|
-
yPosition: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: "center",
|
|
22
|
-
// 'start' | 'center' | 'end'
|
|
23
|
-
validator: (e) => ["top", "center", "bottom"].includes(e)
|
|
24
|
-
},
|
|
25
|
-
contentClass: { type: String, default: "" },
|
|
26
|
-
bgColor: { type: String, default: "bg-slate-100 dark:bg-slate-900" },
|
|
27
|
-
minHeight: { type: String, default: "h-fit" },
|
|
28
|
-
height: { type: String, default: "h-fit" },
|
|
29
|
-
maxHeight: { type: String, default: "max-h-[100vh]" },
|
|
30
|
-
minWidth: { type: String, default: "min-w-1/3" },
|
|
31
|
-
width: { type: String, default: "w-full" },
|
|
32
|
-
maxWidth: { type: String, default: "max-w-full" }
|
|
33
|
-
},
|
|
34
|
-
emits: ["update:modelValue"],
|
|
35
|
-
setup(e, { emit: y }) {
|
|
36
|
-
const t = e, i = y, g = "justify-" + t.xPosition, p = "items-" + t.yPosition, w = t.yPosition === "top" ? "pt-15" : t.yPosition === "bottom" ? "pb-15" : "", b = [$, t.dialogClass, g, p, w], s = () => {
|
|
37
|
-
t.persistent || i("update:modelValue", !1);
|
|
38
|
-
}, v = () => {
|
|
39
|
-
s();
|
|
40
|
-
}, r = () => {
|
|
41
|
-
document.body.style.overflow = "hidden";
|
|
42
|
-
}, d = () => {
|
|
43
|
-
document.body.style.overflow = "";
|
|
44
|
-
};
|
|
45
|
-
C(() => t.modelValue, (l) => {
|
|
46
|
-
l && !t.fullscreen ? r() : d();
|
|
47
|
-
}), f(() => {
|
|
48
|
-
t.modelValue && !t.fullscreen && r();
|
|
49
|
-
}), S(() => {
|
|
50
|
-
d();
|
|
51
|
-
});
|
|
52
|
-
function c(l) {
|
|
53
|
-
l.stopPropagation(), l.key === "Escape" && (t.persistent || i("update:modelValue", !1));
|
|
54
|
-
}
|
|
55
|
-
return f(() => {
|
|
56
|
-
window.addEventListener("keydown", c);
|
|
57
|
-
}), k(() => {
|
|
58
|
-
window.removeEventListener("keydown", c);
|
|
59
|
-
}), (l, D) => (a(), m(P, { to: "body" }, [
|
|
60
|
-
o(u, {
|
|
61
|
-
name: "fade",
|
|
62
|
-
appear: ""
|
|
63
|
-
}, {
|
|
64
|
-
default: n(() => [
|
|
65
|
-
e.modelValue ? (a(), B("div", V({
|
|
66
|
-
key: 0,
|
|
67
|
-
class: b
|
|
68
|
-
}, l.$attrs), [
|
|
69
|
-
e.overlay ? (a(), m(H, {
|
|
70
|
-
key: 0,
|
|
71
|
-
persistent: e.persistent,
|
|
72
|
-
onClick: v
|
|
73
|
-
}, null, 8, ["persistent"])) : h("", !0),
|
|
74
|
-
o(u, {
|
|
75
|
-
name: "scale",
|
|
76
|
-
"enter-active-class": "transition transform ease-out duration-300",
|
|
77
|
-
"enter-from-class": "opacity-0 scale-95",
|
|
78
|
-
"enter-to-class": "opacity-100 scale-100",
|
|
79
|
-
"leave-active-class": "transition transform ease-in duration-200",
|
|
80
|
-
"leave-from-class": "opacity-100 scale-100",
|
|
81
|
-
"leave-to-class": "opacity-0 scale-95"
|
|
82
|
-
}, {
|
|
83
|
-
default: n(() => [
|
|
84
|
-
o(W, {
|
|
85
|
-
fullscreen: e.fullscreen,
|
|
86
|
-
scrollable: e.scrollable,
|
|
87
|
-
"min-width": e.minWidth,
|
|
88
|
-
width: e.width,
|
|
89
|
-
"max-width": e.maxWidth,
|
|
90
|
-
"min-height": e.minHeight,
|
|
91
|
-
height: e.height,
|
|
92
|
-
"max-height": e.maxHeight,
|
|
93
|
-
"bg-color": e.bgColor,
|
|
94
|
-
"content-class": e.contentClass,
|
|
95
|
-
onClose: s
|
|
96
|
-
}, {
|
|
97
|
-
default: n(() => [
|
|
98
|
-
E(l.$slots, "default")
|
|
99
|
-
]),
|
|
100
|
-
_: 3
|
|
101
|
-
}, 8, ["fullscreen", "scrollable", "min-width", "width", "max-width", "min-height", "height", "max-height", "bg-color", "content-class"])
|
|
102
|
-
]),
|
|
103
|
-
_: 3
|
|
104
|
-
})
|
|
105
|
-
], 16)) : h("", !0)
|
|
106
|
-
]),
|
|
107
|
-
_: 3
|
|
108
|
-
})
|
|
109
|
-
]));
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
export {
|
|
113
|
-
T as default
|
|
114
|
-
};
|