Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoped elements v3 #2168

Merged
merged 38 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4ab71e3
chore: fix broken overlay system demos
tlouisse Jan 25, 2024
2f9767b
chore: update @open-wc/scoped-elements to v3
okadurin Jan 4, 2024
46fba93
chore: add polyfill
okadurin Jan 8, 2024
cd3c7fd
chore: update ScopedElementsMixin import
okadurin Jan 8, 2024
05e5c0f
chore: temporarily update UT to fix error
okadurin Jan 8, 2024
9e8bb07
chore: update dependencies in node_modules
okadurin Jan 9, 2024
fc13e20
chore: update dependencies in node_modules
okadurin Jan 9, 2024
44d81b0
chore: revert changes
okadurin Jan 11, 2024
8e7b89d
chore: lock scoped-elements mixing to v3
okadurin Jan 15, 2024
fd35994
chore: skip tests temporarily
okadurin Jan 17, 2024
3b8e213
chore: skip tests for lion-textarea temporarily
okadurin Jan 17, 2024
586faf1
chore: skip tests for local-positioning temporarily
okadurin Jan 17, 2024
45de568
chore: merge lit3-alpha
okadurin Jan 17, 2024
51cf7fb
chore: remove copy.sh
okadurin Jan 17, 2024
8ceb685
chore: remove explicit polyfill import from test files
okadurin Jan 17, 2024
a5acf48
Fix/lit3 alpha/package lock (#2166)
narzac Jan 17, 2024
c44deb9
chore: update .gitignore
okadurin Jan 17, 2024
10e7b49
chore: update .gitignore
okadurin Jan 17, 2024
9a19740
chore: update scoped-elements version
okadurin Jan 19, 2024
2da8757
chore: add copy.sh back
okadurin Jan 22, 2024
be9ad30
add custom html-elements.js
okadurin Jan 20, 2024
a30c6e3
chore: revert createScopedElement
okadurin Jan 22, 2024
fec270b
chore: comment out tests temprarily
okadurin Jan 22, 2024
f6e2f49
chore: update lit-element.js
okadurin Jan 22, 2024
a2340ff
chore: clean code
okadurin Jan 23, 2024
88e8d2b
chore: add lit-element.js into core
okadurin Jan 23, 2024
1395ce7
chore: update sore/src/html-element.js
okadurin Jan 23, 2024
f602d60
chore: remove copy.sh
okadurin Jan 23, 2024
55ad069
chore: remove overrides
okadurin Jan 23, 2024
ad1b26f
chore: format
okadurin Jan 24, 2024
077cec9
chore: clean code
okadurin Jan 24, 2024
e7e9aa6
chore: update docs
okadurin Jan 24, 2024
71e2c41
chore: fix lint
okadurin Jan 24, 2024
ec01689
chore: clean code
okadurin Jan 25, 2024
b788261
chore: update scoped-elements comments and bumped dep versions
tlouisse Jan 25, 2024
f303a1f
chore(ui): release 0.6.0-alpha.1
tlouisse Feb 7, 2024
dcff68b
chore: linting
tlouisse Feb 7, 2024
38f5b46
chore: rebase
tlouisse Feb 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/blog/lion-without-polyfills.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To clarify: within Lion class files we never import files that run `customElemen

```js
import { LitElement, html } from 'lit';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
import { MyCardHeader } from './MyCardHeader.js';

export class MyCard extends ScopedElementsMixin(LitElement) {
Expand Down Expand Up @@ -78,7 +78,7 @@ Be sure to always define **ALL** the sub elements you are using in your template

```js
import { LitElement, html } from 'lit';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
import { MyCardHeader } from './MyCardHeader.js';

export class MyCard extends ScopedElementsMixin(LitElement) {
Expand Down
4 changes: 2 additions & 2 deletions docs/components/accordion/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { html as previewHtml } from '@mdjs/mdjs-preview';

```js preview-story
import { html, LitElement } from 'lit';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
import { LionAccordion } from '@lion/ui/accordion.js';

class MyComponent extends ScopedElementsMixin(LitElement) {
Expand Down Expand Up @@ -83,7 +83,7 @@ npm i --save @lion/ui

```js
import { html, LitElement } from 'lit';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
import { LionAccordion } from '@lion/ui/accordion.js';

class MyComponent extends ScopedElementsMixin(LitElement) {
Expand Down
2 changes: 1 addition & 1 deletion docs/components/input-file/use-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Required, Validator } from '@lion/ui/form-core.js';
import { loadDefaultFeedbackMessages } from '@lion/ui/validate-messages.js';
import { html } from '@mdjs/mdjs-preview';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
import { LitElement } from 'lit';
import '@lion/ui/define/lion-input-file.js';
loadDefaultFeedbackMessages();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
import { html, css } from 'lit';
import { ref } from 'lit/directives/ref.js';
import { repeat } from 'lit/directives/repeat.js';
Expand Down
4 changes: 2 additions & 2 deletions docs/components/switch/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '@lion/ui/define/lion-switch.js';

```js preview-story
import { html, LitElement } from 'lit';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
import { LionSwitch } from '@lion/ui/switch.js';

class MyComponent extends ScopedElementsMixin(LitElement) {
Expand Down Expand Up @@ -51,7 +51,7 @@ npm i --save @lion/ui

```js
import { html, LitElement } from 'lit';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
import { LionSwitch } from '@lion/ui/switch.js';

class MyComponent extends ScopedElementsMixin(LitElement) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable max-classes-per-file */
/* eslint-disable import/no-extraneous-dependencies */
import { html, LitElement, css } from 'lit';
import { OverlayMixin } from '@lion/ui/overlays.js';
import { OverlayMixin, withDropdownConfig } from '@lion/ui/overlays.js';
import { LionButton } from '@lion/ui/button.js';

/**
Expand All @@ -12,6 +12,7 @@ class DemoElUsingOverlayMixin extends OverlayMixin(LitElement) {
_defineOverlayConfig() {
return /** @type {OverlayConfig} */ ({
placementMode: 'global',
...withDropdownConfig(),
});
}

Expand Down
7 changes: 4 additions & 3 deletions docs/guides/principles/scoped-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ apply ScopedElementsMixin to make sure it uses the right version of this interna

```js
import { LitElement, html } from '@lion/ui/core.js';
import { ScopedElementsMixin, LitElement, html } from '@open-wc/scoped-elements';
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
import { html, LitElement } from 'lit';

import { LionInput } from '@lion/ui/input.js';
import { LionButton } from '@lion/ui/button.js';
Expand Down Expand Up @@ -91,12 +92,12 @@ In a less complex case, we might just want to add a child node to the dom.

```js
import { LitElement } from 'lit';
import { ScopedElementsMixin, getScopedTagName } from '@open-wc/scoped-elements';
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';

...

__getLightDomNode() {
return document.createElement(getScopedTagName('lion-input', this.constructor.scopedElements));
return document.createElement('lion-input', this.constructor.scopedElements);
}
```

Expand Down
Loading
Loading