cutlass_js_rails 0.5.3 → 0.6.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
  SHA1:
3
- metadata.gz: 998762821ad4519336a26a534c4c866114e9c094
4
- data.tar.gz: e7da03ae901ab7bfe9b53510f166c91ba98dbc06
3
+ metadata.gz: f2b5c4e0010718f462177619c3126e917a0ce6d3
4
+ data.tar.gz: 52ca96db8d126048b1eb0eef4b4e05f80a865ac2
5
5
  SHA512:
6
- metadata.gz: e72fa20fc5836829edf923087ec2adbea0305bfdfdac626bc8e52fc374c38947f4cade9d63866b562463c175e7ebc7a317ebc390affa921aa9a00c95c0993dda
7
- data.tar.gz: 07ef2a0cb7dd9d78b3715a3ae34c3696b72788062472aa802010fc0a4caba6403c03b03f18bf8c1f330134a439bac5a2b9bb4e8ae186ecaeb5c2d20e5cf2fa1a
6
+ metadata.gz: 1320652b84f3f890b7bad18eee3cc0c9f56d23cdf9f311ebfbc7276634c4fc7dde2376dc9b22558196666d94389469f6e6bbe935ab064d6fa8b54f360a3d34ca
7
+ data.tar.gz: 6b99e29f8b7feb24776dff0235ab0965de8ba734ae459c77f80ed6454031e556cdbb519f82c743bd2d7d494857213c906660d14413deb1ab49cf91f4f88fea4d
data/README.md CHANGED
@@ -42,6 +42,7 @@ Add this line to your application's Gemfile:
42
42
  gem 'cutlass_js_rails'
43
43
  ```
44
44
 
45
+
45
46
  And then execute:
46
47
 
47
48
  $ bundle
@@ -1,5 +1,5 @@
1
1
  Cutlass.generateAllHTML = function(){
2
- Cutlass.generateHTML(['text', 'select', 'select--large', 'radio', 'toggler', 'link'])
2
+ Cutlass.generateHTML(['text', 'text--large', 'select', 'select--large', 'radio', 'toggler', 'toggler--reverse', 'link'])
3
3
  }
4
4
 
5
5
  Cutlass.generateHTML = function(inputTypes){
@@ -75,6 +75,34 @@ $cutlass-link-color: #ff7c14 !default;
75
75
  }
76
76
  }
77
77
 
78
+ // ========================================================
79
+ // TEXT INPUT LARGE
80
+ // ========================================================
81
+
82
+ .m-text--large{
83
+ border-bottom: 1px solid $cutlass-border-color;
84
+ border-top: 0;
85
+
86
+ &.Cutlass-item {
87
+ margin-left: $left-padding;
88
+ margin-right: $left-padding;
89
+ }
90
+
91
+ .Cutlass-label{
92
+ display: none;
93
+ }
94
+
95
+ .Cutlass-input-text--large{
96
+ @extend %Cutlass-input;
97
+ font-size: 20px;
98
+ position: relative;
99
+ color: $cutlass-input-color;
100
+ padding: 19px 0 19px 0;
101
+ background-color: transparent;
102
+ z-index: 5;
103
+ }
104
+ }
105
+
78
106
  // ========================================================
79
107
  // SELECT INPUT
80
108
  // ========================================================
@@ -163,6 +191,30 @@ $cutlass-link-color: #ff7c14 !default;
163
191
  margin-top: -16px;
164
192
  }
165
193
  }
194
+
195
+ // ========================================================
196
+ // TOGGLER INPUT REVERSE
197
+ // ========================================================
198
+ .m-toggler--reverse{
199
+ border-bottom: 0;
200
+ border-top: 0;
201
+
202
+ &.Cutlass-item {
203
+ margin: 20px $left-padding 20px $left-padding;
204
+ }
205
+ .Cutlass-label{
206
+ opacity: 1;
207
+ padding: 18px 0 19px ($right-padding+40);
208
+ display: block;
209
+ }
210
+ .switchery{
211
+ position:absolute;
212
+ left: 1px;
213
+ top: 50%;
214
+ margin-top: -16px;
215
+ }
216
+ }
217
+
166
218
  // ========================================================
167
219
  // RADIO INPUT
168
220
  // ========================================================
@@ -221,7 +273,7 @@ $cutlass-link-color: #ff7c14 !default;
221
273
  // MODIFIERS
222
274
  // ========================================================
223
275
  .m-always-active{
224
- .Cutlass-label{
276
+ .Cutlass-label {
225
277
  font-size: 12px;
226
278
  transform: translateY(-6px);
227
279
  }
@@ -279,6 +331,7 @@ $cutlass-link-color: #ff7c14 !default;
279
331
  background-color: $desert-storm;
280
332
  padding: 25px $left-padding 45px;
281
333
  }
334
+
282
335
  .Cutlass-submit{
283
336
  width: 100%;
284
337
  }
@@ -1,3 +1,3 @@
1
1
  module CutlassJsRails
2
- VERSION = '0.5.3'
2
+ VERSION = '0.6.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cutlass_js_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - chardos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-16 00:00:00.000000000 Z
11
+ date: 2016-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -56,14 +56,6 @@ files:
56
56
  - app/assets/javascripts/cutlass/helpers.js
57
57
  - app/assets/javascripts/cutlass/html_generation.js
58
58
  - app/assets/stylesheets/_cutlass.scss
59
- - app/views/cutlass/_date_field.html.erb
60
- - app/views/cutlass/_fake_gap.html.erb
61
- - app/views/cutlass/_link_field.html.erb
62
- - app/views/cutlass/_radio_field.html.erb
63
- - app/views/cutlass/_select_field.html.erb
64
- - app/views/cutlass/_select_field_large.html.erb
65
- - app/views/cutlass/_text_field.html.erb
66
- - app/views/cutlass/_toggle_field.html.erb
67
59
  - bin/console
68
60
  - bin/setup
69
61
  - cutlass_js_rails.gemspec
@@ -89,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
81
  version: '0'
90
82
  requirements: []
91
83
  rubyforge_project:
92
- rubygems_version: 2.6.4
84
+ rubygems_version: 2.5.1
93
85
  signing_key:
94
86
  specification_version: 4
95
87
  summary: Cuts down the size of inputs by reducing the prominence of labels once a
@@ -1,4 +0,0 @@
1
- <% css_classes = (defined? css_classes) ? css_classes : '' %>
2
- <% props = local_assigns.fetch(:props, {}) %>
3
- <% value = local_assigns.fetch(:value, '') %>
4
- <%= f.text_field code, class: "Cutlass-input-text #{css_classes}", 'data-label': label, value: value, type: 'tel', 'data-always-active': true, 'data-error': model.errors[code][0], **props.symbolize_keys %>
@@ -1,2 +0,0 @@
1
- </div>
2
- <div class="Card">
@@ -1 +0,0 @@
1
- <%= link_to label, path, class: 'Cutlass-input-link' %>
@@ -1,16 +0,0 @@
1
- <% code = local_assigns.fetch(:code) %>
2
- <% value = local_assigns.fetch(:value, model.loot_get(code)) %>
3
- <% props = local_assigns.fetch(:props, {}) %>
4
- <% options.map! do |option| %>
5
- <% OpenStruct.new(label: option[0], value: option[1]) %>
6
- <% end %>
7
-
8
- <div class="Cutlass-input-radio" data-label="<%= label %>" data-error=<%= model.errors[code][0] %>>
9
- <% count = 0 %>
10
- <%= f.collection_radio_buttons(code, options, 'value', 'label', {}, **{ class: 'icheck-me Cutlass-input-radio-single' }.merge(props).symbolize_keys) do |b| %>
11
- <div class="Cutlass-input-radio-single">
12
- <%= b.radio_button(checked: (b.value == value || options.first.value) ) %>
13
- <%= b.label %>
14
- </div>
15
- <% end %>
16
- </div>
@@ -1,5 +0,0 @@
1
- <% css_classes = (defined? css_classes) ? css_classes : '' %>
2
- <% code = local_assigns.fetch(:code) %>
3
- <% props = local_assigns.fetch(:props, {}) %>
4
- <% value = local_assigns.fetch(:value, '') %>
5
- <%= f.select code, options_for_select(options, selected: value), { selected: value }, { class: "Cutlass-input-select #{css_classes}", 'data-label': label, 'data-error': model&.errors ? model.errors[code][0] : nil }.merge(props) %>
@@ -1,5 +0,0 @@
1
- <% css_classes = (defined? css_classes) ? css_classes : '' %>
2
- <% code = local_assigns.fetch(:code) %>
3
- <% props = local_assigns.fetch(:props, {}) %>
4
- <% value = local_assigns.fetch(:value, '') %>
5
- <%= f.select code, options_for_select(options, selected: value), { selected: value }, { class: "Cutlass-input-select--large #{css_classes}", 'data-label': label, 'data-error': model&.errors ? model.errors[code][0] : nil }.merge(props) %>
@@ -1,6 +0,0 @@
1
- <% css_classes = (defined? css_classes) ? css_classes : '' %>
2
- <% props = (defined? props) ? props.to_h : {} %>
3
- <% code = local_assigns.fetch(:code) %>
4
- <% error_code = local_assigns.fetch(:error_code, code) || code %>
5
- <% value = local_assigns.fetch(:value, '') %>
6
- <%= f.text_field code, class: "Cutlass-input-text #{css_classes}", value: value, **({ 'data-label' => label, 'data-error' => model.errors[error_code][0] }.merge(props).symbolize_keys) %>
@@ -1,11 +0,0 @@
1
- <% css_classes = (defined? css_classes) ? css_classes : '' %>
2
- <% code = local_assigns.fetch(:code) %>
3
- <% label = local_assigns.fetch(:label) %>
4
- <% value = local_assigns.fetch(:value, '') %>
5
- <% description = local_assigns.fetch(:description, '') %>
6
- <%= f.check_box code, {
7
- class: "Cutlass-input-toggler js-conditional-switch #{css_classes}",
8
- checked: value == 'true',
9
- 'data-label': label,
10
- 'data-description': description
11
- }, 'true', 'false' %>