@sit-onyx/headless 1.0.0-beta.16 → 1.0.0-beta.17
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sit-onyx/headless",
|
|
3
3
|
"description": "Headless composables for Vue",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.17",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Schwarz IT KG",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@vue/compiler-dom": "3.5.13",
|
|
31
31
|
"vue": "3.5.13",
|
|
32
|
-
"@sit-onyx/shared": "^1.0.0-beta.
|
|
32
|
+
"@sit-onyx/shared": "^1.0.0-beta.2"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "vue-tsc --build --force",
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import type { Arrayable } from "vitest";
|
|
2
|
-
import { toValue, type Ref } from "vue";
|
|
3
|
-
import type { MaybeReactiveSource } from "../../utils/types";
|
|
1
|
+
import type { Arrayable } from "vitest"; // For an unknown reason removing this import will break the build of "demo-app" and "playground"
|
|
2
|
+
import { toValue, type MaybeRefOrGetter, type Ref } from "vue";
|
|
4
3
|
import { useGlobalEventListener } from "./useGlobalListener";
|
|
5
4
|
|
|
6
5
|
export type UseOutsideClickOptions = {
|
|
7
6
|
/**
|
|
8
7
|
* HTML element of the component where clicks should be ignored
|
|
9
8
|
*/
|
|
10
|
-
inside:
|
|
9
|
+
inside: MaybeRefOrGetter<Arrayable<HTMLElement | undefined>>;
|
|
11
10
|
/**
|
|
12
11
|
* Callback when an outside click occurred.
|
|
13
12
|
*/
|
package/src/utils/types.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { ComputedRef, MaybeRefOrGetter } from "vue";
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Adds the entry with the key `Key` and the value of type `TValue` to a record when it is defined.
|
|
5
3
|
* Then the entry is either undefined or exists without being optional.
|
|
@@ -25,6 +23,6 @@ export type IsArray<TValue, TMultiple extends boolean = false> = TMultiple exten
|
|
|
25
23
|
: TValue;
|
|
26
24
|
|
|
27
25
|
/**
|
|
28
|
-
*
|
|
26
|
+
* A type that can be wrapped in an array.
|
|
29
27
|
*/
|
|
30
|
-
export type
|
|
28
|
+
export type Arrayable<T> = T | Array<T>;
|