@xy-planning-network/trees 0.11.0 → 0.11.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 +509 -504
- package/dist/trees.umd.js +9 -9
- package/package.json +2 -2
- package/src/index.css +24 -5
- package/src/lib-components/forms/BaseInput.vue +5 -0
- package/types/composables/forms.d.ts +13 -0
- package/types/entry.d.ts +2 -2
- package/types/lib-components/forms/RadioCards.vue.d.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xy-planning-network/trees",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "github:xy-planning-network/trees",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"unplugin-vue-components": "^0.27.4",
|
|
55
55
|
"unplugin-vue-markdown": "^0.25.2",
|
|
56
56
|
"vite": "^5.4.10",
|
|
57
|
-
"vue-tsc": "^2.1.
|
|
57
|
+
"vue-tsc": "^2.1.10"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@floating-ui/vue": "^1.0.1",
|
package/src/index.css
CHANGED
|
@@ -77,6 +77,18 @@
|
|
|
77
77
|
@apply inline-flex justify-center items-center px-5 py-2.5 border border-transparent text-base font-display font-semibold rounded-3xl shadow-sm text-white bg-xy-blue-600 hover:bg-xy-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:bg-xy-blue-600 disabled:opacity-50 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
.xy-btn-alt-sm {
|
|
81
|
+
@apply inline-flex justify-center items-center px-2.5 py-1.5 border border-transparent text-xs font-display font-semibold rounded-3xl shadow-sm text-xy-black bg-xy-green-200 hover:bg-xy-green-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-green-100 disabled:bg-xy-green-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.xy-btn-alt {
|
|
85
|
+
@apply inline-flex justify-center items-center px-4 py-2 border border-transparent text-sm font-display font-semibold rounded-3xl shadow-sm text-xy-black bg-xy-green-200 hover:bg-xy-green-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-green-100 disabled:bg-xy-green-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.xy-btn-alt-lg {
|
|
89
|
+
@apply inline-flex justify-center items-center px-5 py-2.5 border border-transparent text-base font-display font-semibold rounded-3xl shadow-sm text-xy-black bg-xy-green-200 hover:bg-xy-green-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-green-100 disabled:bg-xy-green-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
|
|
90
|
+
}
|
|
91
|
+
|
|
80
92
|
/* NOTE(spk): including .xy-btn-red alias for backwards compatibility */
|
|
81
93
|
.xy-btn-danger-sm,
|
|
82
94
|
.xy-btn-red-sm {
|
|
@@ -105,6 +117,18 @@
|
|
|
105
117
|
@apply inline-flex justify-center items-center px-5 py-2.5 border border-transparent text-base font-display font-semibold rounded-3xl shadow-none text-neutral-800 bg-transparent hover:bg-neutral-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:bg-transparent disabled:text-neutral-600 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
|
|
106
118
|
}
|
|
107
119
|
|
|
120
|
+
.xy-btn-neutral-inverse-sm {
|
|
121
|
+
@apply inline-flex justify-center items-center px-2.5 py-1.5 border border-transparent text-xs font-display font-semibold rounded-3xl shadow-none text-neutral-800 bg-white hover:bg-white/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:bg-white/90 disabled:text-neutral-700 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.xy-btn-neutral-inverse {
|
|
125
|
+
@apply inline-flex justify-center items-center px-4 py-2 border border-transparent text-sm font-display font-semibold rounded-3xl shadow-none text-neutral-800 bg-white hover:bg-white/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:bg-white/90 disabled:disabled:text-neutral-700 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.xy-btn-neutral-inverse-lg {
|
|
129
|
+
@apply inline-flex justify-center items-center px-5 py-2.5 border border-transparent text-base font-display font-semibold rounded-3xl shadow-none text-neutral-800 bg-white hover:bg-white/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:bg-white/90 disabled:disabled:text-neutral-700 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
|
|
130
|
+
}
|
|
131
|
+
|
|
108
132
|
/* NOTE(spk): always consider the relative box-sizing between buttons with solid backgrounds and full borders vs secondary styles as they will commonly be laid out next to each other */
|
|
109
133
|
/* NOTE(spk): there's no way to round a ring or outline in a focus state without rounding the entire button. Avoid this as it causes odd shapes on the bottom border and using content hacks aren't worth the trouble */
|
|
110
134
|
.xy-btn-secondary-sm {
|
|
@@ -155,11 +179,6 @@
|
|
|
155
179
|
@apply inline-flex justify-center items-center py-2.5 border-b-2 border-b-red-700 text-base font-display font-semibold shadow-none text-neutral-800 hover:text-red-700 hover:border-b-transparent focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:text-neutral-800 disabled:border-b-red-700 disabled:opacity-70 disabled:cursor-not-allowed transition-colors ease-linear duration-150;
|
|
156
180
|
}
|
|
157
181
|
|
|
158
|
-
/* Deprecated */
|
|
159
|
-
.xy-btn-white {
|
|
160
|
-
@apply inline-flex justify-center items-center px-4 py-2 border border-xy-blue shadow-sm text-sm font-semibold rounded-3xl text-xy-blue bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:opacity-50 disabled:cursor-not-allowed;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
182
|
/* Header classes */
|
|
164
183
|
.h1 {
|
|
165
184
|
@apply text-3xl leading-9 font-semibold;
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
emailPattern,
|
|
10
10
|
looseToNumber,
|
|
11
11
|
phonePattern,
|
|
12
|
+
urlPattern,
|
|
12
13
|
} from "@/composables/forms"
|
|
13
14
|
import type { TextLikeInput } from "@/composables/forms"
|
|
14
15
|
import { computed, useTemplateRef } from "vue"
|
|
@@ -61,6 +62,10 @@ const typeAttributes = computed(() => {
|
|
|
61
62
|
return {
|
|
62
63
|
pattern: phonePattern,
|
|
63
64
|
}
|
|
65
|
+
case "url":
|
|
66
|
+
return {
|
|
67
|
+
pattern: urlPattern,
|
|
68
|
+
}
|
|
64
69
|
default:
|
|
65
70
|
return {}
|
|
66
71
|
}
|
|
@@ -110,6 +110,19 @@ export declare const emailPattern: string;
|
|
|
110
110
|
* used with input type="tel" in the pattern attribute for html5 validation
|
|
111
111
|
*/
|
|
112
112
|
export declare const phonePattern: string;
|
|
113
|
+
/**
|
|
114
|
+
* url validation regex pattern
|
|
115
|
+
* used with input type="url" in the pattern attribute for html5
|
|
116
|
+
*
|
|
117
|
+
* The pattern is conservative and focuses on ensuring the protocol is valid
|
|
118
|
+
* and the remainder of the url does not include empty spaces. If additional protocols
|
|
119
|
+
* need to be supported, they can be added to the first group (?:https|http|ftp).
|
|
120
|
+
*
|
|
121
|
+
* Reference: https://regex101.com/r/P5dlas/3
|
|
122
|
+
*
|
|
123
|
+
* NOTE(spk): not all JavaScript regular expression characters are not supported in input patterns.
|
|
124
|
+
*/
|
|
125
|
+
export declare const urlPattern: string;
|
|
113
126
|
/**
|
|
114
127
|
* This is used for the .number modifier in v-model
|
|
115
128
|
*/
|
package/types/entry.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plugin } from "vue";
|
|
2
2
|
import BaseAPI, { isHttpCancel, isHttpError, setBaseAPIDefaults } from "./api/base";
|
|
3
3
|
import type { HttpPromise, HttpError, QueryParams, ReqOptions, ReqPayload, TrailsPromise, TrailsPromisePaged, TrailsResp, TrailsRespPaged } from "./api/client";
|
|
4
|
-
import { emailPattern, looseToNumber, phonePattern, textInputTypes, useInputField } from "./composables/forms";
|
|
4
|
+
import { emailPattern, looseToNumber, phonePattern, urlPattern, textInputTypes, useInputField } from "./composables/forms";
|
|
5
5
|
import { debounce as debounceFn, debounceLeading } from "./helpers/Debounce";
|
|
6
6
|
import { throttle as throttleFn } from "./helpers/Throttle";
|
|
7
7
|
declare const install: Exclude<Plugin["install"], undefined>;
|
|
@@ -11,5 +11,5 @@ export * from "./lib-components/index";
|
|
|
11
11
|
export { BaseAPI, isHttpCancel, isHttpError, setBaseAPIDefaults };
|
|
12
12
|
export type { HttpPromise, HttpError, QueryParams, ReqOptions, ReqPayload, TrailsPromise, TrailsPromisePaged, TrailsResp, TrailsRespPaged, };
|
|
13
13
|
export type * from "./composables/forms";
|
|
14
|
-
export { emailPattern, looseToNumber, phonePattern, textInputTypes, useInputField, };
|
|
14
|
+
export { emailPattern, looseToNumber, phonePattern, urlPattern, textInputTypes, useInputField, };
|
|
15
15
|
export { debounceFn, debounceLeading, throttleFn };
|
|
@@ -13,7 +13,7 @@ declare const _default: <T extends InputOption>(__VLS_props: {
|
|
|
13
13
|
active: boolean;
|
|
14
14
|
checked: boolean;
|
|
15
15
|
disabled: boolean;
|
|
16
|
-
option:
|
|
16
|
+
option: T;
|
|
17
17
|
}): any;
|
|
18
18
|
};
|
|
19
19
|
attrs: any;
|
|
@@ -35,7 +35,7 @@ declare const _default: <T extends InputOption>(__VLS_props: {
|
|
|
35
35
|
active: boolean;
|
|
36
36
|
checked: boolean;
|
|
37
37
|
disabled: boolean;
|
|
38
|
-
option:
|
|
38
|
+
option: T;
|
|
39
39
|
}): any;
|
|
40
40
|
};
|
|
41
41
|
emit: (evt: "update:modelValue", value: string | number | null | undefined) => void;
|
|
@@ -59,7 +59,7 @@ declare const _default: <T extends InputOption>(__VLS_props: {
|
|
|
59
59
|
active: boolean;
|
|
60
60
|
checked: boolean;
|
|
61
61
|
disabled: boolean;
|
|
62
|
-
option:
|
|
62
|
+
option: T;
|
|
63
63
|
}): any;
|
|
64
64
|
};
|
|
65
65
|
emit: (evt: "update:modelValue", value: string | number | null | undefined) => void;
|