mirror of
https://github.com/material-components/material-web.git
synced 2026-01-09 07:21:09 +08:00
Merge pull request #4963 from material-components:auto-update-docs
PiperOrigin-RevId: 568328326
This commit is contained in:
commit
74c06cfda3
@ -704,7 +704,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdElevatedButton <md-elevated-button>
|
||||
### MdElevatedButton <code><md-elevated-button></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -724,7 +724,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdFilledButton <md-filled-button>
|
||||
### MdFilledButton <code><md-filled-button></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -744,7 +744,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdFilledTonalButton <md-filled-tonal-button>
|
||||
### MdFilledTonalButton <code><md-filled-tonal-button></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -764,7 +764,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdOutlinedButton <md-outlined-button>
|
||||
### MdOutlinedButton <code><md-outlined-button></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -784,7 +784,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdTextButton <md-text-button>
|
||||
### MdTextButton <code><md-text-button></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdCheckbox <md-checkbox>
|
||||
### MdCheckbox <code><md-checkbox></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -486,7 +486,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdChipSet <md-chip-set>
|
||||
### MdChipSet <code><md-chip-set></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -498,7 +498,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdAssistChip <md-assist-chip>
|
||||
### MdAssistChip <code><md-assist-chip></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -515,7 +515,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdFilterChip <md-filter-chip>
|
||||
### MdFilterChip <code><md-filter-chip></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -534,7 +534,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdInputChip <md-input-chip>
|
||||
### MdInputChip <code><md-input-chip></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -555,7 +555,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdSuggestionChip <md-suggestion-chip>
|
||||
### MdSuggestionChip <code><md-suggestion-chip></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -244,7 +244,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdDialog <md-dialog>
|
||||
### MdDialog <code><md-dialog></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdDivider <md-divider>
|
||||
### MdDivider <code><md-divider></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -479,7 +479,7 @@ Add with a different theme applied](images/fab/theming-branded.webp)
|
||||
## API
|
||||
|
||||
|
||||
### MdFab <md-fab>
|
||||
### MdFab <code><md-fab></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -494,17 +494,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
#### Methods
|
||||
|
||||
<!-- mdformat off(autogenerated might break rendering in catalog) -->
|
||||
|
||||
Method | Parameters | Returns | Description
|
||||
--- | --- | --- | ---
|
||||
`getRenderClasses` | _None_ | `{ primary: boolean; secondary: boolean; tertiary: boolean; lowered: boolean; small: boolean; large: boolean; extended: boolean; }` |
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdBrandedFab <md-branded-fab>
|
||||
### MdBrandedFab <code><md-branded-fab></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -135,7 +135,7 @@ md-focus-ring {
|
||||
## API
|
||||
|
||||
|
||||
### MdFocusRing <md-focus-ring>
|
||||
### MdFocusRing <code><md-focus-ring></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -430,7 +430,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdIconButton <md-icon-button>
|
||||
### MdIconButton <code><md-icon-button></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -453,7 +453,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdFilledIconButton <md-filled-icon-button>
|
||||
### MdFilledIconButton <code><md-filled-icon-button></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -476,7 +476,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdFilledTonalIconButton <md-filled-tonal-icon-button>
|
||||
### MdFilledTonalIconButton <code><md-filled-tonal-icon-button></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -499,7 +499,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdOutlinedIconButton <md-outlined-icon-button>
|
||||
### MdOutlinedIconButton <code><md-outlined-icon-button></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -549,7 +549,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdList <md-list>
|
||||
### MdList <code><md-list></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -557,7 +557,7 @@ Token | Default value
|
||||
|
||||
Property | Attribute | Type | Default | Description
|
||||
--- | --- | --- | --- | ---
|
||||
`items` | | `ListItem[]` | `undefined` | An array of activatable and disableable list items. Queries every assigned element that has the `md-list-item` attribute.<br>_NOTE:_ This is a shallow, flattened query via `HTMLSlotElement.queryAssignedElements` and thus will _only_ include direct children / directly slotted elements.
|
||||
`items` | | `ListItem[]` | `undefined` |
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
@ -572,7 +572,7 @@ Method | Parameters | Returns | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdListItem <md-list-item>
|
||||
### MdListItem <code><md-list-item></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -580,28 +580,20 @@ Method | Parameters | Returns | Description
|
||||
|
||||
Property | Attribute | Type | Default | Description
|
||||
--- | --- | --- | --- | ---
|
||||
`interactive` | `interactive` | `boolean` | `false` | Enables focusing the list item, and adds hover and click ripples when set to true. By default `interactive` is false.
|
||||
`headline` | `headline` | `string` | `''` | The primary, headline text of the list item.
|
||||
`supportingText` | `supporting-text` | `string` | `''` | The one-line supporting text below the headline. Set `multiLineSupportingText` to `true` to support multiple lines in the supporting text.
|
||||
`multiLineSupportingText` | `multi-line-supporting-text` | `boolean` | `false` | Modifies `supportingText` to support multiple lines.
|
||||
`trailingSupportingText` | `trailing-supporting-text` | `string` | `''` | The supporting text placed at the end of the item. Overridden by elements slotted into the `end` slot.
|
||||
`disabled` | `disabled` | `boolean` | `false` | Disables the item and makes it non-selectable and non-interactive.
|
||||
`type` | `type` | `string` | `'listitem'` | Sets the role of the list item. Set to 'nothing' to clear the role. This property will be ignored if `href` is set since the underlying element will be a native anchor tag.
|
||||
`type` | `type` | `string` | `'text'` | Sets the behavior of the list item, defaults to "text". Change to "link" or "button" for interactive items.
|
||||
`href` | `href` | `string` | `''` | Sets the underlying `HTMLAnchorElement`'s `href` resource attribute.
|
||||
`target` | `target` | `string` | `''` | Sets the underlying `HTMLAnchorElement`'s `target` attribute when `href` is set.
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
#### Methods
|
||||
#### Events
|
||||
|
||||
<!-- mdformat off(autogenerated might break rendering in catalog) -->
|
||||
|
||||
Method | Parameters | Returns | Description
|
||||
--- | --- | --- | ---
|
||||
`getRenderClasses` | _None_ | `{ interactive: boolean; 'with-one-line': boolean; 'with-two-line': boolean; 'with-three-line': boolean; disabled: boolean; }` |
|
||||
`renderRipple` | _None_ | `unique symbol \| TemplateResult` |
|
||||
`renderFocusRing` | _None_ | `unique symbol \| TemplateResult` |
|
||||
`onFocus` | _None_ | `void` |
|
||||
Event | Description
|
||||
--- | ---
|
||||
`request-activation` |
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
|
||||
@ -395,7 +395,8 @@ a sharp 0px border radius.](images/menu/theming.webp)
|
||||
|
||||
## API
|
||||
|
||||
### MdMenu <md-menu>
|
||||
|
||||
### MdMenu <code><md-menu></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -404,21 +405,20 @@ a sharp 0px border radius.](images/menu/theming.webp)
|
||||
Property | Attribute | Type | Default | Description
|
||||
--- | --- | --- | --- | ---
|
||||
`anchor` | `anchor` | `string` | `''` | The ID of the element in the same root node in which the menu should align to. Overrides setting `anchorElement = elementReference`.<br>__NOTE__: anchor or anchorElement must either be an HTMLElement or resolve to an HTMLElement in order for menu to open.
|
||||
`fixed` | `fixed` | `boolean` | `false` | Makes the element use `position:fixed` instead of `position:absolute`. In most cases, the menu should position itself above most other `position:absolute` or `position:fixed` elements when placed inside of them. e.g. using a menu inside of an `md-dialog`.<br>__NOTE__: Fixed menus will not scroll with the page and will be fixed to the window instead.
|
||||
`positioning` | `positioning` | `string` | `'absolute'` | Whether the positioning algorithim should calculate relative to the parent of the anchor element (absolute) or relative to the window (fixed).<br>Examples for `position = 'fixed'`:<br>- If there is no `position:relative` in the given parent tree and the surface is `position:absolute` - If the surface is `position:fixed` - If the surface is in the "top layer" - The anchor and the surface do not share a common `position:relative` ancestor<br>When using positioning = fixed, in most cases, the menu should position itself above most other `position:absolute` or `position:fixed` elements when placed inside of them. e.g. using a menu inside of an `md-dialog`.<br>__NOTE__: Fixed menus will not scroll with the page and will be fixed to the window instead.
|
||||
`quick` | `quick` | `boolean` | `false` | Skips the opening and closing animations.
|
||||
`hasOverflow` | `has-overflow` | `boolean` | `false` | Displays overflow content like a submenu.<br>__NOTE__: This may cause adverse effects if you set `md-menu {max-height:...}` and have items overflowing items in the "y" direction.
|
||||
`open` | `open` | `boolean` | `false` | Opens the menu and makes it visible. Alternative to the `.show()` and `.close()` methods
|
||||
`xOffset` | `x-offset` | `number` | `0` | Offsets the menu's inline alignment from the anchor by the given number in pixels. This value is direction aware and will follow the LTR / RTL direction.<br>e.g. LTR: positive -> right, negative -> left RTL: positive -> left, negative -> right
|
||||
`yOffset` | `y-offset` | `number` | `0` | Offsets the menu's block alignment from the anchor by the given number in pixels.<br>e.g. positive -> down, negative -> up
|
||||
`listTabIndex` | `list-tabindex` | `number` | `-1` | The tabindex of the underlying list element.
|
||||
`type` | `type` | `string` | `'menu'` | The role of the underlying list element.
|
||||
`typeaheadDelay` | `typeahead-delay` | `number` | `200` | The max time between the keystrokes of the typeahead menu behavior before it clears the typeahead buffer.
|
||||
`anchorCorner` | `anchor-corner` | `string` | `Corner.END_START` | The corner of the anchor which to align the menu in the standard logical property style of <block>-<inline> e.g. `'end-start'`.<br>NOTE: This value may not be respected by the menu positioning algorithm if the menu would render outisde the viewport.
|
||||
`menuCorner` | `menu-corner` | `string` | `Corner.START_START` | The corner of the menu which to align the anchor in the standard logical property style of <block>-<inline> e.g. `'start-start'`.<br>NOTE: This value may not be respected by the menu positioning algorithm if the menu would render outisde the viewport.
|
||||
`stayOpenOnOutsideClick` | `stay-open-on-outside-click` | `boolean` | `false` | Keeps the user clicks outside the menu.<br>NOTE: clicking outside may still cause focusout to close the menu so see `stayOpenOnFocusout`.
|
||||
`stayOpenOnFocusout` | `stay-open-on-focusout` | `boolean` | `false` | Keeps the menu open when focus leaves the menu's composed subtree.<br>NOTE: Focusout behavior will stop propagation of the focusout event. Set this property to true to opt-out of menu's focuout handling altogether.
|
||||
`skipRestoreFocus` | `skip-restore-focus` | `boolean` | `false` | After closing, does not restore focus to the last focused element before the menu was opened.
|
||||
`defaultFocus` | `default-focus` | `string` | `FocusState.FIRST_ITEM` | The element that should be focused by default once opened.<br>NOTE: When setting default focus to 'LIST_ROOT', remember to change `list-tabindex` to `0` when necessary.
|
||||
`defaultFocus` | `default-focus` | `string` | `FocusState.FIRST_ITEM` | The element that should be focused by default once opened.<br>NOTE: When setting default focus to 'LIST_ROOT', remember to change `tabindex` to `0` and change md-menu's display to something other than `display: contents` when necessary.
|
||||
`isSubmenu` | | `boolean` | `false` | Whether or not the current menu is a submenu and should not handle specific navigation keys.
|
||||
`typeaheadController` | | `TypeaheadController` | `function { ... }` | Handles typeahead navigation through the menu.
|
||||
`anchorElement` | | `HTMLElement & Partial<SurfacePositionTarget>` | `undefined` |
|
||||
`items` | | `MenuItem[]` | `undefined` |
|
||||
@ -451,7 +451,7 @@ Event | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdMenuItem <md-menu-item>
|
||||
### MdMenuItem <code><md-menu-item></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -459,15 +459,13 @@ Event | Description
|
||||
|
||||
Property | Attribute | Type | Default | Description
|
||||
--- | --- | --- | --- | ---
|
||||
`keepOpen` | `keep-open` | `boolean` | `false` | Keeps the menu open if clicked or keyboard selected.
|
||||
`headline` | `headline` | `string` | `''` | The primary, headline text of the list item.
|
||||
`supportingText` | `supporting-text` | `string` | `''` | The one-line supporting text below the headline. Set `multiLineSupportingText` to `true` to support multiple lines in the supporting text.
|
||||
`multiLineSupportingText` | `multi-line-supporting-text` | `boolean` | `false` | Modifies `supportingText` to support multiple lines.
|
||||
`trailingSupportingText` | `trailing-supporting-text` | `string` | `''` | The supporting text placed at the end of the item. Overridden by elements slotted into the `end` slot.
|
||||
`disabled` | `disabled` | `boolean` | `false` | Disables the item and makes it non-selectable and non-interactive.
|
||||
`type` | `type` | `string` | `'listitem'` | Sets the role of the list item. Set to 'nothing' to clear the role. This property will be ignored if `href` is set since the underlying element will be a native anchor tag.
|
||||
`type` | `type` | `string` | `'menuitem'` | Sets the behavior and role of the menu item, defaults to "menuitem".
|
||||
`href` | `href` | `string` | `''` | Sets the underlying `HTMLAnchorElement`'s `href` resource attribute.
|
||||
`target` | `target` | `string` | `''` | Sets the underlying `HTMLAnchorElement`'s `target` attribute when `href` is set.
|
||||
`keepOpen` | `keep-open` | `boolean` | `false` | Keeps the menu open if clicked or keyboard selected.
|
||||
`selected` | `selected` | `boolean` | `false` | Sets the item in the selected visual state when a submenu is opened.
|
||||
`typeaheadText` | | `string` | `undefined` |
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
@ -481,7 +479,7 @@ Event | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdSubMenuItem <md-sub-menu-item>
|
||||
### MdSubMenu <code><md-sub-menu></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -493,16 +491,9 @@ Property | Attribute | Type | Default | Description
|
||||
`menuCorner` | `menu-corner` | `string` | `Corner.START_START` | The menuCorner to set on the submenu.
|
||||
`hoverOpenDelay` | `hover-open-delay` | `number` | `400` | The delay between mouseenter and submenu opening.
|
||||
`hoverCloseDelay` | `hover-close-delay` | `number` | `400` | The delay between ponterleave and the submenu closing.
|
||||
`selected` | `selected` | `boolean` | `false` | Sets the item in the selected visual state when a submenu is opened.
|
||||
`keepOpen` | `keep-open` | `boolean` | `false` | Keeps the menu open if clicked or keyboard selected.
|
||||
`headline` | `headline` | `string` | `''` | The primary, headline text of the list item.
|
||||
`supportingText` | `supporting-text` | `string` | `''` | The one-line supporting text below the headline. Set `multiLineSupportingText` to `true` to support multiple lines in the supporting text.
|
||||
`multiLineSupportingText` | `multi-line-supporting-text` | `boolean` | `false` | Modifies `supportingText` to support multiple lines.
|
||||
`trailingSupportingText` | `trailing-supporting-text` | `string` | `''` | The supporting text placed at the end of the item. Overridden by elements slotted into the `end` slot.
|
||||
`disabled` | `disabled` | `boolean` | `false` | Disables the item and makes it non-selectable and non-interactive.
|
||||
`type` | `type` | `string` | `'listitem'` | Sets the role of the list item. Set to 'nothing' to clear the role. This property will be ignored if `href` is set since the underlying element will be a native anchor tag.
|
||||
`href` | `href` | `string` | `''` | Sets the underlying `HTMLAnchorElement`'s `href` resource attribute.
|
||||
`target` | `target` | `string` | `''` | Sets the underlying `HTMLAnchorElement`'s `target` attribute when `href` is set.
|
||||
`isSubMenu` | `md-sub-menu` | `boolean` | `true` | READONLY: self-identifies as a menu item and sets its identifying attribute
|
||||
`item` | | `MenuItem` | `undefined` |
|
||||
`menu` | | `Menu` | `undefined` |
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
@ -512,8 +503,8 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
Method | Parameters | Returns | Description
|
||||
--- | --- | --- | ---
|
||||
`show` | `onOpened` | `void` | Shows the submenu.
|
||||
`close` | `onClosed` | `void` | Closes the submenu.
|
||||
`show` | _None_ | `Promise<void>` | Shows the submenu.
|
||||
`close` | _None_ | `Promise<void>` | Closes the submenu.
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
@ -524,10 +515,9 @@ Method | Parameters | Returns | Description
|
||||
Event | Description
|
||||
--- | ---
|
||||
`deactivate-items` | Requests the parent menu to deselect other items when a submenu opens
|
||||
`request-activation` | Requests the parent make the element focusable and focuses the item.
|
||||
`request-activation` | Requests the parent make the slotted item focusable and focuses the item.
|
||||
`deactivate-typeahead` | Requests the parent menu to deactivate the typeahead functionality when a submenu opens
|
||||
`activate-typeahead` | Requests the parent menu to activate the typeahead functionality when a submenu closes
|
||||
`close-menu` |
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
|
||||
@ -380,7 +380,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdLinearProgress <md-linear-progress>
|
||||
### MdLinearProgress <code><md-linear-progress></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -396,7 +396,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdCircularProgress <md-circular-progress>
|
||||
### MdCircularProgress <code><md-circular-progress></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -211,7 +211,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdRadio <md-radio>
|
||||
### MdRadio <code><md-radio></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -266,7 +266,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdRipple <md-ripple>
|
||||
### MdRipple <code><md-ripple></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -207,4 +207,163 @@ md-outlined-select::part(menu) {
|
||||
```
|
||||
|
||||
<!-- auto-generated API docs start -->
|
||||
|
||||
## API
|
||||
|
||||
|
||||
### MdFilledSelect <code><md-filled-select></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
<!-- mdformat off(autogenerated might break rendering in catalog) -->
|
||||
|
||||
Property | Attribute | Type | Default | Description
|
||||
--- | --- | --- | --- | ---
|
||||
`quick` | `quick` | `boolean` | `false` | Opens the menu synchronously with no animation.
|
||||
`required` | `required` | `boolean` | `false` | Whether or not the select is required.
|
||||
`disabled` | `disabled` | `boolean` | `false` | Disables the select.
|
||||
`errorText` | `error-text` | `string` | `''` | The error message that replaces supporting text when `error` is true. If `errorText` is an empty string, then the supporting text will continue to show.<br>This error message overrides the error message displayed by `reportValidity()`.
|
||||
`label` | `label` | `string` | `''` | The floating label for the field.
|
||||
`supportingText` | `supporting-text` | `string` | `''` | Conveys additional information below the select, such as how it should be used.
|
||||
`error` | `error` | `boolean` | `false` | Gets or sets whether or not the select is in a visually invalid state.<br>This error state overrides the error state controlled by `reportValidity()`.
|
||||
`menuPositioning` | `menu-positioning` | `string` | `'absolute'` | Whether or not the underlying md-menu should be position: fixed to display in a top-level manner, or position: absolute.<br>position:fixed is useful for cases where select is inside of another element with stacking context and hidden overflows such as `md-dialog`.
|
||||
`typeaheadDelay` | `typeahead-delay` | `number` | `DEFAULT_TYPEAHEAD_BUFFER_TIME` | The max time between the keystrokes of the typeahead select / menu behavior before it clears the typeahead buffer.
|
||||
`hasLeadingIcon` | `has-leading-icon` | `boolean` | `false` | Whether or not the text field has a leading icon. Used for SSR.
|
||||
`displayText` | `display-text` | `string` | `''` | Text to display in the field. Only set for SSR.
|
||||
`value` | `value` | `string` | `undefined` |
|
||||
`selectedIndex` | `selected-index` | `number` | `undefined` |
|
||||
`options` | | `SelectOption[]` | `undefined` |
|
||||
`selectedOptions` | | `SelectOption[]` | `undefined` |
|
||||
`name` | | `string` | `undefined` |
|
||||
`form` | | `HTMLFormElement` | `undefined` |
|
||||
`labels` | | `NodeList` | `undefined` |
|
||||
`validity` | | `ValidityState` | `undefined` |
|
||||
`validationMessage` | | `string` | `undefined` |
|
||||
`willValidate` | | `boolean` | `undefined` |
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
#### Methods
|
||||
|
||||
<!-- mdformat off(autogenerated might break rendering in catalog) -->
|
||||
|
||||
Method | Parameters | Returns | Description
|
||||
--- | --- | --- | ---
|
||||
`select` | `value` | `void` | Selects an option given the value of the option, and updates MdSelect's value.
|
||||
`selectIndex` | `index` | `void` | Selects an option given the index of the option, and updates MdSelect's value.
|
||||
`reset` | _None_ | `void` | Reset the select to its default value.
|
||||
`checkValidity` | _None_ | `boolean` | Checks the select's native validation and returns whether or not the element is valid.<br>If invalid, this method will dispatch the `invalid` event.<br>https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/checkValidity
|
||||
`reportValidity` | _None_ | `boolean` | Checks the select's native validation and returns whether or not the element is valid.<br>If invalid, this method will dispatch the `invalid` event.<br>This method will display or clear an error text message equal to the select's `validationMessage`, unless the invalid event is canceled.<br>Use `setCustomValidity()` to customize the `validationMessage`.<br>This method can also be used to re-announce error messages to screen readers.
|
||||
`setCustomValidity` | `error` | `void` | Sets the select's native validation error message. This is used to customize `validationMessage`.<br>When the error is not an empty string, the select is considered invalid and `validity.customError` will be true.<br>https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/setCustomValidity
|
||||
`getUpdateComplete` | _None_ | `Promise<boolean>` |
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
#### Events
|
||||
|
||||
<!-- mdformat off(autogenerated might break rendering in catalog) -->
|
||||
|
||||
Event | Description
|
||||
--- | ---
|
||||
`input` | Fired when a selection is made by the user via mouse or keyboard interaction.
|
||||
`change` | Fired when a selection is made by the user via mouse or keyboard interaction.
|
||||
`opening` | Fired when the select's menu is about to open.
|
||||
`opened` | Fired when the select's menu has finished animations and opened.
|
||||
`closing` | Fired when the select's menu is about to close.
|
||||
`closed` | Fired when the select's menu has finished animations and closed.
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdOutlinedSelect <code><md-outlined-select></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
<!-- mdformat off(autogenerated might break rendering in catalog) -->
|
||||
|
||||
Property | Attribute | Type | Default | Description
|
||||
--- | --- | --- | --- | ---
|
||||
`quick` | `quick` | `boolean` | `false` | Opens the menu synchronously with no animation.
|
||||
`required` | `required` | `boolean` | `false` | Whether or not the select is required.
|
||||
`disabled` | `disabled` | `boolean` | `false` | Disables the select.
|
||||
`errorText` | `error-text` | `string` | `''` | The error message that replaces supporting text when `error` is true. If `errorText` is an empty string, then the supporting text will continue to show.<br>This error message overrides the error message displayed by `reportValidity()`.
|
||||
`label` | `label` | `string` | `''` | The floating label for the field.
|
||||
`supportingText` | `supporting-text` | `string` | `''` | Conveys additional information below the select, such as how it should be used.
|
||||
`error` | `error` | `boolean` | `false` | Gets or sets whether or not the select is in a visually invalid state.<br>This error state overrides the error state controlled by `reportValidity()`.
|
||||
`menuPositioning` | `menu-positioning` | `string` | `'absolute'` | Whether or not the underlying md-menu should be position: fixed to display in a top-level manner, or position: absolute.<br>position:fixed is useful for cases where select is inside of another element with stacking context and hidden overflows such as `md-dialog`.
|
||||
`typeaheadDelay` | `typeahead-delay` | `number` | `DEFAULT_TYPEAHEAD_BUFFER_TIME` | The max time between the keystrokes of the typeahead select / menu behavior before it clears the typeahead buffer.
|
||||
`hasLeadingIcon` | `has-leading-icon` | `boolean` | `false` | Whether or not the text field has a leading icon. Used for SSR.
|
||||
`displayText` | `display-text` | `string` | `''` | Text to display in the field. Only set for SSR.
|
||||
`value` | `value` | `string` | `undefined` |
|
||||
`selectedIndex` | `selected-index` | `number` | `undefined` |
|
||||
`options` | | `SelectOption[]` | `undefined` |
|
||||
`selectedOptions` | | `SelectOption[]` | `undefined` |
|
||||
`name` | | `string` | `undefined` |
|
||||
`form` | | `HTMLFormElement` | `undefined` |
|
||||
`labels` | | `NodeList` | `undefined` |
|
||||
`validity` | | `ValidityState` | `undefined` |
|
||||
`validationMessage` | | `string` | `undefined` |
|
||||
`willValidate` | | `boolean` | `undefined` |
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
#### Methods
|
||||
|
||||
<!-- mdformat off(autogenerated might break rendering in catalog) -->
|
||||
|
||||
Method | Parameters | Returns | Description
|
||||
--- | --- | --- | ---
|
||||
`select` | `value` | `void` | Selects an option given the value of the option, and updates MdSelect's value.
|
||||
`selectIndex` | `index` | `void` | Selects an option given the index of the option, and updates MdSelect's value.
|
||||
`reset` | _None_ | `void` | Reset the select to its default value.
|
||||
`checkValidity` | _None_ | `boolean` | Checks the select's native validation and returns whether or not the element is valid.<br>If invalid, this method will dispatch the `invalid` event.<br>https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/checkValidity
|
||||
`reportValidity` | _None_ | `boolean` | Checks the select's native validation and returns whether or not the element is valid.<br>If invalid, this method will dispatch the `invalid` event.<br>This method will display or clear an error text message equal to the select's `validationMessage`, unless the invalid event is canceled.<br>Use `setCustomValidity()` to customize the `validationMessage`.<br>This method can also be used to re-announce error messages to screen readers.
|
||||
`setCustomValidity` | `error` | `void` | Sets the select's native validation error message. This is used to customize `validationMessage`.<br>When the error is not an empty string, the select is considered invalid and `validity.customError` will be true.<br>https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/setCustomValidity
|
||||
`getUpdateComplete` | _None_ | `Promise<boolean>` |
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
#### Events
|
||||
|
||||
<!-- mdformat off(autogenerated might break rendering in catalog) -->
|
||||
|
||||
Event | Description
|
||||
--- | ---
|
||||
`input` | Fired when a selection is made by the user via mouse or keyboard interaction.
|
||||
`change` | Fired when a selection is made by the user via mouse or keyboard interaction.
|
||||
`opening` | Fired when the select's menu is about to open.
|
||||
`opened` | Fired when the select's menu has finished animations and opened.
|
||||
`closing` | Fired when the select's menu is about to close.
|
||||
`closed` | Fired when the select's menu has finished animations and closed.
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdSelectOption <code><md-select-option></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
<!-- mdformat off(autogenerated might break rendering in catalog) -->
|
||||
|
||||
Property | Attribute | Type | Default | Description
|
||||
--- | --- | --- | --- | ---
|
||||
`disabled` | `disabled` | `boolean` | `false` | Disables the item and makes it non-selectable and non-interactive.
|
||||
`selected` | `selected` | `boolean` | `false` | Sets the item in the selected visual state when a submenu is opened.
|
||||
`value` | `value` | `string` | `''` | Form value of the option.
|
||||
`type` | | `string` | `'option' as const` |
|
||||
`typeaheadText` | | `string` | `undefined` |
|
||||
`displayText` | | `string` | `undefined` |
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
#### Events
|
||||
|
||||
<!-- mdformat off(autogenerated might break rendering in catalog) -->
|
||||
|
||||
Event | Description
|
||||
--- | ---
|
||||
`close-menu` | Closes the encapsulating menu on
|
||||
`request-selection` | Requests the parent md-select to select this element (and deselect others if single-selection) when `selected` changed to `true`.
|
||||
`request-deselection` | Requests the parent md-select to deselect this element when `selected` changed to `false`.
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
<!-- auto-generated API docs end -->
|
||||
|
||||
@ -161,7 +161,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdSlider <md-slider>
|
||||
### MdSlider <code><md-slider></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -233,7 +233,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdSwitch <md-switch>
|
||||
### MdSwitch <code><md-switch></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -375,7 +375,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdTabs <md-tabs>
|
||||
### MdTabs <code><md-tabs></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -410,7 +410,7 @@ Event | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdPrimaryTab <md-primary-tab>
|
||||
### MdPrimaryTab <code><md-primary-tab></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -426,7 +426,7 @@ Property | Attribute | Type | Default | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdSecondaryTab <md-secondary-tab>
|
||||
### MdSecondaryTab <code><md-secondary-tab></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
@ -480,7 +480,7 @@ Token | Default value
|
||||
## API
|
||||
|
||||
|
||||
### MdFilledTextField <md-filled-text-field>
|
||||
### MdFilledTextField <code><md-filled-text-field></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
@ -544,7 +544,7 @@ Method | Parameters | Returns | Description
|
||||
|
||||
<!-- mdformat on(autogenerated might break rendering in catalog) -->
|
||||
|
||||
### MdOutlinedTextField <md-outlined-text-field>
|
||||
### MdOutlinedTextField <code><md-outlined-text-field></code>
|
||||
|
||||
#### Properties
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user