@aria-ui/listbox
Advanced tools
Comparing version 0.0.15 to 0.0.16
{ | ||
"name": "@aria-ui/listbox", | ||
"type": "module", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"private": false, | ||
@@ -14,3 +14,3 @@ "sideEffects": false, | ||
"@aria-ui/core": "^0.0.16", | ||
"@aria-ui/presence": "^0.0.11", | ||
"@aria-ui/presence": "^0.0.12", | ||
"immer": "^10.1.1" | ||
@@ -20,3 +20,3 @@ }, | ||
"tsup": "^8.1.0", | ||
"typescript": "^5.5.2" | ||
"typescript": "^5.5.3" | ||
}, | ||
@@ -23,0 +23,0 @@ "publishConfig": { |
@@ -9,2 +9,4 @@ # @aria-ui/listbox | ||
#### Constructors | ||
```ts | ||
@@ -14,11 +16,13 @@ new ListboxElement(): ListboxElement | ||
#### Properties | ||
| Property | Type | Description | | ||
| :-- | :-- | :-- | | ||
| `autoFocus` | `boolean` | <p>Whether the listbox should automatically set the focus to the first item when the listbox is mounted or when the query changes.</p><p>**Default**</p><code>false</code> | | ||
| `filter` | `null` \| [`ItemFilter`](../collection/README.md#itemfilter) | <p>The filter function to determine if an item should be shown in the listbox. By default, a simple case-insensitive substring match is used. You can provide a custom filter function to match against a more complex pattern. You can also pass `null` to disable filtering and allow all items to be shown.</p><p>**Default**</p><code>defaultItemFilter</code> | | ||
| `onKeydownHandlerAdd` | `null` \| (`handler`: (`event`: `KeyboardEvent`) => `void`) => `VoidFunction` | <p>By default, the Listbox element will listen for keydown events. However, you can pass `onKeydownHandlerAdd` to override the default behavior. `onKeydownHandlerAdd` receives a keydown handler when the Listbox element is mounted, and returns a function that will be called when the Listbox element is unmounted.</p><p>**Default**</p><code>null</code> | | ||
| `onValueChange` | `null` \| (`value`: `string`) => `void` | <p>Event handler called when the value changes.</p><p>**Default**</p><code>null</code> | | ||
| `query` | `string` | <p>The query string to filter the listbox items.</p><p>**Default**</p><code>""</code> | | ||
| `selectionMode` | `"multiple"` \| `"single"` | <p>Listbox selection mode</p><p>(Currently only single selection mode is implemented)</p><p>**Default**</p><code>"single"</code> | | ||
| `value` | `string` | <p>The selected value.</p><p>**Default**</p><code>""</code> | | ||
| --- | --- | --- | | ||
| `autoFocus` | `boolean` | Whether the listbox should automatically set the focus to the first item when the listbox is mounted or when the query changes. **Default** `false` | | ||
| `filter` | `null` \| [`ItemFilter`](../collection/README.md#itemfilter) | The filter function to determine if an item should be shown in the listbox. By default, a simple case-insensitive substring match is used. You can provide a custom filter function to match against a more complex pattern. You can also pass `null` to disable filtering and allow all items to be shown. **Default** `defaultItemFilter` | | ||
| `onKeydownHandlerAdd` | `null` \| (`handler`: (`event`: `KeyboardEvent`) => `void`) => `VoidFunction` | By default, the Listbox element will listen for keydown events. However, you can pass `onKeydownHandlerAdd` to override the default behavior. `onKeydownHandlerAdd` receives a keydown handler when the Listbox element is mounted, and returns a function that will be called when the Listbox element is unmounted. **Default** `null` | | ||
| `onValueChange` | `null` \| (`value`: `string`) => `void` | Event handler called when the value changes. **Default** `null` | | ||
| `query` | `string` | The query string to filter the listbox items. **Default** `""` | | ||
| `selectionMode` | `"multiple"` \| `"single"` | Listbox selection mode (Currently only single selection mode is implemented) **Default** `"single"` | | ||
| `value` | `string` | The selected value. **Default** `""` | | ||
@@ -31,2 +35,4 @@ ## ListboxEmpty | ||
#### Constructors | ||
```ts | ||
@@ -42,2 +48,4 @@ new ListboxEmptyElement(): ListboxEmptyElement | ||
#### Constructors | ||
```ts | ||
@@ -47,12 +55,16 @@ new ListboxItemElement(): ListboxItemElement | ||
#### Properties | ||
| Property | Type | Description | | ||
| :-- | :-- | :-- | | ||
| `onSelect` | `null` \| `VoidFunction` | <p>The function to call when the item is selected.</p><p>**Default**</p><code>null</code> | | ||
| `value` | `string` | <p>The value of the item. Every item must have a unique value in the parent list.</p><p>**Default**</p><code>""</code> | | ||
| --- | --- | --- | | ||
| `onSelect` | `null` \| `VoidFunction` | The function to call when the item is selected. **Default** `null` | | ||
| `value` | `string` | The value of the item. Every item must have a unique value in the parent list. **Default** `""` | | ||
### ListboxItemProps | ||
#### Properties | ||
| Property | Type | Description | | ||
| :-- | :-- | :-- | | ||
| `onSelect` | `null` \| `VoidFunction` | <p>The function to call when the item is selected.</p><p>**Default**</p><code>null</code> | | ||
| `value` | `string` | <p>The value of the item. Every item must have a unique value in the parent list.</p><p>**Default**</p><code>""</code> | | ||
| --- | --- | --- | | ||
| `onSelect` | `null` \| `VoidFunction` | The function to call when the item is selected. **Default** `null` | | ||
| `value` | `string` | The value of the item. Every item must have a unique value in the parent list. **Default** `""` | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66
17016
+ Added@aria-ui/presence@0.0.12(transitive)
+ Added@zag-js/dom-query@0.59.0(transitive)
- Removed@aria-ui/presence@0.0.11(transitive)
Updated@aria-ui/presence@^0.0.12