@xy-planning-network/trees 0.4.0 → 0.4.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/dist/trees.es.js +1282 -399
- package/dist/trees.umd.js +6 -6
- package/package.json +1 -1
- package/src/lib-components/forms/BaseInput.vue +2 -0
- package/src/lib-components/forms/Checkbox.vue +17 -10
- package/src/lib-components/forms/FieldsetLegend.vue +14 -0
- package/src/lib-components/forms/InputHelp.vue +1 -1
- package/src/lib-components/forms/InputLabel.vue +6 -1
- package/src/lib-components/forms/MultiCheckboxes.vue +93 -31
- package/src/lib-components/forms/Radio.vue +81 -34
- package/src/lib-components/forms/Select.vue +2 -2
- package/src/lib-components/forms/TextArea.vue +2 -0
- package/src/lib-components/forms/Toggle.vue +2 -0
- package/src/lib-components/forms/YesOrNoRadio.vue +69 -40
- package/src/lib-components/navigation/Paginator.vue +15 -19
- package/src/lib-components/overlays/Popover/Popover.vue +229 -0
- package/src/lib-components/overlays/Popover/PopoverContent.vue +8 -0
- package/src/lib-components/overlays/Tooltip.vue +34 -0
- package/types/helpers/Debounce.d.ts +1 -0
- package/types/helpers/Slots.d.ts +2 -0
- package/types/helpers/Throttle.d.ts +1 -0
- package/types/lib-components/forms/Checkbox.vue.d.ts +8 -0
- package/types/lib-components/forms/FieldsetLegend.vue.d.ts +2 -0
- package/types/lib-components/forms/InputLabel.vue.d.ts +8 -0
- package/types/lib-components/forms/MultiCheckboxes.vue.d.ts +32 -7
- package/types/lib-components/forms/Radio.vue.d.ts +26 -13
- package/types/lib-components/forms/YesOrNoRadio.vue.d.ts +8 -0
- package/types/lib-components/index.d.ts +11 -1
- package/types/lib-components/overlays/Popover/Popover.vue.d.ts +23 -0
- package/types/lib-components/overlays/Popover/PopoverContent.vue.d.ts +2 -0
- package/types/lib-components/overlays/Tooltip.vue.d.ts +23 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { Pagination } from "@/composables/nav"
|
|
3
|
-
import { computed
|
|
3
|
+
import { computed } from "vue"
|
|
4
4
|
|
|
5
5
|
const props = defineProps<{
|
|
6
6
|
modelValue: Pagination
|
|
@@ -10,23 +10,19 @@ const emit = defineEmits<{
|
|
|
10
10
|
(e: "update:modelValue", pagination: Pagination): void
|
|
11
11
|
}>()
|
|
12
12
|
|
|
13
|
-
const pagination = ref<Pagination>(props.modelValue)
|
|
14
|
-
|
|
15
|
-
const updateModelValue = () => {
|
|
16
|
-
emit("update:modelValue", pagination.value)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
13
|
const changePage = (page: number): void => {
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
emit("update:modelValue", {
|
|
15
|
+
...props.modelValue,
|
|
16
|
+
page: page,
|
|
17
|
+
})
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
const pageShortcuts = computed((): number[] => {
|
|
25
21
|
const shortcuts: number[] = []
|
|
26
22
|
|
|
27
23
|
// If total pages is less than or equal to 4, just return 1, 2, 3, 4
|
|
28
|
-
if (
|
|
29
|
-
for (let i = 0; i <
|
|
24
|
+
if (props.modelValue.totalPages <= 4) {
|
|
25
|
+
for (let i = 0; i < props.modelValue.totalPages; i++) {
|
|
30
26
|
shortcuts.push(i + 1)
|
|
31
27
|
}
|
|
32
28
|
return shortcuts
|
|
@@ -34,10 +30,10 @@ const pageShortcuts = computed((): number[] => {
|
|
|
34
30
|
|
|
35
31
|
// If there are more than 3 pages left, show these
|
|
36
32
|
// e.g. [4, 5, 6, 7] when there are 8 total pages and the current page is 4
|
|
37
|
-
const pagesLeft: number =
|
|
33
|
+
const pagesLeft: number = props.modelValue.totalPages - props.modelValue.page
|
|
38
34
|
if (pagesLeft >= 3) {
|
|
39
35
|
for (let i = 0; i < 4; i++) {
|
|
40
|
-
shortcuts.push(
|
|
36
|
+
shortcuts.push(props.modelValue.page + i)
|
|
41
37
|
}
|
|
42
38
|
return shortcuts
|
|
43
39
|
}
|
|
@@ -45,7 +41,7 @@ const pageShortcuts = computed((): number[] => {
|
|
|
45
41
|
// If there are less than 3 pages left, count backwards from the last page
|
|
46
42
|
// e.g. [5, 6, 7, 8] when on page 5, 6, 7, and 8 and there are 8 total pages
|
|
47
43
|
for (let i = 0; i < 4; i++) {
|
|
48
|
-
shortcuts.unshift(
|
|
44
|
+
shortcuts.unshift(props.modelValue.totalPages - i)
|
|
49
45
|
}
|
|
50
46
|
return shortcuts
|
|
51
47
|
})
|
|
@@ -56,9 +52,9 @@ const pageShortcuts = computed((): number[] => {
|
|
|
56
52
|
<a
|
|
57
53
|
href="#"
|
|
58
54
|
class="-mt-px border-t-2 border-transparent pt-4 pr-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400"
|
|
59
|
-
@click.prevent="changePage(
|
|
55
|
+
@click.prevent="changePage(modelValue.page - 1)"
|
|
60
56
|
:class="
|
|
61
|
-
|
|
57
|
+
modelValue.page == 1
|
|
62
58
|
? 'text-gray-500 cursor-not-allowed pointer-events-none'
|
|
63
59
|
: 'text-gray-700 hover:text-gray-900 hover:border-gray-300'
|
|
64
60
|
"
|
|
@@ -82,7 +78,7 @@ const pageShortcuts = computed((): number[] => {
|
|
|
82
78
|
:key="i"
|
|
83
79
|
v-text="i"
|
|
84
80
|
:class="
|
|
85
|
-
|
|
81
|
+
modelValue.page === i
|
|
86
82
|
? 'border-blue-500 text-blue-600 focus:outline-none focus:text-blue-800 focus:border-blue-700'
|
|
87
83
|
: 'border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-400'
|
|
88
84
|
"
|
|
@@ -94,9 +90,9 @@ const pageShortcuts = computed((): number[] => {
|
|
|
94
90
|
<a
|
|
95
91
|
href="#"
|
|
96
92
|
class="-mt-px border-t-2 border-transparent pt-4 pl-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400"
|
|
97
|
-
@click.prevent="changePage(
|
|
93
|
+
@click.prevent="changePage(modelValue.page + 1)"
|
|
98
94
|
:class="
|
|
99
|
-
|
|
95
|
+
modelValue.page >= modelValue.totalPages
|
|
100
96
|
? 'text-gray-500 cursor-not-allowed pointer-events-none'
|
|
101
97
|
: 'text-gray-700 hover:text-gray-900 hover:border-gray-300'
|
|
102
98
|
"
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export type PopoverPosition =
|
|
3
|
+
| "top-left"
|
|
4
|
+
| "top-center"
|
|
5
|
+
| "top-right"
|
|
6
|
+
| "bottom-left"
|
|
7
|
+
| "bottom-center"
|
|
8
|
+
| "bottom-right"
|
|
9
|
+
| "left"
|
|
10
|
+
| "right"
|
|
11
|
+
| "auto"
|
|
12
|
+
| "none"
|
|
13
|
+
</script>
|
|
14
|
+
<script lang="ts" setup>
|
|
15
|
+
import { throttle } from "@/helpers/Throttle"
|
|
16
|
+
import {
|
|
17
|
+
Popover as HeadlessPopover,
|
|
18
|
+
PopoverButton as HeadlessPopoverButton,
|
|
19
|
+
PopoverPanel as HeadlessPopoverPanel,
|
|
20
|
+
} from "@headlessui/vue"
|
|
21
|
+
import { computed, onMounted, onUnmounted, ref } from "vue"
|
|
22
|
+
|
|
23
|
+
const props = withDefaults(
|
|
24
|
+
defineProps<{
|
|
25
|
+
as?: string
|
|
26
|
+
position?: PopoverPosition
|
|
27
|
+
}>(),
|
|
28
|
+
{
|
|
29
|
+
as: "div",
|
|
30
|
+
position: "auto",
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
const getViewportDimensions = () => {
|
|
35
|
+
return {
|
|
36
|
+
vw: document.documentElement.clientWidth,
|
|
37
|
+
vh: document.documentElement.clientHeight,
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const trigger = ref<typeof HeadlessPopoverButton>()
|
|
42
|
+
const wrapper = ref<typeof HeadlessPopoverPanel>()
|
|
43
|
+
const viewport = ref<{ vw: number; vh: number }>(getViewportDimensions())
|
|
44
|
+
|
|
45
|
+
const classes = computed(() => {
|
|
46
|
+
const classes = {
|
|
47
|
+
wrapper: "",
|
|
48
|
+
content: "",
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (props.position === "none") {
|
|
52
|
+
return classes
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// defaults classes when positioning
|
|
56
|
+
classes.wrapper = "h-0 flex w-screen"
|
|
57
|
+
classes.content = "absolute"
|
|
58
|
+
|
|
59
|
+
// merge static positioning classes
|
|
60
|
+
if (props.position !== "auto") {
|
|
61
|
+
classes.wrapper += ` ${staticPosition.value.wrapper}`
|
|
62
|
+
classes.content += ` ${staticPosition.value.content}`
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return classes
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
const staticPosition = computed(() => {
|
|
69
|
+
let wrapperClasses = ""
|
|
70
|
+
let contentClasses = ""
|
|
71
|
+
|
|
72
|
+
switch (props.position) {
|
|
73
|
+
case "top-left":
|
|
74
|
+
wrapperClasses = "top-0 right-0 -translate-y-full justify-end"
|
|
75
|
+
contentClasses = "bottom-full"
|
|
76
|
+
break
|
|
77
|
+
case "top-center":
|
|
78
|
+
wrapperClasses =
|
|
79
|
+
"top-0 -translate-y-full -translate-x-full left-1/2 justify-end"
|
|
80
|
+
contentClasses = "bottom-full translate-x-1/2"
|
|
81
|
+
break
|
|
82
|
+
case "top-right":
|
|
83
|
+
wrapperClasses =
|
|
84
|
+
"top-0 -translate-y-full left-0 -translate-x-full justify-end"
|
|
85
|
+
contentClasses = "bottom-full translate-x-full"
|
|
86
|
+
break
|
|
87
|
+
case "bottom-left":
|
|
88
|
+
wrapperClasses = "top-full right-0 justify-end"
|
|
89
|
+
contentClasses = "top-full"
|
|
90
|
+
break
|
|
91
|
+
case "bottom-center":
|
|
92
|
+
wrapperClasses = "top-full -translate-x-full left-1/2 justify-end"
|
|
93
|
+
contentClasses = "top-full translate-x-1/2"
|
|
94
|
+
break
|
|
95
|
+
case "bottom-right":
|
|
96
|
+
wrapperClasses = "top-full left-0 -translate-x-full justify-end"
|
|
97
|
+
contentClasses = "top-full translate-x-full"
|
|
98
|
+
break
|
|
99
|
+
case "left":
|
|
100
|
+
wrapperClasses =
|
|
101
|
+
"top-1/2 left-0 -translate-y-1/2 -translate-x-full justify-end"
|
|
102
|
+
contentClasses = "-translate-y-1/2"
|
|
103
|
+
break
|
|
104
|
+
case "right":
|
|
105
|
+
wrapperClasses = "top-1/2 -translate-y-1/2 right-0 justify-end"
|
|
106
|
+
contentClasses = "translate-x-full -translate-y-1/2"
|
|
107
|
+
break
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
wrapper: wrapperClasses,
|
|
112
|
+
content: contentClasses,
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
const autoPosition = computed(() => {
|
|
117
|
+
if (!wrapper?.value?.el || !trigger?.value?.el) {
|
|
118
|
+
return {}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const { vw, vh } = viewport.value
|
|
122
|
+
|
|
123
|
+
// avoid bumping up against the edge of the browser when possible
|
|
124
|
+
const offset = 10
|
|
125
|
+
|
|
126
|
+
// base the anchor rectangle off of the entire trigger dom element to move around it
|
|
127
|
+
const anchorRect: DOMRect = trigger.value.el.getBoundingClientRect()
|
|
128
|
+
// the content rectangle is best calculated by our first child (content) element inside the wrapper
|
|
129
|
+
const contentRect: DOMRect =
|
|
130
|
+
wrapper.value.el.firstChild.getBoundingClientRect()
|
|
131
|
+
const distToBottom = vh - anchorRect.bottom
|
|
132
|
+
// NOTE: edge case - there may be more space below in the viewport
|
|
133
|
+
// but less document space for display
|
|
134
|
+
// the inverse could also be true - but will be very rare
|
|
135
|
+
// occurring with unreasonably large popover content
|
|
136
|
+
const positionAbove = anchorRect.top > distToBottom
|
|
137
|
+
const distToRight = vw - anchorRect.left
|
|
138
|
+
const flowLeft = anchorRect.left > distToRight
|
|
139
|
+
|
|
140
|
+
// translate the content container on the x axis to the correct position
|
|
141
|
+
// considering the flow the content should take
|
|
142
|
+
let xPos = 0
|
|
143
|
+
if (flowLeft) {
|
|
144
|
+
if (contentRect.width > anchorRect.right) {
|
|
145
|
+
xPos =
|
|
146
|
+
anchorRect.right -
|
|
147
|
+
contentRect.width +
|
|
148
|
+
(contentRect.width - anchorRect.right)
|
|
149
|
+
} else {
|
|
150
|
+
xPos = anchorRect.right - contentRect.width
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (vw > contentRect.width + offset) {
|
|
154
|
+
xPos = xPos + offset
|
|
155
|
+
}
|
|
156
|
+
} else {
|
|
157
|
+
if (contentRect.width > distToRight) {
|
|
158
|
+
xPos = anchorRect.left - (contentRect.width - distToRight)
|
|
159
|
+
} else {
|
|
160
|
+
xPos = anchorRect.left
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (vw > contentRect.width + offset) {
|
|
164
|
+
xPos = xPos - offset
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
wrapper: {
|
|
170
|
+
top: positionAbove ? "auto" : `100%`,
|
|
171
|
+
bottom: positionAbove ? "100%" : `auto`,
|
|
172
|
+
transform: `translate(${anchorRect.left * -1}px, 0)`, // pin to left of window
|
|
173
|
+
width: `${vw}px`,
|
|
174
|
+
},
|
|
175
|
+
content: {
|
|
176
|
+
top: positionAbove ? "auto" : `100%`,
|
|
177
|
+
bottom: positionAbove ? "100%" : `auto`,
|
|
178
|
+
transform: `translate(${xPos}px, 0)`,
|
|
179
|
+
},
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
if (props.position === "auto") {
|
|
184
|
+
const throttledSetPositions = throttle(() => {
|
|
185
|
+
viewport.value = getViewportDimensions()
|
|
186
|
+
})
|
|
187
|
+
|
|
188
|
+
onMounted(() => {
|
|
189
|
+
window.addEventListener("resize", throttledSetPositions)
|
|
190
|
+
window.addEventListener("scroll", throttledSetPositions)
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
onUnmounted(() => {
|
|
194
|
+
window.removeEventListener("resize", throttledSetPositions)
|
|
195
|
+
window.removeEventListener("scroll", throttledSetPositions)
|
|
196
|
+
})
|
|
197
|
+
}
|
|
198
|
+
</script>
|
|
199
|
+
|
|
200
|
+
<template>
|
|
201
|
+
<HeadlessPopover v-slot="{ open, close }" class="relative flex" :as="as">
|
|
202
|
+
<HeadlessPopoverButton ref="trigger">
|
|
203
|
+
<slot name="button" :open="open" :close="close"></slot>
|
|
204
|
+
</HeadlessPopoverButton>
|
|
205
|
+
|
|
206
|
+
<transition
|
|
207
|
+
enter-active-class="transition-opacity transition-faster ease-out-quad"
|
|
208
|
+
leave-active-class="transition-opacity transition-fastest ease-in-quad"
|
|
209
|
+
enter-from-class="opacity-0"
|
|
210
|
+
enter-to-class="opacity-100"
|
|
211
|
+
leave-from-class="opacity-100"
|
|
212
|
+
leave-to-class="opacity-0"
|
|
213
|
+
>
|
|
214
|
+
<HeadlessPopoverPanel
|
|
215
|
+
ref="wrapper"
|
|
216
|
+
class="absolute z-10"
|
|
217
|
+
:class="classes.wrapper"
|
|
218
|
+
:style="position === 'auto' ? autoPosition.wrapper : {}"
|
|
219
|
+
>
|
|
220
|
+
<div
|
|
221
|
+
:class="classes.content"
|
|
222
|
+
:style="position === 'auto' ? autoPosition.content : {}"
|
|
223
|
+
>
|
|
224
|
+
<slot :open="open" :close="close"></slot>
|
|
225
|
+
</div>
|
|
226
|
+
</HeadlessPopoverPanel>
|
|
227
|
+
</transition>
|
|
228
|
+
</HeadlessPopover>
|
|
229
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import Popover, { PopoverPosition } from "./Popover/Popover.vue"
|
|
3
|
+
import { InformationCircleIcon } from "@heroicons/vue/outline"
|
|
4
|
+
|
|
5
|
+
withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
as?: string
|
|
8
|
+
position?: PopoverPosition
|
|
9
|
+
}>(),
|
|
10
|
+
{
|
|
11
|
+
as: "span",
|
|
12
|
+
position: "auto",
|
|
13
|
+
}
|
|
14
|
+
)
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<Popover :position="position" :as="as">
|
|
19
|
+
<template #button>
|
|
20
|
+
<div class="leading-none w-4 h-4">
|
|
21
|
+
<InformationCircleIcon />
|
|
22
|
+
<!--creates a larger clickable surface area 40 x 40-->
|
|
23
|
+
<div
|
|
24
|
+
class="p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
25
|
+
></div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<div
|
|
29
|
+
class="w-full max-w-xs bg-white rounded-md px-3 py-2 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium"
|
|
30
|
+
>
|
|
31
|
+
<slot></slot>
|
|
32
|
+
</div>
|
|
33
|
+
</Popover>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function debounce(func: () => void, timeout?: number): () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function throttle(func: () => void, timeout?: number): (...args: any[]) => void;
|
|
@@ -4,19 +4,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
} & {
|
|
5
5
|
default: string;
|
|
6
6
|
};
|
|
7
|
+
help: {
|
|
8
|
+
type: import("vue").PropType<string>;
|
|
9
|
+
} & {
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
7
12
|
modelValue: {
|
|
8
13
|
type: import("vue").PropType<boolean>;
|
|
9
14
|
required: true;
|
|
10
15
|
};
|
|
11
16
|
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
12
17
|
label?: unknown;
|
|
18
|
+
help?: unknown;
|
|
13
19
|
modelValue?: unknown;
|
|
14
20
|
} & {
|
|
15
21
|
modelValue: boolean;
|
|
16
22
|
label: string;
|
|
23
|
+
help: string;
|
|
17
24
|
} & {}> & {
|
|
18
25
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
19
26
|
}, {
|
|
20
27
|
label: string;
|
|
28
|
+
help: string;
|
|
21
29
|
}>;
|
|
22
30
|
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
disabled: {
|
|
3
|
+
type: import("vue").PropType<boolean>;
|
|
4
|
+
} & {
|
|
5
|
+
default: boolean;
|
|
6
|
+
};
|
|
2
7
|
label: {
|
|
3
8
|
type: import("vue").PropType<string>;
|
|
4
9
|
} & {
|
|
@@ -10,12 +15,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10
15
|
default: string;
|
|
11
16
|
};
|
|
12
17
|
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
18
|
+
disabled?: unknown;
|
|
13
19
|
label?: unknown;
|
|
14
20
|
tag?: unknown;
|
|
15
21
|
} & {
|
|
22
|
+
disabled: boolean;
|
|
16
23
|
label: string;
|
|
17
24
|
tag: string;
|
|
18
25
|
} & {}>, {
|
|
26
|
+
disabled: boolean;
|
|
19
27
|
label: string;
|
|
20
28
|
tag: string;
|
|
21
29
|
}>;
|
|
@@ -1,34 +1,59 @@
|
|
|
1
|
+
declare type CheckboxValue = string | number;
|
|
2
|
+
declare type ModelValue = CheckboxValue[];
|
|
1
3
|
declare const _default: import("vue").DefineComponent<{
|
|
2
4
|
options: {
|
|
3
5
|
type: import("vue").PropType<{
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
|
+
help?: string | undefined;
|
|
4
8
|
label: string;
|
|
5
|
-
value:
|
|
9
|
+
value: CheckboxValue;
|
|
6
10
|
}[]>;
|
|
7
11
|
required: true;
|
|
8
12
|
};
|
|
13
|
+
help: {
|
|
14
|
+
type: import("vue").PropType<string>;
|
|
15
|
+
} & {
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
9
18
|
legend: {
|
|
10
19
|
type: import("vue").PropType<string>;
|
|
11
20
|
} & {
|
|
12
21
|
default: string;
|
|
13
22
|
};
|
|
14
23
|
modelValue: {
|
|
15
|
-
type: import("vue").PropType<
|
|
24
|
+
type: import("vue").PropType<ModelValue>;
|
|
16
25
|
required: true;
|
|
17
26
|
};
|
|
18
|
-
|
|
27
|
+
columns: {
|
|
28
|
+
type: import("vue").PropType<2 | 4 | 3>;
|
|
29
|
+
} & {
|
|
30
|
+
default: undefined;
|
|
31
|
+
};
|
|
32
|
+
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
"update:modelValue": (modelValue: ModelValue) => void;
|
|
34
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
19
35
|
options?: unknown;
|
|
36
|
+
help?: unknown;
|
|
20
37
|
legend?: unknown;
|
|
21
38
|
modelValue?: unknown;
|
|
39
|
+
columns?: unknown;
|
|
22
40
|
} & {
|
|
23
|
-
modelValue:
|
|
41
|
+
modelValue: ModelValue;
|
|
42
|
+
help: string;
|
|
24
43
|
options: {
|
|
44
|
+
disabled?: boolean | undefined;
|
|
45
|
+
help?: string | undefined;
|
|
25
46
|
label: string;
|
|
26
|
-
value:
|
|
47
|
+
value: CheckboxValue;
|
|
27
48
|
}[];
|
|
28
49
|
legend: string;
|
|
29
|
-
} & {
|
|
30
|
-
|
|
50
|
+
} & {
|
|
51
|
+
columns?: 2 | 4 | 3 | undefined;
|
|
52
|
+
}> & {
|
|
53
|
+
"onUpdate:modelValue"?: ((modelValue: ModelValue) => any) | undefined;
|
|
31
54
|
}, {
|
|
55
|
+
help: string;
|
|
32
56
|
legend: string;
|
|
57
|
+
columns: 2 | 4 | 3;
|
|
33
58
|
}>;
|
|
34
59
|
export default _default;
|
|
@@ -1,44 +1,57 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
options: {
|
|
3
3
|
type: import("vue").PropType<{
|
|
4
|
+
disabled?: boolean | undefined;
|
|
5
|
+
help?: string | undefined;
|
|
4
6
|
label: string;
|
|
5
|
-
value: string;
|
|
7
|
+
value: string | number;
|
|
6
8
|
}[]>;
|
|
7
9
|
required: true;
|
|
8
10
|
};
|
|
9
|
-
|
|
11
|
+
help: {
|
|
10
12
|
type: import("vue").PropType<string>;
|
|
11
13
|
} & {
|
|
12
14
|
default: string;
|
|
13
15
|
};
|
|
14
|
-
|
|
16
|
+
legend: {
|
|
15
17
|
type: import("vue").PropType<string>;
|
|
16
18
|
} & {
|
|
17
19
|
default: string;
|
|
18
20
|
};
|
|
19
|
-
|
|
20
|
-
type: import("vue").PropType<
|
|
21
|
+
modelValue: {
|
|
22
|
+
type: import("vue").PropType<string | number>;
|
|
21
23
|
} & {
|
|
22
|
-
default:
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
26
|
+
columns: {
|
|
27
|
+
type: import("vue").PropType<2 | 4 | 3>;
|
|
28
|
+
} & {
|
|
29
|
+
default: undefined;
|
|
23
30
|
};
|
|
24
31
|
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
25
32
|
options?: unknown;
|
|
33
|
+
help?: unknown;
|
|
26
34
|
legend?: unknown;
|
|
27
35
|
modelValue?: unknown;
|
|
28
|
-
|
|
36
|
+
columns?: unknown;
|
|
29
37
|
} & {
|
|
30
|
-
|
|
38
|
+
help: string;
|
|
31
39
|
options: {
|
|
40
|
+
disabled?: boolean | undefined;
|
|
41
|
+
help?: string | undefined;
|
|
32
42
|
label: string;
|
|
33
|
-
value: string;
|
|
43
|
+
value: string | number;
|
|
34
44
|
}[];
|
|
35
45
|
legend: string;
|
|
36
|
-
|
|
37
|
-
|
|
46
|
+
} & {
|
|
47
|
+
modelValue?: string | number | undefined;
|
|
48
|
+
columns?: 2 | 4 | 3 | undefined;
|
|
49
|
+
}> & {
|
|
38
50
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
39
51
|
}, {
|
|
40
|
-
modelValue: string;
|
|
52
|
+
modelValue: string | number;
|
|
53
|
+
help: string;
|
|
41
54
|
legend: string;
|
|
42
|
-
|
|
55
|
+
columns: 2 | 4 | 3;
|
|
43
56
|
}>;
|
|
44
57
|
export default _default;
|
|
@@ -4,6 +4,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
} & {
|
|
5
5
|
default: undefined;
|
|
6
6
|
};
|
|
7
|
+
help: {
|
|
8
|
+
type: import("vue").PropType<string>;
|
|
9
|
+
} & {
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
7
12
|
legend: {
|
|
8
13
|
type: import("vue").PropType<string>;
|
|
9
14
|
} & {
|
|
@@ -16,9 +21,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
21
|
};
|
|
17
22
|
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
18
23
|
modelValue?: unknown;
|
|
24
|
+
help?: unknown;
|
|
19
25
|
legend?: unknown;
|
|
20
26
|
name?: unknown;
|
|
21
27
|
} & {
|
|
28
|
+
help: string;
|
|
22
29
|
legend: string;
|
|
23
30
|
name: string;
|
|
24
31
|
} & {
|
|
@@ -27,6 +34,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
34
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
28
35
|
}, {
|
|
29
36
|
modelValue: boolean;
|
|
37
|
+
help: string;
|
|
30
38
|
legend: string;
|
|
31
39
|
name: string;
|
|
32
40
|
}>;
|
|
@@ -7,7 +7,11 @@ import { default as DownloadCell } from "./lists/DownloadCell.vue";
|
|
|
7
7
|
import { default as Flash } from "./overlays/Flash.vue";
|
|
8
8
|
import { default as Modal } from "./overlays/Modal.vue";
|
|
9
9
|
import { default as SidebarLayout } from "./layout/SidebarLayout.vue";
|
|
10
|
+
import { default as Popover } from "./overlays/Popover/Popover.vue";
|
|
11
|
+
import { default as PopoverPosition } from "./overlays/Popover/Popover.vue";
|
|
12
|
+
import { default as PopoverContent } from "./overlays/Popover/PopoverContent.vue";
|
|
10
13
|
import { default as Slideover } from "./overlays/Slideover.vue";
|
|
14
|
+
import { default as Tooltip } from "./overlays/Tooltip.vue";
|
|
11
15
|
import { default as StackedLayout } from "./layout/StackedLayout.vue";
|
|
12
16
|
import { default as Paginator } from "./navigation/Paginator.vue";
|
|
13
17
|
import { default as Spinner } from "./overlays/Spinner.vue";
|
|
@@ -21,12 +25,14 @@ import { default as Checkbox } from "./forms/Checkbox.vue";
|
|
|
21
25
|
import { default as DateRangePicker } from "./forms/DateRangePicker.vue";
|
|
22
26
|
import { default as InputHelp } from "./forms/InputHelp.vue";
|
|
23
27
|
import { default as InputLabel } from "./forms/InputLabel.vue";
|
|
28
|
+
import { default as FieldsetLegend } from "./forms/FieldsetLegend.vue";
|
|
24
29
|
import { default as MultiCheckboxes } from "./forms/MultiCheckboxes.vue";
|
|
25
30
|
import { default as Radio } from "./forms/Radio.vue";
|
|
26
31
|
import { default as Select } from "./forms/Select.vue";
|
|
27
32
|
import { default as TextArea } from "./forms/TextArea.vue";
|
|
28
33
|
import { default as YesOrNoRadio } from "./forms/YesOrNoRadio.vue";
|
|
29
|
-
export { ActionsDropdown, Cards, ContentModal, DateFilter, DetailList, DownloadCell, Flash, Modal, SidebarLayout, Slideover, StackedLayout,
|
|
34
|
+
export { ActionsDropdown, Cards, ContentModal, DateFilter, DetailList, DownloadCell, Flash, Modal, SidebarLayout, Slideover, StackedLayout, Popover, PopoverContent, PopoverPosition, // Type export
|
|
35
|
+
Paginator, Spinner, StaticTable, Steps, Table, Tabs, Toggle, Tooltip, BaseInput, Checkbox, DateRangePicker, InputHelp, InputLabel, FieldsetLegend, MultiCheckboxes, Radio, Select, TextArea, YesOrNoRadio, };
|
|
30
36
|
/**
|
|
31
37
|
* declare global component types for App.use(Trees)
|
|
32
38
|
*/
|
|
@@ -41,6 +47,8 @@ export interface TreesComponents {
|
|
|
41
47
|
Modal: typeof Modal;
|
|
42
48
|
SidebarLayout: typeof SidebarLayout;
|
|
43
49
|
Slideover: typeof Slideover;
|
|
50
|
+
Popover: typeof Popover;
|
|
51
|
+
PopoverContent: typeof PopoverContent;
|
|
44
52
|
StackedLayout: typeof StackedLayout;
|
|
45
53
|
Paginator: typeof Paginator;
|
|
46
54
|
Spinner: typeof Spinner;
|
|
@@ -49,11 +57,13 @@ export interface TreesComponents {
|
|
|
49
57
|
Table: typeof Table;
|
|
50
58
|
Tabs: typeof Tabs;
|
|
51
59
|
Toggle: typeof Toggle;
|
|
60
|
+
Tooltip: typeof Tooltip;
|
|
52
61
|
BaseInput: typeof BaseInput;
|
|
53
62
|
Checkbox: typeof Checkbox;
|
|
54
63
|
DateRangePicker: typeof DateRangePicker;
|
|
55
64
|
InputHelp: typeof InputHelp;
|
|
56
65
|
InputLabel: typeof InputLabel;
|
|
66
|
+
FieldsetLegend: typeof FieldsetLegend;
|
|
57
67
|
MultiCheckboxes: typeof MultiCheckboxes;
|
|
58
68
|
Radio: typeof Radio;
|
|
59
69
|
Select: typeof Select;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare type PopoverPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | "left" | "right" | "auto" | "none";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
as: {
|
|
4
|
+
type: import("vue").PropType<string>;
|
|
5
|
+
} & {
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
position: {
|
|
9
|
+
type: import("vue").PropType<PopoverPosition>;
|
|
10
|
+
} & {
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
14
|
+
as?: unknown;
|
|
15
|
+
position?: unknown;
|
|
16
|
+
} & {
|
|
17
|
+
as: string;
|
|
18
|
+
position: PopoverPosition;
|
|
19
|
+
} & {}>, {
|
|
20
|
+
as: string;
|
|
21
|
+
position: PopoverPosition;
|
|
22
|
+
}>;
|
|
23
|
+
export default _default;
|