wabi 0.30.0 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +18 -8
- data/lib/wabi/generators/install_generator.rb +11 -0
- data/lib/wabi/version.rb +1 -1
- data/lib/wabi.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e12e3f4a71c61fba7976627b8625a46e940743d005597bab49b2f1627a6e0449
|
|
4
|
+
data.tar.gz: c187e87b438b941bec199831df6e007eb866d3e403d95195f0c4d20104d2d53e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 835dae4e356628f562f32270e39a2bd6c23e100619d2ef15ed46c0a60476d64420d99d37e8f0457ff1b2fd8110e3cf9dde26ca5b1dc187482f07ec9b4a4952a5
|
|
7
|
+
data.tar.gz: 807b3b1113ac7d0925ce69aaf491c1f40958cdb3fa061a28d358e17e84e1a2b6d540e13d924652b73567cffc6a4cc8fa418c7ca5b517a3d760c7c8c783022a03
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Wabi land here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## 0.30.1 - 2026-06-09
|
|
6
|
+
|
|
7
|
+
Fresh-install fix, found by following the README in a brand-new Rails app.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **`require "phlex/rails"` from the gem entrypoint** (when Rails is defined). Apps that only `bundle add wabi` previously got Phlex without the Rails integration — the first `render Components::UI::X` failed with "must implement #to_partial_path". The docs app masked this by depending on phlex-rails directly.
|
|
11
|
+
- `wabi:install` now warns when Phlex isn't set up (no `config/initializers/phlex.rb`) and points at `bin/rails g phlex:install`, which creates the `Components::`/`Views::` namespaces components autoload under.
|
|
12
|
+
|
|
13
|
+
### Docs
|
|
14
|
+
- README quick start gains the `phlex:install` step, the importmap-pins note for interactive components, and the `--css tailwind` prerequisite; CLI table documents `wabi:update`; stale counts/roadmap refreshed. Getting-started page updated to match.
|
|
15
|
+
|
|
5
16
|
## 0.30.0 - 2026-06-09
|
|
6
17
|
|
|
7
18
|
Pre-1.0 hardening: a Turbo-cache fix for every portaled overlay, dependency alignment, and release-metadata polish. Version jumps 0.26 → 0.30 to mark the start of the 0.3x pre-1.0 series.
|
data/README.md
CHANGED
|
@@ -4,29 +4,36 @@
|
|
|
4
4
|
|
|
5
5
|
Wabi is an open-source UI component library for **Ruby on Rails 8**, built on **Phlex + Tailwind 4 + Stimulus + Hotwire**. Inspired by shadcn/ui, components are *copied* into your app — you own the code, customize freely, no upstream API to drift away from.
|
|
6
6
|
|
|
7
|
-
🎉 **Status:** v0.30.
|
|
7
|
+
🎉 **Status:** v0.30.1 alpha — [available on RubyGems](https://rubygems.org/gems/wabi). 49 components, 8 theme palettes, WCAG-AA audited, live docs + registry at [wabi-docs.onrender.com](https://wabi-docs.onrender.com).
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
## Quick start
|
|
12
12
|
|
|
13
|
+
Wabi expects a Rails 8 app with Tailwind 4 and importmap (`rails new myapp --css tailwind` gives you both).
|
|
14
|
+
|
|
13
15
|
```bash
|
|
14
16
|
# 1. Add the gem
|
|
15
17
|
bundle add wabi
|
|
16
18
|
|
|
17
|
-
# 2.
|
|
19
|
+
# 2. Set up Phlex (skip if your app already uses phlex-rails) —
|
|
20
|
+
# creates the Components::/Views:: namespaces components autoload under
|
|
21
|
+
bin/rails g phlex:install
|
|
22
|
+
|
|
23
|
+
# 3. Run the Wabi installer (copies tokens.css + theme controller + lockfile)
|
|
18
24
|
bin/rails g wabi:install
|
|
19
25
|
|
|
20
|
-
#
|
|
26
|
+
# 4. Add components from the registry
|
|
21
27
|
bin/rails g wabi:add button card dialog
|
|
22
28
|
|
|
23
|
-
#
|
|
24
|
-
# In any Phlex view:
|
|
29
|
+
# 5. Render — in any Phlex view or ERB template:
|
|
25
30
|
# render Components::UI::Button.new(appearance: :primary) { "Click me" }
|
|
26
31
|
```
|
|
27
32
|
|
|
28
33
|
Then add `@import "./wabi/tokens.css";` AFTER `@import "tailwindcss";` in your `app/assets/tailwind/application.css`, and mount `data-controller="wabi--theme"` on `<html>` in your layout.
|
|
29
34
|
|
|
35
|
+
Interactive components (dialog, select, …) need their Zag.js importmap pins — `wabi:add` prints the exact `pin` lines to paste into `config/importmap.rb`. Restart the server after adding initializers or pins.
|
|
36
|
+
|
|
30
37
|
---
|
|
31
38
|
|
|
32
39
|
## What's in the box
|
|
@@ -105,6 +112,7 @@ That's a fully-accessible modal with focus trap, scroll lock, backdrop click, Es
|
|
|
105
112
|
|---|---|
|
|
106
113
|
| `wabi:install [--force]` | Copies `tokens.css`, the `wabi--theme` Stimulus controller, and initializes `config/wabi.lock.json`. `--force` re-copies tokens/controller on gem upgrades (lockfile is preserved). |
|
|
107
114
|
| `wabi:add <name…>` | Copies one or more component source files from the registry into `app/components/ui/` and their controllers into `app/javascript/controllers/wabi/`. Updates the lockfile. |
|
|
115
|
+
| `wabi:update <name…>` | Re-fetches installed components and 3-way merges registry changes with your local edits (conflict markers on overlap). |
|
|
108
116
|
| `wabi:list` | Lists all available components in the configured registry. |
|
|
109
117
|
| `wabi:registry <url>` | Switches the active registry origin (default: `https://wabi-docs.onrender.com/r`). |
|
|
110
118
|
| `wabi:theme <slug>` | Swaps `tokens.css` for the requested palette. Run `bin/rails tailwindcss:build` after. |
|
|
@@ -135,11 +143,11 @@ bin/dev # starts registry watcher + tailwind watcher + docs server on :3000
|
|
|
135
143
|
|
|
136
144
|
Then visit:
|
|
137
145
|
- `/` — marketing landing
|
|
138
|
-
- `/docs/components` — index of all
|
|
146
|
+
- `/docs/components` — index of all 49 components
|
|
139
147
|
- `/docs/components/{button,dropdown_menu,dialog,tabs}` — detailed pages with live preview + source
|
|
140
148
|
- `/docs/themes` — all 8 palettes side-by-side
|
|
141
149
|
- `/docs/getting-started`, `/docs/theming`, `/docs/philosophy` — prose docs
|
|
142
|
-
- `/preview` —
|
|
150
|
+
- `/preview` — kitchen sink (every component on one page)
|
|
143
151
|
|
|
144
152
|
---
|
|
145
153
|
|
|
@@ -184,7 +192,9 @@ Requires Node 20+ in PATH (Pagefind is fetched via `npx` on demand).
|
|
|
184
192
|
| v0.12 | Skeleton, Breadcrumb, Pagination, Progress, AlertDialog | ✅ shipped 2026-06-01 |
|
|
185
193
|
| v0.13 | DataTable (server-driven: sortable headers + row selection) | ✅ shipped 2026-06-01 |
|
|
186
194
|
| v0.14–0.25 | JS test suite + coverage floors; +29 components (Sidebar, Carousel, Splitter, NavigationMenu, RatingGroup, HoverCard, TagsInput, Collapsible, ColorPicker, TreeView, …); full WCAG-AA audit | ✅ shipped 2026-06-08 |
|
|
187
|
-
|
|
|
195
|
+
| v0.26 | API-standardization pass (frozen contract for 1.0); docs consistency sweep; automated OIDC gem releases | ✅ shipped 2026-06-09 |
|
|
196
|
+
| v0.30 | Pre-1.0 hardening: Turbo-cache overlay fix, Zag 1.41.2 alignment, Ruby >= 4.0 | ✅ shipped 2026-06-09 |
|
|
197
|
+
| v1.0 | API stability; external a11y audit | next up |
|
|
188
198
|
|
|
189
199
|
See [ROADMAP.md](./ROADMAP.md) for the long-term view and [CHANGELOG.md](./CHANGELOG.md) for the per-release detail.
|
|
190
200
|
|
|
@@ -49,6 +49,17 @@ module Wabi
|
|
|
49
49
|
RUBY
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
+
# Wabi components autoload under Components::UI — that namespace comes
|
|
53
|
+
# from phlex-rails's own installer (config/initializers/phlex.rb pushes
|
|
54
|
+
# app/components under Components). Warn when it's missing, otherwise the
|
|
55
|
+
# first `render Components::UI::X` raises uninitialized constant.
|
|
56
|
+
def check_phlex_setup
|
|
57
|
+
return if File.exist?(File.join(destination_root, "config/initializers/phlex.rb"))
|
|
58
|
+
say "\n ⚠ Phlex doesn't look set up in this app (no config/initializers/phlex.rb).", :yellow
|
|
59
|
+
say " Run `bin/rails g phlex:install` to create the Components::/Views:: namespaces"
|
|
60
|
+
say " Wabi components rely on — without it Components::UI::* won't resolve."
|
|
61
|
+
end
|
|
62
|
+
|
|
52
63
|
def print_next_steps
|
|
53
64
|
say "\n Wabi installed. Next steps:", :green
|
|
54
65
|
say ""
|
data/lib/wabi/version.rb
CHANGED
data/lib/wabi.rb
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# Load phlex-rails before anything else: it gives Phlex components render_in /
|
|
4
|
+
# the Rails integration. Without this require, apps that only `bundle add wabi`
|
|
5
|
+
# get a Phlex::HTML with no Rails support and `render Components::UI::X` fails
|
|
6
|
+
# with "must implement #to_partial_path". Guarded because phlex/rails needs
|
|
7
|
+
# ActiveSupport (absent in the bare gem test env).
|
|
8
|
+
require "phlex/rails" if defined?(Rails)
|
|
9
|
+
|
|
3
10
|
require_relative "wabi/version"
|
|
4
11
|
require_relative "wabi/base"
|
|
5
12
|
require_relative "wabi/class_merge"
|