@caipira/tamandua 0.0.77 → 0.0.79

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/Tab.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as r } from "./Tab.vue_vue_type_script_setup_true_lang-Do4j_sTY.js";
2
- import { p as b } from "./plugin-DqK7lirx.js";
1
+ import { _ as r } from "./Tab.vue_vue_type_script_setup_true_lang-Cqx-Km-J.js";
2
+ import { p as b } from "./plugin-CbBSU30O.js";
3
3
  export {
4
4
  r as Tab,
5
5
  b as TabPlugin
@@ -0,0 +1,48 @@
1
+ import { defineComponent as f, ref as g, openBlock as n, createElementBlock as o, createElementVNode as c, Fragment as i, renderList as u, normalizeClass as s, toDisplayString as v, renderSlot as h, createCommentVNode as C } from "vue";
2
+ const _ = {
3
+ class: "flex md:flex-row flex-wrap list-none p-1 bg-[var(--unfocused-bg-color)] rounded-[var(--content-radius)]",
4
+ role: "tablist",
5
+ "aria-orientation": "horizontal",
6
+ "aria-label": "Tabs"
7
+ }, k = ["onClick"], S = /* @__PURE__ */ f({
8
+ name: "TTab",
9
+ __name: "Tab",
10
+ props: {
11
+ tabs: { default: () => [] },
12
+ headingFontSizeClass: { default: "text-base" },
13
+ contentMarginClass: { default: "mt-2" }
14
+ },
15
+ emits: ["tab-change"],
16
+ setup(b, { emit: d }) {
17
+ const t = b, m = d, r = g(0), p = (e) => {
18
+ e < 0 || e >= t.tabs.length || e === r.value || (r.value = e, m("tab-change", t.tabs[e]));
19
+ };
20
+ return (e, y) => (n(), o("div", null, [
21
+ c("ul", _, [
22
+ (n(!0), o(i, null, u(t.tabs, (l, a) => (n(), o("li", {
23
+ role: "button",
24
+ class: s(["block py-2 px-4 rounded-[var(--content-radius)] cursor-pointer flex-1 text-center select-none", {
25
+ "bg-caipira-primary": a === r.value,
26
+ [t.headingFontSizeClass]: !0
27
+ }]),
28
+ key: a,
29
+ onClick: (T) => p(a)
30
+ }, v(l?.title), 11, k))), 128))
31
+ ]),
32
+ c("div", {
33
+ class: s([t.contentMarginClass])
34
+ }, [
35
+ (n(!0), o(i, null, u(t.tabs, (l, a) => (n(), o("div", {
36
+ key: a,
37
+ class: s({ hidden: a !== r.value }),
38
+ role: "tabpanel"
39
+ }, [
40
+ l?.slot ? h(e.$slots, l.slot, { key: 0 }) : C("", !0)
41
+ ], 2))), 128))
42
+ ], 2)
43
+ ]));
44
+ }
45
+ });
46
+ export {
47
+ S as _
48
+ };
@@ -39,7 +39,7 @@ import { P as Cr } from "./ProgressCircle-C5CnEEoe.js";
39
39
  import { P as br } from "./ProgressLine-BqINh5jh.js";
40
40
  import { _ as Gr } from "./SensitiveInfo.vue_vue_type_script_setup_true_lang-D288W5VF.js";
41
41
  import { _ as gr } from "./Skeleton.vue_vue_type_script_setup_true_lang-Dsy_4Ftz.js";
42
- import { _ as vr } from "./Tab.vue_vue_type_script_setup_true_lang-Do4j_sTY.js";
42
+ import { _ as vr } from "./Tab.vue_vue_type_script_setup_true_lang-Cqx-Km-J.js";
43
43
  import { T as Fr } from "./Table-vjjmPzlZ.js";
44
44
  import { _ as Mr } from "./Tag.vue_vue_type_script_setup_true_lang-DxOWMwW8.js";
45
45
  import { _ as Br } from "./Toast.vue_vue_type_script_setup_true_lang-CJK0nZDK.js";
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { _ as s } from "./Tab.vue_vue_type_script_setup_true_lang-Do4j_sTY.js";
2
+ import { _ as s } from "./Tab.vue_vue_type_script_setup_true_lang-Cqx-Km-J.js";
3
3
  const m = {
4
4
  install(o) {
5
5
  r(o, s);
@@ -55,7 +55,7 @@ import "./ProgressLine-BqINh5jh.js";
55
55
  import { p as B } from "./plugin-DMGSStZm.js";
56
56
  import { p as z } from "./plugin-BWfDY9pB.js";
57
57
  import { p as E } from "./plugin-DYHfPgzY.js";
58
- import { p as O } from "./plugin-DqK7lirx.js";
58
+ import { p as O } from "./plugin-CbBSU30O.js";
59
59
  import "./Table-vjjmPzlZ.js";
60
60
  import { p as q } from "./plugin-6KewRQ9w.js";
61
61
  import "./Tag.vue_vue_type_script_setup_true_lang-DxOWMwW8.js";
package/dist/plugins.js CHANGED
@@ -55,7 +55,7 @@ import "./ProgressLine-BqINh5jh.js";
55
55
  import { p as Jr } from "./plugin-DMGSStZm.js";
56
56
  import { p as Nr } from "./plugin-BWfDY9pB.js";
57
57
  import { p as Qr } from "./plugin-DYHfPgzY.js";
58
- import { p as Vr } from "./plugin-DqK7lirx.js";
58
+ import { p as Vr } from "./plugin-CbBSU30O.js";
59
59
  import "./Table-vjjmPzlZ.js";
60
60
  import { p as Xr } from "./plugin-6KewRQ9w.js";
61
61
  import "./Tag.vue_vue_type_script_setup_true_lang-DxOWMwW8.js";
package/dist/tamandua.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as n } from "./plugins-CjskQ71G.js";
1
+ import { p as n } from "./plugins-6r1ihib4.js";
2
2
  const o = {
3
3
  install(s) {
4
4
  for (const i in n)
@@ -5,11 +5,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
5
5
  tabs: () => never[];
6
6
  headingFontSizeClass: string;
7
7
  contentMarginClass: string;
8
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TabProps>, {
8
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "tab-change": (val: import("../../index.js").Tab) => void;
10
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TabProps>, {
9
11
  tabs: () => never[];
10
12
  headingFontSizeClass: string;
11
13
  contentMarginClass: string;
12
- }>>>, {
14
+ }>>> & {
15
+ "onTab-change"?: ((val: import("../../index.js").Tab) => any) | undefined;
16
+ }, {
13
17
  tabs: import("../../index.js").Tab[];
14
18
  headingFontSizeClass: string;
15
19
  contentMarginClass: string;
@@ -5,3 +5,6 @@ export type TabProps = {
5
5
  headingFontSizeClass?: string;
6
6
  contentMarginClass?: string;
7
7
  };
8
+ export type TableEvents = {
9
+ (e: "tab-change", val: Tab): void;
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caipira/tamandua",
3
- "version": "0.0.77",
3
+ "version": "0.0.79",
4
4
  "private": false,
5
5
  "description": "UI library for the Caipira ecosystem",
6
6
  "license": "GPL-3.0-only",
@@ -1,45 +0,0 @@
1
- import { defineComponent as p, ref as b, openBlock as t, createElementBlock as a, Fragment as l, createElementVNode as i, renderList as c, normalizeClass as s, toDisplayString as m, renderSlot as f, createCommentVNode as v } from "vue";
2
- const _ = {
3
- class: "flex md:flex-row flex-wrap list-none p-1 bg-[var(--unfocused-bg-color)] rounded-[var(--content-radius)]",
4
- role: "tablist",
5
- "aria-orientation": "horizontal",
6
- "aria-label": "Tabs"
7
- }, g = ["onClick"], x = /* @__PURE__ */ p({
8
- name: "TTab",
9
- __name: "Tab",
10
- props: {
11
- tabs: { default: () => [] },
12
- headingFontSizeClass: { default: "text-base" },
13
- contentMarginClass: { default: "mt-2" }
14
- },
15
- setup(u) {
16
- const n = u, o = b(0);
17
- return (d, C) => (t(), a(l, null, [
18
- i("ul", _, [
19
- (t(!0), a(l, null, c(n.tabs, (r, e) => (t(), a("li", {
20
- role: "button",
21
- class: s(["block py-2 px-4 rounded-[var(--content-radius)] cursor-pointer flex-1 text-center", {
22
- "bg-caipira-primary": e === o.value,
23
- [n.headingFontSizeClass]: !0
24
- }]),
25
- key: e,
26
- onClick: (k) => o.value = e
27
- }, m(r?.title), 11, g))), 128))
28
- ]),
29
- i("div", {
30
- class: s([n.contentMarginClass])
31
- }, [
32
- (t(!0), a(l, null, c(n.tabs, (r, e) => (t(), a("div", {
33
- key: e,
34
- class: s({ hidden: e !== o.value }),
35
- role: "tabpanel"
36
- }, [
37
- r?.slot ? f(d.$slots, r.slot, { key: 0 }) : v("", !0)
38
- ], 2))), 128))
39
- ], 2)
40
- ], 64));
41
- }
42
- });
43
- export {
44
- x as _
45
- };