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

feat: add custom-element decorator #2844

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion core/pfe-core/controllers/test/combobox-controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, fixture, nextFrame } from '@open-wc/testing';
import { sendKeys } from '@web/test-runner-commands';
import { a11ySnapshot } from '@patternfly/pfe-tools/test/a11y-snapshot.js';

import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { query } from 'lit/decorators/query.js';
import { ReactiveElement, html, render, type PropertyValues, type TemplateResult } from 'lit';

Expand Down
61 changes: 61 additions & 0 deletions core/pfe-core/decorators/custom-element.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import type { Constructor } from '@lit/reactive-element/decorators/base.js';
import type { CustomElementDecorator } from '@lit/reactive-element/decorators/custom-element.js';

/**
* Allow for custom element classes with private constructors
*/
type CustomElementClass = Omit<typeof HTMLElement, 'new'>;

/**
* Helper to define a custom element with gracefull error
* handling for duplicate definition.
*/
function defineElement(tagName: string, classOrTarget: CustomElementConstructor) {
try {
customElements.define(
tagName,
classOrTarget
);
} catch (e) {
if (e instanceof Error) {
if (e.message.includes('has already been used with this registry')) {
console.warn(`Duplicate definition for [${tagName}].`, e);
return;
}
}
throw e;
}
}

/**
* Class decorator factory that defines the decorated class as a custom element.
* Allows duplicate custom element definitions to fail gracefully with a console
* warn rather than an unhandled error for duplicate definitions.
*
*
* ```js
* @customElement('my-element')
* class MyElement extends LitElement {
* render() {
* return html``;
* }
* }
* ```
* @category Decorator
* @param tagName The tag name of the custom element to define.
*/
export const customElement =
(tagName: string): CustomElementDecorator =>
(
classOrTarget: CustomElementClass | Constructor<HTMLElement>,
context?: ClassDecoratorContext<Constructor<HTMLElement>>
) => {
if (context !== undefined) {
context.addInitializer(() => {
defineElement(tagName, classOrTarget as CustomElementConstructor);
});
} else {
defineElement(tagName, classOrTarget as CustomElementConstructor);
}
};

1 change: 1 addition & 0 deletions core/pfe-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"./decorators/initializer.js": "./decorators/initializer.js",
"./decorators/observed.js": "./decorators/observed.js",
"./decorators/observes.js": "./decorators/observes.js",
"./decorators/custom-element.js": "./decorators/custom-element.js",
"./decorators/time.js": "./decorators/time.js",
"./decorators/trace.js": "./decorators/trace.js",
"./functions/arraysAreEquivalent.js": "./functions/arraysAreEquivalent.js",
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/develop/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ In TypeScript, lit observed properties are defined using either the `@property()
or the `@state()` decorator (for private or internal properties). Add the property import statement.

```ts
import { customElement } from 'lit/decorators/custom-element.js'
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js'
import { property } from 'lit/decorators/property.js'
```

Expand Down Expand Up @@ -190,7 +190,7 @@ For your reference, here's the final Javascript code for `pf-cool-element`:

```ts
import { LitElement, html } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { styleMap } from 'lit/directives/style-map.js';

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/develop/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Let's take a look at the `pf-cool-element.ts` file to see what we have.

```ts
import { LitElement, html } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';

import styles from './pf-cool-element.css';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-accordion/pf-accordion-header.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PfAccordion } from './pf-accordion.js';

import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import { SlotController } from '@patternfly/pfe-core/controllers/slot-controller.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-accordion/pf-accordion-panel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import { getRandomId } from '@patternfly/pfe-core/functions/random.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-accordion/pf-accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LitElement, html, type TemplateResult } from 'lit';
import { observes } from '@patternfly/pfe-core/decorators/observes.js';
import { listen } from '@patternfly/pfe-core/decorators/listen.js';
import { property } from 'lit/decorators/property.js';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';

import { RovingTabindexController } from '@patternfly/pfe-core/controllers/roving-tabindex-controller.js';
import { NumberListConverter } from '@patternfly/pfe-core';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-avatar/pf-avatar.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { property } from 'lit/decorators/property.js';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';

import style from './pf-avatar.css';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-back-to-top/pf-back-to-top.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, isServer, type PropertyValues, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { ifDefined } from 'lit/directives/if-defined.js';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-background-image/pf-background-image.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { queryAssignedElements } from 'lit/decorators/query-assigned-elements.js';
import { property } from 'lit/decorators/property.js';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-badge/pf-badge.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import styles from './pf-badge.css';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-banner/pf-banner.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LitElement, html, type PropertyValues, type TemplateResult } from 'lit';

import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { classMap } from 'lit/directives/class-map.js';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-button/pf-button.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { classMap } from 'lit/directives/class-map.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-card/pf-card.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { classMap } from 'lit/directives/class-map.js';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-chip/pf-chip-group.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { query } from 'lit/decorators/query.js';
import { queryAssignedNodes } from 'lit/decorators/query-assigned-nodes.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-chip/pf-chip.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import '@patternfly/elements/pf-button/pf-button.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-clipboard-copy/pf-clipboard-copy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { classMap } from 'lit/directives/class-map.js';
import { ifDefined } from 'lit/directives/if-defined.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-code-block/pf-code-block.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { classMap } from 'lit/directives/class-map.js';
import styles from './pf-code-block.css';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-dropdown/pf-dropdown-group.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import styles from './pf-dropdown-group.css';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-dropdown/pf-dropdown-item.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type PropertyValues, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { classMap } from 'lit/directives/class-map.js';
import { query } from 'lit/decorators/query.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-dropdown/pf-dropdown-menu.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { consume } from '@lit/context';
import { state } from 'lit/decorators/state.js';
import { context, type PfDropdownContext } from './context.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-dropdown/pf-dropdown.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LitElement, html, type PropertyValues, type TemplateResult } from 'lit';
import { styleMap } from 'lit/directives/style-map.js';
import { classMap } from 'lit/directives/class-map.js';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { queryAssignedElements } from 'lit/decorators/query-assigned-elements.js';
import { provide } from '@lit/context';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-icon/pf-icon.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type PropertyValues, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { state } from 'lit/decorators/state.js';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-jump-links/pf-jump-links-item.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html, LitElement, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import { ifDefined } from 'lit/directives/if-defined.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-jump-links/pf-jump-links-list.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html, LitElement, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';

import style from './pf-jump-links-list.css';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-jump-links/pf-jump-links.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html, LitElement, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import { ScrollSpyController } from '@patternfly/pfe-core/controllers/scroll-spy-controller.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-label/pf-label.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { classMap } from 'lit/directives/class-map.js';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-modal/pf-modal.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { query } from 'lit/decorators/query.js';
import { ifDefined } from 'lit/directives/if-defined.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-panel/pf-panel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import { SlotController } from '@patternfly/pfe-core/controllers/slot-controller.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-popover/pf-popover.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Placement } from '@patternfly/pfe-core/controllers/floating-dom-controller.js';

import { LitElement, nothing, html, type PropertyValues, isServer, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { query } from 'lit/decorators/query.js';
import { styleMap } from 'lit/directives/style-map.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-progress-stepper/pf-progress-step.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { PropertyValues, TemplateResult } from 'lit';
import type { PfProgressStepper } from './pf-progress-stepper.js';

import { LitElement, html } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { classMap } from 'lit/directives/class-map.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-progress-stepper/pf-progress-stepper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type PropertyValues, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import style from './pf-progress-stepper.css';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-progress/pf-progress.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PropertyValues, TemplateResult } from 'lit';
import { LitElement, html } from 'lit';
import { classMap } from 'lit/directives/class-map.js';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { styleMap } from 'lit/directives/style-map.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-select/pf-option-group.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { classMap } from 'lit/directives/class-map.js';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import { InternalsController } from '@patternfly/pfe-core/controllers/internals-controller.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-select/pf-option.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { queryAssignedNodes } from 'lit/decorators/query-assigned-nodes.js';
import { property } from 'lit/decorators/property.js';
import { classMap } from 'lit/directives/class-map.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-select/pf-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Placement } from '@patternfly/pfe-core/controllers/floating-dom-co
import type { TemplateResult } from 'lit';

import { LitElement, html, isServer } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { query } from 'lit/decorators/query.js';
import { repeat } from 'lit/directives/repeat.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-spinner/pf-spinner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { styleMap } from 'lit/directives/style-map.js';
import { property } from 'lit/decorators/property.js';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-switch/pf-switch.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import { InternalsController } from '@patternfly/pfe-core/controllers/internals-controller.js';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-table/pf-caption.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';

import styles from './pf-caption.css';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-table/pf-table.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { styleMap } from 'lit/directives/style-map.js';
import { state } from 'lit/decorators/state.js';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-table/pf-tbody.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';

import styles from './pf-tbody.css';

Expand Down
2 changes: 1 addition & 1 deletion elements/pf-table/pf-td.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';

import styles from './pf-td.css';
Expand Down
2 changes: 1 addition & 1 deletion elements/pf-table/pf-th.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, html, svg, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators/custom-element.js';
import { customElement } from '@patternfly/pfe-core/decorators/custom-element.js';
import { property } from 'lit/decorators/property.js';
import { classMap } from 'lit/directives/class-map.js';

Expand Down
Loading
Loading