Skip to content

Commit

Permalink
fix broken CEM data in <sl-popup>
Browse files Browse the repository at this point in the history
  • Loading branch information
claviska committed Jul 17, 2023
1 parent f6dfe54 commit 54500aa
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/components/popup/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ import ShoelaceElement from '../../internal/shoelace-element.js';
import styles from './popup.styles.js';
import type { CSSResultGroup } from 'lit';

export interface VirtualElement {
getBoundingClientRect: () => DOMRect;
}

function isVirtualElement(e: unknown): e is VirtualElement {
return e !== null && typeof e === 'object' && 'getBoundingClientRect' in e;
}

/**
* @summary Popup is a utility that lets you declaratively anchor "popup" containers to another element.
* @documentation https://shoelace.style/components/popup
Expand Down Expand Up @@ -35,15 +43,6 @@ import type { CSSResultGroup } from 'lit';
* popup can be before overflowing. Useful for positioning child elements that need to overflow. This property is only
* available when using `auto-size`.
*/

export interface VirtualElement {
getBoundingClientRect: () => DOMRect;
}

function isVirtualElement(e: unknown): e is VirtualElement {
return e !== null && typeof e === 'object' && 'getBoundingClientRect' in e;
}

@customElement('sl-popup')
export default class SlPopup extends ShoelaceElement {
static styles: CSSResultGroup = styles;
Expand Down

0 comments on commit 54500aa

Please sign in to comment.