layered-ui-rails 0.27.0 → 0.27.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9dfe5e770b8f6bbc52666be84b646ebe235fdf2cf1e15f7d9759fb1b880bc5be
4
- data.tar.gz: d829e69ff914ace72a2e80da0ff468459dfbac0942cea828a6e28693ac46126c
3
+ metadata.gz: 0f32e59505e51afc783591c0606b94ac58c3b5aa8e779a5cc1b8a4f10719f248
4
+ data.tar.gz: 417fb70c0b6c2d22ae8a9c995fe9985f3567e0641f11a35e49dbd380ec13c1d0
5
5
  SHA512:
6
- metadata.gz: e288640f0616aa44e630c238e17eb5213ab7ddedf0d7d3cd334b010481f51b4726c681c969dc6ed0b6ccece28471e9b8c84fffa9dba713b395f9eec1fdf2f747
7
- data.tar.gz: 6c3e63f142ccdff6917c7e792f8cdf94f0446ac50134db3b639ea96faff354cb5b138178133e5b0acff3f7234beed2a20d71876e6143de1e2550e8e9cf60978e
6
+ metadata.gz: 5deced9a4b782c4986b7a41b7966130e4b307a289836f0e925bbaa4c75b28c8d6052e676004e336488b1a190f3a43d4f48a506473f373c5c525a84bebadff0eb
7
+ data.tar.gz: 6b886185ad17ebf81477cc967a3a04c27a35a62321e17638bd5980dd24b88eedbb8face1d5459551f97f0b95d98515e779348ad73fb350216a67532c88eff0ff
data/CHANGELOG.md CHANGED
@@ -2,34 +2,36 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. This project follows [Semantic Versioning](https://semver.org/).
4
4
 
5
+ ## [0.27.1] - 2026-10-04
6
+
7
+ ### Fixed
8
+
9
+ - Top-level navigation items are now spaced like the items inside a section. `.l-ui-navigation__links` used a 2px gap against a section's 8px; both now use 8px. The extra `mt-2` between adjacent `.l-ui-navigation__section`s is gone, so sections sit the same 8px apart.
10
+
5
11
  ## [0.27.0] - 2026-09-20
6
12
 
7
13
  ### Added
8
14
 
9
- - The search box can search as you type. Pass `live: true` with a `turbo_frame:` and `l_ui_search_form` debounces a submit as the field changes, so results narrow without a button to press. Each search replaces the history entry rather than pushing one, so Back leaves the collection instead of replaying the term letter by letter - the URL still carries the term, so a search stays shareable and survives a reload. The action is set on the form, which Turbo reads before the frame's own, so sort links and pagination inside the same frame still advance.
10
- - The field carries its own clear button, built into its trailing edge and shown only once there is something to clear. Escape in the field clears it too, and focus returns to the input rather than falling to the body. `clear: false` omits the button; a string names it.
11
- - `l_ui_search_control` renders the control - field, clear button and submit - on its own, for a caller who passes a block to `l_ui_search_form` and builds the row by hand.
12
- - `count:` has the size of the result set announced after each search. Without it nothing is announced: a screen reader is otherwise told nothing when results change with no button press. The message goes to the layout's live region, which sits outside every frame, since a live region replaced in the same render as its own text is not reliably announced.
15
+ - `l_ui_search_form` can search as you type. Pass `live: true` with a `turbo_frame:` and the field debounces a submit as it changes. Each search replaces the history entry, so Back leaves the collection rather than replaying the term letter by letter, and the URL still carries the term. It is opt-in rather than inferred from `turbo_frame:`, which only says where a response lands; `live: true` without a frame raises.
16
+ - `count:` announces the size of the result set after each search. Without it, a screen reader is told nothing when results change - so `live: true` with no `count:` logs a warning in development.
13
17
  - `min_chars:` holds a search back until the term is worth asking about.
14
- - The caret survives the frame render that answers a search, so a typed word is never interrupted mid-letter.
15
- - `page_param:` names the collection's Pagy page key, which is reset when a search carries the other collections' params across a submit. It was previously guessed from the Ransack `search_key` (`users_q` -> `users_page`), which is a convention nothing enforces: a host whose `page_key:` did not follow it leaked the page param into every preserved submit.
18
+ - Both describe typing, so passing either alongside `live: false` raises rather than being quietly dropped.
19
+ - A live search form is a `search` landmark, labelled from `label:`.
20
+ - `page_param:` names the collection's Pagy page key, which is reset when a search carries other collections' params across a submit. It was previously guessed from the Ransack `search_key`, which nothing enforces.
21
+ - `l_ui_search_control` renders the control - field, clear button and submit - on its own, for a caller building the row by hand. It defaults to `live: false`, and its `clear:` follows `live:`, since a hand-built form may not carry the controller; pass `clear: true` for one that does but should not submit as you type.
16
22
 
17
23
  ### Fixed
18
24
 
19
- - The clear button keeps up with the field on a form that does not search as you type. Nothing ran on a keystroke there, so it stayed as the server rendered it: still showing over a field the user had just emptied, and still hidden when they typed a term into an empty one.
20
- - A response no longer pulls focus back into the search field. Whether the field had focus was a snapshot taken when the request went out, so a user who tabbed to something outside the frame while it was in flight was dragged back (WCAG 3.2.5). Focus is now taken back only when the render left it nowhere - the input that held it was destroyed with the frame - which a control outside the frame, still alive and still focused, is not.
21
- - Clearing the field no longer risks the old term coming back. Clearing changes the field without an input event, and the submit it asks for is declined when the empty term is already the one in flight, so nothing recorded the clear; the pending response then restored the text that had been typed and searched for it again.
22
- - The result count is announced against the term it actually counted. A response that answered `a` while `ada` was being typed announced its count as results for `ada`. Announcements now wait until the field and the answered term agree, which is the point at which the count is the answer to what the user can see.
25
+ - The clear button keeps up with the field on a form that does not search as you type.
26
+ - A response no longer pulls focus back into the search field, which dragged back a user who had tabbed elsewhere while it was in flight (WCAG 3.2.5). Focus is taken back only when the render left it nowhere.
27
+ - Clearing the field no longer risks the old term coming back from a response still in flight.
28
+ - The result count is announced against the term it actually counted, not one typed since.
29
+ - The caret survives the frame render that answers a search, so a typed word is never interrupted mid-letter.
23
30
 
24
31
  ### Changed
25
32
 
26
- - **Breaking.** Searching as you type is opt-in. `live:` defaults to `false` and is no longer inferred from `turbo_frame:`: a frame says where a response lands, and whether typing should submit at all is a separate decision about the collection. `live: true` without a `turbo_frame:` raises. Existing framed call sites keep their current behaviour and need `live: true` added to take up the new one.
27
- - **Breaking.** `count:` and `min_chars:` describe typing, so they mean nothing to a form that submits when asked to: passing one alongside `live: false` now raises rather than being quietly dropped - the same treatment `l_ui_combobox` gives an option it cannot take.
28
- - **Breaking.** `l_ui_search_control` defaults to `live: false`, matching `l_ui_search_form`. It exists for hand-built forms, which are exactly the forms that may not carry the controller, so the default that works without one is the right one. Its `clear:` follows `live:`, since `live: true` vouches for the controller being present; pass `clear: true` for a form that carries the controller but should not submit as you type.
29
- - `live: true` with no `count:` logs a warning in development. Nothing is announced when results change without it, which is an accessibility hole rather than a default, and it had no symptom a sighted developer would notice.
30
- - **Breaking.** `button:` now defaults to `nil`. In live mode that renders a submit which is present but neither seen nor tabbed to - it is what Enter in the field and a browser with no JavaScript submit through. A form that submits only when asked to still gets a visible button, since it needs one that can be pressed; pass a string to name it.
31
- - **Breaking.** `clear:` now means the clear button inside the field, and defaults to on whenever `turbo_frame:` is given - it follows the `l-ui--search-form` controller, which goes on every framed form to preserve the other scopes, not live mode. A form that submits when asked to clears from inside the field too. Asking for `clear:` without a frame raises, since there is then no controller to drive it. The separate outline clear button is **gone**, along with the "requires an explicit `url:`" error it raised; the controller's `clear` action remains for a hand-built clear link beside an unframed form.
32
- - **Breaking.** A live search form is now a `search` landmark, labelled from `label:`.
33
+ - **Breaking.** `clear:` now means a clear button built into the field's trailing edge, shown only once there is something to clear, and Escape clears the field too. The separate outline clear button beside the form is **gone**, along with its "requires an explicit `url:`" error. It defaults to on whenever `turbo_frame:` is given - it follows the `l-ui--search-form` controller, which goes on every framed form - so a framed form gains a clear button it did not have; pass `clear: false` to omit it, or a string to name it. `clear:` without a frame now raises, since there is then no controller to drive it.
34
+ - `button:` now defaults to `nil` rather than `"Search"`. A form that submits when asked to still renders a visible button, so existing call sites are unchanged; in live mode the submit is present but neither seen nor tabbed to - Enter and a browser with no JavaScript submit through it. Pass a string to name it.
33
35
 
34
36
  ## [0.26.0] - 2026-09-19
35
37
 
@@ -1077,10 +1077,6 @@
1077
1077
  .l-ui-navigation__section {
1078
1078
  @apply flex flex-col;
1079
1079
 
1080
- & + .l-ui-navigation__section {
1081
- @apply mt-2;
1082
- }
1083
-
1084
1080
  & + .l-ui-navigation__section--separated {
1085
1081
  @apply mt-3 pt-3
1086
1082
  border-t border-border;
@@ -1151,7 +1147,7 @@
1151
1147
  .l-ui-navigation__links {
1152
1148
  @apply flex flex-col flex-1 overflow-y-auto
1153
1149
  min-h-0
1154
- gap-0.5 px-3 py-3;
1150
+ gap-2 px-3 py-3;
1155
1151
  }
1156
1152
 
1157
1153
  /* Height-expand slide applied while the section is opening; the controller
@@ -1,5 +1,5 @@
1
1
  module Layered
2
2
  module Ui
3
- VERSION = "0.27.0"
3
+ VERSION = "0.27.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: layered-ui-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.27.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - layered.ai
@@ -330,7 +330,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
330
330
  - !ruby/object:Gem::Version
331
331
  version: '0'
332
332
  requirements: []
333
- rubygems_version: 4.0.6
333
+ rubygems_version: 3.6.9
334
334
  specification_version: 4
335
335
  summary: Open source, minimalist Tailwind-based UI system for Rails with responsive,
336
336
  accessible components and light/dark themes.