import * as _angular_core from '@angular/core'; import { Provider, Signal, WritableSignal } from '@angular/core'; import { NgpOrientation } from 'ng-primitives/common'; import { BooleanInput } from '@angular/cdk/coercion'; import * as ng_primitives_state from 'ng-primitives/state'; interface NgpTabsConfig { /** * The orientation of the tabset * @default 'horizontal' */ orientation: NgpOrientation; /** * Whether tabs should activate on focus * @default true */ activateOnFocus: boolean; /** * Whether focus should wrap within the tab list when using the keyboard. * @default true */ wrap: boolean; } /** * Provide the default Tabs configuration * @param config The Tabs configuration * @returns The provider */ declare function provideTabsConfig(config: Partial): Provider[]; /** * Apply the `ngpTabButton` directive to an element within a tab list to represent a tab button. This directive should be applied to a button element. */ declare class NgpTabButton { /** * The value of the tab this trigger controls * @required */ readonly value: _angular_core.InputSignal; /** * Whether the tab is disabled * @default false */ readonly disabled: _angular_core.InputSignalWithTransform; /** * Determine the id of the tab button * @internal */ readonly id: _angular_core.InputSignal; private readonly state; /** * Whether the tab is active */ readonly active: Signal; constructor(); /** * Select the tab this trigger controls */ select(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The state for the NgpTabButton directive. */ interface NgpTabButtonState { /** * The unique id for the tab button. */ readonly id: Signal; /** * Whether the tab is active. */ readonly active: Signal; /** * Select the tab this trigger controls. */ select(): void; } /** * The props for the NgpTabButton state. */ interface NgpTabButtonProps { /** * The value of the tab this trigger controls. */ readonly value: Signal; /** * Whether the tab is disabled. */ readonly disabled?: Signal; /** * The id of the tab button. */ readonly id?: Signal; } declare const NgpTabButtonStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{ id: Signal; active: Signal; select: () => void; }>>; declare const ngpTabButton: ({ value, disabled, id }: NgpTabButtonProps) => { id: Signal; active: Signal; select: () => void; }; declare const injectTabButtonState: { (): Signal<{ id: Signal; active: Signal; select: () => void; }>; (options: ng_primitives_state.StateInjectionOptions): Signal<{ id: Signal; active: Signal; select: () => void; } | null>; (options?: ng_primitives_state.StateInjectionOptions): Signal<{ id: Signal; active: Signal; select: () => void; }> | Signal<{ id: Signal; active: Signal; select: () => void; } | null>; }; declare const provideTabButtonState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; /** * Apply the `ngpTabList` directive to an element that represents the list of tab buttons. */ declare class NgpTabList { constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The state for the NgpTabList directive. */ interface NgpTabListState { } /** * The props for the NgpTabList state. */ interface NgpTabListProps { } declare const NgpTabListStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{}>>; declare const ngpTabList: ({}: NgpTabListProps) => {}; declare const injectTabListState: { (): _angular_core.Signal<{}>; (options: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{} | null>; (options?: ng_primitives_state.StateInjectionOptions): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>; }; declare const provideTabListState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; /** * Apply the `ngpTabPanel` directive to an element that represents the content of a tab. */ declare class NgpTabPanel { /** * The value of the tab * @required */ readonly value: _angular_core.InputSignal; /** * Determine the id of the tab panel * @internal */ readonly id: _angular_core.InputSignal; private readonly state; /** * Whether the tab is active */ readonly active: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The state for the NgpTabPanel directive. */ interface NgpTabPanelState { /** * The unique id for the tab panel. */ readonly panelId: Signal; /** * The aria-labelledby attribute for the tab panel. */ readonly labelledBy: Signal; /** * Whether the tab panel is active. */ readonly active: Signal; } /** * The props for the NgpTabPanel state. */ interface NgpTabPanelProps { /** * The value of the tab this panel represents. */ readonly value: Signal; /** * The id of the tab panel. */ readonly id?: Signal; } declare const NgpTabPanelStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{ panelId: Signal; labelledBy: Signal; active: Signal; }>>; declare const ngpTabPanel: ({ value, id }: NgpTabPanelProps) => { panelId: Signal; labelledBy: Signal; active: Signal; }; declare const injectTabPanelState: { (): Signal<{ panelId: Signal; labelledBy: Signal; active: Signal; }>; (options: ng_primitives_state.StateInjectionOptions): Signal<{ panelId: Signal; labelledBy: Signal; active: Signal; } | null>; (options?: ng_primitives_state.StateInjectionOptions): Signal<{ panelId: Signal; labelledBy: Signal; active: Signal; }> | Signal<{ panelId: Signal; labelledBy: Signal; active: Signal; } | null>; }; declare const provideTabPanelState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; /** * Apply the `ngpTabset` directive to an element to manage the tabs. */ declare class NgpTabset { /** * Access the global tabset configuration */ private readonly config; /** * Define the id for the tabset */ readonly id: _angular_core.InputSignal; /** * Define the active tab */ readonly value: _angular_core.InputSignal; /** * Emit the value of the selected tab when it changes */ readonly valueChange: _angular_core.OutputEmitterRef; /** * The orientation of the tabset * @default 'horizontal' */ readonly orientation: _angular_core.InputSignal; /** * Whether tabs should activate on focus */ readonly activateOnFocus: _angular_core.InputSignalWithTransform; /** * Whether keyboard focus should wrap around the tab list. * @default true (from the global tabs config) */ readonly wrap: _angular_core.InputSignalWithTransform; private readonly state; /** * @internal * Get the id of the selected tab */ readonly selectedTab: _angular_core.Signal; constructor(); /** * Select a tab by its value * @param value The value of the tab to select */ select(value: string): void; /** * Set orientation of the tabset. */ setOrientation(orientation: NgpOrientation): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The state for the NgpTabset directive. */ interface NgpTabsetState { /** * The unique id for the tabset. */ readonly id: Signal; /** * The orientation of the tabset. */ readonly orientation: WritableSignal; /** * Whether tabs should activate on focus. */ readonly activateOnFocus: WritableSignal; /** * The selected tab value. */ readonly value: WritableSignal; /** * The selected tab computed value. */ readonly selectedTab: Signal; /** * Select a tab by its value. */ select(value: string): void; /** * Set orientation of the tabset. */ setOrientation(orientation: NgpOrientation): void; /** * Set the activateOnFocus. */ setActivateOnFocus(activateOnFocus: boolean): void; /** * @internal Register a tab with the tabset. */ registerTab(tab: NgpTab): void; /** * @internal Unregister a tab with the tabset. */ unregisterTab(value: string): void; } /** * The props for the NgpTabset state. */ interface NgpTabsetProps { /** * The unique id for the tabset. */ readonly id?: Signal; /** * The selected tab value. */ readonly value?: Signal; /** * The orientation of the tabset. */ readonly orientation?: Signal; /** * Whether tabs should activate on focus. */ readonly activateOnFocus?: Signal; /** * Callback when the selected tab changes. */ readonly onValueChange?: (value: string | undefined) => void; } declare const NgpTabsetStateToken: _angular_core.InjectionToken; orientation: WritableSignal; activateOnFocus: WritableSignal; value: WritableSignal; selectedTab: Signal; select: (newValue: string) => void; setOrientation: (newOrientation: NgpOrientation) => void; registerTab: (tab: NgpTab) => void; unregisterTab: (tabValue: string) => void; setActivateOnFocus: (newActivateOnFocus: boolean) => void; }>>; declare const ngpTabset: ({ id, value: _value, orientation: _orientation, activateOnFocus: _activateOnFocus, onValueChange, }: NgpTabsetProps) => { id: Signal; orientation: WritableSignal; activateOnFocus: WritableSignal; value: WritableSignal; selectedTab: Signal; select: (newValue: string) => void; setOrientation: (newOrientation: NgpOrientation) => void; registerTab: (tab: NgpTab) => void; unregisterTab: (tabValue: string) => void; setActivateOnFocus: (newActivateOnFocus: boolean) => void; }; declare const injectTabsetState: { (): Signal<{ id: Signal; orientation: WritableSignal; activateOnFocus: WritableSignal; value: WritableSignal; selectedTab: Signal; select: (newValue: string) => void; setOrientation: (newOrientation: NgpOrientation) => void; registerTab: (tab: NgpTab) => void; unregisterTab: (tabValue: string) => void; setActivateOnFocus: (newActivateOnFocus: boolean) => void; }>; (options: ng_primitives_state.StateInjectionOptions): Signal<{ id: Signal; orientation: WritableSignal; activateOnFocus: WritableSignal; value: WritableSignal; selectedTab: Signal; select: (newValue: string) => void; setOrientation: (newOrientation: NgpOrientation) => void; registerTab: (tab: NgpTab) => void; unregisterTab: (tabValue: string) => void; setActivateOnFocus: (newActivateOnFocus: boolean) => void; } | null>; (options?: ng_primitives_state.StateInjectionOptions): Signal<{ id: Signal; orientation: WritableSignal; activateOnFocus: WritableSignal; value: WritableSignal; selectedTab: Signal; select: (newValue: string) => void; setOrientation: (newOrientation: NgpOrientation) => void; registerTab: (tab: NgpTab) => void; unregisterTab: (tabValue: string) => void; setActivateOnFocus: (newActivateOnFocus: boolean) => void; }> | Signal<{ id: Signal; orientation: WritableSignal; activateOnFocus: WritableSignal; value: WritableSignal; selectedTab: Signal; select: (newValue: string) => void; setOrientation: (newOrientation: NgpOrientation) => void; registerTab: (tab: NgpTab) => void; unregisterTab: (tabValue: string) => void; setActivateOnFocus: (newActivateOnFocus: boolean) => void; } | null>; }; declare const provideTabsetState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; interface NgpTab { /** * The unique value for the tab. */ readonly value: Signal; /** * Whether the tab is disabled. */ readonly disabled: Signal; } export { NgpTabButton, NgpTabButtonStateToken, NgpTabList, NgpTabListStateToken, NgpTabPanel, NgpTabPanelStateToken, NgpTabset, NgpTabsetStateToken, injectTabButtonState, injectTabListState, injectTabPanelState, injectTabsetState, ngpTabButton, ngpTabList, ngpTabPanel, ngpTabset, provideTabButtonState, provideTabListState, provideTabPanelState, provideTabsConfig, provideTabsetState }; export type { NgpTabButtonProps, NgpTabButtonState, NgpTabListProps, NgpTabListState, NgpTabPanelProps, NgpTabPanelState, NgpTabsConfig, NgpTabsetProps, NgpTabsetState };