import { type ElementType } from 'react'; import { type AriaLabelingProps } from '../../../core/types/a11y-props.js'; import { type ButtonProps } from '../Button.js'; /** * Defines the available Button Aria Props. * @public */ export interface ButtonAria { /** Props for the button element. */ buttonProps: T; /** Whether the button is currently pressed. */ isPressed: boolean; } /** * Defines the Aria Base Button Props. * @public */ export interface AriaBaseButtonProps extends AriaLabelingProps { /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ 'aria-expanded'?: boolean | 'true' | 'false'; /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ 'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | 'true' | 'false'; /** Identifies the element (or elements) whose contents or presence are controlled by the current element. */ 'aria-controls'?: string; /** Indicates the current "pressed" state of toggle buttons. */ 'aria-pressed'?: boolean | 'true' | 'false' | 'mixed'; /** * The behavior of the button when used in an HTML form. * @defaultValue 'button' */ type?: 'button' | 'submit' | 'reset'; } /** * Combines the ButtonProps with the AriaBaseButtonProps. * @public */ export type AriaButtonProps = ButtonProps & AriaBaseButtonProps;