import * as i0 from '@angular/core'; import { OnChanges, OnInit, SimpleChanges, InjectionToken, Type, Signal, EventEmitter, ChangeDetectorRef, OnDestroy, ElementRef, Renderer2 } from '@angular/core'; import { BreakpointObserver, BreakpointState } from '@angular/cdk/layout'; import { Observable } from 'rxjs'; import { DaffPersistenceService } from '@daffodil/core'; import * as i1 from '@angular/cdk/a11y'; import { CdkTrapFocus } from '@angular/cdk/a11y'; /** * @deprecated in favor of the {@link DaffFormFieldLabelDirective}. Deprecated in version 0.86.0. Will be removed in version 1.0.0. */ declare class DaffFormLabelDirective { /** * @docs-private */ class: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0. */ declare class DaffFormLabelModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * A type representing what Angular accepts on an animation template binding. * This type should likely be moved to `@angular/animations`. */ interface AnimationStateWithParams> { value: T; params: V; } /** * DaffPrefixDirective can be used to place content before another piece of content * in components like `DaffFormFieldComponent` or `DaffListComponent`. */ declare class DaffPrefixDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * DaffSuffixDirective can be used to place content after another piece of content * in components like `DaffFormFieldComponent` or `DaffListComponent`. */ declare class DaffSuffixDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @deprecated in favor of standalone components. Deprecated in version 0.91.0. Will be removed in version 1.0.0. */ declare class DaffPrefixSuffixModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const DAFF_PREFIX_SUFFIX_DIRECTIVES: readonly [typeof DaffPrefixDirective, typeof DaffSuffixDirective]; /** * @deprecated Deprecated in version 0.92.0. Will be removed in version 1.0.0. */ interface DaffColorable { color: DaffColor; } /** * The available color options. */ type DaffColor = 'primary' | 'secondary' | 'tertiary' | 'light' | 'dark' | 'theme' | 'theme-contrast' | 'black' | 'white' | undefined; /** * @deprecated Deprecated in version 0.92.0. Will be removed in version 1.0.0. */ type DaffPalette = DaffColor; /** * Enforces consistent use of {@link DaffColor} on a component by applying * color-specific CSS classes and validating the color in dev mode. */ declare class DaffColorableDirective implements OnChanges, OnInit { /** * The color of the component. */ color: DaffColor; /** * The default color used when no color is set. */ defaultColor: DaffColor; /** * @docs-private */ ngOnChanges(changes: SimpleChanges): void; /** * @docs-private */ ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Sensible breakpoints for layouts and interfaces used across `@daffodil/design` components. */ declare enum DaffBreakpoints { /** `min-width: 1920px` */ DESKTOP = "(min-width: 1920px)", /** `min-width: 1440px` */ LAPTOP = "(min-width: 1440px)", /** `min-width: 1200px` */ SMALL_LAPTOP = "(min-width: 1200px)", /** `min-width: 1024px` */ BIG_TABLET = "(min-width: 1024px)", /** `min-width: 768px` */ TABLET = "(min-width: 768px)", /** `min-width: 480px` */ MOBILE = "(min-width: 480px)" } /** * Provides a {@link NoopBreakpointObserver} if the platform is not browser. */ declare const SERVER_SAFE_BREAKPOINT_OBSERVER: InjectionToken>; /** * A no-op implementation of Angular CDK's `BreakpointObserver` that always reports * no breakpoints as matched. Useful for server-side rendering or testing contexts * where browser layout APIs are unavailable. */ declare class NoopBreakpointObserver implements Omit { /** * @docs-private */ ngOnDestroy(): void; /** * Always returns `false`, indicating that none of the given media queries are active. */ isMatched(value: string | readonly string[]): boolean; /** * Returns an observable that never emits a `BreakpointState`, making breakpoint-dependent logic inert. */ observe(value: string | readonly string[]): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * A basic constructor type useful for mixins * See https://blog.mariusschulz.com/2017/05/26/typescript-2-2-mixin-classes * for a really good explanation of why mixins are useful. */ type Constructor> = new (...args: any[]) => T; /** * The `DaffStatusable` interface defines a component that can have a status. * This status determines the styling or behavior of the component. */ interface DaffStatusable { /** * The status of the component. */ status: DaffStatus; } /** * The `DaffStatus` type defines the possible status values that a component can have. * - 'info': Indicates an informational status. * - 'warn': Indicates a warning status. * - 'critical': Indicates a critical or error status. * - 'success': Indicates a success status. */ type DaffStatus = 'info' | 'warn' | 'critical' | 'success'; /** * The `DaffStatusEnum` enumerates the possible status values for a component. */ declare enum DaffStatusEnum { Info = "info", Warn = "warn", Critical = "critical", Success = "success" } /** * `DaffStatusableDirective` allows a component to conditionally apply status-specific * styles by setting CSS classes based on the specified status. This directive is useful * for indicating different statuses such as info, warning, critical, or success states. * * @example Implementing it as an attribute directive * * ```html *
Status content
* ``` * * @example Implementing it as an Angular host directive * * ```ts * @Component({ * selector: 'custom-component', * template: 'custom-component.html', * hostDirectives: [ * { * directive: DaffStatusableDirective, * inputs: ['status'], * }, * ], * }) * export class CustomComponent { } * * ```scss * :host { * &.daff-critical { * background: daff-color($red, 10); * color: daff-color($red, 90); * } * } * ``` * * The directive applies the following CSS classes to the component based on the status: * * - `daff-info`: Applied when the status is `info`. * - `daff-warn`: Applied when the status is `warn`. * - `daff-critical`: Applied when the status is `critical`. * - `daff-success`: Applied when the status is `success`. */ declare class DaffStatusableDirective implements DaffStatusable, OnChanges, OnInit { /** * Sets the status on a component. */ status: DaffStatus; /** * Sets a default status. * * @example * ```ts * constructor(private statusDirective: DaffStatusableDirective) { * this.statusDirective.defaultStatus = 'info'; * } * ``` */ defaultStatus: DaffStatus; /** * @docs-private */ ngOnChanges(changes: SimpleChanges): void; /** * @docs-private */ ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * `DaffSkeletonableDirective` allows a component to display a skeleton loading * state by conditionally applying a CSS class. This is useful for indicating to * users that content is loading or being processed. This directive can be used to * apply a skeleton loading state to any component by toggling the `skeleton` * input property. When `skeleton` is `true`, the `daff-skeleton` CSS class * is applied, which should style the component to look like a loading placeholder. * * @example Implementing it as an attribute directive * * ```html *
Content
* ``` * * @example Implementing it as an Angular host directive * * ```ts * @Component({ * selector: 'custom-component', * template: 'custom-component.html', * hostDirectives: [ * { * directive: DaffSkeletonableDirective, * inputs: ['skeleton'], * }, * ], * }) * export class CustomComponent { } * ``` * * ```scss * :host { * .daff-skeleton { * @include state.skeleton-screen(48px, 24px); * } * } * ``` * * The directive applies the `daff-skeleton` class to the component should be defined in your styles to display the loading * state as desired. It can be used in conjuction with the `skeleton-screen` mixin, which provides predefined loading styles. */ declare class DaffSkeletonableDirective { /** * Controls whether the component displays a skeleton loading state. */ skeleton: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @deprecated Deprecated in version 0.92.1. Will be removed in version 1.0.0. */ interface DaffTextAlignable { textAlignment: DaffTextAlignment; } /** * * The available text alignment options. */ type DaffTextAlignment = 'left' | 'center' | 'right'; /** * @deprecated Deprecated in version 0.93.0. Will be removed in version 0.96.0. * * This enum will be removed from the public api in v1.0.0. */ declare enum DaffTextAlignmentEnum { Left = "left", Center = "center", Right = "right" } /** * `DaffTextAlignableDirective` enforces consistent use of text alignment across components. */ declare class DaffTextAlignableDirective implements DaffTextAlignable, OnChanges, OnInit { /** * The text alignment of the component. */ textAlignment: DaffTextAlignment; /** * The default used when no text alignment is set. */ defaultAlignment: DaffTextAlignment; /** * @docs-private */ ngOnChanges(changes: SimpleChanges): void; /** * @docs-private */ ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @deprecated Deprecated in version 0.92.0. Will be removed in version 1.0.0. */ interface DaffCompactable { compact: boolean; } /** * Enforces consistent use of the compact property. */ declare class DaffCompactableDirective { /** * Whether the component is compact. */ compact: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * `DaffManageContainerLayoutDirective` gives a component the ability to manage a `DaffContainerComponent`'s layout. * By including this directive, predetermined layout styles are passed down to the container. * * To understand the motivation for this directive, consider: * * ```html * * * * ``` * vs. * * ```html * * * * ``` * * The former may inappropriately constrain the width of its child elements, * while the latter (without `DaffManageContainerLayoutDirective`) may unexpectedly * interfere in the layout features of its parent element (i.e. display: grid, display: flex). * * @example Implementing it as an attribute directive * * ```html * * * * ``` * * ```scss * :host { * display: grid; * grid-template-columns: 1fr 1fr; * } * ``` * * @example Implementing it as an Angular host directive * * ```ts * @Component({ * selector: 'my-custom-component', * template: 'my-custom-component.html', * hostDirectives: [{ directive: DaffManageContainerLayoutDirective }], * }) * export class MyCustomComponent { } * * ```scss * :host { * display: grid; * grid-template-columns: 1fr 1fr; * } * ``` * * This directive will apply the `daff-manage-container-layout` class to your component, ensuring that the styles set on `:host` are passed down to the container. */ declare class DaffManageContainerLayoutDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * The `DaffArticleEncapsulatedDirective` prevents {@link DaffArticleComponent } styles from bleeding into custom components nested within an article. */ declare class DaffArticleEncapsulatedDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * The possible states of a theme. */ declare enum DaffTheme { Light = "light", Dark = "dark", System = "system" } /** * A service for retrieving the operating system's theme preference. */ declare class DaffOsThemeService { preference$: Observable; private doc?; constructor(_doc: any); /** * Get the operating system's theme preference. */ getThemePreference(): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * A service for retrieving and managing the application's stored theme. */ declare class DaffThemeStorageService { private storage; private theme$; private storage$; private doc?; constructor(storage: DaffPersistenceService, _doc: any); /** * Given that Safari doesn't respect in-tab storage events, we have to manually * fire storage events in the open tab on Webkit based browsers. */ private progressStorageEvent; getThemeAsObservable(): Observable; getTheme(): DaffTheme; setTheme(theme: DaffTheme): void; removeThemeSetting(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * A service for controlling the application's theme. */ declare class DaffThemingService { private osTheme; private themeStorage; private theme$; private theme; constructor(osTheme: DaffOsThemeService, themeStorage: DaffThemeStorageService); /** * Get the current theme. */ getTheme(): Observable; /** * Get the user's stored theme preference. Emits `DaffTheme.System` when no * preference is stored and the theme follows the operating system. */ getThemePreference(): Observable; /** * Set the theme to dark mode. */ darkMode(): void; /** * Set the theme to light mode. */ lightMode(): void; /** * Follow the operating system's theme preference by clearing any stored theme. */ systemMode(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * The theme provider for the app. * This configures updating the body with the theme class. */ declare const DAFF_THEME_INITIALIZER: i0.EnvironmentProviders; /** * A definition for a lazy component. */ interface DaffLazyComponent { import: () => Promise>; } declare const daffFocusableElementsSelector = "a[href],a[routerlink], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])"; declare class DaffFocusStackService { private document; private _stack; constructor(document: any); /** * Return the current length of the stack. */ length(): number; /** * Adds a HTML element to a focus stack and returns the new length of the stack. * * Generally, you will probably want to call this before you transition focus * onto a new element. * * @example Using the push function * ```ts * this._focusStack.push(this._doc.activeElement); * ``` */ push(el?: HTMLElement | undefined): number; /** * Focuses on the HTML element at the top of a stack. * * @example Using the focus function * ```ts * this._focusStack.focus(this._doc.activeElement); * ``` */ focus(): void; /** * Removes the HMTL element at the top of a stack and focuses on it. */ pop(focus?: boolean): HTMLElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * @deprecated Deprecated in version 0.92.1. Will be removed in version 1.0.0. */ interface DaffSizable { size: T; } type DaffSizeXSmallType = 'xs'; type DaffSizeSmallType = 'sm'; type DaffSizeMediumType = 'md'; type DaffSizeLargeType = 'lg'; type DaffSizeXLargeType = 'xl'; /** * All available sizes. */ type DaffSizeAllType = DaffSizeXSmallType | DaffSizeSmallType | DaffSizeMediumType | DaffSizeLargeType | DaffSizeXLargeType; /** * @deprecated Deprecated in version 0.93.0. Will be removed in version 0.96.0. * * This enum will be removed from the public api in v1.0.0. */ declare enum DaffSizableEnum { XSmall = "xs", Small = "sm", Medium = "md", Large = "lg", XLarge = "xl" } /** * `DaffSizableDirective` enforces consistent use of sizes across components. */ declare class DaffSizableDirective implements OnChanges, OnInit { /** * The size of the component. */ size: T; /** * Sets a default size. */ defaultSize: T; /** * @docs-private */ ngOnChanges(changes: SimpleChanges): void; /** * @docs-private */ ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "[daffSizable]", never, { "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>; } /** * An interface for giving a component the ability to display an open UI. */ interface DaffOpenable { /** Whether a component is open or not */ open: Signal; /** Reveal the component */ reveal: () => void; /** Hide the component */ hide: () => void; /** Toggles the component between open and not open */ toggle: () => void; } /** * A directive that opens or closes a component. It should only be used as an [Angular Host Directive](https://angular.dev/guide/directives/directive-composition-api). * This directive is stateless by default, but it supports both a state and stateless implementation. Only one version should be used within a component. * * @example Using the DaffOpenableDirective * ```ts * import { * Component, * ChangeDetectionStrategy, * } from '@angular/core'; * * import { DaffOpenableDirective } from '@daffodil/design'; * * @Component({ * selector: 'custom-component', * template: ` * *
This is a hidden block that can be shown by clicking the button.
* `, * styles: [` * :host { * .hidden-block { * display: none; * } * * &.daff-open { * .hidden-block { * display: block; * } * } * }`], * changeDetection: ChangeDetectionStrategy.OnPush, * hostDirectives: [{ * directive: DaffOpenableDirective, * }], * }) * export class CustomComponent { * constructor(private openDirective: DaffOpenableDirective) {} * * toggle() { * this.openDirective.toggle(); * } * } * ``` */ declare class DaffOpenableDirective implements DaffOpenable, OnChanges { /** Controls whether the component is open. */ open: i0.ModelSignal; private _setOpen; /** Whether or not a component should handle state * * @example Setting the `stateless` property on a component * ```ts * constructor(private openDirective: DaffOpenableDirective) { * this.openDirective.stateless = false; * } * ``` */ stateless: boolean; /** * Event fired when a component is opened (true) or closed (false) */ toggled: EventEmitter; /** * Open the component */ reveal(): void; /** * Close the component */ hide(): void; /** * Open or close the component, depending on if it's currently open or not */ toggle(): void; /** * @docs-private */ ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @deprecated Deprecated in version 0.92.1. Will be removed in version 1.0.0. * * Interface for giving a component the ability to customize text alignment for component-specific UI. */ interface DaffOrientable { orientation: DaffOrientation; } /** * The possible types that can be passed to a DaffOrientable component */ type DaffOrientation = 'horizontal' | 'vertical'; /** * @deprecated Deprecated in version 0.93.0. Will be removed in version 0.96.0. * * This enum will be removed from the public api in v1.0.0. */ declare enum DaffOrientationEnum { Horizontal = "horizontal", Vertical = "vertical" } /** * `DaffOrientableDirective`enforces consistent use of orientation across components. */ declare class DaffOrientableDirective implements DaffOrientable, OnChanges, OnInit { /** * The orientation of the component. */ orientation: DaffOrientation; /** * The default used when no orientation is set. */ defaultOrientation: DaffOrientation; /** * @docs-private */ ngOnInit(): void; /** * @docs-private */ ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * An interface for giving a component the ability to display a selected UI. * In order to be selectable, the class must implement this property. */ interface DaffSelectable { selected: boolean; } declare class DaffSelectableDirective implements DaffSelectable { private cd; /** * Controls whether the component is selected. */ selected: boolean; /** * An event that fires after the component becomes selected. */ becameSelected: EventEmitter; constructor(cd: ChangeDetectorRef); /** * Selects the component and emits the `becameSelected` event. */ select(): this; /** * Deselects the component. */ deselect(): this; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class DaffStickyTrackerDirective implements OnDestroy { private readonly elementRef; private readonly renderer; private readonly document; sticky: 'top' | 'bottom' | undefined; private sentinelObserver?; private readonly className; private lastPinnedState; private debounceTimeout?; private sentinelElement?; private idleCallbackId?; constructor(elementRef: ElementRef, renderer: Renderer2, document: Document); private get isBottomSticky(); private scheduleObserverCreation; private findScrollableParent; private createSentinel; private createSentinelObserver; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Enforces consistent use of the disabled property. */ declare class DaffDisableableDirective { /** * Whether the component is disabled. */ disabled: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * An interface for any component or directive that can be disabled. */ interface DaffDisableable { disabled: boolean; } /** * `DaffLoadableDirective` allows a component to display a loading UI * by conditionally applying a CSS class. This is useful for indicating to * users that a user action is being processed. This directive can be used to * apply a loading UI to any component by toggling the `loading` * input property. When `loading` is `true`, the `daff-loading` CSS class * is applied, which should style the component to look like it's not interactable. * * @example Implementing it as an attribute directive * * ```html *
Content
* ``` * * @example Implementing it as an Angular host directive * * ```ts * @Component({ * selector: 'custom-component', * template: 'custom-component.html', * hostDirectives: [ * { * directive: DaffLoadableDirective, * inputs: ['loading'], * }, * ], * }) * export class CustomComponent { } * ``` * * ```scss * :host { * .spinner { * opacity: 0; * } * .daff-loading { * .spinner { * opacity: 1; * } * } * } * ``` * * The directive applies the `daff-loading` class to the component. The class should be * defined in your styles to display the loading state as desired. */ declare class DaffLoadableDirective { loading: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class DaffRovingTabIndexService { private document; private readonly _hierarchy; private readonly _group; readonly group: i0.Signal; constructor(document: Document); enter(group: string): void; leave(): void; next(): void; previous(): void; private _changeFocus; onKeydown(evt: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Defines the boundary of an RTI group. */ declare class DaffRovingTabIndexBoundaryDirective { private groupService; private focusTrap; /** * Don't touch this directly. Use `_uniqueId`. */ private static _uniqueIdCounter; /** * Don't touch this directly. Use `_uniqueId`. */ private _cachedUniqueId; private get _uniqueId(); /** * The name of the group for which that this element will act as boundary. * Optional, will be autogenerated to a unique name if omitted. */ readonly rtiBoundary: i0.InputSignal; /** * The name of the group defined by this boundary. */ readonly effectiveBoundary: i0.Signal; constructor(groupService: DaffRovingTabIndexService, focusTrap: CdkTrapFocus); /** * @docs-private */ enterGroup(evt: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Declares that an element is an RTI target. * Automatically applied to `` and `