Major Changes
-
e8788c7: Initial Release 🎉
@patternfly/pfe-coreprovides utilities for building PatternFly elements,
like TypeScript decorators and Lit reactive controllers.
Core utilities replace thePFElementbase class.Before
export class PfeJazzHands extends PFElement { static get tag() { return "pfe-jazz-hands"; } static get properties() { return { cool: { type: Boolean, observer: "_upgradeObserver", }, }; } } PFElement.create(PfeJazzHands);
After
@customElement("pf-jazz-hands") export class PfJazzHands extends LitElement { @observed("_upgradeObserver") @property({ type: Boolean }) cool = true; _upgradeObserver() { console.log("cool"); } }
Controllers
-
✨ Added
FloatingDOMControllerfor use with components that require popover
content. For example, inBaseTooltipwe use the controller in this manner:import { FloatingDOMController } from "@patternfly/pfe-core/controllers/floating-dom-controller.js"; export class BaseTooltip extends LitElement { #domController = new FloatingDOMController(this); }
-
✨ Added
InternalsController, providing preliminary facility for
ElementInternals -
✨ Added
ScrollSpyControllerwhich sets an attribute (activeby default)
on one of it's children when that child'shrefattribute is to a hash
reference to an ID'd heading on the page. -
✨ Added
RovingTabindexControllerwhich implements roving tabindex, as
described in WAI-ARIA practices. AddedRovingTabindexController.
See README and the docs for more info.
-
Minor Changes
-
530ef71: ✨ Added
OverflowControllerWhen added to a container and given a child array of elements,
OverflowControllerchecks to see if those elements exceed the bounds of the
container. -
2e1fb57:
InternalsController: addedlabelsandvaliditygetters; addedsetFormValue,setValidity,checkValidityandreportValiditymethods
Patch Changes
- 5d3315f: Prepared release candidate