@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.
@@ -2,7 +2,9 @@
2
2
  <TabGroup
3
3
  v-slot="slotProps"
4
4
  :defaultIndex="defaultIndex"
5
+ :selectedIndex="selectedIndex"
5
6
  :vertical="vertical"
7
+ @change="$emit('change', $event)"
6
8
  >
7
9
  <div
8
10
  v-bind="$attrs"
@@ -22,12 +24,15 @@
22
24
  defineOptions({
23
25
  inheritAttrs: false
24
26
  });
25
-
26
27
  const props = defineProps({
27
28
  /**
28
- * Active tab index by default
29
+ * Active tab index by default (uncontrolled)
29
30
  */
30
31
  defaultIndex: Number,
32
+ /**
33
+ * Actively selected tab index (controlled)
34
+ */
35
+ selectedIndex: Number,
31
36
  /**
32
37
  * Whether or not to use vertical layout
33
38
  */
@@ -46,6 +51,10 @@
46
51
  modifiers: [String, Array]
47
52
  });
48
53
 
54
+ // Explicitly declare the emit so Vue knows to capture the @change listener
55
+ // from the parent and NOT bundle it into $attrs
56
+ defineEmits(['change']);
57
+
49
58
  const { resolvedModifiers } = useModifiers({
50
59
  props,
51
60
  baseClass: "tabs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulu/frontend-vue",
3
- "version": "0.6.11",
3
+ "version": "0.6.12",
4
4
  "description": "A modular, tree-shakeable Vue 3 component library for the Ulu Frontend theming system, plus general utilities for Vue development",
5
5
  "type": "module",
6
6
  "files": [