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 +4 -4
- data/README.md +10 -1
- data/app/assets/tailwind/lostcoords/ui/search.css +3 -1
- data/app/views/lostcoords/ui/components/_lc_confirm_sheet.html.erb +6 -4
- data/app/views/lostcoords/ui/components/_lc_search.html.erb +1 -1
- data/config/locales/en.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/config/locales/ja.yml +1 -0
- data/lib/lostcoords/ui/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 31a2d350b8b17edbaf8d35a06be137d9838dc7c7f974a74cdf971deae872587a
|
|
4
|
+
data.tar.gz: 9a8d18e452f6ce14c0dcae506a531c0d1163716f73256a00caca747e5766c395
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 %>
|
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/ja.yml
CHANGED