adverich-kun-ui 0.1.428 → 0.1.431
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adverich-kun-ui.css +1 -1
- package/dist/components/KunAppbar/src/components/KunAppbar.vue.js +24 -24
- package/dist/components/KunAutocomplete/src/composables/KunAutocompleteProps.js +3 -3
- package/dist/components/KunBtn/src/components/KunBtn.vue.js +7 -10
- package/dist/components/KunCard/src/components/KunCard.vue.js +7 -7
- package/dist/components/KunChip/src/composables/kunChipProps.js +1 -4
- package/dist/components/KunDialog/src/components/KunDialog.vue.js +16 -16
- package/dist/components/KunDrawer/src/components/KunDrawer.vue.js +7 -7
- package/dist/components/KunFileInput/src/components/KunFileInput.vue.js +9 -9
- package/dist/components/KunListImg/src/components/KunListImg.vue.js +7 -7
- package/dist/components/KunListItem/src/components/KunListItem.vue.js +42 -42
- package/dist/components/KunListItemAvatar/src/components/KunListItemAvatar.vue.js +9 -9
- package/dist/components/KunMenu/src/composables/kunMenuProps.js +1 -1
- package/dist/components/KunNumberField/src/composables/KunNumberFieldProps.js +1 -1
- package/dist/components/KunRelationMatrix/src/components/KunRelationMatrix.vue.js +7 -7
- package/dist/components/KunSlider/src/components/KunSlider.vue.js +2 -2
- package/dist/components/KunSwitch/src/components/KunSwitch.vue.js +8 -8
- package/dist/components/KunTable/src/components/KunTable.vue.js +12 -12
- package/dist/components/KunTable/src/components/KunTableFooter.vue.js +18 -18
- package/dist/components/KunTable/src/components/KunTableHeaders.vue.js +24 -24
- package/dist/components/KunTable/src/components/KunTableIterator.vue.js +10 -10
- package/dist/components/KunTable/src/components/KunTableRow.vue.js +8 -8
- package/dist/components/KunTextField/src/composables/KunTextFieldProps.js +1 -1
- package/dist/components/KunTextarea/src/components/KunTextarea.vue.js +13 -13
- package/package.json +1 -1
|
@@ -40,10 +40,10 @@ const j = {
|
|
|
40
40
|
},
|
|
41
41
|
emits: ["update:model-value"],
|
|
42
42
|
setup(t, { emit: m }) {
|
|
43
|
-
const p = m, e = t, u = k(),
|
|
44
|
-
() => e.fullHeight ? "0px" : `${
|
|
43
|
+
const p = m, e = t, u = k(), s = T(), g = l(
|
|
44
|
+
() => e.fullHeight ? "0px" : `${s.value}px`
|
|
45
45
|
), h = l(
|
|
46
|
-
() => e.fullHeight ? "100vh" : `calc(100vh - ${
|
|
46
|
+
() => e.fullHeight ? "100vh" : `calc(100vh - ${s.value}px)`
|
|
47
47
|
), b = l(() => e.rail ? e.railWidth : e.width), v = l(() => {
|
|
48
48
|
switch (e.location) {
|
|
49
49
|
case "start":
|
|
@@ -66,14 +66,14 @@ const j = {
|
|
|
66
66
|
y.value,
|
|
67
67
|
e.elevation ? `shadow-${e.elevation}` : "",
|
|
68
68
|
B.value,
|
|
69
|
-
e.color ?? "bg-
|
|
69
|
+
e.color ?? "bg-surface-dark",
|
|
70
70
|
e.scrollable ? "overflow-auto" : ""
|
|
71
71
|
];
|
|
72
72
|
return u.class && n.push(u.class), n;
|
|
73
73
|
}), C = () => {
|
|
74
74
|
e.persistent || p("update:model-value", !1);
|
|
75
75
|
};
|
|
76
|
-
return (n,
|
|
76
|
+
return (n, i) => (o(), d(V, null, [
|
|
77
77
|
c(f, { name: "kun-drawer" }, {
|
|
78
78
|
default: r(() => [
|
|
79
79
|
$((o(), H(N(t.tag), {
|
|
@@ -88,7 +88,7 @@ const j = {
|
|
|
88
88
|
}
|
|
89
89
|
]]),
|
|
90
90
|
style: D({ top: g.value, height: h.value }),
|
|
91
|
-
onClick:
|
|
91
|
+
onClick: i[0] || (i[0] = z(() => {
|
|
92
92
|
}, ["stop"]))
|
|
93
93
|
}, {
|
|
94
94
|
default: r(() => [
|
|
@@ -115,7 +115,7 @@ const j = {
|
|
|
115
115
|
})
|
|
116
116
|
], 64));
|
|
117
117
|
}
|
|
118
|
-
}, q = /* @__PURE__ */ W(j, [["__scopeId", "data-v-
|
|
118
|
+
}, q = /* @__PURE__ */ W(j, [["__scopeId", "data-v-6cd71f79"]]);
|
|
119
119
|
export {
|
|
120
120
|
q as default
|
|
121
121
|
};
|
|
@@ -54,7 +54,7 @@ const H = { class: "relative w-full" }, L = {
|
|
|
54
54
|
"update:focused"
|
|
55
55
|
],
|
|
56
56
|
setup(e, { expose: w, emit: A }) {
|
|
57
|
-
const c = e, f = A, B = m(null),
|
|
57
|
+
const c = e, f = A, B = m(null), y = m(!1), d = m([]), r = m([]);
|
|
58
58
|
R(
|
|
59
59
|
() => c.modelValue,
|
|
60
60
|
(t) => {
|
|
@@ -72,17 +72,17 @@ const H = { class: "relative w-full" }, L = {
|
|
|
72
72
|
d.value = [], f("update:modelValue", c.multiple ? [] : null), f("click:clear"), r.value = [];
|
|
73
73
|
}
|
|
74
74
|
function z() {
|
|
75
|
-
|
|
75
|
+
y.value = !0, f("update:focused", !0);
|
|
76
76
|
}
|
|
77
77
|
function N() {
|
|
78
|
-
|
|
78
|
+
y.value = !1, f("update:focused", !1);
|
|
79
79
|
}
|
|
80
80
|
const h = v(() => d.value.map((t) => t.name)), V = v(() => d.value.reduce((t, l) => t + l.size, 0)), I = v(() => {
|
|
81
81
|
const t = V.value, l = c.showSize === 1024 ? 1024 : 1e3, o = ["B", "KB", "MB", "GB"];
|
|
82
|
-
let s = 0,
|
|
83
|
-
for (;
|
|
84
|
-
|
|
85
|
-
return `${
|
|
82
|
+
let s = 0, g = t;
|
|
83
|
+
for (; g >= l && s < o.length - 1; )
|
|
84
|
+
g /= l, s++;
|
|
85
|
+
return `${g.toFixed(1)} ${o[s]}`;
|
|
86
86
|
});
|
|
87
87
|
async function F(t = !1) {
|
|
88
88
|
const l = [];
|
|
@@ -108,10 +108,10 @@ const H = { class: "relative w-full" }, L = {
|
|
|
108
108
|
e.label ? (a(), n("label", L, i(e.label), 1)) : u("", !0),
|
|
109
109
|
b("div", E({
|
|
110
110
|
class: ["flex items-center gap-2 rounded px-3 py-2 cursor-pointer transition", [
|
|
111
|
-
e.variant === "outlined" ? "border border-slate-400 dark:border-slate-600" : e.variant === "solo" ? "border-slate-400 dark:border-slate-600 shadow-inner" : "bg-
|
|
111
|
+
e.variant === "outlined" ? "border border-slate-400 dark:border-slate-600" : e.variant === "solo" ? "border-slate-400 dark:border-slate-600 shadow-inner" : "bg-surface border border-slate-400 dark:border-slate-600",
|
|
112
112
|
e.disabled ? "border-slate-400 dark:border-slate-600 cursor-not-allowed" : "hover:border-blue-500",
|
|
113
113
|
e.error || r.value.length ? "border-red-500" : "",
|
|
114
|
-
|
|
114
|
+
y.value ? "ring-2 ring-blue-500" : ""
|
|
115
115
|
]]
|
|
116
116
|
}, t.$attrs, {
|
|
117
117
|
onClick: l[0] || (l[0] = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createElementBlock as l, openBlock as o, mergeProps as s, createElementVNode as
|
|
2
|
-
const
|
|
1
|
+
import { createElementBlock as l, openBlock as o, mergeProps as s, createElementVNode as c } from "vue";
|
|
2
|
+
const n = ["src", "alt"], i = {
|
|
3
3
|
__name: "KunListImg",
|
|
4
4
|
props: {
|
|
5
5
|
src: {
|
|
@@ -12,26 +12,26 @@ const c = ["src", "alt"], d = {
|
|
|
12
12
|
},
|
|
13
13
|
bgColor: {
|
|
14
14
|
type: String,
|
|
15
|
-
default: "bg-
|
|
15
|
+
default: "bg-surface"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
setup(e) {
|
|
19
19
|
const t = e;
|
|
20
|
-
return (r,
|
|
20
|
+
return (r, a) => (o(), l("div", s({
|
|
21
21
|
class: [
|
|
22
22
|
"kun-list-img",
|
|
23
23
|
"overflow-hidden rounded-md",
|
|
24
24
|
e.bgColor
|
|
25
25
|
]
|
|
26
26
|
}, r.$attrs), [
|
|
27
|
-
|
|
27
|
+
c("img", {
|
|
28
28
|
src: t.src,
|
|
29
29
|
alt: t.alt,
|
|
30
30
|
class: "w-full h-full object-cover"
|
|
31
|
-
}, null, 8,
|
|
31
|
+
}, null, 8, n)
|
|
32
32
|
], 16));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
i as default
|
|
37
37
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useAttrs as H, computed as r, ref as J, inject as L, getCurrentInstance as Q, onMounted as T, onBeforeUnmount as W, createBlock as
|
|
1
|
+
import { useAttrs as H, computed as r, ref as J, inject as L, getCurrentInstance as Q, onMounted as T, onBeforeUnmount as W, createBlock as o, openBlock as l, unref as X, withCtx as B, resolveDynamicComponent as v, mergeProps as C, withKeys as P, withModifiers as M, createElementVNode as I, createElementBlock as a, createCommentVNode as s, renderSlot as u, normalizeClass as i, toDisplayString as S } from "vue";
|
|
2
2
|
import D 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"], le = { class: "flex w-full items-center" }, ae = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "shrink-0 flex items-center gap-2 me-2"
|
|
13
13
|
}, se = ["src"], re = {
|
|
@@ -24,7 +24,7 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
24
24
|
tag: { type: String, default: "li" },
|
|
25
25
|
disabled: Boolean,
|
|
26
26
|
active: Boolean,
|
|
27
|
-
activeClass: { type: String, default: "bg-
|
|
27
|
+
activeClass: { type: String, default: "bg-surface-light" },
|
|
28
28
|
selectable: { type: Boolean, default: !1 },
|
|
29
29
|
variant: { type: String, default: "text" },
|
|
30
30
|
density: { type: String, default: "default" },
|
|
@@ -33,7 +33,7 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
33
33
|
ripple: { type: [Boolean, Object], default: !0 },
|
|
34
34
|
bgItems: { type: String, default: "bg-transparent" },
|
|
35
35
|
textColor: { type: String, default: "text-black dark:text-white" },
|
|
36
|
-
hoverBg: { type: String, default: "hover:bg-
|
|
36
|
+
hoverBg: { type: String, default: "hover:bg-surface-light" },
|
|
37
37
|
noGutters: Boolean,
|
|
38
38
|
itemPosition: { type: String, default: "items-start" },
|
|
39
39
|
prependIcon: [String, Object, Function],
|
|
@@ -54,7 +54,7 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
54
54
|
const x = H(), j = r(() => x.class), E = r(() => {
|
|
55
55
|
const { class: n, ...m } = x;
|
|
56
56
|
return m;
|
|
57
|
-
}), t = e, V = G, f = J(null), g = L("registerListItemRef", null),
|
|
57
|
+
}), t = e, V = G, f = J(null), g = L("registerListItemRef", null), c = L("kunListContext", null), K = 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
|
});
|
|
@@ -65,7 +65,7 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
65
65
|
});
|
|
66
66
|
const b = (n) => typeof n == "object" || typeof n == "function", N = r(() => !!(t.prependIcon || t.prependAvatar)), O = r(() => !!(t.appendIcon || t.appendAvatar)), w = r(() => {
|
|
67
67
|
var n;
|
|
68
|
-
return ((n =
|
|
68
|
+
return ((n = c == null ? void 0 : c.isSelected) == null ? void 0 : n.call(c, t.value)) ?? !1;
|
|
69
69
|
}), A = r(() => t.active), $ = r(() => !!t.to);
|
|
70
70
|
function k(n, m = null) {
|
|
71
71
|
var p, h;
|
|
@@ -76,7 +76,7 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
const d = ((p = f.value) == null ? void 0 : p.$el) ?? f.value;
|
|
79
|
-
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);
|
|
80
80
|
}
|
|
81
81
|
const z = r(() => {
|
|
82
82
|
switch (t.variant) {
|
|
@@ -85,7 +85,7 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
85
85
|
case "elevated":
|
|
86
86
|
return "shadow-md";
|
|
87
87
|
case "tonal":
|
|
88
|
-
return "bg-
|
|
88
|
+
return "bg-surface";
|
|
89
89
|
case "flat":
|
|
90
90
|
return "bg-transparent";
|
|
91
91
|
case "plain":
|
|
@@ -119,14 +119,14 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
119
119
|
},
|
|
120
120
|
t.containerClass
|
|
121
121
|
]);
|
|
122
|
-
return (n, m) => $.value ? (
|
|
122
|
+
return (n, m) => $.value ? (l(), o(X(Y), {
|
|
123
123
|
key: 0,
|
|
124
124
|
to: e.to,
|
|
125
125
|
replace: e.replace,
|
|
126
126
|
custom: !0
|
|
127
127
|
}, {
|
|
128
128
|
default: B(({ href: d, navigate: p, isActive: h }) => [
|
|
129
|
-
(
|
|
129
|
+
(l(), o(v($.value ? "a" : e.tag), C({
|
|
130
130
|
id: K.value,
|
|
131
131
|
ref_key: "liRef",
|
|
132
132
|
ref: f,
|
|
@@ -141,16 +141,16 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
141
141
|
}, n.$attrs), {
|
|
142
142
|
default: B(() => [
|
|
143
143
|
I("div", Z, [
|
|
144
|
-
N.value || n.$slots.prepend ? (
|
|
145
|
-
|
|
146
|
-
e.prependAvatar ? (
|
|
144
|
+
N.value || n.$slots.prepend ? (l(), a("div", _, [
|
|
145
|
+
u(n.$slots, "prepend", {}, () => [
|
|
146
|
+
e.prependAvatar ? (l(), a("img", {
|
|
147
147
|
key: 0,
|
|
148
148
|
src: e.prependAvatar,
|
|
149
149
|
class: i(["rounded-full", e.prependClass])
|
|
150
|
-
}, null, 10, ee)) : b(e.prependIcon) ? (
|
|
150
|
+
}, null, 10, ee)) : b(e.prependIcon) ? (l(), o(v(e.prependIcon), {
|
|
151
151
|
key: 1,
|
|
152
152
|
class: i(e.prependClass)
|
|
153
|
-
}, null, 8, ["class"])) : typeof e.prependIcon == "string" ? (
|
|
153
|
+
}, null, 8, ["class"])) : typeof e.prependIcon == "string" ? (l(), o(D, {
|
|
154
154
|
key: 2,
|
|
155
155
|
icon: e.prependIcon,
|
|
156
156
|
class: i(e.prependClass)
|
|
@@ -160,32 +160,32 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
160
160
|
I("div", C({
|
|
161
161
|
class: ["flex flex-col min-w-0 flex-1", j.value]
|
|
162
162
|
}, E.value), [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
e.title ? (
|
|
163
|
+
u(n.$slots, "default", {}, () => [
|
|
164
|
+
u(n.$slots, "title", {}, () => [
|
|
165
|
+
e.title ? (l(), a("div", {
|
|
166
166
|
key: 0,
|
|
167
167
|
class: i(["truncate", e.titleClass])
|
|
168
168
|
}, S(e.title), 3)) : s("", !0)
|
|
169
169
|
]),
|
|
170
|
-
|
|
171
|
-
e.subtitle ? (
|
|
170
|
+
u(n.$slots, "subtitle", {}, () => [
|
|
171
|
+
e.subtitle ? (l(), a("div", {
|
|
172
172
|
key: 0,
|
|
173
173
|
class: i(["truncate", e.subtitleClass])
|
|
174
174
|
}, S(e.subtitle), 3)) : s("", !0)
|
|
175
175
|
])
|
|
176
176
|
])
|
|
177
177
|
], 16),
|
|
178
|
-
O.value ? (
|
|
179
|
-
|
|
180
|
-
e.appendAvatar ? (
|
|
178
|
+
O.value ? (l(), a("div", te, [
|
|
179
|
+
u(n.$slots, "append", {}, () => [
|
|
180
|
+
e.appendAvatar ? (l(), a("img", {
|
|
181
181
|
key: 0,
|
|
182
182
|
src: e.appendAvatar,
|
|
183
183
|
class: "w-8 h-8 rounded-full"
|
|
184
184
|
}, null, 8, ne)) : s("", !0),
|
|
185
|
-
b(e.appendIcon) ? (
|
|
185
|
+
b(e.appendIcon) ? (l(), o(v(e.appendIcon), {
|
|
186
186
|
key: 1,
|
|
187
187
|
class: "w-5 h-5"
|
|
188
|
-
})) : e.appendIcon ? (
|
|
188
|
+
})) : e.appendIcon ? (l(), a("i", {
|
|
189
189
|
key: 2,
|
|
190
190
|
class: i([e.appendClass, "text-xl leading-none"])
|
|
191
191
|
}, null, 2)) : s("", !0)
|
|
@@ -197,7 +197,7 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
197
197
|
}, 1040, ["id", "href", "aria-selected", "aria-disabled", "class", "onClick", "onKeydown"]))
|
|
198
198
|
]),
|
|
199
199
|
_: 3
|
|
200
|
-
}, 8, ["to", "replace"])) : (
|
|
200
|
+
}, 8, ["to", "replace"])) : (l(), o(v($.value ? "a" : e.tag), C({
|
|
201
201
|
key: 1,
|
|
202
202
|
id: K.value,
|
|
203
203
|
ref_key: "liRef",
|
|
@@ -211,17 +211,17 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
211
211
|
onKeydown: P(M(k, ["prevent"]), ["enter"])
|
|
212
212
|
}, n.$attrs), {
|
|
213
213
|
default: B(() => [
|
|
214
|
-
I("div",
|
|
215
|
-
N.value || n.$slots.prepend ? (
|
|
216
|
-
|
|
217
|
-
e.prependAvatar ? (
|
|
214
|
+
I("div", le, [
|
|
215
|
+
N.value || n.$slots.prepend ? (l(), a("div", ae, [
|
|
216
|
+
u(n.$slots, "prepend", {}, () => [
|
|
217
|
+
e.prependAvatar ? (l(), a("img", {
|
|
218
218
|
key: 0,
|
|
219
219
|
src: e.prependAvatar,
|
|
220
220
|
class: i(["rounded-full", e.prependClass])
|
|
221
|
-
}, null, 10, se)) : b(e.prependIcon) ? (
|
|
221
|
+
}, null, 10, se)) : b(e.prependIcon) ? (l(), o(v(e.prependIcon), {
|
|
222
222
|
key: 1,
|
|
223
223
|
class: i(e.prependClass)
|
|
224
|
-
}, null, 8, ["class"])) : typeof e.prependIcon == "string" ? (
|
|
224
|
+
}, null, 8, ["class"])) : typeof e.prependIcon == "string" ? (l(), o(D, {
|
|
225
225
|
key: 2,
|
|
226
226
|
icon: e.prependIcon,
|
|
227
227
|
class: i(e.prependClass)
|
|
@@ -231,32 +231,32 @@ const Z = { class: "flex w-full items-center" }, _ = {
|
|
|
231
231
|
I("div", C({
|
|
232
232
|
class: ["flex flex-col min-w-0 flex-1", j.value]
|
|
233
233
|
}, E.value), [
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
e.title ? (
|
|
234
|
+
u(n.$slots, "default", {}, () => [
|
|
235
|
+
u(n.$slots, "title", {}, () => [
|
|
236
|
+
e.title ? (l(), a("div", {
|
|
237
237
|
key: 0,
|
|
238
238
|
class: i(["truncate", e.titleClass])
|
|
239
239
|
}, S(e.title), 3)) : s("", !0)
|
|
240
240
|
]),
|
|
241
|
-
|
|
242
|
-
e.subtitle ? (
|
|
241
|
+
u(n.$slots, "subtitle", {}, () => [
|
|
242
|
+
e.subtitle ? (l(), a("div", {
|
|
243
243
|
key: 0,
|
|
244
244
|
class: i(["truncate", e.subtitleClass])
|
|
245
245
|
}, S(e.subtitle), 3)) : s("", !0)
|
|
246
246
|
])
|
|
247
247
|
])
|
|
248
248
|
], 16),
|
|
249
|
-
O.value ? (
|
|
250
|
-
|
|
251
|
-
e.appendAvatar ? (
|
|
249
|
+
O.value ? (l(), a("div", re, [
|
|
250
|
+
u(n.$slots, "append", {}, () => [
|
|
251
|
+
e.appendAvatar ? (l(), a("img", {
|
|
252
252
|
key: 0,
|
|
253
253
|
src: e.appendAvatar,
|
|
254
254
|
class: "w-8 h-8 rounded-full"
|
|
255
255
|
}, null, 8, ie)) : s("", !0),
|
|
256
|
-
b(e.appendIcon) ? (
|
|
256
|
+
b(e.appendIcon) ? (l(), o(v(e.appendIcon), {
|
|
257
257
|
key: 1,
|
|
258
258
|
class: "w-5 h-5"
|
|
259
|
-
})) : e.appendIcon ? (
|
|
259
|
+
})) : e.appendIcon ? (l(), a("i", {
|
|
260
260
|
key: 2,
|
|
261
261
|
class: i([e.appendIcon, "text-xl leading-none"])
|
|
262
262
|
}, null, 2)) : s("", !0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createElementBlock as r, openBlock as
|
|
1
|
+
import { createElementBlock as r, openBlock as o, mergeProps as a, unref as s, renderSlot as l, createCommentVNode as i, toDisplayString as u } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import d from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const m = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "truncate"
|
|
@@ -22,7 +22,7 @@ const m = {
|
|
|
22
22
|
},
|
|
23
23
|
bgColor: {
|
|
24
24
|
type: String,
|
|
25
|
-
default: "bg-
|
|
25
|
+
default: "bg-surface-light"
|
|
26
26
|
},
|
|
27
27
|
textColor: {
|
|
28
28
|
type: String,
|
|
@@ -34,20 +34,20 @@ const m = {
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
setup(t) {
|
|
37
|
-
const
|
|
37
|
+
const n = {
|
|
38
38
|
sm: "w-6 h-6 text-xs",
|
|
39
39
|
md: "w-8 h-8 text-sm",
|
|
40
40
|
lg: "w-10 h-10 text-base"
|
|
41
41
|
}[t.size] || "w-8 h-8 text-sm";
|
|
42
|
-
return (e, g) => (
|
|
43
|
-
class: ["kun-list-item-avatar", [s(
|
|
42
|
+
return (e, g) => (o(), r("div", a({
|
|
43
|
+
class: ["kun-list-item-avatar", [s(n), t.rounded, t.bgColor, t.textColor, t.fontWeight]]
|
|
44
44
|
}, e.$attrs), [
|
|
45
45
|
l(e.$slots, "default", {}, () => [
|
|
46
|
-
t.text ? (
|
|
46
|
+
t.text ? (o(), r("span", m, u(t.text), 1)) : i("", !0)
|
|
47
47
|
], !0)
|
|
48
48
|
], 16));
|
|
49
49
|
}
|
|
50
|
-
},
|
|
50
|
+
}, y = /* @__PURE__ */ d(f, [["__scopeId", "data-v-08613511"]]);
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
y as default
|
|
53
53
|
};
|
|
@@ -16,7 +16,7 @@ const e = {
|
|
|
16
16
|
textColor: { type: String, default: "text-black dark:text-white" },
|
|
17
17
|
labelColor: { type: String, default: "text-black/80 dark:text-white/80" },
|
|
18
18
|
placeholderColor: { type: String, default: "placeholder-black/60 dark:placeholder-white/60" },
|
|
19
|
-
bgInput: { type: String, default: "bg-
|
|
19
|
+
bgInput: { type: String, default: "bg-surface" },
|
|
20
20
|
textCenter: { type: Boolean, default: !1 },
|
|
21
21
|
controlVariant: { type: String, default: "default" },
|
|
22
22
|
noArrows: { type: Boolean, default: !1 },
|
|
@@ -30,17 +30,17 @@ const $ = { class: "w-full h-full overflow-hidden" }, j = { class: "w-full h-ful
|
|
|
30
30
|
function D(e, t) {
|
|
31
31
|
return n.relationDirection === "column" ? e : t;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function p(e, t) {
|
|
34
34
|
return n.relationDirection === "column" ? e == null ? void 0 : e[n.rowKey] : t == null ? void 0 : t[n.columnKey];
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function v(e, t) {
|
|
37
37
|
var o;
|
|
38
|
-
const a = b(e, t), s =
|
|
38
|
+
const a = b(e, t), s = p(e, t), u = ((o = n.getRelatedEntities) == null ? void 0 : o.call(n, e, t)) ?? h(a, n.relationKey);
|
|
39
39
|
return (Array.isArray(u) ? u : []).some((c) => (c == null ? void 0 : c.id) === s);
|
|
40
40
|
}
|
|
41
41
|
function E(e, t, a) {
|
|
42
42
|
var c, K;
|
|
43
|
-
const s = b(e, t), u = D(e, t), m =
|
|
43
|
+
const s = b(e, t), u = D(e, t), m = p(e, t);
|
|
44
44
|
let o = h(s, n.relationKey);
|
|
45
45
|
if (!Array.isArray(o)) {
|
|
46
46
|
o = [];
|
|
@@ -83,7 +83,7 @@ const $ = { class: "w-full h-full overflow-hidden" }, j = { class: "w-full h-ful
|
|
|
83
83
|
}, {
|
|
84
84
|
default: T(({ item: a }) => [
|
|
85
85
|
d("div", {
|
|
86
|
-
class: "grid items-center hover:bg-
|
|
86
|
+
class: "grid items-center hover:bg-surface",
|
|
87
87
|
style: S(`grid-template-columns: repeat(${l.columns.length + 1}, minmax(120px, 1fr))`)
|
|
88
88
|
}, [
|
|
89
89
|
d("div", C, x(V(h)(a, l.rowLabel)), 1),
|
|
@@ -92,8 +92,8 @@ const $ = { class: "w-full h-full overflow-hidden" }, j = { class: "w-full h-ful
|
|
|
92
92
|
class: "flex justify-center items-center px-2 py-1 border-b h-full"
|
|
93
93
|
}, [
|
|
94
94
|
A(I, {
|
|
95
|
-
modelValue:
|
|
96
|
-
color:
|
|
95
|
+
modelValue: v(a, s),
|
|
96
|
+
color: v(a, s) ? "text-green-600 dark:text-green-400" : "",
|
|
97
97
|
"onUpdate:modelValue": (u) => E(a, s, u),
|
|
98
98
|
size: "lg",
|
|
99
99
|
label: ""
|
|
@@ -46,7 +46,7 @@ const R = {
|
|
|
46
46
|
class: a([
|
|
47
47
|
"relative select-none cursor-pointer",
|
|
48
48
|
e.vertical ? "w-2 h-full" : "h-1.5 w-full",
|
|
49
|
-
"bg-
|
|
49
|
+
"bg-surface-light rounded-full"
|
|
50
50
|
]),
|
|
51
51
|
onPointerdown: w[0] || (w[0] = (...s) => n(y) && n(y)(...s))
|
|
52
52
|
}, [
|
|
@@ -117,7 +117,7 @@ const R = {
|
|
|
117
117
|
])
|
|
118
118
|
], 2));
|
|
119
119
|
}
|
|
120
|
-
}, W = /* @__PURE__ */ I(M, [["__scopeId", "data-v-
|
|
120
|
+
}, W = /* @__PURE__ */ I(M, [["__scopeId", "data-v-1dea00e0"]]);
|
|
121
121
|
export {
|
|
122
122
|
W as default
|
|
123
123
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as h, createElementBlock as n, openBlock as s, mergeProps as v, createCommentVNode as d, createElementVNode as c, toDisplayString as b, withKeys as m, normalizeClass as r, withModifiers as f, renderSlot as u } from "vue";
|
|
2
2
|
const k = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "flex flex-col items-center gap-1 cursor-pointer"
|
|
@@ -22,7 +22,7 @@ const k = {
|
|
|
22
22
|
// 'top', 'bottom', 'left', 'right'
|
|
23
23
|
disabled: Boolean,
|
|
24
24
|
onColor: { type: String, default: "bg-green-600" },
|
|
25
|
-
offColor: { type: String, default: "bg-
|
|
25
|
+
offColor: { type: String, default: "bg-surface-light" },
|
|
26
26
|
iconColor: { type: String, default: "bg-white" },
|
|
27
27
|
inset: Boolean,
|
|
28
28
|
hideDetails: { type: Boolean, default: !1 },
|
|
@@ -34,12 +34,12 @@ const k = {
|
|
|
34
34
|
},
|
|
35
35
|
emits: ["update:modelValue"],
|
|
36
36
|
setup(e, { emit: y }) {
|
|
37
|
-
const l = e, g = y, t =
|
|
37
|
+
const l = e, g = y, t = h(() => l.modelValue === l.trueValue), i = () => {
|
|
38
38
|
l.disabled || g(
|
|
39
39
|
"update:modelValue",
|
|
40
40
|
t.value ? l.falseValue : l.trueValue
|
|
41
41
|
);
|
|
42
|
-
}, w =
|
|
42
|
+
}, w = h(
|
|
43
43
|
() => l.labelPosition === "top" || l.labelPosition === "bottom"
|
|
44
44
|
), x = {
|
|
45
45
|
xxs: {
|
|
@@ -84,12 +84,12 @@ const k = {
|
|
|
84
84
|
icon: "text-2xl",
|
|
85
85
|
translate: "translate-x-7"
|
|
86
86
|
}
|
|
87
|
-
}, a =
|
|
87
|
+
}, a = h(() => x[l.size] || x.md);
|
|
88
88
|
return (o, $) => (s(), n("div", v({
|
|
89
89
|
class: ["select-none", { "opacity-50 cursor-not-allowed": e.disabled, "pl-2": e.inset }]
|
|
90
90
|
}, o.$attrs), [
|
|
91
91
|
w.value ? (s(), n("label", k, [
|
|
92
|
-
e.label && e.labelPosition === "top" ? (s(), n("span", C,
|
|
92
|
+
e.label && e.labelPosition === "top" ? (s(), n("span", C, b(e.label), 1)) : d("", !0),
|
|
93
93
|
c("div", {
|
|
94
94
|
class: r(["relative rounded-full transition-colors duration-200 cursor-pointer", [a.value.outer, t.value ? e.onColor : e.offColor]]),
|
|
95
95
|
role: "switch",
|
|
@@ -113,7 +113,7 @@ const k = {
|
|
|
113
113
|
t.value ? u(o.$slots, "on-icon", { key: 0 }) : u(o.$slots, "off-icon", { key: 1 })
|
|
114
114
|
], 2)
|
|
115
115
|
], 42, S),
|
|
116
|
-
e.label && e.labelPosition === "bottom" ? (s(), n("span", V,
|
|
116
|
+
e.label && e.labelPosition === "bottom" ? (s(), n("span", V, b(e.label), 1)) : d("", !0)
|
|
117
117
|
])) : (s(), n("label", {
|
|
118
118
|
key: 1,
|
|
119
119
|
class: r(["flex items-center gap-3 cursor-pointer", { "flex-row-reverse": e.labelPosition === "left" }])
|
|
@@ -141,7 +141,7 @@ const k = {
|
|
|
141
141
|
t.value ? u(o.$slots, "on-icon", { key: 0 }) : u(o.$slots, "off-icon", { key: 1 })
|
|
142
142
|
], 2)
|
|
143
143
|
], 42, B),
|
|
144
|
-
e.label ? (s(), n("div", P,
|
|
144
|
+
e.label ? (s(), n("div", P, b(e.label), 1)) : d("", !0)
|
|
145
145
|
], 2)),
|
|
146
146
|
e.hideDetails ? d("", !0) : (s(), n("div", v({
|
|
147
147
|
key: 2,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeModels as W, toRefs as be, useModel as Ce, ref as v, watch as Q, computed as q, onMounted as Te, createElementBlock as r, openBlock as l, mergeProps as V, createCommentVNode as u, createElementVNode as O, renderSlot as a, createBlock as b, unref as s, normalizeClass as C, withCtx as j, createVNode as T, withDirectives as G, vModelText as Fe, vShow as J, normalizeProps as d, guardReactiveProps as g, Fragment as
|
|
1
|
+
import { mergeModels as W, toRefs as be, useModel as Ce, ref as v, watch as Q, computed as q, onMounted as Te, createElementBlock as r, openBlock as l, mergeProps as V, createCommentVNode as u, createElementVNode as O, renderSlot as a, createBlock as b, unref as s, normalizeClass as C, withCtx as j, createVNode as T, withDirectives as G, vModelText as Fe, vShow as J, normalizeProps as d, guardReactiveProps as g, Fragment as $e, createSlots as X, renderList as Y, toDisplayString as ke, isRef as Pe, nextTick as Me } from "vue";
|
|
2
2
|
import { isMobile as m } from "../../../../utils/_platform.js";
|
|
3
3
|
import Z from "../../../KunIcon/src/components/KunIcon.vue.js";
|
|
4
4
|
import Ae from "../../../../icons/IconFilter.vue.js";
|
|
@@ -30,8 +30,8 @@ const Ke = ["placeholder"], Le = { class: "flex-1 overflow-auto" }, Ue = { key:
|
|
|
30
30
|
setup(x, { emit: _ }) {
|
|
31
31
|
const S = _, p = x, F = be(p), ee = Ce(x, "selectedItems"), {
|
|
32
32
|
headers: z,
|
|
33
|
-
showExpand:
|
|
34
|
-
showSelect:
|
|
33
|
+
showExpand: $,
|
|
34
|
+
showSelect: k,
|
|
35
35
|
rowClass: D,
|
|
36
36
|
hideDefaultFooter: se,
|
|
37
37
|
hideDefaultHeader: oe,
|
|
@@ -97,7 +97,7 @@ const Ke = ["placeholder"], Le = { class: "flex-1 overflow-auto" }, Ue = { key:
|
|
|
97
97
|
return (e, o) => (l(), r("div", V({ class: we }, e.$attrs, { style: { "user-select": "text" } }), [
|
|
98
98
|
s(H) || e.filterable || e.$slots.prependSearch || e.$slots.appendSearch ? (l(), r("div", {
|
|
99
99
|
key: 0,
|
|
100
|
-
class: C(["p-2 bg-
|
|
100
|
+
class: C(["p-2 bg-surface print:hidden", {
|
|
101
101
|
"justify-start flex": e.searchPosition === "start",
|
|
102
102
|
"justify-center flex": e.searchPosition === "center",
|
|
103
103
|
"justify-end flex": e.searchPosition === "end"
|
|
@@ -159,8 +159,8 @@ const Ke = ["placeholder"], Le = { class: "flex-1 overflow-auto" }, Ue = { key:
|
|
|
159
159
|
key: 1,
|
|
160
160
|
headers: s(z),
|
|
161
161
|
"sort-by": s(i).sortBy,
|
|
162
|
-
"show-select": s(
|
|
163
|
-
"show-expand": s(
|
|
162
|
+
"show-select": s(k),
|
|
163
|
+
"show-expand": s($),
|
|
164
164
|
"all-selected": s(he),
|
|
165
165
|
"some-selected": s(ge),
|
|
166
166
|
"thead-class": e.theadClass,
|
|
@@ -180,8 +180,8 @@ const Ke = ["placeholder"], Le = { class: "flex-1 overflow-auto" }, Ue = { key:
|
|
|
180
180
|
"row-class-condition": e.rowClassCondition,
|
|
181
181
|
"is-selected": s(P),
|
|
182
182
|
"is-expanded": s(A),
|
|
183
|
-
"show-select": s(
|
|
184
|
-
"show-expand": s(
|
|
183
|
+
"show-select": s(k),
|
|
184
|
+
"show-expand": s($),
|
|
185
185
|
"has-actions": e.hasActions,
|
|
186
186
|
"action-loading-map": e.actionLoadingMap,
|
|
187
187
|
onToggleExpand: s(I),
|
|
@@ -194,7 +194,7 @@ const Ke = ["placeholder"], Le = { class: "flex-1 overflow-auto" }, Ue = { key:
|
|
|
194
194
|
a(e.$slots, c, d(g(n)))
|
|
195
195
|
])
|
|
196
196
|
}))
|
|
197
|
-
]), 1032, ["items", "headers", "row-class", "row-class-condition", "is-selected", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "onToggleSelect", "customSlots"])) : (l(), r(
|
|
197
|
+
]), 1032, ["items", "headers", "row-class", "row-class-condition", "is-selected", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "onToggleSelect", "customSlots"])) : (l(), r($e, { key: 3 }, [
|
|
198
198
|
a(e.$slots, "body.prepend", d(g(h.value))),
|
|
199
199
|
T(Be, {
|
|
200
200
|
items: s(f),
|
|
@@ -208,8 +208,8 @@ const Ke = ["placeholder"], Le = { class: "flex-1 overflow-auto" }, Ue = { key:
|
|
|
208
208
|
"striped-class": e.stripedClass,
|
|
209
209
|
"is-selected": s(P),
|
|
210
210
|
"is-expanded": s(A),
|
|
211
|
-
"show-select": s(
|
|
212
|
-
"show-expand": s(
|
|
211
|
+
"show-select": s(k),
|
|
212
|
+
"show-expand": s($),
|
|
213
213
|
"has-actions": e.hasActions,
|
|
214
214
|
"action-loading-map": e.actionLoadingMap,
|
|
215
215
|
onToggleExpand: s(I),
|
|
@@ -230,7 +230,7 @@ const Ke = ["placeholder"], Le = { class: "flex-1 overflow-auto" }, Ue = { key:
|
|
|
230
230
|
])) : u("", !0)
|
|
231
231
|
])) : u("", !0),
|
|
232
232
|
s(f).length ? u("", !0) : (l(), r("div", Qe, [
|
|
233
|
-
O("div", qe,
|
|
233
|
+
O("div", qe, ke(e.noDataText), 1)
|
|
234
234
|
]))
|
|
235
235
|
]),
|
|
236
236
|
s(se) ? a(e.$slots, "footer", d(V({ key: 2 }, h.value))) : (l(), r("div", Ge, [
|