@wikicasa-dev/components 1.7.38 → 1.7.40
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/BaseTabView.js +1 -1
- package/dist/UIKit/Tab/BaseTabView.vue.d.ts +6 -2
- package/dist/chunks/BaseTabView.vue_vue_type_script_setup_true_lang.CbqroZ_c.js +96 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/BaseTabView.vue_vue_type_script_setup_true_lang.DRECN-Oz.js +0 -94
package/dist/BaseTabView.js
CHANGED
|
@@ -10,7 +10,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
10
10
|
type: import('vue').PropType<ClassType>;
|
|
11
11
|
default: string;
|
|
12
12
|
};
|
|
13
|
-
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
tabClick: (args_0: MouseEvent, args_1: number) => void;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
14
16
|
activeIdx: import('vue').PropType<number | undefined>;
|
|
15
17
|
tabViewDescription: {
|
|
16
18
|
type: import('vue').PropType<string>;
|
|
@@ -20,7 +22,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
20
22
|
type: import('vue').PropType<ClassType>;
|
|
21
23
|
default: string;
|
|
22
24
|
};
|
|
23
|
-
}
|
|
25
|
+
}>> & {
|
|
26
|
+
onTabClick?: ((args_0: MouseEvent, args_1: number) => any) | undefined;
|
|
27
|
+
}, {
|
|
24
28
|
tabListClasses: ClassType;
|
|
25
29
|
}, {}>;
|
|
26
30
|
export default _default;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { defineComponent as S, mergeModels as y, useModel as z, ref as o, onMounted as U, useSlots as j, computed as q, watch as G, openBlock as l, createElementBlock as i, normalizeClass as v, createElementVNode as _, toDisplayString as T, Fragment as C, renderList as I, createBlock as p, resolveDynamicComponent as g, createCommentVNode as $, withCtx as H } from "vue";
|
|
2
|
+
import { _ as J } from "./BaseTabPanel.vue_vue_type_script_setup_true_lang.DoZHWHt1.js";
|
|
3
|
+
import { getUID as K } from "../utils.js";
|
|
4
|
+
const O = ["id"], Q = ["aria-labelledby"], R = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], W = { key: 0 }, ee = /* @__PURE__ */ S({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "BaseTabView",
|
|
7
|
+
props: /* @__PURE__ */ y({
|
|
8
|
+
tabViewDescription: {},
|
|
9
|
+
tabListClasses: { default: "" }
|
|
10
|
+
}, {
|
|
11
|
+
activeIdx: { default: 0 },
|
|
12
|
+
activeIdxModifiers: {}
|
|
13
|
+
}),
|
|
14
|
+
emits: /* @__PURE__ */ y(["tabClick"], ["update:activeIdx"]),
|
|
15
|
+
setup(F, { emit: B }) {
|
|
16
|
+
const w = B, c = z(F, "activeIdx"), P = o(""), m = o(null), V = o(null), r = o("");
|
|
17
|
+
U(() => {
|
|
18
|
+
r.value = K();
|
|
19
|
+
});
|
|
20
|
+
const f = j(), d = (e) => e.props ?? null, h = (e) => e.type.__name === "BaseTab", k = (e, t) => ({
|
|
21
|
+
renderFn: e,
|
|
22
|
+
tabId: b(t),
|
|
23
|
+
"active-tab-panel-idx": d(e)?.["active-tab-panel-idx"] ?? t,
|
|
24
|
+
"header-title": d(e)?.["header-title"] || "",
|
|
25
|
+
class: d(e)?.class || ""
|
|
26
|
+
}), s = q(() => f.default ? f.default().reduce((e, t) => (t.children && Array.isArray(t.children) ? t.children.forEach((a) => {
|
|
27
|
+
h(a) && e.push(k(a, e.length));
|
|
28
|
+
}) : h(t) && e.push(k(t, e.length)), e), []) : []), u = (e) => c.value === e, A = (e) => m.value === e, b = (e) => `base-tab-${e}-${r.value}`, D = (e) => `base-tab-panel-${e}-${r.value}`, M = (e) => s.value.find((t) => t["active-tab-panel-idx"] === e)?.tabId, E = (e) => {
|
|
29
|
+
P.value = b(e);
|
|
30
|
+
}, L = (e) => {
|
|
31
|
+
const t = s.value.at(e ?? -1);
|
|
32
|
+
m.value = t?.["active-tab-panel-idx"] ?? null;
|
|
33
|
+
}, N = (e) => {
|
|
34
|
+
E(e), c.value = e;
|
|
35
|
+
};
|
|
36
|
+
return G(
|
|
37
|
+
c,
|
|
38
|
+
(e) => {
|
|
39
|
+
L(e ?? -1);
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
immediate: !0
|
|
43
|
+
}
|
|
44
|
+
), (e, t) => (l(), i("div", {
|
|
45
|
+
ref_key: "root",
|
|
46
|
+
ref: V,
|
|
47
|
+
class: v(e.$attrs.class)
|
|
48
|
+
}, [
|
|
49
|
+
_("span", {
|
|
50
|
+
id: `tablist-${r.value}`,
|
|
51
|
+
class: "uikit-sr-only"
|
|
52
|
+
}, T(e.tabViewDescription), 9, O),
|
|
53
|
+
_("div", {
|
|
54
|
+
role: "tablist",
|
|
55
|
+
"aria-labelledby": `tablist-${r.value}`,
|
|
56
|
+
class: v(e.tabListClasses)
|
|
57
|
+
}, [
|
|
58
|
+
(l(!0), i(C, null, I(s.value, (a, n) => (l(), i("button", {
|
|
59
|
+
key: n,
|
|
60
|
+
id: b(n),
|
|
61
|
+
type: "button",
|
|
62
|
+
role: "tab",
|
|
63
|
+
"aria-selected": u(n),
|
|
64
|
+
"aria-controls": `base-tab-panel-${n}-${r.value}`,
|
|
65
|
+
tabindex: u(n) ? void 0 : -1,
|
|
66
|
+
class: v([
|
|
67
|
+
"uikit-bg-transparent uikit-p-5px",
|
|
68
|
+
{
|
|
69
|
+
"uikit-border-b-2 uikit-border-solid uikit-border-w-primary uikit-font-semibold": u(n)
|
|
70
|
+
},
|
|
71
|
+
a.class
|
|
72
|
+
]),
|
|
73
|
+
onClick: (x) => {
|
|
74
|
+
N(n), w("tabClick", x, n);
|
|
75
|
+
}
|
|
76
|
+
}, [
|
|
77
|
+
a["header-title"] ? (l(), i("span", W, T(a["header-title"]), 1)) : a.renderFn.children && a.renderFn.children.header ? (l(), p(g(a.renderFn.children.header), { key: 1 })) : $("", !0)
|
|
78
|
+
], 10, R))), 128))
|
|
79
|
+
], 10, Q),
|
|
80
|
+
(l(!0), i(C, null, I(s.value, (a, n) => (l(), p(J, {
|
|
81
|
+
key: n,
|
|
82
|
+
id: D(n),
|
|
83
|
+
"labelled-by": M(n) || "",
|
|
84
|
+
active: A(n)
|
|
85
|
+
}, {
|
|
86
|
+
default: H(() => [
|
|
87
|
+
a.renderFn.children && a.renderFn.children.default ? (l(), p(g(a.renderFn.children.default), { key: 0 })) : $("", !0)
|
|
88
|
+
]),
|
|
89
|
+
_: 2
|
|
90
|
+
}, 1032, ["id", "labelled-by", "active"]))), 128))
|
|
91
|
+
], 2));
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
export {
|
|
95
|
+
ee as _
|
|
96
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { _ as l } from "./chunks/SelectItem.vue_vue_type_script_setup_true_lang.
|
|
|
6
6
|
import { default as d } from "./CheckboxBtn.js";
|
|
7
7
|
import { _ as i } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.Bn9HoCj4.js";
|
|
8
8
|
import { _ as n } from "./chunks/BaseTab.vue_vue_type_script_setup_true_lang.BRubYI9e.js";
|
|
9
|
-
import { _ as b } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.
|
|
9
|
+
import { _ as b } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.CbqroZ_c.js";
|
|
10
10
|
import { _ as g } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.DR6a7QAi.js";
|
|
11
11
|
import { _ as h } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.BYlMCUWP.js";
|
|
12
12
|
import { _ as I } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang._TveE6SF.js";
|
package/package.json
CHANGED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { defineComponent as x, mergeModels as E, useModel as L, ref as o, onMounted as N, useSlots as S, computed as z, watch as U, openBlock as r, createElementBlock as i, normalizeClass as v, createElementVNode as y, toDisplayString as _, Fragment as T, renderList as I, createBlock as p, resolveDynamicComponent as $, createCommentVNode as g, withCtx as j } from "vue";
|
|
2
|
-
import { _ as q } from "./BaseTabPanel.vue_vue_type_script_setup_true_lang.DoZHWHt1.js";
|
|
3
|
-
import { getUID as G } from "../utils.js";
|
|
4
|
-
const H = ["id"], J = ["aria-labelledby"], K = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], O = { key: 0 }, Y = /* @__PURE__ */ x({
|
|
5
|
-
inheritAttrs: !1,
|
|
6
|
-
__name: "BaseTabView",
|
|
7
|
-
props: /* @__PURE__ */ E({
|
|
8
|
-
tabViewDescription: {},
|
|
9
|
-
tabListClasses: { default: "" }
|
|
10
|
-
}, {
|
|
11
|
-
activeIdx: { default: 0 },
|
|
12
|
-
activeIdxModifiers: {}
|
|
13
|
-
}),
|
|
14
|
-
emits: ["update:activeIdx"],
|
|
15
|
-
setup(C) {
|
|
16
|
-
const c = L(C, "activeIdx"), F = o(""), m = o(null), B = o(null), l = o("");
|
|
17
|
-
N(() => {
|
|
18
|
-
l.value = G();
|
|
19
|
-
});
|
|
20
|
-
const f = S(), d = (e) => e.props ?? null, h = (e) => e.type.__name === "BaseTab", k = (e, t) => ({
|
|
21
|
-
renderFn: e,
|
|
22
|
-
tabId: b(t),
|
|
23
|
-
"active-tab-panel-idx": d(e)?.["active-tab-panel-idx"] ?? t,
|
|
24
|
-
"header-title": d(e)?.["header-title"] || "",
|
|
25
|
-
class: d(e)?.class || ""
|
|
26
|
-
}), s = z(() => f.default ? f.default().reduce((e, t) => (t.children && Array.isArray(t.children) ? t.children.forEach((a) => {
|
|
27
|
-
h(a) && e.push(k(a, e.length));
|
|
28
|
-
}) : h(t) && e.push(k(t, e.length)), e), []) : []), u = (e) => c.value === e, w = (e) => m.value === e, b = (e) => `base-tab-${e}-${l.value}`, P = (e) => `base-tab-panel-${e}-${l.value}`, V = (e) => s.value.find((t) => t["active-tab-panel-idx"] === e)?.tabId, A = (e) => {
|
|
29
|
-
F.value = b(e);
|
|
30
|
-
}, D = (e) => {
|
|
31
|
-
const t = s.value.at(e ?? -1);
|
|
32
|
-
m.value = t?.["active-tab-panel-idx"] ?? null;
|
|
33
|
-
}, M = (e) => {
|
|
34
|
-
A(e), c.value = e;
|
|
35
|
-
};
|
|
36
|
-
return U(
|
|
37
|
-
c,
|
|
38
|
-
(e) => {
|
|
39
|
-
D(e ?? -1);
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
immediate: !0
|
|
43
|
-
}
|
|
44
|
-
), (e, t) => (r(), i("div", {
|
|
45
|
-
ref_key: "root",
|
|
46
|
-
ref: B,
|
|
47
|
-
class: v(e.$attrs.class)
|
|
48
|
-
}, [
|
|
49
|
-
y("span", {
|
|
50
|
-
id: `tablist-${l.value}`,
|
|
51
|
-
class: "uikit-sr-only"
|
|
52
|
-
}, _(e.tabViewDescription), 9, H),
|
|
53
|
-
y("div", {
|
|
54
|
-
role: "tablist",
|
|
55
|
-
"aria-labelledby": `tablist-${l.value}`,
|
|
56
|
-
class: v(e.tabListClasses)
|
|
57
|
-
}, [
|
|
58
|
-
(r(!0), i(T, null, I(s.value, (a, n) => (r(), i("button", {
|
|
59
|
-
key: n,
|
|
60
|
-
id: b(n),
|
|
61
|
-
type: "button",
|
|
62
|
-
role: "tab",
|
|
63
|
-
"aria-selected": u(n),
|
|
64
|
-
"aria-controls": `base-tab-panel-${n}-${l.value}`,
|
|
65
|
-
tabindex: u(n) ? void 0 : -1,
|
|
66
|
-
class: v([
|
|
67
|
-
"uikit-bg-transparent uikit-p-5px",
|
|
68
|
-
{
|
|
69
|
-
"uikit-border-b-2 uikit-border-solid uikit-border-w-primary uikit-font-semibold": u(n)
|
|
70
|
-
},
|
|
71
|
-
a.class
|
|
72
|
-
]),
|
|
73
|
-
onClick: (Q) => M(n)
|
|
74
|
-
}, [
|
|
75
|
-
a["header-title"] ? (r(), i("span", O, _(a["header-title"]), 1)) : a.renderFn.children && a.renderFn.children.header ? (r(), p($(a.renderFn.children.header), { key: 1 })) : g("", !0)
|
|
76
|
-
], 10, K))), 128))
|
|
77
|
-
], 10, J),
|
|
78
|
-
(r(!0), i(T, null, I(s.value, (a, n) => (r(), p(q, {
|
|
79
|
-
key: n,
|
|
80
|
-
id: P(n),
|
|
81
|
-
"labelled-by": V(n) || "",
|
|
82
|
-
active: w(n)
|
|
83
|
-
}, {
|
|
84
|
-
default: j(() => [
|
|
85
|
-
a.renderFn.children && a.renderFn.children.default ? (r(), p($(a.renderFn.children.default), { key: 0 })) : g("", !0)
|
|
86
|
-
]),
|
|
87
|
-
_: 2
|
|
88
|
-
}, 1032, ["id", "labelled-by", "active"]))), 128))
|
|
89
|
-
], 2));
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
export {
|
|
93
|
-
Y as _
|
|
94
|
-
};
|