@wikicasa-dev/components 2.0.32 → 2.0.33

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.
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.CmOknk6T.js";
1
+ import { _ as f } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.DTPN9Rg-.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -15,32 +15,32 @@ const U = ["data-cy"], W = ["id"], te = /* @__PURE__ */ S({
15
15
  }),
16
16
  emits: /* @__PURE__ */ C(["tabClicked"], ["update:activeIdx"]),
17
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) => ({
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, a) => ({
19
19
  renderFn: e,
20
- tabId: T(t),
21
- "active-tab-panel-idx": c(e)?.["active-tab-panel-idx"] ?? t,
20
+ tabId: T(a),
21
+ "active-tab-panel-idx": c(e)?.["active-tab-panel-idx"] ?? a,
22
22
  "header-title": c(e)?.["header-title"] || "",
23
23
  class: c(e)?.class || "",
24
24
  "tab-panel-classes": c(e)?.["tab-panel-classes"] || "",
25
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), []) : []);
26
+ }), n = G(() => m.default ? m.default().reduce((e, a) => (a.children && Array.isArray(a.children) ? a.children.forEach((t) => {
27
+ h(t) && e.push(y(t, e.length));
28
+ }) : h(a) && e.push(y(a, e.length)), e), []) : []);
29
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),
30
+ const F = (e = -1) => u.value === e, T = (e) => `base-tab-${e}-${r}`, V = (e = -1) => `base-tab-panel-${e}-${r}`, w = (e = -1) => {
31
+ const a = n.value.reduce(
32
+ (t, s, N) => (s["active-tab-panel-idx"] !== e || t.push({ tab: s, idx: N }), t),
33
33
  []
34
34
  );
35
- return t && t.length === 1 ? t[0].tab.tabId : t.find((a) => a.idx === l.value)?.tab.tabId;
35
+ return a && a.length === 1 ? a[0].tab.tabId : a.find((t) => t.idx === l.value)?.tab.tabId;
36
36
  }, D = (e) => {
37
37
  $.value = T(e);
38
38
  }, L = (e) => {
39
- const t = n.value.at(e ?? -1);
40
- u.value = t?.["active-tab-panel-idx"] ?? null;
39
+ const a = n.value.at(e ?? -1);
40
+ u.value = a?.["active-tab-panel-idx"] ?? null;
41
41
  };
42
- v("handleClick", (e, t) => {
43
- D(e), l.value = e, B("tabClicked", { tabIdx: e, tabElement: t });
42
+ v("handleClick", (e, a) => {
43
+ D(e), l.value = e, B("tabClicked", { tabIdx: e, tabElement: a });
44
44
  }), k(
45
45
  l,
46
46
  (e) => {
@@ -50,20 +50,20 @@ const U = ["data-cy"], W = ["id"], te = /* @__PURE__ */ S({
50
50
  immediate: !0
51
51
  }
52
52
  );
53
- const E = (e, t) => {
54
- for (let a = 0; a < e.length; a++)
55
- if (e[a] !== t[a]) return a;
53
+ const E = (e, a) => {
54
+ for (let t = 0; t < e.length; t++)
55
+ if (e[t] !== a[t]) return t;
56
56
  return null;
57
- }, M = (e) => n.value.find((t) => t["active-tab-panel-idx"] === e);
57
+ }, M = (e = -1) => n.value.find((a) => a["active-tab-panel-idx"] === e);
58
58
  return k(
59
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);
60
+ (e, a) => {
61
+ const t = E(e, a);
62
+ if (t === null) return;
63
+ const s = n.value[t]["active-tab-panel-idx"];
64
+ l.value !== t || s === void 0 || (u.value = s);
65
65
  }
66
- ), (e, t) => (i(), p("div", {
66
+ ), (e, a) => (i(), p("div", {
67
67
  ref_key: "root",
68
68
  ref: A,
69
69
  class: I(e.$attrs.class),
@@ -78,16 +78,16 @@ const U = ["data-cy"], W = ["id"], te = /* @__PURE__ */ S({
78
78
  uid: f(r),
79
79
  "tab-list-classes": e.tabListClasses
80
80
  }, null, 8, ["uid", "tab-list-classes"])) : o("", !0),
81
- (i(!0), p(_, null, K(n.value, (a, s) => (i(), p(_, { key: s }, [
81
+ (i(!0), p(_, null, K(n.value, (t, s) => (i(), p(_, { key: s }, [
82
82
  M(s) ? (i(), d(R, {
83
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"])
84
+ id: V(t["active-tab-panel-idx"]),
85
+ "labelled-by": w(s) ?? "",
86
+ active: F(s),
87
+ class: I(t["tab-panel-classes"])
88
88
  }, {
89
89
  default: O(() => [
90
- a.renderFn.children && a.renderFn.children.default ? (i(), d(Q(a.renderFn.children.default), { key: 0 })) : o("", !0)
90
+ t.renderFn.children && t.renderFn.children.default ? (i(), d(Q(t.renderFn.children.default), { key: 0 })) : o("", !0)
91
91
  ]),
92
92
  _: 2
93
93
  }, 1032, ["id", "labelled-by", "active", "class"])) : o("", !0)
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.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.CmOknk6T.js";
9
+ import { _ as S } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.DTPN9Rg-.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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.0.32",
3
+ "version": "2.0.33",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",