@lumx/vue 4.27.1-alpha.2 → 4.28.0-next.0
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/components/combobox/ComboboxProvider.d.ts +0 -2
- package/components/combobox/context/ComboboxContext.d.ts +0 -2
- package/components/combobox/context/useComboboxEvent.d.ts +5 -6
- package/components/composite/CompositeContext.d.ts +3 -11
- package/components/composite/useCompositeEvent.d.ts +4 -5
- package/components/listbox/ListboxList.d.ts +4 -5
- package/index.d.ts +0 -1
- package/index.js +6589 -7253
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/components/composite/useCompositeList.d.ts +0 -40
- package/components/tree-list/TreeList.d.ts +0 -98
- package/components/tree-list/TreeList.stories.d.ts +0 -63
- package/components/tree-list/TreeList.test.stories.d.ts +0 -83
- package/components/tree-list/TreeListContext.d.ts +0 -9
- package/components/tree-list/TreeListItem.d.ts +0 -73
- package/components/tree-list/index.d.ts +0 -34
|
@@ -13,8 +13,6 @@ export interface ComboboxProviderProps {
|
|
|
13
13
|
*
|
|
14
14
|
* Provides shared context to sub-components. The vanilla JS combobox handle is
|
|
15
15
|
* created by the trigger sub-component (Combobox.Input or Combobox.Button) on mount.
|
|
16
|
-
* The list handle is created by the list component, which registers it on the combobox handle:
|
|
17
|
-
* the provider shares the registered list with the sub-components (composite context).
|
|
18
16
|
*
|
|
19
17
|
* @param props Component props.
|
|
20
18
|
* @return Vue element.
|
|
@@ -21,5 +21,3 @@ export declare function provideComboboxContext(value: ComboboxContextValue): voi
|
|
|
21
21
|
* @returns The combobox context value.
|
|
22
22
|
*/
|
|
23
23
|
export declare function useComboboxContext(): ComboboxContextValue;
|
|
24
|
-
/** Access the Combobox context, or `undefined` outside of a Combobox (does not throw). */
|
|
25
|
-
export declare function useOptionalComboboxContext(): ComboboxContextValue | undefined;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { CompositeEventMap } from '@lumx/core/js/components/Composite/types';
|
|
3
3
|
/**
|
|
4
|
-
* Composable to subscribe to a combobox event (`open`, `
|
|
4
|
+
* Composable to subscribe to a combobox event (`open`, `optionsChange`, `loadingChange`,
|
|
5
5
|
* `activeDescendantChange`, …). Must be used within a `Combobox.Provider`.
|
|
6
6
|
*
|
|
7
|
-
* The
|
|
8
|
-
*
|
|
9
|
-
* the new list (see `ComboboxEventMap`). `optionsChange` updates are coalesced (see `useCompositeEvent`).
|
|
7
|
+
* The events are dispatched by the listbox handle of the combobox (see {@link useCompositeEvent}).
|
|
8
|
+
* `optionsChange` updates are coalesced (see `useCompositeEvent`).
|
|
10
9
|
*/
|
|
11
|
-
export declare function useComboboxEvent<K extends keyof
|
|
10
|
+
export declare function useComboboxEvent<K extends keyof CompositeEventMap>(event: K, initialValue: CompositeEventMap[K]): Ref<CompositeEventMap[K]>;
|
|
@@ -4,12 +4,11 @@ import { CompositeHandle, CompositeType } from '@lumx/core/js/components/Composi
|
|
|
4
4
|
* Context value shared by the sub-components of a composite widget (a list, a grid, …): the list,
|
|
5
5
|
* its items, sections, skeletons and state.
|
|
6
6
|
*
|
|
7
|
-
* Provided by `ListboxProvider` (standalone listbox) and by `Combobox.Provider` (
|
|
8
|
-
*
|
|
9
|
-
* the next `level`), without `comboboxListId`.
|
|
7
|
+
* Provided by `ListboxProvider` (standalone listbox) and by `Combobox.Provider` (listbox of a combobox),
|
|
8
|
+
* then re-provided by the list with its `type`.
|
|
10
9
|
*/
|
|
11
10
|
export interface CompositeContextValue {
|
|
12
|
-
/** The composite handle (null inside a combobox until
|
|
11
|
+
/** The composite handle (null inside a combobox until the trigger creates it). */
|
|
13
12
|
handle: Readonly<Ref<CompositeHandle | null>>;
|
|
14
13
|
/** The ID of the composite element. */
|
|
15
14
|
id: string;
|
|
@@ -22,13 +21,6 @@ export interface CompositeContextValue {
|
|
|
22
21
|
selectionType?: 'single' | 'multiple';
|
|
23
22
|
/** The nesting level of the items (0 or undefined: root items). A skeleton is nested when it is above 0. */
|
|
24
23
|
level?: number;
|
|
25
|
-
/**
|
|
26
|
-
* The ID of the list of the combobox (the trigger `aria-controls` it). Set by `Combobox.Provider` only: a list
|
|
27
|
-
* is the combobox list when its nearest composite context carries it. The list, its items and a nested
|
|
28
|
-
* `ListboxProvider` provide their own context without it, so a list rendered inside them is standalone.
|
|
29
|
-
* (At that level, it is the same value as `id`.)
|
|
30
|
-
*/
|
|
31
|
-
comboboxListId?: string;
|
|
32
24
|
}
|
|
33
25
|
/** Provide the composite context (see `ListboxProvider` and `Combobox.Provider`). */
|
|
34
26
|
export declare function provideCompositeContext(value: CompositeContextValue): void;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { CompositeEventMap, CompositeEventSource } from '@lumx/core/js/components/Composite/types';
|
|
3
3
|
/**
|
|
4
|
-
* Subscribe to an event of a handle (a composite handle
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* way.
|
|
4
|
+
* Subscribe to an event of a handle (a composite handle). Re-subscribes when the handle changes, then starts from
|
|
5
|
+
* the new handle snapshot (or `initialValue` while there is no handle or until the event has fired at least once),
|
|
6
|
+
* so it never keeps the value of the previous handle. An `undefined` notification resets the value to
|
|
7
|
+
* `initialValue` the same way.
|
|
9
8
|
*/
|
|
10
9
|
export declare function useCompositeEvent<M extends CompositeEventMap, K extends keyof M>(handle: Readonly<Ref<CompositeEventSource<M> | null>>, event: K, initialValue: M[K]): Ref<M[K]>;
|
|
@@ -9,12 +9,11 @@ export type ListboxListProps = VueToJSXProps<UIProps, 'aria-label' | 'aria-busy'
|
|
|
9
9
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/listbox/
|
|
10
10
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/grid/
|
|
11
11
|
*
|
|
12
|
-
* Mounts
|
|
13
|
-
* - Inside a combobox (`Combobox.Provider`):
|
|
14
|
-
*
|
|
12
|
+
* Mounts the listbox handle of the enclosing provider on its element:
|
|
13
|
+
* - Inside a combobox (`Combobox.Provider`): renders its options only while the combobox is open.
|
|
14
|
+
* The trigger owns focus.
|
|
15
15
|
* - Inside a `ListboxProvider`: a standalone list that owns focus (`tabindex="0"` +
|
|
16
|
-
* `aria-activedescendant`) and handles its own keyboard navigation.
|
|
17
|
-
* in a combobox wins (the list stays standalone and does not register on the combobox).
|
|
16
|
+
* `aria-activedescendant`) and handles its own keyboard navigation.
|
|
18
17
|
*
|
|
19
18
|
* @param props Component props.
|
|
20
19
|
* @return Vue element.
|
package/index.d.ts
CHANGED
|
@@ -44,7 +44,6 @@ export * from './components/text';
|
|
|
44
44
|
export * from './components/thumbnail';
|
|
45
45
|
export * from './components/toolbar';
|
|
46
46
|
export * from './components/tooltip';
|
|
47
|
-
export * from './components/tree-list';
|
|
48
47
|
export * from './components/user-block';
|
|
49
48
|
export * from './components/select-button';
|
|
50
49
|
export * from './components/select-text-field';
|