wabi 0.30.0 → 0.30.2
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 +16 -0
- data/README.md +22 -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: f985366bdbaa72cb9eb6e8e298fe9bf5557ab1fc23d316ca2c73c3d11203ea83
|
|
4
|
+
data.tar.gz: abc233d1f6ee64d0240f536dcf734915bd10e064358f5f1a57a7be3ebff7306d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1149b9dc2e6ceb244ceba8b1c89937306d066fbd41951590899755f86908e0246898f424376f0cabfb8d3e805357718c70dab61210bacb76ca608fc4f8b51759
|
|
7
|
+
data.tar.gz: bfcf82fdfdc5b4ed09848ebe52240ea6025d910f2124edfaab53111850df9907fe581821b363b0d0d88c08d6acf935fcadcf86441c5f07c71768f0c29b670670
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
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.2 - 2026-06-10
|
|
6
|
+
|
|
7
|
+
### Docs
|
|
8
|
+
- Brand identity: a wabi-sabi gem icon (a faceted gem with a chipped edge) replaces Rails' default red-circle favicon — adaptive `icon.svg`, `icon.png`, and `favicon.ico`, plus the gem next to the "Wabi" wordmark in the docs header and above the README title.
|
|
9
|
+
|
|
10
|
+
## 0.30.1 - 2026-06-09
|
|
11
|
+
|
|
12
|
+
Fresh-install fix, found by following the README in a brand-new Rails app.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- **`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.
|
|
16
|
+
- `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.
|
|
17
|
+
|
|
18
|
+
### Docs
|
|
19
|
+
- 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.
|
|
20
|
+
|
|
5
21
|
## 0.30.0 - 2026-06-09
|
|
6
22
|
|
|
7
23
|
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
|
@@ -1,32 +1,43 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/wabikit/wabi/main/docs/public/icon.png" width="84" height="84" alt="Wabi logo — a faceted gem with a chipped edge">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# Wabi
|
|
2
6
|
|
|
3
7
|
> Beautifully imperfect components for Rails.
|
|
4
8
|
|
|
5
9
|
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
10
|
|
|
7
|
-
🎉 **Status:** v0.30.
|
|
11
|
+
🎉 **Status:** v0.30.2 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
12
|
|
|
9
13
|
---
|
|
10
14
|
|
|
11
15
|
## Quick start
|
|
12
16
|
|
|
17
|
+
Wabi expects a Rails 8 app with Tailwind 4 and importmap (`rails new myapp --css tailwind` gives you both).
|
|
18
|
+
|
|
13
19
|
```bash
|
|
14
20
|
# 1. Add the gem
|
|
15
21
|
bundle add wabi
|
|
16
22
|
|
|
17
|
-
# 2.
|
|
23
|
+
# 2. Set up Phlex (skip if your app already uses phlex-rails) —
|
|
24
|
+
# creates the Components::/Views:: namespaces components autoload under
|
|
25
|
+
bin/rails g phlex:install
|
|
26
|
+
|
|
27
|
+
# 3. Run the Wabi installer (copies tokens.css + theme controller + lockfile)
|
|
18
28
|
bin/rails g wabi:install
|
|
19
29
|
|
|
20
|
-
#
|
|
30
|
+
# 4. Add components from the registry
|
|
21
31
|
bin/rails g wabi:add button card dialog
|
|
22
32
|
|
|
23
|
-
#
|
|
24
|
-
# In any Phlex view:
|
|
33
|
+
# 5. Render — in any Phlex view or ERB template:
|
|
25
34
|
# render Components::UI::Button.new(appearance: :primary) { "Click me" }
|
|
26
35
|
```
|
|
27
36
|
|
|
28
37
|
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
38
|
|
|
39
|
+
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.
|
|
40
|
+
|
|
30
41
|
---
|
|
31
42
|
|
|
32
43
|
## What's in the box
|
|
@@ -105,6 +116,7 @@ That's a fully-accessible modal with focus trap, scroll lock, backdrop click, Es
|
|
|
105
116
|
|---|---|
|
|
106
117
|
| `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
118
|
| `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. |
|
|
119
|
+
| `wabi:update <name…>` | Re-fetches installed components and 3-way merges registry changes with your local edits (conflict markers on overlap). |
|
|
108
120
|
| `wabi:list` | Lists all available components in the configured registry. |
|
|
109
121
|
| `wabi:registry <url>` | Switches the active registry origin (default: `https://wabi-docs.onrender.com/r`). |
|
|
110
122
|
| `wabi:theme <slug>` | Swaps `tokens.css` for the requested palette. Run `bin/rails tailwindcss:build` after. |
|
|
@@ -135,11 +147,11 @@ bin/dev # starts registry watcher + tailwind watcher + docs server on :3000
|
|
|
135
147
|
|
|
136
148
|
Then visit:
|
|
137
149
|
- `/` — marketing landing
|
|
138
|
-
- `/docs/components` — index of all
|
|
150
|
+
- `/docs/components` — index of all 49 components
|
|
139
151
|
- `/docs/components/{button,dropdown_menu,dialog,tabs}` — detailed pages with live preview + source
|
|
140
152
|
- `/docs/themes` — all 8 palettes side-by-side
|
|
141
153
|
- `/docs/getting-started`, `/docs/theming`, `/docs/philosophy` — prose docs
|
|
142
|
-
- `/preview` —
|
|
154
|
+
- `/preview` — kitchen sink (every component on one page)
|
|
143
155
|
|
|
144
156
|
---
|
|
145
157
|
|
|
@@ -184,7 +196,9 @@ Requires Node 20+ in PATH (Pagefind is fetched via `npx` on demand).
|
|
|
184
196
|
| v0.12 | Skeleton, Breadcrumb, Pagination, Progress, AlertDialog | ✅ shipped 2026-06-01 |
|
|
185
197
|
| v0.13 | DataTable (server-driven: sortable headers + row selection) | ✅ shipped 2026-06-01 |
|
|
186
198
|
| 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
|
-
|
|
|
199
|
+
| v0.26 | API-standardization pass (frozen contract for 1.0); docs consistency sweep; automated OIDC gem releases | ✅ shipped 2026-06-09 |
|
|
200
|
+
| v0.30 | Pre-1.0 hardening: Turbo-cache overlay fix, Zag 1.41.2 alignment, Ruby >= 4.0 | ✅ shipped 2026-06-09 |
|
|
201
|
+
| v1.0 | API stability; external a11y audit | next up |
|
|
188
202
|
|
|
189
203
|
See [ROADMAP.md](./ROADMAP.md) for the long-term view and [CHANGELOG.md](./CHANGELOG.md) for the per-release detail.
|
|
190
204
|
|
|
@@ -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"
|