@ulu/frontend-vue 0.6.11 → 0.6.12

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.
@@ -4,17 +4,20 @@ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
4
  $slots: S;
5
5
  });
6
6
  declare const __VLS_component: import('vue').DefineComponent<{}, {
7
+ $emit: (event: "change", ...args: any[]) => void;
7
8
  vertical: boolean;
8
9
  sticky: boolean;
9
10
  transparent: boolean;
10
11
  modifiers?: string | unknown[] | undefined;
11
12
  defaultIndex?: number | undefined;
13
+ selectedIndex?: number | undefined;
12
14
  $props: {
13
15
  readonly vertical?: boolean | undefined;
14
16
  readonly sticky?: boolean | undefined;
15
17
  readonly transparent?: boolean | undefined;
16
18
  readonly modifiers?: string | unknown[] | undefined;
17
19
  readonly defaultIndex?: number | undefined;
20
+ readonly selectedIndex?: number | undefined;
18
21
  };
19
22
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
20
23
  type __VLS_TemplateResult = {
@@ -1 +1 @@
1
- {"version":3,"file":"UluTabGroup.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluTabGroup.vue"],"names":[],"mappings":"AAeA;wBA2KqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAVjC;;;;;;;;;;;;;2OAOG"}
1
+ {"version":3,"file":"UluTabGroup.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluTabGroup.vue"],"names":[],"mappings":"AAiBA;wBAwMqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;;;;;2OAQG"}
@@ -1,15 +1,19 @@
1
- import { computed as n, createBlock as i, openBlock as l, unref as a, withCtx as c, createElementVNode as d, mergeProps as u, renderSlot as f, normalizeProps as p, guardReactiveProps as m } from "vue";
2
- import { TabGroup as v } from "@headlessui/vue";
3
- import { useModifiers as b } from "../../composables/useModifiers.js";
4
- const y = /* @__PURE__ */ Object.assign({
1
+ import { computed as l, createBlock as i, openBlock as d, unref as s, withCtx as c, createElementVNode as u, mergeProps as m, renderSlot as f, normalizeProps as p, guardReactiveProps as v } from "vue";
2
+ import { TabGroup as b } from "@headlessui/vue";
3
+ import { useModifiers as x } from "../../composables/useModifiers.js";
4
+ const B = /* @__PURE__ */ Object.assign({
5
5
  inheritAttrs: !1
6
6
  }, {
7
7
  __name: "UluTabGroup",
8
8
  props: {
9
9
  /**
10
- * Active tab index by default
10
+ * Active tab index by default (uncontrolled)
11
11
  */
12
12
  defaultIndex: Number,
13
+ /**
14
+ * Actively selected tab index (controlled)
15
+ */
16
+ selectedIndex: Number,
13
17
  /**
14
18
  * Whether or not to use vertical layout
15
19
  */
@@ -27,31 +31,34 @@ const y = /* @__PURE__ */ Object.assign({
27
31
  */
28
32
  modifiers: [String, Array]
29
33
  },
30
- setup(t) {
31
- const e = t, { resolvedModifiers: s } = b({
32
- props: e,
34
+ emits: ["change"],
35
+ setup(e) {
36
+ const t = e, { resolvedModifiers: o } = x({
37
+ props: t,
33
38
  baseClass: "tabs",
34
- internal: n(() => ({
35
- vertical: e.vertical,
36
- sticky: e.sticky,
37
- transparent: e.transparent
39
+ internal: l(() => ({
40
+ vertical: t.vertical,
41
+ sticky: t.sticky,
42
+ transparent: t.transparent
38
43
  }))
39
44
  });
40
- return (r, k) => (l(), i(a(v), {
41
- defaultIndex: t.defaultIndex,
42
- vertical: t.vertical
45
+ return (r, n) => (d(), i(s(b), {
46
+ defaultIndex: e.defaultIndex,
47
+ selectedIndex: e.selectedIndex,
48
+ vertical: e.vertical,
49
+ onChange: n[0] || (n[0] = (a) => r.$emit("change", a))
43
50
  }, {
44
- default: c((o) => [
45
- d("div", u(r.$attrs, {
46
- class: ["tabs", a(s)]
51
+ default: c((a) => [
52
+ u("div", m(r.$attrs, {
53
+ class: ["tabs", s(o)]
47
54
  }), [
48
- f(r.$slots, "default", p(m(o)))
55
+ f(r.$slots, "default", p(v(a)))
49
56
  ], 16)
50
57
  ]),
51
58
  _: 3
52
- }, 8, ["defaultIndex", "vertical"]));
59
+ }, 8, ["defaultIndex", "selectedIndex", "vertical"]));
53
60
  }
54
61
  });
55
62
  export {
56
- y as default
63
+ B as default
57
64
  };