keystone_ui 0.66.0 → 0.67.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e4db5d4f9a772d0b8370d841b7c8a294e5be90cfa2d3264d99e9d1c25ed2ebd7
|
|
4
|
+
data.tar.gz: 53019277eb7eb6f1d7f55964e70790fb6742739e4e525709a61b0e7fc001bd87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf6f54d40679fef624f92677ea73a6a7d1e971e4862d7fe4a143c2ea3e719b2308cc53f3254791dbf433c24b80294e37c589cc69903579f31a7a8e6069835365
|
|
7
|
+
data.tar.gz: 26d67e1aca96aae7cc79faddc7476a6198007a96419a08c8b10cf2a7c1ea522af7d8220ca9920f6cd36165a84c6e911fc73c5596e023739e6aca8359e640371a
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
<% if link_tabs? %>
|
|
2
|
+
<nav class="<%= classes %>">
|
|
3
|
+
<% tabs.each do |tab| %>
|
|
4
|
+
<a href="<%= tab[:href] %>" data-turbo-action="replace" class="<%= tab[:current] ? tab_classes : TAB_BASE_CLASSES %>"<% if tab[:current] %> aria-current="page" data-active<% end %>><%= tab[:label] %></a>
|
|
5
|
+
<% end %>
|
|
6
|
+
</nav>
|
|
7
|
+
<%= content %>
|
|
8
|
+
<% else %>
|
|
1
9
|
<div data-controller="tab-switcher">
|
|
2
10
|
<div class="<%= classes %>">
|
|
3
11
|
<% tabs.each_with_index do |tab, index| %>
|
|
@@ -12,3 +20,4 @@
|
|
|
12
20
|
</div>
|
|
13
21
|
<%= content %>
|
|
14
22
|
</div>
|
|
23
|
+
<% end %>
|
data/lib/keystone_ui/version.rb
CHANGED
|
@@ -629,6 +629,12 @@ two exceptions: `ui_page`'s `padding:` treats any value other than `:none` as
|
|
|
629
629
|
rendered below the tabs. The first tab is active on load, and a click
|
|
630
630
|
sends a `tab-switcher:change` event with the clicked index. Showing and
|
|
631
631
|
hiding the panels is the app's code.
|
|
632
|
+
- `ui_tab_switcher(tabs:)` also takes link tabs, an array of hashes
|
|
633
|
+
`{ label:, href:, current: }`. Each is drawn as a link to its `href`, the
|
|
634
|
+
one with `current: true` is drawn active with `aria-current="page"`, and
|
|
635
|
+
following a tab is a Turbo visit that replaces the history entry. The
|
|
636
|
+
app reads the chosen tab from its params and draws only that tab's
|
|
637
|
+
content in the block.
|
|
632
638
|
- `ui_swipe_deck(items:, empty_title: "All done!", empty_subtitle: nil)`
|
|
633
639
|
takes a block yielding the deck, where `deck.item { |item| ... }` renders
|
|
634
640
|
one card's face. Accepting sends a bubbling `swipe-deck:complete` event
|