File

projects/ui-kit-lib/src/lib/v2/collapse/expansion-panel.ts

Extends

CdkAccordionItem

Implements

AfterContentInit OnChanges OnDestroy

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor()

Inputs

hideToggle
Type : boolean

Whether the toggle indicator should be hidden (local or inherited).

togglePosition
Type : AccordionTogglePosition

Toggle position relative to header content (local or inherited).

Outputs

afterCollapse
Type : EventEmitter

Fires after the collapse transition completes.

afterExpand
Type : EventEmitter

Fires after the expand transition completes.

Methods

_containsFocus
_containsFocus()

Whether the current document focus is inside the panel body.

Returns : boolean
_getExpandedState
_getExpandedState()

Map boolean expanded flag to the public state union.

_hasSpacing
_hasSpacing()

Host CSS helper: spacing only in default display mode when expanded.

Returns : boolean
Protected _setupAnimationEvents
_setupAnimationEvents()

Registers animation listeners:

  • In no-animation mode, emit completion events immediately on state streams.
  • Otherwise, add a transitionend listener and a CSS class to enable transitions, after a short timeout so the initial render settles.
Returns : void
close
close()

Programmatic close.

Returns : void
open
open()

Programmatic open.

Returns : void
toggle
toggle()

Programmatic toggle (overrides base to flip expanded flag).

Returns : void

Properties

_body
Type : ElementRef<HTMLElement>
Decorators :
@ViewChild('body')

Body host element (focus containment & transition target).

Protected _bodyWrapper
Type : ElementRef<HTMLElement> | undefined
Decorators :
@ViewChild('bodyWrapper')

Wrapper element that handles the grid/height transition.

_headerId
Type : string
Default value : inject(_IdGenerator).getId('expansion-panel-header-')

Header id for aria-controls/label association.

Readonly _inputChanges
Type : unknown
Default value : new Subject<SimpleChanges>()

Emits whenever any @Input changes (for consumers to react).

_lazyContent
Type : MDExpansionPanelContent
Decorators :
@ContentChild(MDExpansionPanelContent)

Lazily-projected body content ().

_portal
Type : TemplatePortal

Portal wrapping the lazy content; created on first open.

accordion
Type : unknown
Default value : inject<AccordionBase>(ACCORDION, {optional: true, skipSelf: true})!

Optional parent accordion context (if inside an accordion).

Accessors

hideToggle
gethideToggle()

Whether the toggle indicator should be hidden (local or inherited).

Returns : boolean
sethideToggle(value: boolean)
Parameters :
Name Type Optional
value boolean No
Returns : void
togglePosition
gettogglePosition()

Toggle position relative to header content (local or inherited).

settogglePosition(value: AccordionTogglePosition)
Parameters :
Name Type Optional
value AccordionTogglePosition No
Returns : void

results matching ""

    No results matching ""