diff --git a/.changeset/strong-humans-sip.md b/.changeset/strong-humans-sip.md new file mode 100644 index 000000000..afecf1d82 --- /dev/null +++ b/.changeset/strong-humans-sip.md @@ -0,0 +1,7 @@ +--- +'@lion/form-core': patch +'@lion/listbox': patch +'@lion/overlays': patch +--- + +fix: point to parent constructor in styles getter diff --git a/packages/form-core/src/FormControlMixin.js b/packages/form-core/src/FormControlMixin.js index 2227810b8..f0e393a10 100644 --- a/packages/form-core/src/FormControlMixin.js +++ b/packages/form-core/src/FormControlMixin.js @@ -615,7 +615,8 @@ const FormControlMixinImplementation = superclass => * - {element} .input-group__after (optional) : a suffix that resides outside the container */ static get styles() { - const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.constructor); + const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.prototype + .constructor); return [ superCtor.styles ? superCtor.styles : [], css` diff --git a/packages/form-core/src/choice-group/ChoiceInputMixin.js b/packages/form-core/src/choice-group/ChoiceInputMixin.js index 18131238a..7194da506 100644 --- a/packages/form-core/src/choice-group/ChoiceInputMixin.js +++ b/packages/form-core/src/choice-group/ChoiceInputMixin.js @@ -136,7 +136,8 @@ const ChoiceInputMixinImplementation = superclass => * For [role=option] extensions, please override completely */ static get styles() { - const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.constructor); + const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.prototype + .constructor); return [ superCtor.styles ? superCtor.styles : [], css` diff --git a/packages/listbox/src/ListboxMixin.js b/packages/listbox/src/ListboxMixin.js index a5af5d846..292705fdf 100644 --- a/packages/listbox/src/ListboxMixin.js +++ b/packages/listbox/src/ListboxMixin.js @@ -73,7 +73,8 @@ const ListboxMixinImplementation = superclass => } static get styles() { - const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.constructor); + const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.prototype + .constructor); return [ superCtor.styles ? superCtor.styles : [], css` diff --git a/packages/overlays/src/ArrowMixin.js b/packages/overlays/src/ArrowMixin.js index f205d096c..3f58297a4 100644 --- a/packages/overlays/src/ArrowMixin.js +++ b/packages/overlays/src/ArrowMixin.js @@ -24,7 +24,8 @@ export const ArrowMixinImplementation = superclass => } static get styles() { - const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.constructor); + const superCtor = /** @type {typeof import('@lion/core').LitElement} */ (super.prototype + .constructor); return [ superCtor.styles ? superCtor.styles : [], css` @@ -102,9 +103,9 @@ export const ArrowMixinImplementation = superclass => } /** - * @overridable method `_defineOverlay` - * @desc Overrides arrow and keepTogether modifier to be enabled, + * Overrides arrow and keepTogether modifier to be enabled, * and adds onCreate and onUpdate hooks to sync from popper state + * @configure OverlayMixin * @returns {OverlayConfig} */ // eslint-disable-next-line