diff --git a/docs-app/public/docs/5-floaty-bits/anchor-to.md b/docs-app/public/docs/5-floaty-bits/anchor-to.md index 0ad795bba..738934530 100644 --- a/docs-app/public/docs/5-floaty-bits/anchor-to.md +++ b/docs-app/public/docs/5-floaty-bits/anchor-to.md @@ -2,6 +2,8 @@ The `anchorTo` modifier provides a wrapper for using [Floating UI](https://floating-ui.com/), for associating a floating element to an anchor element (such as for menus, popovers, etc). +This modifier uses the native [popover](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/popover) attribute to automatically make the intended floating element behave correctly. + The usage of a 3rd-party library will be removed when [CSS Anchor Positioning](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_anchor_positioning) lands and is widely supported (This component and modifier will still exist for the purpose of wiring up the ids between anchor and target). @@ -34,35 +36,37 @@ import { InViewport } from 'ember-primitives/viewport'; ``` diff --git a/ember-primitives/src/components/popover.gts b/ember-primitives/src/components/popover.gts index 39d5cb776..9c1a2fb36 100644 --- a/ember-primitives/src/components/popover.gts +++ b/ember-primitives/src/components/popover.gts @@ -63,15 +63,6 @@ export interface Signature { * This argument is forwarded to the `` component. */ strategy?: HookSignature["Args"]["Named"]["strategy"]; - - /** - * By default, the popover is portaled. - * If you don't control your CSS, and the positioning of the popover content - * is misbehaving, you may pass "@inline={{true}}" to opt out of portalling. - * - * Inline may also be useful in nested menus, where you know exactly how the nesting occurs - */ - inline?: boolean; }; Blocks: { default: [ @@ -98,7 +89,7 @@ const Content: TOC<{ Element: HTMLDivElement; Args: { floating: ModifierLike<{ Element: HTMLElement }>; - inline?: boolean; + makePopover: ModifierLike<{ Element: HTMLElement }>; /** * By default the popover content is wrapped in a div. * You may change this by supplying the name of an element here. @@ -117,25 +108,9 @@ const Content: TOC<{ Blocks: { default: [] }; }> = ; @@ -235,7 +210,7 @@ export const Popover: TOC =