@xy-planning-network/trees 0.6.0-rc-1 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xy-planning-network/trees",
3
- "version": "0.6.0-rc-1",
3
+ "version": "0.6.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": "github:xy-planning-network/trees",
@@ -15,7 +15,7 @@ const attrs = useAttrs()
15
15
  <p class="sr-only">
16
16
  <slot></slot>
17
17
  </p>
18
- <div class="animate-spin-gear">
18
+ <div class="animate-spin-gear drop-shadow-md">
19
19
  <svg
20
20
  width="100%"
21
21
  height="100%"
@@ -40,7 +40,7 @@ const isActive = (url: string): boolean => {
40
40
  <Dialog
41
41
  as="div"
42
42
  static
43
- class="fixed inset-0 flex z-40 md:hidden"
43
+ class="fixed inset-0 flex z-10 md:hidden"
44
44
  @close="sidebarOpen = false"
45
45
  :open="sidebarOpen"
46
46
  >
@@ -30,7 +30,7 @@ const updateModelValue = (value: boolean) => {
30
30
  <Dialog
31
31
  as="div"
32
32
  static
33
- class="fixed z-10 inset-0 overflow-y-auto"
33
+ class="fixed z-30 inset-0 overflow-y-auto"
34
34
  @close="updateModelValue(false)"
35
35
  :open="modelValue"
36
36
  >
@@ -5,6 +5,7 @@ import {
5
5
  loadWindowFlashes,
6
6
  } from "@/composables/useFlashes"
7
7
  import { onMounted } from "vue"
8
+ import { Portal } from "@headlessui/vue"
8
9
 
9
10
  const { flasher, flashes } = useAppFlashes()
10
11
 
@@ -28,56 +29,62 @@ onMounted(() => {
28
29
  })
29
30
  </script>
30
31
  <template>
31
- <div
32
- class="fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-40"
33
- >
34
- <transition-group
35
- tag="div"
36
- class="max-w-sm space-y-2 w-full"
37
- enter-active-class="ease-out duration-300"
38
- enter-from-class="translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2"
39
- enter-to-class="translate-y-0 opacity-100 sm:translate-x-0"
40
- leave-active-class="ease-in duration-100"
41
- leave-from-class="opacity-100"
42
- leave-to-class="opacity-0"
32
+ <Portal>
33
+ <div
34
+ class="fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"
43
35
  >
44
- <div
45
- v-for="[id, flash] in flashes"
46
- :key="flash.message"
47
- class="bg-white shadow-lg rounded-lg pointer-events-auto border-t-4 transform"
48
- :class="[getFlashClass(flash.type)]"
36
+ <transition-group
37
+ tag="div"
38
+ class="max-w-sm space-y-2 w-full"
39
+ enter-active-class="ease-out duration-300"
40
+ enter-from-class="translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2"
41
+ enter-to-class="translate-y-0 opacity-100 sm:translate-x-0"
42
+ leave-active-class="ease-in duration-100"
43
+ leave-from-class="opacity-100"
44
+ leave-to-class="opacity-0"
49
45
  >
50
46
  <div
51
- class="rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"
47
+ v-for="[id, flash] in flashes"
48
+ :key="flash.message"
49
+ class="bg-white shadow-lg rounded-lg pointer-events-auto border-t-4 transform z-10"
50
+ :class="[getFlashClass(flash.type)]"
52
51
  >
53
- <div class="p-4">
54
- <div class="flex items-center">
55
- <div class="w-0 flex-1 flex justify-between">
56
- <p
57
- class="w-0 flex-1 text-sm leading-5 font-medium text-gray-900"
58
- v-html="flash.message"
59
- ></p>
60
- </div>
61
- <div class="ml-4 shrink-0 flex">
62
- <button
63
- @click="flasher.remove(id)"
64
- class="inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150"
65
- >
66
- <svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
67
- <path
68
- fill-rule="evenodd"
69
- d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
70
- clip-rule="evenodd"
71
- />
72
- </svg>
73
- </button>
52
+ <div
53
+ class="rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"
54
+ >
55
+ <div class="p-4">
56
+ <div class="flex items-center">
57
+ <div class="w-0 flex-1 flex justify-between">
58
+ <p
59
+ class="w-0 flex-1 text-sm leading-5 font-medium text-gray-900"
60
+ v-html="flash.message"
61
+ ></p>
62
+ </div>
63
+ <div class="ml-4 shrink-0 flex">
64
+ <button
65
+ @click="flasher.remove(id)"
66
+ class="inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150"
67
+ >
68
+ <svg
69
+ class="h-5 w-5"
70
+ viewBox="0 0 20 20"
71
+ fill="currentColor"
72
+ >
73
+ <path
74
+ fill-rule="evenodd"
75
+ d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
76
+ clip-rule="evenodd"
77
+ />
78
+ </svg>
79
+ </button>
80
+ </div>
74
81
  </div>
75
82
  </div>
76
83
  </div>
77
84
  </div>
78
- </div>
79
- </transition-group>
80
- </div>
85
+ </transition-group>
86
+ </div>
87
+ </Portal>
81
88
  </template>
82
89
 
83
90
  <style>
@@ -42,7 +42,7 @@ const updateModelValue = (value: boolean) => {
42
42
  <Dialog
43
43
  as="div"
44
44
  static
45
- class="fixed z-10 inset-0 overflow-y-auto"
45
+ class="fixed z-30 inset-0 overflow-y-auto"
46
46
  @close="updateModelValue(false)"
47
47
  :open="modelValue"
48
48
  >
@@ -33,7 +33,7 @@ const close = () => {
33
33
  <Dialog
34
34
  as="div"
35
35
  static
36
- class="fixed inset-0 z-40 overflow-hidden bg-black bg-opacity-50"
36
+ class="fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50"
37
37
  @close="close()"
38
38
  :open="modelValue"
39
39
  >
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import { Portal } from "@headlessui/vue"
2
3
  import XYSpinner from "../indicators/XYSpinner.vue"
3
4
  import { useAppSpinnerDisplay } from "@/composables/useSpinner"
4
5
 
@@ -22,30 +23,32 @@ const fadeOut = (): void => {
22
23
  }
23
24
  </script>
24
25
  <template>
25
- <div
26
- class="fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-50 bg-gray-50 bg-opacity-50"
27
- v-if="loading"
28
- >
29
- <XYSpinner class="w-32 h-32" />
30
- <div class="mt-2" v-show="messages">
31
- <transition
32
- appear
33
- enter-active-class="ease-out duration-1000"
34
- enter-from-class="opacity-0"
35
- enter-to-class="opacity-100"
36
- leave-active-class="ease-in duration-500"
37
- leave-from-class="opacity-100"
38
- leave-to-class="opacity-0"
39
- @after-enter="fadeOut"
40
- @after-leave="fadeIn"
41
- >
42
- <div
43
- class="container font-medium text-lg leading-snug text-center transition-opacity"
44
- v-show="showMsg"
26
+ <Portal>
27
+ <div
28
+ class="fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-40 bg-gray-50 bg-opacity-50"
29
+ v-if="loading"
30
+ >
31
+ <XYSpinner class="w-32 h-32" />
32
+ <div class="mt-2" v-show="messages">
33
+ <transition
34
+ appear
35
+ enter-active-class="ease-out duration-1000"
36
+ enter-from-class="opacity-0"
37
+ enter-to-class="opacity-100"
38
+ leave-active-class="ease-in duration-500"
39
+ leave-from-class="opacity-100"
40
+ leave-to-class="opacity-0"
41
+ @after-enter="fadeOut"
42
+ @after-leave="fadeIn"
45
43
  >
46
- {{ msg }}
47
- </div>
48
- </transition>
44
+ <div
45
+ class="container font-medium text-lg leading-snug text-center transition-opacity"
46
+ v-show="showMsg"
47
+ >
48
+ {{ msg }}
49
+ </div>
50
+ </transition>
51
+ </div>
49
52
  </div>
50
- </div>
53
+ </Portal>
51
54
  </template>
@@ -1 +0,0 @@
1
- export declare function getBaseUrl(): string;
@@ -1,19 +0,0 @@
1
- import { VNode } from "vue";
2
- import { Options, Placement } from "@popperjs/core";
3
- export declare type PopperPosition = Placement;
4
- export declare const offsetModifier: (skidding: number, distance: number) => {
5
- options: {
6
- offset: () => number[];
7
- };
8
- name: "offset";
9
- enabled: boolean;
10
- phase: import("@popperjs/core").ModifierPhases;
11
- requires?: string[] | undefined;
12
- requiresIfExists?: string[] | undefined;
13
- fn: (arg0: import("@popperjs/core").ModifierArguments<import("@popperjs/core/lib/modifiers/offset").Options>) => void | import("@popperjs/core").State;
14
- effect?: ((arg0: import("@popperjs/core").ModifierArguments<import("@popperjs/core/lib/modifiers/offset").Options>) => void | (() => void)) | undefined;
15
- data?: import("@popperjs/core").Obj | undefined;
16
- };
17
- export declare function usePopper(opts: Partial<Options>): import("vue").Ref<VNode<import("vue").RendererNode, import("vue").RendererElement, {
18
- [key: string]: any;
19
- }> | HTMLElement | undefined>[];
@@ -1,12 +0,0 @@
1
- export interface Pagination {
2
- page: number;
3
- perPage: number;
4
- totalItems: number;
5
- totalPages: number;
6
- }
7
- export interface PaginationItems<T = any> {
8
- items: T[];
9
- }
10
- export interface PaginationData<T = any> {
11
- data: Pagination & PaginationItems<T>;
12
- }