Releases: patternfly/patternfly-elements
@patternfly/pfe-tools@2.0.3
Patch Changes
- aca8409: React: ensure that only classes which are exported get wrapped
@patternfly/pfe-tools@2.0.2
@patternfly/elements@3.0.2
Patch Changes
- 9702278:
<pf-clipboard-copy>: corrected size of copy button
@patternfly/pfe-tools@2.0.1
@patternfly/eslint-plugin-elements@2.0.0
Major Changes
- 65079fb: Provide ESLint flat config. Upgrade to ESLint 9.0 to use.
@patternfly/eslint-config-elements@3.0.0
@patternfly/elements@3.0.1
netlify-plugin-github-actions@2.0.0
Major Changes
- e6ca914: Package is now
"type": "module"aka ESM
@patternfly/pfe-tools@2.0.0
Major Changes
-
de4cfa4: Remove
DocsPagerender functions -
de4cfa4: Dev server config no longer uses
nodeResolution. Instead you must provide configuration for the import map plugin.import { pfeDevServerConfig, getPatternflyIconNodemodulesImports, } from "@patternfly/pfe-tools/dev-server/config.js"; export default pfeDevServerConfig({ importMapOptions: { providers: { "zero-md": "nodemodules", "@patternfly/icons": "nodemodules", "@patternfly/elements": "nodemodules", "@patternfly/pfe-tools": "nodemodules", "@patternfly/pfe-core": "nodemodules", }, inputMap: { imports: { ...(await getPatternflyIconNodemodulesImports(import.meta.url)), }, }, }, });
-
de4cfa4: Remove react and vue test wrapper helpers. Use React wrapper components instead.
Minor Changes
- 502e931: React wrapper generator: add parameters to support different packages
Patch Changes
@patternfly/pfe-core@3.0.0
Major Changes
-
1d89f73:
RovingTabindexController: deprecate theinitItemsmethod and addgetItemsandgetItemContainerinsteadBEFORE:
#tabindex = new RovingTabindexController(this); constructor() { super(); this.#tabindex.initItems(this.#items); }
AFTER:
#tabindex = new RovingTabindexController(this, { getItems: () => this.#items, });
-
3766961:
@cascades: deprecated@cascadesdecorator andCascadeController. Use context instead.BEFORE: The element in charge of the context cascades data down to
specifically named children.import { LitElement } from "lit"; import { property } from "lit/decorators/property.js"; import { cascades } from "@patternfly/pfe-core/decorators/cascades.js"; class MyMood extends LitElement { @cascades("my-eyes", "my-mouth") @property() mood: "happy" | "sad" | "mad" | "glad"; }
AFTER: children subscribe to updates from the context provider.
import { LitElement } from "lit"; import { property } from "lit/decorators/property.js"; import { provide } from "@lit/context"; import { createContextWithRoot } from "@patternfly/pfe-core/functions/context.js"; export type Mood = "happy" | "sad" | "mad" | "glad"; export const moodContext = createContextWithRoot<Mood>(Symbol("mood")); class MyMood extends LitElement { @provide({ context: moodContext }) @property() mood: Mood; }
import { LitElement } from "lit"; import { property } from "lit/decorators/property.js"; import { consume } from "@lit/context"; import { moodContext, type Mood } from "./my-mood.js"; class MyEyes extends LitElement { @consume({ context: moodContext, subscribe: true }) @state() private mood: Mood; }
-
0d92145:
InternalsController: made the constructor private. UseInternalsController.ofBEFORE:
class PfJazzHands extends LitElement { #internals = new InternalsController(this); }
AFTER:
class PfJazzHands extends LitElement { #internals = InternalsController.of(this); }
-
de4cfa4: Remove
deprecatedCustomEvent
Minor Changes
-
ac0c376:
SlotController: AddisEmptymethod to check if a slot is empty. If no slot name is provided it will check the default slot. (#2603)
SlotController:hasSlottedmethod now returns default slot if no slot name is provided. (#2603) -
d4e5411: Context: added
createContextWithRoot. Use this when creating contexts that
are shared with child elements. -
c71bbe5:
InternalsController: addedcomputedLabelTextread-only property -
c71bbe5:
InternalsController: reflect all methods and properties fromElementInternals -
fa50164:
Logger: loosen the type of allowed controller hosts -
fa50164:
OverflowController: recalculate overflow when the window size changes and when tabs are dynamically created. -
0d92145:
RovingTabindexController: keyboard navigation includes first-character navigation. -
fa50164:
TabsAriaController: Added TabsAriaController, used to manage the accesibility tree for tabs and panels.#tabs = new TabsAriaController(this, { isTab: (x: Node): x is PfTab => x instanceof PfTab, isPanel: (x: Node): x is PfTabPanel => x instanceof PfTabPanel, });
Please review the Tabs 2.4 to 3.0 migration guide for more
information.