@bitrix24/b24ui-nuxt 0.6.3 → 0.6.5
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/meta.d.mts +253 -134
- package/dist/meta.mjs +253 -134
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Alert.vue +3 -3
- package/dist/runtime/components/App.vue +4 -0
- package/dist/runtime/components/App.vue.d.ts +1 -0
- package/dist/runtime/components/DropdownMenu.vue +1 -1
- package/dist/runtime/components/DropdownMenu.vue.d.ts +1 -1
- package/dist/runtime/components/DropdownMenuContent.vue +5 -3
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +1 -1
- package/dist/runtime/components/Form.vue +2 -1
- package/dist/runtime/components/Form.vue.d.ts +17 -12
- package/dist/runtime/components/InputMenu.vue +4 -2
- package/dist/runtime/components/InputMenu.vue.d.ts +1 -1
- package/dist/runtime/components/Modal.vue +4 -2
- package/dist/runtime/components/Modal.vue.d.ts +2 -2
- package/dist/runtime/components/Popover.vue +4 -2
- package/dist/runtime/components/Popover.vue.d.ts +2 -2
- package/dist/runtime/components/Select.vue +4 -2
- package/dist/runtime/components/Select.vue.d.ts +1 -1
- package/dist/runtime/components/SelectMenu.vue +4 -2
- package/dist/runtime/components/SelectMenu.vue.d.ts +1 -1
- package/dist/runtime/components/Slideover.vue +4 -2
- package/dist/runtime/components/Slideover.vue.d.ts +2 -2
- package/dist/runtime/components/Toast.vue +3 -3
- package/dist/runtime/components/Toaster.vue +5 -3
- package/dist/runtime/components/Toaster.vue.d.ts +2 -2
- package/dist/runtime/components/Tooltip.vue +4 -2
- package/dist/runtime/components/Tooltip.vue.d.ts +2 -2
- package/dist/runtime/composables/usePortal.d.ts +6 -0
- package/dist/runtime/composables/usePortal.js +24 -0
- package/dist/runtime/types/form.d.ts +3 -1
- package/package.json +8 -9
|
@@ -23,7 +23,7 @@ export interface TooltipProps extends TooltipRootProps {
|
|
|
23
23
|
* Render the tooltip in a portal.
|
|
24
24
|
* @defaultValue true
|
|
25
25
|
*/
|
|
26
|
-
portal?: boolean;
|
|
26
|
+
portal?: boolean | string | HTMLElement;
|
|
27
27
|
class?: any;
|
|
28
28
|
b24ui?: Tooltip['slots'];
|
|
29
29
|
}
|
|
@@ -38,7 +38,7 @@ export interface TooltipSlots {
|
|
|
38
38
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<TooltipProps>, {
|
|
39
39
|
portal: boolean;
|
|
40
40
|
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
|
|
41
|
-
portal: boolean;
|
|
41
|
+
portal: boolean | string | HTMLElement;
|
|
42
42
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<TooltipSlots> & TooltipSlots>;
|
|
43
43
|
export default _default;
|
|
44
44
|
type __VLS_WithDefaults<P, D> = {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Ref, type InjectionKey } from 'vue';
|
|
2
|
+
export declare const portalTargetInjectionKey: InjectionKey<Ref<string | HTMLElement>>;
|
|
3
|
+
export declare function usePortal(portal: Ref<string | HTMLElement | boolean | undefined>): import("vue").ComputedRef<{
|
|
4
|
+
to: string | HTMLElement;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { inject, provide, computed } from "vue";
|
|
2
|
+
export const portalTargetInjectionKey = Symbol("bitrix24-ui.portal-target");
|
|
3
|
+
export function usePortal(portal) {
|
|
4
|
+
const portalTarget = inject(portalTargetInjectionKey, void 0);
|
|
5
|
+
const isClient = typeof window !== "undefined";
|
|
6
|
+
const to = computed(() => {
|
|
7
|
+
if (!isClient) {
|
|
8
|
+
if (typeof portal.value === "string") {
|
|
9
|
+
return portal.value;
|
|
10
|
+
}
|
|
11
|
+
return portalTarget?.value ?? "body";
|
|
12
|
+
}
|
|
13
|
+
if (typeof portal.value === "string" || portal.value instanceof HTMLElement) {
|
|
14
|
+
return portal.value;
|
|
15
|
+
}
|
|
16
|
+
return portalTarget?.value ?? "body";
|
|
17
|
+
});
|
|
18
|
+
const disabled = computed(() => typeof portal.value === "boolean" ? !portal.value : false);
|
|
19
|
+
provide(portalTargetInjectionKey, computed(() => to.value));
|
|
20
|
+
return computed(() => ({
|
|
21
|
+
to: to.value,
|
|
22
|
+
disabled: disabled.value
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
@@ -23,7 +23,9 @@ export interface Form<T extends object> {
|
|
|
23
23
|
touchedFields: DeepReadonly<Set<keyof T>>;
|
|
24
24
|
blurredFields: DeepReadonly<Set<keyof T>>;
|
|
25
25
|
}
|
|
26
|
-
export type FormSchema<
|
|
26
|
+
export type FormSchema<I extends object = object, O extends object = I> = YupObjectSchema<I> | JoiSchema<I> | SuperstructSchema<any, any> | StandardSchemaV1<I, O>;
|
|
27
|
+
export type InferInput<Schema> = Schema extends StandardSchemaV1 ? StandardSchemaV1.InferInput<Schema> : Schema extends YupObjectSchema<infer I> ? I : Schema extends JoiSchema<infer I> ? I : Schema extends SuperstructSchema<infer I, any> ? I : Schema extends StandardSchemaV1 ? StandardSchemaV1.InferInput<Schema> : never;
|
|
28
|
+
export type InferOutput<Schema> = Schema extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<Schema> : Schema extends YupObjectSchema<infer O> ? O : Schema extends JoiSchema<infer O> ? O : Schema extends SuperstructSchema<infer O, any> ? O : never;
|
|
27
29
|
export type FormInputEvents = 'input' | 'blur' | 'change' | 'focus';
|
|
28
30
|
export interface FormError<P extends string = string> {
|
|
29
31
|
name?: P;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrix24/b24ui-nuxt",
|
|
3
3
|
"description": "Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.5",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/bitrix24/b24ui.git"
|
|
@@ -110,10 +110,10 @@
|
|
|
110
110
|
"@standard-schema/spec": "^1.0.0",
|
|
111
111
|
"@tailwindcss/postcss": "^4.1.4",
|
|
112
112
|
"@tailwindcss/vite": "^4.1.4",
|
|
113
|
-
"@tanstack/vue-table": "^8.21.
|
|
114
|
-
"@unhead/vue": "^2.0.
|
|
115
|
-
"@vueuse/core": "^13.
|
|
116
|
-
"@vueuse/integrations": "^13.
|
|
113
|
+
"@tanstack/vue-table": "^8.21.3",
|
|
114
|
+
"@unhead/vue": "^2.0.8",
|
|
115
|
+
"@vueuse/core": "^13.1.0",
|
|
116
|
+
"@vueuse/integrations": "^13.1.0",
|
|
117
117
|
"canvas-confetti": "^1.9.3",
|
|
118
118
|
"colortranslator": "^4.1.0",
|
|
119
119
|
"consola": "^3.4.2",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"scule": "^1.3.0",
|
|
137
137
|
"tailwind-variants": "^1.0.0",
|
|
138
138
|
"tailwindcss": "^4.1.4",
|
|
139
|
-
"tinyglobby": "^0.2.
|
|
139
|
+
"tinyglobby": "^0.2.13",
|
|
140
140
|
"unplugin": "^2.3.2",
|
|
141
141
|
"unplugin-auto-import": "^19.1.2",
|
|
142
142
|
"unplugin-vue-components": "^28.5.0",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"@types/canvas-confetti": "^1.9.0",
|
|
150
150
|
"@vue/test-utils": "^2.4.6",
|
|
151
151
|
"embla-carousel": "^8.6.0",
|
|
152
|
-
"eslint": "^9.
|
|
152
|
+
"eslint": "^9.25.0",
|
|
153
153
|
"happy-dom": "^17.4.4",
|
|
154
154
|
"nuxt": "^3.16.2",
|
|
155
155
|
"nuxt-component-meta": "^0.10.1",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"valibot": "^1.0.0",
|
|
167
167
|
"vue-router": "^4.5.0",
|
|
168
168
|
"yup": "^1.6.0",
|
|
169
|
-
"zod": "^3.24.
|
|
169
|
+
"zod": "^3.24.3"
|
|
170
170
|
},
|
|
171
171
|
"peerDependenciesMeta": {
|
|
172
172
|
"@inertiajs/vue3": {
|
|
@@ -237,7 +237,6 @@
|
|
|
237
237
|
"lint": "eslint .",
|
|
238
238
|
"lint:fix": "eslint . --fix",
|
|
239
239
|
"typecheck": "vue-tsc --noEmit && nuxi typecheck playground && cd playground-vue && vue-tsc --noEmit",
|
|
240
|
-
"typecheck-window": "vue-tsc --noEmit && nuxi typecheck playground && cd ../playground-vue && vue-tsc --noEmit",
|
|
241
240
|
"test": "vitest",
|
|
242
241
|
"test:vue": "vitest -c vitest.vue.config.ts"
|
|
243
242
|
}
|