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

@aria-ui/popover

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aria-ui/popover - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

12

package.json
{
"name": "@aria-ui/popover",
"type": "module",
"version": "0.0.17",
"version": "0.0.18",
"private": false,

@@ -14,8 +14,8 @@ "sideEffects": false,

"@aria-ui/overlay": "^0.0.17",
"@aria-ui/presence": "^0.0.11",
"@zag-js/dismissable": "^0.58.0",
"@aria-ui/presence": "^0.0.12",
"@zag-js/dismissable": "^0.59.0",
"@zag-js/tabbable": "^0.49.0"
},
"devDependencies": {
"@testing-library/dom": "^10.1.0",
"@testing-library/dom": "^10.3.0",
"@testing-library/jest-dom": "^6.4.6",

@@ -25,5 +25,5 @@ "@testing-library/user-event": "^14.5.2",

"lit-html": "^3.1.4",
"playwright": "^1.44.1",
"playwright": "^1.45.1",
"tsup": "^8.1.0",
"typescript": "^5.5.2",
"typescript": "^5.5.3",
"vitest": "^1.6.0",

@@ -30,0 +30,0 @@ "@aria-ui/config": "0.0.0"

@@ -9,2 +9,4 @@ # @aria-ui/popover

#### Constructors
```ts

@@ -14,32 +16,36 @@ new PopoverContentElement(): PopoverContentElement

#### 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> |
| `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`. |
| `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` |
### PopoverContentDataAttributes
#### Properties
| Property | Type |
| :----------- | :--------------------------------------------- |
| ------------ | ---------------------------------------------- |
| `data-align` | `"center"` \| `"start"` \| `"end"` |

@@ -51,27 +57,29 @@ | `data-side` | `"bottom"` \| `"left"` \| `"right"` \| `"top"` |

#### 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> |
| `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`. |
| `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` |

@@ -84,2 +92,4 @@ ## PopoverRoot

#### Constructors
```ts

@@ -89,7 +99,9 @@ new PopoverRootElement(): PopoverRootElement

#### 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` |

@@ -102,4 +114,6 @@ ## PopoverTrigger

#### Constructors
```ts
new PopoverTriggerElement(): PopoverTriggerElement
```
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