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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78a6ae16cf340437e15af81ff47953f94b1f391af829678035890d5e990e1beb
4
- data.tar.gz: 07b81a71aaea4b0609c5e3479bb531076df8f65fb589f69aab40181029791414
3
+ metadata.gz: 3dc9a731d4c3dc7615b6148d0ac7980afce53a98c9c31dafcc6993e73716ee3c
4
+ data.tar.gz: c5321641a35f94d11b8a1769e61f65c31156454d1a3d06f223780f9022f9015f
5
5
  SHA512:
6
- metadata.gz: 6ad09a8dc61def4c7fb827d312e19d46b920bb79e804468ca1e9bc5cdac341755ec56ade63230368ff7890fe830d01a7f991116f263e1d03b056a10b9a2c3676
7
- data.tar.gz: e503ca46cc74f5c8ed8b87d73b517c3915f82c0147a99385fc58fa4f60a46596399149ca857b9348cbc2037fa5d77c67b12072684c397750833c2442361f681a
6
+ metadata.gz: aa891ef13f9226354394f89da3896e2c6e42cb7d3b07b1b2076508303a523087ea48945011acf9cd84c7ccea565b2d6f5fb356185eb44dec4997189579a551a1
7
+ data.tar.gz: 35ebfe95fd139e6979ee622a1c362f08896e462c33ecfdc9c5cef6d2159b4115dbd9d8b8f1792b83399a03ec179e8c654dd4b6270a3172b114a27d1c87170f0c
@@ -0,0 +1,5 @@
1
+ <%= polaris_card(sectioned: false, style: "padding-top: 1em; padding-bottom: 1em;") do |card| %>
2
+ <% items.each do |item| %>
3
+ <%= item %>
4
+ <% end %>
5
+ <% end %>
@@ -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: true) do |group| %>
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
@@ -1,5 +1,5 @@
1
1
  module Polaris
2
2
  module ViewComponents
3
- VERSION = "1.3.0"
3
+ VERSION = "1.4.0"
4
4
  end
5
5
  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.3.0
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-03 00:00:00.000000000 Z
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