import * as _microsoft_fast_element from '@microsoft/fast-element'; import { FASTElement, ElementViewTemplate, ElementStyles, HTMLDirective, SyntheticViewTemplate, CaptureType, ElementsFilter } from '@microsoft/fast-element'; import * as _fluentui_web_components from '@fluentui/web-components'; import { BaseButton, Button as Button$1, AccordionItem as AccordionItem$1, Accordion as Accordion$1, Link as Link$1, Avatar as Avatar$1, Badge as Badge$1, Checkbox as Checkbox$1, CounterBadge as CounterBadge$1, Dialog as Dialog$1, DialogBody as DialogBody$1, Divider as Divider$1, Drawer as Drawer$1, DrawerBody as DrawerBody$1, Dropdown as Dropdown$1, DropdownOption as DropdownOption$1, Listbox as Listbox$1, Field as Field$1, SlottableInput as SlottableInput$1, Image as Image$1, Label as Label$1, AnchorButton as AnchorButton$1, MessageBar as MessageBar$1, MenuButton as MenuButton$1, ProgressBar as ProgressBar$1, RadioGroup as RadioGroup$1, Radio as Radio$1, RatingDisplay as RatingDisplay$1, StartEndOptions, StartEnd, Slider as Slider$1, Spinner as Spinner$1, Switch as Switch$1, Tab as Tab$1, Tablist as Tablist$1, TextArea as TextArea$1, TextAreaAppearance, Text as Text$1, Tree as Tree$1, TreeItem as TreeItem$1, ToggleButton as ToggleButton$1, Tooltip as Tooltip$1 } from '@fluentui/web-components'; export { AnchorButtonTemplate, AvatarStyles, AvatarTemplate, BadgeStyles, BadgeTemplate, BaseAccordionItem, BaseAnchor, BaseAvatar, BaseButton, BaseCheckbox, BaseDivider, BaseField, BaseProgressBar, BaseRatingDisplay, BaseSpinner, BaseTablist, BaseTextArea, BaseTextInput, CheckboxOptions, CheckboxStyles, CheckboxTemplate, DialogBodyStyles, DialogBodyTemplate, DialogTemplate, ListboxStyles, ListboxTemplate, MenuButtonOptions, MessageBarIntent, MessageBarLayout, MessageBarShape, MessageBarStyles, MessageBarTemplate, SliderConfiguration, SliderOptions, SwitchStyles, SwitchTemplate, TabOptions, TextAreaStyles, TextAreaTemplate, TreeItemStyles, TreeItemTemplate, TreeStyles, TreeTemplate, isDropdownOption, isListbox } from '@fluentui/web-components'; import { ValuesOf as ValuesOf$1 } from '@microsoft/fast-foundation'; export { Theme, fabricDarkTheme, fabricLightTheme, setTheme, sizeHorizontalL, sizeHorizontalM, sizeHorizontalMNudge, sizeHorizontalNone, sizeHorizontalS, sizeHorizontalSNudge, sizeHorizontalXL, sizeHorizontalXS, sizeHorizontalXXL, sizeHorizontalXXS, sizeHorizontalXXXL, sizeVerticalL, sizeVerticalM, sizeVerticalMNudge, sizeVerticalNone, sizeVerticalS, sizeVerticalSNudge, sizeVerticalXL, sizeVerticalXS, sizeVerticalXXL, sizeVerticalXXS, sizeVerticalXXXL, webDarkTheme, webLightTheme } from '@fabric-msft/theme'; /** * Helper for enumerating a type from a const object * Example: export type Foo = ValuesOf\ * @public */ type ValuesOf = T[keyof T]; /** * Expand mode for {@link AccordionMenu} * @public */ declare const AccordionMenuExpandModes: { readonly single: "single"; readonly multi: "multi"; }; /** * Type for the {@link AccordionMenu} Expand Mode * @public */ type AccordionMenuExpandMode = ValuesOf; /** * AccordionMenu * @summary An AccordionMenu component that provides an interactive accordion interface, allowing for expandable and collapsible sections. Implements ARIA Accordion. * * @example * ```html * * * * * * * * * * * * * * ``` * * @attr {AccordionMenuExpandMode} expand-mode - Controls the expand mode of the Accordion, either allowing single or multiple item expansion. * * @prop {ElementInternals} elementInternals - Internal element state used to manage the component. * @prop {HTMLElement[]} slottedElements - The slotted accordion menu items. * @prop {AccordionMenuExpandMode} expandmode - Controls the expand mode of the Accordion, either allowing single or multiple item expansion. * * @slot - The default slot for the accordion items. * * @csspart accordion-menu - Represents the accordion menu container. * * @method expandmodeChanged - Handles changes to the `expandmode` attribute. * @method handleChange - Handles changes to observed properties. * @method clearSelections - Clears the selections of menu items. * @method findExpandedItem - Finds the first expanded item in the accordion. * @method setItems - Sets up the accordion items. * @method isSingleExpandMode - Checks if the accordion is in single expand mode. * @method setSingleExpandMode - Controls the behavior of the accordion in single expand mode. * * @fires change - Fires a custom 'change' event when the active item changes. * * @extends FASTElement * @tagname fabric-accordion-menu * @public */ declare class AccordionMenu extends FASTElement { /** Internal element state used to manage the component. */ elementInternals: ElementInternals; /** Constructor for the AccordionMenu component. */ constructor(); /** Lifecycle method called when the component is connected to the DOM. */ connectedCallback(): void; /** Lifecycle method called when the component is disconnected from the DOM. */ disconnectedCallback(): void; /** * Controls the expand mode of the Accordion, either allowing * single or multiple item expansion. * HTML attribute: expand-mode * @public */ expandmode: AccordionMenuExpandMode; /** * Handles changes to the `expandmode` attribute. * @param prev - The previous value. * @param next - The next value. */ expandmodeChanged(prev: AccordionMenuExpandMode, next: AccordionMenuExpandMode): void; /** * The slotted accordion menu items. * @public */ slottedElements: HTMLElement[]; /** * Handles changes to observed properties. * @param source - The source element. * @param propertyName - The name of the property that changed. */ handleChange(source: HTMLElement, propertyName: string): void; /** * Clears the selections of menu items. */ clearSelections(): void; /** * Finds the first expanded item in the accordion. */ private findExpandedItem; /** * Sets up the accordion items. */ private setItems; private static elementIndent; /** * check if the item is a menu item */ protected isMenuItemElement: (el: Element) => el is HTMLElement; /** * Checks if the accordion is in single expand mode. */ private isSingleExpandMode; /** * Controls the behavior of the accordion in single expand mode. */ private setSingleExpandMode; /** * Removes event listeners from items. */ private removeItemListeners; } declare const template$c: ElementViewTemplate; declare const styles$f: _microsoft_fast_element.ElementStyles; /** * * @public * @remarks * HTML Element: */ declare const definition$11: _microsoft_fast_element.FASTElementDefinition; /** * An Accordion Menu Panel header font size can be small, medium, large, and extra-large * @public */ declare const AccordionMenuPanelSizes: { readonly small: "small"; readonly medium: "medium"; readonly large: "large"; readonly extraLarge: "extra-large"; }; /** * Applies font size to accordion header * @public */ type AccordionMenuPanelSize = ValuesOf; /** * An Accordion Menu Panel expand/collapse icon can appear at the start or end of the accordion * @public */ declare const AccordionMenuPanelMarkerPositions: { readonly start: "start"; readonly end: "end"; }; /** * Applies expand/collapse icon position * @public */ type AccordionMenuPanelMarkerPosition = ValuesOf; /** * MenuList * @summary A Menu Custom HTML Element that implements the ARIA menu pattern. * * @example * ```html * * Item 1 * Item 2 * Item 3 * * ``` * * @attr {Element[] | undefined} menuItems - The menu items that are part of the menu list. * @attr {number} focusIndex - The index of the focusable element in the items array defaults to -1. * @attr {MenuItemRole} focusableElementRoles - Static roles that determine if an element is focusable. * @attr {string} role - The ARIA role for the menu list, defaults to 'menu'. * * @prop {Element[] | undefined} items - The menu items that are part of the menu list. * * @slot - The default slot for the menu items. * * @method itemsChanged - Reacts to changes in the items property. Parameters: oldValue: HTMLElement[], newValue: HTMLElement[]. * @method focus - Focuses the first item in the menu. * @method handleMenuKeyDown - Handles keydown events for menu navigation. * @method handleFocusOut - Handles focus out events to reset menu state. * @method handleChange - Observes changes to the hidden attribute of child elements. Parameters: source: any, propertyName: string. * @method setFocus - Sets focus on a menu item based on the provided index and adjustment. Parameters: focusIndex: number, adjustment: number. * * @extends FASTElement * @tagname fabric-menu-list * @public */ declare class MenuList extends FASTElement { /** * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component. * * @internal */ elementInternals: ElementInternals; /** * @internal */ items: HTMLElement[]; itemsChanged(oldValue: HTMLElement[], newValue: HTMLElement[]): void; menuItems: Element[] | undefined; /** * The index of the focusable element in the items array * defaults to -1 */ focusIndex: number; static readonly focusableElementRoles: { readonly menuitem: "menuitem"; readonly menuitemcheckbox: "menuitemcheckbox"; readonly menuitemradio: "menuitemradio"; }; constructor(); /** * @internal */ connectedCallback(): void; /** * @internal */ disconnectedCallback(): void; /** * @internal */ readonly isNestedMenu: () => boolean; /** * Focuses the first item in the menu. * * @public */ focus(): void; /** * @internal */ handleMenuKeyDown(e: KeyboardEvent): void | boolean; /** * if focus is moving out of the menu, reset to a stable initial state * @internal */ handleFocusOut: (e: FocusEvent) => void; private handleItemFocus; private removeItemListeners; private static elementIndent; protected setItems(): void; /** * Method for Observable changes to the hidden attribute of child elements */ handleChange(source: unknown, propertyName: string): void; /** * Handle change from child MenuItem element and set radio group behavior */ private changedMenuItemHandler; /** * check if the item is a menu item */ protected isMenuItemElement: (el: Element) => el is HTMLElement; /** * check if the item is focusable */ private isFocusableElement; private setFocus; } /** * AccordionMenuPanel * @summary An AccordionMenuPanel component that provides expandable and collapsible sections within an accordion menu. * * @example * ```html * * *
Section 1
* - * + * * Content for section 1 * Content for section 2 * *
*
* ``` * * @attr {boolean} expanded - Expands or collapses the item. * @attr {boolean} disabled - Disables the accordion item. * @attr {string} id - The item ID. * @attr {AccordionMenuPanelSize} size - Defines the accordion header font size. * @attr {boolean} block - Sets the width of the focus state. * @attr {AccordionMenuPanelMarkerPosition} marker-position - Sets expand and collapsed icon position. * * @prop {ElementInternals} elementInternals - Internal element state used to manage the component. * @prop {MenuList[] | undefined} menuList - The menu list element if present. * @prop {HTMLElement | undefined} headingElement - Reference to the heading element. * @prop {boolean} expanded - Expands or collapses the item. * @prop {boolean} disabled - Disables an accordion item * @prop {string} id - The item ID. * @prop {AccordionMenuPanelSize | undefined} size - Defines accordion header font size. * @prop {boolean} block - Sets the width of the focus state. * @prop {AccordionMenuPanelMarkerPosition | undefined} markerPosition - Sets expand and collapsed icon position. * * @slot heading - Slot for the heading content. * @slot marker-expanded - Slot for the expanded icon. * @slot marker-collapsed - Slot for the collapsed icon. * @slot - Default slot for the accordion item content. * * @csspart heading - Represents the heading of the accordion item. * @csspart heading-content - Represents the content container of the heading. * @csspart markers - Represents the container for expand/collapse icons. * @csspart content - Represents the content of the accordion item. * * @method focusFirstMenuItem - Focus the first menu item in the menu list. * @method expandedChanged - Handles expanded changes. * @method disabledChanged - Handles disabled changes. * @method sizeChanged - Handles changes to size attribute. * @method blockChanged - Handles changes to block attribute. * @method markerPositionChanged - Handles changes to marker-position attribute. * * @fires expanded-change - Event fired when the expanded state changes. * * @extends FASTElement * @tagname fabric-accordion-menu-panel * @public */ declare class AccordionMenuPanel extends FASTElement { /** Internal element state used to manage the component. */ elementInternals: ElementInternals; /** The menu list element if present */ menuList: MenuList[] | undefined; /** Reference to the heading element */ headingElement: HTMLElement | undefined; /** Constructor for the AccordionMenuPanel component. */ constructor(); /** Lifecycle method called when the component is connected to the DOM. */ connectedCallback(): void; /** Lifecycle method called when the component is disconnected from the DOM. */ disconnectedCallback(): void; /** * Handles click events. * @param e - The click event. */ handleClick: (e: MouseEvent) => void; /** * Handles keydown events. * @param e - The keyboard event. */ handleKeyDown: (e: KeyboardEvent) => void | boolean; /** * Focus the first menu item in the menu list */ private focusFirstMenuItem; /** * Handles expanded changes * @param prev - previous value * @param next - next value */ expandedChanged(prev: boolean, next: boolean): void; /** * Expands or collapses the item. * * @public * @remarks * HTML attribute: expanded */ expanded: boolean; /** * Disables an accordion item * * @public * @remarks * HTML attribute: disabled */ disabled: boolean; /** * Handles disabled changes * @param prev - previous value * @param next - next value */ disabledChanged(prev: boolean, next: boolean): void; /** * The item ID * * @public * @remarks * HTML Attribute: id */ id: string; /** * Defines accordion header font size. * * @public * @remarks * HTML Attribute: size */ size?: AccordionMenuPanelSize; /** * Handles changes to size attribute * @param prev - previous value * @param next - next value */ sizeChanged(prev: AccordionMenuPanelSize, next: AccordionMenuPanelSize): void; /** * Sets the width of the focus state. * * @public * @remarks * HTML Attribute: block */ block: boolean; /** * Handles changes to block attribute * @param prev - previous value * @param next - next value */ blockChanged(prev: boolean, next: boolean): void; /** * Sets expand and collapsed icon position. * * @public * @remarks * HTML Attribute: marker-position */ markerPosition?: AccordionMenuPanelMarkerPosition; /** * Handles changes to marker-position attribute * @param prev - previous value * @param next - next value */ markerPositionChanged(prev: AccordionMenuPanelMarkerPosition | undefined, next: AccordionMenuPanelMarkerPosition | undefined): void; } /** * The template for the accordion menu panel component. * @public */ declare const template$b: ElementViewTemplate; declare const styles$e: _microsoft_fast_element.ElementStyles; declare const definition$10: _microsoft_fast_element.FASTElementDefinition; /** * The appearance variations for the card component * @public */ declare const CardAppearances: { readonly filled: "filled"; readonly filledAlternative: "filled-alternative"; readonly outline: "outline"; readonly subtle: "subtle"; }; /** * Back-compat runtime alias for {@link CardAppearances}. * @public */ declare const CardAppearance: { readonly filled: "filled"; readonly filledAlternative: "filled-alternative"; readonly outline: "outline"; readonly subtle: "subtle"; }; /** * The types for card appearance * @public */ type CardAppearance = ValuesOf; /** * The orientation variations for the card component * @public */ declare const CardOrientations: { readonly horizontal: "horizontal"; readonly vertical: "vertical"; }; /** * Back-compat runtime alias for {@link CardOrientations}. * @public */ declare const CardOrientation: { readonly horizontal: "horizontal"; readonly vertical: "vertical"; }; /** * The types for card orientations * @public */ type CardOrientation = ValuesOf; /** * The focus mode variations for the card component * @public */ declare const CardFocusModes: { readonly off: "off"; readonly noTab: "no-tab"; readonly tabExit: "tab-exit"; readonly tabOnly: "tab-only"; }; /** * Back-compat runtime alias for {@link CardFocusModes}. * @public */ declare const CardFocusMode: { readonly off: "off"; readonly noTab: "no-tab"; readonly tabExit: "tab-exit"; readonly tabOnly: "tab-only"; }; /** * The types for card focus modes * @public */ type CardFocusMode = ValuesOf; /** * Card event names * @public */ declare const CardEventNames: { readonly interactiveChanged: "interactive-changed"; readonly click: "click"; }; /** * Card * @summary A versatile surface that can display rich content, optional header/footer regions, and interactive behaviors. * * @example * ```html * *
Card main content
*
* ``` * * @attr {CardFocusMode} focus-mode - Controls keyboard focus behavior inside the card (including focus trapping and Tab/Escape behavior). * @attr {CardAppearance | undefined} appearance - Sets the visual style of the card (for example `filled` or `outline`). * @attr {CardOrientation | undefined} orientation - Sets the card layout direction (horizontal or vertical). * @attr {string} role - Sets the ARIA role; automatically switches to `button` when `interactive` is true. * @attr {string | undefined} value - Optional value associated with the card; emitted with click events. * @attr {string | undefined} href - Optional link value that is surfaced in the emitted click event. * @attr {boolean} disabled - Disables interactive behaviors and keyboard handling when set. * @attr {boolean} interactive - Enables interactive behaviors (for example Enter triggers click) and updates the role. * @attr {string | undefined} aria-describedby - Sets `aria-describedby` on the internal root for assistive descriptions. * @attr {string | undefined} aria-labelledby - Sets `aria-labelledby` on the internal root for assistive labeling. * * @prop {CardFocusMode} focusMode - Reflects the `focus-mode` attribute and governs keyboard focus handling. * @prop {CardAppearance | undefined} appearance - Reflects the chosen visual style of the card. * @prop {CardOrientation | undefined} orientation - Reflects whether content is arranged horizontally or vertically. * @prop {string} role - Current ARIA role applied to the card surface. * @prop {string | undefined} value - Value included in emitted click events for identification. * @prop {string | undefined} href - Link value included in emitted click events. * @prop {boolean} disabled - Indicates whether the card is inert to pointer and keyboard interaction. * @prop {boolean} interactive - Toggles interactive keyboard/mouse behaviors and role switching. * @prop {string | undefined} ariaDescribedby - Programmatic backing property for `aria-describedby`. * @prop {string | undefined} ariaLabelledby - Programmatic backing property for `aria-labelledby`. * @prop {HTMLElement} card - Reference to the primary card element within the template. * @prop {HTMLElement} root - Reference to the root container wrapping the card content. * * @slot default - Default slot for the card's content. * * @csspart card - Styles the main card surface element. * @csspart root - Styles the outermost root container element. * @csspart header - Styles the header region of the card. * @csspart content - Styles the content container region of the card. * * @cssprop --card-width - Controls the card width (any valid CSS length). * @cssprop --card-height - Controls the card height (defaults to fit-content). * @cssprop --card-elevation - Controls the card elevation level for visual stacking. * @cssprop --card-padding - Controls the padding applied to the card content. * * @method focusFirstElement - Moves focus to the first tabbable element (or the card if none exist). * @method focusLastElement - Moves focus to the last tabbable element within the card. * @method clickHandler - Handles pointer clicks and emits the card click event when eligible. * @method keydownHandler - Handles keyboard interaction including Enter activation and focus management. * * @fires click - Fired when an interactive, enabled card is activated; detail includes `interactive`, `value`, and `href`. * @fires interactive-changed - Fired when the `interactive` state changes; detail includes the new value. * * @extends FASTElement * @tagname fabric-card * @public */ declare class Card extends FASTElement { /** * Called when the element is added to the document. * @public */ connectedCallback(): void; /** * Called when the element is removed from the document. * @public */ disconnectedCallback(): void; /** * Focus behavior within the card, set via `focus-mode` attribute. * @public * @attr focus-mode */ focusMode: CardFocusMode; /** * Visual style of the card. * @public * @attr */ appearance?: CardAppearance; /** * The role of the card. * @public * @attr */ role: string; /** * The value of the card. * @public * @attr */ value?: string; /** * The href of the card. * @public * @attr */ href?: string; /** * Layout direction of the card. * @public * @attr */ orientation?: CardOrientation; /** * Indicates if the card is disabled. * @public * @attr disabled */ disabled: boolean; /** * Determines whether the card is interactive. * @public * @observable * @attr interactive */ interactive: boolean; /** * Provides descriptive text for assistive technologies via `aria-describedby`. * @public * @attr aria-describedby */ ariaDescribedby?: string; /** * Provides a label for assistive technologies via `aria-labelledby`. * @public * @attr aria-labelledby */ ariaLabelledby?: string; /** * The main card element. * @public */ card: HTMLElement; /** * The root element of the card. * @public */ root: HTMLElement; /** * Reacts to focus mode changes. */ focusModeChanged(): void; /** * Reacts to disabled changes. */ disabledChanged(): void; /** * Focuses the element at the specified index. * @private * @param index - The index of the element to focus. */ private focusElementAtIndex; /** * Focuses the first element in the card. * @public */ focusFirstElement: () => void; /** * Focuses the last element in the card. * @public */ focusLastElement: () => void; /** * Handles click events on the card. * @public * @param e - The mouse event. * @returns {boolean | void} Returns true if the event was handled. */ clickHandler(e: MouseEvent): boolean | void; /** * Handles keydown events on the card. * @public * @param e - The keyboard event. * @returns {boolean | void | null} Returns true if the event was handled. */ keydownHandler(e: KeyboardEvent): boolean | void | null; /** * Determines if the card is focusable. * @public * @returns {boolean} True if the card is focusable. */ get isFocusable(): boolean; /** * Gets the tabbable bounds within the card. * @public * @returns {(HTMLElement | SVGElement)[]} The tabbable elements. */ get bounds(): (HTMLElement | SVGElement)[]; /** * Checks if the first element in the bounds is focused. * @public * @returns {boolean | void} True if the first element is focused. */ get isBoundsZeroIndexFocused(): boolean | void; /** * Checks if the last element in the bounds is focused. * @public * @returns {boolean | void} True if the last element is focused. */ get isBoundsLastIndexFocused(): boolean | void; /** * Determines if focus should be trapped within the card. * @public * @returns {boolean} True if focus should be trapped. */ get shouldTrapFocus(): boolean; private emitClickEvent; private emitInteractiveChangedEvent; /** * Emits an event when the interactive state changes. * @protected */ protected interactiveChanged: () => void; /** * Sets the component state based on focus mode and disabled state. * @private */ private updateInertState; private requestInertUpdate; /** * Gets the tabbable elements within the given context. * @private * @param context - The context in which to find tabbable elements. * @returns {(HTMLElement | SVGElement)[]} The tabbable elements. */ private getTabQueueBounds; /** * Reduces elements to only tabbable ones. * @private * @param elements - The elements to filter. * @param element - The element to check. * @returns {HTMLElement[]} The tabbable elements. */ private static reduceTabbableItems; /** * Checks if a FASTElement is focusable. * @private * @param element - The FASTElement to check. * @returns {boolean} True if the element is focusable. */ private static isFocusableFastElement; /** * Checks if a FASTElement has tabbable shadow elements. * @private * @param element - The FASTElement to check. * @returns {boolean} True if the shadow contains tabbable elements. */ private static hasTabbableShadow; } /** * * @public * @remarks * HTML Element: */ declare const definition$$: _microsoft_fast_element.FASTElementDefinition; /** Card styles * @public */ declare const styles$d: _microsoft_fast_element.ElementStyles; declare const template$a: ElementViewTemplate; /** * CardFooter * @summary A CardFooter component for use within a card, providing slots for content and actions. * * @example * ```html * *
Footer Content
*
* Action 1 * Action 2 *
*
* ``` * * @slot default - Default slot for footer content. * @slot action - Slot for footer action elements, such as buttons or links. * * @csspart content - The content area of the footer. * @cssprop --card-size - Controls the card sizing token used by the footer. * * @extends FASTElement * @tagname fabric-card-footer * @public */ declare class CardFooter extends FASTElement { } /** * * @public * @remarks * HTML Element: */ declare const definition$_: _microsoft_fast_element.FASTElementDefinition; /** * CardHeader * @summary A component for card headers, supporting a flexible slot-based layout for customization. * * @example * ```html * *
Logo
* Header Image *

Main Title

* Subtitle Text * Action Button *
Additional Info
*
* ``` * * @slot start - Slot for content positioned at the start of the header. * @slot image - Slot for an image within the header. * @slot header - Slot for the main header content. * @slot subtitle - Slot for the subtitle text. * @slot action - Slot for action elements, typically buttons or links. * @slot end - Slot for content positioned at the end of the header. * @slot default - Default slot for card header content. * * @csspart image - The image container within the header. * @csspart header - The main header container. * @csspart row - A row within the header for layout. * * @extends FASTElement * @tagname fabric-card-header * @public */ declare class CardHeader extends FASTElement { } /** * * @public * @remarks * HTML Element: */ declare const definition$Z: _microsoft_fast_element.FASTElementDefinition; /** * CardPreview * @summary A CardPreview custom HTML Element that provides a preview container for card content, with an optional badge slot. * * @example * ```html * *
Card content goes here
* New *
* ``` * * @slot - The default slot for the card preview content. * @slot badge - The slot for the badge content. * * @extends FASTElement * @tagname fabric-card-preview * @public */ declare class CardPreview extends FASTElement { } /** * * @public * @remarks * HTML Element: */ declare const definition$Y: _microsoft_fast_element.FASTElementDefinition; /** * @summary A Carousel component for displaying a set of items in a horizontal, scrollable manner. * * @example * ```html * *
Carousel Header
* Prev * Next *
Item 1
*
Item 2
* *
* ``` * * @attr disable-animation - Disables animation when set to true. * * @prop {boolean} disableAnimation - Boolean attribute to disable animation. * @prop {HTMLElement[]} slottedCarouselItems - An array of carousel items that are slotted into the carousel. * @prop {HTMLElement} header - The header element. * @prop {number} currentIndex - The current index of the carousel, indicating which item is currently visible. * @prop {HTMLElement[]} nextButton - The next button element. * @prop {HTMLElement[]} prevButton - The previous button element. * @prop {number} visibleItemsCount - Gets the number of items currently visible in the carousel. (readonly) * * @slot header - Slot for the carousel header content. * @slot prev-button - Slot for the carousel's previous navigation button. * @slot next-button - Slot for the carousel's next navigation button. * @slot - Default slot for carousel items. * * @method next - Moves the carousel to the next set of items. * @method prev - Moves the carousel to the previous set of items. * @method scrollToIndex - Scrolls the carousel to a specific index. * @method isAtEnd - Checks if the carousel is at the end of the items. * @method getNextVisibleItemsCount - Gets the count of the next set of visible items in the carousel. * @method updateVisibleItems - Updates the visible items in the carousel. * * @extends FASTElement * @tagname fabric-carousel * @public */ declare class Carousel extends FASTElement { #private; /** * Boolean attribute to disable animation. * * @public * @type {boolean} * @attr */ disableAnimation?: boolean; /** * An array of carousel items that are slotted into the carousel. * * @public * @type {HTMLElement[]} * @observable */ slottedCarouselItems: HTMLElement[]; /** * Callback when slottedCarouselItems changes to update button states * @internal */ private slottedCarouselItemsChanged; /** * Boolean attribute to check if the carousel items are loaded */ private slottedCarouselItemsLoaded; /** * The header element * * @public * @type {HTMLElement} * @observable */ header?: HTMLElement; /** * The viewport div element for the carousel slotted elements * @public * @type {HTMLElement} * @observable */ viewportRef?: HTMLElement; /** * The current index of the carousel, indicating which item is currently visible. * * @public * @type {number} * @observable */ currentIndex: number; /** * Callback when currentIndex changes to update button states * @internal */ private currentIndexChanged; /** * The next button element * * @public * @type {HTMLElement[] | null | undefined} * @observable */ nextButton?: HTMLElement[] | null | undefined; /** * The previous button element * * @public * @type {HTMLElement[] | null | undefined} * @observable */ prevButton?: HTMLElement[] | null | undefined; /** * The width of the gap between carousel items, in pixels. * * @private * @type {number} */ private gapWidth; /** * Updates the disabled state of navigation buttons based on carousel position * @internal */ private updateButtonStates; /** * Handle the next button click event. * @internal */ private handleNext; /** * Handle the previous button click event. * @internal */ private handlePrev; /** * Sets event listeners for the carousel's navigation buttons. * @internal */ private setEventListeners; /** * Removes event listeners for the carousel's navigation buttons. * @internal */ private removeEventListeners; /** * Invoked when the carousel is added to the document's DOM. * * @public * @returns {void} */ connectedCallback(): void; /** * Invoked when the carousel is removed from the document's DOM. * * @public * @returns {void} */ disconnectedCallback(): void; /** * Moves the carousel to the next set of items. * * @public * @returns {void} */ next(): void; /** * Moves the carousel to the previous set of items. * * @public * @returns {void} */ prev(): void; /** * Scrolls the carousel to a specific index. * * @public * @param {number} index - The target index to scroll to * @returns {void} */ scrollToIndex(index: number, _attempts?: number): void; /** * Cached container width * @private * @type {number} */ private cachedContainerWidth; /** * Whether the layout should be recalculated * @private * @type {boolean} */ private shouldRecalculateLayout; /** * Resize observer * @private * @type {ResizeObserver} */ private resizeObserver?; /** * Item measurements * @private * @type {number[]} */ private itemMeasurements; /** * Sets up a resize observer to watch for changes in the carousel's container width */ private setupResizeObserver; /** * Measures the width of each item in the carousel. * @internal */ measureItems(): void; /** * The index of the last visible item in the carousel. * @private * @type {number} */ private lastVisibleItemIndex; /** * Gets the number of items currently visible in the carousel. * * @public * @returns {number} The count of visible items. */ get visibleItemsCount(): number; /** * Checks if the carousel is at the end of the items. * * @public * @returns {boolean} True if at the end, false otherwise. */ isAtEnd(): boolean; /** * Gets the count of the next set of visible items in the carousel. * * @public * @param {string} direction - The direction to check ("next" or "prev") * @returns {number} The count of the next visible items. */ getNextVisibleItemsCount(direction: "next" | "prev"): number; /** * Detects if the component is in RTL mode * @private * @returns {boolean} True if RTL is active */ private updateDirection; /** * Gets the appropriate transform direction based on RTL * @private * @param {number} offset - The offset amount * @returns {string} The transform CSS value */ private getTransform; /** * Updates the visible items in the carousel. * * @public * @returns {void} */ updateVisibleItems(): void; } /** * * @public * @remarks * HTML Element: */ declare const definition$X: _microsoft_fast_element.FASTElementDefinition; declare const styles$c: _microsoft_fast_element.ElementStyles; declare const template$9: ElementViewTemplate; /** Appearance values for {@link Button}. */ declare const ButtonAppearances: { readonly primaryOnBrand: "primary-on-brand"; readonly primary: "primary"; readonly outline: "outline"; readonly subtle: "subtle"; readonly transparent: "transparent"; }; /** Type describing appearance options for {@link Button}. */ type ButtonAppearance = ValuesOf; /** Shape values for {@link Button}. */ declare const ButtonShapes: { readonly circular: "circular"; readonly rounded: "rounded"; readonly square: "square"; }; /** Type describing shape options for {@link Button}. */ type ButtonShape = ValuesOf; /** Size values for {@link Button}. */ declare const ButtonSizes: { readonly small: "small"; readonly medium: "medium"; readonly large: "large"; }; /** Type describing size options for {@link Button}. */ type ButtonSize = ValuesOf; /** Form target values for {@link Button}. */ declare const ButtonFormTargets: { readonly blank: "_blank"; readonly self: "_self"; readonly parent: "_parent"; readonly top: "_top"; }; /** Type describing form target options for {@link Button}. */ type ButtonFormTarget = ValuesOf; /** Button type values for {@link Button}. */ declare const ButtonTypes: { readonly submit: "submit"; readonly reset: "reset"; readonly button: "button"; }; /** Type describing button type options for {@link Button}. */ type ButtonType = ValuesOf; /** * Button * @summary A Button Custom HTML Element. Based on FluentButton and includes style and layout specific attributes. * * @example * ```html * * πŸš€ * Click me! * β†’ * * ``` * * @attr {ButtonAppearance | undefined} appearance - Indicates the styled appearance of the button. * @attr {ButtonShape | undefined} shape - The shape of the button. * @attr {ButtonSize | undefined} size - The size of the button. * @attr {boolean} icon-only - Indicates that the button should only display as an icon with no text content. * @attr {boolean} autofocus - Indicates the button should be focused when the page is loaded. * @attr {boolean | undefined} disabled - Sets the element's disabled state. * @attr {boolean} disabled-focusable - Indicates that the button is focusable while disabled. * @attr {number} tabindex - Sets that the button tabindex attribute. * @attr {string | undefined} formaction - The URL that processes the form submission. * @attr {string | undefined} form - The id of a form to associate the element to. * @attr {string | undefined} formenctype - The encoding type for the form submission. * @attr {string | undefined} formmethod - The HTTP method that the browser uses to submit the form. * @attr {boolean | undefined} formnovalidate - Indicates that the form will not be validated when submitted. * @attr {ButtonFormTarget | undefined} formtarget - The target frame or window to open the form submission in. * @attr {string | undefined} name - The name of the element. This element's value will be surfaced during form submission under the provided name. * @attr {ButtonType} type - The button type. * @attr {string | undefined} value - The value attribute. * * @prop {ButtonAppearance | undefined} appearance - Indicates the styled appearance of the button. * @prop {ButtonShape | undefined} shape - The shape of the button. * @prop {ButtonSize | undefined} size - The size of the button. * @prop {boolean} iconOnly - Indicates that the button should only display as an icon with no text content. * @prop {boolean} autofocus - Indicates the button should be focused whein the page is loaded. * @prop {boolean | undefined} disabled - Sets the element's disabled state. * @prop {boolean} disabledFocusable - Indicates that the button is focusable while disabled. * @prop {number} tabindex - Sets that the button tabindex attribute. * @prop {string | undefined} formaction - The URL that processes the form submission. * @prop {string | undefined} form - The id of a form to associate the element to. * @prop {string | undefined} formenctype - The encoding type for the form submission. * @prop {string | undefined} formmethod - The HTTP method that the browser uses to submit the form. * @prop {boolean | undefined} formnovalidate - Indicates that the form will not be validated when submitted. * @prop {ButtonFormTarget | undefined} formtarget - The target frame or window to open the form submission in. * @prop {string | undefined} name - The name of the element. This element's value will be surfaced during form submission under the provided name. * @prop {ButtonType} type - The button type. * @prop {string | undefined} value - The value attribute. * @prop {string} role - Accessible role applied to the element (defaults to 'button'). * * @slot start - Content which can be provided before the button content. * @slot end - Content which can be provided after the button content. * @slot - The default slot for button content. * * @csspart content - The button content container. * * @cssprop --icon-spacing - Custom property defined in component styles * * @method keypressHandler - Handles keypress events for the button. * @method press - Presses the button. * @method resetForm - Resets the associated form. * * @extends FluentButton * @tagname fabric-button * @public */ declare class Button extends BaseButton { /** * Indicates the styled appearance of the button. * * @public * @remarks * HTML Attribute: `appearance` */ appearance?: ButtonAppearance; /** * The shape of the button. * * @public * @remarks * HTML Attribute: `shape` */ shape?: ButtonShape; /** * The size of the button. * * @public * @remarks * HTML Attribute: `size` */ size?: ButtonSize; /** * Indicates that the button should only display as an icon with no text content. * * @public * @remarks * HTML Attribute: `icon-only` */ iconOnly: boolean; } declare const FilterPillTypes: { readonly submit: "submit"; readonly reset: "reset"; readonly button: "button"; }; type FilterPillType = ValuesOf; declare const FilterPillFormTargets: { readonly blank: "_blank"; readonly self: "_self"; readonly parent: "_parent"; readonly top: "_top"; }; type FilterPillFormTarget = ValuesOf; /** Appearance values for {@link FilterPill}. */ declare const FilterPillAppearances: { readonly primary: "primary"; readonly subtle: "subtle"; readonly transparent: "transparent"; readonly outline: "outline"; readonly primaryOnBrand: "primary-on-brand"; }; type FilterPillAppearance = ValuesOf; /** Shape values for {@link FilterPill}. */ declare const FilterPillShapes: { readonly circular: "circular"; readonly square: "square"; }; type FilterPillShape = ValuesOf; /** Size values for {@link FilterPill}. */ declare const FilterPillSizes: { readonly small: "small"; readonly medium: "medium"; readonly large: "large"; }; type FilterPillSize = ValuesOf; /** * FilterPill event names * @public */ declare const FilterPillEventNames: { readonly pressedChange: "pressed-change"; }; /** * FilterPill * @summary A FilterPill component that represents a button-like pill with various customizable appearances, shapes, and sizes. Based largely on the ` * βœ– * * ``` * * @attr {MessageBarShape} shape - Sets the shape of the Message Bar. Possible values are 'rounded' or 'square'. * @attr {MessageBarLayout} layout - Sets the layout of the control. Possible values are 'multiline' or 'singleline'. * @attr {MessageBarIntent} intent - Sets the intent of the control. Possible values are 'success', 'warning', 'error', or 'info'. * * @prop {MessageBarShape} shape - Sets the shape of the Message Bar. Possible values are 'rounded' or 'square'. * @prop {MessageBarLayout} layout - Sets the layout of the control. Possible values are 'multiline' or 'singleline'. * @prop {MessageBarIntent} intent - Sets the intent of the control. Possible values are 'success', 'warning', 'error', or 'info'. * * @slot icon - Slot for the icon content. * @slot - The default slot for the content. * @slot actions - Slot for the actions content. * @slot dismiss - Slot for the dismiss button content. * * @csspart content - The main content container of the Message Bar. * @csspart actions - The container for action elements. * * @method dismissMessageBar - Method to emit a `dismiss` event when the message bar is dismissed. * * @fires dismiss - Fired when the message bar is dismissed. * * @extends FluentMessageBar * @tagname fabric-message-bar * @public */ declare class MessageBar extends MessageBar$1 { } /** * The Fabric MessageBar Element definition. * * @public * @remarks * HTML Element: `` */ declare const definition$m: _microsoft_fast_element.FASTElementDefinition; /** * MenuButton * @summary A MenuButton component that extends Fluent UI's MenuButton with custom styling and behavior. * * @example * ```html * * πŸš€ * Menu * * * ``` * * @attr {MenuButtonAppearances | undefined} appearance - Indicates the styled appearance of the button. * @attr {MenuButtonShape | undefined} shape - The shape of the button. * @attr {MenuButtonSize | undefined} size - The size of the button. * @attr {boolean | undefined} icon-only - Indicates that the button should only display as an icon with no text content. * @attr {boolean | undefined} autofocus - Indicates the button should be focused when the page is loaded. * @attr {boolean | undefined} disabled-focusable - Indicates that the button is focusable while disabled. * @attr {number | undefined} tabindex - Sets that the button tabindex attribute. * @attr {string | undefined} formaction - The URL that processes the form submission. * @attr {string | undefined} form - The id of a form to associate the element to. * @attr {string | undefined} formenctype - The encoding type for the form submission. * @attr {string | undefined} formmethod - The HTTP method that the browser uses to submit the form. * @attr {boolean | undefined} formnovalidate - Indicates that the form will not be validated when submitted. * @attr {string | undefined} formtarget - The target frame or window to open the form submission in. * @attr {string | undefined} name - The name of the element. This element's value will be surfaced during form submission under the provided name. * @attr {string | undefined} type - The button type. * @attr {string | undefined} value - The value attribute. * * @prop {MenuButtonAppearances | undefined} appearance - Indicates the styled appearance of the button. * @prop {MenuButtonShape | undefined} shape - The shape of the button. * @prop {MenuButtonSize | undefined} size - The size of the button. * @prop {boolean | undefined} iconOnly - Indicates that the button should only display as an icon with no text content. * @prop {boolean | undefined} autofocus - Indicates the button should be focused when the page is loaded. * @prop {boolean | undefined} disabledFocusable - Indicates that the button is focusable while disabled. * @prop {number | undefined} tabindex - Sets that the button tabindex attribute. * @prop {string | undefined} formaction - The URL that processes the form submission. * @prop {string | undefined} form - The id of a form to associate the element to. * @prop {string | undefined} formenctype - The encoding type for the form submission. * @prop {string | undefined} formmethod - The HTTP method that the browser uses to submit the form. * @prop {boolean | undefined} formnovalidate - Indicates that the form will not be validated when submitted. * @prop {string | undefined} formtarget - The target frame or window to open the form submission in. * @prop {string | undefined} name - The name of the element. This element's value will be surfaced during form submission under the provided name. * @prop {string | undefined} type - The button type. * @prop {string | undefined} value - The value attribute. * * @slot start - Content which can be provided before the button content. * @slot end - Content which can be provided after the button content. * @slot - The default slot for button content. * * @csspart content - The button content container. * * @cssprop --icon-spacing - Custom property defined in component styles * * @method keypressHandler - Handles keypress events for the button. * @method press - Programmatically presses the button. * @method resetForm - Resets the associated form. * * @extends FluentMenuButton * @tagname fabric-menu-button * @public */ declare class MenuButton extends MenuButton$1 { } /** * Menu Button Appearance constants * @public */ declare const MenuButtonAppearances: { readonly primary: "primary"; readonly outline: "outline"; readonly subtle: "subtle"; readonly transparent: "transparent"; }; /** * A Menu Button can be secondary, primary, outline, subtle, transparent * @public */ type MenuButtonAppearance = ValuesOf; /** * A Menu Button can be square, circular or rounded. * @public */ declare const MenuButtonShapes: { readonly circular: "circular"; readonly rounded: "rounded"; readonly square: "square"; }; /** * A Menu Button can be square, circular or rounded * @public */ type MenuButtonShape = ValuesOf; /** * A Menu Button can be a size of small, medium or large. * @public */ declare const MenuButtonSizes: { readonly small: "small"; readonly medium: "medium"; readonly large: "large"; }; /** * A Menu Button can be on of several preset sizes. * @public */ type MenuButtonSize = ValuesOf; /** * * @public * @remarks * HTML Element: */ declare const definition$l: _microsoft_fast_element.FASTElementDefinition; /** * Menu items roles. * @public */ declare const MenuItemRoles: { /** * The menu item has a "menuitem" role */ readonly menuitem: "menuitem"; /** * The menu item has a "menuitemcheckbox" role */ readonly menuitemcheckbox: "menuitemcheckbox"; /** * The menu item has a "menuitemradio" role */ readonly menuitemradio: "menuitemradio"; }; /** * The types for menu item roles * @public */ type MenuItemRole = ValuesOf; /** * @internal */ declare const roleForMenuItem: { [value in keyof typeof MenuItemRoles]: (typeof MenuItemRoles)[value]; }; /** * Menu items roles. * @public */ declare const MenuGroupRoles: { /** * The "group" role */ readonly group: "group"; }; /** * The types for menu group roles * @public */ type MenuGroupRole = ValuesOf; /** * @internal */ declare const roleForMenuGroup: Record; /** * MenuItem * @summary A MenuItem component that represents an item in a menu with various states and interactions. * * @example * ```html * * ``` * * @attr {boolean} disabled - The disabled state of the element. * @attr {MenuItemRole} role - The role of the element. Possible values: 'menuitem', 'menuitemcheckbox', 'menuitemradio'. * @attr {boolean} checked - The checked value of the element. * @attr {boolean} hidden - The hidden attribute. * * @prop {boolean} disabled - The disabled state of the element. * @prop {MenuItemRole} role - The role of the element. * @prop {boolean} checked - The checked value of the element. * @prop {boolean} hidden - The hidden attribute. * @prop {HTMLElement[]} slottedSubmenu - The submenu slotted content. * @prop {HTMLElement | undefined} submenu - The submenu element associated with this menu item. * * @slot - Default slot for menu item content. * @slot start - Slot for the start content. * @slot end - Slot for the end content. * @slot indicator - The checkbox or radio indicator. * @slot submenu-glyph - The submenu expand/collapse indicator. * @slot submenu - Slot for the submenu content. * * @csspart content - The main content of the menu item. * * @cssprop --indent - Custom property for indentation level (default: 0). * @cssprop --menu-max-height - Maximum height for submenu (default: auto). * * @internal connectedCallback - Called when the element is added to the document. * @internal disconnectedCallback - Called when the element is removed from the document. * @method disabledChanged - Handles changes to the disabled attribute. * @method roleChanged - Handles changes to the role attribute. * @method checkedChanged - Handles changes to the checked attribute. * @method slottedSubmenuChanged - Handles changes to the slotted submenu content. * @method handleMenuItemKeyDown - Handles keydown events for the menu item. * @method handleMenuItemClick - Handles click events for the menu item. * @method handleMouseOver - Handles mouse over events for the menu item. * @method handleMouseOut - Handles mouse out events for the menu item. * @method toggleHandler - Handles toggle events from submenu popover. * * @fires change - Fired when the checked state changes. * * @extends FASTElement * @tagname fabric-menu-item * @public */ declare class MenuItem extends FASTElement { #private; /** * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component. * * @internal */ private elementInternals; /** * The disabled state of the element. * * @public * @remarks * HTML Attribute: disabled */ disabled: boolean; /** * Handles changes to disabled attribute custom states and element internals * @param prev - the previous state * @param next - the next state */ disabledChanged(prev: boolean | undefined, next: boolean | undefined): void; /** * The role of the element. * * @public * @remarks * HTML Attribute: role */ role: MenuItemRole; /** * Handles changes to role attribute element internals properties * @param prev - the previous state * @param next - the next state */ roleChanged(prev: MenuItemRole | undefined, next: MenuItemRole | undefined): void; /** * The checked value of the element. * * @public * @remarks * HTML Attribute: checked */ checked: boolean; /** * Handles changes to checked attribute custom states and element internals. * @param prev - the previous state * @param next - the next state */ protected checkedChanged(prev: boolean, next: boolean): void; /** * The hidden attribute. * * @public * @remarks * HTML Attribute: hidden */ hidden: boolean; /** * The submenu slotted content. * * @internal */ slottedSubmenu: HTMLElement[]; /** * Sets the submenu and updates its position. * * @internal */ protected slottedSubmenuChanged(prev: HTMLElement[] | undefined, next: HTMLElement[]): void; /** * @public */ submenu: HTMLElement | undefined; /** * @public * Sets the role and registers event listeners. */ connectedCallback(): void; /** * Removes event listeners when component is disconnected. */ disconnectedCallback(): void; /** * Handles keydown events for the menu item. * * @param e - The keyboard event * @returns `false` if the event was handled and should not propagate, `true` otherwise * @protected */ protected handleMenuItemKeyDown: (e: KeyboardEvent) => boolean; /** * Handles click events for the menu item. * * @param e - The mouse event * @returns `false` if the event was handled and should not propagate * @protected */ protected handleMenuItemClick: (e: MouseEvent) => boolean; /** * Handles mouse over events for the menu item. * Opens any associated submenu when hovering over the item. * * @param e - The mouse event (unused but required for event handler signature) * @returns `false` if the event was handled and should not propagate * @protected */ protected handleMouseOver: () => boolean; /** * Handles mouse out events for the menu item. * Closes any associated submenu when the mouse leaves the item, * unless the focus remains within the menu item. * * @param e - The mouse event (unused but required for event handler signature) * @returns `false` if the event was handled and should not propagate * @protected */ protected handleMouseOut: () => boolean; /** * Handles toggle events from associated submenu popover. * Sets up required ARIA attributes and tab navigation when submenu opens/closes. * * @param e - The toggle event from the submenu popover * @protected */ protected toggleHandler: (e: Event) => void; /** * Invokes the appropriate action based on the menu item's role. * For checkbox items, toggles the checked state. * For radio items, sets the checked state to true if not already checked. * For regular menu items, opens submenus or emits a change event. * * @internal */ private invoke; /** * Sets the fallback position of the submenu when CSS anchor positioning is not supported. * Calculates optimal positioning to keep the submenu within the viewport bounds. * Positions the submenu to the inline-end by default, but adjusts based on available space. * * @internal */ private setSubmenuPosition; } /** * Menu Item column count * @public */ type MenuItemColumnCount = 0 | 1 | 2; /** MenuItem styles * @public */ declare const styles$4: _microsoft_fast_element.ElementStyles; declare const template$4: ElementViewTemplate; /** * * @public * @remarks * HTML Element: */ declare const definition$k: _microsoft_fast_element.FASTElementDefinition; /** MenuList styles * @public */ declare const styles$3: _microsoft_fast_element.ElementStyles; declare const template$3: ElementViewTemplate; /** * * @public * @remarks * HTML Element: */ declare const definition$j: _microsoft_fast_element.FASTElementDefinition; /** * The position variations for the menu component * @public */ declare const MenuPositions: { readonly above: "above"; readonly below: "below"; }; /** * The types for menu positions * @public */ type MenuPosition = ValuesOf; /** * Reposition modes for the menu * @public */ declare const MenuRepositionModes: { readonly auto: "auto"; readonly none: "none"; }; /** * Reposition mode type for the menu * @public */ type MenuRepositionMode = ValuesOf; /** * Menu * @summary A Menu component that provides an interactive menu interface with support for various trigger and open behaviors. * * @example * ```html * *
Menu Trigger
*
    *
  • Menu Item 1
  • *
  • Menu Item 2
  • *
  • Menu Item 3
  • *
*
* ``` * * @attr {boolean | undefined} open-on-hover - Determines if the menu should open on hover. * @attr {boolean | undefined} open-on-context - Determines if the menu should open on right click. * @attr {boolean | undefined} close-on-scroll - Determines if the menu should close on scroll. * @attr {boolean | undefined} persist-on-item-click - Determines if the menu open state should persist on click of a menu item. * @attr {boolean | undefined} split - Determines if the menu is in split state (for split button pattern). * @attr {MenuPosition | undefined} menu-position - Determines whether the menu list is above or below the trigger. * @attr {MenuRepositionMode | undefined} reposition-mode - The mode for repositioning the menu. Default is "none". * * @prop {boolean | undefined} openOnHover - Determines if the menu should open on hover. * @prop {boolean | undefined} openOnContext - Determines if the menu should open on right click. * @prop {boolean | undefined} closeOnScroll - Determines if the menu should close on scroll. * @prop {boolean | undefined} persistOnItemClick - Determines if the menu open state should persist on click of a menu item. * @prop {boolean | undefined} split - Determines if the menu is in split state. * @prop {MenuList[]} slottedMenuList - Holds the slotted menu list. * @prop {HTMLElement[]} slottedTriggers - Holds the slotted triggers. * @prop {MenuPosition | undefined} menuPosition - Determines whether the menu list is above or below the trigger. * @prop {MenuRepositionMode | undefined} repositionMode - The mode for repositioning the menu. * @prop {HTMLElement | undefined} overflowBoundary - The overflow boundary element reference. * * @slot primary-action - Slot for the primary action element (used when split is true). * @slot trigger - Slot for the trigger element. * @slot - Default slot for the menu list. * * @csspart trigger - Represents the trigger element of the menu. * @csspart menu-list - Represents the menu list element. * * @method toggleMenu - Toggles the open state of the menu. * @method closeMenu - Closes the menu. * @method openMenu - Opens the menu. * @method focusMenuList - Focuses on the menu list. * @method focusTrigger - Focuses on the menu trigger. * @method menuKeydownHandler - Handles keyboard interaction for the menu. * @method triggerKeydownHandler - Handles keyboard interaction for the trigger. * * @fires toggle - Event fired when the menu is toggled. * @fires change - Event fired when the state of a menu item changes. * * @extends FASTElement * @tagname fabric-menu * @public */ declare class Menu extends FASTElement { /** * The positioning instance for the menu. * @private */ private positioning; /** * The intersection observer for tracking overflow. * @private */ private intersectionObserver; /** * The original position before repositioning. * @private */ private originalMenuPosition; /** * The array of open positions based on collision detection. * @private */ private openPositions; /** * Determines if the menu should open on hover. * @public */ openOnHover?: boolean; /** * Determines if the menu should open on right click. * @public */ openOnContext?: boolean; /** * Determines if the menu should close on scroll. * @public */ closeOnScroll?: boolean; /** * Determines if the menu open state should persis on click of menu item * @public */ persistOnItemClick?: boolean; /** * Determines if the menu is in split state (for split button pattern). * @public */ split?: boolean; /** * Determines whether the menu list is above or below the trigger. * @public */ menuPosition?: MenuPosition; /** * The mode for repositioning the menu when it overflows the boundary. * @public * @default "auto" */ repositionMode?: MenuRepositionMode; /** * The overflow boundary element reference. * @public */ overflowBoundary?: HTMLElement; /** * Holds the slotted menu list. * @public */ slottedMenuList: MenuList[]; /** * Holds the slotted triggers. * @public */ slottedTriggers: HTMLElement[]; /** * Defines whether the menu is open or not. * @internal */ private _open; /** * The trigger element of the menu. * @internal */ private _trigger?; /** * The menu list element of the menu which has the popover behavior. * @internal */ private _menuList?; /** * Creates the overflow handler using IntersectionObserver. * Note: When a custom overflowBoundary is set, we use direct rect calculations * instead because popovers render in the top layer and IntersectionObserver * with a custom root won't work correctly. * @private */ private createOverflowHandler; /** * Checks overflow against custom boundary using direct rect calculations. * Delegates to MenuPositioning for the actual calculation. * @private */ private checkOverflowWithBoundary; /** * Handles overflow collisions with the menu. * @private */ private handleOverflow; /** * Applies height constraint to make menu scrollable when space is limited. * @private */ private applyHeightConstraint; /** * Clears height constraint from the menu. * @private */ private clearHeightConstraint; /** * Repositions the menu based on collisions. * @private */ private repositionMenu; /** * Releases positions and restores original if valid. * @private */ private releasePositions; /** * Observes the menu for overflow. * @private */ private observeMenuOverflow; /** * Updates the menu position on window changes. * @private */ private updateMenuPosition; /** * Debounced handler for window changes. * @private */ private handleWindowChanges; /** * Adds window event listeners. * @private */ private addWindowEventListeners; /** * Removes window event listeners. * @private */ private removeWindowEventListeners; /** * Adds overflow boundary event listeners. * @private */ private addOverflowBoundaryEventListeners; /** * Adds repositioning handlers. * @private */ private addRepositioningHandlers; /** * Creates the positioning manager. * @private */ private createPositioningManager; /** * Removes repositioning event listeners. * @private */ private removeRepositioningListeners; /** * Called when the element is connected to the DOM. * @public */ connectedCallback(): void; /** * Called when the element is disconnected from the DOM. * @public */ disconnectedCallback(): void; /** * Sets the component. * @public */ setComponent(): void; /** * Sets the menu position. * @public */ setMenuPosition(): void; /** * Toggles the open state of the menu. * @public */ toggleMenu: () => void; /** * Closes the menu. * @public */ closeMenu: () => void; /** * Opens the menu. * @public */ openMenu: (e?: Event) => void; /** * Focuses on the menu list. * @public */ focusMenuList(): void; /** * Focuses on the menu trigger. * @public */ focusTrigger(): void; /** * Handles the 'toggle' event on the popover. * @public * @param e - the event * @returns void */ toggleHandler: (e: Event | ToggleEvent) => void; /** * Called whenever the 'openOnHover' property changes. * * @param oldValue - The previous value of 'openOnHover'. * @param newValue - The new value of 'openOnHover'. * @public */ openOnHoverChanged(oldValue: boolean, newValue: boolean): void; /** * Called whenever the 'persistOnItemClick' property changes. * * @public * @param oldValue - The previous value of 'persistOnItemClick'. * @param newValue - The new value of 'persistOnItemClick'. */ persistOnItemClickChanged(oldValue: boolean, newValue: boolean): void; /** * Called whenever the 'menuPosition' property changes. * * @param oldValue - The previous value of 'menuPosition'. * @param newValue - The new value of 'menuPosition'. * @public */ menuPositionChanged(): void; /** * Called whenever the 'repositionMode' property changes. * * @public * @param oldValue - The previous value of 'repositionMode'. * @param newValue - The new value of 'repositionMode'. */ repositionModeChanged(oldValue: MenuRepositionMode, newValue: MenuRepositionMode): void; /** * Called whenever the 'openOnContext' property changes. * * @public * @param oldValue - The previous value of 'openOnContext'. * @param newValue - The new value of 'openOnContext'. */ openOnContextChanged(oldValue: boolean, newValue: boolean): void; /** * Called whenever the 'closeOnScroll' property changes. * * @public * @param oldValue - The previous value of 'closeOnScroll'. * @param newValue - The new value of 'closeOnScroll'. */ closeOnScrollChanged(oldValue: boolean, newValue: boolean): void; /** * Adds event listeners. * * @internal */ private addListeners; /** * Removes event listeners. * * @internal */ private removeListeners; /** * Handles keyboard interaction for the menu. Closes the menu and focuses on the trigger when the Escape key is * * @param e - the keyboard event * @public */ menuKeydownHandler(e: KeyboardEvent): boolean | void; /** * Handles keyboard interaction for the trigger. Toggles the menu when the Space or Enter key is pressed. If the menu * * @param e - the keyboard event * @public */ triggerKeydownHandler: (e: KeyboardEvent) => boolean | void; /** * Handles document click events to close a menu opened with contextmenu in popover="manual" mode. * @internal * @param e - The event triggered on document click. */ private documentClickHandler; } /** * * @public * @remarks * HTML Element: */ declare const definition$i: _microsoft_fast_element.FASTElementDefinition; /** Menu styles * @public */ declare const styles$2: _microsoft_fast_element.ElementStyles; declare const template$2: ElementViewTemplate; /** * OptionGroup * @summary An OptionGroup Custom HTML Element that groups related options within a listbox or dropdown. * Implements semantics similar to the native {@link https://developer.mozilla.org/docs/Web/HTML/Element/optgroup | HTMLOptGroupElement}. * * @example * ```html * * * Apple * Banana * * * Carrot * Broccoli * * * ``` * * @attr {string} label - The label for the option group, displayed as a non-selectable header. * @attr {boolean} disabled - When true, disables all options within this group. * * @prop {DropdownOption[]} options - The collection of child option elements. * * @slot - Default slot for fabric-option elements. * * @csspart label - The label element for the group header. * * @extends FASTElement * @tagname fabric-option-group * @public */ declare class OptionGroup extends FASTElement { /** * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | ElementInternals} instance for the component. * * @internal */ elementInternals: ElementInternals; /** * The label for the option group. Displayed as a non-selectable header. * * @public * @remarks * HTML Attribute: label */ label: string; /** * The disabled state of the option group. * When true, all child options are also disabled. * * @public * @remarks * HTML Attribute: disabled */ disabled?: boolean; /** * The collection of slotted option elements. * * @internal */ slottedOptions: Element[]; /** * Gets the collection of child option elements. * * @public */ get options(): DropdownOption[]; /** * Handles changes to the disabled attribute. * Updates the aria-disabled state on the element internals. * * @param prev - The previous disabled state. * @param next - The new disabled state. * @internal */ disabledChanged(prev: boolean | undefined, next: boolean | undefined): void; connectedCallback(): void; /** * Handles changes to the label attribute. * Updates the aria-label for accessibility. * * @param _prev - The previous label. * @param next - The new label. * @internal */ labelChanged(_prev: string | undefined, next: string | undefined): void; } /** * The Fabric OptionGroup Element definition. * * @public * @remarks * HTML Element: `` */ declare const definition$h: _microsoft_fast_element.FASTElementDefinition; /** * Styles for the {@link @fabric-msft/fabric-web#(OptionGroup:class)} component. * * @public */ declare const styles$1: _microsoft_fast_element.ElementStyles; declare const template$1: ElementViewTemplate; /** * Predicate function that determines if the element should be considered an option group. * Uses duck-typing by checking for the presence of an `options` array property * rather than relying on the tag name, making it prefix-agnostic. * * @param element - The element to check. * @returns true if the element is an option group. * @public */ declare function isOptionGroup(element?: Element | null): element is OptionGroup; /** * Gets the dropdown options from an element, handling both direct options and option groups. * * @param element - The element to extract options from. * @returns An array of DropdownOption elements. * @public */ declare function getOptionsFromElement(element: Element): DropdownOption[]; /** * ProgressBar * @summary A custom progress bar element with customizable thickness, shape, and validation states. * * @example * ```html * * ``` * * @attr {ProgressBarThickness} thickness - The thickness of the progress bar. Possible values are 'medium' and 'large'. * @attr {ProgressBarShape} shape - The shape of the progress bar. Possible values are 'rounded' and 'square'. * @attr {ProgressBarValidationState} validation-state - The validation state of the progress bar. Possible values are 'success', 'warning', and 'error'. * * @prop {ProgressBarThickness} thickness - The thickness of the progress bar. Possible values are 'medium' and 'large'. * @prop {ProgressBarShape} shape - The shape of the progress bar. Possible values are 'rounded' and 'square'. * @prop {ProgressBarValidationState} validationState - The validation state of the progress bar. Possible values are 'success', 'warning', and 'error'. * * @csspart indicator - The progress bar indicator. * * @cssprop --indicator-width - Computed percentage width of the progress indicator, based on the current value, min, and max. * @cssprop --max - CSS variable reflecting the max attribute value. Defaults to 100. * @cssprop --min - CSS variable reflecting the min attribute value. Defaults to 0. * @cssprop --value - CSS variable reflecting the current value attribute. Defaults to 0. * * @extends FluentProgressBar * @tagname fabric-progress-bar * @public */ declare class ProgressBar extends ProgressBar$1 { } /** * The Fabric Progress Bar component. * * @public */ declare const definition$g: _microsoft_fast_element.FASTElementDefinition; /** Shape values for {@link ProgressBar}. */ declare const ProgressBarShapes: { readonly rounded: "rounded"; readonly square: "square"; }; type ProgressBarShape = ValuesOf; /** Thickness values for {@link ProgressBar}. */ declare const ProgressBarThicknesses: { readonly medium: "medium"; readonly large: "large"; }; type ProgressBarThickness = ValuesOf; /** Validation state values for {@link ProgressBar}. */ declare const ProgressBarValidationStates: { readonly success: "success"; readonly warning: "warning"; readonly error: "error"; }; type ProgressBarValidationState = ValuesOf; /** * RadioGroup * @summary A custom Radio Group element based on Fluent UI's RadioGroup with custom styling and behavior. * * @example * ```html * * Option 1 * Option 2 * Option 3 * * ``` * * @attr {boolean} disabled - Disables the radio group and child radios. * @attr {string} value - The value of the checked radio. * @attr {string} name - The name of the radio group. * @attr {RadioGroupOrientation} orientation - The orientation of the group. * @attr {boolean} required - Indicates whether the radio group is required. * * @prop {boolean} disabled - Disables the radio group and child radios. * @prop {string} value - The value of the checked radio. * @prop {string} name - The name of the radio group. * @prop {RadioGroupOrientation} orientation - The orientation of the group. * @prop {boolean} required - Indicates whether the radio group is required. * * @slot - The default slot for the radio group. * * @method initialValueChanged - Sets the matching radio to checked when the value changes. * @method radiosChanged - Updates the enabled radios collection when properties on the child radios change. * @method requiredChanged - Called when the required property changes. * @method changeHandler - Sets the checked state of all radios when any radio emits a `change` event. * @method checkValidity - Checks the validity of the element and returns the result. * @method formResetCallback - Resets the radio group to its initial state during a form reset. * @method reportValidity - Reports the validity of the element. * * @fires change - Emits when the checked radio changes. * * @extends FASTElement * @tagname fabric-radio-group * @public */ declare class RadioGroup extends RadioGroup$1 { } /** Orientation values for {@link RadioGroup}. */ declare const RadioGroupOrientations: { readonly horizontal: "horizontal"; readonly vertical: "vertical"; }; /** Type describing orientation options for {@link RadioGroup}. */ type RadioGroupOrientation = ValuesOf; /** * The Fabric Radio Group component. * * @public */ declare const definition$f: _microsoft_fast_element.FASTElementDefinition; /** * Radio * @summary A Radio Custom HTML Element based on Fluent UI's Radio with custom styling and behavior. * * @example * ```html * * Option 1 * * * Option 2 * * ``` * * @attr {boolean} autofocus - Indicates that the element should get focus after the page finishes loading. * @attr {boolean} disabled - The initial disabled state of the control. * @attr {string} form - The id of a form to associate the element to. * @attr {boolean} checked - The initial checked state of the element. * @attr {string} value - The initial value of the input. * @attr {string} name - The name of the element. This element's value will be surfaced during form submission under the provided name. * * @prop {boolean} autofocus - Indicates that the element should get focus after the page finishes loading. * @prop {boolean} disabled - The initial disabled state of the control. * @prop {string} form - The id of a form to associate the element to. * @prop {boolean} checked - The initial checked state of the element. * @prop {string} value - The initial value of the input. * @prop {string} name - The name of the element. This element's value will be surfaced during form submission under the provided name. * * @slot checked-indicator - Custom slot for the checked indicator. * * @csspart checked-indicator - The checked state indicator of the radio. * @cssprop --size - Controls the size of the radio control. * * @method toggleChecked - Toggles the checked state of the control. * @method checkValidity - Checks the validity of the element and returns the result. * @method reportValidity - Reports the validity of the element. * @method setCustomValidity - Sets a custom validity message. * * @fires change - Emits a custom change event when the checked state changes * @fires input - Emits a custom input event when the checked state changes * @fires disabled - Emits a custom event when the disabled state changes * * @extends FluentRadio * @tagname fabric-radio * @public */ declare class Radio extends Radio$1 { } /** * The Fabric Radio component. * * @public */ declare const definition$e: _microsoft_fast_element.FASTElementDefinition; /** * RatingDisplay * @summary A Rating Display Custom HTML Element. Based on FluentRatingDisplay and includes style and layout specific attributes. * * @example * ```html * * * 4.5 * (10) * * ``` * * @attr {RatingDisplayColor | undefined} color - The color of the rating display icons. Default: `marigold` * @attr {RatingDisplaySize | undefined} size - The size of the component. Default: 'medium' * @attr {boolean | undefined} compact - Renders a single filled icon with a label next to it. Default: false * * @prop {boolean} compact - Renders a single filled icon with a label next to it. Default: false * * @slot icon - SVG element used as the rating icon. Default: star symbol. * @slot value - Displays the value of the rating. * @slot count - Displays the number of ratings. * * @cssprop --_attr-max - Internal max value derived from the max attribute. * @cssprop --_attr-value - Internal value derived from the value attribute. * @cssprop --_default-max - Default max fallback used when no attribute is set. * @cssprop --_default-value - Default value fallback used when no attribute is set. * @cssprop --_icon-color-empty - Color for empty (unfilled) icons. * @cssprop --_icon-color-value - Color for the filled icon portion. * @cssprop --_icon-gradient-degree - Gradient angle used for partial fill rendering. * @cssprop --_icon-gradient-stop - Primary gradient stop for partial fill. * @cssprop --_icon-gradient-stop-visual-adjustment - Adjustment applied to the gradient stop to align visuals. * @cssprop --_icon-size - Computed icon size used for layout. * @cssprop --_mask-image-filled - Mask image for the filled icon state. * @cssprop --_mask-image-outlined - Mask image for the outlined icon state. * @cssprop --_mask-inline-size - Inline size of the mask image. * @cssprop --_mask-position-x - Horizontal mask position used for partial fill. * @cssprop --_max - Computed max value used in layout calculations. * @cssprop --_value - Computed current value used in layout calculations. * * @extends FluentRatingDisplay * @tagname fabric-rating-display * @public */ declare class RatingDisplay extends RatingDisplay$1 { } /** * @public * @remarks * HTML Element: */ declare const definition$d: _microsoft_fast_element.FASTElementDefinition; /** Color values for {@link RatingDisplay}. */ declare const RatingDisplayColors: { readonly neutral: "neutral"; readonly brand: "brand"; readonly marigold: "marigold"; }; /** Type describing color options for {@link RatingDisplay}. */ type RatingDisplayColor = ValuesOf; /** Size values for {@link RatingDisplay}. */ declare const RatingDisplaySizes: { readonly small: "small"; readonly medium: "medium"; readonly large: "large"; }; /** Type describing size options for {@link RatingDisplay}. */ type RatingDisplaySize = ValuesOf; /** * TextInput configuration options. * * @public */ type TextInputOptions = StartEndOptions; /** * Values for the `control-size` attribute on TextInput elements. * * @public */ declare const TextInputControlSizes: { readonly small: "small"; readonly medium: "medium"; readonly large: "large"; }; type TextInputControlSize = ValuesOf; /** * Values for the `appearance` attribute on TextInput elements. * * @public */ declare const TextInputAppearances: { readonly outline: "outline"; readonly underline: "underline"; readonly filledLighter: "filled-lighter"; readonly filledDarker: "filled-darker"; }; type TextInputAppearance = ValuesOf; /** * Values for the `type` attribute on TextInput elements. * * @public */ declare const TextInputTypes: { readonly email: "email"; readonly password: "password"; readonly number: "number"; readonly tel: "tel"; readonly text: "text"; readonly url: "url"; }; type TextInputType = ValuesOf; /** * Input types that block implicit form submission. * * @public */ declare const ImplicitSubmissionBlockingTypes$1: string[]; /** * A Text Input Custom HTML Element. * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input | ``} element. * * @slot start - Content which can be provided before the input * @slot end - Content which can be provided after the input * @slot - The default slot for button content * @csspart label - The internal `