2022-07-21 23:47:00 +03:00
|
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2021 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2024-02-23 21:01:21 +03:00
|
|
|
|
import {CSSResultOrNative} from 'lit';
|
2022-08-24 21:00:50 +03:00
|
|
|
|
import {customElement} from 'lit/decorators.js';
|
2022-07-21 23:47:00 +03:00
|
|
|
|
|
2023-08-01 00:56:57 +03:00
|
|
|
|
import {FilledTonalButton} from './internal/filled-tonal-button.js';
|
2024-02-29 03:19:39 +03:00
|
|
|
|
import {styles as tonalStyles} from './internal/filled-tonal-styles.js';
|
|
|
|
|
import {styles as sharedElevationStyles} from './internal/shared-elevation-styles.js';
|
|
|
|
|
import {styles as sharedStyles} from './internal/shared-styles.js';
|
2022-07-21 23:47:00 +03:00
|
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
|
interface HTMLElementTagNameMap {
|
2023-08-01 00:56:57 +03:00
|
|
|
|
'md-filled-tonal-button': MdFilledTonalButton;
|
2022-07-21 23:47:00 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2022-12-14 03:43:56 +03:00
|
|
|
|
* @summary Buttons help people take action, such as sending an email, sharing a
|
|
|
|
|
* document, or liking a comment.
|
|
|
|
|
*
|
|
|
|
|
* @description
|
|
|
|
|
* __Emphasis:__ Medium emphasis – For important actions that don’t distract
|
|
|
|
|
* from other onscreen elements.
|
|
|
|
|
*
|
|
|
|
|
* __Rationale:__ Filled tonal buttons have a lighter background color and
|
|
|
|
|
* darker label color, making them less visually prominent than a regular,
|
|
|
|
|
* filled button. They’re still used for final or unblocking actions in a flow,
|
|
|
|
|
* but do so with less emphasis.
|
|
|
|
|
*
|
|
|
|
|
* __Example usages:__
|
|
|
|
|
* - Save
|
|
|
|
|
* - Confirm
|
|
|
|
|
* - Done
|
|
|
|
|
*
|
2022-07-21 23:47:00 +03:00
|
|
|
|
* @final
|
|
|
|
|
* @suppress {visibility}
|
|
|
|
|
*/
|
2023-08-01 00:56:57 +03:00
|
|
|
|
@customElement('md-filled-tonal-button')
|
|
|
|
|
export class MdFilledTonalButton extends FilledTonalButton {
|
2024-02-23 21:01:21 +03:00
|
|
|
|
static override styles: CSSResultOrNative[] = [
|
2024-02-23 01:14:27 +03:00
|
|
|
|
sharedStyles,
|
|
|
|
|
sharedElevationStyles,
|
|
|
|
|
tonalStyles,
|
|
|
|
|
];
|
2022-07-21 23:47:00 +03:00
|
|
|
|
}
|