@xy-planning-network/trees 0.11.1-dev-2 → 0.11.1-dev-3
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/package.json
CHANGED
|
@@ -58,8 +58,8 @@ const items = computed(() => {
|
|
|
58
58
|
</template>
|
|
59
59
|
|
|
60
60
|
<template #default>
|
|
61
|
-
<PopoverContent>
|
|
62
|
-
<ul
|
|
61
|
+
<PopoverContent v-if="item.action === 'nav'">
|
|
62
|
+
<ul class="flex flex-col text-sm/6">
|
|
63
63
|
<li v-for="(nav, navKey) in item.navigation" :key="navKey">
|
|
64
64
|
<a
|
|
65
65
|
:href="nav.url"
|
|
@@ -74,13 +74,13 @@ const items = computed(() => {
|
|
|
74
74
|
</a>
|
|
75
75
|
</li>
|
|
76
76
|
</ul>
|
|
77
|
-
|
|
78
|
-
<component
|
|
79
|
-
:is="item.component"
|
|
80
|
-
v-if="item.action === 'flyout'"
|
|
81
|
-
v-bind="item.props"
|
|
82
|
-
/>
|
|
83
77
|
</PopoverContent>
|
|
78
|
+
|
|
79
|
+
<component
|
|
80
|
+
:is="item.component"
|
|
81
|
+
v-if="item.action === 'flyout'"
|
|
82
|
+
v-bind="item.props"
|
|
83
|
+
/>
|
|
84
84
|
</template>
|
|
85
85
|
</Popover>
|
|
86
86
|
</div>
|
|
@@ -1,7 +1,44 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from "vue"
|
|
3
|
+
|
|
4
|
+
const props = withDefaults(
|
|
5
|
+
defineProps<{ size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" }>(),
|
|
6
|
+
{ size: "xs" }
|
|
7
|
+
)
|
|
8
|
+
const maxWidth = computed(() => {
|
|
9
|
+
let maxWidth = "max-w-xs"
|
|
10
|
+
switch (props.size) {
|
|
11
|
+
case "xs":
|
|
12
|
+
maxWidth = "max-w-xs"
|
|
13
|
+
break
|
|
14
|
+
case "sm":
|
|
15
|
+
maxWidth = "max-w-sm"
|
|
16
|
+
break
|
|
17
|
+
case "md":
|
|
18
|
+
maxWidth = "max-w-md"
|
|
19
|
+
break
|
|
20
|
+
case "lg":
|
|
21
|
+
maxWidth = "max-w-lg"
|
|
22
|
+
break
|
|
23
|
+
case "xl":
|
|
24
|
+
maxWidth = "max-w-xl"
|
|
25
|
+
break
|
|
26
|
+
case "2xl":
|
|
27
|
+
maxWidth = "max-w-2xl"
|
|
28
|
+
break
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return maxWidth
|
|
32
|
+
})
|
|
33
|
+
</script>
|
|
34
|
+
|
|
1
35
|
<template>
|
|
2
36
|
<!--styling wrapper - top level element will merge attrs for class overrides -->
|
|
3
37
|
<div
|
|
4
|
-
class="
|
|
38
|
+
:class="[
|
|
39
|
+
'w-full bg-white rounded-xy p-2 border border-gray-100 shadow-md',
|
|
40
|
+
maxWidth,
|
|
41
|
+
]"
|
|
5
42
|
>
|
|
6
43
|
<slot></slot>
|
|
7
44
|
</div>
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
3
|
+
};
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
+
size: "xs" | "sm" | "lg" | "xl" | "md" | "2xl";
|
|
6
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
2
7
|
default?(_: {}): any;
|
|
3
8
|
}>;
|
|
4
9
|
export default _default;
|