Skip to content
WebJs
Menu

Latest updates and announcements.

Latest updates and announcements for WebJs UI, the @webjsdev/ui package. Each release writes one entry, automatically, from the changes merged since the last one. The WebJs changelog lists every package.

@webjsdev/ui 0.5.2

Features

  • The class helpers with a shadcn name take className (#1698) 1824e0eaa

    buttonClass({ variant: 'link', className: 'mt-2' }) merges the class through cn(), as shadcn's buttonVariants does, and so do the 16 other helpers that have a shadcn alias (badgeClass, toggleClass, tabsListClass, itemClass and the rest). Without a className every helper returns exactly what it did.

    lib/utils.ts (copied to an app as lib/utils/cn.ts) is about half the size: its commentary on the class merger moved to the package docs, and its code is unchanged.

@webjsdev/ui 0.5.1

Fixes

  • Accordion triggers show the default cursor (#1695) 7d949d22f

    Hovering an accordion title showed a text cursor in the eight ported styles. The trigger now takes cursor-default, as shadcn/ui's does; new-york keeps its pointer.

@webjsdev/ui 0.5.0

Breaking

  • Lit and Next.js muscle memory writes correct WebJs code (#1687) cc4f49310

    feat!: default a property's attribute to Lit's lowercase name

    Lit observes and reflects a camelCase property under its lowercased name (isOpen -> isopen); WebJs used the kebab name. A Lit component

@webjsdev/ui 0.4.0

Breaking

  • omit a null or undefined attribute hole in SSR, matching the client (#1574) 2a9613cf

    fix: omit a null or undefined attribute hole in SSR, matching the client

    A plain attribute hole holding null rendered attr="" on the server while the client removed it, so a layout's aria-current=${active ? 'page' : null}

  • replace state props with signals and remove state: true (#1678) 2a614661

    feat(core): track signal reads across the whole update cycle

    A component re-rendered only for signals read inside render(). A signal read in willUpdate() or updated(), the usual place to derive a host

  • align WebJs component behavior with Lit JS patterns (#1683) 1a5e3b30

    fix: align event listener receivers and options with Lit

    feat!: align WebJs component behavior with Lit JS patterns (#1682)

Features

  • rebuild webjs.dev/ui as a shadcn-site replica (#1667) fb7e1fef

    refactor(website): move the marketing chrome into a (site) group

    /ui is getting its own header and footer (#1666), and the root layout cannot own both: on a soft navigation the server short-circuits at the

  • state works as in lit, alongside signals (#1680) afae1735

    refactor(ui): drop accessors from the kit's internal-only state

    The state-prop migration wrapped all 45 signals in getter/setters. 18 of them are touched only inside their own class, so the accessor gave

Fixes

  • give toggle-group items a button cursor in every style (#1676) 481d499e <ui-toggle-group-item> is a custom element whose host is the button, so it gets none of what the browser gives a native <button>. Since the kit moved to shadcn's base form, the ported styles (written for a native button) set no cursor, so the item labels showed a text I-beam and were

@webjsdev/ui 0.3.17

Features

  • add empty, spinner and field components (#1571) 128fadbb Three new Tier-1 components with shadcn parity. empty is the empty state for a list or region (emptyClass, emptyHeaderClass, emptyMediaClass({ variant }), emptyTitleClass, emptyDescriptionClass, emptyContentClass). spinner is a busy indicator (spinnerClass plus spinner({ class, label, decorative }), an inline SVG with role="status"). field is the form-field layout system (fieldSetClass, fieldLegendClass, fieldGroupClass, fieldClass({ orientation }), fieldContentClass, fieldLabelClass, fieldTitleClass, fieldDescriptionClass, fieldErrorClass, fieldSeparatorClass, fieldSeparatorContentClass). Add them with webjs ui add empty spinner field.

More Updates