Releases: patternfly/patternfly-elements
Releases · patternfly/patternfly-elements
@patternfly/[email protected]
Patch Changes
- 91850fb: fixed TypeScript typings for react wrappers
@patternfly/[email protected]
Patch Changes
- 1924229: Generate TypeScript typings for React wrapper components
@patternfly/[email protected]
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
- f4a7ae7:
<pf-accordion>: update theexpandedIndexDOM property on change - Updated dependencies [7055add]
- Updated dependencies [a81bcb1]
- @patternfly/[email protected]
@patternfly/[email protected]
Patch Changes
- 5f2e653:
<pf-tabs>: prevent error when using tabs-panel with certain frameworks or imperative javascript code
@patternfly/[email protected]
Patch Changes
- 5f2e653: Tests: check for imperative element instantiation
@patternfly/[email protected]
@patternfly/[email protected]
@patternfly/[email protected]
Patch Changes
- d5c6c19: Dev Server: fixes
*-lightdom.csssupport in config
@patternfly/[email protected]
Patch Changes
- c5d9588: roving-tabindex-controller: fixes arrow keydown event listeners
@patternfly/[email protected]
Minor Changes
- 12c59e9:
<pf-icon>: allowgetIconUrlto 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]
- @patternfly/[email protected]