@lumx/core 4.9.0-alpha.1 → 4.9.0-alpha.2

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.
@@ -1,8 +1,8 @@
1
- import type { CommonRef, HasClassName, LumxClassName } from '../../types';
1
+ import type { CommonRef, HasClassName, HasTheme, LumxClassName } from '../../types';
2
2
  /**
3
3
  * Defines the props for the core ComboboxInput template.
4
4
  */
5
- export interface ComboboxInputProps extends HasClassName {
5
+ export interface ComboboxInputProps extends HasClassName, HasTheme {
6
6
  /** The ID of the listbox element (for aria-controls). */
7
7
  listboxId?: string;
8
8
  /** Whether the combobox is open. */
@@ -41,6 +41,8 @@ export interface ComboboxOptionProps extends HasClassName {
41
41
  hidden?: boolean;
42
42
  /** On click callback. */
43
43
  handleClick?(): void;
44
+ /** Extra props forwarded to the inner action element (e.g. link props when as="a"). */
45
+ actionProps?: Record<string, any>;
44
46
  /** ref to the root <li> element. */
45
47
  ref?: CommonRef;
46
48
  /** The value for this option (used for selection). */
@@ -50,7 +52,7 @@ export interface ComboboxOptionProps extends HasClassName {
50
52
  * Props that React/Vue wrappers need to re-declare with framework-specific types.
51
53
  * Used by `ReactToJSX<ComboboxOptionProps, ComboboxOptionPropsToOverride>`.
52
54
  */
53
- export type ComboboxOptionPropsToOverride = 'before' | 'after' | 'children' | 'tooltipProps';
55
+ export type ComboboxOptionPropsToOverride = 'before' | 'after' | 'children' | 'tooltipProps' | 'actionProps';
54
56
  /**
55
57
  * Component display name.
56
58
  */
@@ -15,6 +15,8 @@ export interface ComboboxOptionMoreInfoProps extends HasClassName {
15
15
  onMouseEnter?(): void;
16
16
  /** Mouse leave callback. */
17
17
  onMouseLeave?(): void;
18
+ /** Props forwarded to the IconButton. */
19
+ buttonProps?: Record<string, any>;
18
20
  }
19
21
  /**
20
22
  * Props that React/Vue wrappers need to re-declare with framework-specific types.
@@ -13,7 +13,7 @@ interface ComboboxOptions {
13
13
  *
14
14
  * @see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/
15
15
  *
16
- * @param callbacks Callbacks for select and open/close events.
16
+ * @param callbacks Callbacks invoked on combobox events (e.g. option selection).
17
17
  * @param options Options for configuring the shared combobox behavior.
18
18
  * @param onTriggerAttach Optional callback invoked when the trigger is registered and the signal is ready.
19
19
  * Used by mode-specific wrappers (setupComboboxInput/Button) to automatically
@@ -1,6 +1,6 @@
1
1
  import type { ComboboxCallbacks, ComboboxHandle } from './types';
2
2
  /** Options for configuring the input-mode combobox controller. */
3
- export interface SetupComboboxInputOptions {
3
+ export interface SetupComboboxInputOptions extends ComboboxCallbacks {
4
4
  /**
5
5
  * When true (default), the combobox automatically filters options as the user types.
6
6
  * Each registered `Combobox.Option` receives filter state updates and hides itself
@@ -21,9 +21,8 @@ export interface SetupComboboxInputOptions {
21
21
  * Handles: Home/End (text cursor), ArrowLeft/Right (clear active descendant),
22
22
  * filtering (on input and on open), and focus behavior.
23
23
  *
24
- * @param input The input element to use as the combobox trigger.
25
- * @param callbacks Callbacks for select and open/close events.
26
- * @param options Options for configuring the input-mode controller.
24
+ * @param input The input element to use as the combobox trigger.
25
+ * @param options Options and callbacks for configuring the input-mode controller.
27
26
  * @returns A ComboboxHandle for interacting with the combobox.
28
27
  */
29
- export declare function setupComboboxInput(input: HTMLInputElement, callbacks: ComboboxCallbacks, options?: SetupComboboxInputOptions): ComboboxHandle;
28
+ export declare function setupComboboxInput(input: HTMLInputElement, options: SetupComboboxInputOptions): ComboboxHandle;
@@ -41,10 +41,10 @@ export interface ComboboxEventMap {
41
41
  }
42
42
  /** Callbacks provided by the consumer (React/Vue) to react to combobox state changes. */
43
43
  export interface ComboboxCallbacks {
44
- /** Called when an option is selected (click or keyboard). */
44
+ /** Called when an option is selected (click or keyboard). Receives the combobox handle for post-selection side effects. */
45
45
  onSelect(option: {
46
46
  value: string;
47
- }): void;
47
+ }, handle: ComboboxHandle): void;
48
48
  }
49
49
  /** Handle returned by `setupCombobox`. Used by framework wrappers and mode controllers. */
50
50
  export interface ComboboxHandle {
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "dependencies": {
9
9
  "@floating-ui/dom": "^1.7.5",
10
- "@lumx/icons": "^4.9.0-alpha.1",
10
+ "@lumx/icons": "^4.9.0-alpha.2",
11
11
  "classnames": "^2.3.2",
12
12
  "focus-visible": "^5.0.2",
13
13
  "lodash": "4.17.23",
@@ -69,7 +69,7 @@
69
69
  "update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
70
70
  },
71
71
  "sideEffects": false,
72
- "version": "4.9.0-alpha.1",
72
+ "version": "4.9.0-alpha.2",
73
73
  "devDependencies": {
74
74
  "@rollup/plugin-typescript": "^12.3.0",
75
75
  "@testing-library/dom": "^10.4.1",