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