@xy-planning-network/trees 0.13.7-dev-5 → 0.13.8-dev-1
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/README.md +45 -0
- package/dist/trees.es.js +1061 -1043
- package/dist/trees.umd.js +13 -13
- package/package.json +2 -2
- package/src/lib-components/indicators/InlineAlert.vue +4 -4
- package/src/lib-components/layout/SidebarLayout.vue +8 -5
- package/src/lib-components/layout/StackedLayout.vue +11 -3
- package/src/lib-components/lists/DownloadCell.vue +3 -3
- package/src/lib-components/navigation/ActionsDropdown.vue +5 -2
- package/src/lib-components/overlays/Modal.vue +2 -2
- package/src/lib-components/overlays/Slideover.vue +2 -2
- package/types/composables/nav.d.ts +14 -0
- package/types/composables/table.d.ts +3 -0
- package/types/heroicons.d.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xy-planning-network/trees",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.8-dev-1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "github:xy-planning-network/trees",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@floating-ui/vue": "^1.0.1",
|
|
61
61
|
"@headlessui/vue": "^1.4.2",
|
|
62
|
-
"@heroicons/vue": "^
|
|
62
|
+
"@heroicons/vue": "^2.2.0",
|
|
63
63
|
"@maskito/core": "^3.5.0",
|
|
64
64
|
"@maskito/kit": "^3.5.0",
|
|
65
65
|
"@maskito/vue": "^3.5.0",
|
|
@@ -4,11 +4,11 @@ import { computed, ref } from "vue"
|
|
|
4
4
|
import {
|
|
5
5
|
CheckCircleIcon,
|
|
6
6
|
InformationCircleIcon,
|
|
7
|
-
|
|
7
|
+
ExclamationTriangleIcon,
|
|
8
8
|
XCircleIcon,
|
|
9
9
|
} from "@heroicons/vue/solid"
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { XMarkIcon } from "@heroicons/vue/outline"
|
|
12
12
|
|
|
13
13
|
const props = withDefaults(
|
|
14
14
|
defineProps<{
|
|
@@ -107,7 +107,7 @@ const icon = computed(() => {
|
|
|
107
107
|
icon = CheckCircleIcon
|
|
108
108
|
break
|
|
109
109
|
case "warn":
|
|
110
|
-
icon =
|
|
110
|
+
icon = ExclamationTriangleIcon
|
|
111
111
|
break
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -185,7 +185,7 @@ const icon = computed(() => {
|
|
|
185
185
|
@click="close"
|
|
186
186
|
>
|
|
187
187
|
<span class="sr-only">close</span>
|
|
188
|
-
<
|
|
188
|
+
<XMarkIcon class="h-4 w-4" />
|
|
189
189
|
</button>
|
|
190
190
|
</div>
|
|
191
191
|
</div>
|
|
@@ -11,8 +11,11 @@ import {
|
|
|
11
11
|
TransitionChild,
|
|
12
12
|
TransitionRoot,
|
|
13
13
|
} from "@headlessui/vue"
|
|
14
|
-
import {
|
|
15
|
-
|
|
14
|
+
import {
|
|
15
|
+
Bars3BottomLeftIcon,
|
|
16
|
+
XMarkIcon,
|
|
17
|
+
} from "@heroicons/vue/outline"
|
|
18
|
+
import { Cog6ToothIcon } from "@heroicons/vue/solid"
|
|
16
19
|
import type { NavItem } from "@/composables/nav"
|
|
17
20
|
import { ref } from "vue"
|
|
18
21
|
|
|
@@ -82,7 +85,7 @@ const isActive = (url: string): boolean => {
|
|
|
82
85
|
@click="sidebarOpen = false"
|
|
83
86
|
>
|
|
84
87
|
<span class="sr-only">Close sidebar</span>
|
|
85
|
-
<
|
|
88
|
+
<XMarkIcon class="h-6 w-6 text-white" aria-hidden="true" />
|
|
86
89
|
</button>
|
|
87
90
|
</div>
|
|
88
91
|
</TransitionChild>
|
|
@@ -192,7 +195,7 @@ const isActive = (url: string): boolean => {
|
|
|
192
195
|
@click="sidebarOpen = true"
|
|
193
196
|
>
|
|
194
197
|
<span class="sr-only">Open sidebar</span>
|
|
195
|
-
<
|
|
198
|
+
<Bars3BottomLeftIcon class="h-6 w-6" aria-hidden="true" />
|
|
196
199
|
</button>
|
|
197
200
|
<div class="flex-1 px-4 flex justify-between">
|
|
198
201
|
<div class="flex-1 flex">
|
|
@@ -210,7 +213,7 @@ const isActive = (url: string): boolean => {
|
|
|
210
213
|
class="max-w-xs flex items-center text-sm text-white rounded-full hover:bg-blue-900 hover:text-gray-50 focus:outline-none focus:ring focus:text-white"
|
|
211
214
|
>
|
|
212
215
|
<span class="sr-only">Open user menu</span>
|
|
213
|
-
<
|
|
216
|
+
<Cog6ToothIcon class="h-8 w-8" fill="currentColor" />
|
|
214
217
|
</MenuButton>
|
|
215
218
|
</div>
|
|
216
219
|
<transition
|
|
@@ -10,7 +10,11 @@ import {
|
|
|
10
10
|
MenuItem,
|
|
11
11
|
MenuItems,
|
|
12
12
|
} from "@headlessui/vue"
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
Bars3Icon,
|
|
15
|
+
UserCircleIcon,
|
|
16
|
+
XMarkIcon,
|
|
17
|
+
} from "@heroicons/vue/outline"
|
|
14
18
|
import type { NavItem } from "@/composables/nav"
|
|
15
19
|
import User from "@/composables/user"
|
|
16
20
|
|
|
@@ -101,8 +105,12 @@ const isActive = (url: string): boolean => {
|
|
|
101
105
|
class="bg-white inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
|
|
102
106
|
>
|
|
103
107
|
<span class="sr-only">Open main menu</span>
|
|
104
|
-
<
|
|
105
|
-
|
|
108
|
+
<Bars3Icon
|
|
109
|
+
v-if="!open"
|
|
110
|
+
class="block h-6 w-6"
|
|
111
|
+
aria-hidden="true"
|
|
112
|
+
/>
|
|
113
|
+
<XMarkIcon v-else class="block h-6 w-6" aria-hidden="true" />
|
|
106
114
|
</DisclosureButton>
|
|
107
115
|
</div>
|
|
108
116
|
</div>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { ArrowDownTrayIcon } from "@heroicons/vue/solid"
|
|
3
3
|
defineProps<{
|
|
4
4
|
propsData: Record<string, unknown>
|
|
5
5
|
attribute: string
|
|
6
6
|
}>()
|
|
7
7
|
</script>
|
|
8
8
|
<template>
|
|
9
|
-
<a :href="
|
|
10
|
-
<
|
|
9
|
+
<a :href="propsData[attribute] as string">
|
|
10
|
+
<ArrowDownTrayIcon class="h-6 w-6 group-hover:text-gray-500 transition" />
|
|
11
11
|
</a>
|
|
12
12
|
</template>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/vue"
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ChevronDownIcon,
|
|
5
|
+
EllipsisVerticalIcon,
|
|
6
|
+
} from "@heroicons/vue/solid"
|
|
4
7
|
import { isActionItemButton, type ActionItems } from "@/composables/nav"
|
|
5
8
|
import { computed, useTemplateRef } from "vue"
|
|
6
9
|
import { useFloating, autoUpdate, autoPlacement } from "@floating-ui/vue"
|
|
@@ -71,7 +74,7 @@ const { floatingStyles } = useFloating(triggerRef, wrapperRef, {
|
|
|
71
74
|
>
|
|
72
75
|
<span :class="!label && 'sr-only'">{{ label || "Open options" }}</span>
|
|
73
76
|
<component
|
|
74
|
-
:is="label ? ChevronDownIcon :
|
|
77
|
+
:is="label ? ChevronDownIcon : EllipsisVerticalIcon"
|
|
75
78
|
:class="[label && '-mr-1 ml-2', 'w-5 h-5']"
|
|
76
79
|
aria-hidden="true"
|
|
77
80
|
/>
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
TransitionChild,
|
|
7
7
|
TransitionRoot,
|
|
8
8
|
} from "@headlessui/vue"
|
|
9
|
-
import {
|
|
9
|
+
import { XMarkIcon } from "@heroicons/vue/outline"
|
|
10
10
|
import { computed, useSlots, watch } from "vue"
|
|
11
11
|
|
|
12
12
|
const props = withDefaults(
|
|
@@ -110,7 +110,7 @@ watch(open, (isOpen) => {
|
|
|
110
110
|
@click="open = false"
|
|
111
111
|
>
|
|
112
112
|
<span class="sr-only">Close</span>
|
|
113
|
-
<
|
|
113
|
+
<XMarkIcon class="h-6 w-6" aria-hidden="true" />
|
|
114
114
|
</button>
|
|
115
115
|
</div>
|
|
116
116
|
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
TransitionChild,
|
|
7
7
|
TransitionRoot,
|
|
8
8
|
} from "@headlessui/vue"
|
|
9
|
-
import {
|
|
9
|
+
import { XMarkIcon } from "@heroicons/vue/outline"
|
|
10
10
|
import { computed, watch } from "vue"
|
|
11
11
|
|
|
12
12
|
const props = withDefaults(
|
|
@@ -89,7 +89,7 @@ watch(open, (isOpen) => {
|
|
|
89
89
|
@click="open = false"
|
|
90
90
|
>
|
|
91
91
|
<span class="sr-only">Close panel</span>
|
|
92
|
-
<
|
|
92
|
+
<XMarkIcon class="h-6 w-6" aria-hidden="true" />
|
|
93
93
|
</button>
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
@@ -13,6 +13,13 @@ export interface Pagination {
|
|
|
13
13
|
}
|
|
14
14
|
export type ActionItem = ActionItemButton | ActionItemLink;
|
|
15
15
|
export type ActionItems = ActionItem[];
|
|
16
|
+
/**
|
|
17
|
+
* ActionItemButton determines the configuration for a button action in a component.
|
|
18
|
+
* Visibility (`show`) and interactivity (`disabled`) can be toggled via static booleans.
|
|
19
|
+
*
|
|
20
|
+
* The use of (`never`) on properties that exist in ActionItemLink ensures the compiler
|
|
21
|
+
* can infer between the to interfaces when used in the type union ActionItem.
|
|
22
|
+
*/
|
|
16
23
|
export interface ActionItemButton {
|
|
17
24
|
label: string;
|
|
18
25
|
attrs?: never;
|
|
@@ -24,6 +31,13 @@ export interface ActionItemButton {
|
|
|
24
31
|
onClick: (e: Event) => void;
|
|
25
32
|
}
|
|
26
33
|
export declare const isActionItemButton: (item: ActionItem) => item is ActionItemButton;
|
|
34
|
+
/**
|
|
35
|
+
* ActionItemLink determines the configuration for a link action in a component.
|
|
36
|
+
* Visibility (`show`) and interactivity (`disabled`) can be toggled via static booleans.
|
|
37
|
+
*
|
|
38
|
+
* HTML Attributes can be defined on (`attrs`) for additional HTML anchor tag attributes
|
|
39
|
+
* that are not explicitly defined in the interface.
|
|
40
|
+
*/
|
|
27
41
|
export interface ActionItemLink {
|
|
28
42
|
label: string;
|
|
29
43
|
url: string;
|
|
@@ -42,6 +42,9 @@ export type TableActionItem<T = TableRowData> = TableActionButton<T> | TableActi
|
|
|
42
42
|
* Visibility (`show`) and interactivity (`disabled`) can be toggled via static booleans
|
|
43
43
|
* or dynamic methods based on the specific row's state and index.
|
|
44
44
|
*
|
|
45
|
+
* The use of (`never`) on properties that exist in TableActionLink ensures the compiler
|
|
46
|
+
* can infer between the to interfaces when used in the type union TableActionItem.
|
|
47
|
+
*
|
|
45
48
|
* @template T The shape of the underlying row data.
|
|
46
49
|
*/
|
|
47
50
|
export interface TableActionButton<T = TableRowData> {
|