/** Types the bare `m-*` tags in React's JSX, for the elements used directly rather than through the components. */ import type * as React from "react"; import type { ElementEvents, ElementMarkup } from "../elements/index.js"; import type { ReactHostAttributes } from "./create.js"; /** The element's events as React 19 listens to them on a custom element: an `on` prop in lower case gets the element's own event (`onchange={(e) => e.detail.value}`). */ type Events = { [K in keyof ElementEvents & string as `on${Lowercase}`]?: (event: ElementEvents[K]) => void; }; /** A tag's props: its attributes as markup writes them, its events, and any HTML attribute. */ type Tag = Omit, E>, keyof ElementMarkup | keyof Events> & ElementMarkup & Events; declare module "react" { namespace JSX { interface IntrinsicElements { "m-button": Tag; "m-switch": Tag; "m-tabs": Tag; "m-progress": Tag; "m-loading-indicator": Tag; "m-badge": Tag; "m-divider": Tag; "m-icon-button": Tag; "m-fab": Tag; "m-extended-fab": Tag; "m-checkbox": Tag; "m-slider": Tag; "m-text-field": Tag; "m-radios": Tag; "m-navigation-bar": Tag; "m-navigation-rail": Tag; "m-navigation-drawer": Tag; /** @deprecated Material Design 3 names this the navigation drawer. Use NavigationDrawer instead. */ "m-drawer": Tag; "m-app-bar": Tag; /** @deprecated Material Design 3 names this the app bar. Use AppBar instead. */ "m-top-app-bar": Tag; /** @deprecated Material Design 3 Expressive replaces the bottom app bar with the docked toolbar. Use Toolbar with variant="docked" placement="bottom" instead. A centred FAB, adding a FAB after creation, a custom transition duration and a custom tag are not yet available on the docked toolbar. */ "m-bottom-app-bar": Tag; "m-button-group": Tag; "m-chips": Tag; "m-list": Tag; "m-card": Tag; "m-carousel": Tag; "m-menu": Tag; "m-fab-menu": Tag; "m-select": Tag; "m-split-button": Tag; "m-tooltip": Tag; "m-toolbar": Tag; "m-snackbar": Tag; "m-dialog": Tag; "m-bottom-sheet": Tag; "m-side-sheet": Tag; "m-datepicker": Tag; "m-timepicker": Tag; "m-search": Tag; "m-tab": Tag; "m-radio": Tag; "m-navigation-bar-item": Tag; "m-navigation-rail-item": Tag; "m-navigation-drawer-item": Tag; /** @deprecated Material Design 3 names this the navigation drawer. Use NavigationDrawerItem instead. */ "m-drawer-item": Tag; "m-button-group-item": Tag; "m-chip": Tag; "m-list-item": Tag; "m-carousel-item": Tag; "m-menu-item": Tag; "m-fab-menu-item": Tag; "m-select-option": Tag; "m-search-suggestion": Tag; } } } export {};