Portal y Renderizado Overlay para Angular | ng-hub-ui-portal

Librería portal para Angular que permite renderizar componentes, plantillas y overlays fuera del árbol DOM actual con control de posicionamiento.

Referencia API

Inputs

animation

Tipo: boolean

If true, portal opening and closing will be animated. Default: true

ariaLabelledBy

Tipo: string

`aria-labelledby` attribute value to set on the portal window

ariaDescribedBy

Tipo: string

`aria-describedby` attribute value to set on the portal window

beforeDismiss

Tipo: () => boolean | Promise<boolean>

Callback right before the portal will be dismissed. Return false to prevent dismissal.

container

Tipo: string | HTMLElement

A selector specifying the element all new portal windows should be appended to. If not specified, will be `body`.

injector

Tipo: Injector

The `Injector` to use for portal content to enable dependency injection.

keyboard

Tipo: boolean

If true, the portal will be closed when Escape key is pressed. Default: true

scrollable

Tipo: boolean

Scrollable portal content (false by default).

windowClass

Tipo: string

A custom class to append to the portal window for custom styling and positioning.

portalDialogClass

Tipo: string

A custom class to append to the portal dialog container.

portalContentClass

Tipo: string

A custom class to append to the portal content wrapper.

headerSelector

Tipo: string

Custom selector for the header element of the portal window. Useful for targeting specific portal sections.

footerSelector

Tipo: string

Custom selector for the footer element of the portal window. Useful for targeting specific portal sections.

dismissSelector

Tipo: string

Custom selector for elements that can trigger the dismissal of the portal window. Default: `[data-dismiss="portal"]`

closeSelector

Tipo: string

Custom selector for elements that can trigger the closing of the portal window. Default: `[data-close="portal"]`

Outputs

Todavía no hay outputs documentados.

Templates

Portal Template

Template reference that can be passed to the HubPortal service for dynamic rendering

Ejemplo:

Variables CSS

Portal Base Variables

Core styling variables for portal structure and positioning

--portal-zindex

Tipo: number

Por defecto:1050

Z-index of the portal overlay

--portal-padding

Tipo: length

Por defecto:1rem

Default padding for portal content

--portal-margin

Tipo: length

Por defecto:0.5rem

Margin around portal dialog

Portal Appearance

Variables controlling portal colors, borders, and visual effects

--portal-bg

Tipo: color

Por defecto:#ffffff

Background color of portal content

--portal-color

Tipo: color

Por defecto:#212529

Text color of portal content

--portal-border-color

Tipo: color

Por defecto:#dee2e6

Border color of portal

--portal-border-width

Tipo: border

Por defecto:1px

Border width of portal

--portal-border-radius

Tipo: border

Por defecto:0.375rem

Border radius of portal corners

--portal-box-shadow

Tipo: shadow

Por defecto:0 0.5rem 1rem rgba(0, 0, 0, 0.15)

Box shadow for portal elevation

Portal Header & Footer

Styling variables for portal header and footer sections

--portal-header-padding

Tipo: length

Por defecto:1rem

Padding of portal header

--portal-header-border-color

Tipo: color

Por defecto:#dee2e6

Border color of portal header

--portal-footer-padding

Tipo: length

Por defecto:1rem

Padding of portal footer

--portal-footer-border-color

Tipo: color

Por defecto:#dee2e6

Border color of portal footer

Backdrop & Overlay

Variables controlling backdrop appearance and behavior

--portal-backdrop-bg

Tipo: color

Por defecto:rgba(0, 0, 0, 0.5)

Background color for portal backdrop

--portal-backdrop-zindex

Tipo: number

Por defecto:1040

Z-index of the backdrop (must be lower than portal z-index)

Estilos y theming

Todavía no hay ejemplos de estilos documentados. Esta sección incluirá recetas de personalización y ejemplos de theming.