optics_view_components 0.1.8 → 0.1.9

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: db165928ba46774fcb8412d71cd02ae0c4e066e323bff171c7bedaae7f7e1cf9
4
- data.tar.gz: 482b366146b1e0ff14e8cd2c6c5819e51374ae142bb969b7f520f8f68a5de220
3
+ metadata.gz: 6288af3ac32f24e288467c22bea1cac3ced752a18d7cd7ff817cc927b57f3c06
4
+ data.tar.gz: 9cb97927ebe42807ae5990d3bc5eda34ace45842569d744994cdab0a726e8ee6
5
5
  SHA512:
6
- metadata.gz: e8783ca32282a2e8f8f45b97b443198be8507f65d1c48cc773fe6f4ddd5ef737bdfa3a865b7591101b57fbf700e9d1af96858443f1ad3883338713f662ad2b7d
7
- data.tar.gz: e21dd5880c6d94568f53c3202b154e7702d809fe7535e31134b3aef6c9ee56c8ce06a60de87a1069fb4381b4ee993c4bf5bb56b2d2ec3442720a479a7838d4c9
6
+ metadata.gz: 82352039a648222ccb8721c529569cd7b1adbdc416b6e86d34c1ee611f724a9b6170f4b70843edbc3d4677af59509f1d1dfa870fc2e2b58bfc2af0991aef4661
7
+ data.tar.gz: 9295d7c6b41b3148bb14bd1ce9569686c90fc9d246c48ac083952feb4b43064b7e73aad9ad8eb003fbc5add4808035c8ff278bccc40b33bddcab90f83f877dc1
data/Gemfile CHANGED
@@ -9,6 +9,8 @@ gem 'rails', '~> 7.0'
9
9
 
10
10
  gem 'bootsnap', require: false
11
11
  gem 'lookbook'
12
+ gem 'puma', '~> 6.3'
13
+ gem 'sprockets-rails'
12
14
  gem 'rake', '~> 13.0'
13
15
  gem 'rspec', '~> 3.0'
14
16
  gem 'rubocop', '~> 1.21'
data/Gemfile.lock CHANGED
@@ -138,6 +138,8 @@ GEM
138
138
  net-smtp (0.3.3)
139
139
  net-protocol
140
140
  nio4r (2.5.9)
141
+ nokogiri (1.15.1-arm64-darwin)
142
+ racc (~> 1.4)
141
143
  nokogiri (1.15.1-x86_64-linux)
142
144
  racc (~> 1.4)
143
145
  parallel (1.23.0)
@@ -147,6 +149,8 @@ GEM
147
149
  coderay (~> 1.1)
148
150
  method_source (~> 1.0)
149
151
  public_suffix (5.0.1)
152
+ puma (6.3.1)
153
+ nio4r (~> 2.0)
150
154
  racc (1.6.2)
151
155
  rack (2.2.7)
152
156
  rack-test (2.1.0)
@@ -242,6 +246,7 @@ GEM
242
246
  zeitwerk (2.6.8)
243
247
 
244
248
  PLATFORMS
249
+ arm64-darwin-21
245
250
  x86_64-linux
246
251
 
247
252
  DEPENDENCIES
@@ -250,6 +255,7 @@ DEPENDENCIES
250
255
  lookbook
251
256
  optics_view_components!
252
257
  pry
258
+ puma (~> 6.3)
253
259
  rails (~> 7.0)
254
260
  rake (~> 13.0)
255
261
  rspec (~> 3.0)
data/Procfile ADDED
@@ -0,0 +1 @@
1
+ web: bundle exec rackup -p ${PORT:-5000} config.ru
@@ -40,12 +40,13 @@ module Optics
40
40
 
41
41
  class Brand < ApplicationViewComponent
42
42
  accepts :url
43
- accepts :img_src
43
+ accepts :image_source
44
+ accepts :image_label
44
45
  accepts :name
45
46
 
46
47
  def call
47
48
  link_to(url, class: 'sidebar__brand') do
48
- name || image_tag(img_src)
49
+ name || image_tag(image_source, alt: image_label)
49
50
  end
50
51
  end
51
52
  end
data/config.ru ADDED
@@ -0,0 +1,3 @@
1
+ require './demo/config/environment'
2
+ run Demo::Application
3
+
data/demo/Gemfile CHANGED
@@ -6,7 +6,7 @@ gem 'rails', '~> 7.0.4', '>= 7.0.4.3'
6
6
 
7
7
  gem 'bootsnap', require: false
8
8
  gem 'cssbundling-rails', '~> 1.1'
9
- gem 'puma', '~> 6.0'
9
+ gem 'puma', '~> 6.3'
10
10
  gem 'sprockets-rails'
11
11
 
12
12
  gem 'lookbook'
data/demo/Gemfile.lock CHANGED
@@ -133,10 +133,12 @@ GEM
133
133
  net-smtp (0.3.3)
134
134
  net-protocol
135
135
  nio4r (2.5.9)
136
- nokogiri (1.15.1-x86_64-linux)
136
+ nokogiri (1.15.3-arm64-darwin)
137
+ racc (~> 1.4)
138
+ nokogiri (1.15.3-x86_64-linux)
137
139
  racc (~> 1.4)
138
140
  public_suffix (5.0.1)
139
- puma (6.2.2)
141
+ puma (6.3.1)
140
142
  nio4r (~> 2.0)
141
143
  racc (1.6.2)
142
144
  rack (2.2.7)
@@ -200,6 +202,7 @@ GEM
200
202
  zeitwerk (2.6.8)
201
203
 
202
204
  PLATFORMS
205
+ arm64-darwin-22
203
206
  x86_64-linux
204
207
 
205
208
  DEPENDENCIES
@@ -208,7 +211,7 @@ DEPENDENCIES
208
211
  debug
209
212
  lookbook
210
213
  optics_view_components!
211
- puma (~> 6.0)
214
+ puma (~> 6.3)
212
215
  rails (~> 7.0.4, >= 7.0.4.3)
213
216
  sprockets-rails
214
217
  web-console
@@ -25,8 +25,9 @@ module Demo
25
25
  config.load_defaults 7.0
26
26
 
27
27
  config.view_component.default_preview_layout = 'preview'
28
- config.view_component.preview_paths << Rails.root.join('..', 'previews')
28
+ config.view_component.preview_paths = [Optics::ViewComponents::Engine.root.join('previews')]
29
29
  config.lookbook.project_name = "Optics ViewComponents v#{Optics::ViewComponents::VERSION}"
30
30
  config.lookbook.component_paths = [Optics::ViewComponents::Engine.root.join('app', 'components')]
31
+ config.view_component.show_previews = true
31
32
  end
32
33
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Optics
4
4
  module ViewComponents
5
- VERSION = '0.1.8'
5
+ VERSION = '0.1.9'
6
6
  end
7
7
  end
@@ -1,4 +1,4 @@
1
- <%= component('optics/button', active:, border:, disabled:, icon:, icon_with_label:, id:, pill:, size:, url:) do |component| %>
1
+ <%= component('optics/button', active:, border:, disabled:, icon:, icon_with_label:, id:, pill:, size:, variant:, url:) do |component| %>
2
2
  <%= component('optics/icon', name: 'home') %>
3
3
  Button
4
4
  <% end %>
@@ -54,7 +54,7 @@ module Optics
54
54
  variant: 'default',
55
55
  url: nil
56
56
  )
57
- render_with_template(locals: { active:, border:, disabled:, icon:, icon_with_label:, id:, pill:, size:, url: })
57
+ render_with_template(locals: { active:, border:, disabled:, icon:, icon_with_label:, id:, pill:, size:, variant:, url: })
58
58
  end
59
59
  end
60
60
  end
metadata CHANGED
@@ -1,14 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optics_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reed Law
8
+ - Wes Rich
9
+ - Jeremy Walton
8
10
  autorequire:
9
11
  bindir: bin
10
12
  cert_chain: []
11
- date: 2023-07-19 00:00:00.000000000 Z
13
+ date: 2023-10-16 00:00:00.000000000 Z
12
14
  dependencies:
13
15
  - !ruby/object:Gem::Dependency
14
16
  name: view_component
@@ -112,7 +114,8 @@ files:
112
114
  - CHANGELOG.md
113
115
  - Gemfile
114
116
  - Gemfile.lock
115
- - LICENSE.txt
117
+ - LICENSE
118
+ - Procfile
116
119
  - README.md
117
120
  - Rakefile
118
121
  - app/components/optics/application_view_component.rb
@@ -120,6 +123,7 @@ files:
120
123
  - app/components/optics/button/component.rb
121
124
  - app/components/optics/icon/component.rb
122
125
  - app/components/optics/sidebar/component.rb
126
+ - config.ru
123
127
  - demo/.ruby-version
124
128
  - demo/Gemfile
125
129
  - demo/Gemfile.lock
File without changes