materialize-sass 0.100.1 → 0.100.2

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: 909c1e705689230bd0b131fd9486777a860cae9f
4
- data.tar.gz: 2580fa42ad45bf57ca36f57b3abd5872ffa842e8
3
+ metadata.gz: fa8a185b81744d053db988d54ab4d2d3b6e907e9
4
+ data.tar.gz: 59b6ba621bd649d2c0605f662cf811cf9792cbc9
5
5
  SHA512:
6
- metadata.gz: ad75e1e31c867f7b4d12b1c8895c3e3436c01d5d4528fb1a490fce346ba8129d820ef954f6daf1c7ff04b2422cfbaed753dfd1b21e25f932d4aa9181940855a9
7
- data.tar.gz: 67b26fda59c775fa4257692e973dd6e20272bc66080e4451694d8ce2ef5637fa20a056a28dd9e93b7a0d048849e129e31dea5da096b2d0354ac955c872c0000a
6
+ metadata.gz: a8c2afd7ab1e16f220698776cadbd85b4570be9ac74348d5a44726c7e4e76e6c9d60ebc87d3eb7241e11658af95ce5853168e23e326caecb15ad7ed50a07ba28
7
+ data.tar.gz: 7e61d32309d25d349c5fbc6bfc29a5fb6974155b02cf7c2514a869750000d8d860d7c8842d50540a08fddca60062d78a6bd1dec824279261e3a94be6debe64b3
data/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  `materialize-sass` is a Sass powered version of [Materialize](http://materializecss.com), a modern responsive front-end framework based on Material Design.
4
4
 
5
- example: http://materialize.labs.my/
5
+ example: http://materialize.labs.my/
6
+
7
+ source: https://github.com/mkhairi/materialize-rails
6
8
 
7
9
  ## Dependencies
8
10
 
data/Rakefile CHANGED
@@ -9,9 +9,9 @@ namespace :javascripts do
9
9
  rm_rf "app/assets/javascripts/materialize"
10
10
  end
11
11
 
12
- desc "Copy #{source_dir}/dist/js/src"
12
+ desc "Copy #{source_dir}/dist/src/js"
13
13
  task :copy do
14
- src_dir = "#{source_dir}/dist/js/src/."
14
+ src_dir = "#{source_dir}/dist/src/js/."
15
15
  tgt_dir = "app/assets/javascripts/materialize/"
16
16
  mkdir_p tgt_dir
17
17
  cp_r src_dir, tgt_dir
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize v0.100.1 (http://materializecss.com)
2
+ * Materialize v0.100.2 (http://materializecss.com)
3
3
  * Copyright 2014-2017 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
5
  */
@@ -9,7 +9,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
9
9
 
10
10
  // Check for jQuery.
11
11
  if (typeof jQuery === 'undefined') {
12
- var jQuery;
13
12
  // Check if require is a defined function.
14
13
  if (typeof require === 'function') {
15
14
  jQuery = $ = require('jquery');
@@ -1258,6 +1257,13 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
1258
1257
  }
1259
1258
  })(window);
1260
1259
 
1260
+ if (typeof exports !== 'undefined' && !exports.nodeType) {
1261
+ if (typeof module !== 'undefined' && !module.nodeType && module.exports) {
1262
+ exports = module.exports = Materialize;
1263
+ }
1264
+ exports.default = Materialize;
1265
+ }
1266
+
1261
1267
  /*
1262
1268
  * raf.js
1263
1269
  * https://github.com/ngryman/raf.js
@@ -1406,6 +1412,12 @@ if (jQuery) {
1406
1412
  } else {
1407
1413
  Vel = Velocity;
1408
1414
  }
1415
+
1416
+ if (Vel) {
1417
+ Materialize.Vel = Vel;
1418
+ } else {
1419
+ Materialize.Vel = Velocity;
1420
+ }
1409
1421
  ;(function ($) {
1410
1422
  $.fn.collapsible = function (options, methodParam) {
1411
1423
  var defaults = {
@@ -1840,7 +1852,7 @@ if (jQuery) {
1840
1852
  $('.dropdown-button').dropdown();
1841
1853
  });
1842
1854
  })(jQuery);
1843
- ;(function ($) {
1855
+ ;(function ($, Vel) {
1844
1856
  'use strict';
1845
1857
 
1846
1858
  var _defaults = {
@@ -1950,7 +1962,7 @@ if (jQuery) {
1950
1962
  this.handleModalCloseClickBound = this.handleModalCloseClick.bind(this);
1951
1963
 
1952
1964
  if (Modal._count === 1) {
1953
- document.addEventListener('click', this.handleTriggerClick);
1965
+ document.body.addEventListener('click', this.handleTriggerClick);
1954
1966
  }
1955
1967
  this.$overlay[0].addEventListener('click', this.handleOverlayClickBound);
1956
1968
  this.$el[0].addEventListener('click', this.handleModalCloseClickBound);
@@ -1964,7 +1976,7 @@ if (jQuery) {
1964
1976
  key: 'removeEventHandlers',
1965
1977
  value: function removeEventHandlers() {
1966
1978
  if (Modal._count === 0) {
1967
- document.removeEventListener('click', this.handleTriggerClick);
1979
+ document.body.removeEventListener('click', this.handleTriggerClick);
1968
1980
  }
1969
1981
  this.$overlay[0].removeEventListener('click', this.handleOverlayClickBound);
1970
1982
  this.$el[0].removeEventListener('click', this.handleModalCloseClickBound);
@@ -2105,7 +2117,7 @@ if (jQuery) {
2105
2117
  if (typeof _this2.options.complete === 'function') {
2106
2118
  _this2.options.complete.call(_this2, _this2.$el);
2107
2119
  }
2108
- _this2.$overlay[0].remove();
2120
+ _this2.$overlay[0].parentNode.removeChild(_this2.$overlay[0]);
2109
2121
  }
2110
2122
  };
2111
2123
 
@@ -2163,7 +2175,7 @@ if (jQuery) {
2163
2175
 
2164
2176
  this.isOpen = false;
2165
2177
  this.$el[0].classList.remove('open');
2166
- document.body.style.overflow = null;
2178
+ document.body.style.overflow = '';
2167
2179
 
2168
2180
  if (this.options.dismissible) {
2169
2181
  document.removeEventListener('keydown', this.handleKeydownBound);
@@ -2206,7 +2218,7 @@ if (jQuery) {
2206
2218
  */
2207
2219
  Modal._count = 0;
2208
2220
 
2209
- window.Materialize.Modal = Modal;
2221
+ Materialize.Modal = Modal;
2210
2222
 
2211
2223
  $.fn.modal = function (methodOrOptions) {
2212
2224
  // Call plugin method if valid method name is passed in
@@ -2232,7 +2244,7 @@ if (jQuery) {
2232
2244
  $.error('Method ' + methodOrOptions + ' does not exist on jQuery.modal');
2233
2245
  }
2234
2246
  };
2235
- })(jQuery);
2247
+ })(jQuery, Materialize.Vel);
2236
2248
  ;(function ($) {
2237
2249
 
2238
2250
  $.fn.materialbox = function () {
@@ -2579,7 +2591,8 @@ if (jQuery) {
2579
2591
  $tabs_wrapper,
2580
2592
  $tab_width = Math.max($tabs_width, $this[0].scrollWidth) / $links.length,
2581
2593
  $indicator,
2582
- index = prev_index = 0,
2594
+ index = 0,
2595
+ prev_index = 0,
2583
2596
  clicked = false,
2584
2597
  clickedTimeout,
2585
2598
  transition = 300;
@@ -3353,7 +3366,7 @@ if (jQuery) {
3353
3366
  Waves.displayEffect();
3354
3367
  }, false);
3355
3368
  })(window);
3356
- ;(function ($) {
3369
+ ;(function ($, Vel) {
3357
3370
  'use strict';
3358
3371
 
3359
3372
  var _defaults = {
@@ -3578,7 +3591,7 @@ if (jQuery) {
3578
3591
  toast.panning = true;
3579
3592
  Toast._draggedToast = toast;
3580
3593
  toast.el.classList.add('panning');
3581
- toast.el.style.transition = null;
3594
+ toast.el.style.transition = '';
3582
3595
  toast.startingXPos = Toast._xPos(e);
3583
3596
  toast.time = Date.now();
3584
3597
  toast.xPos = Toast._xPos(e);
@@ -3633,8 +3646,8 @@ if (jQuery) {
3633
3646
  // Animate toast back to original position
3634
3647
  } else {
3635
3648
  toast.el.style.transition = 'transform .2s, opacity .2s';
3636
- toast.el.style.transform = null;
3637
- toast.el.style.opacity = null;
3649
+ toast.el.style.transform = '';
3650
+ toast.el.style.opacity = '';
3638
3651
  }
3639
3652
  Toast._draggedToast = null;
3640
3653
  }
@@ -3698,11 +3711,11 @@ if (jQuery) {
3698
3711
  */
3699
3712
  Toast._draggedToast = null;
3700
3713
 
3701
- window.Materialize.Toast = Toast;
3702
- window.Materialize.toast = function (message, displayLength, className, completeCallback) {
3714
+ Materialize.Toast = Toast;
3715
+ Materialize.toast = function (message, displayLength, className, completeCallback) {
3703
3716
  return new Toast(message, displayLength, className, completeCallback);
3704
3717
  };
3705
- })(jQuery);
3718
+ })(jQuery, Materialize.Vel);
3706
3719
  ;(function ($) {
3707
3720
 
3708
3721
  var methods = {
@@ -4994,10 +5007,10 @@ if (jQuery) {
4994
5007
  // Add initial multiple selections.
4995
5008
  if (multiple) {
4996
5009
  $select.find("option:selected:not(:disabled)").each(function () {
4997
- var index = $(this).index();
5010
+ var index = this.index;
4998
5011
 
4999
5012
  toggleEntryFromArray(valuesSelected, index, $select);
5000
- options.find("li").eq(index).find(":checkbox").prop("checked", true);
5013
+ options.find("li:not(.optgroup)").eq(index).find(":checkbox").prop("checked", true);
5001
5014
  });
5002
5015
  }
5003
5016
 
@@ -6956,7 +6969,7 @@ if (jQuery) {
6956
6969
  // * For IE, non-focusable elements can be active elements as well
6957
6970
  // (http://stackoverflow.com/a/2684561).
6958
6971
  activeElement = getActiveElement();
6959
- activeElement = activeElement && (activeElement.type || activeElement.href);
6972
+ activeElement = activeElement && (activeElement.type || activeElement.href) && activeElement;
6960
6973
 
6961
6974
  // If it’s disabled or nothing inside is actively focused, re-focus the element.
6962
6975
  if (targetDisabled || activeElement && !$.contains(P.$root[0], activeElement)) {
@@ -8375,7 +8388,9 @@ if (jQuery) {
8375
8388
  }
8376
8389
 
8377
8390
  // Materialize modified
8378
- if (override == "raw") return _.node('div', focusedYear);
8391
+ if (override === 'raw' && selectedObject != null) {
8392
+ return _.node('div', selectedObject.year);
8393
+ }
8379
8394
 
8380
8395
  // Otherwise just return the year focused
8381
8396
  return _.node('div', focusedYear, settings.klass.year);
@@ -8576,9 +8591,8 @@ if (jQuery) {
8576
8591
  * Copyright 2015 Ching Yaw Hao.
8577
8592
  */
8578
8593
 
8579
- (function () {
8580
- var $ = window.jQuery,
8581
- $win = $(window),
8594
+ (function ($) {
8595
+ var $win = $(window),
8582
8596
  $doc = $(document);
8583
8597
 
8584
8598
  // Can I use inline svg ?
@@ -8627,7 +8641,7 @@ if (jQuery) {
8627
8641
  outerRadius = 105,
8628
8642
 
8629
8643
  // innerRadius = 80 on 12 hour clock
8630
- innerRadius = 80,
8644
+ innerRadius = 70,
8631
8645
  tickRadius = 20,
8632
8646
  diameter = dialRadius * 2,
8633
8647
  duration = transitionSupported ? 350 : 1;
@@ -8937,8 +8951,15 @@ if (jQuery) {
8937
8951
  this.spanHours.html(this.hours);
8938
8952
  this.spanMinutes.html(leadingZero(this.minutes));
8939
8953
  if (!this.isAppended) {
8940
- // Append popover to body
8941
- this.popover.insertAfter(this.input);
8954
+
8955
+ // Append popover to input by default
8956
+ var containerEl = document.querySelector(this.options.container);
8957
+ if (this.options.container && containerEl) {
8958
+ containerEl.appendChild(this.popover[0]);
8959
+ } else {
8960
+ this.popover.insertAfter(this.input);
8961
+ }
8962
+
8942
8963
  if (this.options.twelvehour) {
8943
8964
  if (this.amOrPm === 'PM') {
8944
8965
  this.spanAmPm.children('#click-pm').addClass("text-primary");
@@ -9206,7 +9227,7 @@ if (jQuery) {
9206
9227
  }
9207
9228
  });
9208
9229
  };
9209
- })();
9230
+ })(jQuery);
9210
9231
  ;(function ($) {
9211
9232
 
9212
9233
  $.fn.characterCounter = function () {
@@ -1035,7 +1035,9 @@
1035
1035
  }
1036
1036
 
1037
1037
  // Materialize modified
1038
- if (override == "raw") return _.node('div', focusedYear);
1038
+ if (override === 'raw' && selectedObject != null) {
1039
+ return _.node('div', selectedObject.year);
1040
+ }
1039
1041
 
1040
1042
  // Otherwise just return the year focused
1041
1043
  return _.node('div', focusedYear, settings.klass.year);
@@ -650,7 +650,7 @@
650
650
  // * For IE, non-focusable elements can be active elements as well
651
651
  // (http://stackoverflow.com/a/2684561).
652
652
  activeElement = getActiveElement();
653
- activeElement = activeElement && (activeElement.type || activeElement.href);
653
+ activeElement = activeElement && (activeElement.type || activeElement.href) && activeElement;
654
654
 
655
655
  // If it’s disabled or nothing inside is actively focused, re-focus the element.
656
656
  if (targetDisabled || activeElement && !$.contains(P.$root[0], activeElement)) {
@@ -57,7 +57,7 @@
57
57
  outerRadius = 105,
58
58
 
59
59
  // innerRadius = 80 on 12 hour clock
60
- innerRadius = 80,
60
+ innerRadius = 70,
61
61
  tickRadius = 20,
62
62
  diameter = dialRadius * 2,
63
63
  duration = transitionSupported ? 350 : 1;
@@ -367,8 +367,15 @@
367
367
  this.spanHours.html(this.hours);
368
368
  this.spanMinutes.html(leadingZero(this.minutes));
369
369
  if (!this.isAppended) {
370
- // Append popover to body
371
- this.popover.insertAfter(this.input);
370
+
371
+ // Append popover to input by default
372
+ var containerEl = document.querySelector(this.options.container);
373
+ if (this.options.container && containerEl) {
374
+ containerEl.appendChild(this.popover[0]);
375
+ } else {
376
+ this.popover.insertAfter(this.input);
377
+ }
378
+
372
379
  if (this.options.twelvehour) {
373
380
  if (this.amOrPm === 'PM') {
374
381
  this.spanAmPm.children('#click-pm').addClass("text-primary");
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize v0.100.1 (http://materializecss.com)
2
+ * Materialize v0.100.2 (http://materializecss.com)
3
3
  * Copyright 2014-2015 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
5
  */
@@ -664,10 +664,10 @@
664
664
  // Add initial multiple selections.
665
665
  if (multiple) {
666
666
  $select.find("option:selected:not(:disabled)").each(function () {
667
- var index = $(this).index();
667
+ var index = this.index;
668
668
 
669
669
  toggleEntryFromArray(valuesSelected, index, $select);
670
- options.find("li").eq(index).find(":checkbox").prop("checked", true);
670
+ options.find("li:not(.optgroup)").eq(index).find(":checkbox").prop("checked", true);
671
671
  });
672
672
  }
673
673
 
@@ -1,6 +1,5 @@
1
1
  // Check for jQuery.
2
2
  if (typeof jQuery === 'undefined') {
3
- var jQuery;
4
3
  // Check if require is a defined function.
5
4
  if (typeof require === 'function') {
6
5
  jQuery = $ = require('jquery');
@@ -112,7 +112,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
112
112
  this.handleModalCloseClickBound = this.handleModalCloseClick.bind(this);
113
113
 
114
114
  if (Modal._count === 1) {
115
- document.addEventListener('click', this.handleTriggerClick);
115
+ document.body.addEventListener('click', this.handleTriggerClick);
116
116
  }
117
117
  this.$overlay[0].addEventListener('click', this.handleOverlayClickBound);
118
118
  this.$el[0].addEventListener('click', this.handleModalCloseClickBound);
@@ -126,7 +126,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
126
126
  key: 'removeEventHandlers',
127
127
  value: function removeEventHandlers() {
128
128
  if (Modal._count === 0) {
129
- document.removeEventListener('click', this.handleTriggerClick);
129
+ document.body.removeEventListener('click', this.handleTriggerClick);
130
130
  }
131
131
  this.$overlay[0].removeEventListener('click', this.handleOverlayClickBound);
132
132
  this.$el[0].removeEventListener('click', this.handleModalCloseClickBound);
@@ -267,7 +267,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
267
267
  if (typeof _this2.options.complete === 'function') {
268
268
  _this2.options.complete.call(_this2, _this2.$el);
269
269
  }
270
- _this2.$overlay[0].remove();
270
+ _this2.$overlay[0].parentNode.removeChild(_this2.$overlay[0]);
271
271
  }
272
272
  };
273
273
 
@@ -325,7 +325,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
325
325
 
326
326
  this.isOpen = false;
327
327
  this.$el[0].classList.remove('open');
328
- document.body.style.overflow = null;
328
+ document.body.style.overflow = '';
329
329
 
330
330
  if (this.options.dismissible) {
331
331
  document.removeEventListener('keydown', this.handleKeydownBound);
@@ -368,7 +368,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
368
368
  */
369
369
  Modal._count = 0;
370
370
 
371
- window.Materialize.Modal = Modal;
371
+ Materialize.Modal = Modal;
372
372
 
373
373
  $.fn.modal = function (methodOrOptions) {
374
374
  // Call plugin method if valid method name is passed in
@@ -27,7 +27,8 @@
27
27
  $tabs_wrapper,
28
28
  $tab_width = Math.max($tabs_width, $this[0].scrollWidth) / $links.length,
29
29
  $indicator,
30
- index = prev_index = 0,
30
+ index = 0,
31
+ prev_index = 0,
31
32
  clicked = false,
32
33
  clickedTimeout,
33
34
  transition = 300;
@@ -227,7 +227,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
227
227
  toast.panning = true;
228
228
  Toast._draggedToast = toast;
229
229
  toast.el.classList.add('panning');
230
- toast.el.style.transition = null;
230
+ toast.el.style.transition = '';
231
231
  toast.startingXPos = Toast._xPos(e);
232
232
  toast.time = Date.now();
233
233
  toast.xPos = Toast._xPos(e);
@@ -282,8 +282,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
282
282
  // Animate toast back to original position
283
283
  } else {
284
284
  toast.el.style.transition = 'transform .2s, opacity .2s';
285
- toast.el.style.transform = null;
286
- toast.el.style.opacity = null;
285
+ toast.el.style.transform = '';
286
+ toast.el.style.opacity = '';
287
287
  }
288
288
  Toast._draggedToast = null;
289
289
  }
@@ -347,8 +347,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
347
347
  */
348
348
  Toast._draggedToast = null;
349
349
 
350
- window.Materialize.Toast = Toast;
351
- window.Materialize.toast = function (message, displayLength, className, completeCallback) {
350
+ Materialize.Toast = Toast;
351
+ Materialize.toast = function (message, displayLength, className, completeCallback) {
352
352
  return new Toast(message, displayLength, className, completeCallback);
353
353
  };
354
354
  })(jQuery, Materialize.Vel);
@@ -1,7 +1,6 @@
1
1
  @charset "UTF-8";
2
2
 
3
- // Mixins
4
- @import "materialize/components/mixins";
3
+ // Colors
5
4
  @import "materialize/components/color";
6
5
 
7
6
  // Variables;
@@ -32,6 +32,7 @@ nav ul a span.badge {
32
32
  margin-left: 4px;
33
33
  line-height: $badge-height;
34
34
  height: $badge-height;
35
+ -webkit-font-smoothing: auto;
35
36
  }
36
37
 
37
38
  // Line height centering
@@ -39,7 +40,7 @@ nav ul a span.badge {
39
40
  margin-top: calc(#{$collection-line-height / 2} - #{$badge-height / 2});
40
41
  }
41
42
  .collapsible span.badge {
42
- margin-top: calc(#{$collapsible-line-height / 2} - #{$badge-height / 2});
43
+ margin-left: auto;
43
44
  }
44
45
  .side-nav span.badge {
45
46
  margin-top: calc(#{$sidenav-line-height / 2} - #{$badge-height / 2});
@@ -15,7 +15,7 @@ select {
15
15
 
16
16
 
17
17
  .input-field {
18
- select {
18
+ & > select {
19
19
  display: block;
20
20
  position: absolute;
21
21
  width: 0;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize v0.100.1 (http://materializecss.com)
2
+ * Materialize v0.100.2 (http://materializecss.com)
3
3
  * Copyright 2014-2015 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
5
  */
@@ -1,6 +1,6 @@
1
1
  module Materialize
2
2
  module Sass
3
- VERSION = "0.100.1"
3
+ VERSION = "0.100.2"
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: materialize-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.100.1
4
+ version: 0.100.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mkhairi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-24 00:00:00.000000000 Z
11
+ date: 2017-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -123,7 +123,6 @@ files:
123
123
  - app/assets/stylesheets/materialize/components/_grid.scss
124
124
  - app/assets/stylesheets/materialize/components/_icons-material-design.scss
125
125
  - app/assets/stylesheets/materialize/components/_materialbox.scss
126
- - app/assets/stylesheets/materialize/components/_mixins.scss
127
126
  - app/assets/stylesheets/materialize/components/_modal.scss
128
127
  - app/assets/stylesheets/materialize/components/_navbar.scss
129
128
  - app/assets/stylesheets/materialize/components/_normalize.scss
@@ -1,5 +0,0 @@
1
- // @mixin box-shadow-2($args1, $args2) {
2
- // -webkit-box-shadow: $args1, $args2;
3
- // -moz-box-shadow: $args1, $args2;
4
- // box-shadow: $args1, $args2;
5
- // }