adverich-kun-ui 0.1.185 → 0.1.187
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/KunDialog/src/components/KunDialog.vue.js +11 -11
- package/dist/components/KunTable/src/composables/KunTableProps.js +1 -1
- package/dist/components/KunTextarea/src/components/KunTextarea.vue.js +24 -24
- package/dist/components/KunTextarea/src/composables/KunTextareaProps.js +2 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as x, watch as C, onMounted as f, onBeforeUnmount as S, onUnmounted as k, createBlock as u, openBlock as
|
|
1
|
+
import { defineComponent as x, watch as C, onMounted as f, onBeforeUnmount as S, onUnmounted as k, createBlock as u, openBlock as l, Teleport as P, createVNode as a, Transition as m, withCtx as n, createElementBlock as B, createCommentVNode as y, mergeProps as V, renderSlot as E } from "vue";
|
|
2
2
|
import $ from "./KunDialogOverlay.vue.js";
|
|
3
3
|
import D from "./KunDialogContent.vue.js";
|
|
4
4
|
const H = "fixed inset-0 z-250 flex", U = /* @__PURE__ */ x({
|
|
@@ -40,31 +40,31 @@ const H = "fixed inset-0 z-250 flex", U = /* @__PURE__ */ x({
|
|
|
40
40
|
}, c = () => {
|
|
41
41
|
document.body.style.overflow = "";
|
|
42
42
|
};
|
|
43
|
-
C(() => t.modelValue, (
|
|
44
|
-
|
|
43
|
+
C(() => t.modelValue, (o) => {
|
|
44
|
+
o && !t.fullscreen ? r() : c();
|
|
45
45
|
}), f(() => {
|
|
46
46
|
t.modelValue && !t.fullscreen && r();
|
|
47
47
|
}), S(() => {
|
|
48
48
|
c();
|
|
49
49
|
});
|
|
50
|
-
function d(
|
|
51
|
-
|
|
50
|
+
function d(o) {
|
|
51
|
+
o.stopPropagation(), o.key === "Escape" && (t.persistent || s("update:modelValue", !1));
|
|
52
52
|
}
|
|
53
53
|
return f(() => {
|
|
54
|
-
|
|
54
|
+
window.addEventListener("keydown", d);
|
|
55
55
|
}), k(() => {
|
|
56
56
|
window.removeEventListener("keydown", d);
|
|
57
|
-
}), (
|
|
57
|
+
}), (o, K) => (l(), u(P, { to: "body" }, [
|
|
58
58
|
a(m, {
|
|
59
59
|
name: "fade",
|
|
60
60
|
appear: ""
|
|
61
61
|
}, {
|
|
62
62
|
default: n(() => [
|
|
63
|
-
e.modelValue ? (
|
|
63
|
+
e.modelValue ? (l(), B("div", V({
|
|
64
64
|
key: 0,
|
|
65
65
|
class: b
|
|
66
|
-
},
|
|
67
|
-
e.overlay ? (
|
|
66
|
+
}, o.$attrs), [
|
|
67
|
+
e.overlay ? (l(), u($, {
|
|
68
68
|
key: 0,
|
|
69
69
|
persistent: e.persistent,
|
|
70
70
|
onClick: v
|
|
@@ -91,7 +91,7 @@ const H = "fixed inset-0 z-250 flex", U = /* @__PURE__ */ x({
|
|
|
91
91
|
onClose: i
|
|
92
92
|
}, {
|
|
93
93
|
default: n(() => [
|
|
94
|
-
E(
|
|
94
|
+
E(o.$slots, "default")
|
|
95
95
|
]),
|
|
96
96
|
_: 3
|
|
97
97
|
}, 8, ["fullscreen", "scrollable", "width", "max-width", "height", "max-height", "bg-color", "content-class"])
|
|
@@ -25,7 +25,7 @@ const t = () => ({
|
|
|
25
25
|
// 'start' | 'center' | 'end'
|
|
26
26
|
validator: (e) => ["start", "center", "end"].includes(e)
|
|
27
27
|
},
|
|
28
|
-
searchPlaceholder: { type: String, default: "
|
|
28
|
+
searchPlaceholder: { type: String, default: "Buscar..." },
|
|
29
29
|
debounceTime: { type: Number, default: 300 },
|
|
30
30
|
showSelect: { type: Boolean, default: !1 },
|
|
31
31
|
showExpand: { type: Boolean, default: !1 },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as L, computed as p, createElementBlock as l, openBlock as s, normalizeClass as
|
|
1
|
+
import { ref as L, computed as p, createElementBlock as l, openBlock as s, normalizeClass as m, renderSlot as i, createElementVNode as a, normalizeProps as y, guardReactiveProps as k, unref as n, createCommentVNode as d, toDisplayString as b, createBlock as h, resolveDynamicComponent as C, Fragment as q, renderList as J, withDirectives as O, vShow as Q, createTextVNode as U } from "vue";
|
|
2
2
|
import { kunTextareaProps as W } from "../composables/KunTextareaProps.js";
|
|
3
3
|
import { useKunTextarea as X } from "../composables/useKunTextareaComposable.js";
|
|
4
4
|
import { renderIconSlot as $ } from "../../../../utils/renderIcon.js";
|
|
@@ -37,7 +37,7 @@ const Y = {
|
|
|
37
37
|
validate: M,
|
|
38
38
|
reset: T,
|
|
39
39
|
resetValidation: A,
|
|
40
|
-
hasError:
|
|
40
|
+
hasError: f,
|
|
41
41
|
displayedMessages: w
|
|
42
42
|
} = X(r, V, u), E = p(() => {
|
|
43
43
|
const e = !!r.bgColor;
|
|
@@ -77,12 +77,12 @@ const Y = {
|
|
|
77
77
|
[`rounded-${r.rounded}`]: typeof r.rounded == "string" || typeof r.rounded == "number",
|
|
78
78
|
"shadow-md": r.variant === "solo" && !r.flat,
|
|
79
79
|
"shadow-none": r.flat,
|
|
80
|
-
[`text-${r.
|
|
81
|
-
[
|
|
80
|
+
[`text-${r.textColor}`]: r.textColor,
|
|
81
|
+
[`${r.bgColor}`]: r.bgColor,
|
|
82
82
|
"text-gray-500 bg-gray-200": r.disabled,
|
|
83
83
|
"focus:outline-none focus:ring-2": !r.disabled,
|
|
84
|
-
[`focus:ring-${r.color}`]: r.color && !r.disabled && !
|
|
85
|
-
"border-red-500 ring-red-500 focus:ring-red-500":
|
|
84
|
+
[`focus:ring-${r.color}`]: r.color && !r.disabled && !f.value,
|
|
85
|
+
"border-red-500 ring-red-500 focus:ring-red-500": f.value,
|
|
86
86
|
"resize-none": r.noResize || r.autoGrow,
|
|
87
87
|
resize: !r.noResize && !r.autoGrow
|
|
88
88
|
}
|
|
@@ -91,7 +91,7 @@ const Y = {
|
|
|
91
91
|
r.class,
|
|
92
92
|
r.wrapperClass
|
|
93
93
|
]), I = p(() => r.counter === !0 ? 25 : typeof r.counter == "number" || typeof r.counter == "string" ? r.counter : null), H = p(() => r.persistentCounter ? !0 : !!r.counter && v.value), K = p(() => typeof r.clearIcon == "string" ? r.clearIcon : "i-heroicons-x-mark-20-solid");
|
|
94
|
-
function
|
|
94
|
+
function g(e, t) {
|
|
95
95
|
V(`click:${t}`, e);
|
|
96
96
|
}
|
|
97
97
|
return R({
|
|
@@ -99,9 +99,9 @@ const Y = {
|
|
|
99
99
|
reset: T,
|
|
100
100
|
resetValidation: A,
|
|
101
101
|
errorMessages: w,
|
|
102
|
-
isValid: p(() => !
|
|
102
|
+
isValid: p(() => !f.value)
|
|
103
103
|
}), (e, t) => (s(), l("div", {
|
|
104
|
-
class:
|
|
104
|
+
class: m(P.value)
|
|
105
105
|
}, [
|
|
106
106
|
i(e.$slots, "label", y(k({ label: e.label, isFocused: n(v), isActive: !!n(c), controlRef: u.value, focus: () => {
|
|
107
107
|
var o;
|
|
@@ -110,13 +110,13 @@ const Y = {
|
|
|
110
110
|
var o;
|
|
111
111
|
return (o = u.value) == null ? void 0 : o.blur();
|
|
112
112
|
}, props: r })), () => [
|
|
113
|
-
e.label ? (s(), l("label", Y,
|
|
113
|
+
e.label ? (s(), l("label", Y, b(e.label), 1)) : d("", !0)
|
|
114
114
|
]),
|
|
115
115
|
a("div", Z, [
|
|
116
116
|
e.prependIcon || e.$slots.prepend ? (s(), l("div", x, [
|
|
117
117
|
i(e.$slots, "prepend", y(k(e.prependSlotBindings)), () => [
|
|
118
118
|
a("div", {
|
|
119
|
-
onClick: t[0] || (t[0] = (o) =>
|
|
119
|
+
onClick: t[0] || (t[0] = (o) => g(o, "prepend"))
|
|
120
120
|
}, [
|
|
121
121
|
(s(), h(C(n($)(e.prependIcon))))
|
|
122
122
|
])
|
|
@@ -125,7 +125,7 @@ const Y = {
|
|
|
125
125
|
e.prependInnerIcon || e.$slots["prepend-inner"] ? (s(), l("div", _, [
|
|
126
126
|
i(e.$slots, "prepend-inner", {}, () => [
|
|
127
127
|
a("div", {
|
|
128
|
-
onClick: t[1] || (t[1] = (o) =>
|
|
128
|
+
onClick: t[1] || (t[1] = (o) => g(o, "prependInner"))
|
|
129
129
|
}, [
|
|
130
130
|
(s(), h(C(n($)(e.prependInnerIcon))))
|
|
131
131
|
])
|
|
@@ -150,11 +150,11 @@ const Y = {
|
|
|
150
150
|
}),
|
|
151
151
|
onClick: t[5] || (t[5] = (o) => e.$emit("click:control", o)),
|
|
152
152
|
onMousedown: t[6] || (t[6] = (o) => e.$emit("mousedown:control", o)),
|
|
153
|
-
class:
|
|
153
|
+
class: m([E.value, G.value, N.value])
|
|
154
154
|
}, null, 42, ee),
|
|
155
155
|
e.clearable && n(c) ? (s(), l("div", {
|
|
156
156
|
key: 2,
|
|
157
|
-
class:
|
|
157
|
+
class: m(["absolute right-2 top-2", { "opacity-100": e.persistentClear, "hover:opacity-100 opacity-0 transition-opacity duration-200": !e.persistentClear }])
|
|
158
158
|
}, [
|
|
159
159
|
i(e.$slots, "clear", y(k({ isActive: !!n(c), isFocused: n(v), controlRef: u.value, focus: () => {
|
|
160
160
|
var o;
|
|
@@ -169,7 +169,7 @@ const Y = {
|
|
|
169
169
|
class: "text-gray-500 hover:text-gray-700"
|
|
170
170
|
}, [
|
|
171
171
|
a("span", {
|
|
172
|
-
class:
|
|
172
|
+
class: m(K.value)
|
|
173
173
|
}, null, 2)
|
|
174
174
|
])
|
|
175
175
|
])
|
|
@@ -177,7 +177,7 @@ const Y = {
|
|
|
177
177
|
e.appendInnerIcon || e.$slots["append-inner"] ? (s(), l("div", re, [
|
|
178
178
|
i(e.$slots, "append-inner", {}, () => [
|
|
179
179
|
a("div", {
|
|
180
|
-
onClick: t[8] || (t[8] = (o) =>
|
|
180
|
+
onClick: t[8] || (t[8] = (o) => g(o, "appendInner"))
|
|
181
181
|
}, [
|
|
182
182
|
(s(), h(C(n($)(e.appendInnerIcon))))
|
|
183
183
|
])
|
|
@@ -186,7 +186,7 @@ const Y = {
|
|
|
186
186
|
e.appendIcon || e.$slots.append ? (s(), l("div", oe, [
|
|
187
187
|
i(e.$slots, "append", y(k(e.appendSlotBindings)), () => [
|
|
188
188
|
a("div", {
|
|
189
|
-
onClick: t[9] || (t[9] = (o) =>
|
|
189
|
+
onClick: t[9] || (t[9] = (o) => g(o, "append"))
|
|
190
190
|
}, [
|
|
191
191
|
(s(), h(C(n($)(e.appendIcon))))
|
|
192
192
|
])
|
|
@@ -199,7 +199,7 @@ const Y = {
|
|
|
199
199
|
}, () => [
|
|
200
200
|
a("div", te, [
|
|
201
201
|
a("div", {
|
|
202
|
-
class:
|
|
202
|
+
class: m(["h-full transition-all duration-300", [`${e.loadingColor}`]]),
|
|
203
203
|
style: { width: "100%" }
|
|
204
204
|
}, null, 2)
|
|
205
205
|
])
|
|
@@ -207,19 +207,19 @@ const Y = {
|
|
|
207
207
|
])) : d("", !0),
|
|
208
208
|
!e.hideDetails || e.hideDetails === "auto" && (n(w).length || e.hint) ? (s(), l("div", {
|
|
209
209
|
key: 6,
|
|
210
|
-
class:
|
|
210
|
+
class: m(["text-xs mt-1 space-y-1", { "text-red-500": n(f), "text-gray-500": !n(f) }])
|
|
211
211
|
}, [
|
|
212
212
|
i(e.$slots, "details", {}, () => [
|
|
213
|
-
n(
|
|
213
|
+
n(f) ? (s(!0), l(q, { key: 0 }, J(n(w), (o, j) => i(e.$slots, "message", {
|
|
214
214
|
key: j,
|
|
215
215
|
message: o
|
|
216
216
|
}, () => [
|
|
217
|
-
a("div", null,
|
|
217
|
+
a("div", null, b(o), 1)
|
|
218
218
|
])), 128)) : e.hint ? i(e.$slots, "hint", {
|
|
219
219
|
key: 1,
|
|
220
220
|
hint: e.hint
|
|
221
221
|
}, () => [
|
|
222
|
-
O(a("div", null,
|
|
222
|
+
O(a("div", null, b(e.hint), 513), [
|
|
223
223
|
[Q, e.persistentHint || n(v)]
|
|
224
224
|
])
|
|
225
225
|
]) : d("", !0)
|
|
@@ -231,8 +231,8 @@ const Y = {
|
|
|
231
231
|
max: I.value,
|
|
232
232
|
value: n(c).length
|
|
233
233
|
}, () => [
|
|
234
|
-
U(
|
|
235
|
-
I.value ? (s(), l("span", le, " / " +
|
|
234
|
+
U(b(n(c).length), 1),
|
|
235
|
+
I.value ? (s(), l("span", le, " / " + b(I.value), 1)) : d("", !0)
|
|
236
236
|
])
|
|
237
237
|
])) : d("", !0)
|
|
238
238
|
])
|
|
@@ -16,6 +16,7 @@ const e = {
|
|
|
16
16
|
type: [String, Function, Object],
|
|
17
17
|
default: "i-mdi-close"
|
|
18
18
|
},
|
|
19
|
+
persistentClear: Boolean,
|
|
19
20
|
disabled: Boolean,
|
|
20
21
|
readonly: Boolean,
|
|
21
22
|
variant: { type: String, default: "filled" },
|
|
@@ -26,7 +27,7 @@ const e = {
|
|
|
26
27
|
flat: Boolean,
|
|
27
28
|
color: String,
|
|
28
29
|
bgColor: String,
|
|
29
|
-
|
|
30
|
+
textColor: String,
|
|
30
31
|
iconColor: [String, Boolean],
|
|
31
32
|
glow: Boolean,
|
|
32
33
|
class: [String, Array, Object],
|