@ulu/frontend-vue 0.6.8 → 0.6.10

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,6 +1,8 @@
1
1
  <template>
2
- <Tab v-slot="slotProps">
3
- <slot v-bind="slotProps"/>
2
+ <Tab class="tabs__tab">
3
+ <template #default="slotProps">
4
+ <slot v-bind="slotProps"/>
5
+ </template>
4
6
  </Tab>
5
7
  </template>
6
8
 
@@ -7,12 +7,7 @@
7
7
  <div
8
8
  v-bind="$attrs"
9
9
  class="tabs"
10
- :class="[
11
- resolvedModifiers,
12
- {
13
- 'tabs--vertical' : vertical
14
- }
15
- ]"
10
+ :class="resolvedModifiers"
16
11
  >
17
12
  <slot v-bind="slotProps"/>
18
13
  </div>
@@ -20,6 +15,7 @@
20
15
  </template>
21
16
 
22
17
  <script setup>
18
+ import { computed } from "vue";
23
19
  import { TabGroup } from "@headlessui/vue";
24
20
  import { useModifiers } from "../../composables/useModifiers.js";
25
21
 
@@ -36,11 +32,27 @@
36
32
  * Whether or not to use vertical layout
37
33
  */
38
34
  vertical: Boolean,
35
+ /**
36
+ * Whether or not to use sticky modifier (tablist)
37
+ */
38
+ sticky: Boolean,
39
+ /**
40
+ * Whether or not to use transparent modifier (tab panels)
41
+ */
42
+ transparent: Boolean,
39
43
  /**
40
44
  * Class modifiers (ie. 'transparent', 'secondary', etc)
41
45
  */
42
46
  modifiers: [String, Array]
43
47
  });
44
48
 
45
- const { resolvedModifiers } = useModifiers({ props, baseClass: "tabs" });
49
+ const { resolvedModifiers } = useModifiers({
50
+ props,
51
+ baseClass: "tabs",
52
+ internal: computed(() => ({
53
+ "vertical" : props.vertical,
54
+ "sticky" : props.sticky,
55
+ "transparent" : props.transparent
56
+ }))
57
+ });
46
58
  </script>
@@ -1,6 +1,8 @@
1
1
  <template>
2
- <TabPanel v-slot="slotProps">
3
- <slot v-bind="slotProps"/>
2
+ <TabPanel class="tabs__tabpanel">
3
+ <template #default="slotProps">
4
+ <slot v-bind="slotProps"/>
5
+ </template>
4
6
  </TabPanel>
5
7
  </template>
6
8
 
@@ -1,6 +1,8 @@
1
1
  <template>
2
- <TabPanels as="template" v-slot="slotProps">
3
- <slot v-bind="slotProps"/>
2
+ <TabPanels as="template">
3
+ <template #default="slotProps">
4
+ <slot v-bind="slotProps"/>
5
+ </template>
4
6
  </TabPanels>
5
7
  </template>
6
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulu/frontend-vue",
3
- "version": "0.6.8",
3
+ "version": "0.6.10",
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": [