@xy-planning-network/trees 0.13.5 → 0.13.7-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/dist/trees.es.js +3021 -2928
- package/dist/trees.umd.js +14 -14
- package/package.json +1 -1
- package/src/lib-components/lists/DataTable.vue +4 -6
- package/src/lib-components/lists/DynamicTable.vue +12 -8
- package/src/lib-components/navigation/ActionsButtonGroup.vue +96 -0
- package/src/lib-components/navigation/ActionsDropdown.vue +96 -21
- package/types/composables/nav.d.ts +21 -4
- package/types/composables/table.d.ts +55 -28
- package/types/composables/useTable.d.ts +15 -3
- package/types/entry.d.ts +3 -0
- package/types/lib-components/forms/RadioCards.vue.d.ts +1 -1
- package/types/lib-components/index.d.ts +3 -1
- package/types/lib-components/navigation/ActionsButtonGroup.vue.d.ts +8 -0
- package/types/lib-components/navigation/ActionsDropdown.vue.d.ts +7 -6
- package/types/lib-components/overlays/Modal.vue.d.ts +1 -1
- package/src/lib-components/lists/TableActionButtons.vue +0 -47
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { TableActionItem } from "@/composables"
|
|
3
|
-
import { useActionItems } from "@/composables/useActionItems"
|
|
4
|
-
import { toRef } from "vue"
|
|
5
|
-
|
|
6
|
-
const props = withDefaults(
|
|
7
|
-
defineProps<{
|
|
8
|
-
actions?: TableActionItem[]
|
|
9
|
-
}>(),
|
|
10
|
-
{
|
|
11
|
-
actions: () => [],
|
|
12
|
-
}
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
const { actions, hasActions } = useActionItems(toRef(props, "actions"))
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<template>
|
|
19
|
-
<div v-if="hasActions" class="flex items-center space-x-2 justify-end">
|
|
20
|
-
<span class="isolate inline-flex rounded-md shadow-sm">
|
|
21
|
-
<button
|
|
22
|
-
v-for="(action, actionIdx) in actions"
|
|
23
|
-
:key="actionIdx"
|
|
24
|
-
type="button"
|
|
25
|
-
class="group relative inline-flex items-center bg-white px-3 py-2 text-sm font-semibold text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 disabled:text-gray-400 disabled:cursor-not-allowed"
|
|
26
|
-
:class="{
|
|
27
|
-
'rounded-l-md': actionIdx === 0,
|
|
28
|
-
'-ml-px': actionIdx > 0,
|
|
29
|
-
'rounded-r-md': actionIdx === actions.length - 1,
|
|
30
|
-
}"
|
|
31
|
-
:disabled="action.disabled"
|
|
32
|
-
@click.stop="action.onClick"
|
|
33
|
-
>
|
|
34
|
-
<span class="relative inline-flex items-center gap-x-1.5">
|
|
35
|
-
<component
|
|
36
|
-
:is="action.icon"
|
|
37
|
-
v-if="action.icon"
|
|
38
|
-
class="-ml-0.5 h-4 w-4 group-disabled:text-gray-300"
|
|
39
|
-
:class="action.label ? 'text-gray-400' : 'text-gray-600'"
|
|
40
|
-
aria-hidden="true"
|
|
41
|
-
/>
|
|
42
|
-
{{ action.label }}
|
|
43
|
-
</span>
|
|
44
|
-
</button>
|
|
45
|
-
</span>
|
|
46
|
-
</div>
|
|
47
|
-
</template>
|