Skip to content

Releases: patternfly/patternfly-elements

@patternfly/[email protected]

05 Jul 13:33
367d186

Choose a tag to compare

Patch Changes

  • 91850fb: fixed TypeScript typings for react wrappers

@patternfly/[email protected]

05 Jul 12:56
98f89b0

Choose a tag to compare

Patch Changes

  • 1924229: Generate TypeScript typings for React wrapper components

@patternfly/[email protected]

05 Jul 10:22
99e4081

Choose a tag to compare

Minor Changes

  • c4170a5: PatternFly elements are now available wrapped in React components. While it was
    always possible to use PatternFly elements (or any other custom elements) in
    React apps, this release makes it easier to integrate them into React without
    the need for cumbersome workarounds to React's poor HTML and DOM support.

    Before:

    import { useEffect, useState, useRef } from "react";
    import "@patternfly/elements/pf-switch/pf-switch.js";
    
    function App() {
      const [checked, setChecked] = useState(false);
      const switchRef = useRef(null);
      useEffect(() => {
        switchRef.current.checked = checked;
      }, [switchRef.current, checked]);
      useEffect(() => {
        switchRef.current.addEventListener("change", () =>
          setChecked(switchRef.current.checked)
        );
      }, [switchRef.current]);
      return (
        <>
          <pf-switch ref={switchRef}></pf-switch>
        </>
      );
    }

    After:

    import { useState } from "react";
    import { Switch } from "@patternfly/elements/react/pf-switch/pf-switch.js";
    
    function App() {
      const [checked, setChecked] = useState(false);
      return (
        <>
          <Switch
            checked={checked}
            onChange={({ target }) => setChecked(target.checked)}
          />
        </>
      );
    }

Patch Changes

@patternfly/[email protected]

20 Jun 15:58
b7a9556

Choose a tag to compare

Patch Changes

  • 5f2e653: <pf-tabs>: prevent error when using tabs-panel with certain frameworks or imperative javascript code

@patternfly/[email protected]

20 Jun 15:58
b7a9556

Choose a tag to compare

Patch Changes

  • 5f2e653: Tests: check for imperative element instantiation

@patternfly/[email protected]

16 Jun 13:33
933a0d6

Choose a tag to compare

Patch Changes

  • cdd1d42: DocsPage: renders headings as markdown (PR)
  • d7dd035: dev-server: Corrects aliased elements redirects

@patternfly/[email protected]

16 Jun 13:33
933a0d6

Choose a tag to compare

Patch Changes

  • 78f3333: <pf-tabs>: fixed style regression on tab when a slotted icon is not present
  • 2ba0b43: <pf-popover>: prevent memory leak by removing event listeners event on popover close

@patternfly/[email protected]

07 Jun 12:47
aa69a96

Choose a tag to compare

Patch Changes

  • d5c6c19: Dev Server: fixes *-lightdom.css support in config

@patternfly/[email protected]

07 Jun 12:47
aa69a96

Choose a tag to compare

Patch Changes

  • c5d9588: roving-tabindex-controller: fixes arrow keydown event listeners

@patternfly/[email protected]

07 Jun 12:47
aa69a96

Choose a tag to compare

Minor Changes

  • 12c59e9: <pf-icon>: allow getIconUrl to return a string, permitting users to import
    icons from 'bare module specifiers'.

Patch Changes

  • c5d9588: <pf-accordion>: fixed keyboard navigation inside of nested accordions
  • a2e88b5: <pf-tabs>: fix vertical alignment of slotted icons
  • 12c59e9: <pf-icon>: use fontawesome 5 icons. NOTE: imports from
    @patternfly/elements/pf-icon/icons/ are deprecated and will be removed in the
    next major version.
  • 6adf530: <pf-tabs>: prevent error when using in certain javascript frameworks
  • 881c8a5: <pf-timestamp>: improved performance by using browser-standard features to calculate relative time
  • Updated dependencies [c5d9588]