Skip to content

Commit

Permalink
fix: add js extension for lit tooling (#3401)
Browse files Browse the repository at this point in the history
FUTURE_COPYBARA_INTEGRATE_REVIEW=#3393 from material-components:release-0.26 1fedae4
PiperOrigin-RevId: 446764286
  • Loading branch information
asyncLiz committed May 6, 2022
1 parent 4284c9e commit d99e305
Show file tree
Hide file tree
Showing 347 changed files with 5,822 additions and 1,529 deletions.
10 changes: 5 additions & 5 deletions components/action-element/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ from `endPress()` have a `detail` object, it should be included in the call to
### Example

```ts
import {ActionElement, BeginPressConfig, EndPressConfig} from '../action-element/action-element';
import {ActionElement, BeginPressConfig, EndPressConfig} from '../action-element/action-element.js';

import {html} from 'lit';
import {property} from 'lit/decorators';
import {property} from 'lit/decorators.js';

export class MyElement extends ActionElement {
@property({type: Boolean}) disabled = false;
Expand Down Expand Up @@ -81,11 +81,11 @@ export class MyElement extends ActionElement {
### Example with ripple

```ts
import {ActionElement, BeginPressConfig, EndPressConfig} from '../action-element/action-element';
import {MdRipple} from '../ripple/ripple';
import {ActionElement, BeginPressConfig, EndPressConfig} from '../action-element/action-element.js';
import {MdRipple} from '../ripple/ripple.js';

import {html} from 'lit';
import {property, query} from 'lit/decorators';
import {property, query} from 'lit/decorators.js';


export class MyElementWithRipple extends ActionElement {
Expand Down
2 changes: 1 addition & 1 deletion components/action-element/action-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import {LitElement} from 'lit';

import {ActionController, ActionControllerHost, BeginPressConfig, EndPressConfig} from '../controller/action-controller';
import {ActionController, ActionControllerHost, BeginPressConfig, EndPressConfig} from '../controller/action-controller.js';

export {BeginPressConfig, EndPressConfig};

Expand Down
6 changes: 3 additions & 3 deletions components/action-element/test/action-element_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import 'jasmine';

import {html} from 'lit';
import {customElement, property} from 'lit/decorators';
import {customElement, property} from 'lit/decorators.js';

import {Environment} from '../../testing/environment';
import {ActionElement} from '../action-element';
import {Environment} from '../../testing/environment.js';
import {ActionElement} from '../action-element.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down
6 changes: 3 additions & 3 deletions components/badge/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

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

import {Badge} from './lib/badge';
import {styles} from './lib/badge-styles.css';
import {Badge} from './lib/badge.js';
import {styles} from './lib/badge-styles.css.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down
4 changes: 2 additions & 2 deletions components/badge/lib/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

import {html, LitElement, TemplateResult} from 'lit';
import {property} from 'lit/decorators';
import {ClassInfo, classMap} from 'lit/directives/class-map';
import {property} from 'lit/decorators.js';
import {ClassInfo, classMap} from 'lit/directives/class-map.js';

/** @soyCompatible */
export class Badge extends LitElement {
Expand Down
10 changes: 5 additions & 5 deletions components/button/elevated-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* SPDX-License-Identifier: Apache-2.0
*/

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

import {styles as elevationOverlayStyles} from '../elevation/lib/elevation-overlay-styles.css';
import {styles as elevationOverlayStyles} from '../elevation/lib/elevation-overlay-styles.css.js';

import {ElevatedButton} from './lib/elevated-button';
import {styles as elevatedStyles} from './lib/elevated-styles.css';
import {styles as sharedStyles} from './lib/shared-styles.css';
import {ElevatedButton} from './lib/elevated-button.js';
import {styles as elevatedStyles} from './lib/elevated-styles.css.js';
import {styles as sharedStyles} from './lib/shared-styles.css.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down
10 changes: 5 additions & 5 deletions components/button/elevated-link-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* SPDX-License-Identifier: Apache-2.0
*/

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

import {styles as elevationOverlayStyles} from '../elevation/lib/elevation-overlay-styles.css';
import {styles as elevationOverlayStyles} from '../elevation/lib/elevation-overlay-styles.css.js';

import {ElevatedLinkButton} from './lib/elevated-link-button';
import {styles as elevatedStyles} from './lib/elevated-styles.css';
import {styles as sharedStyles} from './lib/shared-styles.css';
import {ElevatedLinkButton} from './lib/elevated-link-button.js';
import {styles as elevatedStyles} from './lib/elevated-styles.css.js';
import {styles as sharedStyles} from './lib/shared-styles.css.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down
8 changes: 4 additions & 4 deletions components/button/filled-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

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

import {FilledButton} from './lib/filled-button';
import {styles as filledStyles} from './lib/filled-styles.css';
import {styles as sharedStyles} from './lib/shared-styles.css';
import {FilledButton} from './lib/filled-button.js';
import {styles as filledStyles} from './lib/filled-styles.css.js';
import {styles as sharedStyles} from './lib/shared-styles.css.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down
8 changes: 4 additions & 4 deletions components/button/filled-link-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

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

import {FilledLinkButton} from './lib/filled-link-button';
import {styles as filledStyles} from './lib/filled-styles.css';
import {styles as sharedStyles} from './lib/shared-styles.css';
import {FilledLinkButton} from './lib/filled-link-button.js';
import {styles as filledStyles} from './lib/filled-styles.css.js';
import {styles as sharedStyles} from './lib/shared-styles.css.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down
4 changes: 2 additions & 2 deletions components/button/harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {Harness} from '../testing/harness';
import {Harness} from '../testing/harness.js';

import {Button} from './lib/button';
import {Button} from './lib/button.js';

/**
* Test harness for buttons.
Expand Down
2 changes: 1 addition & 1 deletion components/button/lib/_button-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// TODO(b/228217731): Remove MDC/MWC dependencies
@use 'sass:map';
@use 'third_party/javascript/material_web_components/m3/ripple/ripple-theme';
@use '@material/theme/state';
@use '../../compat/theme/state';
@use '@material/typography/typography';

$light-theme: (
Expand Down
2 changes: 1 addition & 1 deletion components/button/lib/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// TODO(b/228217731): Remove MDC/MWC dependencies
@use '@material/touch-target/touch-target';
@use '@material/theme/selector-ext';
@use '../../compat/theme/selector-ext';
@use '../../elevation/lib/surface' as elevation-surface;

@mixin static-styles() {
Expand Down
2 changes: 1 addition & 1 deletion components/button/lib/_elevation-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@use 'sass:map';
@use 'sass:meta';
@use 'third_party/javascript/material_web_components/m3/ripple/ripple-theme';
@use '@material/theme/state';
@use '../../compat/theme/state';
@use '../../elevation/lib/elevation-theme';
@use './button-theme';

Expand Down
2 changes: 1 addition & 1 deletion components/button/lib/_icon-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// TODO(b/228217731): Remove MDC/MWC dependencies
@use 'sass:map';
@use 'third_party/javascript/material_web_components/m3/ripple/ripple-theme';
@use '@material/theme/state';
@use '../../compat/theme/state';
@use './button-theme';

$_selectors: button-theme.$selectors;
Expand Down
2 changes: 1 addition & 1 deletion components/button/lib/_outlined-button-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// TODO(b/228217731): Remove MDC/MWC dependencies
@use 'sass:map';
@use '@material/shape/shape';
@use '@material/theme/state';
@use '../../compat/theme/state';
@use '../../sass/resolvers';
@use '../../sass/theme';
@use './button-theme';
Expand Down
22 changes: 11 additions & 11 deletions components/button/lib/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
* SPDX-License-Identifier: Apache-2.0
*/

import '@material/mwc-icon/mwc-icon';
import '../../focus/focus-ring';
import '../../ripple/ripple';
import '@material/mwc-icon/mwc-icon.js';
import '../../focus/focus-ring.js';
import '../../ripple/ripple.js';

import {html, LitElement, TemplateResult} from 'lit';
import {eventOptions, property, query, queryAssignedElements, state} from 'lit/decorators';
import {ClassInfo, classMap} from 'lit/directives/class-map';
import {ifDefined} from 'lit/directives/if-defined';
import {eventOptions, property, query, queryAssignedElements, state} from 'lit/decorators.js';
import {ClassInfo, classMap} from 'lit/directives/class-map.js';
import {ifDefined} from 'lit/directives/if-defined.js';

import {ariaProperty} from '../../decorators/aria-property';
import {pointerPress, shouldShowStrongFocus} from '../../focus/strong-focus';
import {MdRipple} from '../../ripple/ripple';
import {ARIAHasPopup} from '../../types/aria';
import {ariaProperty} from '../../decorators/aria-property.js';
import {pointerPress, shouldShowStrongFocus} from '../../focus/strong-focus.js';
import {MdRipple} from '../../ripple/ripple.js';
import {ARIAHasPopup} from '../../types/aria.js';

import {ButtonState} from './state';
import {ButtonState} from './state.js';

/** @soyCompatible */
export abstract class Button extends LitElement implements ButtonState {
Expand Down
4 changes: 2 additions & 2 deletions components/button/lib/elevated-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

import {html, TemplateResult} from 'lit';
import {ClassInfo} from 'lit/directives/class-map';
import {ClassInfo} from 'lit/directives/class-map.js';

import {Button} from './button';
import {Button} from './button.js';

/** @soyCompatible */
export class ElevatedButton extends Button {
Expand Down
4 changes: 2 additions & 2 deletions components/button/lib/elevated-link-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

import {html, TemplateResult} from 'lit';
import {ClassInfo} from 'lit/directives/class-map';
import {ClassInfo} from 'lit/directives/class-map.js';

import {LinkButton} from './link-button';
import {LinkButton} from './link-button.js';

/** @soyCompatible */
export class ElevatedLinkButton extends LinkButton {
Expand Down
4 changes: 2 additions & 2 deletions components/button/lib/filled-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {ClassInfo} from 'lit/directives/class-map';
import {ClassInfo} from 'lit/directives/class-map.js';

import {Button} from './button';
import {Button} from './button.js';

/** @soyCompatible */
export class FilledButton extends Button {
Expand Down
4 changes: 2 additions & 2 deletions components/button/lib/filled-link-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {ClassInfo} from 'lit/directives/class-map';
import {ClassInfo} from 'lit/directives/class-map.js';

import {LinkButton} from './link-button';
import {LinkButton} from './link-button.js';

/** @soyCompatible */
export class FilledLinkButton extends LinkButton {
Expand Down
8 changes: 4 additions & 4 deletions components/button/lib/link-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*/

import {html, TemplateResult} from 'lit';
import {property} from 'lit/decorators';
import {classMap} from 'lit/directives/class-map';
import {ifDefined} from 'lit/directives/if-defined';
import {property} from 'lit/decorators.js';
import {classMap} from 'lit/directives/class-map.js';
import {ifDefined} from 'lit/directives/if-defined.js';

import {Button} from './button';
import {Button} from './button.js';

type LinkTarget = '_blank'|'_parent'|'_self'|'_top';

Expand Down
4 changes: 2 additions & 2 deletions components/button/lib/outlined-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

import {html, TemplateResult} from 'lit';
import {ClassInfo} from 'lit/directives/class-map';
import {ClassInfo} from 'lit/directives/class-map.js';

import {Button} from './button';
import {Button} from './button.js';

/** @soyCompatible */
export class OutlinedButton extends Button {
Expand Down
4 changes: 2 additions & 2 deletions components/button/lib/outlined-link-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

import {html, TemplateResult} from 'lit';
import {ClassInfo} from 'lit/directives/class-map';
import {ClassInfo} from 'lit/directives/class-map.js';

import {LinkButton} from './link-button';
import {LinkButton} from './link-button.js';

/** @soyCompatible */
export class OutlinedLinkButton extends LinkButton {
Expand Down
4 changes: 2 additions & 2 deletions components/button/lib/text-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {ClassInfo} from 'lit/directives/class-map';
import {ClassInfo} from 'lit/directives/class-map.js';

import {Button} from './button';
import {Button} from './button.js';

/** @soyCompatible */
export class TextButton extends Button {
Expand Down
4 changes: 2 additions & 2 deletions components/button/lib/text-link-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {ClassInfo} from 'lit/directives/class-map';
import {ClassInfo} from 'lit/directives/class-map.js';

import {LinkButton} from './link-button';
import {LinkButton} from './link-button.js';

/** @soyCompatible */
export class TextLinkButton extends LinkButton {
Expand Down
4 changes: 2 additions & 2 deletions components/button/lib/tonal-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {ClassInfo} from 'lit/directives/class-map';
import {ClassInfo} from 'lit/directives/class-map.js';

import {Button} from './button';
import {Button} from './button.js';

/** @soyCompatible */
export class TonalButton extends Button {
Expand Down
4 changes: 2 additions & 2 deletions components/button/lib/tonal-link-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {ClassInfo} from 'lit/directives/class-map';
import {ClassInfo} from 'lit/directives/class-map.js';

import {LinkButton} from './link-button';
import {LinkButton} from './link-button.js';

/** @soyCompatible */
export class TonalLinkButton extends LinkButton {
Expand Down
8 changes: 4 additions & 4 deletions components/button/outlined-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

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

import {OutlinedButton} from './lib/outlined-button';
import {styles as outlinedStyles} from './lib/outlined-styles.css';
import {styles as sharedStyles} from './lib/shared-styles.css';
import {OutlinedButton} from './lib/outlined-button.js';
import {styles as outlinedStyles} from './lib/outlined-styles.css.js';
import {styles as sharedStyles} from './lib/shared-styles.css.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down

0 comments on commit d99e305

Please sign in to comment.