wabi 0.14.1 → 0.15.0
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 +50 -0
- data/README.md +4 -4
- 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: 5da6047adf08752f3a94d9e9d10828e5eb68f6e597f0193608a7bcabd3125a6e
|
|
4
|
+
data.tar.gz: 2874c23f200ecc7b714e21a27a85ca6808192e6bf82e3a59f3baa21c1c5f530c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a36925fa1db4d383e3b2435331a3f5c1f8ec639a702ef43483cd165b4f4abb33482cd188459ca9f4fcf7bc6928953caaa27ef2a9c08c1682a1399e21bc302199
|
|
7
|
+
data.tar.gz: e3cf19e0882ad6bcb472bc46650ba69b91feafc2fae65e46f383a16dfc8a01abc66c94bb0b8fb4b06278fc0da7f3b6bc5c42f63ff6ab3b2f53d0fe3117aaa576
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
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.15.0 - 2026-06-03
|
|
6
|
+
|
|
7
|
+
Adds the **NumberInput** component.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **NumberInput** — a numeric stepper input (`[ − | value | + ]`) backed by
|
|
12
|
+
`@zag-js/number-input`. It hides the native browser spinner arrows and ships
|
|
13
|
+
its own decrement/increment controls with full keyboard support (↑/↓,
|
|
14
|
+
PageUp/PageDown, Home/End), press-and-hold to repeat, and `min`/`max`/`step`
|
|
15
|
+
clamping. Supports number formatting via `Intl.NumberFormat`
|
|
16
|
+
(`format: :decimal | :currency | :percent`, with `currency:` and `precision:`),
|
|
17
|
+
three sizes (`:sm`/`:md`/`:lg`), optional mouse-wheel adjustment
|
|
18
|
+
(`allow_mouse_wheel:`), an `invalid:` state for Form integration, and native
|
|
19
|
+
form submission (the real `<input>` carries the `name`). Install with
|
|
20
|
+
`bin/rails g wabi:add number_input`.
|
|
21
|
+
|
|
22
|
+
## 0.14.2 - 2026-06-02
|
|
23
|
+
|
|
24
|
+
Bugfix release. Wabi's controllers gained a real JavaScript test suite (vitest +
|
|
25
|
+
jsdom, the controllers exercised against the real `@zag-js` machines) — raising
|
|
26
|
+
JS coverage from ~18% to ~81%. That effort, plus continued live-registry
|
|
27
|
+
dogfooding, surfaced five real bugs, all fixed here. No API changes.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- **Select submitted an empty value.** The visually-hidden native `<select>` was
|
|
32
|
+
rendered with no `<option>` children, so its `.value` was always `""` and the
|
|
33
|
+
chosen value never reached the server on form submit. It now renders an
|
|
34
|
+
`<option>` per item (plus a leading empty option so "no selection" submits
|
|
35
|
+
`""`); the controller syncs the selected value as before.
|
|
36
|
+
- **Single-theme installs lost their styling on hydration.** The theme
|
|
37
|
+
controller's `connect()` forced `data-theme="default"` (and `data-mode`) when
|
|
38
|
+
`localStorage` was empty, clobbering the server-rendered value. Precedence is
|
|
39
|
+
now localStorage (user choice) → server-rendered value → default.
|
|
40
|
+
- **Toggle's pressed state and `wabi--toggle:change` event were broken.** Zag
|
|
41
|
+
calls `onPressedChange` with a bare boolean, but the controller destructured
|
|
42
|
+
`{ pressed }` off it (always `undefined`). Fixed to take the boolean directly.
|
|
43
|
+
- **ToggleGroup leaked stale hidden inputs.** The hidden-input cleanup selector
|
|
44
|
+
used the double-dash `data-wabi--toggle-group-hidden`, but the inputs were
|
|
45
|
+
tagged via `dataset` (single-dash), so cleanup never matched — switching
|
|
46
|
+
selection accumulated stale inputs and the form submitted stale values. Now
|
|
47
|
+
tagged with `setAttribute` (matching the Slider fix).
|
|
48
|
+
- **`wabi:add toast` produced an unregistered controller.** `toast`'s manifest
|
|
49
|
+
never declared `_shared/toast_stack.js` under `shared_files:`, so the file
|
|
50
|
+
`toaster_controller.js` imports was never installed → the importmap couldn't
|
|
51
|
+
pin the bare specifier → "Failed to register controller: wabi--toaster". The
|
|
52
|
+
manifest now declares it; a registry spec guards every component's `_shared`
|
|
53
|
+
imports against its manifest so this can't silently regress.
|
|
54
|
+
|
|
5
55
|
## 0.14.1 - 2026-06-02
|
|
6
56
|
|
|
7
57
|
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.
|
|
7
|
+
🎉 **Status:** v0.15.0 alpha — [available on RubyGems](https://rubygems.org/gems/wabi). 35 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
|
|
|
@@ -31,11 +31,11 @@ Then add `@import "./wabi/tokens.css";` AFTER `@import "tailwindcss";` in your `
|
|
|
31
31
|
|
|
32
32
|
## What's in the box
|
|
33
33
|
|
|
34
|
-
###
|
|
34
|
+
### 35 components
|
|
35
35
|
|
|
36
36
|
| Group | Components |
|
|
37
37
|
|---|---|
|
|
38
|
-
| **Forms** (
|
|
38
|
+
| **Forms** (14) | Button, Input, NumberInput, Textarea, Label, Checkbox, Switch, Select, RadioGroup, Slider, Toggle, ToggleGroup, Combobox, Form |
|
|
39
39
|
| **Layout & Display** (8) | Card, Badge, Separator, Alert, Avatar, Table, DataTable, Skeleton |
|
|
40
40
|
| **Overlays** (6) | Dialog, AlertDialog, Drawer (4 sides), Tooltip, Popover, Command |
|
|
41
41
|
| **Menus** (1) | DropdownMenu (nested submenus, checkbox + radio items) |
|
|
@@ -134,7 +134,7 @@ bin/dev # starts registry watcher + tailwind watcher + docs server on :3000
|
|
|
134
134
|
|
|
135
135
|
Then visit:
|
|
136
136
|
- `/` — marketing landing
|
|
137
|
-
- `/docs/components` — index of all
|
|
137
|
+
- `/docs/components` — index of all 35 components
|
|
138
138
|
- `/docs/components/{button,dropdown_menu,dialog,tabs}` — detailed pages with live preview + source
|
|
139
139
|
- `/docs/themes` — all 8 palettes side-by-side
|
|
140
140
|
- `/docs/getting-started`, `/docs/theming`, `/docs/philosophy` — prose docs
|
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.
|
|
4
|
+
version: 0.15.0
|
|
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:
|