import { CSSResultGroup, PropertyValues } from "lit"; import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element"; //#region src/components/resize-observer/resize-observer.d.ts /** * * * @summary Watches child elements and dispatches an event when they resize. * @tag sigvelo-resize-observer * @documentation https://design-system.sigvelo.com/docs/components/resize * @status stable * @since 1.0 * * @slot - The elements to observe. All direct children of the host element are observed, but not nested elements. * * @event sigvelo-resize - Emitted when a slotted element is resized. Like `ResizeObserver`, this event is also dispatched * when each element is first observed. The `event.detail.entry` property contains a * [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry) with information about * the element's dimensions. * * @example Default * The component uses a ResizeObserver to monitor the dimensions of its direct children. A `sigvelo-resize` event is dispatched for each observed element, once when the element is first observed and once every time the element is resized. * * The component is styled with `display: contents`, allowing you to easily apply flex and grid layouts to the containing element without the component interfering. * * ```html *
* *
*
*
*
* *
*
* * * * * ``` * * **Note:** Remember that only direct children of the host element are observed. Nested elements will not trigger intersection events. * * @example Providing content * Slot one or more elements into the resize observer and listen for the `sigvelo-resize` event. The event includes `event.detail.entry`, which is a `ResizeObserverEntry` object that corresponds to the observed change. * * In it's simplest form, a resize observer can be used like this. * * ```html * * ... * * * * ``` * * **Note:** Remember that only direct children of the host element are observed. */ declare class SigveloResizeObserver extends SigveloElement { static styles: CSSResultGroup; private hasInitialized; private resizeObserver; /** Disables the resize observer. */ disabled: boolean; /** Sets which box model the observer will observe changes to. */ box: "content-box" | "border-box" | "device-pixel-content-box"; connectedCallback(): void; /** Component lifecycle method that runs when the element disconnects from the DOM */ disconnectedCallback(): void; /** Component lifecycle method that runs when properties change */ updated(changedProperties: PropertyValues): void; private handleSlotChange; /** Starts or restarts the resize observer. */ private startObserver; /** Stops the resize observer. */ private stopObserver; render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { "sigvelo-resize-observer": SigveloResizeObserver; } } //#endregion export { SigveloResizeObserver as t };