polaris_view_components 1.3.0 → 1.4.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 +4 -4
- data/app/components/polaris/navigation_list_component.html.erb +5 -0
- data/app/components/polaris/navigation_list_component.rb +13 -0
- data/app/components/polaris/page_component.html.erb +6 -1
- data/app/components/polaris/page_component.rb +2 -0
- data/app/helpers/polaris/view_helper.rb +1 -0
- data/lib/polaris/view_components/engine.rb +0 -3
- data/lib/polaris/view_components/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dc9a731d4c3dc7615b6148d0ac7980afce53a98c9c31dafcc6993e73716ee3c
|
4
|
+
data.tar.gz: c5321641a35f94d11b8a1769e61f65c31156454d1a3d06f223780f9022f9015f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa891ef13f9226354394f89da3896e2c6e42cb7d3b07b1b2076508303a523087ea48945011acf9cd84c7ccea565b2d6f5fb356185eb44dec4997189579a551a1
|
7
|
+
data.tar.gz: 35ebfe95fd139e6979ee622a1c362f08896e462c33ecfdc9c5cef6d2159b4115dbd9d8b8f1792b83399a03ec179e8c654dd4b6270a3172b114a27d1c87170f0c
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Polaris
|
2
|
+
class NavigationListComponent < Polaris::Component
|
3
|
+
renders_many :items, Polaris::Navigation::ItemComponent
|
4
|
+
|
5
|
+
def initialize(**system_arguments)
|
6
|
+
@system_arguments = system_arguments
|
7
|
+
end
|
8
|
+
|
9
|
+
def renders?
|
10
|
+
items.any?
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -108,12 +108,17 @@
|
|
108
108
|
<% if has_pagination? %>
|
109
109
|
<div class="Polaris-Page-Header__PaginationWrapper">
|
110
110
|
<nav aria-label="Pagination">
|
111
|
-
<%= polaris_button_group(segmented:
|
111
|
+
<%= polaris_button_group(segmented: @pagination_label.blank?) do |group| %>
|
112
112
|
<% group.with_item do %>
|
113
113
|
<%= polaris_button(url: @prev_url, outline: true, disabled: @prev_url.blank?) do |button| %>
|
114
114
|
<% button.with_icon(name: "ChevronLeftMinor") %>
|
115
115
|
<% end %>
|
116
116
|
<% end %>
|
117
|
+
<% if @pagination_label.present? %>
|
118
|
+
<% group.with_item do %>
|
119
|
+
<div aria-live="polite"><%= @pagination_label %></div>
|
120
|
+
<% end %>
|
121
|
+
<% end %>
|
117
122
|
<% group.with_item do %>
|
118
123
|
<%= polaris_button(url: @next_url, outline: true, disabled: @next_url.blank?) do |button| %>
|
119
124
|
<% button.with_icon(name: "ChevronRightMinor") %>
|
@@ -18,6 +18,7 @@ module Polaris
|
|
18
18
|
back_url: nil,
|
19
19
|
prev_url: nil,
|
20
20
|
next_url: nil,
|
21
|
+
pagination_label: nil,
|
21
22
|
narrow_width: false,
|
22
23
|
full_width: false,
|
23
24
|
divider: false,
|
@@ -30,6 +31,7 @@ module Polaris
|
|
30
31
|
@back_url = back_url
|
31
32
|
@prev_url = prev_url
|
32
33
|
@next_url = next_url
|
34
|
+
@pagination_label = pagination_label
|
33
35
|
@narrow_width = narrow_width
|
34
36
|
@full_width = full_width
|
35
37
|
@divider = divider
|
@@ -49,6 +49,7 @@ module Polaris
|
|
49
49
|
modal: "Polaris::ModalComponent",
|
50
50
|
modal_section: "Polaris::Modal::SectionComponent",
|
51
51
|
navigation: "Polaris::NavigationComponent",
|
52
|
+
navigation_list: "Polaris::NavigationListComponent",
|
52
53
|
option_list: "Polaris::OptionListComponent",
|
53
54
|
page: "Polaris::PageComponent",
|
54
55
|
page_actions: "Polaris::PageActionsComponent",
|
@@ -33,10 +33,7 @@ module Polaris
|
|
33
33
|
|
34
34
|
initializer "polaris_view_components.helpers" do
|
35
35
|
ActiveSupport.on_load(:action_controller_base) do
|
36
|
-
require "polaris/view_helper"
|
37
36
|
helper Polaris::ViewHelper
|
38
|
-
|
39
|
-
require "polaris/url_helper"
|
40
37
|
helper Polaris::UrlHelper
|
41
38
|
end
|
42
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polaris_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Gamble
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-11-
|
12
|
+
date: 2023-11-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -860,6 +860,8 @@ files:
|
|
860
860
|
- app/components/polaris/navigation/section_component.rb
|
861
861
|
- app/components/polaris/navigation_component.html.erb
|
862
862
|
- app/components/polaris/navigation_component.rb
|
863
|
+
- app/components/polaris/navigation_list_component.html.erb
|
864
|
+
- app/components/polaris/navigation_list_component.rb
|
863
865
|
- app/components/polaris/option_list/checkbox_component.html.erb
|
864
866
|
- app/components/polaris/option_list/checkbox_component.rb
|
865
867
|
- app/components/polaris/option_list/option_component.rb
|