Skip to content

4.0.0

Choose a tag to compare

@felix-bohlin felix-bohlin released this 13 May 14:43
· 912 commits to main since this release

Alright here we go. v4.

This was originally just intended to be a docs rewrite, but snowballed into an everything rewrite. I don't feel I'm even close to finished but I need to push the big, red release button at some point just to get it out there and start somewhere. Since this is an experimental library I just assume no one will take offence to the breaking changes. Let me know regardless if you have any thoughts or issues - there are some known bugs I need to work on but yeah, don't be a stranger! :)

I could

What's changed

Complete rewrite of docs and components. OPUI now also ships Astro components if you're into that.

Don't forget, I'm just a single person working on this in my free time. I'm doing this for fun. There will be bugs.

Added

  • Anchor, Drawer, Form, Toast, Toggle, Tooltip and a lot of re-writes and improvements to existing components.
  • Definition List -> Description List
  • Tab buttons -> Tabs
  • Toggle button group -> Toggle
  • Astro component entry: import { Button } from "opui-css/astro".
  • Per-component CSS imports under opui-css/css/components/*.css.

Breaking

  • theme-one and theme-two are removed. I can't maintain a million themes. There is now a single theme in css/theme.css.
  • The default package entry (import "opui-css") now resolves to the single bundled stylesheet (dist/opui.css) instead of dist/theme-two/theme-two.css. The class names are the same, the file path is not.
  • The src/themes/ build pipeline is gone (vite + postcss + per-theme scripts). The package now builds with a small postcss-import-only pipeline that does not transform or lower any CSS syntax.
  • Component CSS source moved from src/components/ to css/components/. The pre-bundled output stays in dist/.
  • Cascade layer order is now declared by the library in css/imports.css: openprops, normalize, theme, components.root, components.extended, utils.
  • astro ^6 is required if you import from opui-css/astro. Pure-CSS consumers are unaffected (the peer is marked optional).

Migration

See the migration guide in the opui package.