@lumx/vue 4.25.1-alpha.2 → 4.25.1-alpha.3

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.
Files changed (28) hide show
  1. package/components/combobox/ComboboxList.d.ts +15 -0
  2. package/components/{listbox/ListboxOption.d.ts → combobox/ComboboxOption.d.ts} +5 -5
  3. package/components/combobox/ComboboxOptionAction.d.ts +20 -0
  4. package/components/{listbox/ListboxOptionMoreInfo.d.ts → combobox/ComboboxOptionMoreInfo.d.ts} +5 -5
  5. package/components/combobox/ComboboxOptionSkeleton.d.ts +14 -0
  6. package/components/combobox/ComboboxSection.d.ts +14 -0
  7. package/components/combobox/ComboboxSelectionIcon.d.ts +14 -0
  8. package/components/combobox/ComboboxState.d.ts +14 -0
  9. package/components/combobox/context/ComboboxListContext.d.ts +16 -0
  10. package/components/{listbox/context/ListboxOptionContext.d.ts → combobox/context/ComboboxOptionContext.d.ts} +5 -3
  11. package/components/combobox/context/useComboboxEvent.d.ts +5 -6
  12. package/components/combobox/index.d.ts +21 -18
  13. package/components/combobox/useWrappedRenderOptionSlot.d.ts +1 -1
  14. package/components/select-button/index.d.ts +1 -1
  15. package/components/select-text-field/index.d.ts +4 -4
  16. package/index.js +6827 -6964
  17. package/index.js.map +1 -1
  18. package/package.json +3 -3
  19. package/components/listbox/ListboxList.d.ts +0 -25
  20. package/components/listbox/ListboxOptionAction.d.ts +0 -23
  21. package/components/listbox/ListboxOptionSkeleton.d.ts +0 -14
  22. package/components/listbox/ListboxProvider.d.ts +0 -16
  23. package/components/listbox/ListboxSection.d.ts +0 -14
  24. package/components/listbox/ListboxState.d.ts +0 -14
  25. package/components/listbox/context/ListboxContext.d.ts +0 -23
  26. package/components/listbox/context/useListboxEvent.d.ts +0 -13
  27. package/components/listbox/index.d.ts +0 -47
  28. /package/components/{listbox/ListboxOption.test.d.ts → combobox/ComboboxOption.test.d.ts} +0 -0
package/package.json CHANGED
@@ -30,11 +30,11 @@
30
30
  }
31
31
  },
32
32
  "sideEffects": false,
33
- "version": "4.25.1-alpha.2",
33
+ "version": "4.25.1-alpha.3",
34
34
  "dependencies": {
35
35
  "@floating-ui/vue": "^1.1.10",
36
- "@lumx/core": "^4.25.1-alpha.2",
37
- "@lumx/icons": "^4.25.1-alpha.2",
36
+ "@lumx/core": "^4.25.1-alpha.3",
37
+ "@lumx/icons": "^4.25.1-alpha.3",
38
38
  "@vueuse/core": "^14.1.0"
39
39
  },
40
40
  "peerDependencies": {
@@ -1,25 +0,0 @@
1
- import { ListboxListProps as UIProps, COMPONENT_NAME, CLASSNAME } from '@lumx/core/js/components/Listbox/ListboxList';
2
- import { VueToJSXProps } from '../../utils/VueToJSX';
3
- export type ListboxListProps = VueToJSXProps<UIProps, 'aria-label' | 'aria-busy' | 'id'>;
4
- /**
5
- * List component (`Combobox.List` and `Listbox.List`): the WAI-ARIA listbox pattern by default (`role="listbox"` with
6
- * `role="option"` items), or the grid pattern with `type="grid"` (`role="grid"` with one
7
- * `role="row"` per option, made of the option `role="gridcell"` and its action cells).
8
- *
9
- * @see https://www.w3.org/WAI/ARIA/apg/patterns/listbox/
10
- * @see https://www.w3.org/WAI/ARIA/apg/patterns/grid/
11
- *
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
- * - Inside a `ListboxProvider`: a standalone list that owns focus (`tabindex="0"` +
16
- * `aria-activedescendant`) and handles its own keyboard navigation.
17
- *
18
- * @param props Component props.
19
- * @return Vue element.
20
- */
21
- declare const ListboxList: import('vue').DefineSetupFnComponent<ListboxListProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "children" | "aria-label" | "id" | "aria-busy"> & {
22
- class?: import('../../utils/VueToJSX').ClassValue;
23
- } & {}, import('vue').PublicProps>;
24
- export { COMPONENT_NAME, CLASSNAME };
25
- export default ListboxList;
@@ -1,23 +0,0 @@
1
- import { ListboxOptionActionProps as UIProps, COMPONENT_NAME, CLASSNAME } from '@lumx/core/js/components/Listbox/ListboxOptionAction';
2
- import { VueToJSXProps } from '../../utils/VueToJSX';
3
- export type ListboxOptionActionProps = Pick<VueToJSXProps<UIProps>, 'isDisabled' | 'class'> & {
4
- /** On click callback. */
5
- onClick?: (evt: MouseEvent) => void;
6
- };
7
- /**
8
- * Combobox.OptionAction sub-component.
9
- *
10
- * Renders a secondary action button within a combobox option row (grid mode).
11
- *
12
- * Renders nothing outside grid mode (`type="grid"` on the parent list): without the grid
13
- * navigation, an action would not be reachable by keyboard and would break the listbox pattern.
14
- *
15
- * @param props Component props.
16
- * @return Vue element.
17
- */
18
- declare const ListboxOptionAction: import('vue').DefineSetupFnComponent<ListboxOptionActionProps, {}, {}, Pick<VueToJSXProps<UIProps>, "class" | "isDisabled"> & {
19
- /** On click callback. */
20
- onClick?: (evt: MouseEvent) => void;
21
- } & {}, import('vue').PublicProps>;
22
- export { COMPONENT_NAME, CLASSNAME };
23
- export default ListboxOptionAction;
@@ -1,14 +0,0 @@
1
- import { ListboxOptionSkeletonProps as UIProps, ListboxOptionSkeletonPropsToOverride, COMPONENT_NAME, CLASSNAME } from '@lumx/core/js/components/Listbox/ListboxOptionSkeleton';
2
- import { VueToJSXProps } from '../../utils/VueToJSX';
3
- export type ListboxOptionSkeletonProps = VueToJSXProps<UIProps, ListboxOptionSkeletonPropsToOverride>;
4
- /**
5
- * Combobox.OptionSkeleton component — renders skeleton placeholder(s) inside a combobox list.
6
- *
7
- * @param props Component props.
8
- * @return Vue element.
9
- */
10
- declare const ListboxOptionSkeleton: import('vue').DefineSetupFnComponent<ListboxOptionSkeletonProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | ListboxOptionSkeletonPropsToOverride> & {
11
- class?: import('../../utils/VueToJSX').ClassValue;
12
- } & {}, import('vue').PublicProps>;
13
- export { COMPONENT_NAME, CLASSNAME };
14
- export default ListboxOptionSkeleton;
@@ -1,16 +0,0 @@
1
- /**
2
- * Internal standalone listbox provider.
3
- *
4
- * Creates the standalone listbox handle (the list owns focus) and shares it with the list,
5
- * the options and the list state rendered inside.
6
- */
7
- declare const ListboxProvider: import('vue').DefineSetupFnComponent<object, {
8
- select: (option: {
9
- value: string;
10
- }) => true;
11
- }, {}, object & {
12
- onSelect?: ((option: {
13
- value: string;
14
- }) => any) | undefined;
15
- }, import('vue').PublicProps>;
16
- export default ListboxProvider;
@@ -1,14 +0,0 @@
1
- import { ListboxSectionProps as UIProps, ListboxSectionPropsToOverride, COMPONENT_NAME, CLASSNAME } from '@lumx/core/js/components/Listbox/ListboxSection';
2
- import { VueToJSXProps } from '../../utils/VueToJSX';
3
- export type ListboxSectionProps = VueToJSXProps<UIProps, ListboxSectionPropsToOverride | 'hidden' | 'aria-hidden'>;
4
- /**
5
- * Combobox.Section component - groups Combobox.Option items under a labelled section.
6
- *
7
- * @param props Component props.
8
- * @return Vue element.
9
- */
10
- declare const ListboxSection: import('vue').DefineSetupFnComponent<ListboxSectionProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "children" | "aria-hidden" | "hidden"> & {
11
- class?: import('../../utils/VueToJSX').ClassValue;
12
- } & {}, import('vue').PublicProps>;
13
- export { COMPONENT_NAME, CLASSNAME };
14
- export default ListboxSection;
@@ -1,14 +0,0 @@
1
- import { ListboxStateProps as UIProps, COMPONENT_NAME, CLASSNAME } from '@lumx/core/js/components/Listbox/ListboxState';
2
- import { VueToJSXProps } from '../../utils/VueToJSX';
3
- export type ListboxStateProps = VueToJSXProps<UIProps, 'state'>;
4
- /**
5
- * Combobox.State component - displays empty and error states for the combobox list.
6
- *
7
- * @param props Component props.
8
- * @return Vue element.
9
- */
10
- declare const ListboxState: import('vue').DefineSetupFnComponent<ListboxStateProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "children" | "state"> & {
11
- class?: import('../../utils/VueToJSX').ClassValue;
12
- } & {}, import('vue').PublicProps>;
13
- export { COMPONENT_NAME, CLASSNAME };
14
- export default ListboxState;
@@ -1,23 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { ListboxHandle } from '@lumx/core/js/components/Listbox/types';
3
- /**
4
- * Context value shared by the listbox sub-components (list, options, sections, skeletons, state).
5
- *
6
- * Provided by `ListboxProvider` (standalone listbox) and by `Combobox.Provider` (listbox of a combobox),
7
- * then re-provided by the list with its `type`.
8
- */
9
- export interface ListboxContextValue {
10
- /** The listbox handle (null inside a combobox until the trigger creates it). */
11
- list: Readonly<Ref<ListboxHandle | null>>;
12
- /** The ID of the listbox element. */
13
- listboxId: string;
14
- /** The pattern of the list. "grid" enables 2D keyboard navigation and action buttons on options. */
15
- type: 'listbox' | 'grid';
16
- }
17
- /** Provide the listbox context (see `ListboxProvider` and `Combobox.Provider`). */
18
- export declare function provideListboxContext(value: ListboxContextValue): void;
19
- /**
20
- * Access the listbox context.
21
- * @throws Error outside a `ListboxProvider` or a `Combobox.Provider`.
22
- */
23
- export declare function useListboxContext(): ListboxContextValue;
@@ -1,13 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { ListboxEventMap, ListboxHandle } from '@lumx/core/js/components/Listbox/types';
3
- /** Minimal event source shape of the listbox handle. */
4
- export interface EventSource {
5
- subscribe(event: string, callback: (value: unknown) => void): () => void;
6
- }
7
- /**
8
- * Subscribe to an event of a listbox handle. Re-subscribes when the handle changes.
9
- * `optionsChange` bursts are coalesced into a single deferred update.
10
- */
11
- export declare function useHandleEvent<V>(handle: Readonly<Ref<EventSource | null>>, event: string, initialValue: V): Ref<V>;
12
- /** Subscribe to a listbox handle event. */
13
- export declare function useListboxEvent<K extends keyof ListboxEventMap>(handle: Readonly<Ref<ListboxHandle | null>>, event: K, initialValue: ListboxEventMap[K]): Ref<ListboxEventMap[K]>;
@@ -1,47 +0,0 @@
1
- export declare const Listbox: {
2
- /** Standalone listbox provider (creates the listbox handle). */
3
- Provider: import('vue').DefineSetupFnComponent<object, {
4
- select: (option: {
5
- value: string;
6
- }) => true;
7
- }, {}, object & {
8
- onSelect?: ((option: {
9
- value: string;
10
- }) => any) | undefined;
11
- }, import('vue').PublicProps>;
12
- /** List (listbox pattern by default, grid pattern with `type="grid"` for options with actions). */
13
- List: import('vue').DefineSetupFnComponent<import('./ListboxList').ListboxListProps, {}, {}, Omit<import('@lumx/core/js/components/Listbox/ListboxList').ListboxListProps, "className" | import('@lumx/core/js/types').PropsToOverride | "children" | "aria-label" | "id" | "aria-busy"> & {
14
- class?: import('../../utils/VueToJSX').ClassValue;
15
- } & {}, import('vue').PublicProps>;
16
- Option: import('vue').DefineSetupFnComponent<import('./ListboxOption').ListboxOptionProps, {
17
- click: () => boolean;
18
- }, {}, Omit<import('@lumx/core/js/components/Listbox/ListboxOption').ListboxOptionProps, "className" | import('@lumx/core/js/types').PropsToOverride | "id" | "hidden" | "descriptionId" | "isGrid" | import('@lumx/core/js/components/Listbox/ListboxOption').ListboxOptionPropsToOverride> & {
19
- class?: import('../../utils/VueToJSX').ClassValue;
20
- } & {
21
- tooltipProps?: Partial<import('../tooltip').TooltipProps>;
22
- actionProps?: Record<string, any>;
23
- } & {
24
- onClick?: (() => any) | undefined;
25
- }, import('vue').PublicProps>;
26
- OptionAction: import('vue').DefineSetupFnComponent<import('./ListboxOptionAction').ListboxOptionActionProps, {}, {}, Pick<import('../../utils/VueToJSX').VueToJSXProps<import('@lumx/core/js/components/Listbox/ListboxOptionAction').ListboxOptionActionProps>, "class" | "isDisabled"> & {
27
- onClick?: (evt: MouseEvent) => void;
28
- } & {}, import('vue').PublicProps>;
29
- OptionMoreInfo: import('vue').DefineSetupFnComponent<import('./ListboxOptionMoreInfo').ListboxOptionMoreInfoProps, {
30
- toggle: (isOpen: boolean) => boolean;
31
- }, {}, Omit<import('@lumx/core/js/components/Listbox/ListboxOptionMoreInfo').ListboxOptionMoreInfoProps, "className" | import('@lumx/core/js/types').PropsToOverride | "onMouseEnter" | "onMouseLeave" | "buttonProps" | import('@lumx/core/js/components/Listbox/ListboxOptionMoreInfo').ListboxOptionMoreInfoPropsToOverride> & {
32
- class?: import('../../utils/VueToJSX').ClassValue;
33
- } & {
34
- onToggle?: (isOpen: boolean) => void;
35
- } & {
36
- onToggle?: ((isOpen: boolean) => any) | undefined;
37
- }, import('vue').PublicProps>;
38
- OptionSkeleton: import('vue').DefineSetupFnComponent<import('./ListboxOptionSkeleton').ListboxOptionSkeletonProps, {}, {}, Omit<import('@lumx/core/js/components/Listbox/ListboxOptionSkeleton').ListboxOptionSkeletonProps, "className" | import('@lumx/core/js/types').PropsToOverride | import('@lumx/core/js/components/Listbox/ListboxOptionSkeleton').ListboxOptionSkeletonPropsToOverride> & {
39
- class?: import('../../utils/VueToJSX').ClassValue;
40
- } & {}, import('vue').PublicProps>;
41
- Section: import('vue').DefineSetupFnComponent<import('./ListboxSection').ListboxSectionProps, {}, {}, Omit<import('@lumx/core/js/components/Listbox/ListboxSection').ListboxSectionProps, "className" | import('@lumx/core/js/types').PropsToOverride | "children" | "aria-hidden" | "hidden"> & {
42
- class?: import('../../utils/VueToJSX').ClassValue;
43
- } & {}, import('vue').PublicProps>;
44
- State: import('vue').DefineSetupFnComponent<import('./ListboxState').ListboxStateProps, {}, {}, Omit<import('@lumx/core/js/components/Listbox/ListboxState').ListboxStateProps, "className" | import('@lumx/core/js/types').PropsToOverride | "children" | "state"> & {
45
- class?: import('../../utils/VueToJSX').ClassValue;
46
- } & {}, import('vue').PublicProps>;
47
- };