import { CaptureType } from '@microsoft/fast-element'; import { CSSDirective } from '@microsoft/fast-element'; import { ElementStyles } from '@microsoft/fast-element'; import { ElementViewTemplate } from '@microsoft/fast-element'; import { FASTElement } from '@microsoft/fast-element'; import { HTMLDirective } from '@microsoft/fast-element'; import type { PartialFASTElementDefinition } from '@microsoft/fast-element'; import { SyntheticViewTemplate } from '@microsoft/fast-element'; import { ViewTemplate } from '@microsoft/fast-element'; /** * An Accordion Custom HTML Element * Implements {@link https://www.w3.org/TR/wai-aria-practices-1.1/#accordion | ARIA Accordion}. * * @tag fluent-accordion * * @slot - The default slot for the accordion items * @fires { Event } change - Fires a custom 'change' event when the active item changes * * @public */ export declare class Accordion extends FASTElement { /** * Controls the expand mode of the Accordion, either allowing * single or multiple item expansion. * @public * * @remarks * HTML attribute: expand-mode */ expandmode: AccordionExpandMode; expandmodeChanged(prev: AccordionExpandMode | undefined, next: AccordionExpandMode): void; /** * @internal */ slottedAccordionItems: HTMLElement[]; /** * @internal */ protected accordionItems: Element[]; /** * @internal */ slottedAccordionItemsChanged(oldValue: HTMLElement[], newValue: HTMLElement[]): void; /** * Guard flag to prevent re-entrant calls to setSingleExpandMode. * @internal */ private _isAdjusting; /** * Watch for changes to the slotted accordion items `disabled` and `expanded` attributes * @internal */ handleChange(source: any, propertyName: string): void; private activeItemIndex; /** * Find the first expanded item in the accordion */ private findExpandedItem; /** * Resets event listeners and sets the `accordionItems` property * then rebinds event listeners to each non-disabled item */ private setItems; /** * Checks if the accordion is in single expand mode * @returns true if the accordion is in single expand mode. */ private isSingleExpandMode; /** * Controls the behavior of the accordion in single expand mode * @param expandedItem - The item to expand in single expand mode */ private setSingleExpandMode; /** * Removes event listeners from the previous accordion items * @param oldValue - An array of the previous accordion items */ private removeItemListeners; /** * Changes the expanded state of the accordion item * @param evt - Click event * @returns */ private expandedChangedHandler; connectedCallback(): void; } /** * The definition configuration for the `` element. * * @public */ export declare const AccordionDefinition: PartialFASTElementDefinition; /** * Expand mode for {@link Accordion} * @public */ export declare const AccordionExpandMode: { readonly single: "single"; readonly multi: "multi"; }; /** * Type for the {@link Accordion} Expand Mode * @public */ export declare type AccordionExpandMode = ValuesOf; /** * An Accordion Item Custom HTML Element. * Based on BaseAccordionItem and includes style and layout specific attributes * * @tag fluent-accordion-item * * @public */ export declare class AccordionItem extends BaseAccordionItem { /** * Defines accordion header font size. * * @public * @remarks * HTML Attribute: size */ size?: AccordionItemSize; /** * Sets expand and collapsed icon position. * * @public * @remarks * HTML Attribute: marker-position */ markerPosition?: AccordionItemMarkerPosition; /** * Sets the width of the focus state. * * @public * @remarks * HTML Attribute: block */ block: boolean; } /** * Mark internal because exporting class and interface of the same name * confuses API documenter. * TODO: https://github.com/microsoft/fast/issues/3317 * @internal */ export declare interface AccordionItem extends StartEnd { } /** * The definition configuration for the `` element. * * @public */ export declare const AccordionItemDefinition: PartialFASTElementDefinition; /** * An Accordion Item expand/collapse icon can appear at the start or end of the accordion */ export declare const AccordionItemMarkerPosition: { readonly start: "start"; readonly end: "end"; }; /** * Applies expand/collapse icon position * @public */ export declare type AccordionItemMarkerPosition = ValuesOf; /** * Accordion Item configuration options * * @public */ export declare type AccordionItemOptions = StartEndOptions & { expandedIcon?: StaticallyComposableHTML; collapsedIcon?: StaticallyComposableHTML; }; /** * An Accordion Item header font size can be small, medium, large, and extra-large */ export declare const AccordionItemSize: { readonly small: "small"; readonly medium: "medium"; readonly large: "large"; readonly extraLarge: "extra-large"; }; /** * Applies font size to accordion header * @public */ export declare type AccordionItemSize = ValuesOf; export declare const AccordionItemStyles: ElementStyles; /** * The template for the fluent-accordion component. * @public */ export declare const AccordionItemTemplate: ElementViewTemplate; export declare const AccordionStyles: ElementStyles; export declare const AccordionTemplate: ElementViewTemplate; /** * An Anchor Custom HTML Element. * Based on BaseAnchor and includes style and layout specific attributes * * @tag fluent-anchor-button * * @public */ export declare class AnchorButton extends BaseAnchor { /** * The appearance the anchor button should have. * * @public * @remarks * HTML Attribute: `appearance` */ appearance?: AnchorButtonAppearance | undefined; /** * Handles changes to appearance attribute custom states * @param prev - the previous state * @param next - the next state */ appearanceChanged(prev: AnchorButtonAppearance | undefined, next: AnchorButtonAppearance | undefined): void; /** * The shape the anchor button should have. * * @public * @remarks * HTML Attribute: `shape` */ shape?: AnchorButtonShape | undefined; /** * Handles changes to shape attribute custom states * @param prev - the previous state * @param next - the next state */ shapeChanged(prev: AnchorButtonShape | undefined, next: AnchorButtonShape | undefined): void; /** * The size the anchor button should have. * * @public * @remarks * HTML Attribute: `size` */ size?: AnchorButtonSize; /** * Handles changes to size attribute custom states * @param prev - the previous state * @param next - the next state */ sizeChanged(prev: AnchorButtonSize | undefined, next: AnchorButtonSize | undefined): void; /** * The anchor button has an icon only, no text content * * @public * @remarks * HTML Attribute: `icon-only` */ iconOnly: boolean; /** * Handles changes to icon only custom states * @param prev - the previous state * @param next - the next state */ iconOnlyChanged(prev: boolean, next: boolean): void; } /** * Mark internal because exporting class and interface of the same name * confuses API documenter. * TODO: https://github.com/microsoft/fast/issues/3317 * @internal */ export declare interface AnchorButton extends StartEnd { } /** * Anchor Button Appearance constants * @public */ export declare const AnchorButtonAppearance: { readonly primary: "primary"; readonly outline: "outline"; readonly subtle: "subtle"; readonly transparent: "transparent"; }; /** * An Anchor Button can be secondary, primary, outline, subtle, transparent * @public */ export declare type AnchorButtonAppearance = ValuesOf; /** * The definition for the `` element. * * @public */ export declare const AnchorButtonDefinition: PartialFASTElementDefinition; /** * An Anchor Button can be square, circular or rounded. * @public */ export declare const AnchorButtonShape: { readonly circular: "circular"; readonly rounded: "rounded"; readonly square: "square"; }; /** * An Anchor Button can be square, circular or rounded * @public */ export declare type AnchorButtonShape = ValuesOf; /** * An Anchor Button can be a size of small, medium or large. * @public */ export declare const AnchorButtonSize: { readonly small: "small"; readonly medium: "medium"; readonly large: "large"; }; /** * An Anchor Button can be on of several preset sizes. * @public */ export declare type AnchorButtonSize = ValuesOf; /** * The template for the Button component. * @public */ export declare const AnchorButtonTemplate: ElementViewTemplate; /** * Anchor target values. * * @public */ export declare const AnchorTarget: { readonly _self: "_self"; readonly _blank: "_blank"; readonly _parent: "_parent"; readonly _top: "_top"; }; /** * Type for anchor target values. * * @public */ export declare type AnchorTarget = ValuesOf; /** * An Avatar Custom HTML Element. * Based on BaseAvatar and includes style and layout specific attributes * * @tag fluent-avatar * * @slot badge - Optional badge content displayed with the avatar. * * @public */ export declare class Avatar extends BaseAvatar { /** * Optional activity indicator * * active: the avatar will be decorated according to activeAppearance * * inactive: the avatar will be reduced in size and partially transparent * * undefined: normal display * * @public * @remarks * HTML Attribute: active */ active?: AvatarActive | undefined; /** * The avatar can have a circular or square shape. * * @public * @remarks * HTML Attribute: shape */ shape?: AvatarShape | undefined; /** * The appearance when `active="active"` * * @public * @remarks * HTML Attribute: appearance */ appearance?: AvatarAppearance | undefined; /** * Size of the avatar in pixels. * * Size is restricted to a limited set of supported values recommended for most uses (see `AvatarSizeValue`) and * based on design guidelines for the Avatar control. * * If a non-supported size is neeeded, set `size` to the next-smaller supported size, and set `width` and `height` * to override the rendered size. * * @public * @remarks * HTML Attribute: size * */ size?: AvatarSize | undefined; /** * The color when displaying either an icon or initials. * * neutral (default): gray * * brand: color from the brand palette * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or colorId if provided) * * [AvatarNamedColor]: a specific color from the theme * * @public * @remarks * HTML Attribute: color */ color?: AvatarColor | undefined; /** * Specify a string to be used instead of the name, to determine which color to use when color="colorful". * Use this when a name is not available, but there is another unique identifier that can be used instead. */ colorId?: AvatarNamedColor | undefined; /** * Holds the current color state */ private currentColor; /** * Handles changes to observable properties * @internal * @param source - the source of the change * @param propertyName - the property name being changed */ handleChange(source: any, propertyName: string): void; /** * Generates and sets the initials for the template * @internal */ generateInitials(): string | void; /** * Sets the data-color attribute used for the visual presentation * @internal */ generateColor(): void; /** * An array of the available Avatar named colors */ static colors: ("anchor" | "dark-red" | "cranberry" | "red" | "pumpkin" | "peach" | "marigold" | "gold" | "brass" | "brown" | "forest" | "seafoam" | "dark-green" | "light-teal" | "teal" | "steel" | "blue" | "royal-blue" | "cornflower" | "navy" | "lavender" | "purple" | "grape" | "lilac" | "pink" | "magenta" | "plum" | "beige" | "mink" | "platinum")[]; connectedCallback(): void; disconnectedCallback(): void; } /** * The Avatar "active" state */ export declare const AvatarActive: { readonly active: "active"; readonly inactive: "inactive"; }; /** * The types of Avatar active state */ export declare type AvatarActive = ValuesOf; /** * The Avatar Appearance when "active" */ export declare const AvatarAppearance: { readonly ring: "ring"; readonly shadow: "shadow"; readonly ringShadow: "ring-shadow"; }; /** * The appearance when "active" */ export declare type AvatarAppearance = ValuesOf; /** * Supported Avatar colors */ export declare const AvatarColor: { readonly darkRed: "dark-red"; readonly cranberry: "cranberry"; readonly red: "red"; readonly pumpkin: "pumpkin"; readonly peach: "peach"; readonly marigold: "marigold"; readonly gold: "gold"; readonly brass: "brass"; readonly brown: "brown"; readonly forest: "forest"; readonly seafoam: "seafoam"; readonly darkGreen: "dark-green"; readonly lightTeal: "light-teal"; readonly teal: "teal"; readonly steel: "steel"; readonly blue: "blue"; readonly royalBlue: "royal-blue"; readonly cornflower: "cornflower"; readonly navy: "navy"; readonly lavender: "lavender"; readonly purple: "purple"; readonly grape: "grape"; readonly lilac: "lilac"; readonly pink: "pink"; readonly magenta: "magenta"; readonly plum: "plum"; readonly beige: "beige"; readonly mink: "mink"; readonly platinum: "platinum"; readonly anchor: "anchor"; readonly neutral: "neutral"; readonly brand: "brand"; readonly colorful: "colorful"; }; /** * The Avatar Color */ export declare type AvatarColor = ValuesOf; /** * The definition for the `` element. * * @public */ export declare const AvatarDefinition: PartialFASTElementDefinition; /** * A specific named color for the Avatar */ export declare const AvatarNamedColor: { readonly darkRed: "dark-red"; readonly cranberry: "cranberry"; readonly red: "red"; readonly pumpkin: "pumpkin"; readonly peach: "peach"; readonly marigold: "marigold"; readonly gold: "gold"; readonly brass: "brass"; readonly brown: "brown"; readonly forest: "forest"; readonly seafoam: "seafoam"; readonly darkGreen: "dark-green"; readonly lightTeal: "light-teal"; readonly teal: "teal"; readonly steel: "steel"; readonly blue: "blue"; readonly royalBlue: "royal-blue"; readonly cornflower: "cornflower"; readonly navy: "navy"; readonly lavender: "lavender"; readonly purple: "purple"; readonly grape: "grape"; readonly lilac: "lilac"; readonly pink: "pink"; readonly magenta: "magenta"; readonly plum: "plum"; readonly beige: "beige"; readonly mink: "mink"; readonly platinum: "platinum"; readonly anchor: "anchor"; }; /** * An avatar can be one of named colors * @public */ export declare type AvatarNamedColor = ValuesOf; /** * The Avatar Shape */ export declare const AvatarShape: { readonly circular: "circular"; readonly square: "square"; }; /** * The types of Avatar Shape */ export declare type AvatarShape = ValuesOf; /** * The Avatar Sizes * @public */ export declare const AvatarSize: { readonly _16: 16; readonly _20: 20; readonly _24: 24; readonly _28: 28; readonly _32: 32; readonly _36: 36; readonly _40: 40; readonly _48: 48; readonly _56: 56; readonly _64: 64; readonly _72: 72; readonly _96: 96; readonly _120: 120; readonly _128: 128; }; /** * A Avatar can be on of several preset sizes. * @public */ export declare type AvatarSize = ValuesOf; /** Avatar styles * @public */ export declare const AvatarStyles: ElementStyles; export declare const AvatarTemplate: ElementViewTemplate; /** * The base class used for constructing a fluent-badge custom element * @tag fluent-badge * * @slot - Content which can be provided inside the badge. * @slot start - Content which can be provided before the badge content. * @slot end - Content which can be provided after the badge content. * * @public */ export declare class Badge extends FASTElement { /** * The appearance the badge should have. * * * @public * @remarks * HTML Attribute: appearance */ appearance: BadgeAppearance; /** * The color the badge should have. * * @public * @remarks * HTML Attribute: color */ color: BadgeColor; /** * The shape the badge should have. * * @public * @remarks * HTML Attribute: shape */ shape?: BadgeShape; /** * The size the badge should have. * * @public * @remarks * HTML Attribute: size */ size?: BadgeSize; } /** * Mark internal because exporting class and interface of the same name * confuses API extractor. * TODO: Below will be unnecessary when Badge class gets updated * @internal */ export declare interface Badge extends StartEnd { } /** * BadgeAppearance constants * @public */ export declare const BadgeAppearance: { readonly filled: "filled"; readonly ghost: "ghost"; readonly outline: "outline"; readonly tint: "tint"; }; /** * A Badge can be filled, outline, ghost, inverted * @public */ export declare type BadgeAppearance = ValuesOf; /** * BadgeColor constants * @public */ export declare const BadgeColor: { readonly brand: "brand"; readonly danger: "danger"; readonly important: "important"; readonly informative: "informative"; readonly severe: "severe"; readonly subtle: "subtle"; readonly success: "success"; readonly warning: "warning"; }; /** * A Badge can be one of preset colors * @public */ export declare type BadgeColor = ValuesOf; /** * The definition for the `` element. * * @public */ export declare const BadgeDefinition: PartialFASTElementDefinition; /** * A Badge can be square, circular or rounded. * @public */ export declare const BadgeShape: { readonly circular: "circular"; readonly rounded: "rounded"; readonly square: "square"; }; /** * A Badge can be one of preset colors * @public */ export declare type BadgeShape = ValuesOf; /** * A Badge can be square, circular or rounded. * @public */ export declare const BadgeSize: { readonly tiny: "tiny"; readonly extraSmall: "extra-small"; readonly small: "small"; readonly medium: "medium"; readonly large: "large"; readonly extraLarge: "extra-large"; }; /** * A Badge can be on of several preset sizes. * @public */ export declare type BadgeSize = ValuesOf; /** Badge styles * @public */ export declare const BadgeStyles: ElementStyles; export declare const BadgeTemplate: ElementViewTemplate; /** * * @slot start - Content positioned before heading in the collapsed state * @slot heading - Content which serves as the accordion item heading and text of the expand button * @slot - The default slot for accordion item content * @slot marker-expanded - The expanded icon * @slot marker-collapsed - The collapsed icon * @csspart heading - Wraps the button * @csspart button - The button which serves to invoke the item * @csspart content - The wrapper for the accordion item content * * @public */ export declare class BaseAccordionItem extends FASTElement { /** * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component. * * @internal */ elementInternals: ElementInternals; /** * Configures the {@link https://www.w3.org/TR/wai-aria-1.1/#aria-level | level} of the * heading element. * * @public * @remarks * HTML attribute: heading-level */ headinglevel: 1 | 2 | 3 | 4 | 5 | 6; /** * Expands or collapses the item. * * @public * @remarks * HTML attribute: expanded */ expanded: boolean; /** * Disables an accordion item * * @public * @remarks * HTML attribute: disabled */ disabled: boolean; /** * @internal */ expandbutton: HTMLElement; } /** * An Anchor Custom HTML Element. * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | element }. * * @slot start - Content which can be provided before the anchor content * @slot end - Content which can be provided after the anchor content * @slot - The default slot for anchor content * @csspart control - The anchor element * @csspart content - The element wrapping anchor content * * @public */ export declare class BaseAnchor extends FASTElement { /** * Holds a reference to the platform to manage ctrl+click on Windows and cmd+click on Mac * @internal */ private readonly isMac; /** * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component. * * @internal */ elementInternals: ElementInternals; /** * The proxy anchor element * @internal */ private internalProxyAnchor; /** * Prompts the user to save the linked URL. * * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#download | `download`} attribute * * @public * @remarks * HTML Attribute: `download` */ download?: string; /** * The URL the hyperlink references. * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#href | `href`} attribute * * @public * @remarks * HTML Attribute: `href` */ href?: string; /** * Hints at the language of the referenced resource. * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#hreflang | `hreflang`} attribute * * @public * @remarks * HTML Attribute: `hreflang` */ hreflang?: string; /** * The ping attribute. * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#ping | `ping`} attribute * * @public * @remarks * HTML Attribute: `ping` */ ping?: string; /** * The referrerpolicy attribute. * See The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#referrerpolicy | `referrerpolicy`} attribute * * @public * @remarks * HTML Attribute: `referrerpolicy` */ referrerpolicy?: string; /** * The rel attribute. * See The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#rel | `rel`} attribute * * @public * @remarks * HTML Attribute: `rel` */ rel: string; /** * The target attribute. * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#target | `target`} attribute * * @public * @remarks * HTML Attribute: `target` */ target?: AnchorTarget; /** * The type attribute. * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/a#type | `type`} attribute * * @public * @remarks * HTML Attribute: `type` */ type?: string; constructor(); connectedCallback(): void; disconnectedCallback(): void; /** * Handles changes to observable properties * @internal * @param source - the source of the change * @param propertyName - the property name being changed */ handleChange(source: any, propertyName: string): void; /** * Handles the anchor click event. * * @param e - The event object * @internal */ clickHandler(e: PointerEvent): boolean; /** * Handles keydown events for the anchor. * * @param e - the keyboard event * @returns - the return value of the click handler * @public */ keydownHandler(e: KeyboardEvent): boolean | void; /** * Handles navigation based on input * If a modified activation requests a new tab, opens the href in a new window. * @internal */ private handleNavigation; /** * A method for updating proxy attributes when attributes have changed * @internal * @param attribute - an attribute to set/remove * @param value - the value of the attribute */ private handleProxyAttributeChange; private createProxyElement; } /** * The base class used for constructing a fluent-avatar custom element * @public */ export declare class BaseAvatar extends FASTElement { /** * Reference to the default slot element. * * @internal */ defaultSlot: HTMLSlotElement; /** * Handles changes to the default slot element reference. * * Toggles the `has-slotted` class on the slot element for browsers that do not * support the `:has-slotted` CSS selector. Defers cleanup using * `Updates.enqueue` to avoid DOM mutations during hydration that could * corrupt binding markers. * * @internal */ defaultSlotChanged(): void; /** * Reference to the monogram element that displays generated initials. * * @internal */ monogram: HTMLElement; /** * Updates the monogram text content when the ref is captured. * * @internal */ protected monogramChanged(): void; /** * The slotted content nodes assigned to the default slot. * * @internal */ slottedDefaults: Node[]; /** * Handles changes to the slotted default content. * * Normalizes the DOM, toggles the `has-slotted` class on the default slot element * for browsers that do not support the `:has-slotted` CSS selector, and removes * empty text nodes from the default slot to keep the DOM clean. * * @internal */ protected slottedDefaultsChanged(): void; /** * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component. * * @internal */ elementInternals: ElementInternals; /** * The name of the person or entity represented by this Avatar. This should always be provided if it is available. * * @public * @remarks * HTML Attribute: name */ name?: string | undefined; /** * Handles changes to the name attribute. * @internal */ protected nameChanged(): void; /** * Provide custom initials rather than one generated via the name * * @public * @remarks * HTML Attribute: initials */ initials?: string | undefined; /** * Handles changes to the initials attribute. * @internal */ protected initialsChanged(): void; constructor(); /** * Generates and sets the initials for the template. * Subclasses should override this to provide custom initials logic. * * @internal */ generateInitials(): string | void; /** * Updates the monogram element's text content with the generated initials. * * @internal */ protected updateMonogram(): void; /** * Normalizes the DOM and removes empty text nodes from the default slot. * * @internal */ protected cleanupSlottedContent(): void; } /** * A Button Custom HTML Element. * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | `