@lumx/core 4.25.1-alpha.3 → 4.25.1-alpha.4

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 (38) hide show
  1. package/components-and-utils.css +42 -34
  2. package/js/components/Combobox/ComboboxOptionTests.d.ts +3 -3
  3. package/js/components/Combobox/ComboboxPopover.d.ts +1 -1
  4. package/js/components/Combobox/Stories.d.ts +32 -1
  5. package/js/components/Combobox/constants.d.ts +0 -4
  6. package/js/components/Combobox/index.d.ts +0 -16
  7. package/js/components/Combobox/setupCombobox.d.ts +2 -2
  8. package/js/components/Combobox/setupComboboxButton.d.ts +4 -3
  9. package/js/components/Combobox/setupComboboxInput.d.ts +1 -1
  10. package/js/components/Combobox/types.d.ts +14 -127
  11. package/js/components/{Combobox/ComboboxList.d.ts → Listbox/ListboxList.d.ts} +14 -8
  12. package/js/components/{Combobox/ComboboxOption.d.ts → Listbox/ListboxOption.d.ts} +17 -11
  13. package/js/components/{Combobox/ComboboxOptionAction.d.ts → Listbox/ListboxOptionAction.d.ts} +11 -5
  14. package/js/components/{Combobox/ComboboxOptionMoreInfo.d.ts → Listbox/ListboxOptionMoreInfo.d.ts} +14 -8
  15. package/js/components/{Combobox/ComboboxSelectionIcon.d.ts → Listbox/ListboxOptionSelectionIcon.d.ts} +2 -2
  16. package/js/components/{Combobox/ComboboxOptionSkeleton.d.ts → Listbox/ListboxOptionSkeleton.d.ts} +14 -8
  17. package/js/components/{Combobox/ComboboxSection.d.ts → Listbox/ListboxSection.d.ts} +17 -11
  18. package/js/components/{Combobox/ComboboxState.d.ts → Listbox/ListboxState.d.ts} +12 -6
  19. package/js/components/Listbox/Tests.d.ts +43 -0
  20. package/js/components/Listbox/constants.d.ts +4 -0
  21. package/js/components/Listbox/index.d.ts +18 -0
  22. package/js/components/Listbox/navigation.d.ts +40 -0
  23. package/js/components/Listbox/setupListbox.d.ts +17 -0
  24. package/js/components/Listbox/subscribeListboxState.d.ts +24 -0
  25. package/js/components/Listbox/types.d.ts +146 -0
  26. package/js/components/{Combobox → Listbox}/utils.d.ts +2 -2
  27. package/js/components/Popover/Stories.d.ts +2 -2
  28. package/js/components/TimePickerField/index.d.ts +4 -4
  29. package/js/utils/select/renderSelectOptions.d.ts +1 -1
  30. package/js/utils/select/types.d.ts +3 -0
  31. package/lumx.css +42 -34
  32. package/package.json +2 -2
  33. package/scss/_components_classes.scss +1 -0
  34. package/scss/components/combobox/_index.scss +5 -51
  35. package/scss/components/list/_index.scss +3 -1
  36. package/scss/components/list-box/_index.scss +69 -0
  37. package/js/components/Combobox/setupListbox.d.ts +0 -23
  38. package/js/components/Combobox/subscribeComboboxState.d.ts +0 -23
@@ -5056,39 +5056,10 @@ table {
5056
5056
  display: block;
5057
5057
  scroll-snap-align: end;
5058
5058
  }
5059
-
5060
- .lumx-combobox-popover:empty, .lumx-combobox-popover:not(:has(.lumx-combobox-option)):not(:has(.lumx-combobox-state)):not(:has(.lumx-combobox-option-skeleton)),
5061
- .lumx-combobox-list:empty,
5062
- .lumx-combobox-list:not(:has(.lumx-combobox-option)):not(:has(.lumx-combobox-state)):not(:has(.lumx-combobox-option-skeleton)) {
5059
+ .lumx-combobox-popover:empty, .lumx-combobox-popover:not(:has(.lumx-listbox-option)):not(:has(.lumx-listbox-state)):not(:has(.lumx-listbox-option-skeleton)) {
5063
5060
  display: none;
5064
5061
  }
5065
5062
 
5066
- .lumx-combobox-state {
5067
- text-align: center;
5068
- }
5069
-
5070
- .lumx-combobox-option-skeleton .lumx-skeleton-typography {
5071
- width: min(65%, 200px);
5072
- }
5073
- .lumx-combobox-option-skeleton:nth-child(3n+1) .lumx-skeleton-typography {
5074
- width: min(70%, 230px);
5075
- }
5076
- .lumx-combobox-option-skeleton:nth-child(3n+2) .lumx-skeleton-typography {
5077
- width: min(55%, 170px);
5078
- }
5079
- .lumx-combobox-option__selection-icon {
5080
- margin: auto;
5081
- }
5082
- .lumx-combobox-option .lumx-list-item__content {
5083
- display: flex;
5084
- flex-direction: column;
5085
- justify-items: center;
5086
- }
5087
- .lumx-combobox-option-more-info__popover {
5088
- max-width: 256px;
5089
- padding: 16px;
5090
- }
5091
-
5092
5063
  /* ==========================================================================
5093
5064
  Comment block
5094
5065
  ========================================================================== */
@@ -7458,6 +7429,43 @@ table {
7458
7429
  opacity: 1;
7459
7430
  }
7460
7431
  }
7432
+ /* ==========================================================================
7433
+ Listbox
7434
+ ========================================================================== */
7435
+ .lumx-listbox-list:empty, .lumx-listbox-list:not(:has(.lumx-listbox-option)):not(:has(.lumx-listbox-state)):not(:has(.lumx-listbox-option-skeleton)) {
7436
+ display: none;
7437
+ }
7438
+
7439
+ .lumx-listbox-state {
7440
+ text-align: center;
7441
+ }
7442
+
7443
+ .lumx-listbox-option-skeleton .lumx-skeleton-typography {
7444
+ width: min(65%, 200px);
7445
+ }
7446
+ .lumx-listbox-option-skeleton:nth-child(3n+1) .lumx-skeleton-typography {
7447
+ width: min(70%, 230px);
7448
+ }
7449
+ .lumx-listbox-option-skeleton:nth-child(3n+2) .lumx-skeleton-typography {
7450
+ width: min(55%, 170px);
7451
+ }
7452
+ .lumx-listbox-option__selection-icon {
7453
+ margin: auto;
7454
+ }
7455
+ .lumx-listbox-option .lumx-list-item__wrapper,
7456
+ .lumx-listbox-option .lumx-list-item__content {
7457
+ min-width: 0;
7458
+ }
7459
+ .lumx-listbox-option .lumx-list-item__content {
7460
+ display: flex;
7461
+ flex-direction: column;
7462
+ justify-items: center;
7463
+ }
7464
+ .lumx-listbox-option-more-info__popover {
7465
+ max-width: 256px;
7466
+ padding: 16px;
7467
+ }
7468
+
7461
7469
  /* ==========================================================================
7462
7470
  Index
7463
7471
  ========================================================================== */
@@ -8266,17 +8274,17 @@ table {
8266
8274
  .lumx-list-item__link--is-selected:active, .lumx-list-item__link--is-selected[data-lumx-active] {
8267
8275
  background-color: var(--lumx-color-primary-L3);
8268
8276
  }
8269
- .lumx-list-item .lumx-action-area__action[aria-selected=true]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action::before {
8277
+ .lumx-list-item .lumx-action-area__action[aria-selected=true]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false]):not([aria-current=""])::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action::before {
8270
8278
  background-color: var(--lumx-color-primary-L5);
8271
8279
  }
8272
- .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-hover]::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-focus-visible-added]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-hover]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-focus-visible-added]::before {
8280
+ .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-hover]::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-focus-visible-added]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false]):not([aria-current=""])[data-lumx-hover]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false]):not([aria-current=""])[data-focus-visible-added]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-hover]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-focus-visible-added]::before {
8273
8281
  background-color: var(--lumx-color-primary-L4);
8274
8282
  }
8275
8283
  @media (hover: hover) {
8276
- .lumx-list-item .lumx-action-area__action[aria-selected=true]:hover::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:hover::before {
8284
+ .lumx-list-item .lumx-action-area__action[aria-selected=true]:hover::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false]):not([aria-current=""]):hover::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:hover::before {
8277
8285
  background-color: var(--lumx-color-primary-L4);
8278
8286
  }}
8279
- .lumx-list-item .lumx-action-area__action[aria-selected=true]:active::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-active]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:active::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-active]::before {
8287
+ .lumx-list-item .lumx-action-area__action[aria-selected=true]:active::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-active]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false]):not([aria-current=""]):active::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false]):not([aria-current=""])[data-lumx-active]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:active::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-active]::before {
8280
8288
  background-color: var(--lumx-color-primary-L3);
8281
8289
  }
8282
8290
  .lumx-list-item__link--is-disabled, .lumx-list-item__link[aria-disabled=true], .lumx-list-item:has(.lumx-action-area__action[aria-disabled=true]) {
@@ -4,10 +4,10 @@ type RenderResult = {
4
4
  container: HTMLElement;
5
5
  };
6
6
  /**
7
- * Options to set up the ComboboxOption test suite.
7
+ * Options to set up the ListboxOption test suite.
8
8
  * Injected by the framework-specific test file (React or Vue).
9
9
  */
10
- export interface ComboboxOptionTestSetup {
10
+ export interface ListboxOptionTestSetup {
11
11
  /** Combobox compound component namespace */
12
12
  Combobox: Pick<ComboboxNamespace, 'Provider' | 'Input' | 'List' | 'Option' | 'SelectionIcon'>;
13
13
  /**
@@ -20,5 +20,5 @@ export interface ComboboxOptionTestSetup {
20
20
  * Shared Combobox.Option test suite — covers DOM shape and ARIA correctness.
21
21
  * Runs the same assertions against both React and Vue wrappers.
22
22
  */
23
- export default function comboboxOptionTests({ Combobox, render }: ComboboxOptionTestSetup): void;
23
+ export default function listboxOptionTests({ Combobox, render }: ListboxOptionTestSetup): void;
24
24
  export {};
@@ -14,7 +14,7 @@ type InheritedPopoverProps = Pick<PopoverProps, 'closeOnClickAway' | 'closeOnEsc
14
14
  * Defines the props for the core ComboboxPopover template.
15
15
  */
16
16
  export interface ComboboxPopoverProps extends HasClassName, InheritedPopoverProps {
17
- /** Content (should contain a ComboboxList). */
17
+ /** Content (should contain a ListboxList). */
18
18
  children?: JSXElement;
19
19
  }
20
20
  /**
@@ -4,12 +4,13 @@ import type { ComboboxNamespace } from './Tests';
4
4
  * Setup Combobox demo stories for a specific framework (React or Vue).
5
5
  * Framework-specific components and hooks are injected via options.
6
6
  */
7
- export declare function setup({ components: { Combobox, IconButton, Avatar, SkeletonCircle }, decorators: { withValueOnChange }, }: SetupStoriesOptions<{
7
+ export declare function setup({ components: { Combobox, IconButton, Avatar, SkeletonCircle, Text }, decorators: { withValueOnChange }, }: SetupStoriesOptions<{
8
8
  components: {
9
9
  Combobox: ComboboxNamespace;
10
10
  IconButton: any;
11
11
  Avatar: any;
12
12
  SkeletonCircle: any;
13
+ Text: any;
13
14
  };
14
15
  decorators: 'withValueOnChange';
15
16
  }>): {
@@ -79,6 +80,26 @@ export declare function setup({ components: { Combobox, IconButton, Avatar, Skel
79
80
  onChange: (v: string) => void;
80
81
  }) => import("react").JSX.Element;
81
82
  };
83
+ ComboboxWithSelectionIconSingle: {
84
+ args: {
85
+ value: string;
86
+ };
87
+ decorators: ((story: any, context: any) => any)[];
88
+ render: ({ value, onChange }: {
89
+ value: string;
90
+ onChange: (v: string) => void;
91
+ }) => import("react").JSX.Element;
92
+ };
93
+ ComboboxWithSelectionIconMultiple: {
94
+ args: {
95
+ value: string;
96
+ };
97
+ decorators: ((story: any, context: any) => any)[];
98
+ render: ({ value, onChange }: {
99
+ value: string;
100
+ onChange: (v: string) => void;
101
+ }) => import("react").JSX.Element;
102
+ };
82
103
  GridComboboxWithInput: {
83
104
  args: {
84
105
  value: string;
@@ -174,4 +195,14 @@ export declare function setup({ components: { Combobox, IconButton, Avatar, Skel
174
195
  onChange: (v: string) => void;
175
196
  }) => import("react").JSX.Element;
176
197
  };
198
+ ComboboxWithTruncatedOption: {
199
+ args: {
200
+ value: string;
201
+ };
202
+ decorators: ((story: any, context: any) => any)[];
203
+ render: ({ value, onChange }: {
204
+ value: string;
205
+ onChange: (v: string) => void;
206
+ }) => import("react").JSX.Element;
207
+ };
177
208
  };
@@ -1,7 +1,3 @@
1
1
  import { VHSize } from '../../utils/browser/css/types';
2
- import { OptionActiveEvent } from './types';
3
2
  export declare const DEFAULT_COMBOBOX_POPOVER_MAX_HEIGHT: VHSize;
4
3
  export declare const COMBOBOX_PROVIDER_COMPONENT_NAME = "ComboboxProvider";
5
- export declare const OPTION_ACTIVE_EVENT_PREFIX: "optionActive:";
6
- export declare const optionActiveEvent: (optionId: string) => OptionActiveEvent;
7
- export declare const isOptionActiveEvent: (event: string) => event is OptionActiveEvent;
@@ -1,25 +1,9 @@
1
1
  export { setupComboboxInput } from './setupComboboxInput';
2
2
  export { setupComboboxButton } from './setupComboboxButton';
3
3
  export type { ComboboxCallbacks, ComboboxHandle } from './types';
4
- export { ComboboxList } from './ComboboxList';
5
- export type { ComboboxListProps, ComboboxListType } from './ComboboxList';
6
4
  export { ComboboxPopover } from './ComboboxPopover';
7
5
  export type { ComboboxPopoverProps, ComboboxPopoverComponents } from './ComboboxPopover';
8
- export { ComboboxOption } from './ComboboxOption';
9
- export type { ComboboxOptionProps, ComboboxOptionPropsToOverride } from './ComboboxOption';
10
- export { ComboboxOptionAction } from './ComboboxOptionAction';
11
- export type { ComboboxOptionActionProps } from './ComboboxOptionAction';
12
- export { ComboboxOptionSkeleton } from './ComboboxOptionSkeleton';
13
- export type { ComboboxOptionSkeletonProps, ComboboxOptionSkeletonPropsToOverride } from './ComboboxOptionSkeleton';
14
- export { ComboboxOptionMoreInfo } from './ComboboxOptionMoreInfo';
15
- export type { ComboboxOptionMoreInfoProps, ComboboxOptionMoreInfoPropsToOverride, ComboboxOptionMoreInfoComponents, } from './ComboboxOptionMoreInfo';
16
6
  export { ComboboxButton } from './ComboboxButton';
17
7
  export type { ComboboxButtonProps, ComboboxButtonComponents, ComboboxButtonLabelDisplayMode } from './ComboboxButton';
18
8
  export { ComboboxInput } from './ComboboxInput';
19
9
  export type { ComboboxInputProps, ComboboxInputComponents } from './ComboboxInput';
20
- export { ComboboxSection } from './ComboboxSection';
21
- export type { ComboboxSectionProps, ComboboxSectionPropsToOverride, ComboboxSectionComponents, } from './ComboboxSection';
22
- export { ComboboxState } from './ComboboxState';
23
- export type { ComboboxStateProps } from './ComboboxState';
24
- export { subscribeComboboxState } from './subscribeComboboxState';
25
- export type { ComboboxStateSetters } from './subscribeComboboxState';
@@ -1,6 +1,6 @@
1
1
  import type { ComboboxCallbacks, ComboboxHandle, OnTriggerAttach } from './types';
2
2
  /** Options for configuring the shared combobox behavior. */
3
- interface ComboboxOptions {
3
+ interface ListboxOptions {
4
4
  /** When true, ArrowDown/ArrowUp wrap around in listbox mode (input pattern). Default: false. */
5
5
  wrapNavigation?: boolean;
6
6
  }
@@ -20,5 +20,5 @@ interface ComboboxOptions {
20
20
  * attach the appropriate controller.
21
21
  * @returns A ComboboxHandle for interacting with the combobox.
22
22
  */
23
- export declare function setupCombobox(callbacks: ComboboxCallbacks, options?: ComboboxOptions, onTriggerAttach?: OnTriggerAttach): ComboboxHandle;
23
+ export declare function setupCombobox(callbacks: ComboboxCallbacks, options?: ListboxOptions, onTriggerAttach?: OnTriggerAttach): ComboboxHandle;
24
24
  export {};
@@ -4,10 +4,11 @@ import type { ComboboxCallbacks, ComboboxHandle } from './types';
4
4
  *
5
5
  * Creates a full combobox handle with the button-mode controller automatically
6
6
  * wired in and the trigger registered. The consumer only needs to call
7
- * `handle.registerListbox(listbox)`.
7
+ * `handle.list.mount(listbox)`.
8
8
  *
9
- * Handles: Space (select/open), Home/End (listbox navigation),
10
- * printable characters (typeahead), and click (toggle).
9
+ * Handles what is button-specific: click (toggle), Space (open), Tab and Alt+ArrowUp (select),
10
+ * and "open first" for Home/End, ArrowLeft/Right and typeahead. The navigation itself is
11
+ * delegated to `list.handleKeydown`.
11
12
  *
12
13
  * @param button The button element to use as the combobox trigger.
13
14
  * @param callbacks Callbacks for select and open/close events.
@@ -21,7 +21,7 @@ export interface SetupComboboxInputOptions extends ComboboxCallbacks, ComboboxIn
21
21
  *
22
22
  * Creates a full combobox handle with the input-mode controller automatically
23
23
  * wired in and the trigger registered. The consumer only needs to call
24
- * `handle.registerListbox(listbox)`.
24
+ * `handle.list.mount(listbox)`.
25
25
  *
26
26
  * Handles: Home/End (text cursor), ArrowLeft/Right (clear active descendant),
27
27
  * filtering (on input and on open), and focus behavior.
@@ -1,54 +1,5 @@
1
- import type { FocusNavigationController } from '../../utils/focusNavigation';
2
- /** Section visibility state tracked per registration. */
3
- export interface SectionState {
4
- hidden: boolean;
5
- 'aria-hidden': boolean;
6
- }
7
- /** Registration entry for a section element. */
8
- export interface SectionRegistration {
9
- callback: (state: SectionState) => void;
10
- last: SectionState;
11
- }
12
- /** Registration entry for an option element. */
13
- export interface OptionRegistration {
14
- callback: (isFiltered: boolean) => void;
15
- lastFiltered: boolean;
16
- }
17
- /** Event name for the active state of one option. */
18
- export type OptionActiveEvent = `optionActive:${string}`;
19
- /** Map of combobox event names to their payload types. */
20
- export interface ComboboxEventMap {
21
- /** Fired when the combobox open state changes. Payload: whether the combobox is open. */
22
- open: boolean;
23
- /** Fired when the active descendant changes (visual focus). Payload: the option id or null. */
24
- activeDescendantChange: string | null;
25
- /**
26
- * Fired when the visible option count changes.
27
- * Payload: the number of visible options plus the current input value.
28
- */
29
- optionsChange: {
30
- optionsLength: number;
31
- inputValue?: string;
32
- } | undefined;
33
- /**
34
- * Fired immediately when the aggregate loading state changes (skeleton count transitions
35
- * between 0 and >0). Used for empty suppression in ComboboxState and for aria-busy on the listbox.
36
- */
37
- loadingChange: boolean;
38
- /**
39
- * Fired after a 500ms debounce when loading persists, or immediately when loading ends.
40
- * Used to control the loading message text in the live region (ComboboxState).
41
- */
42
- loadingAnnouncement: boolean;
43
- /**
44
- * Fired only when this option becomes the active descendant (true)
45
- * or stops being the active descendant (false).
46
- * Build the key with optionActiveEvent(optionId).
47
- */
48
- [event: OptionActiveEvent]: boolean;
49
- }
50
- /** Callback provided in events subscriptions */
51
- export type SubscriptionCallback<T extends keyof ComboboxEventMap = keyof ComboboxEventMap> = (value: ComboboxEventMap[T]) => void;
1
+ import type { ListboxHandle } from '../Listbox/types';
2
+ export type { SectionState, SectionRegistration, OptionRegistration, OptionActiveEvent } from '../Listbox/types';
52
3
  /** Callbacks provided by the consumer (React/Vue) to react to combobox state changes. */
53
4
  export interface ComboboxCallbacks {
54
5
  /** Called when an option is selected (click or keyboard). */
@@ -93,91 +44,27 @@ export interface ComboboxInputOptions {
93
44
  */
94
45
  selectionMode?: 'fill' | 'keep' | 'clear';
95
46
  }
96
- /** Handle returned by `setupCombobox`. Used by framework wrappers and mode controllers. */
47
+ /**
48
+ * Handle returned by `setupCombobox`. Used by framework wrappers and mode controllers.
49
+ *
50
+ * The combobox owns the trigger. Everything else (the open state, the option registry, the filter,
51
+ * the focus navigation, the selection, the loading state and all the events) is on the
52
+ * {@link ListboxHandle} exposed as `list`: the listbox element is mounted with `list.mount(element)`.
53
+ * The combobox open state is the listbox `open` event.
54
+ */
97
55
  export interface ComboboxHandle {
98
56
  /** Register the trigger element. Returns a cleanup function. */
99
57
  registerTrigger(trigger: HTMLInputElement | HTMLButtonElement): () => void;
100
- /** Register the listbox/grid element. Returns a cleanup function. */
101
- registerListbox(listbox: HTMLElement): () => void;
102
58
  /** Tear down all listeners and state. */
103
59
  destroy(): void;
104
- /** Subscribe to a combobox event. Returns an unsubscribe function. */
105
- subscribe<K extends keyof ComboboxEventMap>(event: K, callback: SubscriptionCallback<K>): () => void;
106
- /**
107
- * Read the last dispatched value of an event synchronously, for pull-based subscribers such as
108
- * React's `useSyncExternalStore`. Returns `undefined` until the event has fired at least once.
109
- */
110
- getSnapshot<K extends keyof ComboboxEventMap>(event: K): ComboboxEventMap[K] | undefined;
111
60
  /** The current trigger element (may be null before registration). */
112
61
  readonly trigger: HTMLInputElement | HTMLButtonElement | null;
113
- /** The current listbox/grid element (may be null before registration). */
114
- readonly listbox: HTMLElement | null;
115
- /** The focus navigation controller. */
116
- readonly focusNav: FocusNavigationController | null;
117
- /** Whether the popup is open. */
62
+ /** The listbox handle (option registry, filter, focus navigation, selection, listbox events). */
63
+ readonly list: ListboxHandle;
64
+ /** Whether the popup is open (same as `list.isOpen`). */
118
65
  readonly isOpen: boolean;
119
- /** Whether multi-select mode. */
120
- readonly isMultiSelect: boolean;
121
- /** Whether any skeleton placeholders are currently registered (loading). */
122
- readonly isLoading: boolean;
123
- /** Set the open state, update ARIA, fire callback. */
66
+ /** Set the open state and update ARIA. Subscribe to `list` `open` to observe it. */
124
67
  setIsOpen(isOpen: boolean): void;
125
- /** Select an option (or null to clear), fire callback. */
126
- select(option: HTMLElement | null): void;
127
- /**
128
- * Replay the pending navigation intent stored on the focus navigation controller via
129
- * its `goTo` resolver. Called by the framework wrapper after the option children
130
- * commit (keyboard opens from the closed state defer navigation until then). No-op
131
- * when nothing is pending.
132
- */
133
- flushPendingNavigation(): void;
134
- /**
135
- * Register an option DOM element for filter notifications.
136
- * The element's textContent is used as the searchable text.
137
- * The callback is invoked immediately with the current filter state,
138
- * and again whenever the filter changes.
139
- * Returns a cleanup function that unregisters the option.
140
- */
141
- registerOption(element: HTMLElement, onFilterChange: (isFiltered: boolean) => void): () => void;
142
- /**
143
- * Set the current filter value and notify all registered options of their match state.
144
- * Options whose text does not start with the filter value are notified with isFiltered=true.
145
- * An empty filter value clears filtering (all options become visible).
146
- */
147
- setFilter(filterValue: string): void;
148
- /**
149
- * Re-evaluate the filter state of a single registered option.
150
- * Call this after the option's `data-value` or textContent has been updated
151
- * (e.g. after a framework re-render) to ensure its filtered/visible state
152
- * is consistent with the current filter value.
153
- */
154
- refilterOption(element: HTMLElement): void;
155
- /**
156
- * Register a section DOM element for state notifications.
157
- * The callback is invoked immediately with the current state, and again whenever
158
- * the state changes after a filter update or option un/registration.
159
- *
160
- * - `hidden`: true when all registered options are filtered out (keeps children mounted
161
- * but invisible to the user and screen readers).
162
- * - `aria-hidden`: true when the section has no registered options at all (skeleton-only).
163
- * The section stays visually rendered but is hidden from assistive technology —
164
- * the live region (`ComboboxState`) handles the loading announcement instead.
165
- *
166
- * At most one of `hidden` / `aria-hidden` is true at a time.
167
- *
168
- * Returns a cleanup function that unregisters the section.
169
- */
170
- registerSection(element: HTMLElement, onChange: (state: {
171
- hidden: boolean;
172
- 'aria-hidden': boolean;
173
- }) => void): () => void;
174
- /**
175
- * Register a skeleton placeholder. Increments the internal skeleton counter.
176
- * When the counter transitions from 0 to >0, fires `loadingChange` immediately
177
- * and schedules `loadingAnnouncement` after 500ms. Returns a cleanup function
178
- * that decrements the counter (and fires the reverse transitions when reaching 0).
179
- */
180
- registerSkeleton(): () => void;
181
68
  }
182
69
  /**
183
70
  * Callback invoked when the trigger is attached and the abort controller is ready.
@@ -4,11 +4,11 @@ import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../t
4
4
  * - `'listbox'`: Standard listbox with `role="listbox"` and `role="option"` items.
5
5
  * - `'grid'`: Grid mode with `role="grid"` and `role="gridcell"` items, enabling 2D keyboard navigation.
6
6
  */
7
- export type ComboboxListType = 'listbox' | 'grid';
7
+ export type ListboxListType = 'listbox' | 'grid';
8
8
  /**
9
- * Defines the props for the core ComboboxList template.
9
+ * Defines the props for the core ListboxList template.
10
10
  */
11
- export interface ComboboxListProps extends HasClassName {
11
+ export interface ListboxListProps extends HasClassName {
12
12
  /** Accessible label for the listbox (required for accessibility). */
13
13
  'aria-label'?: string;
14
14
  /**
@@ -22,7 +22,7 @@ export interface ComboboxListProps extends HasClassName {
22
22
  * Also read by `Combobox.SelectionIcon` to pick the checkbox icons.
23
23
  */
24
24
  'aria-multiselectable'?: boolean | 'true' | 'false';
25
- /** Content (should be ComboboxOption elements). */
25
+ /** Content (should be ListboxOption elements). */
26
26
  children?: JSXElement;
27
27
  /** The ID of the listbox element. */
28
28
  id?: string;
@@ -32,21 +32,27 @@ export interface ComboboxListProps extends HasClassName {
32
32
  * The popup type. Set to "grid" when options have action buttons.
33
33
  * @default 'listbox'
34
34
  */
35
- type?: ComboboxListType;
35
+ type?: ListboxListType;
36
36
  }
37
37
  /**
38
38
  * Component display name.
39
39
  */
40
- export declare const COMPONENT_NAME = "ComboboxList";
40
+ export declare const COMPONENT_NAME = "ListboxList";
41
41
  /**
42
42
  * Component default class name and class prefix.
43
43
  */
44
44
  export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
45
45
  /**
46
- * ComboboxList core template.
46
+ * Legacy class name, emitted next to `CLASSNAME` for backward compatibility.
47
+ *
48
+ * @deprecated Use `CLASSNAME` (`lumx-listbox-*`). The legacy `lumx-combobox-*` class will be removed in the next major version.
49
+ */
50
+ export declare const LEGACY_CLASSNAME = "lumx-combobox-list";
51
+ /**
52
+ * ListboxList core template.
47
53
  * Renders a List with combobox-specific ARIA attributes and styling.
48
54
  *
49
55
  * @param props Component props.
50
56
  * @return JSX element.
51
57
  */
52
- export declare const ComboboxList: (props: ComboboxListProps) => import("react").JSX.Element;
58
+ export declare const ListboxList: (props: ListboxListProps) => import("react").JSX.Element;
@@ -1,18 +1,18 @@
1
1
  import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';
2
2
  /**
3
- * Injected framework-specific components for ComboboxOption rendering.
3
+ * Injected framework-specific components for ListboxOption rendering.
4
4
  */
5
- export interface ComboboxOptionComponents {
5
+ export interface ListboxOptionComponents {
6
6
  /** Tooltip wrapper component (optional). Used when `tooltipProps` is provided. */
7
7
  Tooltip?: any;
8
8
  }
9
9
  /**
10
- * Defines the props for the core ComboboxOption template.
10
+ * Defines the props for the core ListboxOption template.
11
11
  */
12
- export interface ComboboxOptionProps extends HasClassName {
12
+ export interface ListboxOptionProps extends HasClassName {
13
13
  /** A component to be rendered before the content (e.g. an icon or avatar). */
14
14
  before?: JSXElement;
15
- /** A component to be rendered after the content (e.g. ComboboxOptionAction elements). */
15
+ /** A component to be rendered after the content (e.g. ListboxOptionAction elements). */
16
16
  after?: JSXElement;
17
17
  /** Content (option label). */
18
18
  children?: JSXElement;
@@ -35,7 +35,7 @@ export interface ComboboxOptionProps extends HasClassName {
35
35
  * When true, renders a bare `<li hidden>` with only the children text — no ARIA roles,
36
36
  * no classes, no visual structure. This keeps the element in the DOM so its textContent
37
37
  * can be read for future filter evaluations, while naturally excluding it from
38
- * `[role="option"]` queries (focus navigation) and `.lumx-combobox-option` CSS rules
38
+ * `[role="option"]` queries (focus navigation) and `.lumx-listbox-option` CSS rules
39
39
  * (section/popover auto-hide).
40
40
  */
41
41
  hidden?: boolean;
@@ -50,19 +50,25 @@ export interface ComboboxOptionProps extends HasClassName {
50
50
  }
51
51
  /**
52
52
  * Props that React/Vue wrappers need to re-declare with framework-specific types.
53
- * Used by `ReactToJSX<ComboboxOptionProps, ComboboxOptionPropsToOverride>`.
53
+ * Used by `ReactToJSX<ListboxOptionProps, ListboxOptionPropsToOverride>`.
54
54
  */
55
- export type ComboboxOptionPropsToOverride = 'before' | 'after' | 'children' | 'tooltipProps' | 'actionProps';
55
+ export type ListboxOptionPropsToOverride = 'before' | 'after' | 'children' | 'tooltipProps' | 'actionProps';
56
56
  /**
57
57
  * Component display name.
58
58
  */
59
- export declare const COMPONENT_NAME = "ComboboxOption";
59
+ export declare const COMPONENT_NAME = "ListboxOption";
60
60
  /**
61
61
  * Component default class name and class prefix.
62
62
  */
63
63
  export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
64
64
  /**
65
- * ComboboxOption core template.
65
+ * Legacy class name, emitted next to `CLASSNAME` for backward compatibility.
66
+ *
67
+ * @deprecated Use `CLASSNAME` (`lumx-listbox-*`). The legacy `lumx-combobox-*` class will be removed in the next major version.
68
+ */
69
+ export declare const LEGACY_CLASSNAME = "lumx-combobox-option";
70
+ /**
71
+ * ListboxOption core template.
66
72
  * Renders a ListItem with combobox-specific ARIA attributes and structure.
67
73
  *
68
74
  * In grid mode, the ListItem renders with `role="row"` and the option content
@@ -71,4 +77,4 @@ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
71
77
  * @param props Component props.
72
78
  * @return JSX element.
73
79
  */
74
- export declare const ComboboxOption: (props: ComboboxOptionProps, { Tooltip }?: ComboboxOptionComponents) => import("react").JSX.Element;
80
+ export declare const ListboxOption: (props: ListboxOptionProps, { Tooltip }?: ListboxOptionComponents) => import("react").JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import type { CommonRef, HasClassName, HasPolymorphicAs, HasRequiredLinkHref, JSXElement, LumxClassName } from '../../types';
2
2
  import { ClickableElement } from '../RawClickable';
3
3
  /**
4
- * Defines the props for the core ComboboxOptionAction template.
4
+ * Defines the props for the core ListboxOptionAction template.
5
5
  */
6
- export type ComboboxOptionActionProps<E extends ClickableElement = 'button'> = HasPolymorphicAs<E> & HasClassName & HasRequiredLinkHref<E> & {
6
+ export type ListboxOptionActionProps<E extends ClickableElement = 'button'> = HasPolymorphicAs<E> & HasClassName & HasRequiredLinkHref<E> & {
7
7
  /** Content of the action (icon, label, etc.). */
8
8
  children?: JSXElement;
9
9
  /** Unique ID for the action element. */
@@ -18,13 +18,19 @@ export type ComboboxOptionActionProps<E extends ClickableElement = 'button'> = H
18
18
  /**
19
19
  * Component display name.
20
20
  */
21
- export declare const COMPONENT_NAME = "ComboboxOptionAction";
21
+ export declare const COMPONENT_NAME = "ListboxOptionAction";
22
22
  /**
23
23
  * Component default class name and class prefix.
24
24
  */
25
25
  export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
26
26
  /**
27
- * ComboboxOptionAction core template.
27
+ * Legacy class name, emitted next to `CLASSNAME` for backward compatibility.
28
+ *
29
+ * @deprecated Use `CLASSNAME` (`lumx-listbox-*`). The legacy `lumx-combobox-*` class will be removed in the next major version.
30
+ */
31
+ export declare const LEGACY_CLASSNAME = "lumx-combobox-option-action";
32
+ /**
33
+ * ListboxOptionAction core template.
28
34
  * Renders a secondary action button within a combobox option row (grid mode).
29
35
  * Each action renders as a `role="gridcell"` element, enabling 2D keyboard
30
36
  * navigation (ArrowLeft/Right to move between the option and its actions).
@@ -32,4 +38,4 @@ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
32
38
  * @param props Component props.
33
39
  * @return JSX element.
34
40
  */
35
- export declare const ComboboxOptionAction: <E extends ClickableElement = "button">(props: ComboboxOptionActionProps<E>) => import("react").JSX.Element;
41
+ export declare const ListboxOptionAction: <E extends ClickableElement = "button">(props: ListboxOptionActionProps<E>) => import("react").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';
2
2
  /**
3
- * Defines the props for the core ComboboxOptionMoreInfo template.
3
+ * Defines the props for the core ListboxOptionMoreInfo template.
4
4
  */
5
- export interface ComboboxOptionMoreInfoProps extends HasClassName {
5
+ export interface ListboxOptionMoreInfoProps extends HasClassName {
6
6
  /** Popover content (additional details about the option). */
7
7
  children?: JSXElement;
8
8
  /** Whether the popover is open. */
@@ -21,11 +21,11 @@ export interface ComboboxOptionMoreInfoProps extends HasClassName {
21
21
  /**
22
22
  * Props that React/Vue wrappers need to re-declare with framework-specific types.
23
23
  */
24
- export type ComboboxOptionMoreInfoPropsToOverride = 'children' | 'popoverId' | 'isOpen';
24
+ export type ListboxOptionMoreInfoPropsToOverride = 'children' | 'popoverId' | 'isOpen';
25
25
  /**
26
- * Injected framework-specific components for ComboboxOptionMoreInfo rendering.
26
+ * Injected framework-specific components for ListboxOptionMoreInfo rendering.
27
27
  */
28
- export interface ComboboxOptionMoreInfoComponents {
28
+ export interface ListboxOptionMoreInfoComponents {
29
29
  /** IconButton component (framework-specific). */
30
30
  IconButton: any;
31
31
  /** Popover component (framework-specific). */
@@ -34,13 +34,19 @@ export interface ComboboxOptionMoreInfoComponents {
34
34
  /**
35
35
  * Component display name.
36
36
  */
37
- export declare const COMPONENT_NAME = "ComboboxOptionMoreInfo";
37
+ export declare const COMPONENT_NAME = "ListboxOptionMoreInfo";
38
38
  /**
39
39
  * Component default class name and class prefix.
40
40
  */
41
41
  export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
42
42
  /**
43
- * ComboboxOptionMoreInfo core template.
43
+ * Legacy class name, emitted next to `CLASSNAME` for backward compatibility.
44
+ *
45
+ * @deprecated Use `CLASSNAME` (`lumx-listbox-*`). The legacy `lumx-combobox-*` class will be removed in the next major version.
46
+ */
47
+ export declare const LEGACY_CLASSNAME = "lumx-combobox-option-more-info";
48
+ /**
49
+ * ListboxOptionMoreInfo core template.
44
50
  * Renders an info icon button with a popover that shows additional details about a combobox option.
45
51
  * The popover opens on mouse hover or when the parent option is keyboard-highlighted.
46
52
  *
@@ -51,4 +57,4 @@ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
51
57
  * @param components Injected framework-specific components.
52
58
  * @return JSX element.
53
59
  */
54
- export declare const ComboboxOptionMoreInfo: (props: ComboboxOptionMoreInfoProps, { IconButton, Popover }: ComboboxOptionMoreInfoComponents) => import("react").JSX.Element;
60
+ export declare const ListboxOptionMoreInfo: (props: ListboxOptionMoreInfoProps, { IconButton, Popover }: ListboxOptionMoreInfoComponents) => import("react").JSX.Element;