@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.
@@ -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 { ComboboxEventMap } from '@lumx/core/js/components/Combobox/types';
2
+ import { CompositeEventMap } from '@lumx/core/js/components/Composite/types';
3
3
  /**
4
- * Composable to subscribe to a combobox event (`open`, `expanded`, `optionsChange`, `loadingChange`,
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 combobox handle owns the `open` and `expanded` events (even before a list registers) and forwards the other events
8
- * from the registered list: it re-subscribes when the registered list changes and dispatches the snapshot of
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 ComboboxEventMap>(event: K, initialValue: ComboboxEventMap[K]): Ref<ComboboxEventMap[K]>;
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` (the list registered on
8
- * the combobox, with `comboboxListId`), then re-provided by the list with its `type` (and by a tree item with
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 a list registers). */
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, or the combobox handle, which has the composite events and
5
- * its own). Re-subscribes when the handle changes, then starts from the new handle snapshot (or `initialValue` while
6
- * there is no handle or until the event has fired at least once), so it never keeps the value of the previous
7
- * handle. An `undefined` notification (e.g. the combobox list detached) resets the value to `initialValue` the same
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 a listbox handle on its element:
13
- * - Inside a combobox (`Combobox.Provider`): creates the listbox handle with the combobox list options and
14
- * registers it on the combobox. Renders its options only while the combobox is open. The trigger owns focus.
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. A `ListboxProvider` nested
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';