wabi 0.5.0 → 0.7.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +136 -0
  3. data/lib/wabi/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0660623d8f6e54a685e9793a3e1ca16e9ac56fcf7150e061c0e80835b8fbe9bd
4
- data.tar.gz: ecbbce636fe38adf58c7931c208dbbe7000cc6b737ce516c286396c483f8e2e9
3
+ metadata.gz: 1975dde8069f308dad1c022923250b6ede092df708ba5cf5fdee333554dccbbe
4
+ data.tar.gz: 8e90d286204bb1ab579116ea8ab3ea2eec74262d55d20b758846b70bda85b755
5
5
  SHA512:
6
- metadata.gz: 7c197e08b3f8cdea3f5587fc265495af390b12a185a030daf7add62fcf17dafd156d7d0466c39f0c943fff8400b486b46a09ce20a85c34fa89bd463056897ff3
7
- data.tar.gz: f8f0d96bad57dc8889221364e06e594bec7f8762ad1373715a308f5a312751e3335347d9b54895dae4c6c29da441900220e318e9d389c65bbd65295efd4eb924
6
+ metadata.gz: fa61e143320502d057ee2f9bd4e4b6618726035c491917c9af0b0767b4464068f9c94376211853eba983cb0e131e2ddc82a361711fae495bba31fc1d53e0a206
7
+ data.tar.gz: dc50cb00e2cabfa8c992fbd3410f6947a76208c3b955c651771cc95f81f180ca151ab061afecfa32d743e79d5abc87b7cea5906f6b511f3b6082421a638cdf3f
data/CHANGELOG.md CHANGED
@@ -2,6 +2,142 @@
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.7.0 - 2026-05-30
6
+
7
+ Quality + finish: 10 items closing v0.6 deferrals and v0.5 long-tail. No new
8
+ components; one breaking change.
9
+
10
+ ### Breaking
11
+
12
+ - **Slider range hidden inputs** now use Rails-native bracket params
13
+ (`name[min]` / `name[max]`) instead of v0.6's flat `name_min` /
14
+ `name_max`. Apps consuming range params must update their strong params
15
+ from `params.permit(:price_min, :price_max)` to
16
+ `params.require(:price).permit(:min, :max)`. Single-thumb sliders are
17
+ unchanged (`name=<value>`).
18
+
19
+ ### Features
20
+
21
+ - **Combobox `ComboboxItemIndicator`** now wires through `getItemIndicatorProps`
22
+ and toggles `hidden` based on the item's selected state (was unwired in v0.6).
23
+ - **Combobox per-item `disabled`** flag now works end-to-end: an item can carry
24
+ `{ value, label, disabled: true }` and the controller passes `isItemDisabled`
25
+ to the Zag collection so Zag stamps `data-disabled` on the matching `<li>` for
26
+ the `data-[disabled]:*` Tailwind variants.
27
+ - **Command palette item selection closes the dialog.** The bridge controller
28
+ listens at `document` level for `wabi--combobox:change` and filters by id
29
+ linkage (`data-wabi--command-id`, read via `getAttribute` — the double-dash
30
+ attribute does not round-trip through `dataset`) to survive the dialog portal
31
+ move. The controllers are ordered `wabi--command wabi--dialog` so the bridge
32
+ stamps the dialog content before the dialog portals it. The "Preview in v0.6"
33
+ callout is removed.
34
+ - **Command auto-opens the combobox when the dialog opens** so item clicks work
35
+ immediately, without typing first. The combobox builds its collection from the
36
+ rendered items when no `items` value is supplied.
37
+ - **Toast Sonner-style animations.** Slides in from the right on enter and slides
38
+ back out on exit — pure CSS transitions on `data-state`, no plugin dependency.
39
+ - **`window.wabiToasters[id]`** keyed registry (via a new `wabi--toaster`
40
+ controller on the `<ol>`) for pages with multiple Toaster instances.
41
+ `turbo_stream.wabi_toast(toaster_id: "alerts", ...)` targets a specific one.
42
+ `window.wabiToaster` remains as a deprecated alias to the most-recently-
43
+ connected toaster for back-compat.
44
+ - **DropdownMenu N-level submenus.** Sub-inside-sub nesting now works to
45
+ arbitrary depth (v0.6 was single-level only). Each sub links to its closest
46
+ ancestor sub or the root menu.
47
+
48
+ ### Cleanup / Perf
49
+
50
+ - **Vestigial `*-target="portal"` wrappers removed** from the portal-using
51
+ overlays (Dialog, Drawer, Command dialog). The wrapper was a v0.4 placeholder
52
+ for `portal: false` mode and added no behavior in v0.5+. (Popover, Tooltip,
53
+ DropdownMenu, and Select had already been cleaned in a prior refactor.)
54
+ - **`WabiPortalRegistry.applyInert`** caches the body-siblings list. The cache is
55
+ invalidated only when register/unregister changes the portal node set;
56
+ `onOpenChange` reuses the cache and just toggles the inert attribute.
57
+
58
+ ### Deferred to v0.8
59
+
60
+ - Combobox async items (server-side fetching).
61
+ - Toast `@zag-js/toast` group machine retry.
62
+ - `wabi:update` three-way merge on conflict.
63
+ - Slider marks/ticks.
64
+ - Overlay controller boilerplate refactor (the overlay controllers share
65
+ attach/restore boilerplate; the DropdownMenu ancestor-lookup is duplicated
66
+ between `connect()` and `render()`).
67
+ - `motion-reduce:transition-none` on Toast (and overlays) for reduced-motion.
68
+ - `WabiPortalRegistry` unregister/restoreFromBody ordering tidy.
69
+
70
+ ## 0.6.0 - 2026-05-28
71
+
72
+ ### Features
73
+
74
+ - **Forms wave** — 7 new components bring Wabi to 27 total:
75
+ - `Toggle` — pressable toggle button (Bold/Italic style). Distinct from
76
+ Switch, which is the sliding control. Variants: appearance
77
+ (default/outline) and size (default/sm/lg). Powered by `@zag-js/toggle`.
78
+ - `RadioGroup` + `RadioGroupItem` + `RadioGroupIndicator` —
79
+ single-select radio group with keyboard navigation via
80
+ `@zag-js/radio-group`. Hidden `<input type="radio">` per item for
81
+ form submission.
82
+ - `ToggleGroup` + `ToggleGroupItem` — group of toggles. `type: :single`
83
+ enforces single selection (radio-like with button styling);
84
+ `type: :multiple` allows multiple simultaneous selections. Hidden
85
+ inputs emitted by the controller (`name` for single, `name[]` for
86
+ multiple).
87
+ - `Slider` + `SliderLabel` + `SliderTrack` + `SliderRange` +
88
+ `SliderThumb` — value picker. Accepts Integer (single thumb) or
89
+ Array (range mode). Vertical orientation via
90
+ `orientation: :vertical`. Range inputs submit as `name_min`/`name_max`.
91
+ - `Combobox` + 8 sub-components — input with autocomplete dropdown.
92
+ Static items only in v0.6 (async deferred to v0.7). Uses the
93
+ Sprint 9 portal pattern as a non-modal anchored overlay. A sibling
94
+ `<input type="hidden">` mirrors the selected value so form
95
+ submission posts the value, not the typed label.
96
+ - `Form` + `FormField` + `FormLabel` + `FormDescription` +
97
+ `FormMessage` — Phlex wrapper over Rails' `form_with` helper.
98
+ FormMessage auto-extracts ActiveModel errors via `model:` + `field:`
99
+ kwargs, with `text:` override for explicit messages. FormLabel uses
100
+ `for_:` (matching the standalone `Label` convention).
101
+ - `Command` + 7 sub-components — Cmd+K palette. Composition of Dialog
102
+ (modal) and Combobox (filterable list). The combobox controller is
103
+ mounted on an inner wrapper so it can't overwrite the dialog's
104
+ role / aria-modal / data-state attributes (a trap discovered during
105
+ smoke testing — `spreadProps` from `@zag-js/vanilla` strips existing
106
+ attrs). Selection-closes-palette is **deferred to v0.7** (the
107
+ `wabi--command` bridge can't reach across the dialog portal yet).
108
+
109
+ ### Docs
110
+
111
+ - Form docs page demonstrates a multi-field example (name + email + bio
112
+ + newsletter checkbox + submit) with client-side validation and
113
+ inline success / per-field error messages — no page reload.
114
+ - Sidebar preserves its scroll position across Turbo navigations and
115
+ highlights the active component with `bg-accent + font-semibold +
116
+ shadow-sm` via Tailwind's `aria-[current=page]:` arbitrary variant.
117
+ - Docs `Pagefind` indexer now derives `ROUTES_TO_INDEX` from
118
+ `ComponentsController::ALL` instead of a hand-maintained list, so
119
+ future component additions are crawled automatically.
120
+
121
+ ### Deferred to v0.7
122
+
123
+ - Combobox async items (server-side fetching via Turbo Frame or
124
+ callback).
125
+ - Combobox `ComboboxItemIndicator` wiring (exported but not consumed by
126
+ the controller render loop).
127
+ - Combobox `disabled:` on individual items (data attribute is set but
128
+ the collection doesn't pass `isItemDisabled`).
129
+ - Slider marks/ticks at specific track positions.
130
+ - Command palette item selection auto-closing the dialog (the
131
+ `wabi--command` bridge listener doesn't cross the dialog portal —
132
+ needs Stimulus Outlets or a document-level listener).
133
+ - Toast `@zag-js/toast` group machine retry + Sonner-style animations
134
+ (carried over from v0.5).
135
+ - Overlay controller boilerplate refactor (the now-six overlay
136
+ controllers share ~50 LOC of attach/restore + ref capture).
137
+ - Vestigial `wabi--<name>-target="portal"` wrappers cleanup.
138
+ - DropdownMenu multi-level submenu nesting.
139
+ - `wabi:update` three-way merge.
140
+
5
141
  ## 0.5.0 - 2026-05-27
6
142
 
7
143
  ### Breaking
data/lib/wabi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wabi
4
- VERSION = "0.5.0"
4
+ VERSION = "0.7.0"
5
5
  end
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.5.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Ortega