@wikicasa-dev/components 2.0.27 → 2.0.29
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
CHANGED
|
@@ -4,6 +4,7 @@ declare let __VLS_typeProps: {
|
|
|
4
4
|
tabsPosition?: "top" | "bottom";
|
|
5
5
|
tabViewDescription: string;
|
|
6
6
|
tabListClasses?: ClassType;
|
|
7
|
+
dataCy?: string;
|
|
7
8
|
};
|
|
8
9
|
type __VLS_PublicProps = {
|
|
9
10
|
"activeIdx"?: number | undefined;
|
|
@@ -20,8 +21,5 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
20
21
|
tabElement: TabType;
|
|
21
22
|
}) => any) | undefined;
|
|
22
23
|
"onUpdate:activeIdx"?: ((activeIdx: number | undefined) => any) | undefined;
|
|
23
|
-
}>, {
|
|
24
|
-
tabListClasses: ClassType;
|
|
25
|
-
tabsPosition: "top" | "bottom";
|
|
26
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
25
|
export default _default;
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import { defineComponent as E, mergeModels as
|
|
1
|
+
import { defineComponent as E, mergeModels as T, useModel as M, ref as u, useId as N, useSlots as S, computed as z, provide as b, watch as C, openBlock as l, createElementBlock as k, normalizeClass as _, createElementVNode as j, unref as p, toDisplayString as q, createBlock as o, createCommentVNode as v, Fragment as G, renderList as H, withCtx as J, resolveDynamicComponent as K } from "vue";
|
|
2
2
|
import { _ as O } from "./BaseTabPanel.vue_vue_type_script_setup_true_lang.DoZHWHt1.js";
|
|
3
|
-
import { _ } from "./BaseTabList.vue_vue_type_script_setup_true_lang.CohlLou1.js";
|
|
4
|
-
const Q = ["id"],
|
|
3
|
+
import { _ as I } from "./BaseTabList.vue_vue_type_script_setup_true_lang.CohlLou1.js";
|
|
4
|
+
const Q = ["data-cy"], R = ["id"], ee = /* @__PURE__ */ E({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "BaseTabView",
|
|
7
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ T({
|
|
8
8
|
tabsPosition: { default: "top" },
|
|
9
9
|
tabViewDescription: {},
|
|
10
|
-
tabListClasses: {
|
|
10
|
+
tabListClasses: {},
|
|
11
|
+
dataCy: {}
|
|
11
12
|
}, {
|
|
12
13
|
activeIdx: { default: 0 },
|
|
13
14
|
activeIdxModifiers: {}
|
|
14
15
|
}),
|
|
15
|
-
emits: /* @__PURE__ */
|
|
16
|
+
emits: /* @__PURE__ */ T(["tabClicked"], ["update:activeIdx"]),
|
|
16
17
|
setup(g, { emit: P }) {
|
|
17
|
-
const B = P, r = M(g, "activeIdx"), $ = u(""), d = u(null),
|
|
18
|
+
const B = P, r = M(g, "activeIdx"), $ = u(""), d = u(null), A = u(null), i = N(), f = S(), c = (e) => e.props ?? null, m = (e) => e.type.__name === "BaseTab", h = (e, a) => ({
|
|
18
19
|
renderFn: e,
|
|
19
|
-
tabId:
|
|
20
|
+
tabId: y(a),
|
|
20
21
|
"active-tab-panel-idx": c(e)?.["active-tab-panel-idx"] ?? a,
|
|
21
22
|
"header-title": c(e)?.["header-title"] || "",
|
|
22
23
|
class: c(e)?.class || "",
|
|
23
24
|
"tab-panel-classes": c(e)?.["tab-panel-classes"] || "",
|
|
24
25
|
"data-cy": c(e)?.["data-cy"] || ""
|
|
25
|
-
}),
|
|
26
|
+
}), n = z(() => f.default ? f.default().reduce((e, a) => (a.children && Array.isArray(a.children) ? a.children.forEach((t) => {
|
|
26
27
|
m(t) && e.push(h(t, e.length));
|
|
27
28
|
}) : m(a) && e.push(h(a, e.length)), e), []) : []);
|
|
28
|
-
b("tabs",
|
|
29
|
-
const
|
|
30
|
-
$.value =
|
|
29
|
+
b("tabs", n), b("isTabActive", (e) => r.value === e);
|
|
30
|
+
const x = (e) => d.value === e, y = (e) => `base-tab-${e}-${i}`, F = (e) => `base-tab-panel-${e}-${i}`, V = (e) => n.value.find((a) => a["active-tab-panel-idx"] === e)?.tabId, w = (e) => {
|
|
31
|
+
$.value = y(e);
|
|
31
32
|
}, D = (e) => {
|
|
32
|
-
const a =
|
|
33
|
+
const a = n.value.at(e ?? -1);
|
|
33
34
|
d.value = a?.["active-tab-panel-idx"] ?? null;
|
|
34
35
|
};
|
|
35
36
|
b("handleClick", (e, a) => {
|
|
36
37
|
w(e), r.value = e, B("tabClicked", { tabIdx: e, tabElement: a });
|
|
37
|
-
}),
|
|
38
|
+
}), C(
|
|
38
39
|
r,
|
|
39
40
|
(e) => {
|
|
40
41
|
D(e ?? -1);
|
|
@@ -48,48 +49,49 @@ const Q = ["id"], Z = /* @__PURE__ */ E({
|
|
|
48
49
|
if (e[t] !== a[t]) return t;
|
|
49
50
|
return null;
|
|
50
51
|
};
|
|
51
|
-
return
|
|
52
|
-
() =>
|
|
52
|
+
return C(
|
|
53
|
+
() => n.value.map((e) => e["active-tab-panel-idx"]),
|
|
53
54
|
(e, a) => {
|
|
54
55
|
const t = L(e, a);
|
|
55
56
|
if (t === null) return;
|
|
56
|
-
const s =
|
|
57
|
+
const s = n.value[t]["active-tab-panel-idx"];
|
|
57
58
|
r.value !== t || s === void 0 || (d.value = s);
|
|
58
59
|
}
|
|
59
|
-
), (e, a) => (
|
|
60
|
+
), (e, a) => (l(), k("div", {
|
|
60
61
|
ref_key: "root",
|
|
61
|
-
ref:
|
|
62
|
-
class:
|
|
62
|
+
ref: A,
|
|
63
|
+
class: _(e.$attrs.class),
|
|
64
|
+
"data-cy": e.dataCy
|
|
63
65
|
}, [
|
|
64
66
|
j("span", {
|
|
65
67
|
id: `tablist-${p(i)}`,
|
|
66
68
|
class: "uikit-sr-only"
|
|
67
|
-
}, q(e.tabViewDescription), 9,
|
|
68
|
-
e.tabsPosition === "top" ? (
|
|
69
|
+
}, q(e.tabViewDescription), 9, R),
|
|
70
|
+
e.tabsPosition === "top" ? (l(), o(I, {
|
|
69
71
|
key: 0,
|
|
70
72
|
uid: p(i),
|
|
71
73
|
"tab-list-classes": e.tabListClasses
|
|
72
74
|
}, null, 8, ["uid", "tab-list-classes"])) : v("", !0),
|
|
73
|
-
(
|
|
75
|
+
(l(!0), k(G, null, H(n.value, (t, s) => (l(), o(O, {
|
|
74
76
|
id: F(s),
|
|
75
77
|
key: s,
|
|
76
78
|
"labelled-by": V(s) || "",
|
|
77
|
-
active:
|
|
78
|
-
class:
|
|
79
|
+
active: x(s),
|
|
80
|
+
class: _(t["tab-panel-classes"])
|
|
79
81
|
}, {
|
|
80
82
|
default: J(() => [
|
|
81
|
-
t.renderFn.children && t.renderFn.children.default ? (
|
|
83
|
+
t.renderFn.children && t.renderFn.children.default ? (l(), o(K(t.renderFn.children.default), { key: 0 })) : v("", !0)
|
|
82
84
|
]),
|
|
83
85
|
_: 2
|
|
84
86
|
}, 1032, ["id", "labelled-by", "active", "class"]))), 128)),
|
|
85
|
-
e.tabsPosition === "bottom" ? (
|
|
87
|
+
e.tabsPosition === "bottom" ? (l(), o(I, {
|
|
86
88
|
key: 1,
|
|
87
89
|
uid: p(i),
|
|
88
90
|
"tab-list-classes": e.tabListClasses
|
|
89
91
|
}, null, 8, ["uid", "tab-list-classes"])) : v("", !0)
|
|
90
|
-
],
|
|
92
|
+
], 10, Q));
|
|
91
93
|
}
|
|
92
94
|
});
|
|
93
95
|
export {
|
|
94
|
-
|
|
96
|
+
ee as _
|
|
95
97
|
};
|
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 u } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.C1NwpE7V.js";
|
|
8
8
|
import { _ } from "./chunks/BaseTab.vue_vue_type_script_setup_true_lang.Cu67jd8K.js";
|
|
9
|
-
import { _ as S } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.
|
|
9
|
+
import { _ as S } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.DjAQCt5a.js";
|
|
10
10
|
import { _ as g } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.CiJAhkRj.js";
|
|
11
11
|
import { _ as h } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.DdmSUyxZ.js";
|
|
12
12
|
import { _ as I } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.ClV6kObA.js";
|