@visa/nova-angular
Version:
Visa Product Design System Nova Angular library
79 lines (78 loc) • 3.65 kB
TypeScript
/**
* Copyright (c) 2025 Visa, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
**/
import { BooleanInput } from '@angular/cdk/coercion';
import { AfterContentInit, ChangeDetectorRef, EventEmitter, QueryList } from '@angular/core';
import { FlexDirective } from '../flex/flex.directive';
import { AccordionHeadingDirective } from '../accordion-heading/accordion-heading.directive';
import { AccordionDetailsDirective } from '../accordion-item/accordion-item.directive';
import { AccordionPanelDirective } from '../accordion-panel/accordion-panel.directive';
import { ButtonDirective } from '../button/button.directive';
import { WizardDirective } from '../wizard/wizard.directive';
import { AccordionService } from './accordion.service';
import { UUIDService } from '../_utilities/services/uuid.service';
import * as i0 from "@angular/core";
export declare class AccordionDirective implements AfterContentInit {
private accordionService;
private cdRef;
private uuidService;
private flex?;
private wizard?;
headings: QueryList<AccordionHeadingDirective>;
panels: QueryList<AccordionPanelDirective>;
buttonClickedSubscriptions: any[];
accordionItems: QueryList<AccordionDetailsDirective>;
_removeDefaultFlex: boolean | undefined;
_removeDefaultGap: boolean | undefined | null | any;
/**
* Provides custom class(es) for custom styling.
* @default .v-accordion
*/
get class(): string;
set class(value: string);
_class: string;
get hostClass(): string;
/**
* Allows multiple accordion items to be expanded when true.
* @default false
*/
get multiselect(): boolean;
set multiselect(value: BooleanInput);
_multiselect: boolean;
/**
* Applies subtle accordion styling when true.
* @default false
*/
get subtle(): boolean;
set subtle(value: BooleanInput);
_subtle: boolean;
/**
* Emits indexes of expanded items when an accordion item is toggled.
*/
itemsChanged: EventEmitter<number[]>;
/** variable that maintains the array of indexes of expanded items */
itemsExpanded: Array<number>;
constructor(accordionService: AccordionService, cdRef: ChangeDetectorRef, uuidService: UUIDService, flex?: FlexDirective | undefined, wizard?: WizardDirective | undefined);
ngAfterContentInit(): void;
setUpAccordionItems(): void;
setUpHeadings(): void;
setAsSubtle(): void;
buttonSubscribe(button: ButtonDirective, index: number): void;
accordionItemsChanged(): void;
handleToggle(index: number, expanded: boolean, isDetails: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<AccordionDirective, [null, null, null, { optional: true; }, { optional: true; }]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<AccordionDirective, "[v-accordion]", never, { "class": { "alias": "class"; "required": false; }; "multiselect": { "alias": "multiselect"; "required": false; }; "subtle": { "alias": "subtle"; "required": false; }; }, { "itemsChanged": "itemsChanged"; }, ["headings", "panels", "accordionItems"], never, true, never>;
}