material-components-web 2.0.4 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/views/mozaic/_mdc-checkbox.html.erb +3 -3
- data/app/views/mozaic/_mdc-drawer.html.erb +4 -0
- data/app/views/mozaic/_mdc-radio.html.erb +2 -2
- data/app/views/mozaic/_mdc-toolbar.html.erb +3 -0
- data/lib/material_components_web/railtie.rb +4 -2
- data/lib/material_components_web/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: ef2e64346e32f4efea3716b1de2f3854428e6e4234cd80a650ec7a7dead83e93
|
4
|
+
data.tar.gz: 07c3aafe17b1163de87188f589d0d48b1aaf8ba793d03b1c622fe1ecce7ae033
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19e416e0b6b07c1090742b2e1c5aaa1c449c2aae17d382fb70f760bc7fc181201da4a14cdfa0bf9881795a25182184b2d6fca5aa58b1d11cca75ac6829a6cc84
|
7
|
+
data.tar.gz: 03f45f08c3df010e35c16c2fe61c33e55e588b8d2ee62281f74d6f0589ff8574df94ee79a8108068a83cf8dd86e972c26abfc286d81a29c6f300adcd08837857
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="mdc-checkbox<%= ' mdc-checkbox--disabled' if options[:disabled] %>">
|
2
|
-
<input value="0" type="hidden" name="<%= options[:
|
3
|
-
<input type="checkbox" class="mdc-checkbox__native-control"<%= ' checked="true"' if options[:checked] %> value="1" name="<%= options[:
|
2
|
+
<input value="0" type="hidden" name="<%= options[:class] ? options[:class].to_s + '[' + options[:attribute].to_s + ']' : options[:attribute].to_s %>" />
|
3
|
+
<input type="checkbox" class="mdc-checkbox__native-control"<%= ' checked="true"' if options[:checked] %> value="1" name="<%= options[:class] ? options[:class].to_s + '[' + options[:attribute].to_s + ']' : options[:attribute].to_s %>" id="<%= options[:class] ? options[:class].to_s + '_' + options[:attribute].to_s : options[:attribute].to_s %>" />
|
4
4
|
<div class="mdc-checkbox__background">
|
5
5
|
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
|
6
6
|
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
|
@@ -8,4 +8,4 @@
|
|
8
8
|
<div class="mdc-checkbox__mixedmark"></div>
|
9
9
|
</div>
|
10
10
|
</div>
|
11
|
-
<% if options[:label] %><label for="<%= options[:
|
11
|
+
<% if options[:label] %><label for="<%= options[:class] ? options[:class].to_s + '_' + options[:attribute].to_s : options[:attribute].to_s %>"><%= options[:label].html_safe %></label><% end %>
|
@@ -0,0 +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 %>
|
3
|
+
<%= block %>
|
4
|
+
</<%= options[:type] == 'permanent' ? 'nav' : 'aside' %>>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<div class="mdc-radio<%= ' mdc-radio--disabled' if options[:disabled] %>">
|
2
|
-
<input class="mdc-radio__native-control" type="radio"<%= ' checked="true"' if options[:checked] %> value="<%= options[:value] %>" name="<%= options[:
|
2
|
+
<input class="mdc-radio__native-control" type="radio"<%= ' checked="true"' if options[:checked] %> value="<%= options[:value] %>" name="<%= options[:class] ? options[:class].to_s + '[' + options[:attribute].to_s + ']' : options[:attribute].to_s %>" id="<%= options[:class] ? options[:class].to_s + '_' + options[:attribute].to_s + '_' + options[:value].to_s : options[:attribute].to_s + '_' + options[:value].to_s %>" />
|
3
3
|
<div class="mdc-radio__background">
|
4
4
|
<div class="mdc-radio__outer-circle"></div>
|
5
5
|
<div class="mdc-radio__inner-circle"></div>
|
6
6
|
</div>
|
7
7
|
</div>
|
8
|
-
<% if options[:label] %><label for="<%= options[:
|
8
|
+
<% if options[:label] %><label for="<%= options[:class] ? options[:class].to_s + '_' + options[:attribute].to_s + '_' + options[:value].to_s : options[:attribute].to_s + '_' + options[:value].to_s %>"><%= options[:label].html_safe %></label><% end %>
|
@@ -5,9 +5,11 @@ module MaterialComponentsWeb
|
|
5
5
|
|
6
6
|
initializer 'material-components-web.mozaic' do
|
7
7
|
Mozaic.configure do |config|
|
8
|
-
config.define_component 'mdc-checkbox',
|
8
|
+
config.define_component 'mdc-checkbox', label: false, checked: false, disabled: false
|
9
|
+
config.define_component 'mdc-drawer', type: 'permanent', above_toolbar: false
|
9
10
|
config.define_component 'mdc-form-field'
|
10
|
-
config.define_component 'mdc-radio',
|
11
|
+
config.define_component 'mdc-radio', label: false, checked: false, disabled: false
|
12
|
+
config.define_component 'mdc-toolbar', type: 'permanent', above_toolbar: false
|
11
13
|
end
|
12
14
|
end
|
13
15
|
|
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.0
|
4
|
+
version: 2.1.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-
|
11
|
+
date: 2018-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -77,8 +77,10 @@ files:
|
|
77
77
|
- LICENSE
|
78
78
|
- README.md
|
79
79
|
- app/views/mozaic/_mdc-checkbox.html.erb
|
80
|
+
- app/views/mozaic/_mdc-drawer.html.erb
|
80
81
|
- app/views/mozaic/_mdc-form-field.html.erb
|
81
82
|
- app/views/mozaic/_mdc-radio.html.erb
|
83
|
+
- app/views/mozaic/_mdc-toolbar.html.erb
|
82
84
|
- lib/material-components-web.rb
|
83
85
|
- lib/material_components_web/engine.rb
|
84
86
|
- lib/material_components_web/railtie.rb
|