@sit-onyx/headless 1.0.0-beta.20 → 1.0.0-beta.21
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 +5 -2
- package/src/composables/comboBox/SelectOnlyCombobox.vue +1 -1
- package/src/composables/comboBox/TestCombobox.ct.tsx +1 -1
- package/src/composables/comboBox/TestCombobox.vue +1 -1
- package/src/composables/comboBox/createComboBox.ts +6 -6
- package/src/composables/helpers/useDismissible.ts +1 -1
- package/src/composables/helpers/useGlobalListener.spec.ts +2 -2
- package/src/composables/helpers/useOutsideClick.spec.ts +2 -2
- package/src/composables/helpers/useOutsideClick.ts +2 -2
- package/src/composables/helpers/useTypeAhead.spec.ts +1 -1
- package/src/composables/helpers/useTypeAhead.ts +2 -2
- package/src/composables/listbox/TestListbox.ct.tsx +1 -1
- package/src/composables/listbox/TestListbox.vue +1 -1
- package/src/composables/listbox/createListbox.ts +3 -3
- package/src/composables/menuButton/TestMenuButton.ct.tsx +1 -1
- package/src/composables/menuButton/TestMenuButton.vue +1 -1
- package/src/composables/menuButton/createMenuButton.ts +4 -4
- package/src/composables/navigationMenu/TestMenu.ct.tsx +1 -1
- package/src/composables/navigationMenu/TestMenu.vue +1 -1
- package/src/composables/navigationMenu/createMenu.ts +2 -2
- package/src/composables/tabs/TestTabs.ct.tsx +1 -1
- package/src/composables/tabs/TestTabs.vue +1 -1
- package/src/composables/tabs/createTabs.ts +1 -1
- package/src/composables/tooltip/createToggletip.ts +2 -2
- package/src/composables/tooltip/createTooltip.ts +2 -2
- package/src/index.ts +11 -11
- package/src/playwright.ts +5 -5
- package/src/utils/builder.ts +1 -1
- package/src/utils/keyboard.spec.ts +1 -1
- package/src/utils/keyboard.ts +1 -1
- package/src/utils/math.spec.ts +1 -1
- package/src/utils/object.spec.ts +1 -1
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
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.21",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Schwarz IT KG",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=20"
|
|
10
|
+
},
|
|
8
11
|
"files": [
|
|
9
12
|
"src"
|
|
10
13
|
],
|
|
@@ -29,7 +32,7 @@
|
|
|
29
32
|
"devDependencies": {
|
|
30
33
|
"@vue/compiler-dom": "3.5.16",
|
|
31
34
|
"vue": "3.5.16",
|
|
32
|
-
"@sit-onyx/shared": "^1.0.0-beta.
|
|
35
|
+
"@sit-onyx/shared": "^1.0.0-beta.4"
|
|
33
36
|
},
|
|
34
37
|
"scripts": {
|
|
35
38
|
"build": "vue-tsc --build --force",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { test } from "@playwright/experimental-ct-vue";
|
|
2
|
-
import { comboboxSelectOnlyTesting, comboboxTesting } from "./createComboBox.testing";
|
|
2
|
+
import { comboboxSelectOnlyTesting, comboboxTesting } from "./createComboBox.testing.js";
|
|
3
3
|
import SelectOnlyCombobox from "./SelectOnlyCombobox.vue";
|
|
4
4
|
import TestCombobox from "./TestCombobox.vue";
|
|
5
5
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed, unref, useId, type MaybeRef, type Ref } from "vue";
|
|
2
|
-
import { createBuilder } from "../../utils/builder";
|
|
3
|
-
import { isPrintableCharacter, wasKeyPressed, type PressedKey } from "../../utils/keyboard";
|
|
4
|
-
import type { Nullable } from "../../utils/types";
|
|
5
|
-
import { useOutsideClick } from "../helpers/useOutsideClick";
|
|
6
|
-
import { useTypeAhead } from "../helpers/useTypeAhead";
|
|
2
|
+
import { createBuilder } from "../../utils/builder.js";
|
|
3
|
+
import { isPrintableCharacter, wasKeyPressed, type PressedKey } from "../../utils/keyboard.js";
|
|
4
|
+
import type { Nullable } from "../../utils/types.js";
|
|
5
|
+
import { useOutsideClick } from "../helpers/useOutsideClick.js";
|
|
6
|
+
import { useTypeAhead } from "../helpers/useTypeAhead.js";
|
|
7
7
|
import {
|
|
8
8
|
createListbox,
|
|
9
9
|
type CreateListboxOptions,
|
|
10
10
|
type ListboxValue,
|
|
11
|
-
} from "../listbox/createListbox";
|
|
11
|
+
} from "../listbox/createListbox.js";
|
|
12
12
|
|
|
13
13
|
/** See https://w3c.github.io/aria/#aria-autocomplete */
|
|
14
14
|
export type ComboboxAutoComplete = "none" | "list" | "both";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
2
|
import { ref, type Ref } from "vue";
|
|
3
|
-
import { mockVueLifecycle } from "../../utils/vitest";
|
|
4
|
-
import { useGlobalEventListener } from "./useGlobalListener";
|
|
3
|
+
import { mockVueLifecycle } from "../../utils/vitest.js";
|
|
4
|
+
import { useGlobalEventListener } from "./useGlobalListener.js";
|
|
5
5
|
|
|
6
6
|
let unmount: () => Promise<void> | undefined;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
2
|
import { ref } from "vue";
|
|
3
|
-
import { mockVueLifecycle } from "../../utils/vitest";
|
|
4
|
-
import { useOutsideClick } from "./useOutsideClick";
|
|
3
|
+
import { mockVueLifecycle } from "../../utils/vitest.js";
|
|
4
|
+
import { useOutsideClick } from "./useOutsideClick.js";
|
|
5
5
|
|
|
6
6
|
describe("useOutsideClick", () => {
|
|
7
7
|
beforeEach(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Arrayable } from "vitest"; // For an unknown reason removing this import will break the build of "demo-app" and "playground"
|
|
2
2
|
import { toValue, type MaybeRefOrGetter, type Ref } from "vue";
|
|
3
|
-
import type { Nullable } from "../../utils/types";
|
|
4
|
-
import { useGlobalEventListener } from "./useGlobalListener";
|
|
3
|
+
import type { Nullable } from "../../utils/types.js";
|
|
4
|
+
import { useGlobalEventListener } from "./useGlobalListener.js";
|
|
5
5
|
|
|
6
6
|
export type UseOutsideClickOptions<TCheckOnTab extends boolean | undefined = undefined> = {
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isPrintableCharacter } from "../../utils/keyboard";
|
|
2
|
-
import { debounce } from "../../utils/timer";
|
|
1
|
+
import { isPrintableCharacter } from "../../utils/keyboard.js";
|
|
2
|
+
import { debounce } from "../../utils/timer.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Enhances typeAhead to combine multiple inputs in quick succession and filter out non-printable characters.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { test } from "@playwright/experimental-ct-vue";
|
|
2
2
|
import TestListbox from "./TestListbox.vue";
|
|
3
|
-
import { listboxTesting } from "./createListbox.testing";
|
|
3
|
+
import { listboxTesting } from "./createListbox.testing.js";
|
|
4
4
|
|
|
5
5
|
test("listbox", async ({ mount, page }) => {
|
|
6
6
|
await mount(<TestListbox />);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed, nextTick, ref, unref, useId, watchEffect, type MaybeRef, type Ref } from "vue";
|
|
2
|
-
import { createBuilder, type VBindAttributes } from "../../utils/builder";
|
|
3
|
-
import type { Nullable } from "../../utils/types";
|
|
4
|
-
import { useTypeAhead } from "../helpers/useTypeAhead";
|
|
2
|
+
import { createBuilder, type VBindAttributes } from "../../utils/builder.js";
|
|
3
|
+
import type { Nullable } from "../../utils/types.js";
|
|
4
|
+
import { useTypeAhead } from "../helpers/useTypeAhead.js";
|
|
5
5
|
|
|
6
6
|
export type ListboxValue = string | number | boolean;
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { test } from "@playwright/experimental-ct-vue";
|
|
2
|
-
import { menuButtonTesting } from "./createMenuButton.testing";
|
|
2
|
+
import { menuButtonTesting } from "./createMenuButton.testing.js";
|
|
3
3
|
import TestMenuButton from "./TestMenuButton.vue";
|
|
4
4
|
|
|
5
5
|
test("menuButton", async ({ mount, page }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed, toValue, useId, watch, type MaybeRef, type Ref } from "vue";
|
|
2
|
-
import { createBuilder, createElRef } from "../../utils/builder";
|
|
3
|
-
import { debounce } from "../../utils/timer";
|
|
4
|
-
import { useGlobalEventListener } from "../helpers/useGlobalListener";
|
|
5
|
-
import { useOutsideClick } from "../helpers/useOutsideClick";
|
|
2
|
+
import { createBuilder, createElRef } from "../../utils/builder.js";
|
|
3
|
+
import { debounce } from "../../utils/timer.js";
|
|
4
|
+
import { useGlobalEventListener } from "../helpers/useGlobalListener.js";
|
|
5
|
+
import { useOutsideClick } from "../helpers/useOutsideClick.js";
|
|
6
6
|
|
|
7
7
|
type CreateMenuButtonOptions = {
|
|
8
8
|
isExpanded: Readonly<Ref<boolean>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { test } from "@playwright/experimental-ct-vue";
|
|
2
|
-
import { navigationTesting } from "./createMenu.testing";
|
|
2
|
+
import { navigationTesting } from "./createMenu.testing.js";
|
|
3
3
|
import TestMenu from "./TestMenu.vue";
|
|
4
4
|
|
|
5
5
|
test("navigationMenu", async ({ mount, page }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { unref, useId, type MaybeRef } from "vue";
|
|
2
|
-
import { createBuilder } from "../../utils/builder";
|
|
3
|
-
import { MathUtils } from "../../utils/math";
|
|
2
|
+
import { createBuilder } from "../../utils/builder.js";
|
|
3
|
+
import { MathUtils } from "../../utils/math.js";
|
|
4
4
|
|
|
5
5
|
type CreateNavigationMenu = {
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { test } from "@playwright/experimental-ct-vue";
|
|
2
2
|
import TestTabs from "./TestTabs.vue";
|
|
3
|
-
import { tabsTesting } from "./createTabs.testing";
|
|
3
|
+
import { tabsTesting } from "./createTabs.testing.js";
|
|
4
4
|
|
|
5
5
|
test("tabs", async ({ mount, page }) => {
|
|
6
6
|
const component = await mount(<TestTabs />);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, toRef, toValue, useId, type MaybeRefOrGetter, type Ref } from "vue";
|
|
2
|
-
import { createBuilder } from "../../utils/builder";
|
|
3
|
-
import { useDismissible } from "../helpers/useDismissible";
|
|
2
|
+
import { createBuilder } from "../../utils/builder.js";
|
|
3
|
+
import { useDismissible } from "../helpers/useDismissible.js";
|
|
4
4
|
|
|
5
5
|
export type CreateToggletipOptions = {
|
|
6
6
|
toggleLabel: MaybeRefOrGetter<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, toRef, toValue, useId, type MaybeRefOrGetter, type Ref } from "vue";
|
|
2
|
-
import { createBuilder } from "../../utils/builder";
|
|
3
|
-
import { useDismissible } from "../helpers/useDismissible";
|
|
2
|
+
import { createBuilder } from "../../utils/builder.js";
|
|
3
|
+
import { useDismissible } from "../helpers/useDismissible.js";
|
|
4
4
|
|
|
5
5
|
export type CreateTooltipOptions = {
|
|
6
6
|
/**
|
package/src/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from "./composables/comboBox/createComboBox";
|
|
2
|
-
export * from "./composables/helpers/useGlobalListener";
|
|
3
|
-
export * from "./composables/listbox/createListbox";
|
|
4
|
-
export * from "./composables/menuButton/createMenuButton";
|
|
5
|
-
export * from "./composables/navigationMenu/createMenu";
|
|
6
|
-
export * from "./composables/tabs/createTabs";
|
|
7
|
-
export * from "./composables/tooltip/createToggletip";
|
|
8
|
-
export * from "./composables/tooltip/createTooltip";
|
|
9
|
-
export * from "./utils/builder";
|
|
10
|
-
export { isPrintableCharacter, wasKeyPressed } from "./utils/keyboard";
|
|
11
|
-
export { debounce } from "./utils/timer";
|
|
1
|
+
export * from "./composables/comboBox/createComboBox.js";
|
|
2
|
+
export * from "./composables/helpers/useGlobalListener.js";
|
|
3
|
+
export * from "./composables/listbox/createListbox.js";
|
|
4
|
+
export * from "./composables/menuButton/createMenuButton.js";
|
|
5
|
+
export * from "./composables/navigationMenu/createMenu.js";
|
|
6
|
+
export * from "./composables/tabs/createTabs.js";
|
|
7
|
+
export * from "./composables/tooltip/createToggletip.js";
|
|
8
|
+
export * from "./composables/tooltip/createTooltip.js";
|
|
9
|
+
export * from "./utils/builder.js";
|
|
10
|
+
export { isPrintableCharacter, wasKeyPressed } from "./utils/keyboard.js";
|
|
11
|
+
export { debounce } from "./utils/timer.js";
|
package/src/playwright.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./composables/comboBox/createComboBox.testing";
|
|
2
|
-
export * from "./composables/listbox/createListbox.testing";
|
|
3
|
-
export * from "./composables/menuButton/createMenuButton.testing";
|
|
4
|
-
export * from "./composables/navigationMenu/createMenu.testing";
|
|
5
|
-
export * from "./composables/tabs/createTabs.testing";
|
|
1
|
+
export * from "./composables/comboBox/createComboBox.testing.js";
|
|
2
|
+
export * from "./composables/listbox/createListbox.testing.js";
|
|
3
|
+
export * from "./composables/menuButton/createMenuButton.testing.js";
|
|
4
|
+
export * from "./composables/navigationMenu/createMenu.testing.js";
|
|
5
|
+
export * from "./composables/tabs/createTabs.testing.js";
|
package/src/utils/builder.ts
CHANGED
package/src/utils/keyboard.ts
CHANGED
package/src/utils/math.spec.ts
CHANGED
package/src/utils/object.spec.ts
CHANGED