diff --git a/card/lib/_card.scss b/card/lib/_card.scss index cd07f28..20b6d83 100644 --- a/card/lib/_card.scss +++ b/card/lib/_card.scss @@ -1,7 +1,7 @@ @use 'sass:map'; @use '@material/web/elevation/lib/elevation'; -@use '@material/web/sass/theme'; +@use '@material/web/internal/sass/theme'; @use '@material/web/tokens'; @use "@material/elevation" as oldelevation; diff --git a/card/lib/card.ts b/card/lib/card.ts index df58f2b..e4093f9 100644 --- a/card/lib/card.ts +++ b/card/lib/card.ts @@ -1,12 +1,10 @@ import '@material/web/ripple/ripple.js'; import '@material/web/focus/focus-ring.js'; -import {html, LitElement, nothing, PropertyValues, TemplateResult} from 'lit'; -import {queryAssignedElements, queryAsync, state} from 'lit/decorators.js'; +import {html, LitElement, PropertyValues, TemplateResult} from 'lit'; +import {queryAssignedElements} from 'lit/decorators.js'; import {ClassInfo, classMap} from 'lit/directives/class-map.js'; -import {MdRipple} from '@material/web/ripple/ripple.js'; import {property} from 'lit/decorators/property.js'; -import {ripple} from '@material/web/ripple/directive.js'; export abstract class Card extends LitElement { /** Allows the card to be clickable with a ripple effect. */ @@ -24,24 +22,11 @@ export abstract class Card extends LitElement { */ @queryAssignedElements({slot: 'icon'}) protected icons!: HTMLElement[]; - /** - * @internal - * @protected - */ - @queryAsync('md-ripple') protected ripple!: Promise; - - /** - * @internal - * @protected - */ - @state() protected showRipple = false; - override render() { return html`
${this.renderPrimaryAction()} ${this.renderActions()} - ${this.renderRipple()}
`; } @@ -84,22 +69,13 @@ export abstract class Card extends LitElement { super.update(_changedProperties); } - /** - * @internal - * @protected - */ - protected getRipple = () => { - this.showRipple = true; - return this.ripple; - }; - protected renderPrimaryAction() { return html`
+ aria-label="${this.ariaLabel}"> + ${this.renderRipple()} ${this.renderFocusRing()}
`; @@ -136,8 +112,7 @@ export abstract class Card extends LitElement { } protected renderRipple() { - return this.showRipple ? html` - ` : nothing; + return html``; } protected wrapButtonSlot(buttonSlotTemplate: TemplateResult | string) { @@ -167,7 +142,7 @@ export abstract class Card extends LitElement { if (this.icons.length > 0 || this.buttons.length > 0) { return html`
+ ${this.renderRipple()}> ${this.wrapButtonSlot(buttonSlotTemplate)} ${this.wrapIconSlot(iconSlotTemplate)}
`; diff --git a/data-table/lib/_data-table.scss b/data-table/lib/_data-table.scss index a7b6e5a..3879ce6 100644 --- a/data-table/lib/_data-table.scss +++ b/data-table/lib/_data-table.scss @@ -1,7 +1,7 @@ @use 'sass:map'; @use "@material/data-table/data-table"; -@use '@material/web/sass/theme'; +@use '@material/web/internal/sass/theme'; @use '@material/web/tokens'; @use "@material/web/elevation/elevation"; @use "@material/elevation" as oldelevation;