diff --git a/.changeset/big-teachers-reflect.md b/.changeset/big-teachers-reflect.md new file mode 100644 index 000000000..f383e21fd --- /dev/null +++ b/.changeset/big-teachers-reflect.md @@ -0,0 +1,10 @@ +--- +'@lion/checkbox-group': patch +'@lion/combobox': patch +'@lion/form-core': patch +'@lion/listbox': patch +'@lion/overlays': patch +'@lion/select-rich': patch +--- + +Remove .prototype accessor when accessing super.constructor from a constructor. This causes maximum call stack exceeded in latest chrome. diff --git a/.changeset/soft-penguins-report.md b/.changeset/soft-penguins-report.md new file mode 100644 index 000000000..8b68acc93 --- /dev/null +++ b/.changeset/soft-penguins-report.md @@ -0,0 +1,17 @@ +--- +'@lion/calendar': patch +'@lion/checkbox-group': patch +'@lion/collapsible': patch +'@lion/combobox': patch +'@lion/core': patch +'@lion/dialog': patch +'@lion/form-core': patch +'@lion/input-datepicker': patch +'@lion/listbox': patch +'@lion/localize': patch +'@lion/overlays': patch +'@lion/select-rich': patch +'@lion/tooltip': patch +--- + +Fix types of mixins to include LitElement static props and methods, and use Pick generic type instead of fake constructors. diff --git a/package.json b/package.json index 91f85a8d3..2c3382ab9 100644 --- a/package.json +++ b/package.json @@ -52,11 +52,13 @@ "@open-wc/testing-helpers": "^1.0.0", "@storybook/addon-a11y": "^5.3.21", "@types/chai-dom": "^0.0.8", + "@types/convert-source-map": "^1.5.1", + "@types/istanbul-reports": "^3.0.0", "@web/dev-server": "^0.0.13", "@web/dev-server-legacy": "^0.1.4", - "@web/test-runner": "^0.11.7", - "@web/test-runner-browserstack": "^0.3.3", - "@web/test-runner-playwright": "^0.7.2", + "@web/test-runner": "^0.12.15", + "@web/test-runner-browserstack": "^0.4.2", + "@web/test-runner-playwright": "^0.8.4", "@webcomponents/webcomponentsjs": "^2.4.4", "babel-eslint": "^8.2.6", "babel-polyfill": "^6.26.0", diff --git a/packages/calendar/test/lion-calendar.test.js b/packages/calendar/test/lion-calendar.test.js index eef048ce7..2a3bfb38c 100644 --- a/packages/calendar/test/lion-calendar.test.js +++ b/packages/calendar/test/lion-calendar.test.js @@ -946,8 +946,9 @@ describe('', () => { const el = await fixture(html` - date.getDate() === 3 || date.getDate() === 4} + .disableDates=${ + /** @param {Date} date */ date => date.getDate() === 3 || date.getDate() === 4 + } > `); const elObj = new CalendarObject(el); @@ -1413,8 +1414,9 @@ describe('', () => { const el = await fixture( html` - date.getDay() === 6 || date.getDay() === 0} + .disableDates=${ + /** @param {Date} date */ date => date.getDay() === 6 || date.getDay() === 0 + } > `, ); diff --git a/packages/checkbox-group/src/LionCheckboxIndeterminate.js b/packages/checkbox-group/src/LionCheckboxIndeterminate.js index e2ef1bf69..1d379149d 100644 --- a/packages/checkbox-group/src/LionCheckboxIndeterminate.js +++ b/packages/checkbox-group/src/LionCheckboxIndeterminate.js @@ -5,12 +5,10 @@ import { LionCheckbox } from './LionCheckbox.js'; * @typedef {import('./LionCheckboxGroup').LionCheckboxGroup} LionCheckboxGroup */ -// @ts-expect-error false positive for incompatible static get properties. Lit-element merges super properties already for you. export class LionCheckboxIndeterminate extends LionCheckbox { static get styles() { - const superCtor = /** @type {typeof LionCheckbox} */ (super.prototype.constructor); return [ - superCtor.styles ? superCtor.styles : [], + super.styles || [], css` :host .choice-field__nested-checkboxes { display: block; @@ -23,6 +21,7 @@ export class LionCheckboxIndeterminate extends LionCheckbox { ]; } + /** @type {any} */ static get properties() { return { /** diff --git a/packages/collapsible/test/lion-collapsible.test.js b/packages/collapsible/test/lion-collapsible.test.js index 0883dd45f..b40fa4c6b 100644 --- a/packages/collapsible/test/lion-collapsible.test.js +++ b/packages/collapsible/test/lion-collapsible.test.js @@ -24,8 +24,10 @@ const collapsibleToggle = state => { const defaultCollapsible = html` ${collapsibleTemplate} `; const collapsibleWithEvents = html` - collapsibleToggle(/** @type {LionCollapsible} */ (e.target)?.opened)} + @opened-changed=${ + /** @param {Event} e */ e => + collapsibleToggle(/** @type {LionCollapsible} */ (e.target)?.opened) + } > ${collapsibleTemplate} diff --git a/packages/combobox/src/LionCombobox.js b/packages/combobox/src/LionCombobox.js index 730f04e70..955f1a15d 100644 --- a/packages/combobox/src/LionCombobox.js +++ b/packages/combobox/src/LionCombobox.js @@ -85,8 +85,9 @@ export class LionCombobox extends OverlayMixin(LionListbox) { // eslint-disable-next-line class-methods-use-this _overlayListboxTemplate() { + // TODO: Localize the aria-label return html` -