@wikicasa-dev/components 1.9.19 → 1.9.20

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.DSlvTOkB.js";
1
+ import { _ as f } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.RbxW2M0Y.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -14,7 +14,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
14
14
  type: import('vue').PropType<string>;
15
15
  required: true;
16
16
  };
17
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
17
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ tabClicked: (args_0: {
19
+ tabIdx: number;
20
+ }) => void;
21
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
18
22
  activeIdx: import('vue').PropType<number | undefined>;
19
23
  tabListClasses: {
20
24
  type: import('vue').PropType<ClassType>;
@@ -28,7 +32,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
28
32
  type: import('vue').PropType<string>;
29
33
  required: true;
30
34
  };
31
- }>> & Readonly<{}>, {
35
+ }>> & Readonly<{
36
+ onTabClicked?: ((args_0: {
37
+ tabIdx: number;
38
+ }) => any) | undefined;
39
+ }>, {
32
40
  tabListClasses: ClassType;
33
41
  tabsPosition: "top" | "bottom";
34
42
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1,11 +1,11 @@
1
- import { defineComponent as F, mergeModels as V, useModel as w, ref as r, onMounted as D, useSlots as L, computed as M, provide as u, watch as x, openBlock as l, createElementBlock as T, normalizeClass as y, createElementVNode as E, toDisplayString as N, createBlock as c, createCommentVNode as b, Fragment as S, renderList as z, withCtx as U, resolveDynamicComponent as j } from "vue";
2
- import { _ as q } from "./BaseTabPanel.vue_vue_type_script_setup_true_lang.DoZHWHt1.js";
3
- import { _ } from "./BaseTabList.vue_vue_type_script_setup_true_lang.BEX0zH-7.js";
4
- import { getUID as G } from "../utils.js";
5
- const H = ["id"], X = /* @__PURE__ */ F({
1
+ import { defineComponent as D, mergeModels as T, useModel as L, ref as c, onMounted as M, useSlots as E, computed as N, provide as u, watch as x, openBlock as l, createElementBlock as k, normalizeClass as y, createElementVNode as S, toDisplayString as z, createBlock as r, createCommentVNode as b, Fragment as U, renderList as j, withCtx as q, resolveDynamicComponent as G } from "vue";
2
+ import { _ as H } from "./BaseTabPanel.vue_vue_type_script_setup_true_lang.DoZHWHt1.js";
3
+ import { _ as C } from "./BaseTabList.vue_vue_type_script_setup_true_lang.BEX0zH-7.js";
4
+ import { getUID as J } from "../utils.js";
5
+ const K = ["id"], Z = /* @__PURE__ */ D({
6
6
  inheritAttrs: !1,
7
7
  __name: "BaseTabView",
8
- props: /* @__PURE__ */ V({
8
+ props: /* @__PURE__ */ T({
9
9
  tabsPosition: { default: "top" },
10
10
  tabViewDescription: {},
11
11
  tabListClasses: { default: "" }
@@ -13,66 +13,66 @@ const H = ["id"], X = /* @__PURE__ */ F({
13
13
  activeIdx: { default: 0 },
14
14
  activeIdxModifiers: {}
15
15
  }),
16
- emits: ["update:activeIdx"],
17
- setup(k) {
18
- const d = w(k, "activeIdx"), C = r(""), v = r(null), I = r(null), s = r("");
19
- D(() => {
20
- s.value = G();
16
+ emits: /* @__PURE__ */ T(["tabClicked"], ["update:activeIdx"]),
17
+ setup(_, { emit: I }) {
18
+ const g = I, d = L(_, "activeIdx"), P = c(""), v = c(null), B = c(null), s = c("");
19
+ M(() => {
20
+ s.value = J();
21
21
  });
22
- const p = L(), i = (e) => e.props ?? null, m = (e) => e.type.__name === "BaseTab", f = (e, a) => ({
22
+ const p = E(), i = (e) => e.props ?? null, m = (e) => e.type.__name === "BaseTab", f = (e, a) => ({
23
23
  renderFn: e,
24
24
  tabId: h(a),
25
25
  "active-tab-panel-idx": i(e)?.["active-tab-panel-idx"] ?? a,
26
26
  "header-title": i(e)?.["header-title"] || "",
27
27
  class: i(e)?.class || "",
28
28
  "tab-panel-classes": i(e)?.["tab-panel-classes"] || ""
29
- }), n = M(() => p.default ? p.default().reduce((e, a) => (a.children && Array.isArray(a.children) ? a.children.forEach((t) => {
29
+ }), n = N(() => p.default ? p.default().reduce((e, a) => (a.children && Array.isArray(a.children) ? a.children.forEach((t) => {
30
30
  m(t) && e.push(f(t, e.length));
31
31
  }) : m(a) && e.push(f(a, e.length)), e), []) : []);
32
32
  u("tabs", n), u("isTabActive", (e) => d.value === e);
33
- const g = (e) => v.value === e, h = (e) => `base-tab-${e}-${s.value}`, P = (e) => `base-tab-panel-${e}-${s.value}`, B = (e) => n.value.find((a) => a["active-tab-panel-idx"] === e)?.tabId, $ = (e) => {
34
- C.value = h(e);
35
- }, A = (e) => {
33
+ const $ = (e) => v.value === e, h = (e) => `base-tab-${e}-${s.value}`, A = (e) => `base-tab-panel-${e}-${s.value}`, F = (e) => n.value.find((a) => a["active-tab-panel-idx"] === e)?.tabId, V = (e) => {
34
+ P.value = h(e);
35
+ }, w = (e) => {
36
36
  const a = n.value.at(e ?? -1);
37
37
  v.value = a?.["active-tab-panel-idx"] ?? null;
38
38
  };
39
39
  return u("handleClick", (e) => {
40
- $(e), d.value = e;
40
+ V(e), d.value = e, g("tabClicked", { tabIdx: e });
41
41
  }), x(
42
42
  d,
43
43
  (e) => {
44
- A(e ?? -1);
44
+ w(e ?? -1);
45
45
  },
46
46
  {
47
47
  immediate: !0
48
48
  }
49
- ), (e, a) => (l(), T("div", {
49
+ ), (e, a) => (l(), k("div", {
50
50
  ref_key: "root",
51
- ref: I,
51
+ ref: B,
52
52
  class: y(e.$attrs.class)
53
53
  }, [
54
- E("span", {
54
+ S("span", {
55
55
  id: `tablist-${s.value}`,
56
56
  class: "uikit-sr-only"
57
- }, N(e.tabViewDescription), 9, H),
58
- e.tabsPosition === "top" ? (l(), c(_, {
57
+ }, z(e.tabViewDescription), 9, K),
58
+ e.tabsPosition === "top" ? (l(), r(C, {
59
59
  key: 0,
60
60
  uid: s.value,
61
61
  "tab-list-classes": e.tabListClasses
62
62
  }, null, 8, ["uid", "tab-list-classes"])) : b("", !0),
63
- (l(!0), T(S, null, z(n.value, (t, o) => (l(), c(q, {
63
+ (l(!0), k(U, null, j(n.value, (t, o) => (l(), r(H, {
64
64
  key: o,
65
- id: P(o),
66
- "labelled-by": B(o) || "",
67
- active: g(o),
65
+ id: A(o),
66
+ "labelled-by": F(o) || "",
67
+ active: $(o),
68
68
  class: y(t["tab-panel-classes"])
69
69
  }, {
70
- default: U(() => [
71
- t.renderFn.children && t.renderFn.children.default ? (l(), c(j(t.renderFn.children.default), { key: 0 })) : b("", !0)
70
+ default: q(() => [
71
+ t.renderFn.children && t.renderFn.children.default ? (l(), r(G(t.renderFn.children.default), { key: 0 })) : b("", !0)
72
72
  ]),
73
73
  _: 2
74
74
  }, 1032, ["id", "labelled-by", "active", "class"]))), 128)),
75
- e.tabsPosition === "bottom" ? (l(), c(_, {
75
+ e.tabsPosition === "bottom" ? (l(), r(C, {
76
76
  key: 1,
77
77
  uid: s.value,
78
78
  "tab-list-classes": e.tabListClasses
@@ -81,5 +81,5 @@ const H = ["id"], X = /* @__PURE__ */ F({
81
81
  }
82
82
  });
83
83
  export {
84
- X as _
84
+ Z as _
85
85
  };
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 i } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.hSeL05pn.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.DSlvTOkB.js";
9
+ import { _ as S } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.RbxW2M0Y.js";
10
10
  import { _ as g } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.DR6a7QAi.js";
11
11
  import { _ as h } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.BYlMCUWP.js";
12
12
  import { _ as I } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.BZJiuA9q.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "1.9.19",
3
+ "version": "1.9.20",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",