@moul-dev/ui 2026.9.12 → 2026.9.13

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,18 +1,20 @@
1
1
  import { StyleXStyles } from '@stylexjs/stylex';
2
- import { ComboBoxProps as AriaComboBoxProps, ListBoxItemProps as AriaListBoxItemProps, SectionProps as AriaSectionProps, ValidationResult } from 'react-aria-components';
2
+ import { ComboBoxProps as AriaComboBoxProps, ListBoxItemProps as AriaListBoxItemProps, ListBoxSectionProps as AriaListBoxSectionProps, Key, ListBoxRenderProps, ValidationResult } from 'react-aria-components';
3
3
  import * as React from 'react';
4
4
  export interface ComboBoxItemProps extends Omit<AriaListBoxItemProps, 'style'> {
5
5
  style?: StyleXStyles;
6
6
  className?: string;
7
+ /** Handler that is called when the item is activated. When set, the item acts as an action item and bypasses selection. */
8
+ onAction?: () => void;
7
9
  }
8
10
  export declare const ComboBoxItem: React.ForwardRefExoticComponent<ComboBoxItemProps & React.RefAttributes<HTMLDivElement>>;
9
- export interface ComboBoxSectionProps extends Omit<AriaSectionProps<any>, 'style'> {
11
+ export interface ComboBoxSectionProps extends Omit<AriaListBoxSectionProps<any>, 'style'> {
10
12
  title?: string;
11
13
  style?: StyleXStyles;
12
14
  className?: string;
13
15
  }
14
16
  export declare const ComboBoxSection: React.ForwardRefExoticComponent<ComboBoxSectionProps & React.RefAttributes<HTMLDivElement>>;
15
- export interface ComboBoxProps extends Omit<AriaComboBoxProps<any>, 'style'> {
17
+ export interface ComboBoxProps<T extends object = object> extends Omit<AriaComboBoxProps<T>, 'style' | 'children'> {
16
18
  style?: StyleXStyles;
17
19
  className?: string;
18
20
  label?: string;
@@ -21,5 +23,14 @@ export interface ComboBoxProps extends Omit<AriaComboBoxProps<any>, 'style'> {
21
23
  placeholder?: string;
22
24
  variant?: 'primary' | 'secondary';
23
25
  size?: 'sm' | 'md' | 'lg';
26
+ /** Handler that is called when any item in the ComboBox is activated. Selection and input text are preserved. */
27
+ onAction?: (key: Key) => void;
28
+ /** Provides content to display when there are no items in the list. */
29
+ renderEmptyState?: (props: ListBoxRenderProps) => React.ReactNode;
30
+ /** Whether the combo box allows the menu to be open when the collection is empty. */
31
+ allowsEmptyCollection?: boolean;
32
+ children?: React.ReactNode | ((item: T) => React.ReactNode);
24
33
  }
25
- export declare const ComboBox: React.ForwardRefExoticComponent<ComboBoxProps & React.RefAttributes<HTMLInputElement>>;
34
+ export declare const ComboBox: <T extends object = object>(props: ComboBoxProps<T> & {
35
+ ref?: React.ForwardedRef<HTMLInputElement>;
36
+ }) => React.ReactElement | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moul-dev/ui",
3
- "version": "2026.09.12",
3
+ "version": "2026.09.13",
4
4
  "description": "Accessible, zero-runtime React component library built on React Aria and StyleX",
5
5
  "license": "MIT",
6
6
  "type": "module",