wabi 0.14.1 → 0.14.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 +33 -0
- data/README.md +1 -1
- data/lib/wabi/version.rb +1 -1
- data/templates/controllers/wabi/theme_controller.js +6 -2
- metadata +15 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81b58b73eb1f3e83cfb6840d864a8dbb0b2c078454cb8099dd0ac89c84130110
|
|
4
|
+
data.tar.gz: fa1b0abcafb1f0e5b03636dd90e204d0d485e8d97956f072136dd40ba353aec0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d8ff36b21bc54736f9da4122e092fc18e92051eb4b1b961dc6fceddddcdc28e491d026ed32d4268df1a8c680c6dc97c17ae24794e5e816c17fb15d5c508a9b18
|
|
7
|
+
data.tar.gz: 24aa4d354092a8f2597314cf6985cd84b60546df94f6832b72d696ea9959ef51c6f46654b84cdbcdaa301121dde1709d60933f9b41cf2650d0c9822a83da9c42
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
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.14.2 - 2026-06-02
|
|
6
|
+
|
|
7
|
+
Bugfix release. Wabi's controllers gained a real JavaScript test suite (vitest +
|
|
8
|
+
jsdom, the controllers exercised against the real `@zag-js` machines) — raising
|
|
9
|
+
JS coverage from ~18% to ~81%. That effort, plus continued live-registry
|
|
10
|
+
dogfooding, surfaced five real bugs, all fixed here. No API changes.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Select submitted an empty value.** The visually-hidden native `<select>` was
|
|
15
|
+
rendered with no `<option>` children, so its `.value` was always `""` and the
|
|
16
|
+
chosen value never reached the server on form submit. It now renders an
|
|
17
|
+
`<option>` per item (plus a leading empty option so "no selection" submits
|
|
18
|
+
`""`); the controller syncs the selected value as before.
|
|
19
|
+
- **Single-theme installs lost their styling on hydration.** The theme
|
|
20
|
+
controller's `connect()` forced `data-theme="default"` (and `data-mode`) when
|
|
21
|
+
`localStorage` was empty, clobbering the server-rendered value. Precedence is
|
|
22
|
+
now localStorage (user choice) → server-rendered value → default.
|
|
23
|
+
- **Toggle's pressed state and `wabi--toggle:change` event were broken.** Zag
|
|
24
|
+
calls `onPressedChange` with a bare boolean, but the controller destructured
|
|
25
|
+
`{ pressed }` off it (always `undefined`). Fixed to take the boolean directly.
|
|
26
|
+
- **ToggleGroup leaked stale hidden inputs.** The hidden-input cleanup selector
|
|
27
|
+
used the double-dash `data-wabi--toggle-group-hidden`, but the inputs were
|
|
28
|
+
tagged via `dataset` (single-dash), so cleanup never matched — switching
|
|
29
|
+
selection accumulated stale inputs and the form submitted stale values. Now
|
|
30
|
+
tagged with `setAttribute` (matching the Slider fix).
|
|
31
|
+
- **`wabi:add toast` produced an unregistered controller.** `toast`'s manifest
|
|
32
|
+
never declared `_shared/toast_stack.js` under `shared_files:`, so the file
|
|
33
|
+
`toaster_controller.js` imports was never installed → the importmap couldn't
|
|
34
|
+
pin the bare specifier → "Failed to register controller: wabi--toaster". The
|
|
35
|
+
manifest now declares it; a registry spec guards every component's `_shared`
|
|
36
|
+
imports against its manifest so this can't silently regress.
|
|
37
|
+
|
|
5
38
|
## 0.14.1 - 2026-06-02
|
|
6
39
|
|
|
7
40
|
Two blocking install-flow bugs surfaced by end-to-end dogfooding against the live registry.
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
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.14.
|
|
7
|
+
🎉 **Status:** v0.14.2 alpha — [available on RubyGems](https://rubygems.org/gems/wabi). 34 components, 8 theme palettes, WCAG-AA targeted, live docs + registry at [wabi-docs.onrender.com](https://wabi-docs.onrender.com).
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
data/lib/wabi/version.rb
CHANGED
|
@@ -10,8 +10,12 @@ export default class extends Controller {
|
|
|
10
10
|
|
|
11
11
|
connect() {
|
|
12
12
|
const html = document.documentElement
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
// Honor the server-rendered data-theme/data-mode before falling back, so a
|
|
14
|
+
// single-theme (or non-"default") install isn't clobbered to "default" on
|
|
15
|
+
// hydration when localStorage is empty. Precedence: user choice (localStorage)
|
|
16
|
+
// → server-rendered value → sensible default.
|
|
17
|
+
const storedTheme = localStorage.getItem(this.themeKeyValue) || html.dataset.theme || "default"
|
|
18
|
+
const storedMode = localStorage.getItem(this.modeKeyValue) || html.dataset.mode || this.systemMode()
|
|
15
19
|
html.dataset.theme = storedTheme
|
|
16
20
|
html.dataset.mode = storedMode
|
|
17
21
|
}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wabi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.14.
|
|
4
|
+
version: 0.14.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Oscar Ortega
|
|
@@ -107,6 +107,20 @@ dependencies:
|
|
|
107
107
|
- - "~>"
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
109
|
version: '13.0'
|
|
110
|
+
- !ruby/object:Gem::Dependency
|
|
111
|
+
name: simplecov
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - "~>"
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: '0.22'
|
|
117
|
+
type: :development
|
|
118
|
+
prerelease: false
|
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
120
|
+
requirements:
|
|
121
|
+
- - "~>"
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: '0.22'
|
|
110
124
|
description: An OSS UI component library for Rails 8 — Phlex-native, Tailwind-themed,
|
|
111
125
|
accessible, with 'you own the code' philosophy.
|
|
112
126
|
email:
|