import { VariantProps } from 'class-variance-authority'; import * as i0 from '@angular/core'; import { TemplateRef, ModelSignal, InputSignalWithTransform, InputSignal, Signal } from '@angular/core'; /** * Context provided to the trigger template. */ interface ComCollapsibleTriggerContext { /** Current open state (alias for $implicit). */ $implicit: boolean; /** Current open state. */ open: boolean; /** Whether the collapsible is disabled. */ disabled: boolean; /** Function to toggle the collapsible. */ toggle: () => void; } /** * Context provided to the content template. */ interface ComCollapsibleContentContext { /** Current open state (alias for $implicit). */ $implicit: boolean; /** Current open state. */ open: boolean; } /** * Context provided to the icon template. */ interface ComCollapsibleIconContext { /** Current open state (alias for $implicit). */ $implicit: boolean; /** Current open state. */ open: boolean; } /** * Shell variant type for the collapsible container. */ type CollapsibleVariant = 'card' | 'bordered' | 'flush' | 'ghost' | 'unstyled'; /** * CVA variants for the collapsible shell (root directive). * * @tokens `--color-border`, `--color-background`, `--color-foreground`, `--shadow-xs`, `--radius-collapsible` */ declare const collapsibleVariants: (props?: { variant?: CollapsibleVariant; }) => string; type CollapsibleVariants = VariantProps; /** * Trigger variant type for the collapsible trigger. */ type CollapsibleTriggerVariant = 'ghost' | 'filled' | 'header' | 'unstyled'; /** * Trigger size type. */ type CollapsibleTriggerSize = 'sm' | 'default' | 'lg'; /** * CVA variants for the collapsible trigger directive. * * @tokens `--color-foreground`, `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`, * `--color-ring`, `--color-disabled-foreground`, `--radius-collapsible` */ declare const collapsibleTriggerVariants: (props?: { variant?: CollapsibleTriggerVariant; size?: CollapsibleTriggerSize; }) => string; type CollapsibleTriggerVariants = VariantProps; /** * Directive to mark a template as the custom trigger layout template. * Replaces the inner content of the trigger while preserving ARIA and keyboard handling. * * @tokens none * * @example * ```html * * ``` */ declare class ComCollapsibleTriggerTpl { /** Reference to the template. */ readonly templateRef: TemplateRef; /** * Static type guard for template type checking. * Enables type-safe access to context properties in templates. */ static ngTemplateContextGuard(_dir: ComCollapsibleTriggerTpl, ctx: unknown): ctx is ComCollapsibleTriggerContext; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive to mark a template as the custom content chrome template. * Wraps the content with custom chrome (headers, footers, padding). * The grid animation still applies on the host. * * @tokens none * * @example * ```html * * *
*
* *
*
* * *
*
*
*
* ``` */ declare class ComCollapsibleContentTpl { /** Reference to the template. */ readonly templateRef: TemplateRef; /** * Static type guard for template type checking. * Enables type-safe access to context properties in templates. */ static ngTemplateContextGuard(_dir: ComCollapsibleContentTpl, ctx: unknown): ctx is ComCollapsibleContentContext; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive to mark a template as the custom icon template. * Replaces only the chevron icon inside the default trigger layout. * * @tokens none * * @example * ```html * * ``` */ declare class ComCollapsibleIconTpl { /** Reference to the template. */ readonly templateRef: TemplateRef; /** * Static type guard for template type checking. * Enables type-safe access to context properties in templates. */ static ngTemplateContextGuard(_dir: ComCollapsibleIconTpl, ctx: unknown): ctx is ComCollapsibleIconContext; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Structural directive for lazy content rendering. * Content is only instantiated on first expand, preserving state on subsequent toggles. * * @tokens none * * @example * ```html * * * * * * ``` */ declare class ComCollapsibleLazy { /** Reference to the template. */ readonly templateRef: TemplateRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Root collapsible directive — manages state and provides shell styling. * * Works as a DI anchor for child directives (trigger, content). * Exposes programmatic control via template reference. * * @tokens `--color-border`, `--color-background`, `--color-foreground`, `--shadow-xs` * * @example Basic usage * ```html *
* * *
Content here.
*
*
* ``` * * @example Two-way binding with external control * ```html *
* * ... *
* * ``` */ declare class ComCollapsible { /** Unique ID for the collapsible instance. */ private readonly id; /** ID for the trigger element (used for aria-labelledby). */ readonly triggerId: string; /** ID for the content panel (used for aria-controls). */ readonly contentId: string; /** Two-way bound open state. */ readonly open: ModelSignal; /** Disables the collapsible, preventing state changes. */ readonly disabled: InputSignalWithTransform; /** Shell preset variant. */ readonly variant: InputSignal; /** Consumer CSS classes — merged with variant classes. */ readonly userClass: InputSignal; /** @internal Computed host class from CVA + consumer overrides. */ protected readonly computedClass: Signal; /** Returns the current open state. */ isOpen(): boolean; /** Returns the current disabled state. */ isDisabled(): boolean; /** Toggles the open state (if not disabled). */ toggle(): void; /** Expands the collapsible (if not disabled). */ expand(): void; /** Collapses the collapsible (if not disabled). */ collapse(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Collapsible trigger component — handles toggle interaction, ARIA, keyboard, and template rendering. * * Uses attribute selector so it can be applied to ` * ``` * * @example Without icon * ```html * * ``` * * @example With custom icon * ```html * * ``` * * @example Full trigger layout override * ```html * * ``` */ declare class ComCollapsibleTrigger { /** Parent collapsible directive (provides state). */ protected readonly collapsible: ComCollapsible; /** Custom trigger layout template (replaces inner content). */ protected readonly triggerTpl: Signal; /** Custom icon template (replaces default chevron). */ protected readonly iconTpl: Signal; /** Trigger preset variant. */ readonly variant: InputSignal; /** Trigger size. */ readonly size: InputSignal; /** Show/hide the toggle icon. */ readonly showIcon: InputSignalWithTransform; /** Consumer CSS classes — merged with variant classes. */ readonly userClass: InputSignal; /** @internal Computed host class from CVA + consumer overrides. */ protected readonly computedClass: Signal; /** Context for trigger template. */ readonly triggerContext: Signal; /** Context for icon template. */ readonly iconContext: Signal; /** @internal */ protected onClick(event: Event): void; /** @internal */ protected onKeydown(event: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Collapsible content component — animated panel with region role. * * Uses CSS grid technique for smooth height animation without JS measurement. * Supports lazy rendering via `comCollapsibleLazy` directive. * * @tokens None (structural only — styling is applied via templates or consumer classes) * * @example Basic usage * ```html * *
Content here.
*
* ``` * * @example With custom duration * ```html * *
Slower animation.
*
* ``` * * @example With content chrome template * ```html * * *
* *
*
*
* ``` * * @example Lazy content * ```html * * * * * * ``` */ declare class ComCollapsibleContent { /** Parent collapsible directive (provides state). */ protected readonly collapsible: ComCollapsible; /** Custom content chrome template. */ protected readonly contentTpl: Signal; /** Lazy content template. */ protected readonly lazyTpl: Signal; /** Track if collapsible has ever been opened (for lazy rendering). */ protected readonly hasBeenOpened: Signal; /** Transition duration in milliseconds. */ readonly duration: InputSignal; /** Consumer CSS classes for the inner wrapper. */ readonly userClass: InputSignal; /** @internal Computed inner wrapper class. */ protected readonly innerClass: Signal; /** Context for content template. */ readonly templateContext: Signal; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export { ComCollapsible, ComCollapsibleContent, ComCollapsibleContentTpl, ComCollapsibleIconTpl, ComCollapsibleLazy, ComCollapsibleTrigger, ComCollapsibleTriggerTpl, collapsibleTriggerVariants, collapsibleVariants }; export type { CollapsibleTriggerSize, CollapsibleTriggerVariant, CollapsibleTriggerVariants, CollapsibleVariant, CollapsibleVariants, ComCollapsibleContentContext, ComCollapsibleIconContext, ComCollapsibleTriggerContext };