materialize-sass 0.97.0 → 1.0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +5 -5
  2. data/.gitattributes +1 -0
  3. data/.gitignore +3 -0
  4. data/README.md +48 -10
  5. data/Rakefile +129 -1
  6. data/assets/javascripts/materialize/anime.min.js +417 -0
  7. data/assets/javascripts/materialize/autocomplete.js +504 -0
  8. data/assets/javascripts/materialize/buttons.js +409 -0
  9. data/assets/javascripts/materialize/cards.js +34 -0
  10. data/assets/javascripts/materialize/carousel.js +797 -0
  11. data/assets/javascripts/materialize/cash.js +990 -0
  12. data/assets/javascripts/materialize/characterCounter.js +180 -0
  13. data/assets/javascripts/materialize/chips.js +564 -0
  14. data/assets/javascripts/materialize/collapsible.js +337 -0
  15. data/assets/javascripts/materialize/component.js +57 -0
  16. data/assets/javascripts/materialize/datepicker.js +935 -0
  17. data/assets/javascripts/materialize/dropdown.js +659 -0
  18. data/assets/javascripts/materialize/extras/nouislider.js +2147 -0
  19. data/assets/javascripts/materialize/extras/nouislider.min.js +1 -0
  20. data/assets/javascripts/materialize/forms.js +244 -0
  21. data/assets/javascripts/materialize/global.js +408 -0
  22. data/assets/javascripts/materialize/materialbox.js +513 -0
  23. data/assets/javascripts/materialize/modal.js +449 -0
  24. data/assets/javascripts/materialize/parallax.js +173 -0
  25. data/assets/javascripts/materialize/pushpin.js +179 -0
  26. data/assets/javascripts/materialize/range.js +310 -0
  27. data/assets/javascripts/materialize/scrollspy.js +328 -0
  28. data/assets/javascripts/materialize/select.js +497 -0
  29. data/assets/javascripts/materialize/sidenav.js +655 -0
  30. data/assets/javascripts/materialize/slider.js +424 -0
  31. data/assets/javascripts/materialize/tabs.js +476 -0
  32. data/assets/javascripts/materialize/tapTarget.js +364 -0
  33. data/assets/javascripts/materialize/timepicker.js +647 -0
  34. data/assets/javascripts/materialize/toasts.js +355 -0
  35. data/assets/javascripts/materialize/tooltip.js +351 -0
  36. data/{app/assets → assets}/javascripts/materialize/waves.js +42 -47
  37. data/assets/javascripts/materialize-sprockets.js +29 -0
  38. data/assets/javascripts/materialize.js +12374 -0
  39. data/assets/stylesheets/materialize/components/_badges.scss +55 -0
  40. data/assets/stylesheets/materialize/components/_buttons.scss +322 -0
  41. data/{app/assets → assets}/stylesheets/materialize/components/_cards.scss +72 -29
  42. data/assets/stylesheets/materialize/components/_carousel.scss +90 -0
  43. data/assets/stylesheets/materialize/components/_chips.scss +90 -0
  44. data/{app/assets → assets}/stylesheets/materialize/components/_collapsible.scss +23 -17
  45. data/assets/stylesheets/materialize/components/_color-classes.scss +32 -0
  46. data/{app/assets/stylesheets/materialize/components/_color.scss → assets/stylesheets/materialize/components/_color-variables.scss} +22 -64
  47. data/assets/stylesheets/materialize/components/_datepicker.scss +191 -0
  48. data/assets/stylesheets/materialize/components/_dropdown.scss +85 -0
  49. data/{app/assets → assets}/stylesheets/materialize/components/_global.scss +197 -144
  50. data/{app/assets → assets}/stylesheets/materialize/components/_grid.scss +57 -18
  51. data/assets/stylesheets/materialize/components/_icons-material-design.scss +5 -0
  52. data/{app/assets → assets}/stylesheets/materialize/components/_materialbox.scss +15 -13
  53. data/{app/assets → assets}/stylesheets/materialize/components/_modal.scss +18 -14
  54. data/{app/assets → assets}/stylesheets/materialize/components/_navbar.scss +89 -25
  55. data/assets/stylesheets/materialize/components/_normalize.scss +447 -0
  56. data/{app/assets → assets}/stylesheets/materialize/components/_preloader.scss +5 -3
  57. data/assets/stylesheets/materialize/components/_pulse.scss +34 -0
  58. data/assets/stylesheets/materialize/components/_sidenav.scss +208 -0
  59. data/{app/assets → assets}/stylesheets/materialize/components/_slider.scss +2 -2
  60. data/{app/assets → assets}/stylesheets/materialize/components/_table_of_contents.scss +5 -5
  61. data/assets/stylesheets/materialize/components/_tabs.scss +99 -0
  62. data/assets/stylesheets/materialize/components/_tapTarget.scss +103 -0
  63. data/assets/stylesheets/materialize/components/_timepicker.scss +183 -0
  64. data/{app/assets → assets}/stylesheets/materialize/components/_toast.scss +17 -22
  65. data/assets/stylesheets/materialize/components/_tooltip.scss +32 -0
  66. data/assets/stylesheets/materialize/components/_transitions.scss +13 -0
  67. data/{app/assets → assets}/stylesheets/materialize/components/_typography.scss +11 -9
  68. data/assets/stylesheets/materialize/components/_variables.scss +349 -0
  69. data/assets/stylesheets/materialize/components/_waves.scss +114 -0
  70. data/assets/stylesheets/materialize/components/forms/_checkboxes.scss +200 -0
  71. data/assets/stylesheets/materialize/components/forms/_file-input.scss +44 -0
  72. data/assets/stylesheets/materialize/components/forms/_forms.scss +22 -0
  73. data/assets/stylesheets/materialize/components/forms/_input-fields.scss +354 -0
  74. data/assets/stylesheets/materialize/components/forms/_radio-buttons.scss +115 -0
  75. data/assets/stylesheets/materialize/components/forms/_range.scss +161 -0
  76. data/assets/stylesheets/materialize/components/forms/_select.scss +190 -0
  77. data/assets/stylesheets/materialize/components/forms/_switches.scss +89 -0
  78. data/assets/stylesheets/materialize/extras/nouislider.css +406 -0
  79. data/{app/assets → assets}/stylesheets/materialize.scss +13 -10
  80. data/lib/materialize-sass/engine.rb +11 -6
  81. data/lib/materialize-sass/helpers.rb +38 -0
  82. data/lib/materialize-sass/version.rb +1 -1
  83. data/lib/materialize-sass.rb +13 -28
  84. data/materialize-sass.gemspec +5 -5
  85. metadata +97 -105
  86. data/app/assets/fonts/material-design-icons/LICENSE.txt +0 -428
  87. data/app/assets/fonts/material-design-icons/Material-Design-Icons.eot +0 -0
  88. data/app/assets/fonts/material-design-icons/Material-Design-Icons.svg +0 -769
  89. data/app/assets/fonts/material-design-icons/Material-Design-Icons.ttf +0 -0
  90. data/app/assets/fonts/material-design-icons/Material-Design-Icons.woff +0 -0
  91. data/app/assets/fonts/material-design-icons/Material-Design-Icons.woff2 +0 -0
  92. data/app/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
  93. data/app/assets/fonts/roboto/Roboto-Bold.woff +0 -0
  94. data/app/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
  95. data/app/assets/fonts/roboto/Roboto-Light.ttf +0 -0
  96. data/app/assets/fonts/roboto/Roboto-Light.woff +0 -0
  97. data/app/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
  98. data/app/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
  99. data/app/assets/fonts/roboto/Roboto-Medium.woff +0 -0
  100. data/app/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
  101. data/app/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
  102. data/app/assets/fonts/roboto/Roboto-Regular.woff +0 -0
  103. data/app/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
  104. data/app/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
  105. data/app/assets/fonts/roboto/Roboto-Thin.woff +0 -0
  106. data/app/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
  107. data/app/assets/javascripts/materialize/animation.js +0 -9
  108. data/app/assets/javascripts/materialize/buttons.js +0 -61
  109. data/app/assets/javascripts/materialize/cards.js +0 -27
  110. data/app/assets/javascripts/materialize/character_counter.js +0 -59
  111. data/app/assets/javascripts/materialize/collapsible.js +0 -139
  112. data/app/assets/javascripts/materialize/date_picker/picker.date.js +0 -1430
  113. data/app/assets/javascripts/materialize/date_picker/picker.js +0 -1123
  114. data/app/assets/javascripts/materialize/dropdown.js +0 -178
  115. data/app/assets/javascripts/materialize/forms.js +0 -456
  116. data/app/assets/javascripts/materialize/global.js +0 -36
  117. data/app/assets/javascripts/materialize/hammer.min.js +0 -1
  118. data/app/assets/javascripts/materialize/init.js +0 -136
  119. data/app/assets/javascripts/materialize/jquery.easing.1.3.js +0 -205
  120. data/app/assets/javascripts/materialize/jquery.hammer.js +0 -33
  121. data/app/assets/javascripts/materialize/jquery.timeago.min.js +0 -1
  122. data/app/assets/javascripts/materialize/leanModal.js +0 -178
  123. data/app/assets/javascripts/materialize/materialbox.js +0 -249
  124. data/app/assets/javascripts/materialize/parallax.js +0 -58
  125. data/app/assets/javascripts/materialize/prism.js +0 -8
  126. data/app/assets/javascripts/materialize/pushpin.js +0 -62
  127. data/app/assets/javascripts/materialize/scrollFire.js +0 -44
  128. data/app/assets/javascripts/materialize/scrollspy.js +0 -284
  129. data/app/assets/javascripts/materialize/sideNav.js +0 -312
  130. data/app/assets/javascripts/materialize/slider.js +0 -301
  131. data/app/assets/javascripts/materialize/tabs.js +0 -136
  132. data/app/assets/javascripts/materialize/toasts.js +0 -125
  133. data/app/assets/javascripts/materialize/tooltip.js +0 -166
  134. data/app/assets/javascripts/materialize/transitions.js +0 -154
  135. data/app/assets/javascripts/materialize/velocity.min.js +0 -4
  136. data/app/assets/javascripts/materialize-sprockets.js +0 -27
  137. data/app/assets/javascripts/materialize.js +0 -6159
  138. data/app/assets/stylesheets/materialize/components/_buttons.scss +0 -157
  139. data/app/assets/stylesheets/materialize/components/_dropdown.scss +0 -40
  140. data/app/assets/stylesheets/materialize/components/_form.scss +0 -886
  141. data/app/assets/stylesheets/materialize/components/_icons-material-design.scss +0 -3257
  142. data/app/assets/stylesheets/materialize/components/_mixins.scss +0 -5
  143. data/app/assets/stylesheets/materialize/components/_normalize.scss +0 -427
  144. data/app/assets/stylesheets/materialize/components/_prefixer.scss +0 -376
  145. data/app/assets/stylesheets/materialize/components/_roboto.scss +0 -38
  146. data/app/assets/stylesheets/materialize/components/_sideNav.scss +0 -111
  147. data/app/assets/stylesheets/materialize/components/_tabs.scss +0 -47
  148. data/app/assets/stylesheets/materialize/components/_tooltip.scss +0 -34
  149. data/app/assets/stylesheets/materialize/components/_variables.scss +0 -152
  150. data/app/assets/stylesheets/materialize/components/_waves.scss +0 -167
  151. data/app/assets/stylesheets/materialize/components/date_picker/_default.date.scss +0 -435
  152. data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +0 -201
  153. data/app/assets/stylesheets/materialize/components/date_picker/_default.time.scss +0 -125
@@ -7,7 +7,7 @@
7
7
  * https://github.com/fians/Waves/blob/master/LICENSE
8
8
  */
9
9
 
10
- ;(function(window) {
10
+ ;(function (window) {
11
11
  'use strict';
12
12
 
13
13
  var Waves = Waves || {};
@@ -23,8 +23,9 @@
23
23
  }
24
24
 
25
25
  function offset(elem) {
26
- var docElem, win,
27
- box = {top: 0, left: 0},
26
+ var docElem,
27
+ win,
28
+ box = { top: 0, left: 0 },
28
29
  doc = elem && elem.ownerDocument;
29
30
 
30
31
  docElem = doc.documentElement;
@@ -44,7 +45,7 @@
44
45
 
45
46
  for (var a in obj) {
46
47
  if (obj.hasOwnProperty(a)) {
47
- style += (a + ':' + obj[a] + ';');
48
+ style += a + ':' + obj[a] + ';';
48
49
  }
49
50
  }
50
51
 
@@ -56,7 +57,7 @@
56
57
  // Effect delay
57
58
  duration: 750,
58
59
 
59
- show: function(e, element) {
60
+ show: function (e, element) {
60
61
 
61
62
  // Disable right click
62
63
  if (e.button === 2) {
@@ -71,15 +72,15 @@
71
72
  el.appendChild(ripple);
72
73
 
73
74
  // Get click coordinate and element witdh
74
- var pos = offset(el);
75
- var relativeY = (e.pageY - pos.top);
76
- var relativeX = (e.pageX - pos.left);
77
- var scale = 'scale('+((el.clientWidth / 100) * 10)+')';
75
+ var pos = offset(el);
76
+ var relativeY = e.pageY - pos.top;
77
+ var relativeX = e.pageX - pos.left;
78
+ var scale = 'scale(' + el.clientWidth / 100 * 10 + ')';
78
79
 
79
80
  // Support for touch devices
80
81
  if ('touches' in e) {
81
- relativeY = (e.touches[0].pageY - pos.top);
82
- relativeX = (e.touches[0].pageX - pos.left);
82
+ relativeY = e.touches[0].pageY - pos.top;
83
+ relativeX = e.touches[0].pageX - pos.left;
83
84
  }
84
85
 
85
86
  // Attach data to element
@@ -90,8 +91,8 @@
90
91
 
91
92
  // Set ripple position
92
93
  var rippleStyle = {
93
- 'top': relativeY+'px',
94
- 'left': relativeX+'px'
94
+ 'top': relativeY + 'px',
95
+ 'left': relativeX + 'px'
95
96
  };
96
97
 
97
98
  ripple.className = ripple.className + ' waves-notransition';
@@ -104,22 +105,22 @@
104
105
  rippleStyle['-ms-transform'] = scale;
105
106
  rippleStyle['-o-transform'] = scale;
106
107
  rippleStyle.transform = scale;
107
- rippleStyle.opacity = '1';
108
+ rippleStyle.opacity = '1';
108
109
 
109
110
  rippleStyle['-webkit-transition-duration'] = Effect.duration + 'ms';
110
- rippleStyle['-moz-transition-duration'] = Effect.duration + 'ms';
111
- rippleStyle['-o-transition-duration'] = Effect.duration + 'ms';
112
- rippleStyle['transition-duration'] = Effect.duration + 'ms';
111
+ rippleStyle['-moz-transition-duration'] = Effect.duration + 'ms';
112
+ rippleStyle['-o-transition-duration'] = Effect.duration + 'ms';
113
+ rippleStyle['transition-duration'] = Effect.duration + 'ms';
113
114
 
114
115
  rippleStyle['-webkit-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
115
- rippleStyle['-moz-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
116
- rippleStyle['-o-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
117
- rippleStyle['transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
116
+ rippleStyle['-moz-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
117
+ rippleStyle['-o-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
118
+ rippleStyle['transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
118
119
 
119
120
  ripple.setAttribute('style', convertStyle(rippleStyle));
120
121
  },
121
122
 
122
- hide: function(e) {
123
+ hide: function (e) {
123
124
  TouchHandler.touchup(e);
124
125
 
125
126
  var el = this;
@@ -134,9 +135,9 @@
134
135
  return false;
135
136
  }
136
137
 
137
- var relativeX = ripple.getAttribute('data-x');
138
- var relativeY = ripple.getAttribute('data-y');
139
- var scale = ripple.getAttribute('data-scale');
138
+ var relativeX = ripple.getAttribute('data-x');
139
+ var relativeY = ripple.getAttribute('data-y');
140
+ var scale = ripple.getAttribute('data-scale');
140
141
 
141
142
  // Get delay beetween mousedown and mouse leave
142
143
  var diff = Date.now() - Number(ripple.getAttribute('data-hold'));
@@ -147,10 +148,10 @@
147
148
  }
148
149
 
149
150
  // Fade out ripple after delay
150
- setTimeout(function() {
151
+ setTimeout(function () {
151
152
  var style = {
152
- 'top': relativeY+'px',
153
- 'left': relativeX+'px',
153
+ 'top': relativeY + 'px',
154
+ 'left': relativeX + 'px',
154
155
  'opacity': '0',
155
156
 
156
157
  // Duration
@@ -162,15 +163,15 @@
162
163
  '-moz-transform': scale,
163
164
  '-ms-transform': scale,
164
165
  '-o-transform': scale,
165
- 'transform': scale,
166
+ 'transform': scale
166
167
  };
167
168
 
168
169
  ripple.setAttribute('style', convertStyle(style));
169
170
 
170
- setTimeout(function() {
171
+ setTimeout(function () {
171
172
  try {
172
173
  el.removeChild(ripple);
173
- } catch(e) {
174
+ } catch (e) {
174
175
  return false;
175
176
  }
176
177
  }, Effect.duration);
@@ -178,7 +179,7 @@
178
179
  },
179
180
 
180
181
  // Little hack to make <input> can perform waves effect
181
- wrapInput: function(elements) {
182
+ wrapInput: function (elements) {
182
183
  for (var a = 0; a < elements.length; a++) {
183
184
  var el = elements[a];
184
185
 
@@ -213,7 +214,6 @@
213
214
  }
214
215
  };
215
216
 
216
-
217
217
  /**
218
218
  * Disable mousedown event for 500ms during and after touch
219
219
  */
@@ -223,13 +223,13 @@
223
223
  * within the 500ms. Cannot mouseup between touchstart and
224
224
  * touchend, nor in the 500ms after touchend. */
225
225
  touches: 0,
226
- allowEvent: function(e) {
226
+ allowEvent: function (e) {
227
227
  var allow = true;
228
228
 
229
229
  if (e.type === 'touchstart') {
230
230
  TouchHandler.touches += 1; //push
231
231
  } else if (e.type === 'touchend' || e.type === 'touchcancel') {
232
- setTimeout(function() {
232
+ setTimeout(function () {
233
233
  if (TouchHandler.touches > 0) {
234
234
  TouchHandler.touches -= 1; //pop after 500ms
235
235
  }
@@ -240,12 +240,11 @@
240
240
 
241
241
  return allow;
242
242
  },
243
- touchup: function(e) {
243
+ touchup: function (e) {
244
244
  TouchHandler.allowEvent(e);
245
245
  }
246
246
  };
247
247
 
248
-
249
248
  /**
250
249
  * Delegated click handler for .waves-effect element.
251
250
  * returns null when .waves-effect element not in "click tree"
@@ -258,17 +257,13 @@
258
257
  var element = null;
259
258
  var target = e.target || e.srcElement;
260
259
 
261
- while (target.parentElement !== null) {
260
+ while (target.parentNode !== null) {
262
261
  if (!(target instanceof SVGElement) && target.className.indexOf('waves-effect') !== -1) {
263
262
  element = target;
264
263
  break;
265
- } else if (target.classList.contains('waves-effect')) {
266
- element = target;
267
- break;
268
264
  }
269
- target = target.parentElement;
265
+ target = target.parentNode;
270
266
  }
271
-
272
267
  return element;
273
268
  }
274
269
 
@@ -288,10 +283,11 @@
288
283
 
289
284
  element.addEventListener('mouseup', Effect.hide, false);
290
285
  element.addEventListener('mouseleave', Effect.hide, false);
286
+ element.addEventListener('dragend', Effect.hide, false);
291
287
  }
292
288
  }
293
289
 
294
- Waves.displayEffect = function(options) {
290
+ Waves.displayEffect = function (options) {
295
291
  options = options || {};
296
292
 
297
293
  if ('duration' in options) {
@@ -314,12 +310,12 @@
314
310
  * Intended to be used with dynamically loaded forms/inputs, or
315
311
  * where the user doesn't want a delegated click handler.
316
312
  */
317
- Waves.attach = function(element) {
313
+ Waves.attach = function (element) {
318
314
  //FUTURE: automatically add waves classes and allow users
319
315
  // to specify them with an options param? Eg. light/classic/button
320
316
  if (element.tagName.toLowerCase() === 'input') {
321
317
  Effect.wrapInput([element]);
322
- element = element.parentElement;
318
+ element = element.parentNode;
323
319
  }
324
320
 
325
321
  if ('ontouchstart' in window) {
@@ -331,8 +327,7 @@
331
327
 
332
328
  window.Waves = Waves;
333
329
 
334
- document.addEventListener('DOMContentLoaded', function() {
330
+ document.addEventListener('DOMContentLoaded', function () {
335
331
  Waves.displayEffect();
336
332
  }, false);
337
-
338
333
  })(window);
@@ -0,0 +1,29 @@
1
+ //= require ./materialize/cash
2
+ //= require ./materialize/component
3
+ //= require ./materialize/global
4
+ //= require ./materialize/anime.min
5
+ //= require ./materialize/collapsible
6
+ //= require ./materialize/dropdown
7
+ //= require ./materialize/modal
8
+ //= require ./materialize/materialbox
9
+ //= require ./materialize/parallax
10
+ //= require ./materialize/tabs
11
+ //= require ./materialize/tooltip
12
+ //= require ./materialize/waves
13
+ //= require ./materialize/toasts
14
+ //= require ./materialize/sidenav
15
+ //= require ./materialize/scrollspy
16
+ //= require ./materialize/autocomplete
17
+ //= require ./materialize/forms
18
+ //= require ./materialize/slider
19
+ //= require ./materialize/cards
20
+ //= require ./materialize/chips
21
+ //= require ./materialize/pushpin
22
+ //= require ./materialize/buttons
23
+ //= require ./materialize/datepicker
24
+ //= require ./materialize/timepicker
25
+ //= require ./materialize/characterCounter
26
+ //= require ./materialize/carousel
27
+ //= require ./materialize/tapTarget
28
+ //= require ./materialize/select
29
+ //= require ./materialize/range