mtl 1.0.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/app/assets/javascripts/mtl.js +1 -1
  4. data/app/assets/javascripts/mtl/dropdown.coffee +3 -2
  5. data/app/assets/javascripts/mtl/modal.coffee +6 -11
  6. data/app/assets/stylesheets/mtl/extend/_dropdown.scss +0 -1
  7. data/app/assets/stylesheets/mtl/extend/_forms.scss +13 -3
  8. data/lib/mtl/version.rb +3 -2
  9. data/package.json +1 -1
  10. data/vendor/assets/javascripts/materialize/buttons.js +181 -5
  11. data/vendor/assets/javascripts/materialize/carousel.js +1 -1
  12. data/vendor/assets/javascripts/materialize/chips.js +75 -53
  13. data/vendor/assets/javascripts/materialize/dropdown.js +20 -20
  14. data/vendor/assets/javascripts/materialize/forms.js +3 -2
  15. data/vendor/assets/javascripts/materialize/global.js +56 -3
  16. data/vendor/assets/javascripts/materialize/init.js +3 -2
  17. data/vendor/assets/javascripts/materialize/modal.js +184 -0
  18. data/vendor/assets/javascripts/materialize/parallax.js +2 -2
  19. data/vendor/assets/javascripts/materialize/scrollspy.js +6 -5
  20. data/vendor/assets/javascripts/materialize/sideNav.js +193 -175
  21. data/vendor/assets/javascripts/materialize/tabs.js +30 -14
  22. data/vendor/assets/javascripts/materialize/toasts.js +29 -28
  23. data/vendor/assets/javascripts/materialize/tooltip.js +6 -0
  24. data/vendor/assets/stylesheets/materialize/_buttons.scss +78 -8
  25. data/vendor/assets/stylesheets/materialize/_cards.scss +2 -0
  26. data/vendor/assets/stylesheets/materialize/_chips.scss +15 -6
  27. data/vendor/assets/stylesheets/materialize/_dropdown.scss +9 -1
  28. data/vendor/assets/stylesheets/materialize/_global.scss +34 -15
  29. data/vendor/assets/stylesheets/materialize/_modal.scss +1 -1
  30. data/vendor/assets/stylesheets/materialize/_navbar.scss +11 -3
  31. data/vendor/assets/stylesheets/materialize/_sideNav.scss +6 -17
  32. data/vendor/assets/stylesheets/materialize/_tabs.scss +62 -19
  33. data/vendor/assets/stylesheets/materialize/_variables.scss +82 -82
  34. data/vendor/assets/stylesheets/materialize/_waves.scss +1 -1
  35. data/vendor/assets/stylesheets/materialize/forms/_input-fields.scss +13 -0
  36. data/vendor/assets/stylesheets/materialize/forms/_radio-buttons.scss +0 -2
  37. data/vendor/assets/stylesheets/materialize/forms/_select.scss +6 -1
  38. metadata +3 -3
  39. data/vendor/assets/javascripts/materialize/leanModal.js +0 -192
@@ -34,7 +34,7 @@
34
34
  // text-decoration: none;
35
35
  z-index: 1;
36
36
  will-change: opacity, transform;
37
- transition: all .3s ease-out;
37
+ transition: .3s ease-out;
38
38
 
39
39
  .waves-ripple {
40
40
  position: absolute;
@@ -123,6 +123,18 @@ textarea.materialize-textarea {
123
123
 
124
124
  // Styling for input field wrapper
125
125
  .input-field {
126
+ // Inline styles
127
+ &.inline {
128
+ display: inline-block;
129
+ vertical-align: middle;
130
+ margin-left: 5px;
131
+
132
+ input,
133
+ .select-dropdown {
134
+ margin-bottom: 1rem;
135
+ }
136
+ }
137
+
126
138
  // Gutter spacing
127
139
  &.col {
128
140
  label {
@@ -142,6 +154,7 @@ textarea.materialize-textarea {
142
154
  color: $input-border-color;
143
155
  position: absolute;
144
156
  top: 0.8rem;
157
+ left: 0;
145
158
  font-size: 1rem;
146
159
  cursor: text;
147
160
  transition: .2s ease-out;
@@ -53,7 +53,6 @@
53
53
  }
54
54
 
55
55
  [type="radio"]:not(:checked) + label:after {
56
- z-index: -1;
57
56
  transform: scale(0);
58
57
  }
59
58
 
@@ -71,7 +70,6 @@
71
70
  [type="radio"]:checked + label:after,
72
71
  [type="radio"].with-gap:checked + label:after {
73
72
  background-color: $radio-fill-color;
74
- z-index: 0;
75
73
  }
76
74
 
77
75
  [type="radio"]:checked + label:after {
@@ -40,8 +40,13 @@ select {
40
40
  color: initial;
41
41
  position: absolute;
42
42
  right: 0;
43
- top: 16px;
43
+ top: 0;
44
+ bottom: 0;
45
+ height: 10px;
46
+ margin: auto 0;
44
47
  font-size: 10px;
48
+ line-height: 10px;
49
+
45
50
  &.disabled {
46
51
  color: $input-disabled-color;
47
52
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mtl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Plüss
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2016-10-24 00:00:00.000000000 Z
13
+ date: 2017-01-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -227,8 +227,8 @@ files:
227
227
  - vendor/assets/javascripts/materialize/jquery.easing.1.3.js
228
228
  - vendor/assets/javascripts/materialize/jquery.hammer.js
229
229
  - vendor/assets/javascripts/materialize/jquery.timeago.min.js
230
- - vendor/assets/javascripts/materialize/leanModal.js
231
230
  - vendor/assets/javascripts/materialize/materialbox.js
231
+ - vendor/assets/javascripts/materialize/modal.js
232
232
  - vendor/assets/javascripts/materialize/parallax.js
233
233
  - vendor/assets/javascripts/materialize/prism.js
234
234
  - vendor/assets/javascripts/materialize/pushpin.js
@@ -1,192 +0,0 @@
1
- (function($) {
2
- var _stack = 0,
3
- _lastID = 0,
4
- _generateID = function() {
5
- _lastID++;
6
- return 'materialize-lean-overlay-' + _lastID;
7
- };
8
-
9
- $.fn.extend({
10
- openModal: function(options) {
11
-
12
- var $body = $('body');
13
- var oldWidth = $body.innerWidth();
14
- $body.css('overflow', 'hidden');
15
- $body.width(oldWidth);
16
-
17
- var defaults = {
18
- opacity: 0.5,
19
- in_duration: 350,
20
- out_duration: 250,
21
- ready: undefined,
22
- complete: undefined,
23
- dismissible: true,
24
- starting_top: '4%',
25
- ending_top: '10%'
26
- };
27
- var $modal = $(this);
28
-
29
- if ($modal.hasClass('open')) {
30
- return;
31
- }
32
-
33
- var overlayID = _generateID();
34
- var $overlay = $('<div class="lean-overlay"></div>');
35
- lStack = (++_stack);
36
-
37
- // Store a reference of the overlay
38
- $overlay.attr('id', overlayID).css('z-index', 1000 + lStack * 2);
39
- $modal.data('overlay-id', overlayID).css('z-index', 1000 + lStack * 2 + 1);
40
- $modal.addClass('open');
41
-
42
- $("body").append($overlay);
43
-
44
- // Override defaults
45
- options = $.extend(defaults, options);
46
-
47
- if (options.dismissible) {
48
- $overlay.click(function() {
49
- $modal.closeModal(options);
50
- });
51
- // Return on ESC
52
- $(document).on('keyup.leanModal' + overlayID, function(e) {
53
- if (e.keyCode === 27) { // ESC key
54
- $modal.closeModal(options);
55
- }
56
- });
57
- }
58
-
59
- $modal.find(".modal-close").on('click.close', function(e) {
60
- $modal.closeModal(options);
61
- });
62
-
63
- $overlay.css({ display : "block", opacity : 0 });
64
-
65
- $modal.css({
66
- display : "block",
67
- opacity: 0
68
- });
69
-
70
- $overlay.velocity({opacity: options.opacity}, {duration: options.in_duration, queue: false, ease: "easeOutCubic"});
71
- $modal.data('associated-overlay', $overlay[0]);
72
-
73
- // Define Bottom Sheet animation
74
- if ($modal.hasClass('bottom-sheet')) {
75
- $modal.velocity({bottom: "0", opacity: 1}, {
76
- duration: options.in_duration,
77
- queue: false,
78
- ease: "easeOutCubic",
79
- // Handle modal ready callback
80
- complete: function() {
81
- if (typeof(options.ready) === "function") {
82
- options.ready();
83
- }
84
- }
85
- });
86
- }
87
- else {
88
- $.Velocity.hook($modal, "scaleX", 0.7);
89
- $modal.css({ top: options.starting_top });
90
- $modal.velocity({top: options.ending_top, opacity: 1, scaleX: '1'}, {
91
- duration: options.in_duration,
92
- queue: false,
93
- ease: "easeOutCubic",
94
- // Handle modal ready callback
95
- complete: function() {
96
- if (typeof(options.ready) === "function") {
97
- options.ready();
98
- }
99
- }
100
- });
101
- }
102
-
103
-
104
- }
105
- });
106
-
107
- $.fn.extend({
108
- closeModal: function(options) {
109
- var defaults = {
110
- out_duration: 250,
111
- complete: undefined
112
- };
113
- var $modal = $(this);
114
- var overlayID = $modal.data('overlay-id');
115
- var $overlay = $('#' + overlayID);
116
- $modal.removeClass('open');
117
-
118
- options = $.extend(defaults, options);
119
-
120
- // Enable scrolling
121
- $('body').css({
122
- overflow: '',
123
- width: ''
124
- });
125
-
126
- $modal.find('.modal-close').off('click.close');
127
- $(document).off('keyup.leanModal' + overlayID);
128
-
129
- $overlay.velocity( { opacity: 0}, {duration: options.out_duration, queue: false, ease: "easeOutQuart"});
130
-
131
-
132
- // Define Bottom Sheet animation
133
- if ($modal.hasClass('bottom-sheet')) {
134
- $modal.velocity({bottom: "-100%", opacity: 0}, {
135
- duration: options.out_duration,
136
- queue: false,
137
- ease: "easeOutCubic",
138
- // Handle modal ready callback
139
- complete: function() {
140
- $overlay.css({display:"none"});
141
-
142
- // Call complete callback
143
- if (typeof(options.complete) === "function") {
144
- options.complete();
145
- }
146
- $overlay.remove();
147
- _stack--;
148
- }
149
- });
150
- }
151
- else {
152
- $modal.velocity(
153
- { top: options.starting_top, opacity: 0, scaleX: 0.7}, {
154
- duration: options.out_duration,
155
- complete:
156
- function() {
157
-
158
- $(this).css('display', 'none');
159
- // Call complete callback
160
- if (typeof(options.complete) === "function") {
161
- options.complete();
162
- }
163
- $overlay.remove();
164
- _stack--;
165
- }
166
- }
167
- );
168
- }
169
- }
170
- });
171
-
172
- $.fn.extend({
173
- leanModal: function(option) {
174
- return this.each(function() {
175
-
176
- var defaults = {
177
- starting_top: '4%'
178
- },
179
- // Override defaults
180
- options = $.extend(defaults, option);
181
-
182
- // Close Handlers
183
- $(this).click(function(e) {
184
- options.starting_top = ($(this).offset().top - $(window).scrollTop()) /1.15;
185
- var modal_id = $(this).attr("href") || '#' + $(this).data('target');
186
- $(modal_id).openModal(options);
187
- e.preventDefault();
188
- }); // done set on click
189
- }); // done return
190
- }
191
- });
192
- })(jQuery);