material-web/fab/branded-fab.ts
Andrew Jakubowicz 5618b5e23f fix(fab)!: rename "lib" directory to "internal"
BREAKING CHANGE: Rename `@material/web/fab/lib` to `@material/web/fab/internal`. Prefer not using internal files.

PiperOrigin-RevId: 550038346
2023-07-21 13:40:22 -07:00

68 lines
1.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {customElement} from 'lit/decorators.js';
import {Fab, FabVariant} from './internal/fab.js';
import {styles} from './internal/fab-branded-styles.css.js';
import {styles as forcedColors} from './internal/forced-colors-styles.css.js';
import {styles as sharedStyles} from './internal/shared-styles.css.js';
export {FabSize} from './internal/shared.js';
declare global {
interface HTMLElementTagNameMap {
'md-branded-fab': MdBrandedFab;
}
}
/**
* @summary Floating action buttons (FABs) help people take primary actions.
* Theyre used to represent the most important action on a screen, such as
* Create or Reply.
*
* @description
* __Emphasis:__ High emphasis For the primary, most important, or most common
* action on a screen
*
* __Rationale:__ The FAB remains the default component for a screens primary
* action. It comes in three sizes: small FAB, FAB, and large FAB. The extended
* FABs wider format and text label give it more visual prominence than a FAB.
* Its often used on larger screens where a FAB would seem too small. Branded
* FABs are used to specifically call attention to branded logo icons.
*
* __Example usages:__
* - FAB
* - Create
* - Compose
* - Extended FAB
* - Create
* - Compose
* - New Thread
* - New File
*
* @final
* @suppress {visibility}
*/
@customElement('md-branded-fab')
export class MdBrandedFab extends Fab {
/**
* Branded FABs have no variants
*/
override variant!: FabVariant;
override getRenderClasses() {
return {
...super.getRenderClasses(),
'primary': false,
'secondary': false,
'tertiary': false,
'small': false,
};
}
static override styles = [sharedStyles, styles, forcedColors];
}