Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aria-ui/menu

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aria-ui/menu - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

2

dist/index.d.ts

@@ -184,2 +184,2 @@ import * as _aria_ui_core from '@aria-ui/core';

export { MenuContentElement, type MenuContentProps, MenuItemElement, type MenuItemProps, MenuRootElement, type MenuRootProps, MenuTriggerElement, type MenuTriggerProps, defaultMenuContentProps, defaultMenuItemProps, defaultMenuRootProps, defaultMenuTriggerProps, useMenuContent as useMenu, useMenuItem, useMenuRoot, useMenuTrigger };
export { MenuContentElement, type MenuContentProps, MenuItemElement, type MenuItemProps, MenuRootElement, type MenuRootProps, MenuTriggerElement, type MenuTriggerProps, defaultMenuContentProps, defaultMenuItemProps, defaultMenuRootProps, defaultMenuTriggerProps, useMenuContent, useMenuItem, useMenuRoot, useMenuTrigger };

@@ -271,3 +271,3 @@ // src/menu-content.element.gen.ts

defaultMenuTriggerProps,
useMenuContent as useMenu,
useMenuContent,
useMenuItem,

@@ -274,0 +274,0 @@ useMenuRoot,

{
"name": "@aria-ui/menu",
"type": "module",
"version": "0.0.9",
"version": "0.0.10",
"private": false,

@@ -15,4 +15,4 @@ "sideEffects": false,

"@aria-ui/overlay": "^0.0.17",
"@aria-ui/popover": "^0.0.17",
"@aria-ui/presence": "^0.0.11",
"@aria-ui/popover": "^0.0.18",
"@aria-ui/presence": "^0.0.12",
"nanoid": "^5.0.7"

@@ -22,3 +22,3 @@ },

"tsup": "^8.1.0",
"typescript": "^5.5.2"
"typescript": "^5.5.3"
},

@@ -25,0 +25,0 @@ "publishConfig": {

@@ -17,2 +17,4 @@ # @aria-ui/menu

#### Constructors
```ts

@@ -22,28 +24,30 @@ new MenuContentElement(): MenuContentElement

#### Properties
| Property | Type | Description |
| :-- | :-- | :-- |
| `altBoundary` | `boolean` | <p>**See**</p><p>https://floating-ui.com/docs/detectoverflow</p><p>**Default**</p><code>true</code> |
| `autoUpdate` | `boolean` \| `Partial`\<`object`\> | <p>Options to activate auto-update listeners</p><p>**See**</p><p>https://floating-ui.com/docs/autoUpdate</p><p>**Default**</p><code>true</code> |
| `boundary` | `Boundary` | <p>**See**</p><p>https://floating-ui.com/docs/detectoverflow</p><p>**Default**</p><code>'clippingAncestors'</code> |
| `elementContext` | `ElementContext` | <p>**See**</p><p>https://floating-ui.com/docs/detectoverflow</p><p>**Default**</p><code>'floating'</code> |
| `fitViewport` | `boolean` | <p>Whether to constrain the floating element's width and height to not exceed the viewport.</p><p>**Default**</p><code>false</code> |
| `flip` | `boolean` \| `Placement`[] | <p>Whether to flip the `placement` in order to keep it in view when the preferred placement(s) will overflow the clipping boundary. You can also provide an array of placements to try sequentially if the preferred `placement` does not fit.</p><p>**Default**</p><code>true</code> |
| `hide` | `boolean` | <p>Whether to hide the floating element when the reference element or the floating element is fully clipped.</p><p>**Default**</p><code>false</code> |
| `hoist` | `boolean` | Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) to place the floating element on top of other page content. When enabled, the floating element won't be clipped by an ancestor. This provides a similar result to React's `<Portals>` or Vue's `<Teleport>`.<p>**Default**</p><code>true</code> |
| `inline` | `boolean` | <p>Whether to improve positioning for inline reference elements that span over multiple lines.</p><p>**Default**</p><code>false</code> |
| `offset` | `null` \| `OffsetOptions` | <p>The distance between the reference and floating element.</p><p>**Default**</p><code>4</code> |
| `onEscapeKeyDown` | `null` \| (`event`: `KeyboardEvent`) => `void` | <p>Event handler called when the escape key is pressed.</p><p>By default, the popover will be closed. It can be prevented by calling `event.preventDefault`.</p> |
| `onFocusOutside` | `null` \| (`event`: `FocusOutsideEvent`) => `void` | <p>Event handler called when the focus is moved outside the element.</p><p>By default, the popover will be closed. It can be prevented by calling `event.preventDefault`.</p> |
| `onInteractOutside` | `null` \| (`event`: `InteractOutsideEvent`) => `void` | <p>Function called when an interaction (pointer or focus) happens outside the component.</p><p>By default, the popover will be closed. It can be prevented by calling `event.preventDefault`.</p> |
| `onKeydownHandlerAdd` | `null` \| (`handler`: (`event`: `KeyboardEvent`) => `void`) => `VoidFunction` | <p>By default, the menu element will listen for keydown events. However, you can pass `onKeydownHandlerAdd` to override the default behavior. `onKeydownHandlerAdd` receives a keydown handler when the Menu element is mounted, and returns a function that will be called when the Menu element is unmounted.</p><p>**Default**</p><code>null</code> |
| `onPointerDownOutside` | `null` \| (`event`: `PointerDownOutsideEvent`) => `void` | <p>Event handler called when the pointer is pressed down outside the element.</p><p>By default, the popover will be closed. It can be prevented by calling `event.preventDefault`.</p> |
| `overflowPadding` | `number` | <p>**Default**</p><code>4</code> |
| `overlap` | `boolean` | <p>Whether the floating element can overlap the reference element to keep it in view.</p><p>**Default**</p><code>false</code> |
| `placement` | `Placement` | <p>The initial placement of the floating element</p><p>**Default**</p><code>"top"</code> |
| `rootBoundary` | `RootBoundary` | <p>**See**</p><p>https://floating-ui.com/docs/detectoverflow</p><p>**Default**</p><code>'viewport'</code> |
| `sameHeight` | `boolean` | <p>Whether to constrain the floating element's height so that it matches the reference element.</p><p>**Default**</p><code>false</code> |
| `sameWidth` | `boolean` | <p>Whether to constrain the floating element's width so that it matches the reference element.</p><p>**Default**</p><code>false</code> |
| `shift` | `boolean` | <p>Whether the floating element should shift to keep it in view.</p><p>**Default**</p><code>true</code> |
| `strategy` | `"absolute"` \| `"fixed"` | <p>The strategy to use for positioning</p><p>**Default**</p><code>"absolute"</code> |
| `transform` | `boolean` | <p>Whether to use `transform: translate3d()` for positioning instead of `top` and `left` (layout) to place the floating element.</p><p>**Default**</p><code>false</code> |
| --- | --- | --- |
| `altBoundary` | `boolean` | **See** https://floating-ui.com/docs/detectoverflow **Default** `true` |
| `autoUpdate` | `boolean` \| `Partial`\<`object`\> | Options to activate auto-update listeners **See** https://floating-ui.com/docs/autoUpdate **Default** `true` |
| `boundary` | `Boundary` | **See** https://floating-ui.com/docs/detectoverflow **Default** `'clippingAncestors'` |
| `elementContext` | `ElementContext` | **See** https://floating-ui.com/docs/detectoverflow **Default** `'floating'` |
| `fitViewport` | `boolean` | Whether to constrain the floating element's width and height to not exceed the viewport. **Default** `false` |
| `flip` | `boolean` \| `Placement`[] | Whether to flip the `placement` in order to keep it in view when the preferred placement(s) will overflow the clipping boundary. You can also provide an array of placements to try sequentially if the preferred `placement` does not fit. **Default** `true` |
| `hide` | `boolean` | Whether to hide the floating element when the reference element or the floating element is fully clipped. **Default** `false` |
| `hoist` | `boolean` | Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) to place the floating element on top of other page content. When enabled, the floating element won't be clipped by an ancestor. This provides a similar result to React's `<Portals>` or Vue's `<Teleport>`. **Default** `true` |
| `inline` | `boolean` | Whether to improve positioning for inline reference elements that span over multiple lines. **Default** `false` |
| `offset` | `null` \| `OffsetOptions` | The distance between the reference and floating element. **Default** `4` |
| `onEscapeKeyDown` | `null` \| (`event`: `KeyboardEvent`) => `void` | Event handler called when the escape key is pressed. By default, the popover will be closed. It can be prevented by calling `event.preventDefault`. |
| `onFocusOutside` | `null` \| (`event`: `FocusOutsideEvent`) => `void` | Event handler called when the focus is moved outside the element. By default, the popover will be closed. It can be prevented by calling `event.preventDefault`. |
| `onInteractOutside` | `null` \| (`event`: `InteractOutsideEvent`) => `void` | Function called when an interaction (pointer or focus) happens outside the component. By default, the popover will be closed. It can be prevented by calling `event.preventDefault`. |
| `onKeydownHandlerAdd` | `null` \| (`handler`: (`event`: `KeyboardEvent`) => `void`) => `VoidFunction` | By default, the menu element will listen for keydown events. However, you can pass `onKeydownHandlerAdd` to override the default behavior. `onKeydownHandlerAdd` receives a keydown handler when the Menu element is mounted, and returns a function that will be called when the Menu element is unmounted. **Default** `null` |
| `onPointerDownOutside` | `null` \| (`event`: `PointerDownOutsideEvent`) => `void` | Event handler called when the pointer is pressed down outside the element. By default, the popover will be closed. It can be prevented by calling `event.preventDefault`. |
| `overflowPadding` | `number` | **Default** `4` |
| `overlap` | `boolean` | Whether the floating element can overlap the reference element to keep it in view. **Default** `false` |
| `placement` | `Placement` | The initial placement of the floating element **Default** `"top"` |
| `rootBoundary` | `RootBoundary` | **See** https://floating-ui.com/docs/detectoverflow **Default** `'viewport'` |
| `sameHeight` | `boolean` | Whether to constrain the floating element's height so that it matches the reference element. **Default** `false` |
| `sameWidth` | `boolean` | Whether to constrain the floating element's width so that it matches the reference element. **Default** `false` |
| `shift` | `boolean` | Whether the floating element should shift to keep it in view. **Default** `true` |
| `strategy` | `"absolute"` \| `"fixed"` | The strategy to use for positioning **Default** `"absolute"` |
| `transform` | `boolean` | Whether to use `transform: translate3d()` for positioning instead of `top` and `left` (layout) to place the floating element. **Default** `false` |

@@ -56,2 +60,4 @@ ## MenuItem

#### Constructors
```ts

@@ -61,8 +67,10 @@ new MenuItemElement(): MenuItemElement

#### Properties
| Property | Type | Description |
| :-- | :-- | :-- |
| `filter` | [`ItemFilter`](../collection/README.md#itemfilter) | <p>The filter function to determine if an item should be shown in the listbox.</p><p>**Default**</p><code>defaultItemFilter</code> |
| `onSelect` | `null` \| `VoidFunction` | <p>Callback function that is called when the item is selected.</p><p>**Default**</p><code>null</code> |
| `query` | `string` | <p>The query string to filter the listbox items.</p><p>**Default**</p><code>""</code> |
| `value` | `string` | <p>The value of the item. Every item must have a unique value in the parent list. By default, a random value is generated.</p><p>**Default**</p><code>""</code> |
| --- | --- | --- |
| `filter` | [`ItemFilter`](../collection/README.md#itemfilter) | The filter function to determine if an item should be shown in the listbox. **Default** `defaultItemFilter` |
| `onSelect` | `null` \| `VoidFunction` | Callback function that is called when the item is selected. **Default** `null` |
| `query` | `string` | The query string to filter the listbox items. **Default** `""` |
| `value` | `string` | The value of the item. Every item must have a unique value in the parent list. By default, a random value is generated. **Default** `""` |

@@ -75,2 +83,4 @@ ## MenuRoot

#### Constructors
```ts

@@ -80,7 +90,9 @@ new MenuRootElement(): MenuRootElement

#### Properties
| Property | Type | Description |
| :-- | :-- | :-- |
| `defaultOpen` | `boolean` | <p>Whether the popover is open by default.</p><p>**Default**</p><code>false</code> |
| `onOpenChange` | `null` \| (`open`: `boolean`) => `void` | <p>Event handler called then the open state changes because of a user interaction.</p><p>**Default**</p><code>null</code> |
| `open` | `boolean` | <p>Whether the popover is open.</p><p>**Default**</p><code>false</code> |
| --- | --- | --- |
| `defaultOpen` | `boolean` | Whether the popover is open by default. **Default** `false` |
| `onOpenChange` | `null` \| (`open`: `boolean`) => `void` | Event handler called then the open state changes because of a user interaction. **Default** `null` |
| `open` | `boolean` | Whether the popover is open. **Default** `false` |

@@ -99,4 +111,6 @@ ### MenuRootProps

#### Constructors
```ts
new MenuTriggerElement(): MenuTriggerElement
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc