@wikicasa-dev/components 2.0.30 → 2.0.32
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/BaseAutocomplete.js +1 -1
- package/dist/BaseTabView.js +1 -1
- package/dist/chunks/{BaseAutocomplete.vue_vue_type_script_setup_true_lang.o0AMunVa.js → BaseAutocomplete.vue_vue_type_script_setup_true_lang.DI5YPfeQ.js} +7 -7
- package/dist/chunks/BaseTabView.vue_vue_type_script_setup_true_lang.CmOknk6T.js +105 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/BaseTabView.vue_vue_type_script_setup_true_lang.DjAQCt5a.js +0 -97
package/dist/BaseAutocomplete.js
CHANGED
package/dist/BaseTabView.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as T, mergeModels as
|
|
1
|
+
import { defineComponent as T, mergeModels as $, useModel as L, ref as r, computed as k, onBeforeMount as F, watch as f, openBlock as C, createBlock as S, normalizeClass as H, withCtx as s, createVNode as z, renderSlot as V, createElementBlock as A, Fragment as K, renderList as N, unref as U, createElementVNode as W } from "vue";
|
|
2
2
|
import j from "../BaseInput.js";
|
|
3
3
|
import { _ as q } from "./BaseDropDown.vue_vue_type_script_setup_true_lang.BscSQ5bW.js";
|
|
4
4
|
import "./types-B0dZ7OiV.D29wNgoj.js";
|
|
@@ -18,7 +18,7 @@ function Q(t, p) {
|
|
|
18
18
|
}
|
|
19
19
|
const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
20
20
|
__name: "BaseAutocomplete",
|
|
21
|
-
props: /* @__PURE__ */
|
|
21
|
+
props: /* @__PURE__ */ $({
|
|
22
22
|
isValid: { default: null },
|
|
23
23
|
theme: { default: "" },
|
|
24
24
|
label: { default: "" },
|
|
@@ -40,7 +40,7 @@ const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
40
40
|
},
|
|
41
41
|
modelModifiers: {}
|
|
42
42
|
}),
|
|
43
|
-
emits: /* @__PURE__ */
|
|
43
|
+
emits: /* @__PURE__ */ $(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
|
|
44
44
|
setup(t, { expose: p, emit: v }) {
|
|
45
45
|
const d = L(
|
|
46
46
|
t,
|
|
@@ -95,7 +95,7 @@ const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
95
95
|
}
|
|
96
96
|
t.disableCb || (n.value = await m.value(e), o.value = !!n.value.length);
|
|
97
97
|
}
|
|
98
|
-
},
|
|
98
|
+
}, g = (e, l) => {
|
|
99
99
|
t.onOptionSelectedCb && t.onOptionSelectedCb(e), t.cleanupOnClose && (n.value = []), c.value = !0, i.value = e.label, d.value = e, o.value = !1, w.value = l;
|
|
100
100
|
}, D = () => {
|
|
101
101
|
n.value.length && t.keepState !== "closed" && (o.value = !0);
|
|
@@ -109,7 +109,7 @@ const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
109
109
|
), f(w, (e) => {
|
|
110
110
|
if (e === -1 || !n.value.length) return;
|
|
111
111
|
const l = n.value[e];
|
|
112
|
-
c.value && l.label === d.value?.label ||
|
|
112
|
+
c.value && l.label === d.value?.label || g(l, e);
|
|
113
113
|
}), f(
|
|
114
114
|
() => t.keepState,
|
|
115
115
|
(e) => {
|
|
@@ -123,7 +123,7 @@ const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
123
123
|
}
|
|
124
124
|
}), (e, l) => (C(), S(q, {
|
|
125
125
|
class: H(e.$attrs["root-classes"]),
|
|
126
|
-
"data-cy": e.dataCy ?
|
|
126
|
+
"data-cy": e.dataCy ? e.dataCy : `ac_${e.$attrs.id}`,
|
|
127
127
|
"dropdown-element": "ul",
|
|
128
128
|
"dropdown-classes": [
|
|
129
129
|
{ "bordered-dropdown": e.theme === "bordered" },
|
|
@@ -182,7 +182,7 @@ const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
182
182
|
key: b,
|
|
183
183
|
active: U(h) === b,
|
|
184
184
|
class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
|
|
185
|
-
onClick: (E) =>
|
|
185
|
+
onClick: (E) => g(a, b),
|
|
186
186
|
onMouseover: (E) => h.value = b
|
|
187
187
|
}, {
|
|
188
188
|
default: s(() => [
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { defineComponent as S, mergeModels as C, useModel as z, ref as b, useId as j, useSlots as q, computed as G, provide as v, watch as k, openBlock as i, createElementBlock as p, normalizeClass as I, createElementVNode as H, unref as f, toDisplayString as J, createBlock as d, createCommentVNode as o, Fragment as _, renderList as K, withCtx as O, resolveDynamicComponent as Q } from "vue";
|
|
2
|
+
import { _ as R } from "./BaseTabPanel.vue_vue_type_script_setup_true_lang.DoZHWHt1.js";
|
|
3
|
+
import { _ as g } from "./BaseTabList.vue_vue_type_script_setup_true_lang.CohlLou1.js";
|
|
4
|
+
const U = ["data-cy"], W = ["id"], te = /* @__PURE__ */ S({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "BaseTabView",
|
|
7
|
+
props: /* @__PURE__ */ C({
|
|
8
|
+
tabsPosition: { default: "top" },
|
|
9
|
+
tabViewDescription: {},
|
|
10
|
+
tabListClasses: {},
|
|
11
|
+
dataCy: {}
|
|
12
|
+
}, {
|
|
13
|
+
activeIdx: { default: 0 },
|
|
14
|
+
activeIdxModifiers: {}
|
|
15
|
+
}),
|
|
16
|
+
emits: /* @__PURE__ */ C(["tabClicked"], ["update:activeIdx"]),
|
|
17
|
+
setup(P, { emit: x }) {
|
|
18
|
+
const B = x, l = z(P, "activeIdx"), $ = b(""), u = b(null), A = b(null), r = j(), m = q(), c = (e) => e.props ?? null, h = (e) => e.type.__name === "BaseTab", y = (e, t) => ({
|
|
19
|
+
renderFn: e,
|
|
20
|
+
tabId: T(t),
|
|
21
|
+
"active-tab-panel-idx": c(e)?.["active-tab-panel-idx"] ?? t,
|
|
22
|
+
"header-title": c(e)?.["header-title"] || "",
|
|
23
|
+
class: c(e)?.class || "",
|
|
24
|
+
"tab-panel-classes": c(e)?.["tab-panel-classes"] || "",
|
|
25
|
+
"data-cy": c(e)?.["data-cy"] || ""
|
|
26
|
+
}), n = G(() => m.default ? m.default().reduce((e, t) => (t.children && Array.isArray(t.children) ? t.children.forEach((a) => {
|
|
27
|
+
h(a) && e.push(y(a, e.length));
|
|
28
|
+
}) : h(t) && e.push(y(t, e.length)), e), []) : []);
|
|
29
|
+
v("tabs", n), v("isTabActive", (e) => l.value === e);
|
|
30
|
+
const F = (e = -1) => u.value === e, T = (e) => `base-tab-${e}-${r}`, V = (e) => `base-tab-panel-${e}-${r}`, w = (e = -1) => {
|
|
31
|
+
const t = n.value.reduce(
|
|
32
|
+
(a, s, N) => (s["active-tab-panel-idx"] !== e || a.push({ tab: s, idx: N }), a),
|
|
33
|
+
[]
|
|
34
|
+
);
|
|
35
|
+
return t && t.length === 1 ? t[0].tab.tabId : t.find((a) => a.idx === l.value)?.tab.tabId;
|
|
36
|
+
}, D = (e) => {
|
|
37
|
+
$.value = T(e);
|
|
38
|
+
}, L = (e) => {
|
|
39
|
+
const t = n.value.at(e ?? -1);
|
|
40
|
+
u.value = t?.["active-tab-panel-idx"] ?? null;
|
|
41
|
+
};
|
|
42
|
+
v("handleClick", (e, t) => {
|
|
43
|
+
D(e), l.value = e, B("tabClicked", { tabIdx: e, tabElement: t });
|
|
44
|
+
}), k(
|
|
45
|
+
l,
|
|
46
|
+
(e) => {
|
|
47
|
+
L(e ?? -1);
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
immediate: !0
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
const E = (e, t) => {
|
|
54
|
+
for (let a = 0; a < e.length; a++)
|
|
55
|
+
if (e[a] !== t[a]) return a;
|
|
56
|
+
return null;
|
|
57
|
+
}, M = (e) => n.value.find((t) => t["active-tab-panel-idx"] === e);
|
|
58
|
+
return k(
|
|
59
|
+
() => n.value.map((e) => e["active-tab-panel-idx"]),
|
|
60
|
+
(e, t) => {
|
|
61
|
+
const a = E(e, t);
|
|
62
|
+
if (a === null) return;
|
|
63
|
+
const s = n.value[a]["active-tab-panel-idx"];
|
|
64
|
+
l.value !== a || s === void 0 || (u.value = s);
|
|
65
|
+
}
|
|
66
|
+
), (e, t) => (i(), p("div", {
|
|
67
|
+
ref_key: "root",
|
|
68
|
+
ref: A,
|
|
69
|
+
class: I(e.$attrs.class),
|
|
70
|
+
"data-cy": e.dataCy
|
|
71
|
+
}, [
|
|
72
|
+
H("span", {
|
|
73
|
+
id: `tablist-${f(r)}`,
|
|
74
|
+
class: "uikit-sr-only"
|
|
75
|
+
}, J(e.tabViewDescription), 9, W),
|
|
76
|
+
e.tabsPosition === "top" ? (i(), d(g, {
|
|
77
|
+
key: 0,
|
|
78
|
+
uid: f(r),
|
|
79
|
+
"tab-list-classes": e.tabListClasses
|
|
80
|
+
}, null, 8, ["uid", "tab-list-classes"])) : o("", !0),
|
|
81
|
+
(i(!0), p(_, null, K(n.value, (a, s) => (i(), p(_, { key: s }, [
|
|
82
|
+
M(s) ? (i(), d(R, {
|
|
83
|
+
key: 0,
|
|
84
|
+
id: V(s),
|
|
85
|
+
"labelled-by": w(a["active-tab-panel-idx"]) || "",
|
|
86
|
+
active: F(a["active-tab-panel-idx"]),
|
|
87
|
+
class: I(a["tab-panel-classes"])
|
|
88
|
+
}, {
|
|
89
|
+
default: O(() => [
|
|
90
|
+
a.renderFn.children && a.renderFn.children.default ? (i(), d(Q(a.renderFn.children.default), { key: 0 })) : o("", !0)
|
|
91
|
+
]),
|
|
92
|
+
_: 2
|
|
93
|
+
}, 1032, ["id", "labelled-by", "active", "class"])) : o("", !0)
|
|
94
|
+
], 64))), 128)),
|
|
95
|
+
e.tabsPosition === "bottom" ? (i(), d(g, {
|
|
96
|
+
key: 1,
|
|
97
|
+
uid: f(r),
|
|
98
|
+
"tab-list-classes": e.tabListClasses
|
|
99
|
+
}, null, 8, ["uid", "tab-list-classes"])) : o("", !0)
|
|
100
|
+
], 10, U));
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
export {
|
|
104
|
+
te as _
|
|
105
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -6,12 +6,12 @@ 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.Cf8YnCGf.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.CmOknk6T.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";
|
|
13
13
|
import { _ as w } from "./chunks/BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js";
|
|
14
|
-
import { _ as k } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.
|
|
14
|
+
import { _ as k } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.DI5YPfeQ.js";
|
|
15
15
|
import { _ as v } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
|
|
16
16
|
import { _ as G } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BWZPE2Gf.js";
|
|
17
17
|
import { default as O } from "./BaseCard.js";
|
package/package.json
CHANGED
|
@@ -1,97 +0,0 @@
|
|
|
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
|
-
import { _ as O } from "./BaseTabPanel.vue_vue_type_script_setup_true_lang.DoZHWHt1.js";
|
|
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
|
-
inheritAttrs: !1,
|
|
6
|
-
__name: "BaseTabView",
|
|
7
|
-
props: /* @__PURE__ */ T({
|
|
8
|
-
tabsPosition: { default: "top" },
|
|
9
|
-
tabViewDescription: {},
|
|
10
|
-
tabListClasses: {},
|
|
11
|
-
dataCy: {}
|
|
12
|
-
}, {
|
|
13
|
-
activeIdx: { default: 0 },
|
|
14
|
-
activeIdxModifiers: {}
|
|
15
|
-
}),
|
|
16
|
-
emits: /* @__PURE__ */ T(["tabClicked"], ["update:activeIdx"]),
|
|
17
|
-
setup(g, { emit: P }) {
|
|
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) => ({
|
|
19
|
-
renderFn: e,
|
|
20
|
-
tabId: y(a),
|
|
21
|
-
"active-tab-panel-idx": c(e)?.["active-tab-panel-idx"] ?? a,
|
|
22
|
-
"header-title": c(e)?.["header-title"] || "",
|
|
23
|
-
class: c(e)?.class || "",
|
|
24
|
-
"tab-panel-classes": c(e)?.["tab-panel-classes"] || "",
|
|
25
|
-
"data-cy": c(e)?.["data-cy"] || ""
|
|
26
|
-
}), n = z(() => f.default ? f.default().reduce((e, a) => (a.children && Array.isArray(a.children) ? a.children.forEach((t) => {
|
|
27
|
-
m(t) && e.push(h(t, e.length));
|
|
28
|
-
}) : m(a) && e.push(h(a, e.length)), e), []) : []);
|
|
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);
|
|
32
|
-
}, D = (e) => {
|
|
33
|
-
const a = n.value.at(e ?? -1);
|
|
34
|
-
d.value = a?.["active-tab-panel-idx"] ?? null;
|
|
35
|
-
};
|
|
36
|
-
b("handleClick", (e, a) => {
|
|
37
|
-
w(e), r.value = e, B("tabClicked", { tabIdx: e, tabElement: a });
|
|
38
|
-
}), C(
|
|
39
|
-
r,
|
|
40
|
-
(e) => {
|
|
41
|
-
D(e ?? -1);
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
immediate: !0
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
const L = (e, a) => {
|
|
48
|
-
for (let t = 0; t < e.length; t++)
|
|
49
|
-
if (e[t] !== a[t]) return t;
|
|
50
|
-
return null;
|
|
51
|
-
};
|
|
52
|
-
return C(
|
|
53
|
-
() => n.value.map((e) => e["active-tab-panel-idx"]),
|
|
54
|
-
(e, a) => {
|
|
55
|
-
const t = L(e, a);
|
|
56
|
-
if (t === null) return;
|
|
57
|
-
const s = n.value[t]["active-tab-panel-idx"];
|
|
58
|
-
r.value !== t || s === void 0 || (d.value = s);
|
|
59
|
-
}
|
|
60
|
-
), (e, a) => (l(), k("div", {
|
|
61
|
-
ref_key: "root",
|
|
62
|
-
ref: A,
|
|
63
|
-
class: _(e.$attrs.class),
|
|
64
|
-
"data-cy": e.dataCy
|
|
65
|
-
}, [
|
|
66
|
-
j("span", {
|
|
67
|
-
id: `tablist-${p(i)}`,
|
|
68
|
-
class: "uikit-sr-only"
|
|
69
|
-
}, q(e.tabViewDescription), 9, R),
|
|
70
|
-
e.tabsPosition === "top" ? (l(), o(I, {
|
|
71
|
-
key: 0,
|
|
72
|
-
uid: p(i),
|
|
73
|
-
"tab-list-classes": e.tabListClasses
|
|
74
|
-
}, null, 8, ["uid", "tab-list-classes"])) : v("", !0),
|
|
75
|
-
(l(!0), k(G, null, H(n.value, (t, s) => (l(), o(O, {
|
|
76
|
-
id: F(s),
|
|
77
|
-
key: s,
|
|
78
|
-
"labelled-by": V(s) || "",
|
|
79
|
-
active: x(s),
|
|
80
|
-
class: _(t["tab-panel-classes"])
|
|
81
|
-
}, {
|
|
82
|
-
default: J(() => [
|
|
83
|
-
t.renderFn.children && t.renderFn.children.default ? (l(), o(K(t.renderFn.children.default), { key: 0 })) : v("", !0)
|
|
84
|
-
]),
|
|
85
|
-
_: 2
|
|
86
|
-
}, 1032, ["id", "labelled-by", "active", "class"]))), 128)),
|
|
87
|
-
e.tabsPosition === "bottom" ? (l(), o(I, {
|
|
88
|
-
key: 1,
|
|
89
|
-
uid: p(i),
|
|
90
|
-
"tab-list-classes": e.tabListClasses
|
|
91
|
-
}, null, 8, ["uid", "tab-list-classes"])) : v("", !0)
|
|
92
|
-
], 10, Q));
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
export {
|
|
96
|
-
ee as _
|
|
97
|
-
};
|