in components/RuiExpandCollapse/src/RuiExpandCollapse.ts [176:195]
private _initialiseExpandCollapse(): void {
if (this.shadowRoot) {
this._collapsibleEl = this.shadowRoot.querySelector('.details-container') as HTMLDivElement || undefined;
if (this._collapsibleEl) {
// need to set height initially if closed without triggering animation
if (!this.open) {
this._collapsibleEl.style.height = '0px';
this._collapsibleEl.hidden = true;
this._collapsibleEl.classList.add('hide-content');
}
const expandCollapse: HTMLElement | null = this.shadowRoot.querySelector('.expand-collapse');
if (expandCollapse) {
expandCollapse.style.opacity = '1';
}
}
}
}