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

chore(deps): bump lit from 2.7.0 to 3.0.2 #1072

Merged
merged 6 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions .changeset/angry-moons-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@equinor/fusion-wc-date': patch
'@equinor/fusion-wc-list': patch
'@equinor/fusion-wc-menu': patch
---

Update types to handle lit 3.0.2 + use @queryAssignedElements instead of @queryAssignedNodes
31 changes: 31 additions & 0 deletions .changeset/heavy-waves-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
'@equinor/fusion-wc-searchable-dropdown': minor
'@equinor/fusion-wc-progress-indicator': minor
'@equinor/fusion-wc-intersection': minor
'@equinor/fusion-wc-formfield': minor
'@equinor/fusion-wc-textinput': minor
'@equinor/fusion-wc-checkbox': minor
'@equinor/fusion-wc-markdown': minor
'@equinor/fusion-wc-skeleton': minor
'@equinor/fusion-wc-textarea': minor
'@equinor/fusion-wc-divider': minor
'@equinor/fusion-wc-picture': minor
'@equinor/fusion-wc-popover': minor
'@equinor/fusion-wc-avatar': minor
'@equinor/fusion-wc-button': minor
'@equinor/fusion-wc-person': minor
'@equinor/fusion-wc-ripple': minor
'@equinor/fusion-wc-select': minor
'@equinor/fusion-wc-switch': minor
'@equinor/fusion-wc-badge': minor
'@equinor/fusion-wc-radio': minor
'@equinor/fusion-wc-theme': minor
'@equinor/fusion-wc-chip': minor
'@equinor/fusion-wc-date': minor
'@equinor/fusion-wc-icon': minor
'@equinor/fusion-wc-list': minor
'@equinor/fusion-wc-menu': minor
'@equinor/fusion-wc-storybook': minor
---

Update lit from 2.7.0 to 3.0.2
5 changes: 5 additions & 0 deletions .changeset/new-dancers-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@equinor/fusion-wc-searchable-dropdown': patch
---

Update searchable-dropdown to get trailing from el instead of queryselect the shadow root
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@
"yarn": "please-use-pnpm",
"pnpm": ">=4"
},
"pnpm": {
"overrides": {
"lit": "^3.0.2"
}
},
"packageManager": "pnpm@8.0.0",
"scripts": {
"prepare": "husky install",
"start": "cd storybook && pnpm run dev",
"clean": "pnpm clean:build",
"clean": "pnpm clean:build && pnpm clean:node",
"clean:build": "pnpm -r exec del-cli dist lib tsconfig.tsbuildinfo",
"clean:node": "pnpm -r exec del-cli node_modules && pnpm exec del-cli node_modules",
"prepack": "pnpm --filter='@equinor/fusion-wc-builder' build",
"build": "pnpm -r --filter=!'@equinor/fusion-wc-storybook' build",
"build:docs": "pnpm --filter='@equinor/fusion-wc-storybook' build",
Expand Down
2 changes: 1 addition & 1 deletion packages/avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@equinor/fusion-wc-picture": "workspace:^",
"@equinor/fusion-wc-ripple": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-wc-icon": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
16 changes: 1 addition & 15 deletions packages/badge/src/element.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, type HTMLTemplateResult, type PropertyValues, html, CSSResult } from 'lit';
import { property, queryAssignedNodes, queryAsync, eventOptions } from 'lit/decorators.js';
import { property, queryAsync, eventOptions } from 'lit/decorators.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { BadgeSize, BadgeColor, BadgePosition } from './static';
import IconElement, { IconName } from '@equinor/fusion-wc-icon';
Expand Down Expand Up @@ -104,20 +104,6 @@ export class BadgeElement extends LitElement {
@queryAsync('fwc-ripple')
protected ripple!: Promise<Ripple | null>;

/**
* @internal
* Reference to the icon slot.
*/
@queryAssignedNodes({ slot: 'icon' })
protected iconSlot!: NodeListOf<HTMLElement>;

/**
* @internal
* Reference to the value slot.
*/
@queryAssignedNodes({ slot: 'value' })
protected valueSlot!: NodeListOf<HTMLElement>;

/**
* @internal
* Define ripple handlers.
Expand Down
2 changes: 1 addition & 1 deletion packages/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@material/mwc-button": "^0.27.0",
"@material/mwc-icon-button": "^0.27.0",
"@material/mwc-icon-button-toggle": "^0.27.0",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"@material/mwc-checkbox": "^0.27.0",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/chip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@equinor/fusion-wc-icon": "workspace:^",
"@equinor/fusion-wc-ripple": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/date/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"date-fns": "^2.29.3",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/date/src/datetime/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class DateTimeElement extends LitElement implements DateTimeElementProps
}

/** @override */
protected createRenderRoot(): Element {
protected createRenderRoot(): HTMLElement {
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/divider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/formfield/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"@material/mwc-formfield": "^0.27.0",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@equinor/eds-icons": "^0.19.1",
"@equinor/fusion-wc-core": "workspace:^",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/intersection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@equinor/fusion-wc-core": "workspace:^",
"fast-deep-equal": "^3.1.3",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@equinor/fusion-wc-radio": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"@material/mwc-list": "^0.27.0",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/list/src/element.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CSSResult } from 'lit';
import { ListBase } from '@material/mwc-list/mwc-list-base';
import { styles as mdcStyle } from '@material/mwc-list/mwc-list.css';
import { queryAssignedElements } from 'lit/decorators.js';
import style from './element.css';

export type ListElementProps = {
Expand Down Expand Up @@ -52,6 +53,12 @@ export type ListElementProps = {
*/
export class ListElement extends ListBase implements ListElementProps {
static styles: CSSResult[] = [mdcStyle, style];

@queryAssignedElements({ slot: '', flatten: true, selector: '*' })
protected assignedElements!: HTMLElement[] | null;

@queryAssignedElements({ slot: '', flatten: true, selector: '*' })
protected tabbableElements!: HTMLElement[] | null;
}

export default ListElement;
2 changes: 1 addition & 1 deletion packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-wc-icon": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"lit": "2.7.0",
"lit": "3.0.2",
"prosemirror-commands": "^1.5.2",
"prosemirror-history": "^1.3.2",
"prosemirror-inputrules": "^1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/menu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-wc-list": "workspace:^",
"@material/mwc-menu": "^0.27.0",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/menu/src/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ export type MenuElementProps = {
*
*/
export class MenuElement extends MenuBase implements MenuElementProps {
protected listElement_!: ListElement | null;

protected override get listElement(): ListElement | null {
if (!this.listElement_) {
this.listElement_ = this.renderRoot.querySelector('fwc-list');
Expand Down
6 changes: 3 additions & 3 deletions packages/person/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-wc-icon": "workspace:^",
"@equinor/fusion-wc-list": "workspace:^",
"@equinor/fusion-wc-textinput": "workspace:^",
"@equinor/fusion-wc-searchable-dropdown": "workspace:^",
"@equinor/fusion-wc-skeleton": "workspace:^",
"@equinor/fusion-wc-textinput": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"@floating-ui/dom": "^1.3.0",
"@lit-labs/observers": "^2.0.0",
"@lit-labs/observers": "^2.0.2",
"@lit-labs/task": "^3.0.1",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/picture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"license": "ISC",
"dependencies": {
"@equinor/fusion-wc-core": "workspace:^",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/popover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@equinor/fusion-wc-core": "workspace:^",
"@popperjs/core": "^2.11.6",
"@types/resize-observer-browser": "^0.1.7",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/progress-indicator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"@material/mwc-radio": "^0.27.0",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@equinor/fusion-wc-core": "workspace:^",
"@material/mwc-ripple": "^0.27.0",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/searchable-dropdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@lit-labs/task": "^3.1.0",
"@material/mwc-textfield": "^0.27.0",
"@types/uuid": "^9.0.1",
"lit": "2.7.0",
"lit": "3.0.2",
"uuid": "^9.0.0"
},
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/searchable-dropdown/src/dropdown/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ export class SearchableDropdownElement
@property({ attribute: false, state: true })
trailingIcon = '';

@query('.trailing')
trailingIconElement?: IconElement;

/* The icon string to render in result list items on the meta slot */
@property()
meta = '';
Expand Down
2 changes: 1 addition & 1 deletion packages/searchable-dropdown/src/provider/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export class SearchableDropdownController implements ReactiveController {
}

/* blur closeicon if focused */
const closeIcon = this.#host.renderRoot.querySelector('.trailing');
const closeIcon = this.#host.trailingIconElement;
if (closeIcon) {
(closeIcon as HTMLSpanElement).blur();
}
Expand Down
5 changes: 3 additions & 2 deletions packages/searchable-dropdown/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ReactiveControllerHost } from 'lit';
import { type ActionDetail } from '@material/mwc-list/mwc-list-foundation';
import { TextInputElement } from '@equinor/fusion-wc-textinput';
import { ListElement } from '@equinor/fusion-wc-list';
import { IconType } from '@equinor/fusion-wc-icon';
import { IconElement, IconType } from '@equinor/fusion-wc-icon';
/**
* Properties/Attributes for web component
* @autofocus Sets focus on textinput when mounted
Expand Down Expand Up @@ -85,8 +85,9 @@ export interface SearchableDropdownResolver {
export interface SearchableDropdownControllerHost extends SearchableDropdownProps, ReactiveControllerHost, EventTarget {
dispatchEvent(event: Event): boolean;
nodeName: string;
renderRoot: HTMLElement | ShadowRoot;
renderRoot: HTMLElement | DocumentFragment;
trailingIcon: string;
trailingIconElement?: IconElement;
id: string;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@equinor/fusion-wc-menu": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"@material/mwc-select": "^0.27.0",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/skeleton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/switch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.7",
"@material/mwc-switch": "^0.27.0",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/textarea/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-wc-textinput": "workspace:^",
"@material/mwc-textarea": "^0.27.0",
"lit": "2.7.0"
"lit": "3.0.2"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.9.0",
Expand Down
Loading