@xy-planning-network/trees 0.5.0 → 0.6.0-rc-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 +1 -2
- package/config/tailwind.config.js +6 -20
- package/config/theme/colors.js +12 -1
- package/dist/style.css +1 -1
- package/dist/trees.es.js +217 -141
- package/dist/trees.umd.js +6 -6
- package/package.json +13 -11
- package/src/lib-components/forms/Toggle.vue +1 -1
- package/src/lib-components/indicators/XYSpinner.vue +1 -1
- package/src/lib-components/layout/SidebarLayout.vue +7 -7
- package/src/lib-components/layout/StackedLayout.vue +2 -2
- package/src/lib-components/navigation/Steps.vue +1 -1
- package/src/lib-components/overlays/Flash.vue +1 -1
- package/types/api/url.d.ts +1 -0
- package/types/composables/usePopper.d.ts +19 -0
- package/types/types/lists.d.ts +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xy-planning-network/trees",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0-rc-1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "github:xy-planning-network/trees",
|
|
@@ -31,13 +31,16 @@
|
|
|
31
31
|
"typecheck": "vue-tsc -p src --noEmit"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
+
"@tailwindcss/forms": "^0.5.3",
|
|
35
|
+
"@tailwindcss/line-clamp": "^0.4.2",
|
|
36
|
+
"@tailwindcss/typography": "^0.5.7",
|
|
34
37
|
"@types/node": "^16.11.13",
|
|
35
38
|
"@typescript-eslint/eslint-plugin": "^5.7.0",
|
|
36
39
|
"@typescript-eslint/parser": "^5.7.0",
|
|
37
40
|
"@vitejs/plugin-vue": "^2.0.0",
|
|
38
41
|
"@vue/eslint-config-prettier": "^6.0.0",
|
|
39
42
|
"@vue/eslint-config-typescript": "^9.1.0",
|
|
40
|
-
"autoprefixer": "^10.4.
|
|
43
|
+
"autoprefixer": "^10.4.13",
|
|
41
44
|
"copyfiles": "^2.4.1",
|
|
42
45
|
"deepmerge": "^4.2.2",
|
|
43
46
|
"eslint": "^8.4.1",
|
|
@@ -47,8 +50,8 @@
|
|
|
47
50
|
"eslint-plugin-prettier": "^3.4.1",
|
|
48
51
|
"eslint-plugin-vue": "^8.2.0",
|
|
49
52
|
"mitt": "^2.1.0",
|
|
50
|
-
"postcss": "^8.4.
|
|
51
|
-
"tailwindcss": "^
|
|
53
|
+
"postcss": "^8.4.18",
|
|
54
|
+
"tailwindcss": "^3.2.1",
|
|
52
55
|
"tsc-alias": "^1.5.0",
|
|
53
56
|
"typescript": "^4.4.4",
|
|
54
57
|
"vite": "^2.7.2",
|
|
@@ -62,13 +65,12 @@
|
|
|
62
65
|
"flatpickr": "^4.6.9"
|
|
63
66
|
},
|
|
64
67
|
"peerDependencies": {
|
|
65
|
-
"@tailwindcss/
|
|
66
|
-
"@tailwindcss/
|
|
67
|
-
"@tailwindcss/
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"tailwindcss": "^2.2.19",
|
|
68
|
+
"@tailwindcss/forms": "^0.5.2",
|
|
69
|
+
"@tailwindcss/line-clamp": "^0.4.0",
|
|
70
|
+
"@tailwindcss/typography": "^0.5.2",
|
|
71
|
+
"autoprefixer": "^10.4.7",
|
|
72
|
+
"postcss": "^8.4.14",
|
|
73
|
+
"tailwindcss": "^3.1.4",
|
|
72
74
|
"vue": "^3.2.0"
|
|
73
75
|
},
|
|
74
76
|
"engines": {
|
|
@@ -10,7 +10,7 @@ const emits = defineEmits(["update:modelValue"])
|
|
|
10
10
|
<Switch
|
|
11
11
|
:class="[
|
|
12
12
|
modelValue ? 'bg-blue-600' : 'bg-gray-200',
|
|
13
|
-
'relative inline-flex
|
|
13
|
+
'relative inline-flex shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500',
|
|
14
14
|
]"
|
|
15
15
|
:modelValue="modelValue"
|
|
16
16
|
@update:modelValue="emits('update:modelValue', $event)"
|
|
@@ -10,7 +10,7 @@ const attrs = useAttrs()
|
|
|
10
10
|
</script>
|
|
11
11
|
<template>
|
|
12
12
|
<div :class="attrs?.class ? attrs?.class : 'h-20 w-20'">
|
|
13
|
-
<div class="aspect-
|
|
13
|
+
<div class="aspect-square overflow-hidden">
|
|
14
14
|
<div class="flex justify-center relative">
|
|
15
15
|
<p class="sr-only">
|
|
16
16
|
<slot></slot>
|
|
@@ -86,7 +86,7 @@ const isActive = (url: string): boolean => {
|
|
|
86
86
|
</button>
|
|
87
87
|
</div>
|
|
88
88
|
</TransitionChild>
|
|
89
|
-
<div class="
|
|
89
|
+
<div class="shrink-0 flex justify-center px-4">
|
|
90
90
|
<img class="w-auto h-12" :src="iconURL" alt="Logo" />
|
|
91
91
|
</div>
|
|
92
92
|
<div class="mt-5 flex-1 h-0 overflow-y-auto">
|
|
@@ -119,23 +119,23 @@ const isActive = (url: string): boolean => {
|
|
|
119
119
|
</div>
|
|
120
120
|
</div>
|
|
121
121
|
</TransitionChild>
|
|
122
|
-
<div class="
|
|
122
|
+
<div class="shrink-0 w-14" aria-hidden="true">
|
|
123
123
|
<!-- Dummy element to force sidebar to shrink to fit close icon -->
|
|
124
124
|
</div>
|
|
125
125
|
</Dialog>
|
|
126
126
|
</TransitionRoot>
|
|
127
127
|
|
|
128
128
|
<!-- Static sidebar for desktop -->
|
|
129
|
-
<div class="hidden md:flex md:
|
|
129
|
+
<div class="hidden md:flex md:shrink-0">
|
|
130
130
|
<div class="flex flex-col w-64">
|
|
131
131
|
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
|
132
132
|
<div
|
|
133
|
-
class="flex flex-col
|
|
133
|
+
class="flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"
|
|
134
134
|
>
|
|
135
|
-
<div class="flex items-center
|
|
135
|
+
<div class="flex items-center shrink-0 px-4">
|
|
136
136
|
<img class="w-auto h-12" :src="iconURL" alt="Logo" />
|
|
137
137
|
</div>
|
|
138
|
-
<div class="mt-5
|
|
138
|
+
<div class="mt-5 grow flex flex-col">
|
|
139
139
|
<nav class="flex-1 px-2 bg-white space-y-1">
|
|
140
140
|
<a
|
|
141
141
|
v-for="item in navigation"
|
|
@@ -167,7 +167,7 @@ const isActive = (url: string): boolean => {
|
|
|
167
167
|
</div>
|
|
168
168
|
</div>
|
|
169
169
|
<div class="flex flex-col w-0 flex-1 overflow-hidden">
|
|
170
|
-
<div class="relative z-10
|
|
170
|
+
<div class="relative z-10 shrink-0 flex h-16 bg-xy-blue shadow">
|
|
171
171
|
<button
|
|
172
172
|
class="px-4 border-r border-gray-200 text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500 md:hidden"
|
|
173
173
|
@click="sidebarOpen = true"
|
|
@@ -36,7 +36,7 @@ const isActive = (url: string): boolean => {
|
|
|
36
36
|
<div class="mx-auto px-4 sm:px-6 lg:px-8">
|
|
37
37
|
<div class="flex justify-between h-16">
|
|
38
38
|
<div class="flex">
|
|
39
|
-
<div class="
|
|
39
|
+
<div class="shrink-0 flex items-center">
|
|
40
40
|
<img class="block h-8 w-auto" :src="iconURL" alt="XY Trees" />
|
|
41
41
|
</div>
|
|
42
42
|
<div class="hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8">
|
|
@@ -126,7 +126,7 @@ const isActive = (url: string): boolean => {
|
|
|
126
126
|
</div>
|
|
127
127
|
<div class="pt-4 pb-3 border-t border-gray-200">
|
|
128
128
|
<div class="flex items-center px-4">
|
|
129
|
-
<div class="
|
|
129
|
+
<div class="shrink-0">
|
|
130
130
|
<UserCircleIcon class="text-gray-500 h-10 w-10 rounded-full" />
|
|
131
131
|
</div>
|
|
132
132
|
<div class="ml-3">
|
|
@@ -58,7 +58,7 @@ onMounted(() => {
|
|
|
58
58
|
v-html="flash.message"
|
|
59
59
|
></p>
|
|
60
60
|
</div>
|
|
61
|
-
<div class="ml-4
|
|
61
|
+
<div class="ml-4 shrink-0 flex">
|
|
62
62
|
<button
|
|
63
63
|
@click="flasher.remove(id)"
|
|
64
64
|
class="inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getBaseUrl(): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
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>[];
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
}
|