Skip to content

Commit 0818f55

Browse files
committed
Migrate lit-element and lit-html to new lit package
Internal usage of lit-element causes deprecation warnings for downstream users. This migrates uses to the new "lit" package.
1 parent 4181724 commit 0818f55

File tree

30 files changed

+45
-45
lines changed

30 files changed

+45
-45
lines changed

demos/card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<script type="module">
4949
import {style as cardStyle} from '../node_modules/@material/mwc-card/mwc-card-css.js';
5050
import {style as typographyStyle} from '../node_modules/@material/mwc-typography/mwc-typography-css.js';
51-
import {LitElement, html} from '../node_modules/lit-element/lit-element.js';
51+
import {LitElement, html} from '../node_modules/lit/index.js';
5252
import '../node_modules/@material/mwc-button/mwc-button.js';
5353
import '../node_modules/@material/mwc-icon/mwc-icon.js';
5454
import '../node_modules/@material/mwc-icon-toggle/mwc-icon-toggle.js';

demos/elevation-overlay/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ See the License for the specific language governing permissions and
1515
limitations under the License.
1616
*/
1717
import {style as elevationStyle} from '@material/mwc-elevation-overlay/mwc-elevation-overlay-css';
18-
import {LitElement, css, html} from 'lit-element';
19-
import {styleMap} from 'lit-html/directives/style-map';
18+
import {LitElement, css, html} from 'lit';
19+
import {styleMap} from 'lit/directives/style-map.js';
2020

2121
import '../shared/demo-header';
2222

demos/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
*/
17-
import {LitElement, html, css} from 'lit-element/lit-element.js';
17+
import {LitElement, html, css} from 'lit';
1818
import '@material/mwc-list';
1919
import '@material/mwc-list/mwc-list-item';
2020

demos/shared/demo-header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
*/
17-
import {LitElement, html, css} from 'lit-element/lit-element.js';
17+
import {LitElement, html, css} from 'lit';
1818
import '@material/mwc-top-app-bar-fixed';
1919
import '@material/mwc-icon-button';
2020
import '@material/mwc-button';

packages/base/aria-property.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function tsDecorator(
3535
(prototype.constructor as unknown as ReactiveElementInternals);
3636
if (!descriptor) {
3737
/**
38-
* lit-element uses internal properties with two leading underscores to
38+
* lit uses internal properties with two leading underscores to
3939
* provide storage for accessors
4040
*/
4141
const litInternalPropertyKey = `__${name}`;

packages/radio/mwc-radio-base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export class RadioBase extends FormElement {
165165
super.connectedCallback();
166166
// Note that we must defer creating the selection controller until the
167167
// element has connected, because selection controllers are keyed by the
168-
// radio's shadow root. For example, if we're stamping in a lit-html map
168+
// radio's shadow root. For example, if we're stamping in a lit map
169169
// or repeat, then we'll be constructed before we're added to a root node.
170170
//
171171
// Also note if we aren't using native shadow DOM, we still need a

packages/snackbar/accessible-snackbar-label-directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class AccessibleSnackbarLabel extends AsyncDirective {
9595
// all browsers and screen readers:
9696
//
9797
// 1. `textContent = ''` is required for IE11 + JAWS
98-
// 2. the lit-html render of `'&nbsp;'` is required for Chrome + JAWS and
98+
// 2. the lit render of `'&nbsp;'` is required for Chrome + JAWS and
9999
// NVDA
100100
//
101101
// All other browser/screen reader combinations support both methods.

scripts/publish-demos.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cat <<-EOF >gh-pages/package.json
3030
"name": "demos",
3131
"private": true,
3232
"dependencies": {
33-
"lit-element": "^2.0.0",
33+
"lit": "^2.0.0",
3434
"@webcomponents/webcomponentsjs": "^2.0.0"
3535
}
3636
}
@@ -79,4 +79,4 @@ fi
7979
# # Blow away interim
8080
# # rm -rf build/default
8181
# # mv build/interim/build/default build/default
82-
# # rm -rf build/interim
82+
# # rm -rf build/interim

scripts/sass-to-lit-css/template.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
* Copyright 2021 Google LLC
44
* SPDX-LIcense-Identifier: Apache-2.0
55
*/
6-
import {css} from 'lit-element';
6+
import {css} from 'lit';
77
export const styles = css`<% content %>`;

test/src/benchmark/button/test-basic.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ See the License for the specific language governing permissions and
1515
limitations under the License.
1616
*/
1717
import '@material/mwc-button';
18-
import {html} from 'lit-html';
18+
import {html} from 'lit';
1919
import {measureFixtureCreation} from '../../util/helpers';
2020

2121
measureFixtureCreation(html`
2222
<mwc-button label="Normal"></mwc-button>
23-
`);
23+
`);

0 commit comments

Comments
 (0)