Skip to content

Commit

Permalink
chore: use CSSResultOrNative instead of CSSResult for static styles
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 609760445
  • Loading branch information
asyncLiz authored and copybara-github committed Feb 23, 2024
1 parent 2613de4 commit ec0a8eb
Show file tree
Hide file tree
Showing 54 changed files with 111 additions and 111 deletions.
4 changes: 2 additions & 2 deletions button/elevated-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {ElevatedButton} from './internal/elevated-button.js';
Expand Down Expand Up @@ -42,7 +42,7 @@ declare global {
*/
@customElement('md-elevated-button')
export class MdElevatedButton extends ElevatedButton {
static override styles: CSSResult[] = [
static override styles: CSSResultOrNative[] = [
sharedStyles,
sharedElevationStyles,
elevatedStyles,
Expand Down
4 changes: 2 additions & 2 deletions button/filled-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {FilledButton} from './internal/filled-button.js';
Expand Down Expand Up @@ -40,7 +40,7 @@ declare global {
*/
@customElement('md-filled-button')
export class MdFilledButton extends FilledButton {
static override styles: CSSResult[] = [
static override styles: CSSResultOrNative[] = [
sharedStyles,
sharedElevationStyles,
filledStyles,
Expand Down
4 changes: 2 additions & 2 deletions button/filled-tonal-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {FilledTonalButton} from './internal/filled-tonal-button.js';
Expand Down Expand Up @@ -41,7 +41,7 @@ declare global {
*/
@customElement('md-filled-tonal-button')
export class MdFilledTonalButton extends FilledTonalButton {
static override styles: CSSResult[] = [
static override styles: CSSResultOrNative[] = [
sharedStyles,
sharedElevationStyles,
tonalStyles,
Expand Down
4 changes: 2 additions & 2 deletions button/outlined-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {OutlinedButton} from './internal/outlined-button.js';
Expand Down Expand Up @@ -41,5 +41,5 @@ declare global {
*/
@customElement('md-outlined-button')
export class MdOutlinedButton extends OutlinedButton {
static override styles: CSSResult[] = [sharedStyles, outlinedStyles];
static override styles: CSSResultOrNative[] = [sharedStyles, outlinedStyles];
}
4 changes: 2 additions & 2 deletions button/text-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {styles as sharedStyles} from './internal/shared-styles.css.js';
Expand Down Expand Up @@ -39,5 +39,5 @@ declare global {
*/
@customElement('md-text-button')
export class MdTextButton extends TextButton {
static override styles: CSSResult[] = [sharedStyles, textStyles];
static override styles: CSSResultOrNative[] = [sharedStyles, textStyles];
}
4 changes: 2 additions & 2 deletions checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {Checkbox} from './internal/checkbox.js';
Expand All @@ -31,5 +31,5 @@ declare global {
*/
@customElement('md-checkbox')
export class MdCheckbox extends Checkbox {
static override styles: CSSResult[] = [styles];
static override styles: CSSResultOrNative[] = [styles];
}
4 changes: 2 additions & 2 deletions chips/assist-chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {AssistChip} from './internal/assist-chip.js';
Expand All @@ -26,5 +26,5 @@ declare global {
*/
@customElement('md-assist-chip')
export class MdAssistChip extends AssistChip {
static override styles: CSSResult[] = [sharedStyles, elevatedStyles, styles];
static override styles: CSSResultOrNative[] = [sharedStyles, elevatedStyles, styles];
}
4 changes: 2 additions & 2 deletions chips/chip-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {ChipSet} from './internal/chip-set.js';
Expand All @@ -24,5 +24,5 @@ declare global {
*/
@customElement('md-chip-set')
export class MdChipSet extends ChipSet {
static override styles: CSSResult[] = [styles];
static override styles: CSSResultOrNative[] = [styles];
}
4 changes: 2 additions & 2 deletions chips/filter-chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {styles as elevatedStyles} from './internal/elevated-styles.css.js';
Expand All @@ -28,7 +28,7 @@ declare global {
*/
@customElement('md-filter-chip')
export class MdFilterChip extends FilterChip {
static override styles: CSSResult[] = [
static override styles: CSSResultOrNative[] = [
sharedStyles,
elevatedStyles,
trailingIconStyles,
Expand Down
4 changes: 2 additions & 2 deletions chips/input-chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {InputChip} from './internal/input-chip.js';
Expand All @@ -27,7 +27,7 @@ declare global {
*/
@customElement('md-input-chip')
export class MdInputChip extends InputChip {
static override styles: CSSResult[] = [
static override styles: CSSResultOrNative[] = [
sharedStyles,
trailingIconStyles,
selectableStyles,
Expand Down
4 changes: 2 additions & 2 deletions chips/suggestion-chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {styles as elevatedStyles} from './internal/elevated-styles.css.js';
Expand All @@ -26,5 +26,5 @@ declare global {
*/
@customElement('md-suggestion-chip')
export class MdSuggestionChip extends SuggestionChip {
static override styles: CSSResult[] = [sharedStyles, elevatedStyles, styles];
static override styles: CSSResultOrNative[] = [sharedStyles, elevatedStyles, styles];
}
4 changes: 2 additions & 2 deletions dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {Dialog} from './internal/dialog.js';
Expand Down Expand Up @@ -45,5 +45,5 @@ declare global {
*/
@customElement('md-dialog')
export class MdDialog extends Dialog {
static override styles: CSSResult[] = [styles];
static override styles: CSSResultOrNative[] = [styles];
}
4 changes: 2 additions & 2 deletions divider/divider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {Divider} from './internal/divider.js';
Expand All @@ -28,5 +28,5 @@ declare global {
*/
@customElement('md-divider')
export class MdDivider extends Divider {
static override styles: CSSResult[] = [styles];
static override styles: CSSResultOrNative[] = [styles];
}
4 changes: 2 additions & 2 deletions elevation/elevation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {Elevation} from './internal/elevation.js';
Expand All @@ -26,5 +26,5 @@ declare global {
*/
@customElement('md-elevation')
export class MdElevation extends Elevation {
static override styles: CSSResult[] = [styles];
static override styles: CSSResultOrNative[] = [styles];
}
4 changes: 2 additions & 2 deletions fab/branded-fab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {Fab, FabVariant} from './internal/fab.js';
Expand Down Expand Up @@ -64,5 +64,5 @@ export class MdBrandedFab extends Fab {
'small': false,
};
}
static override styles: CSSResult[] = [sharedStyles, styles, forcedColors];
static override styles: CSSResultOrNative[] = [sharedStyles, styles, forcedColors];
}
4 changes: 2 additions & 2 deletions fab/fab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {Fab} from './internal/fab.js';
Expand Down Expand Up @@ -50,5 +50,5 @@ declare global {
*/
@customElement('md-fab')
export class MdFab extends Fab {
static override styles: CSSResult[] = [sharedStyles, styles, forcedColors];
static override styles: CSSResultOrNative[] = [sharedStyles, styles, forcedColors];
}
4 changes: 2 additions & 2 deletions field/filled-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {FilledField} from './internal/filled-field.js';
Expand All @@ -24,5 +24,5 @@ declare global {
*/
@customElement('md-filled-field')
export class MdFilledField extends FilledField {
static override styles: CSSResult[] = [sharedStyles, filledStyles];
static override styles: CSSResultOrNative[] = [sharedStyles, filledStyles];
}
4 changes: 2 additions & 2 deletions field/outlined-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {OutlinedField} from './internal/outlined-field.js';
Expand All @@ -24,5 +24,5 @@ declare global {
*/
@customElement('md-outlined-field')
export class MdOutlinedField extends OutlinedField {
static override styles: CSSResult[] = [sharedStyles, outlinedStyles];
static override styles: CSSResultOrNative[] = [sharedStyles, outlinedStyles];
}
4 changes: 2 additions & 2 deletions focus/md-focus-ring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {FocusRing} from './internal/focus-ring.js';
Expand All @@ -24,5 +24,5 @@ declare global {
*/
@customElement('md-focus-ring')
export class MdFocusRing extends FocusRing {
static override styles: CSSResult[] = [styles];
static override styles: CSSResultOrNative[] = [styles];
}
4 changes: 2 additions & 2 deletions icon/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {Icon} from './internal/icon.js';
Expand All @@ -23,5 +23,5 @@ declare global {
@customElement('md-icon')
export class MdIcon extends Icon {
/** @nocollapse */
static override styles: CSSResult[] = [styles];
static override styles: CSSResultOrNative[] = [styles];
}
4 changes: 2 additions & 2 deletions iconbutton/filled-icon-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {styles} from './internal/filled-styles.css.js';
Expand Down Expand Up @@ -37,7 +37,7 @@ declare global {
*/
@customElement('md-filled-icon-button')
export class MdFilledIconButton extends IconButton {
static override styles: CSSResult[] = [sharedStyles, styles];
static override styles: CSSResultOrNative[] = [sharedStyles, styles];

protected override getRenderClasses() {
return {
Expand Down
4 changes: 2 additions & 2 deletions iconbutton/filled-tonal-icon-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {styles} from './internal/filled-tonal-styles.css.js';
Expand Down Expand Up @@ -37,7 +37,7 @@ declare global {
*/
@customElement('md-filled-tonal-icon-button')
export class MdFilledTonalIconButton extends IconButton {
static override styles: CSSResult[] = [sharedStyles, styles];
static override styles: CSSResultOrNative[] = [sharedStyles, styles];

protected override getRenderClasses() {
return {
Expand Down
4 changes: 2 additions & 2 deletions iconbutton/icon-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {CSSResult} from 'lit';
import {CSSResultOrNative} from 'lit';
import {customElement} from 'lit/decorators.js';

import {IconButton} from './internal/icon-button.js';
Expand Down Expand Up @@ -37,7 +37,7 @@ declare global {
*/
@customElement('md-icon-button')
export class MdIconButton extends IconButton {
static override styles: CSSResult[] = [sharedStyles, styles];
static override styles: CSSResultOrNative[] = [sharedStyles, styles];

protected override getRenderClasses() {
return {
Expand Down
Loading

0 comments on commit ec0a8eb

Please sign in to comment.