2022-07-11 17:48:53 +03:00
|
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2021 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2022-08-24 21:00:50 +03:00
|
|
|
|
import {customElement} from 'lit/decorators.js';
|
|
|
|
|
import {ClassInfo} from 'lit/directives/class-map.js';
|
2022-07-11 17:48:53 +03:00
|
|
|
|
|
2022-08-24 21:00:50 +03:00
|
|
|
|
import {IconButtonToggle} from './lib/icon-button-toggle.js';
|
2022-11-04 19:17:11 +03:00
|
|
|
|
import {styles as sharedStyles} from './lib/shared-styles.css.js';
|
2022-08-24 21:00:50 +03:00
|
|
|
|
import {styles} from './lib/standard-styles.css.js';
|
2022-07-11 17:48:53 +03:00
|
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
|
interface HTMLElementTagNameMap {
|
|
|
|
|
'md-standard-icon-button-toggle': MdStandardIconButtonToggle;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-15 01:18:03 +03:00
|
|
|
|
/**
|
|
|
|
|
* @summary Icon buttons help people take supplementary actions with a single
|
|
|
|
|
* tap. This variant can toggle between icons.
|
|
|
|
|
*
|
|
|
|
|
* @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
|
|
|
|
|
*/
|
2022-07-11 17:48:53 +03:00
|
|
|
|
@customElement('md-standard-icon-button-toggle')
|
|
|
|
|
export class MdStandardIconButtonToggle extends IconButtonToggle {
|
|
|
|
|
static override styles = [sharedStyles, styles];
|
|
|
|
|
|
|
|
|
|
protected override getRenderClasses(): ClassInfo {
|
|
|
|
|
return {
|
|
|
|
|
...super.getRenderClasses(),
|
|
|
|
|
'md3-icon-button--standard': true,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|