@wikicasa-dev/components 1.7.49 → 1.7.50

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.
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./chunks/BaseTabList.vue_vue_type_script_setup_true_lang.BEX0zH-7.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.CbqroZ_c.js";
1
+ import { _ as f } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.D9k4pe6N.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/SwiperCarousel.vue_vue_type_style_index_0_lang.7z9WGfLj.js";
1
+ import { _ as f } from "./chunks/SwiperCarousel.vue_vue_type_style_index_0_lang.BiS3BhWj.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -5,9 +5,9 @@ declare function __VLS_template(): {
5
5
  default?(_: {
6
6
  updatePrev: <T>(a: AccordionItem, _accordionItems: AccordionItemDecorated<T>) => void;
7
7
  prev: {
8
- title?: string;
8
+ title?: string | undefined;
9
9
  id: string | number;
10
- active?: boolean;
10
+ active?: boolean | undefined;
11
11
  } | null;
12
12
  }): any;
13
13
  };
@@ -4,7 +4,7 @@ declare function __VLS_template(): {
4
4
  default?(_: {
5
5
  handleClick: (elem: RadioButtonType) => void;
6
6
  activeValue: {
7
- id?: string | number | null;
7
+ id?: (string | number | null) | undefined;
8
8
  label: string | number;
9
9
  payload?: unknown;
10
10
  } | null;
@@ -14,7 +14,7 @@ declare function __VLS_template(): {
14
14
  radio_elements?(_: {
15
15
  handleClick: (elem: RadioButtonType) => void;
16
16
  activeValue: {
17
- id?: string | number | null;
17
+ id?: (string | number | null) | undefined;
18
18
  label: string | number;
19
19
  payload?: unknown;
20
20
  } | null;
@@ -0,0 +1,37 @@
1
+ import { ClassType } from '@wikicasa-dev/types';
2
+
3
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
+ uid: string;
5
+ tabListClasses?: ClassType;
6
+ }>, {
7
+ tabListClasses: string;
8
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ tabClick: (e: Event, tabIdx: number) => void;
10
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
11
+ uid: string;
12
+ tabListClasses?: ClassType;
13
+ }>, {
14
+ tabListClasses: string;
15
+ }>>> & {
16
+ onTabClick?: ((e: Event, tabIdx: number) => any) | undefined;
17
+ }, {
18
+ tabListClasses: ClassType;
19
+ }, {}>;
20
+ export default _default;
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToRuntimeProps<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: import('vue').PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
30
+ type __VLS_WithDefaults<P, D> = {
31
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
32
+ default: D[K];
33
+ }> : P[K];
34
+ };
35
+ type __VLS_Prettify<T> = {
36
+ [K in keyof T]: T[K];
37
+ } & {};
@@ -2,29 +2,38 @@ import { ClassType } from '@wikicasa-dev/types';
2
2
 
3
3
  declare const _default: import('vue').DefineComponent<{
4
4
  activeIdx: import('vue').PropType<number | undefined>;
5
- tabViewDescription: {
6
- type: import('vue').PropType<string>;
7
- required: true;
8
- };
9
5
  tabListClasses: {
10
6
  type: import('vue').PropType<ClassType>;
11
7
  default: string;
12
8
  };
13
- }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
- tabClick: (args_0: MouseEvent, args_1: number) => void;
15
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
- activeIdx: import('vue').PropType<number | undefined>;
9
+ tabsPosition: {
10
+ type: import('vue').PropType<"bottom" | "top">;
11
+ default: string;
12
+ };
17
13
  tabViewDescription: {
18
14
  type: import('vue').PropType<string>;
19
15
  required: true;
20
16
  };
17
+ }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ tabClick: (args_0: MouseEvent, args_1: number) => void;
19
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
20
+ activeIdx: import('vue').PropType<number | undefined>;
21
21
  tabListClasses: {
22
22
  type: import('vue').PropType<ClassType>;
23
23
  default: string;
24
24
  };
25
+ tabsPosition: {
26
+ type: import('vue').PropType<"bottom" | "top">;
27
+ default: string;
28
+ };
29
+ tabViewDescription: {
30
+ type: import('vue').PropType<string>;
31
+ required: true;
32
+ };
25
33
  }>> & {
26
34
  onTabClick?: ((args_0: MouseEvent, args_1: number) => any) | undefined;
27
35
  }, {
28
36
  tabListClasses: ClassType;
37
+ tabsPosition: "top" | "bottom";
29
38
  }, {}>;
30
39
  export default _default;
@@ -0,0 +1,42 @@
1
+ import { defineComponent as p, inject as l, openBlock as a, createElementBlock as r, normalizeClass as o, Fragment as m, renderList as h, unref as i, toDisplayString as C, createBlock as _, resolveDynamicComponent as y, createCommentVNode as f } from "vue";
2
+ const v = ["aria-labelledby"], B = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], F = { key: 0 }, $ = /* @__PURE__ */ p({
3
+ __name: "BaseTabList",
4
+ props: {
5
+ uid: {},
6
+ tabListClasses: { default: "" }
7
+ },
8
+ emits: ["tabClick"],
9
+ setup(L, { emit: c }) {
10
+ const d = l("tabs"), s = l("isTabActive"), b = l("handleClick"), u = c;
11
+ return (n, g) => (a(), r("div", {
12
+ role: "tablist",
13
+ "aria-labelledby": `tablist-${n.uid}`,
14
+ class: o(n.tabListClasses)
15
+ }, [
16
+ (a(!0), r(m, null, h(i(d), (e, t) => (a(), r("button", {
17
+ key: t,
18
+ id: e.tabId,
19
+ type: "button",
20
+ role: "tab",
21
+ "aria-selected": i(s)(t),
22
+ "aria-controls": `base-tab-panel-${t}-${n.uid}`,
23
+ tabindex: i(s)(t) ? void 0 : -1,
24
+ class: o([
25
+ "uikit-bg-transparent uikit-p-5px",
26
+ {
27
+ "uikit-border-b-2 uikit-border-solid uikit-border-w-primary uikit-font-semibold": i(s)(t)
28
+ },
29
+ e.class
30
+ ]),
31
+ onClick: (k) => {
32
+ i(b)(t), u("tabClick", k, t);
33
+ }
34
+ }, [
35
+ e["header-title"] ? (a(), r("span", F, C(e["header-title"]), 1)) : e.renderFn.children && e.renderFn.children.header ? (a(), _(y(e.renderFn.children.header), { key: 1 })) : f("", !0)
36
+ ], 10, B))), 128))
37
+ ], 10, v));
38
+ }
39
+ });
40
+ export {
41
+ $ as _
42
+ };
@@ -0,0 +1,83 @@
1
+ import { defineComponent as F, mergeModels as T, useModel as V, ref as o, onMounted as w, useSlots as D, computed as L, provide as u, watch as M, openBlock as i, createElementBlock as _, normalizeClass as x, createElementVNode as E, toDisplayString as N, createBlock as r, 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 { _ as y } from "./BaseTabList.vue_vue_type_script_setup_true_lang.BEX0zH-7.js";
4
+ import { getUID as G } from "../utils.js";
5
+ const H = ["id"], Y = /* @__PURE__ */ F({
6
+ inheritAttrs: !1,
7
+ __name: "BaseTabView",
8
+ props: /* @__PURE__ */ T({
9
+ tabsPosition: { default: "top" },
10
+ tabViewDescription: {},
11
+ tabListClasses: { default: "" }
12
+ }, {
13
+ activeIdx: { default: 0 },
14
+ activeIdxModifiers: {}
15
+ }),
16
+ emits: /* @__PURE__ */ T(["tabClick"], ["update:activeIdx"]),
17
+ setup(k, { emit: J }) {
18
+ const c = V(k, "activeIdx"), C = o(""), v = o(null), I = o(null), a = o("");
19
+ w(() => {
20
+ a.value = G();
21
+ });
22
+ const p = D(), d = (e) => e.props ?? null, m = (e) => e.type.__name === "BaseTab", f = (e, t) => ({
23
+ renderFn: e,
24
+ tabId: h(t),
25
+ "active-tab-panel-idx": d(e)?.["active-tab-panel-idx"] ?? t,
26
+ "header-title": d(e)?.["header-title"] || "",
27
+ class: d(e)?.class || ""
28
+ }), l = L(() => p.default ? p.default().reduce((e, t) => (t.children && Array.isArray(t.children) ? t.children.forEach((s) => {
29
+ m(s) && e.push(f(s, e.length));
30
+ }) : m(t) && e.push(f(t, e.length)), e), []) : []);
31
+ u("tabs", l), u("isTabActive", (e) => c.value === e);
32
+ const g = (e) => v.value === e, h = (e) => `base-tab-${e}-${a.value}`, P = (e) => `base-tab-panel-${e}-${a.value}`, B = (e) => l.value.find((t) => t["active-tab-panel-idx"] === e)?.tabId, $ = (e) => {
33
+ C.value = h(e);
34
+ }, A = (e) => {
35
+ const t = l.value.at(e ?? -1);
36
+ v.value = t?.["active-tab-panel-idx"] ?? null;
37
+ };
38
+ return u("handleClick", (e) => {
39
+ $(e), c.value = e;
40
+ }), M(
41
+ c,
42
+ (e) => {
43
+ A(e ?? -1);
44
+ },
45
+ {
46
+ immediate: !0
47
+ }
48
+ ), (e, t) => (i(), _("div", {
49
+ ref_key: "root",
50
+ ref: I,
51
+ class: x(e.$attrs.class)
52
+ }, [
53
+ E("span", {
54
+ id: `tablist-${a.value}`,
55
+ class: "uikit-sr-only"
56
+ }, N(e.tabViewDescription), 9, H),
57
+ e.tabsPosition === "top" ? (i(), r(y, {
58
+ key: 0,
59
+ uid: a.value,
60
+ "tab-list-classes": e.tabListClasses
61
+ }, null, 8, ["uid", "tab-list-classes"])) : b("", !0),
62
+ (i(!0), _(S, null, z(l.value, (s, n) => (i(), r(q, {
63
+ key: n,
64
+ id: P(n),
65
+ "labelled-by": B(n) || "",
66
+ active: g(n)
67
+ }, {
68
+ default: U(() => [
69
+ s.renderFn.children && s.renderFn.children.default ? (i(), r(j(s.renderFn.children.default), { key: 0 })) : b("", !0)
70
+ ]),
71
+ _: 2
72
+ }, 1032, ["id", "labelled-by", "active"]))), 128)),
73
+ e.tabsPosition === "bottom" ? (i(), r(y, {
74
+ key: 1,
75
+ uid: a.value,
76
+ "tab-list-classes": e.tabListClasses
77
+ }, null, 8, ["uid", "tab-list-classes"])) : b("", !0)
78
+ ], 2));
79
+ }
80
+ });
81
+ export {
82
+ Y as _
83
+ };