lostcoords-ui 0.14.0 → 0.14.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: '04927955e774659aeb96601df9709ce28b3da2dbe5a01b825ef40dfcdac4d734'
4
- data.tar.gz: 56effa1904b9810b0dc2962b3f76bdf9fdaabc8217d94343c4ce60d78caaaa6e
3
+ metadata.gz: 31a2d350b8b17edbaf8d35a06be137d9838dc7c7f974a74cdf971deae872587a
4
+ data.tar.gz: 9a8d18e452f6ce14c0dcae506a531c0d1163716f73256a00caca747e5766c395
5
5
  SHA512:
6
- metadata.gz: c9d662bdbbe4c811716da94da3994301d8e2be14a7ebed8fa7bc1079c8fe2a3bdb474e921039cc3ee9b059d3d9d8bd5f94d5591f372bcbc45c365d68bb8b9827
7
- data.tar.gz: 550982086a4c06631fefa58593a5706e3e96f40cb297ddc96e3ea7ed6363bf8224625c8e8b1aab278aaf8c232b74dccbc7cb8ec1863fa756455cabaa90efe28a
6
+ metadata.gz: d26f83e72eca4a78f711a953d7eaccc579847a5efd75022e3caa309df140897ccc8eb4d181c99592c2e18b874d8f2d8a6c34ab735b477decd01c8891716a1ee0
7
+ data.tar.gz: eb92a40b4396e4e78cd1fa6e502c6d7d83e63ecd7735e3e6da1fcb9586e266e4d8093855d13e135b6eb9007a53ce28bd0e8805e9b6314858ec137b89926e159e
data/README.md CHANGED
@@ -170,6 +170,15 @@ Omit `only` to register every library controller. Unknown identifiers raise befo
170
170
  registered, and repeated calls on the same application keep later overrides, so register defaults
171
171
  before application overrides.
172
172
 
173
+ ## Changes in 0.14.1
174
+
175
+ Two phone fixes, with nothing to edit:
176
+
177
+ - **The `lc_search` trigger is a plain icon button on phones**, with no fill until it is hovered, so it
178
+ matches the icon buttons beside it in a bar. From `sm` up it is the same filled pill.
179
+ - **`lc_confirm_sheet` has the ✕ on phones**, at the top start like every other sheet, with the message
180
+ centred in the title bar. It cancels, as Cancel does. Its label is `lostcoords.ui.confirm.close`.
181
+
173
182
  ## Changes in 0.14.0
174
183
 
175
184
  Phone sheets have one look. One option to drop, and the rest needs no edit:
@@ -1041,7 +1050,7 @@ from the page the link opens. Inside a paragraph, keep `content:` to phrasing el
1041
1050
 
1042
1051
  ### Search
1043
1052
 
1044
- `lc_search` renders a search trigger, a pill with the ⌘K hint that shrinks to an icon on phones, and
1053
+ `lc_search` renders a search trigger, a pill with the ⌘K hint that is a plain icon button on phones, and
1045
1054
  the full-screen search it opens. Attributes go to the trigger, which is what sits in your layout.
1046
1055
  Build results from `lc_search_group` and `lc_search_result`.
1047
1056
 
@@ -1,4 +1,4 @@
1
- /* lc_search: a pill trigger that opens a full-screen search over a
1
+ /* lc_search: a trigger, a pill from sm up, that opens a full-screen search over a
2
2
  blurred page. The controller animates it open and closed. */
3
3
  @layer components {
4
4
  .lc-search-trigger {
@@ -20,10 +20,12 @@
20
20
  /* The bar grows out of the trigger, so the trigger steps aside while search is open. */
21
21
  [data-slot="search"][data-open] & { opacity: 0; }
22
22
 
23
+ /* On phones it is a plain icon button, like the ones beside it in a bar. */
23
24
  @media (width < 40rem) {
24
25
  justify-content: center;
25
26
  inline-size: var(--spacing-control-sm);
26
27
  padding-inline: 0;
28
+ background: transparent;
27
29
  }
28
30
 
29
31
  @media (width >= 40rem) { inline-size: calc(var(--spacing) * 64); }
@@ -1,10 +1,12 @@
1
1
  <%# locals: (id:, attributes:) %>
2
- <%= lc_sheet(as: :dialog, **attributes) do %>
3
- <form method="dialog" class="flex flex-col gap-inset p-inset" data-slot="confirm-sheet-content">
4
- <div class="flex flex-col gap-tight max-sm:text-center">
2
+ <%# On phones the message sits in the sheet's title bar, with the ✕ every sheet closes from. It cancels. %>
3
+ <%= lc_sheet(as: :dialog, **attributes) do |sheet| %>
4
+ <form method="dialog" class="flex flex-col gap-inset p-inset max-sm:pt-0" data-slot="confirm-sheet-content">
5
+ <div class="flex flex-col gap-tight max-sm:-mx-inset max-sm:min-h-14 max-sm:justify-center max-sm:px-14 max-sm:py-2 max-sm:text-center" data-slot="confirm-sheet-header">
5
6
  <p id="<%= id %>-message" class="<%= lc_heading_class(size: :subheading) %>" data-slot="confirm-sheet-message"></p>
6
- <p id="<%= id %>-description" class="<%= lc_text_class(size: :small, tone: :muted) %>" data-slot="confirm-sheet-description" hidden></p>
7
+ <p id="<%= id %>-description" class="<%= lc_text_class(size: :small, tone: :muted, extra: "max-sm:text-balance") %>" data-slot="confirm-sheet-description" hidden></p>
7
8
  </div>
9
+ <%= sheet.close lc_t("lostcoords.ui.confirm.close"), size: :sm, type: "submit", value: "cancel", class: "sm:hidden", data: { slot: "confirm-sheet-dismiss" } %>
8
10
  <div class="grid grid-cols-2 gap-related" data-slot="confirm-sheet-actions">
9
11
  <button type="submit" value="cancel" class="<%= lc_button_class(variant: :secondary, block: true) %>" data-slot="confirm-sheet-cancel"><%= lc_t("lostcoords.ui.confirm.cancel") %></button>
10
12
  <button type="submit" value="confirm" class="<%= lc_button_class(variant: :primary, block: true) %>" data-slot="confirm-sheet-accept" data-variant="primary"><%= lc_t("lostcoords.ui.confirm.accept") %></button>
@@ -1,7 +1,7 @@
1
1
  <%# locals: (id:, label:, src:, param:, placeholder:, trigger:, empty:, prompt:, shortcut:, attributes:, content:) %>
2
2
  <div class="contents" data-slot="search" data-controller="lc-search" data-action="turbo:before-cache@document->lc-search#reset" data-lc-search-src-value="<%= src %>" data-lc-search-param-value="<%= param %>" data-lc-search-empty-value="<%= empty %>" data-lc-search-one-value="<%= lc_t("lostcoords.ui.search.results.one", count: "%{count}") %>" data-lc-search-other-value="<%= lc_t("lostcoords.ui.search.results.other", count: "%{count}") %>">
3
3
  <%= tag.button(**attributes) do %>
4
- <%= lc_icon "magnifying-glass", options: { class: "size-4 shrink-0", "aria-hidden": true } %>
4
+ <%= lc_icon "magnifying-glass", options: { class: "size-4 shrink-0 max-sm:size-4.5", "aria-hidden": true } %>
5
5
  <span class="flex-1 truncate text-start max-sm:sr-only"><%= trigger %></span>
6
6
  <% if shortcut %><%= lc_kbd shortcut, class: "hidden bg-transparent px-0 any-pointer-fine:sm:inline", aria: { hidden: true } %><% end %>
7
7
  <% end %>
@@ -15,6 +15,7 @@ en:
15
15
  close: "Close %{title}"
16
16
  confirm:
17
17
  cancel: "Cancel"
18
+ close: "Close"
18
19
  accept: "Confirm"
19
20
  menu:
20
21
  label: "Actions"
@@ -15,6 +15,7 @@ es:
15
15
  close: "Cerrar %{title}"
16
16
  confirm:
17
17
  cancel: "Cancelar"
18
+ close: "Cerrar"
18
19
  accept: "Confirmar"
19
20
  menu:
20
21
  label: "Acciones"
@@ -15,6 +15,7 @@ ja:
15
15
  close: "%{title}を閉じる"
16
16
  confirm:
17
17
  cancel: "キャンセル"
18
+ close: "閉じる"
18
19
  accept: "OK"
19
20
  menu:
20
21
  label: "操作"
@@ -1,5 +1,5 @@
1
1
  module Lostcoords
2
2
  module Ui
3
- VERSION = "0.14.0"
3
+ VERSION = "0.14.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lostcoords-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lost Coordinates