material-components-web 2.1.1 → 2.2.0

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: 9304bbb2c450d69f67083441c263d8784317a152851b5a791db22052cdafb269
4
- data.tar.gz: e6b7ced5ab4cfb5d75bdeac977ab0acc0f58255f4c592d90e213ad4072c9bf87
3
+ metadata.gz: 44f6c812bedeaddb1ffe540fa8606ca370ca96a96b5d598b5d0fb7269a8542c3
4
+ data.tar.gz: c229e7258bc14085e7eb609b0b3e18b7145d214b1593ca11b1303118a841997e
5
5
  SHA512:
6
- metadata.gz: 912844e63ebcb72de3ee2fd655e0d4a2a4be671be63d9049d4816a92803910e281a50140bb8685835551e6eb62348c7b91105aed935b24222a3230a1b539acfb
7
- data.tar.gz: c5babdf87c2a436f8b582ddd9a6220fd07af981e77eed1f4485988f4cd5aab42edfdddf171ff76c75d9611c2861946ddf4e47128051a265369ecce4b3e5d6607
6
+ metadata.gz: 18e89f6e40ed05d0e55d2a34f646ce8e6abeb15d7416f653404b8aa6374e5e9f4aad7013ca591caea2759e59961a95159f7eff501a7ee60989d33e4f8de58f01
7
+ data.tar.gz: 9372b28d1c0293b18c4fa5cd3bd354017c20f33857f5b8be049ca7b6e54b746ac8c1bb3af5f6a76509910936bb805eb33cd124f3a23b897747e2bc6276aef05b
@@ -4,6 +4,11 @@
4
4
 
5
5
  * nothing yet
6
6
 
7
+ ### 2.2.0 - 2018/02/18
8
+
9
+ * enhancements
10
+ * allow passing of various additional options to components
11
+
7
12
  ### 2.1.1 - 2018/02/08
8
13
 
9
14
  * enhancements
@@ -1,4 +1,4 @@
1
- <<%= options[:type] == 'permanent' ? 'nav' : 'aside' %> class="mdc-drawer mdc-drawer--<%= options[:type] %> <%= options[:class] %>" id="<%= options[:id] %>">
2
- <% if options[:above_toolbar] == 'permanent' %><div class="mdc-drawer__toolbar-spacer"></div><% end %>
1
+ <% type = options.delete :type %><% above_toolbar = options.delete :above_toolbar %><%= content_tag ( type == 'permanent' ? 'nav' : 'aside' ), options do %><% if above_toolbar == 'permanent' %>
2
+ <div class="mdc-drawer__toolbar-spacer"></div><% end %>
3
3
  <%= block %>
4
- </<%= options[:type] == 'permanent' ? 'nav' : 'aside' %>>
4
+ <% end %>
@@ -1,3 +1,3 @@
1
- <div class="mdc-form-field <%= options[:class] %>" id="<%= options[:id] %>">
1
+ <%= content_tag 'div', options do %>
2
2
  <%= block %>
3
- </div>
3
+ <% end %>
@@ -1,3 +1,3 @@
1
- <header class="mdc-toolbar <%= options[:class] %>" id="<%= options[:id] %>">
1
+ <%= content_tag 'header', options do %>
2
2
  <%= block %>
3
- </header>
3
+ <% end %>
@@ -5,11 +5,20 @@ module MaterialComponentsWeb
5
5
 
6
6
  initializer 'material-components-web.mozaic' do
7
7
  Mozaic.configure do |config|
8
- config.define_component 'mdc-checkbox', label: false, checked: false, disabled: false
9
- config.define_component 'mdc-drawer', type: 'permanent', above_toolbar: false
10
- config.define_component 'mdc-form-field'
11
- config.define_component 'mdc-radio', label: false, checked: false, disabled: false
12
- config.define_component 'mdc-toolbar', type: 'permanent', above_toolbar: false
8
+ config.define_component 'mdc-checkbox', class: '', label: false, checked: false, disabled: false
9
+ config.define_component 'mdc-drawer', class: '', type: 'permanent', above_toolbar: false do |options|
10
+ options[:class] << "mdc-drawer mdc-drawer--#{options[:type]}"
11
+ options
12
+ end
13
+ config.define_component 'mdc-form-field', class: '' do |options|
14
+ options[:class] << 'mdc-form-field'
15
+ options
16
+ end
17
+ config.define_component 'mdc-radio', class: '', label: false, checked: false, disabled: false
18
+ config.define_component 'mdc-toolbar', class: '', type: 'permanent', above_toolbar: false do |options|
19
+ options[:class] << 'mdc-toolbar'
20
+ options
21
+ end
13
22
  end
14
23
  end
15
24
 
@@ -1,5 +1,5 @@
1
1
  module MaterialComponentsWeb
2
2
 
3
- VERSION = '2.1.1'
3
+ VERSION = '2.2.0'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material-components-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-08 00:00:00.000000000 Z
11
+ date: 2018-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties