import * as i0 from '@angular/core'; import { TemplateRef, ElementRef, OnInit, EventEmitter, OnDestroy, ChangeDetectorRef, Renderer2, DoCheck, ViewContainerRef, InjectionToken, AfterViewChecked, QueryList, NgZone } from '@angular/core'; import { Observable, Subject, Subscription } from 'rxjs'; import * as i3 from '@angular/common'; import { NgSwitch } from '@angular/common'; import { FocusableOption, FocusOrigin, FocusOptions } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import * as i3$1 from '@angular/forms'; import { FormControl, FormGroupDirective, NgForm, NgControl } from '@angular/forms'; import * as i4 from '@angular/cdk/overlay'; import { Overlay, OverlayRef, OverlayConfig, FlexibleConnectedPositionStrategy, ScrollStrategy } from '@angular/cdk/overlay'; import { TemplatePortal } from '@angular/cdk/portal'; import * as i5 from '@angular/cdk/scrolling'; declare class NovoTemplate { template: TemplateRef; type: string; name: string; constructor(template: TemplateRef); getType(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } type TypographySize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | 'small' | 'medium' | 'large'; type TypographyLength = 'small' | 'medium' | 'large'; type TypographyWeight = 'hairline' | 'thin' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'heavy' | 'lighter' | 'bolder'; declare class NovoBaseTextElement { element: ElementRef; size: TypographySize; weight: TypographyWeight; lineLength: TypographyLength; color: string; get hb_classBinding(): string; disabled: boolean; muted: boolean; error: boolean; marginBefore: boolean; marginAfter: boolean; capitialize: boolean; uppercase: boolean; nowrap: boolean; ellipsis: boolean; smaller: boolean; larger: boolean; thin: boolean; lighter: boolean; light: boolean; medium: boolean; bold: boolean; bolder: boolean; extrabold: boolean; constructor(element: ElementRef); get nativeElement(): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Tag Example * LabelLabel * Label * Label * Label * Label * Label */ declare class NovoText extends NovoBaseTextElement { block: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Tag Example * LabelLabel * Label * Label * Label * Label * Label */ declare class NovoTitle extends NovoBaseTextElement { weight: TypographyWeight; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Tag Example * LabelLabel * Label * Label * Label * Label * Label */ declare class NovoCaption extends NovoBaseTextElement { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NovoLabel extends NovoBaseTextElement implements OnInit { id: string; inputId: i0.InputSignal; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Tag Example * LabelLabel * Label * Label * Label * Label * Label */ declare class NovoLink extends NovoBaseTextElement { href: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const getSpacingToken: (value: string) => any; declare class MarginDirective { margin: string; m: string; marginLeft: string; ml: string; marginRight: string; mr: string; marginTop: string; mt: string; marginBottom: string; mb: string; marginX: string; mx: string; marginY: string; my: string; get hb_margin(): string; get hb_margin_left(): any; get hb_margin_right(): any; get hb_margin_top(): any; get hb_margin_bottom(): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class PaddingDirective { padding: string; p: string; paddingLeft: string; pl: string; paddingRight: string; pr: string; paddingTop: string; pt: string; paddingBottom: string; pb: string; paddingX: string; px: string; paddingY: string; py: string; get hb_padding(): string; get hb_padding_left(): any; get hb_padding_right(): any; get hb_padding_top(): any; get hb_padding_bottom(): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GapDirective { gap: string; get hb_gap(): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class BackgroundColorDirective { private el; bg: string; get hb_bgColor(): string; get hb_bgStyle(): string; constructor(el: ElementRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class TextColorDirective { private el; txc: string; get hb_textColor(): string; get hb_textStyle(): string; constructor(el: ElementRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class BorderDirective { private el; borderStyle: string; borderColor: string; borderWidth: number; border: string; borderLeft: string; bl: string; borderRight: string; br: string; borderTop: string; bt: string; borderBottom: string; bb: string; borderX: string; bx: string; borderY: string; by: string; get hb_border(): string; get hb_border_left(): string; get hb_border_right(): string; get hb_border_top(): string; get hb_border_bottom(): string; constructor(el: ElementRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NovoThemeOptions { themeName: string; } interface ThemeChangeEvent { themeName: string; options?: NovoThemeOptions; } declare class NovoTheme { private _defaultTheme; private _currentTheme; onThemeChange: EventEmitter; /** Name of the theme being used. defaults to `modern-light` */ get themeName(): string; set themeName(value: string); use(options: NovoThemeOptions): Observable; /** * Changes the current theme */ private changeTheme; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class AccentColorDirective implements OnDestroy { private theme; protected cdr: ChangeDetectorRef; private subscription; accent: string; get hb_textColor(): string; constructor(theme: NovoTheme, cdr: ChangeDetectorRef); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class FillColorDirective { private el; fill: string; get hb_textColor(): string; constructor(el: ElementRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class FlexDirective { private readonly el; private readonly renderer; private _flex; get flex(): string; set flex(value: string); constructor(el: ElementRef, renderer: Renderer2); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class ThemeColorDirective { private el; theme: string; get hb_textColor(): string; constructor(el: ElementRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class SwitchCasesDirective implements OnInit, DoCheck { private viewContainer; private templateRef; private ngSwitch; private _created; novoSwitchCases: any[]; constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, ngSwitch: NgSwitch); ngOnInit(): void; ngDoCheck(): void; enforceState(created: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class VisibleDirective { private el; visible: boolean; get hb_visibility(): "" | "novo-visibility-hidden"; constructor(el: ElementRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** @docs-private */ type Constructor = new (...args: any[]) => T; /** * This is a permissive type for abstract class constructors. * @docs-private */ type AbstractConstructor = Function & { prototype: T; }; /** @docs-private */ interface CanDisable { /** Whether the component is disabled. */ disabled: boolean; } /** @docs-private */ type CanDisableCtor = Constructor; /** Mixin to augment a directive with a `disabled` property. */ declare function mixinDisabled>(base: T): CanDisableCtor & T; /** * Describes a parent component that manages a list of options. * Contains properties that the options can inherit. * @docs-private */ interface NovoOptionParentComponent { multiple?: boolean; inertGroups?: boolean; } /** * Injection token used to provide the parent component to options. */ declare const NOVO_OPTION_PARENT_COMPONENT: InjectionToken; declare class NovoOptgroupBase implements CanDisable { disabled: boolean; /** Label for the option group. */ label: string; /** Unique id for the underlying label. */ _labelId: string; /** Whether the group is in novoInert a11y mode. */ _novoInert: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare const NovoOptgroupMixinBase: CanDisableCtor & typeof NovoOptgroupBase; /** * Injection token that can be used to reference instances of `NovoOptgroup`. It serves as * alternative token to the actual `NovoOptgroup` class which could cause unnecessary * retention of the class and its component metadata. */ declare const NOVO_OPTGROUP: InjectionToken; /** * Component that is used to group instances of `novo-option`. */ declare class NovoOptgroup extends NovoOptgroupMixinBase { constructor(parent?: NovoOptionParentComponent); static ngAcceptInputType_disabled: BooleanInput; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Event object emitted by NovoOption when selected or deselected. */ declare class NovoOptionSelectionChange { /** Reference to the option that emitted the event. */ source: NovoOptionBase; /** Whether the change in the option's value was a result of a user action. */ isUserInput: boolean; constructor( /** Reference to the option that emitted the event. */ source: NovoOptionBase, /** Whether the change in the option's value was a result of a user action. */ isUserInput?: boolean); } declare class NovoOptionBase implements FocusableOption, AfterViewChecked, OnDestroy { private _element; private _changeDetectorRef; private _parent; readonly group: NovoOptgroupBase; private _selected; private _active; private _disabled; private _mostRecentViewValue; private _clickCapture; private _clickPassive; /** TODO: deprecate maybe, check support for table headers */ keepOpen: boolean; novoInert: boolean; allowSelection: boolean; customViewValue: string; /** If there is no parent then nothing is managing the selection. */ get selectable(): NovoOptionParentComponent; /** Whether the wrapping component is in multiple selection mode. */ get multiple(): boolean; /** The form value of the option. */ value: any; /** The unique ID of the option. */ id: string; /** Whether the option is disabled. */ get disabled(): any; set disabled(value: any); get selected(): any; set selected(value: any); /** Event emitted when the option is selected or deselected. */ readonly onSelectionChange: EventEmitter; /** Emits when the state of the option changes and any parents have to be notified. */ readonly _stateChanges: Subject; constructor(_element: ElementRef, _changeDetectorRef: ChangeDetectorRef, _parent: NovoOptionParentComponent, group: NovoOptgroupBase); /** * Whether or not the option is currently active and ready to be selected. * An active option displays styles as if it is focused, but the * focus is actually retained somewhere else. This comes in handy * for components like autocomplete where focus must remain on the input. */ get active(): boolean; /** * The displayed value of the option. It is necessary to show the selected option in the * select's trigger. */ get viewValue(): string; /** Selects the option. */ select(): void; /** Deselects the option. */ deselect(): void; /** Sets focus onto this option. */ focus(_origin?: FocusOrigin, options?: FocusOptions): void; /** * This method sets display styles on the option to make it appear * active. This is used by the ActiveDescendantKeyManager so key * events will display the proper options as active on arrow key events. */ setActiveStyles(): void; /** * This method removes display styles on the option that made it appear * active. This is used by the ActiveDescendantKeyManager so key * events will display the proper options as active on arrow key events. */ setInactiveStyles(): void; /** Gets the label to be used when determining whether the option should be focused. */ getLabel(): string; _handleDisabledClick(event: MouseEvent): void; _handlePassiveClick(event: MouseEvent): void; /** Ensures the option is selected when activated from the keyboard. */ _handleKeydown(event: KeyboardEvent): void; /** * `Selects the option while indicating the selection came from the user. Used to * determine if the select's view -> model callback should be invoked.` */ _selectViaInteraction(): void; /** * Force a click event */ _clickViaInteraction(): void; /** * Gets the `aria-selected` value for the option. We explicitly omit the `aria-selected` * attribute from single-selection, unselected options. Including the `aria-selected="false"` * attributes adds a significant amount of noise to screen-reader users without providing useful * information. */ _getAriaSelected(): boolean | null; /** Returns the correct tabindex for the option depending on disabled state. */ _getTabIndex(): string; /** Gets the host DOM element. */ _getHostElement(): HTMLElement; ngAfterViewChecked(): void; ngOnDestroy(): void; /** Emits the selection change event. */ private _emitSelectionChangeEvent; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Single option inside of a `` element. */ declare class NovoOption extends NovoOptionBase { constructor(element: ElementRef, changeDetectorRef: ChangeDetectorRef, parent: NovoOptionParentComponent, group: NovoOptgroup); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Counts the amount of option group labels that precede the specified option. * @param optionIndex Index of the option at which to start counting. * @param options Flat list of all of the options. * @param optionGroups Flat list of all of the option groups. * @docs-private */ declare function _countGroupLabelsBeforeOption(optionIndex: number, options: QueryList, optionGroups: QueryList): number; /** * Determines the position to which to scroll a panel in order for an option to be into view. * @param optionOffset Offset of the option from the top of the panel. * @param optionHeight Height of the options. * @param currentScrollPosition Current scroll position of the panel. * @param panelHeight Height of the panel. * @docs-private */ declare function _getOptionScrollPosition(optionOffset: number, optionHeight: number, currentScrollPosition: number, panelHeight: number): number; /** * Possible states for a pseudo checkbox. * @docs-private */ type NovoPseudoCheckboxState = 'unchecked' | 'checked' | 'indeterminate'; type NovoPseudoCheckboxShape = 'box' | 'circle' | 'line'; /** * Component that shows a simplified checkbox without including any kind of "real" checkbox. * Meant to be used when the checkbox is purely decorative and a large number of them will be * included, such as for the options in a multi-select. Uses no SVGs or complex animations. * Note that theming is meant to be handled by the parent element, e.g. * `novo-primary .novo-pseudo-checkbox`. * * Note that this component will be completely invisible to screen-reader users. This is *not* * interchangeable with `` and should *not* be used if the user would directly * interact with the checkbox. The pseudo-checkbox should only be used as an implementation detail * of more complex components that appropriately handle selected / checked state. * @docs-private */ declare class NovoPseudoCheckbox { _animationMode?: string; /** Display state of the checkbox. */ state: NovoPseudoCheckboxState; /** Display state of the checkbox. */ shape: NovoPseudoCheckboxShape; /** Whether the checkbox is disabled. */ disabled: boolean; constructor(_animationMode?: string); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NovoPseudoCheckboxModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class NovoOptionModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class NovoCommonModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** Error state matcher that matches when a control is invalid and dirty. */ declare class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher { isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** Provider that defines how form controls behave with regards to displaying error messages. */ declare class ErrorStateMatcher { isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** @docs-private */ interface HasElementRef { _elementRef: ElementRef; } /** @docs-private */ interface CanColor { /** Theme color palette for the component. */ color: ThemePalette; /** Default color to fall back to if no value is set. */ defaultColor: ThemePalette | undefined; } /** @docs-private */ type CanColorCtor = Constructor; /** Possible color palette values. */ type ThemePalette = 'primary' | 'accent' | 'warn' | undefined; /** Mixin to augment a directive with a `color` property. */ declare function mixinColor>(base: T, defaultColor?: ThemePalette): CanColorCtor & T; /** @docs-private */ interface CanUpdateErrorState { updateErrorState(): void; readonly stateChanges: Subject; errorState: boolean; errorStateMatcher: ErrorStateMatcher; } /** @docs-private */ type CanUpdateErrorStateCtor = Constructor; /** @docs-private */ interface HasErrorState { _parentFormGroup: FormGroupDirective; _parentForm: NgForm; _defaultErrorStateMatcher: ErrorStateMatcher; ngControl: NgControl; } /** * Mixin to augment a directive with updateErrorState method. * For component with `errorState` and need to update `errorState`. */ declare function mixinErrorState>(base: T): CanUpdateErrorStateCtor & T; declare class NovoOverlayTemplateComponent implements OnDestroy { protected overlay: Overlay; protected viewContainerRef: ViewContainerRef; protected zone: NgZone; protected changeDetectorRef: ChangeDetectorRef; protected document: any; id: string; template: TemplateRef; panel: ElementRef; position: 'default' | 'right' | 'above-below' | 'right-above-below' | 'center' | 'bottom' | 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'; scrollStrategy: 'reposition' | 'block' | 'close'; width: number; minWidth: number; height: number; closeOnSelect: boolean; hasBackdrop: boolean; select: EventEmitter; opening: EventEmitter; closing: EventEmitter; backDropClicked: EventEmitter; overlayRef: OverlayRef | null; portal: TemplatePortal; protected closingActionsSubscription: Subscription; private _parent; private overlayContainer; private destroyRef; private overlayContext; constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, zone: NgZone, changeDetectorRef: ChangeDetectorRef, document: any); ngOnDestroy(): void; get panelOpen(): boolean; set parent(value: ElementRef); get parent(): ElementRef; openPanel(): void; closePanel(): void; onClosingAction(event: any): void; /** * A stream of actions that should close the panel, including * when an option is selected, on blur, and when TAB is pressed. */ get panelClosingActions(): Observable; /** Stream of clicks outside of the panel. */ protected get outsideClickStream(): Observable; private isInDocument; /** * This method listens to a stream of panel closing actions and resets the * stream every time the option list changes. */ protected subscribeToClosingActions(): Subscription; protected createOverlay(template: TemplateRef): void; protected destroyOverlay(): void; protected getOverlayConfig(): OverlayConfig; /** * Supports the following position strategies: * 'default', 'right', 'bottom', 'center', 'bottom-left', 'bottom-right', 'top-left', 'top-right' */ protected getPosition(): FlexibleConnectedPositionStrategy; protected getScrollStrategy(): ScrollStrategy; protected checkSizes(): void; protected getConnectedElement(): ElementRef; private elementIsInContext; protected elementIsInNestedOverlay(el: any): boolean; protected getHostWidth(): number; isBlurRecipient(event: FocusEvent): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NovoOverlayModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** @docs-private */ interface HasOverlay { overlay: NovoOverlayTemplateComponent; readonly panelOpen: boolean; openPanel(): void; closePanel(): void; togglePanel(): void; } declare const NOVO_OVERLAY_CONTAINER: InjectionToken; /** @docs-private */ type HasOverlayCtor = Constructor; /** Mixin to augment a directive with a `overlay` property. */ declare function mixinOverlay>(base: T): HasOverlayCtor & T; /** @docs-private */ interface CanRequire { /** Whether the component is required. */ required: boolean; } /** @docs-private */ type CanRequireCtor = Constructor; /** Mixin to augment a directive with a `required` property. */ declare function mixinRequired>(base: T): CanRequireCtor & T; /** Possible size palette values. */ type ElementSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'body' | undefined; /** @docs-private */ interface CanSize { /** Theme size palette for the component. */ size: ElementSize; /** Default size to fall back to if no value is set. */ defaultSize: ElementSize | undefined; } /** @docs-private */ type CanSizeCtor = Constructor; /** Mixin to augment a directive with a `size` property. */ declare function mixinSize>(base: T, defaultSize?: ElementSize): CanSizeCtor & T; /** @docs-private */ interface HasTabIndex { /** Tabindex of the component. */ tabIndex: number; /** Tabindex to which to fall back to if no value is set. */ defaultTabIndex: number; } /** @docs-private */ type HasTabIndexCtor = Constructor; /** Mixin to augment a directive with a `tabIndex` property. */ declare function mixinTabIndex>(base: T, defaultTabIndex?: number): HasTabIndexCtor & T; export { AccentColorDirective, BackgroundColorDirective, BorderDirective, ErrorStateMatcher, FillColorDirective, FlexDirective, GapDirective, MarginDirective, NOVO_OPTGROUP, NOVO_OPTION_PARENT_COMPONENT, NOVO_OVERLAY_CONTAINER, NovoBaseTextElement, NovoCaption, NovoCommonModule, NovoLabel, NovoLink, NovoOptgroup, NovoOptgroupBase, NovoOptgroupMixinBase, NovoOption, NovoOptionBase, NovoOptionModule, NovoOptionSelectionChange, NovoOverlayModule, NovoOverlayTemplateComponent, NovoPseudoCheckbox, NovoPseudoCheckboxModule, NovoTemplate, NovoText, NovoTheme, NovoThemeOptions, NovoTitle, PaddingDirective, ShowOnDirtyErrorStateMatcher, SwitchCasesDirective, TextColorDirective, ThemeColorDirective, VisibleDirective, _countGroupLabelsBeforeOption, _getOptionScrollPosition, getSpacingToken, mixinColor, mixinDisabled, mixinErrorState, mixinOverlay, mixinRequired, mixinSize, mixinTabIndex }; export type { AbstractConstructor, CanColor, CanColorCtor, CanDisable, CanDisableCtor, CanRequire, CanRequireCtor, CanSize, CanSizeCtor, CanUpdateErrorState, CanUpdateErrorStateCtor, Constructor, ElementSize, HasElementRef, HasErrorState, HasOverlay, HasOverlayCtor, HasTabIndex, HasTabIndexCtor, NovoOptionParentComponent, NovoPseudoCheckboxShape, NovoPseudoCheckboxState, ThemeChangeEvent, ThemePalette, TypographyLength, TypographySize, TypographyWeight };