keystone_ui 0.39.0 → 0.40.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: 50be7dcd619f5461a74ec4c8b7d2d6e09deb955af9b17817b1ef690f842f5a07
|
|
4
|
+
data.tar.gz: 1148f6cf6bba00291658cec6c0672eeae3500093ebbffec67bbbc412fabe72eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 884b4a4d0b72cf66bc76d5e94af4322a65f1b82aa81a5fba5b6b3f3fbad865524d6dd7fb75dce0a33d1fec8e88e41691a4a57b045e5d920751b3c6fe1453e545
|
|
7
|
+
data.tar.gz: ca9f20d6ef81510e165a8c6a938e6a2cc0cb37dfc1c426b97f17e1695686521727d5e0336809084761d8c0e59f90aef425fe912878d79661e44fa89e4d12137b
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
<% sidebar = capture do %>
|
|
5
5
|
<nav class="<%= SIDEBAR_CLASSES %>">
|
|
6
6
|
<% if logo? %>
|
|
7
|
-
<div><%= logo %></div>
|
|
7
|
+
<div class="<%= SIDEBAR_LOGO_CLASSES %>"><%= logo %></div>
|
|
8
8
|
<% end %>
|
|
9
9
|
<% groups.each do |group| %>
|
|
10
|
-
<
|
|
11
|
-
<
|
|
10
|
+
<details class="<%= SIDEBAR_GROUP_CLASSES %>"<%= " open" if group.active %>>
|
|
11
|
+
<summary class="<%= sidebar_group_label_classes(group) %>"><%= group.label %></summary>
|
|
12
12
|
<% group.tabs.each do |tab| %>
|
|
13
13
|
<a class="<%= sidebar_tab_classes(tab) %>" href="<%= tab.href %>"><%= tab.label %></a>
|
|
14
14
|
<% end %>
|
|
15
|
-
</
|
|
15
|
+
</details>
|
|
16
16
|
<% end %>
|
|
17
17
|
<% if menus? %>
|
|
18
18
|
<div class="<%= SIDEBAR_MENUS_CLASSES %>"><%= menus %></div>
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
<%= sidebar unless sidebar_first? %>
|
|
26
26
|
</div>
|
|
27
27
|
<% else %>
|
|
28
|
+
<div>
|
|
28
29
|
<div class="<%= TOP_BAR_CLASSES %>">
|
|
29
30
|
<%= render Keystone::Ui::NavbarComponent.new(sticky: false) do |navbar| %>
|
|
30
31
|
<% if logo? %>
|
|
@@ -45,4 +46,5 @@
|
|
|
45
46
|
<% end %>
|
|
46
47
|
</div>
|
|
47
48
|
<%= content %>
|
|
49
|
+
</div>
|
|
48
50
|
<% end %>
|
|
@@ -8,11 +8,16 @@ module Keystone
|
|
|
8
8
|
TOP_BAR_CLASSES = "hidden lg:block sticky top-0 z-40"
|
|
9
9
|
SIDEBAR_ROW_CLASSES = "lg:flex"
|
|
10
10
|
SIDEBAR_CLASSES = "ks-sidebar hidden lg:flex lg:sticky lg:top-0 lg:h-screen shrink-0 overflow-y-auto"
|
|
11
|
+
SIDEBAR_LOGO_CLASSES = "ks-sidebar-logo"
|
|
11
12
|
SIDEBAR_GROUP_CLASSES = "flex flex-col"
|
|
12
13
|
SIDEBAR_GROUP_LABEL_CLASSES = "ks-sidebar-group-label"
|
|
13
14
|
SIDEBAR_TAB_CLASSES = "ks-sidebar-tab"
|
|
14
15
|
ACTIVE_CLASS = "active"
|
|
15
|
-
SIDEBAR_MENUS_CLASSES =
|
|
16
|
+
SIDEBAR_MENUS_CLASSES = [
|
|
17
|
+
"mt-auto [&_[data-dropdown-target=menu]]:static [&_[data-controller~=dropdown]]:flex-wrap [&_[data-dropdown-target=menu]]:basis-full",
|
|
18
|
+
"[&_[data-dropdown-target=menu].hidden]:block [&_[data-dropdown-target=menu].hidden]:h-0 [&_[data-dropdown-target=menu].hidden]:overflow-hidden",
|
|
19
|
+
"[&_[data-dropdown-target=menu].hidden]:my-0 [&_[data-dropdown-target=menu].hidden]:py-0 [&_[data-dropdown-target=menu].hidden]:invisible"
|
|
20
|
+
].join(" ")
|
|
16
21
|
SIDEBAR_CONTENT_CLASSES = "min-w-0 flex-1"
|
|
17
22
|
SIDEBAR_PLACEMENTS = %w[left right].freeze
|
|
18
23
|
|
data/lib/keystone_ui/version.rb
CHANGED
|
@@ -206,8 +206,15 @@ two exceptions: `ui_page`'s `padding:` treats any value other than `:none` as
|
|
|
206
206
|
- When the preference supplied for `:navigation` holds
|
|
207
207
|
`{ "placement" => "left" }` or `"right"`, it draws a sidebar on that side
|
|
208
208
|
from `lg:` up instead, with each group's label above its tabs, the logo at
|
|
209
|
-
its top and the menus at its bottom.
|
|
210
|
-
|
|
209
|
+
its top and the menus at its bottom. A menu there opens in place: the
|
|
210
|
+
`data-dropdown-target="menu"` panel inside a `data-controller="dropdown"`
|
|
211
|
+
element drops onto its own line below its button inside the sidebar, even
|
|
212
|
+
when the app's own CSS positions it absolutely, as long as that CSS sits
|
|
213
|
+
in a layer below Tailwind's utilities such as `components`. A closed
|
|
214
|
+
panel (the `hidden` class) stays invisible and out of the tab order but
|
|
215
|
+
still counts toward the sidebar's width, so opening a menu never
|
|
216
|
+
changes the sidebar's width. Any other
|
|
217
|
+
placement draws the top bar, whose menus still open as dropdowns. An `"order"` list of `{ "group" => label, "tabs" => [tab key strings] }`
|
|
211
218
|
entries draws the named groups and tabs first, in that order, then the
|
|
212
219
|
rest in declared order, ignoring names no longer declared.
|
|
213
220
|
- When the app sets `config.current_tab_supplier`, the tab whose key it
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: keystone_ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.40.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tyler Schneider
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.15.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.15.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: view_component
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|