UNPKG

@visa/nova-angular

Version:

Visa Product Design System Nova Angular library

123 lines (122 loc) 6.49 kB
/** * 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, ElementRef, EventEmitter, QueryList, Renderer2 } from '@angular/core'; import { Middleware } from '@floating-ui/dom'; import { AppReadyService } from '../_utilities/services/app-stable-check.service'; import { UUIDService } from '../_utilities/services/uuid.service'; import { AccordionHeadingDirective } from '../accordion-heading/accordion-heading.directive'; import { ButtonDirective } from '../button/button.directive'; import { TabItemDisclosureDirective } from '../disclosure-tab-item/disclosure-tab-item.directive'; import { DropdownItemDirective } from '../dropdown-item/dropdown-item.directive'; import { DropdownMenuDirective } from '../dropdown-menu/dropdown-menu.directive'; import { FloatingUIElementDirective } from '../floating-ui-element/floating-ui-element.directive'; import { FloatingUITriggerDirective } from '../floating-ui-trigger/floating-ui-trigger.directive'; import { FloatingUIPlacements, UIEventVisibilityPair } from '../floating-ui/floating-ui.constants'; import { FloatingUIService } from '../floating-ui/floating-ui.service'; import { IconToggleComponent } from '../icon-toggle/icon-toggle.component'; import { IconToggleDirective } from '../icon-toggle/icon-toggle.directive'; import { ListboxDirective } from '../listbox/listbox.directive'; import { NovaLibService } from '../nova-lib.service'; import { TooltipDirective } from '../tooltip/tooltip.directive'; import * as i0 from "@angular/core"; export declare class FloatingUIContainer implements AfterContentInit { el: ElementRef; floatingUIService: FloatingUIService; private uuidService; novaLibService: NovaLibService; private renderer; private appReadyService; containers: QueryList<FloatingUIContainer>; disclosureTabs: QueryList<TabItemDisclosureDirective>; menu: DropdownMenuDirective; tooltip: TooltipDirective; genericDropdown: FloatingUIElementDirective; trigger: FloatingUITriggerDirective; toggleIcon: IconToggleDirective; toggleIconComponent: IconToggleComponent; listbox: ListboxDirective; buttons: QueryList<ButtonDirective>; dropdownItems: QueryList<DropdownItemDirective>; accordionHeadings: QueryList<AccordionHeadingDirective>; _isCombobox: boolean; dropdownMenuShown: boolean; _tooltipDefaultEvents: UIEventVisibilityPair; _dropdownMenuDefaultEvents: UIEventVisibilityPair; /** * Provides custom class&#40;es&#41; for custom styling. */ get class(): string; set class(value: string); _class: string; get hostClasses(): string; /** @ignore */ get isShown(): boolean; set isShown(value: BooleanInput); _isShown: boolean; /** * Placement of floating content relevant to triggering element. * @default FloatingUIPlacements.BOTTOM_START * @see 'FloatingUIPlacements'. */ get placement(): FloatingUIPlacements; set placement(value: FloatingUIPlacements); _placement: FloatingUIPlacements; /** * Middleware for FloatingUIService. * @default [ offset(2), flip(), shift() ] for tooltip <br /> * @default [ offset(0), flip(), shift() ] for combobox <br /> * @see [Floating UI](https://floating-ui.com/docs/middleware) for options. */ get middleware(): Middleware[]; set middleware(value: Middleware[]); _middleware: Middleware[]; /** * Events array for FloatingUIService. <br /> * This array specifies whether to show or hide the floating element on a given UIEvent. <br /> * This should be an array of [UIEvent, FloatingUIVisibility]. * @default [ [new UIEvent('mouseenter'), FloatingUIVisibility.SHOW], <br /> [new UIEvent('mouseleave'), FloatingUIVisibility.HIDE], <br /> [new UIEvent('focus'), FloatingUIVisibility.SHOW], <br /> [new UIEvent('blur'), FloatingUIVisibility.HIDE] <br />] for tooltip * @default [ [new UIEvent('click')] ] for dropdown-menu and floating-ui-element * @default [] Ie. events are removed for combobox. */ get eventsArray(): UIEventVisibilityPair; set eventsArray(value: UIEventVisibilityPair); _eventsArray: UIEventVisibilityPair; /** * Closes the menu on item is click/select when true. <br> * If <code>multiselect</code> is set to <code>true</code>, it will not take effect.<br> * @default true */ get closeOnClick(): boolean; set closeOnClick(value: BooleanInput); _closeOnClick: boolean; /** * Emits whether or not the floating UI element is visible. */ floatingUIToggled: EventEmitter<boolean>; get hostMarginBlockStart(): string; constructor(el: ElementRef, floatingUIService: FloatingUIService, uuidService: UUIDService, novaLibService: NovaLibService, renderer: Renderer2, appReadyService: AppReadyService); clickOut(event: Event): void; _tabPressed: boolean; tab(event: KeyboardEvent): void; focusout(event: FocusEvent): void; ngAfterContentInit(): void; setUpListItems(): void; listItemClose(): void; static ɵfac: i0.ɵɵFactoryDeclaration<FloatingUIContainer, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingUIContainer, "[v-floating-ui-container], [v-combobox]", never, { "class": { "alias": "class"; "required": false; }; "isShown": { "alias": "isShown"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "middleware": { "alias": "middleware"; "required": false; }; "eventsArray": { "alias": "eventsArray"; "required": false; }; "closeOnClick": { "alias": "closeOnClick"; "required": false; }; }, { "floatingUIToggled": "floatingUIToggled"; }, ["menu", "tooltip", "genericDropdown", "trigger", "toggleIcon", "toggleIconComponent", "listbox", "containers", "disclosureTabs", "buttons", "dropdownItems", "accordionHeadings"], never, true, never>; }