Componentry V4.4 🆙

v4.4.0: Setup Simplifications

Componentry V4.4 includes a few small improvements to the library setup workflow. Notably: utility prop types align with custom themes "out of the box", and safelisting classes for Tailwind is now managed.

V4.4 improvement highlights:

  • Default utility props are derived from the Theme type.
  • Managed solution for safe-listing Tailwind classes added.
  • Component types display improved for IntelliSense.
  • PostCSS dependencies moved to peerDependencies

Derived utility props

Previously setup of custom theme values for TS users meant:

  1. Defining a custom theme value
  2. Using module augmentation to override the Theme type
  3. Using module augmentation to override the utility prop types to match

In this release the type for utility props are now derived from the Theme type. Most of the time this means TS users can create a custom theme, use module augmentation to update the Theme type, and they're ready. (For special cases it's still possible to directly override the utility prop types using module augmentation)

Managed Tailwind safe-list

Previously integrating with Tailwind for utility props required including a bundled type definition with a set of static string values in a projects content list. Not only was this a bit odd, but it meant that any custom theme values had to also be safe-listed manually.

Starting in this release Componentry provides a tailwindSafelist export for integrating with Tailwind. The export includes all of the patterns needed to include the Tailwind classes used by Componentry.