Skip to content

Releases

v0.8.1

Choose a tag to compare

@davafons davafons released this 06 Nov 03:27
b6abd4b

Additive release on top of 0.8.0: no API was removed or renamed.

Added

  • lc_search(empty:, prompt:) and a busy state while src answers, so the empty note no longer flashes.
  • dialog.trigger { |attrs| … } renders your own element as a dialog trigger; content marked data-dialog-size="sm|md|lg|xl" sizes its dialog. The size scale lives once in dialog.css.
  • lc_menu_group(label, id:) labels a group of menu options.
  • lc_list_field(label, icon:, id:, tag:, surface:) for form rows in a list group, and lc_input(plain: true).
  • lc_icon_button(variant:, tone:) (and the link/to forms); lc_button(expanded_icon:, as: :span); lc_collapsible(button:).
  • lc_toggle_group(variant: :pills, size:), empty item values.
  • lc_avatar and lc_icon_badge spacing-step sizes (size: 6/7/11) and lc_icon_badge(shape: :plain).
  • --lc-toast-offset-top/-bottom and --lc-nav-dock-indicator.

Changes in 0.8.1

Nothing needs an edit, but these look different:

  • A secondary destructive button has a soft destructive fill. Before: variant: :secondary, tone: :destructive
    kept the neutral secondary fill with destructive ink. After: it fills with the same soft destructive mix a
    destructive ghost button shows on hover, so the tones read solid, soft, then ink only.
  • Toggles style aria-checked. An lc_toggle_class element with aria-checked="true" now looks pressed, so
    toggle pills can be the radios of a variant: :pills toggle group.
  • A toggle's fill follows --lc-field-bg. Before: lc_toggle always filled with --input. After: it reads
    --lc-field-bg like fields and the select trigger, so on a card or list row it takes --card-input.
  • The emoji picker's skin-tone menu opens downward. Before: it opened above its toggle, which sits in the
    picker's top row, so it escaped the picker. After: it opens below the toggle, inside the picker.
  • A card's destructive edge ignores its closed menus. Before: a destructive option in a menu or popover
    inside a card (a row's "Remove") tinted the card's edge. After: only the card's own controls and invalid
    fields do.

v0.8.0

Choose a tag to compare

@davafons davafons released this 06 Nov 01:07
14ea02b

Upgrading from 0.7

Everything else in 0.8 is additive. These changes need edits in an app built on 0.7:

  • A named lc_toggle_group renders native radios. Before: lc_toggle_group(name:) rendered radio
    buttons, a hidden input and the lc-selection controller. After: each item is a label around an
    input type=radio with that name, so listen for the inputs' change instead of lc-selection:change, and
    mark the selected item with checked: or the group's value: instead of selected:. A group without
    name: keeps the radio buttons and lc-selection:change; it no longer has an input target.
  • lc_sheet_data is gone. Before: tag.dialog data: lc_sheet_data({ controller: "picker" }, detents: "large").
    After: lc_sheet tag: :dialog, detents: "large", data: { controller: "picker" }. lc_sheet also renders
    non-dialog sheets, so drop any hand-written data-controller="lc-sheet" and handle element too.
  • The lc-confirm-dialog controller is gone. Before: a pre-rendered confirm <dialog> wired to
    lc-confirm-dialog. After: render lc_confirm_sheet once in the layout and put data-turbo-confirm on
    the form, with data-turbo-confirm-description, data-turbo-confirm-accept and
    data-turbo-confirm-tone for its description, label and tone.
  • A modal lc_dialog is 32rem wide on desktop. Before: min(92vw, 31rem). After: size: :md,
    min(32rem, 100vw - 2rem). Pass size: :sm (24rem) for a narrower dialog, or set --lc-dialog-width.
  • lc_dialog puts your content in a body slot. Before: the block rendered straight after the header
    inside [data-slot=dialog-content]. After: it renders inside [data-slot=dialog-body], which scrolls on
    desktop, and the close button sits in [data-slot=dialog-actions]. Update CSS that selects children of
    dialog-content.
  • A swiped-away popover sheet hides itself. Before: lc-sheet:dismiss only notified listeners on a
    non-dialog sheet. After: an open [popover] sheet hides unless a listener calls preventDefault().
  • An unpadded lc_card no longer gaps its children. Before: lc_card(padding: :none) stacked its
    children --lc-inset apart. After: they meet edge to edge, as rows and empty states in an unpadded card
    expect. Pass class: "gap-inset" to keep the old spacing.
  • lc_text(size: :label) is semibold. Before: weight 500. After: 600, the same as a field label, so
    one label role serves both. Add class: "font-medium" where the lighter weight was intended.

v0.4.1

Choose a tag to compare

@davafons davafons released this 03 Nov 14:39
9f7a1df

The first RubyGems release of lostcoords-ui.

  • ActionView and ERB components styled with Tailwind CSS v4 and wired with Stimulus.
  • Automatic Rails engine integration with Propshaft and importmap.
  • Standalone ActionView rendering without booting a Rails application.
  • An lc_* helper namespace, component variants, theme tokens, copy buttons, and motion styles.
  • Vendored Heroicons SVGs with outline, solid, mini, and micro variants.

Add the gem to your Gemfile:

gem "lostcoords-ui", "~> 0.4.0"

See the installation guide and standalone ActionView setup.