2022-07-11 17:48:53 +03:00
|
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2022 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-11 17:48:53 +03:00
|
|
|
|
|
2023-07-24 19:09:37 +03:00
|
|
|
|
import {IconButton} from './internal/icon-button.js';
|
2024-02-29 03:19:39 +03:00
|
|
|
|
import {styles} from './internal/outlined-styles.js';
|
|
|
|
|
import {styles as sharedStyles} from './internal/shared-styles.js';
|
2022-07-11 17:48:53 +03:00
|
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
|
interface HTMLElementTagNameMap {
|
|
|
|
|
'md-outlined-icon-button': MdOutlinedIconButton;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-15 01:18:03 +03:00
|
|
|
|
/**
|
|
|
|
|
* @summary Icon buttons help people take supplementary actions with a single
|
|
|
|
|
* tap.
|
|
|
|
|
*
|
|
|
|
|
* @description
|
|
|
|
|
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
|
|
|
* least amount of prominence.
|
|
|
|
|
*
|
|
|
|
|
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
|
|
|
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
|
|
|
*
|
|
|
|
|
* __Example usages:__
|
|
|
|
|
* - Add to Favorites
|
|
|
|
|
* - Print
|
2024-02-23 01:14:27 +03:00
|
|
|
|
*
|
|
|
|
|
* @final
|
|
|
|
|
* @suppress {visibility}
|
2022-12-15 01:18:03 +03:00
|
|
|
|
*/
|
2022-07-11 17:48:53 +03:00
|
|
|
|
@customElement('md-outlined-icon-button')
|
|
|
|
|
export class MdOutlinedIconButton extends IconButton {
|
2024-02-23 21:01:21 +03:00
|
|
|
|
static override styles: CSSResultOrNative[] = [sharedStyles, styles];
|
2022-07-11 17:48:53 +03:00
|
|
|
|
|
2023-04-25 20:40:12 +03:00
|
|
|
|
protected override getRenderClasses() {
|
2022-07-11 17:48:53 +03:00
|
|
|
|
return {
|
|
|
|
|
...super.getRenderClasses(),
|
2023-05-09 08:47:45 +03:00
|
|
|
|
'outlined': true,
|
2022-07-11 17:48:53 +03:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|