polaris_view_components 0.13.1 → 0.13.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9cfcb6498a30aca8f195a4545af6835ff1cdfaa3dbbbbb7ba97faf322e9375bd
4
- data.tar.gz: eba9e9e064bb0252c5a9fe665d0b4974e319bf3923b9aeccc3bcb679ed354eb8
3
+ metadata.gz: 4cbe2969821b1e97f67438c8b85d8b3a2a1e349364749bceb7e07036e635340d
4
+ data.tar.gz: a2c0dc705e81c64131df2a9b67963d08b0f4ef7609eaba8539921b739c5266b3
5
5
  SHA512:
6
- metadata.gz: 19c595f6d66f5e688dc440ea365e9a762c505bb5934e4ca4efefc9a879c81d5f85e50f87369e591e6fa4ffcd4d5f669be442dec663d4f9f49b8f09885689df99
7
- data.tar.gz: e3aac6d472d0eee03ae6a9dec0f9279b8d013616d4ed31bdc6568b250605c6f4e567493192803821af1bd10bcc74b07ffbffcef101d1b546dd7fa784d7bb629c
6
+ metadata.gz: 39d0334ca5d4cac8981bf046474a0bc86d399f2a74941edaf89624efd870724d2e9e7160abbb638093846017a7a6760bb3fdd41109ee85e31defae11aa749166
7
+ data.tar.gz: 2e330a644a4e71be69e5ecdc911c274162f8548f81e1d5d438b1a245c2506ecd78392a2f099f16dae235737f8bfee67d8f23cee42728268fd061be266a48c7b3
data/README.md CHANGED
@@ -26,10 +26,10 @@ Render Polaris ViewComponents:
26
26
 
27
27
  ## Installation
28
28
 
29
- Add to `Gemfile`:
29
+ Add `polaris_view_components` to your Gemfile:
30
30
 
31
- ```ruby
32
- gem "polaris_view_components"
31
+ ```bash
32
+ bundle add polaris_view_components
33
33
  ```
34
34
 
35
35
  Run installer:
@@ -18,9 +18,12 @@
18
18
  <% end %>
19
19
 
20
20
  <div class="Polaris-TopBar__Contents">
21
- <%# FIXME: Not implemented yet %>
22
- <div class="Polaris-TopBar__SearchField"></div>
23
- <div class="Polaris-TopBar__SecondaryMenu"></div>
21
+ <div class="Polaris-TopBar__SearchField">
22
+ <%= search_field %>
23
+ </div>
24
+ <div class="Polaris-TopBar__SecondaryMenu">
25
+ <%= secondary_menu %>
26
+ </div>
24
27
  <div>
25
28
  <div class="Polaris-TopBar-Menu__ActivatorWrapper">
26
29
  <%= user_menu %>
@@ -1,5 +1,7 @@
1
1
  class Polaris::Frame::TopBarComponent < Polaris::Component
2
2
  renders_one :user_menu, Polaris::TopBar::UserMenuComponent
3
+ renders_one :search_field
4
+ renders_one :secondary_menu
3
5
 
4
6
  def initialize(logo:, **system_arguments)
5
7
  @logo = logo.is_a?(Hash) ? Polaris::Logo.new(**logo) : logo
@@ -30,7 +30,7 @@ if IMPORTMAP_BINSTUB.exist?
30
30
 
31
31
  say "Pin polaris_view_components"
32
32
  append_to_file IMPORTMAP_CONFIG_PATH do
33
- 'pin "polaris-view-components", to: "polaris_view_components.js"\n'
33
+ %(pin "polaris-view-components", to: "polaris_view_components.js"\n)
34
34
  end
35
35
  else
36
36
  package_json = File.read(Rails.root.join("package.json"))
@@ -36,7 +36,10 @@ module Polaris
36
36
 
37
37
  initializer "polaris_view_components.helpers" do
38
38
  ActiveSupport.on_load(:action_controller_base) do
39
+ require "polaris/view_helper"
39
40
  helper Polaris::ViewHelper
41
+
42
+ require "polaris/url_helper"
40
43
  helper Polaris::UrlHelper
41
44
  end
42
45
  end
@@ -1,5 +1,5 @@
1
1
  module Polaris
2
2
  module ViewComponents
3
- VERSION = "0.13.1"
3
+ VERSION = "0.13.3"
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: 0.13.1
4
+ version: 0.13.3
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-04-02 00:00:00.000000000 Z
12
+ date: 2023-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails