adverich-kun-ui 0.1.195 → 0.1.196
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.
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { inject as i, ref as b, computed as C, onMounted as S, createBlock as p, openBlock as d, resolveDynamicComponent as g, normalizeClass as x, withCtx as I, renderSlot as c, createCommentVNode as r, createVNode as u, createElementBlock as B, toDisplayString as h } from "vue";
|
|
2
|
+
import m from "../../../KunIcon/src/components/KunIcon.vue.js";
|
|
3
|
+
const N = { key: 0 }, A = {
|
|
4
|
+
__name: "KunTab",
|
|
5
|
+
props: {
|
|
6
|
+
value: [String, Number],
|
|
7
|
+
text: [String, Number],
|
|
8
|
+
prependIcon: String,
|
|
9
|
+
appendIcon: String,
|
|
10
|
+
disabled: Boolean,
|
|
11
|
+
stacked: Boolean,
|
|
12
|
+
selectedClass: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "text-primary font-medium"
|
|
15
|
+
},
|
|
16
|
+
baseColor: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "text-slate-500 dark:text-slate-300"
|
|
19
|
+
},
|
|
20
|
+
colorClass: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: ""
|
|
23
|
+
},
|
|
24
|
+
tag: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "button"
|
|
27
|
+
},
|
|
28
|
+
to: [String, Object]
|
|
29
|
+
},
|
|
30
|
+
emits: ["update:modelValue"],
|
|
31
|
+
setup(e, { emit: f }) {
|
|
32
|
+
const n = e, v = f, t = i("modelValue"), a = i("updateModelValue"), l = i("registerTab"), s = b(null), y = C(() => Array.isArray(t == null ? void 0 : t.value) ? t.value.includes(n.value) : (t == null ? void 0 : t.value) === n.value);
|
|
33
|
+
S(() => {
|
|
34
|
+
l == null || l(s.value);
|
|
35
|
+
});
|
|
36
|
+
const k = () => {
|
|
37
|
+
!n.disabled && n.value !== void 0 && (a == null || a(n.value), v("update:modelValue", n.value));
|
|
38
|
+
};
|
|
39
|
+
return (o, $) => (d(), p(g(e.to ? "router-link" : e.tag), {
|
|
40
|
+
to: e.to,
|
|
41
|
+
"data-value": e.value,
|
|
42
|
+
class: x([
|
|
43
|
+
"relative inline-flex items-center justify-center whitespace-nowrap transition-all px-4 py-2 cursor-pointer",
|
|
44
|
+
e.stacked ? "flex-col gap-1" : "",
|
|
45
|
+
y.value ? e.selectedClass : e.baseColor,
|
|
46
|
+
e.disabled ? "opacity-50 pointer-events-none" : "",
|
|
47
|
+
e.colorClass
|
|
48
|
+
]),
|
|
49
|
+
onClick: k,
|
|
50
|
+
ref_key: "tabRef",
|
|
51
|
+
ref: s
|
|
52
|
+
}, {
|
|
53
|
+
default: I(() => [
|
|
54
|
+
e.prependIcon ? c(o.$slots, "prepend", { key: 0 }, () => [
|
|
55
|
+
u(m, { icon: e.prependIcon }, null, 8, ["icon"])
|
|
56
|
+
]) : r("", !0),
|
|
57
|
+
c(o.$slots, "default", {}, () => [
|
|
58
|
+
e.text ? (d(), B("span", N, h(e.text), 1)) : r("", !0)
|
|
59
|
+
]),
|
|
60
|
+
e.appendIcon ? c(o.$slots, "append", { key: 1 }, () => [
|
|
61
|
+
u(m, { icon: e.appendIcon }, null, 8, ["icon"])
|
|
62
|
+
]) : r("", !0)
|
|
63
|
+
]),
|
|
64
|
+
_: 3
|
|
65
|
+
}, 8, ["to", "data-value", "class"]));
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
A as default
|
|
70
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import o from "./components/KunAlert/src/components/KunAlert.vue.js";
|
|
3
3
|
import i from "./components/KunAppbar/src/components/KunAppbar.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import a from "./components/KunAppbarTitle/src/components/KunAppbarTitle.vue.js";
|
|
5
|
+
import t from "./components/KunAutocomplete/src/components/KunAutocomplete.vue.js";
|
|
6
6
|
import s from "./components/KunAvatar/src/components/KunAvatar.vue.js";
|
|
7
7
|
import u from "./components/KunBtn/src/components/KunBtn.vue.js";
|
|
8
8
|
import f from "./components/KunBadge/src/components/KunBadge.vue.js";
|
|
@@ -15,9 +15,9 @@ import l from "./components/KunCardTitle/src/components/KunCardTitle.vue.js";
|
|
|
15
15
|
import $ from "./components/KunChip/src/components/KunChip.vue.js";
|
|
16
16
|
import d from "./components/KunCol/src/components/KunCol.vue.js";
|
|
17
17
|
import T from "./components/KunContainer/src/components/KunContainer.vue.js";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
18
|
+
import b from "./components/KunCurrency/src/components/KunCurrency.vue.js";
|
|
19
|
+
import C from "./components/KunDialog/src/components/KunDialog.vue.js";
|
|
20
|
+
import L from "./components/KunDivider/src/components/KunDivider.vue.js";
|
|
21
21
|
import I from "./components/KunDrawer/src/components/KunDrawer.vue.js";
|
|
22
22
|
import A from "./components/KunForm/src/components/KunForm.vue.js";
|
|
23
23
|
import S from "./components/KunIcon/src/components/KunIcon.vue.js";
|
|
@@ -41,17 +41,18 @@ import E from "./components/KunSlider/src/components/KunSlider.vue.js";
|
|
|
41
41
|
import N from "./components/KunSpacer/src/components/KunSpacer.vue.js";
|
|
42
42
|
import H from "./components/KunSwitch/src/components/KunSwitch.vue.js";
|
|
43
43
|
import J from "./components/KunTable/src/components/KunTable.vue.js";
|
|
44
|
-
import O from "./components/KunTabs/src/components/
|
|
45
|
-
import P from "./components/
|
|
46
|
-
import Q from "./components/
|
|
47
|
-
import U from "./components/
|
|
48
|
-
import V from "./components/KunToolbar/src/components/
|
|
49
|
-
import W from "./components/
|
|
44
|
+
import O from "./components/KunTabs/src/components/KunTab.vue.js";
|
|
45
|
+
import P from "./components/KunTabs/src/components/KunTabs.vue.js";
|
|
46
|
+
import Q from "./components/KunTextarea/src/components/KunTextarea.vue.js";
|
|
47
|
+
import U from "./components/KunTextField/src/components/KunTextField.vue.js";
|
|
48
|
+
import V from "./components/KunToolbar/src/components/KunToolbar.vue.js";
|
|
49
|
+
import W from "./components/KunToolbar/src/components/KunToolbarTitle.vue.js";
|
|
50
|
+
import X from "./components/KunTooltip/src/components/KunTooltip.vue.js";
|
|
50
51
|
const n = {
|
|
51
52
|
KunAlert: o,
|
|
52
53
|
KunAppbar: i,
|
|
53
|
-
KunAppbarTitle:
|
|
54
|
-
KunAutocomplete:
|
|
54
|
+
KunAppbarTitle: a,
|
|
55
|
+
KunAutocomplete: t,
|
|
55
56
|
KunAvatar: s,
|
|
56
57
|
KunBtn: u,
|
|
57
58
|
KunBadge: f,
|
|
@@ -65,9 +66,9 @@ const n = {
|
|
|
65
66
|
KunChip: $,
|
|
66
67
|
KunCol: d,
|
|
67
68
|
KunContainer: T,
|
|
68
|
-
KunCurrency:
|
|
69
|
-
KunDialog:
|
|
70
|
-
KunDivider:
|
|
69
|
+
KunCurrency: b,
|
|
70
|
+
KunDialog: C,
|
|
71
|
+
KunDivider: L,
|
|
71
72
|
KunDrawer: I,
|
|
72
73
|
KunForm: A,
|
|
73
74
|
KunIcon: S,
|
|
@@ -90,22 +91,23 @@ const n = {
|
|
|
90
91
|
KunSpacer: N,
|
|
91
92
|
KunSwitch: H,
|
|
92
93
|
KunTable: J,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
KunTab: O,
|
|
95
|
+
KunTabs: P,
|
|
96
|
+
KunTextarea: Q,
|
|
97
|
+
KunTextField: U,
|
|
98
|
+
KunToolbar: V,
|
|
99
|
+
KunToolbarTitle: W,
|
|
100
|
+
KunTooltip: X
|
|
99
101
|
};
|
|
100
|
-
function
|
|
102
|
+
function Um(r) {
|
|
101
103
|
for (const m in n)
|
|
102
104
|
r.component(m, n[m]);
|
|
103
105
|
}
|
|
104
106
|
export {
|
|
105
107
|
o as KunAlert,
|
|
106
108
|
i as KunAppbar,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
a as KunAppbarTitle,
|
|
110
|
+
t as KunAutocomplete,
|
|
109
111
|
s as KunAvatar,
|
|
110
112
|
f as KunBadge,
|
|
111
113
|
u as KunBtn,
|
|
@@ -118,9 +120,9 @@ export {
|
|
|
118
120
|
$ as KunChip,
|
|
119
121
|
d as KunCol,
|
|
120
122
|
T as KunContainer,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
b as KunCurrency,
|
|
124
|
+
C as KunDialog,
|
|
125
|
+
L as KunDivider,
|
|
124
126
|
I as KunDrawer,
|
|
125
127
|
A as KunForm,
|
|
126
128
|
S as KunIcon,
|
|
@@ -142,12 +144,13 @@ export {
|
|
|
142
144
|
E as KunSlider,
|
|
143
145
|
N as KunSpacer,
|
|
144
146
|
H as KunSwitch,
|
|
147
|
+
O as KunTab,
|
|
145
148
|
J as KunTable,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
P as KunTabs,
|
|
150
|
+
U as KunTextField,
|
|
151
|
+
Q as KunTextarea,
|
|
152
|
+
V as KunToolbar,
|
|
153
|
+
W as KunToolbarTitle,
|
|
154
|
+
X as KunTooltip,
|
|
155
|
+
Um as install
|
|
153
156
|
};
|