UNPKG

mdui

Version:

实现 material you 设计规范的 Web Components 组件库

990 lines (987 loc) 163 kB
import React from 'react'; import { JQ } from '@mdui/jq'; type HTMLElementProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; declare global { namespace JSX { interface IntrinsicElements { /** * Avatar Component * * ```html * <mdui-avatar src="https://avatars githubusercontent com/u/3030330?s=40&v=4"></mdui-avatar> * ``` * @see https://www.mdui.org/en/docs/2/components/avatar */ 'mdui-avatar': { /** * URL of the avatar image. * @see https://www.mdui.org/en/docs/2/components/avatar#attributes-src */ 'src'?: string; /** * Image resizing method, similar to the native CSS [`object-fit`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit). Possible values: * * * `contain`: Scales the image to fit within the box while maintaining the aspect ratio. The image will be "letterboxed" if the aspect ratios do not match. * * `cover`: Scales the image to fill the box while maintaining the aspect ratio. The image will be clipped if the aspect ratios do not match. * * `fill`: Default. Scales the image to fill the box. The image will be stretched if the aspect ratios do not match. * * `none`: No resizing. * * `scale-down`: Scales as if `none` or `contain` were specified, choosing the smaller result. * @see https://www.mdui.org/en/docs/2/components/avatar#attributes-fit */ 'fit'?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; /** * The Material Icons name for the avatar. * @see https://www.mdui.org/en/docs/2/components/avatar#attributes-icon */ 'icon'?: string; /** * Text description of the avatar. * @see https://www.mdui.org/en/docs/2/components/avatar#attributes-label */ 'label'?: string; } & HTMLElementProps; /** * Badge Component * * ```html * <mdui-badge>12</mdui-badge> * ``` * @see https://www.mdui.org/en/docs/2/components/badge */ 'mdui-badge': { /** * Defines the badge shape. Possible values: * * `small`: A small badge without text. * * `large`: A large badge with displayed text. * @see https://www.mdui.org/en/docs/2/components/badge#attributes-variant */ 'variant'?: 'small' | 'large'; } & HTMLElementProps; /** * Bottom App Bar Component * * ```html * <mdui-bottom-app-bar> * <mdui-button-icon icon="check_box--outlined"></mdui-button-icon> * <mdui-button-icon icon="edit--outlined"></mdui-button-icon> * <mdui-button-icon icon="mic_none--outlined"></mdui-button-icon> * <mdui-button-icon icon="image--outlined"></mdui-button-icon> * <div style="flex-grow: 1"></div> * <mdui-fab icon="add"></mdui-fab> * </mdui-bottom-app-bar> * ``` * @see https://www.mdui.org/en/docs/2/components/bottom-app-bar */ 'mdui-bottom-app-bar': { /** * Hides the bottom app bar when set. * @see https://www.mdui.org/en/docs/2/components/bottom-app-bar#attributes-hide */ 'hide'?: boolean; /** * When set, detaches the [`<mdui-fab>`](https://www.mdui.org/en/docs/2/components/fab) from the bottom app bar. The [`<mdui-fab>`](https://www.mdui.org/en/docs/2/components/fab) remains on the page even after the app bar is hidden. * @see https://www.mdui.org/en/docs/2/components/bottom-app-bar#attributes-fab-detach */ 'fab-detach'?: boolean; /** * Defines the scroll behavior. Possible values: * * * `hide`: Hides when scrolling. * @see https://www.mdui.org/en/docs/2/components/bottom-app-bar#attributes-scroll-behavior */ 'scroll-behavior'?: 'hide' | 'shrink' | 'elevate'; /** * The element that listens for scroll events. Accepts a CSS selector, DOM element, or [JQ object](https://www.mdui.org/en/docs/2/functions/jq). Defaults to `window`. * @see https://www.mdui.org/en/docs/2/components/bottom-app-bar#attributes-scroll-target */ 'scroll-target'?: string | HTMLElement | JQ<HTMLElement>; /** * The scroll distance (in pixels) that triggers the scroll behavior. * @see https://www.mdui.org/en/docs/2/components/bottom-app-bar#attributes-scroll-threshold */ 'scroll-threshold'?: number; /** * Specifies the layout order within the [`<mdui-layout>`](https://www.mdui.org/en/docs/2/components/layout) component. Items are sorted in ascending order. The default value is `0`. * @see https://www.mdui.org/en/docs/2/components/bottom-app-bar#attributes-order */ 'order'?: number; } & HTMLElementProps; /** * Icon Button Component * * ```html * <mdui-button-icon icon="search"></mdui-button-icon> * ``` * @see https://www.mdui.org/en/docs/2/components/button-icon */ 'mdui-button-icon': { /** * Defines the icon button style. Possible values: * * `standard`: For low-priority actions. * * `filled`: Has the strongest visual effect, suitable for high-priority actions. * * `tonal`: A visual effect between `filled` and `outlined`, suitable for medium to high-priority actions. * * `outlined`: For medium-priority actions. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-variant */ 'variant'?: 'standard' | 'filled' | 'tonal' | 'outlined'; /** * Specifies the Material Icons name. Alternatively, use the default slot. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-icon */ 'icon'?: string; /** * Specifies the Material Icons name when selected. Alternatively, use `slot="selected-icon"`. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-selected-icon */ 'selected-icon'?: string; /** * Indicates if the button is selectable. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-selectable */ 'selectable'?: boolean; /** * Indicates if the button is selected. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-selected */ 'selected'?: boolean; /** * The URL for the hyperlink. If provided, the component is rendered as an `<a>` element and can use link-related attributes. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-href */ 'href'?: string; /** * Instructs the browser to download the linked URL. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-download */ 'download'?: string; /** * Defines where to open the linked URL. Possible values: * * * `_blank`: Opens in a new tab or window. * * `_parent`: Opens in the parent browsing context or `_self` if no parent. * * `_self`: Opens in the current browsing context. (Default). * * `_top`: Opens in the topmost browsing context or `_self` if no ancestors. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-target */ 'target'?: '_blank' | '_parent' | '_self' | '_top'; /** * Specifies the relationship of the linked URL as space-separated link types. Possible values: * * * `alternate`: Alternate versions of the current document. * * `author`: The author of the current document or article. * * `bookmark`: The permalink for the nearest ancestor section. * * `external`: The referenced document is not part of the same site as the current document. * * `help`: A link to context-sensitive help. * * `license`: Indicates that the main content of the current document is covered by the copyright license described by the referenced document. * * `me`: Indicates that the current document represents the person who owns the linked content. * * `next`: Indicates that the current document is part of a series and the next document in the series is the referenced document. * * `nofollow`: Indicates that the current document's original author or publisher does not endorse the referenced document. * * `noreferrer`: No `Referer` header will be included. Also has the same effect as `noopener`. * * `opener`: Creates an auxiliary browsing context if the hyperlink would otherwise create a top-level browsing context that is not an auxiliary browsing context (i.e., has "`_blank`" as `target` attribute value). * * `prev`: Indicates that the current document is part of a series and the previous document in the series is the referenced document. * * `search`: Links to a resource that can be used to search through the current document and its related pages. * * `tag`: Gives a tag (identified by the given address) that applies to the current document. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-rel */ 'rel'?: 'alternate' | 'author' | 'bookmark' | 'external' | 'help' | 'license' | 'me' | 'next' | 'nofollow' | 'noreferrer' | 'opener' | 'prev' | 'search' | 'tag'; /** * Specifies that the element should be focused when the page loads. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-autofocus */ 'autofocus'?: boolean; /** * Defines the order in which the element receives focus when navigating with the Tab key. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-tabindex */ 'tabindex'?: number; /** * Disables the element. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-disabled */ 'disabled'?: boolean; /** * Indicates that the element is in a loading state. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-loading */ 'loading'?: boolean; /** * The button's name, which is submitted with form data. * * **Note**: This is only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-name */ 'name'?: string; /** * The button's value, which is submitted with form data. * * **Note**: This is only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-value */ 'value'?: string; /** * Defines the button's default behavior. The default is `button`. Possible values: * * * `submit`: Submits the form data to the server. * * `reset`: Resets all the controls to their initial values. * * `button`: No default behavior, does nothing when pressed by default. * * **Note**: This is only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-type */ 'type'?: 'submit' | 'reset' | 'button'; /** * Associates the button with a `<form>` element. The value should be the `id` of a `<form>` in the same document. If not set, the button is associated with its parent `<form>`, if any. * * This attribute allows button elements to be associated with `<form>`s anywhere in the document, not just inside a `<form>`. * * **Note**: Only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-form */ 'form'?: string; /** * Specifies the URL that processes the button's submitted information. Overrides the `action` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-formaction */ 'formaction'?: string; /** * Specifies the form data encoding method. Possible values: * * * `application/x-www-form-urlencoded`: Default if the attribute is not used. * * `multipart/form-data`: Used for `<input>` elements with `type` set to `file`. * * `text/plain`: For debugging, not for real form submission. * * Overrides the `enctype` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-formenctype */ 'formenctype'?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'; /** * Specifies the HTTP method for form submission. Possible values: * * * `post`: Form data included in HTTP request body. * * `get`: Form data appended to `action` URL. * * Overrides the `method` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-formmethod */ 'formmethod'?: 'post' | 'get'; /** * Specifies that the form should not be validated on submission. Overrides the `novalidate` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-formnovalidate */ 'formnovalidate'?: boolean; /** * Specifies where to display the form submission response. Possible values: * * * `_self`: Current browsing context. (Default). * * `_blank`: New tab or window. * * `_parent`: Parent browsing context or `_self` if no parent. * * `_top`: Topmost browsing context or `_self` if no ancestors. * * Overrides the `target` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/button-icon#attributes-formtarget */ 'formtarget'?: '_self' | '_blank' | '_parent' | '_top'; } & HTMLElementProps; /** * Button Component * * ```html * <mdui-button>Button</mdui-button> * ``` * @see https://www.mdui.org/en/docs/2/components/button */ 'mdui-button': { /** * Defines the button style. Possible values: * * `elevated`: A shadowed button for visual distinction. * * `filled`: Used for final actions like 'Save' or 'Confirm'. * * `tonal`: A mix between `filled` and `outlined`, suitable for medium to high-priority actions. * * `outlined`: A bordered button for medium-priority and secondary actions. * * `text`: A text button for low-priority actions. * @see https://www.mdui.org/en/docs/2/components/button#attributes-variant */ 'variant'?: 'elevated' | 'filled' | 'tonal' | 'outlined' | 'text'; /** * If set, the button will fill the width of its parent element. * @see https://www.mdui.org/en/docs/2/components/button#attributes-full-width */ 'full-width'?: boolean; /** * Specifies the Material Icons name on the left. Alternatively, use `slot="icon"`. * @see https://www.mdui.org/en/docs/2/components/button#attributes-icon */ 'icon'?: string; /** * Specifies the Material Icons name on the right. Alternatively, use `slot="end-icon"`. * @see https://www.mdui.org/en/docs/2/components/button#attributes-end-icon */ 'end-icon'?: string; /** * The URL for the hyperlink. If provided, the component is rendered as an `<a>` element and can use link-related attributes. * @see https://www.mdui.org/en/docs/2/components/button#attributes-href */ 'href'?: string; /** * Instructs the browser to download the linked URL. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/button#attributes-download */ 'download'?: string; /** * Defines where to open the linked URL. Possible values: * * * `_blank`: Opens in a new tab or window. * * `_parent`: Opens in the parent browsing context or `_self` if no parent. * * `_self`: Opens in the current browsing context. (Default). * * `_top`: Opens in the topmost browsing context or `_self` if no ancestors. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/button#attributes-target */ 'target'?: '_blank' | '_parent' | '_self' | '_top'; /** * Specifies the relationship of the linked URL as space-separated link types. Possible values: * * * `alternate`: Alternate versions of the current document. * * `author`: The author of the current document or article. * * `bookmark`: The permalink for the nearest ancestor section. * * `external`: The referenced document is not part of the same site as the current document. * * `help`: A link to context-sensitive help. * * `license`: Indicates that the main content of the current document is covered by the copyright license described by the referenced document. * * `me`: Indicates that the current document represents the person who owns the linked content. * * `next`: Indicates that the current document is part of a series and the next document in the series is the referenced document. * * `nofollow`: Indicates that the current document's original author or publisher does not endorse the referenced document. * * `noreferrer`: No `Referer` header will be included. Also has the same effect as `noopener`. * * `opener`: Creates an auxiliary browsing context if the hyperlink would otherwise create a top-level browsing context that is not an auxiliary browsing context (i.e., has "`_blank`" as `target` attribute value). * * `prev`: Indicates that the current document is part of a series and the previous document in the series is the referenced document. * * `search`: Links to a resource that can be used to search through the current document and its related pages. * * `tag`: Gives a tag (identified by the given address) that applies to the current document. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/button#attributes-rel */ 'rel'?: 'alternate' | 'author' | 'bookmark' | 'external' | 'help' | 'license' | 'me' | 'next' | 'nofollow' | 'noreferrer' | 'opener' | 'prev' | 'search' | 'tag'; /** * Specifies that the element should be focused when the page loads. * @see https://www.mdui.org/en/docs/2/components/button#attributes-autofocus */ 'autofocus'?: boolean; /** * Defines the order in which the element receives focus when navigating with the Tab key. * @see https://www.mdui.org/en/docs/2/components/button#attributes-tabindex */ 'tabindex'?: number; /** * Disables the element. * @see https://www.mdui.org/en/docs/2/components/button#attributes-disabled */ 'disabled'?: boolean; /** * Indicates that the element is in a loading state. * @see https://www.mdui.org/en/docs/2/components/button#attributes-loading */ 'loading'?: boolean; /** * The button's name, which is submitted with form data. * * **Note**: This is only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/button#attributes-name */ 'name'?: string; /** * The button's value, which is submitted with form data. * * **Note**: This is only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/button#attributes-value */ 'value'?: string; /** * Defines the button's default behavior. The default is `button`. Possible values: * * * `submit`: Submits the form data to the server. * * `reset`: Resets all the controls to their initial values. * * `button`: No default behavior, does nothing when pressed by default. * * **Note**: This is only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/button#attributes-type */ 'type'?: 'submit' | 'reset' | 'button'; /** * Associates the button with a `<form>` element. The value should be the `id` of a `<form>` in the same document. If not set, the button is associated with its parent `<form>`, if any. * * This attribute allows button elements to be associated with `<form>`s anywhere in the document, not just inside a `<form>`. * * **Note**: Only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/button#attributes-form */ 'form'?: string; /** * Specifies the URL that processes the button's submitted information. Overrides the `action` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/button#attributes-formaction */ 'formaction'?: string; /** * Specifies the form data encoding method. Possible values: * * * `application/x-www-form-urlencoded`: Default if the attribute is not used. * * `multipart/form-data`: Used for `<input>` elements with `type` set to `file`. * * `text/plain`: For debugging, not for real form submission. * * Overrides the `enctype` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/button#attributes-formenctype */ 'formenctype'?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'; /** * Specifies the HTTP method for form submission. Possible values: * * * `post`: Form data included in HTTP request body. * * `get`: Form data appended to `action` URL. * * Overrides the `method` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/button#attributes-formmethod */ 'formmethod'?: 'post' | 'get'; /** * Specifies that the form should not be validated on submission. Overrides the `novalidate` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/button#attributes-formnovalidate */ 'formnovalidate'?: boolean; /** * Specifies where to display the form submission response. Possible values: * * * `_self`: Current browsing context. (Default). * * `_blank`: New tab or window. * * `_parent`: Parent browsing context or `_self` if no parent. * * `_top`: Topmost browsing context or `_self` if no ancestors. * * Overrides the `target` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/button#attributes-formtarget */ 'formtarget'?: '_self' | '_blank' | '_parent' | '_top'; } & HTMLElementProps; /** * Card Component * * ```html * <mdui-card>card content</mdui-card> * ``` * @see https://www.mdui.org/en/docs/2/components/card */ 'mdui-card': { /** * Defines the card style. Possible values: * * `elevated`: Shadowed, providing more visual separation from the background than `filled`, but less than `outlined`. * * `filled`: Provides minimal visual separation from the background. * * `outlined`: Bordered, providing maximum visual separation from the background. * @see https://www.mdui.org/en/docs/2/components/card#attributes-variant */ 'variant'?: 'elevated' | 'filled' | 'outlined'; /** * Makes the card clickable. When set, a mouse hover effect and click ripple effect are added. * @see https://www.mdui.org/en/docs/2/components/card#attributes-clickable */ 'clickable'?: boolean; /** * Disables the card. * @see https://www.mdui.org/en/docs/2/components/card#attributes-disabled */ 'disabled'?: boolean; /** * The URL for the hyperlink. If specified, the component renders as an `<a>` element and can use link-related attributes. * @see https://www.mdui.org/en/docs/2/components/card#attributes-href */ 'href'?: string; /** * Instructs the browser to treat the linked URL as a download. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/card#attributes-download */ 'download'?: string; /** * Defines where to display the linked URL. Possible values: * * * `_blank`: Opens in a new tab or window. * * `_parent`: Opens in the parent browsing context or `_self` if no parent exists. * * `_self`: Opens in the current browsing context. (Default). * * `_top`: Opens in the topmost browsing context or `_self` if no ancestors exist. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/card#attributes-target */ 'target'?: '_blank' | '_parent' | '_self' | '_top'; /** * Specifies the relationship of the linked URL as space-separated link types. Possible values: * * * `alternate`: Alternate versions of the current document. * * `author`: Author of the current document or article. * * `bookmark`: Permanent link for the nearest ancestor section. * * `external`: The referenced document is not part of the same site as the current document. * * `help`: Link to context-sensitive help. * * `license`: Indicates that the main content of the current document is covered by the copyright license described by the referenced document. * * `me`: Indicates that the current document represents the person who owns the linked content. * * `next`: Indicates that the current document is part of a series and the next document in the series is the referenced document. * * `nofollow`: Indicates that the current document's original author or publisher does not endorse the referenced document. * * `noreferrer`: No `Referer` header will be included. Also has the same effect as `noopener`. * * `opener`: Creates an auxiliary browsing context if the hyperlink would otherwise create a top-level browsing context that is not an auxiliary browsing context (i.e., has "`_blank`" as `target` attribute value). * * `prev`: Indicates that the current document is part of a series and the previous document in the series is the referenced document. * * `search`: Links to a resource that can be used to search through the current document and its related pages. * * `tag`: Gives a tag (identified by the given address) that applies to the current document. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/card#attributes-rel */ 'rel'?: 'alternate' | 'author' | 'bookmark' | 'external' | 'help' | 'license' | 'me' | 'next' | 'nofollow' | 'noreferrer' | 'opener' | 'prev' | 'search' | 'tag'; /** * Determines if the element should be focused when the page loads. * @see https://www.mdui.org/en/docs/2/components/card#attributes-autofocus */ 'autofocus'?: boolean; /** * Specifies the order in which the element receives focus when navigating with the Tab key. * @see https://www.mdui.org/en/docs/2/components/card#attributes-tabindex */ 'tabindex'?: number; } & HTMLElementProps; /** * Checkbox Component * * ```html * <mdui-checkbox>Checkbox</mdui-checkbox> * ``` * @see https://www.mdui.org/en/docs/2/components/checkbox */ 'mdui-checkbox': { /** * Dsiables the checkbox. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-disabled */ 'disabled'?: boolean; /** * Sets the checkbox to the checked state. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-checked */ 'checked'?: boolean; /** * Sets the checkbox to an indeterminate state. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-indeterminate */ 'indeterminate'?: boolean; /** * Requires the checkbox to be checked for form submission. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-required */ 'required'?: boolean; /** * Associates the checkbox with a `<form>` element. The value should be the `id` of a `<form>` in the same document. If not set, the checkbox is associated with its parent `<form>`, if any. * * This attribute allows checkbox elements to be associated with `<form>`s anywhere in the document, not just inside a `<form>`. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-form */ 'form'?: string; /** * Sets the checkbox's name, which is submitted with form data. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-name */ 'name'?: string; /** * Sets the checkbox's value, which is submitted with form data. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-value */ 'value'?: string; /** * Sets the Material Icons name for the unchecked state. Alternatively, use `slot="unchecked-icon"`. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-unchecked-icon */ 'unchecked-icon'?: string; /** * Sets the Material Icons name for the checked state. Alternatively, use `slot="checked-icon"`. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-checked-icon */ 'checked-icon'?: string; /** * Sets the Material Icons name for the indeterminate state. Alternatively, use `slot="indeterminate-icon"`. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-indeterminate-icon */ 'indeterminate-icon'?: string; /** * Determines if the element should be focused when the page loads. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-autofocus */ 'autofocus'?: boolean; /** * Specifies the order in which the element receives focus when navigating with the Tab key. * @see https://www.mdui.org/en/docs/2/components/checkbox#attributes-tabindex */ 'tabindex'?: number; } & HTMLElementProps; /** * Chip Component * * ```html * <mdui-chip>Chip</mdui-chip> * ``` * @see https://www.mdui.org/en/docs/2/components/chip */ 'mdui-chip': { /** * Defines the chip type. Possible values: * * * `assist`: Displays auxiliary actions related to the context, such as sharing and favoriting on a meal ordering page. * * `filter`: Filters content, like search results on a search results page. * * `input`: Represents fragments of user input, such as contacts in the 'To' field in Gmail. * * `suggestion`: Provides dynamically generated suggestions to simplify user actions, like message predictions in a chat application. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-variant */ 'variant'?: 'assist' | 'filter' | 'input' | 'suggestion'; /** * Gives the chip a shadow. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-elevated */ 'elevated'?: boolean; /** * Makes the chip selectable. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-selectable */ 'selectable'?: boolean; /** * Marks the chip as selected. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-selected */ 'selected'?: boolean; /** * Makes the chip deletable. When set, a delete icon appears on the right. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-deletable */ 'deletable'?: boolean; /** * Sets the Material Icons name for the left icon. Alternatively, use `slot="icon"`. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-icon */ 'icon'?: string; /** * Sets the Material Icons name for the left icon when selected. Alternatively, use `slot="selected-icon"`. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-selected-icon */ 'selected-icon'?: string; /** * Sets the Material Icons name for the right icon. Alternatively, use `slot="end-icon"`. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-end-icon */ 'end-icon'?: string; /** * Sets the Material Icons name for the delete icon when deletable. Alternatively, use `slot="delete-icon"`. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-delete-icon */ 'delete-icon'?: string; /** * The URL for the hyperlink. If provided, the component is rendered as an `<a>` element and can use link-related attributes. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-href */ 'href'?: string; /** * Instructs the browser to download the linked URL. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-download */ 'download'?: string; /** * Defines where to open the linked URL. Possible values: * * * `_blank`: Opens in a new tab or window. * * `_parent`: Opens in the parent browsing context or `_self` if no parent. * * `_self`: Opens in the current browsing context. (Default). * * `_top`: Opens in the topmost browsing context or `_self` if no ancestors. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-target */ 'target'?: '_blank' | '_parent' | '_self' | '_top'; /** * Specifies the relationship of the linked URL as space-separated link types. Possible values: * * * `alternate`: Alternate versions of the current document. * * `author`: The author of the current document or article. * * `bookmark`: The permalink for the nearest ancestor section. * * `external`: The referenced document is not part of the same site as the current document. * * `help`: A link to context-sensitive help. * * `license`: Indicates that the main content of the current document is covered by the copyright license described by the referenced document. * * `me`: Indicates that the current document represents the person who owns the linked content. * * `next`: Indicates that the current document is part of a series and the next document in the series is the referenced document. * * `nofollow`: Indicates that the current document's original author or publisher does not endorse the referenced document. * * `noreferrer`: No `Referer` header will be included. Also has the same effect as `noopener`. * * `opener`: Creates an auxiliary browsing context if the hyperlink would otherwise create a top-level browsing context that is not an auxiliary browsing context (i.e., has "`_blank`" as `target` attribute value). * * `prev`: Indicates that the current document is part of a series and the previous document in the series is the referenced document. * * `search`: Links to a resource that can be used to search through the current document and its related pages. * * `tag`: Gives a tag (identified by the given address) that applies to the current document. * * **Note**: This is only available when `href` is specified. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-rel */ 'rel'?: 'alternate' | 'author' | 'bookmark' | 'external' | 'help' | 'license' | 'me' | 'next' | 'nofollow' | 'noreferrer' | 'opener' | 'prev' | 'search' | 'tag'; /** * Specifies that the element should be focused when the page loads. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-autofocus */ 'autofocus'?: boolean; /** * Defines the order in which the element receives focus when navigating with the Tab key. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-tabindex */ 'tabindex'?: number; /** * Disables the element. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-disabled */ 'disabled'?: boolean; /** * Indicates that the element is in a loading state. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-loading */ 'loading'?: boolean; /** * The button's name, which is submitted with form data. * * **Note**: This is only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-name */ 'name'?: string; /** * The button's value, which is submitted with form data. * * **Note**: This is only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-value */ 'value'?: string; /** * Defines the button's default behavior. The default is `button`. Possible values: * * * `submit`: Submits the form data to the server. * * `reset`: Resets all the controls to their initial values. * * `button`: No default behavior, does nothing when pressed by default. * * **Note**: This is only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-type */ 'type'?: 'submit' | 'reset' | 'button'; /** * Associates the button with a `<form>` element. The value should be the `id` of a `<form>` in the same document. If not set, the button is associated with its parent `<form>`, if any. * * This attribute allows button elements to be associated with `<form>`s anywhere in the document, not just inside a `<form>`. * * **Note**: Only available when `href` is not specified. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-form */ 'form'?: string; /** * Specifies the URL that processes the button's submitted information. Overrides the `action` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-formaction */ 'formaction'?: string; /** * Specifies the form data encoding method. Possible values: * * * `application/x-www-form-urlencoded`: Default if the attribute is not used. * * `multipart/form-data`: Used for `<input>` elements with `type` set to `file`. * * `text/plain`: For debugging, not for real form submission. * * Overrides the `enctype` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-formenctype */ 'formenctype'?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'; /** * Specifies the HTTP method for form submission. Possible values: * * * `post`: Form data included in HTTP request body. * * `get`: Form data appended to `action` URL. * * Overrides the `method` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-formmethod */ 'formmethod'?: 'post' | 'get'; /** * Specifies that the form should not be validated on submission. Overrides the `novalidate` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-formnovalidate */ 'formnovalidate'?: boolean; /** * Specifies where to display the form submission response. Possible values: * * * `_self`: Current browsing context. (Default). * * `_blank`: New tab or window. * * `_parent`: Parent browsing context or `_self` if no parent. * * `_top`: Topmost browsing context or `_self` if no ancestors. * * Overrides the `target` attribute of the button's form owner. * * **Note**: Only available when `href` is not specified and `type="submit"`. * @see https://www.mdui.org/en/docs/2/components/chip#attributes-formtarget */ 'formtarget'?: '_self' | '_blank' | '_parent' | '_top'; } & HTMLElementProps; /** * Circular Progress Component * * ```html * <mdui-circular-progress></mdui-circular-progress> * ``` * @see https://www.mdui.org/en/docs/2/components/circular-progress */ 'mdui-circular-progress': { /** * Sets the maximum value for the progress indicator. The default value is `1`. * @see https://www.mdui.org/en/docs/2/components/circular-progress#attributes-max */ 'max'?: number; /** * Sets the current value of the progress indicator. If not specified, the progress indicator is in an indeterminate state. * @see https://www.mdui.org/en/docs/2/components/circular-progress#attributes-value */ 'value'?: number; } & HTMLElementProps; /** * Collapse Item Component It should be used in conjunction with the `<mdui-collapse>` component * * ```html * <mdui-collapse> * <mdui-collapse-item header="header-1">content-1</mdui-collapse-item> * <mdui-collapse-item header="header-2">content-2</mdui-collapse-item> * </mdui-collapse> * ``` * @see https://www.mdui.org/en/docs/2/components/collapse */ 'mdui-collapse-item': { /** * Specifies the value of the collapsible panel item. * @see https://www.mdui.org/en/docs/2/components/collapse#collapse-item-attributes-value */ 'value'?: string; /** * Sets the header text for the collapsible panel item. * @see https://www.mdui.org/en/docs/2/components/collapse#collapse-item-attributes-header */ 'header'?: string; /** * Disables the collapsible panel item. * @see https://www.mdui.org/en/docs/2/components/collapse#collapse-item-attributes-disabled */ 'disabled'?: boolean; /** * Identifies the element that triggers the collapse on click. This can be a CSS selector, a DOM element, or a [JQ object](https://www.mdui.org/en/docs/2/functions/jq). By default, the entire header area is the trigger. * @see https://www.mdui.org/en/docs/2/components/collapse#collapse-item-attributes-trigger */ 'trigger'?: string | HTMLElement | JQ<HTMLElement>; } & HTMLElementProps; /** * Collapse Panel Component It should be used in conjunction with the `<mdui-collapse-item>` component * * ```html * <mdui-collapse> * <mdui-collapse-item header="header-1">content-1</mdui-collapse-item> * <mdui-collapse-item header="header-2">content-2</mdui-collapse-item> * </mdui-collapse> * ``` * @see https://www.mdui.org/en/docs/2/components/collapse */ 'mdui-collapse': { /** * Activates accordion mode. * @see https://www.mdui.org/en/docs/2/components/collapse#collapse-attributes-accordion */ 'accordion'?: boolean; /** * Specifies the open `<mdui-collapse-item>` value. * * Note: The HTML attribute is always a string and can only be initially set when `accordion` is `true`. The JavaScript property value is a string when `accordion` is `true` and a string array when `accordion` is `false`. To modify this value when `accordion` is `false`, you must change the JavaScript property. * @see https://www.mdui.org/en/docs/2/components/collapse#collapse-attributes-value */ 'value'?: string | string[]; /** * Disables the collapsible panel. * @see https://www.mdui.org/en/docs/2/components/collapse#collapse-attributes-disabled */ 'disabled'?: boolean; } & HTMLElementProps; /** * Dialog Component * * ```html * <mdui-dialog>content</mdui-dialog> * ``` * @see https://www.mdui.org/en/docs/2/components/dialog */ 'mdui-dialog': { /** * Sets the Material Icons name for the top icon. Alternatively, use `slot="icon"`. * @see https://www.mdui.org/en/docs/2/components/dialog#attributes-icon */ 'icon'?: string; /** * Sets the dialog title. Alternatively, use `slot="headline"`. * @see https://www.mdui.org/en/docs/2/components/dialog#attributes-headline */ 'headline'?: string; /** * Sets the text below the title. Alternatively, use `slot="description"`. * @see https://www.mdui.org/en/docs/2/components/dialog#attributes-description */ 'description'?: string; /** * Opens the dialog. * @see https://www.mdui.org/en/docs/2/components/dialog#attributes-open */ 'open'?: boolean; /** * Sets the dialog to full-screen. * @see https://www.mdui.org/en/docs/2/components/dialog#attributes-fullscreen */ 'fullscreen'?: boolean; /** * Closes the dialog when the ESC key is pressed. * @see https://www.mdui.org/en/docs/2/components/dialog#attributes-close-on-esc */ 'close-on-esc'?: boolean; /** * Closes the dialog when the overlay is clicked. * @see https://www.mdui.org/en/docs/2/components/dialog#attributes-close-on-overlay-click */ 'close-on-overlay-click'?: boolean; /** * Stacks the bottom action buttons vertically. * @see https://www.mdui.org/en/docs/2/components/dialog#attributes-stacked-actions