@wikicasa-dev/components 1.7.20 → 1.7.22
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,94 @@
|
|
|
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
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import SelectItem from './UIKit/BaseSelect/SelectItem.vue';
|
|
|
6
6
|
import CheckboxBtn from './UIKit/Checkbox/CheckboxBtn.vue';
|
|
7
7
|
import CheckboxGroup from './UIKit/Checkbox/CheckboxGroup.vue';
|
|
8
8
|
import BaseTab from './UIKit/Tab/BaseTab.vue';
|
|
9
|
-
import
|
|
9
|
+
import BaseTabView from './UIKit/Tab/BaseTabView.vue';
|
|
10
10
|
import RadioButton from './UIKit/Radio/RadioButton.vue';
|
|
11
11
|
import RadioGroup from './UIKit/Radio/RadioGroup.vue';
|
|
12
12
|
import AccessibleSelect from './UIKit/AccessibleSelect.vue';
|
|
@@ -38,4 +38,4 @@ import SwiperCarousel from './components/carousel/SwiperCarousel.vue';
|
|
|
38
38
|
import SwiperSlide from './components/carousel/SwiperSlide.vue';
|
|
39
39
|
import { useValidator } from './composables/useValidator';
|
|
40
40
|
export type { ChartOptions, ChartData } from "chart.js";
|
|
41
|
-
export { DoughnutChart, LineChart, BaseAccordion, BaseAccordionBtn, BaseAccordionContent, BaseAccordionItem, SelectItem, BaseAlert, BaseAutocomplete, BaseBadge, BaseButton, AccessibleSelect, BaseComplexToggle, BaseDropDown, BaseFloatingLabel, BaseCard, BaseIcon, BaseInput, BaseNavItem, BasePagination, BasePaper, BaseSlider, BaseTab, BaseTextarea, BaseToggle, BaseTooltip, BaseUploadFile, CheckboxBtn, CheckboxGroup, RadioButton, RadioGroup, SwiperCarousel, SwiperSlide, IntersectionObservable, IntersectionObserver, useValidator, BaseModal, BaseSnackbar,
|
|
41
|
+
export { DoughnutChart, LineChart, BaseAccordion, BaseAccordionBtn, BaseAccordionContent, BaseAccordionItem, SelectItem, BaseAlert, BaseAutocomplete, BaseBadge, BaseButton, AccessibleSelect, BaseComplexToggle, BaseDropDown, BaseFloatingLabel, BaseCard, BaseIcon, BaseInput, BaseNavItem, BasePagination, BasePaper, BaseSlider, BaseTab, BaseTextarea, BaseToggle, BaseTooltip, BaseUploadFile, CheckboxBtn, CheckboxGroup, RadioButton, RadioGroup, SwiperCarousel, SwiperSlide, IntersectionObservable, IntersectionObserver, useValidator, BaseModal, BaseSnackbar, BaseTabView, };
|
package/dist/index.js
CHANGED
|
@@ -7,17 +7,17 @@ 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.DRECN-Oz.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";
|
|
14
|
-
import { _ as
|
|
15
|
-
import { _ as
|
|
16
|
-
import { _ as
|
|
17
|
-
import { _ as
|
|
14
|
+
import { _ as w } from "./chunks/BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js";
|
|
15
|
+
import { _ as v } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.DyNyXytE.js";
|
|
16
|
+
import { _ as F } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
|
|
17
|
+
import { _ as L } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BwONsejV.js";
|
|
18
18
|
import { _ as P } from "./chunks/BaseCard.vue_vue_type_style_index_0_lang.w5aEohzG.js";
|
|
19
|
-
import { default as
|
|
20
|
-
import { _ as
|
|
19
|
+
import { default as V } from "./BaseComplexToggle.js";
|
|
20
|
+
import { _ as N } from "./chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.BRcL69nu.js";
|
|
21
21
|
import { default as j } from "./BaseFloatingLabel.js";
|
|
22
22
|
import { default as y } from "./BaseIcon.js";
|
|
23
23
|
import { default as E } from "./BaseInput.js";
|
|
@@ -44,13 +44,13 @@ export {
|
|
|
44
44
|
t as BaseAccordionBtn,
|
|
45
45
|
f as BaseAccordionContent,
|
|
46
46
|
m as BaseAccordionItem,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
w as BaseAlert,
|
|
48
|
+
v as BaseAutocomplete,
|
|
49
|
+
F as BaseBadge,
|
|
50
|
+
L as BaseButton,
|
|
51
51
|
P as BaseCard,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
V as BaseComplexToggle,
|
|
53
|
+
N as BaseDropDown,
|
|
54
54
|
j as BaseFloatingLabel,
|
|
55
55
|
y as BaseIcon,
|
|
56
56
|
E as BaseInput,
|
|
@@ -61,7 +61,7 @@ export {
|
|
|
61
61
|
Z as BaseSlider,
|
|
62
62
|
le as BaseSnackbar,
|
|
63
63
|
i as BaseTab,
|
|
64
|
-
b as
|
|
64
|
+
b as BaseTabView,
|
|
65
65
|
ee as BaseTextarea,
|
|
66
66
|
ae as BaseToggle,
|
|
67
67
|
te as BaseTooltip,
|
package/package.json
CHANGED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { defineComponent as E, mergeModels as L, useModel as N, ref as o, onMounted as U, useSlots as z, computed as R, watch as j, withDirectives as q, openBlock as r, createElementBlock as s, normalizeClass as v, createElementVNode as _, toDisplayString as g, Fragment as T, renderList as I, createBlock as p, resolveDynamicComponent as $, createCommentVNode as C, 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(F) {
|
|
16
|
-
const c = N(F, "activeIdx"), w = o(""), h = o(null), B = o(null), i = o("");
|
|
17
|
-
U(() => {
|
|
18
|
-
i.value = J();
|
|
19
|
-
});
|
|
20
|
-
const m = z(), d = (e) => e.props ?? null, f = (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
|
-
}), l = R(() => m.default ? m.default().reduce((e, t) => (t.children && Array.isArray(t.children) ? t.children.forEach((a) => {
|
|
27
|
-
f(a) && e.push(k(a, e.length));
|
|
28
|
-
}) : f(t) && e.push(k(t, e.length)), e), []) : []), u = (e) => c.value === e, D = (e) => h.value === e, b = (e) => `base-tab-${e}-${i.value}`, P = (e) => `base-tab-panel-${e}-${i.value}`, A = (e) => l.value.find((t) => t["active-tab-panel-idx"] === e)?.tabId, S = (e) => {
|
|
29
|
-
w.value = b(e);
|
|
30
|
-
}, V = (e) => {
|
|
31
|
-
const t = l.value.at(e ?? -1);
|
|
32
|
-
h.value = t?.["active-tab-panel-idx"] ?? null;
|
|
33
|
-
}, M = (e) => {
|
|
34
|
-
S(e), c.value = e;
|
|
35
|
-
};
|
|
36
|
-
j(
|
|
37
|
-
c,
|
|
38
|
-
(e) => {
|
|
39
|
-
V(e ?? -1);
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
immediate: !0
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
const y = () => Date.now().toString(36) + Math.random().toString(36).substring(2), x = {
|
|
46
|
-
created(e) {
|
|
47
|
-
console.log("v-uid:directive", e.id), e.setAttribute("id", e.id || y());
|
|
48
|
-
},
|
|
49
|
-
getSSRProps() {
|
|
50
|
-
return {
|
|
51
|
-
id: y()
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
return (e, t) => q((r(), s("div", {
|
|
56
|
-
ref_key: "root",
|
|
57
|
-
ref: B,
|
|
58
|
-
class: v(e.$attrs.class)
|
|
59
|
-
}, [
|
|
60
|
-
_("span", {
|
|
61
|
-
id: `tablist-${i.value}`,
|
|
62
|
-
class: "uikit-sr-only"
|
|
63
|
-
}, g(e.tabViewDescription), 9, K),
|
|
64
|
-
_("div", {
|
|
65
|
-
role: "tablist",
|
|
66
|
-
"aria-labelledby": `tablist-${i.value}`,
|
|
67
|
-
class: v(e.tabListClasses)
|
|
68
|
-
}, [
|
|
69
|
-
(r(!0), s(T, null, I(l.value, (a, n) => (r(), s("button", {
|
|
70
|
-
key: n,
|
|
71
|
-
id: b(n),
|
|
72
|
-
type: "button",
|
|
73
|
-
role: "tab",
|
|
74
|
-
"aria-selected": u(n),
|
|
75
|
-
"aria-controls": `base-tab-panel-${n}-${i.value}`,
|
|
76
|
-
tabindex: u(n) ? void 0 : -1,
|
|
77
|
-
class: v([
|
|
78
|
-
"uikit-bg-transparent uikit-p-5px",
|
|
79
|
-
{
|
|
80
|
-
"uikit-border-b-2 uikit-border-solid uikit-border-w-primary uikit-font-semibold": u(n)
|
|
81
|
-
},
|
|
82
|
-
a.class
|
|
83
|
-
]),
|
|
84
|
-
onClick: (X) => M(n)
|
|
85
|
-
}, [
|
|
86
|
-
a["header-title"] ? (r(), s("span", W, g(a["header-title"]), 1)) : a.renderFn.children && a.renderFn.children.header ? (r(), p($(a.renderFn.children.header), { key: 1 })) : C("", !0)
|
|
87
|
-
], 10, Q))), 128))
|
|
88
|
-
], 10, O),
|
|
89
|
-
(r(!0), s(T, null, I(l.value, (a, n) => (r(), p(H, {
|
|
90
|
-
key: n,
|
|
91
|
-
id: P(n),
|
|
92
|
-
"labelled-by": A(n) || "",
|
|
93
|
-
active: D(n)
|
|
94
|
-
}, {
|
|
95
|
-
default: G(() => [
|
|
96
|
-
a.renderFn.children && a.renderFn.children.default ? (r(), p($(a.renderFn.children.default), { key: 0 })) : C("", !0)
|
|
97
|
-
]),
|
|
98
|
-
_: 2
|
|
99
|
-
}, 1032, ["id", "labelled-by", "active"]))), 128))
|
|
100
|
-
], 2)), [
|
|
101
|
-
[x]
|
|
102
|
-
]);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
export {
|
|
106
|
-
te as _
|
|
107
|
-
};
|