mui-sass 0.9.0 → 0.9.1

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: ca588b1fb4d1950493e5489d4a00fd9afeda6ab8
4
- data.tar.gz: a715bffc484664c19a83f46480a4223af0e68a01
3
+ metadata.gz: 03044fa25db3258dfab09763722f5d27e6341757
4
+ data.tar.gz: 4d2c2213488b1c8803d4e2a9cc69ece150dc8f0c
5
5
  SHA512:
6
- metadata.gz: e89a129c0681eb4259e2086f873f68bbddb4d0479fd60ea9985521228e5285d17d1d6f73f7202eecbd29dde77e298179a82fbbff06509dc7b891ec1a3116679f
7
- data.tar.gz: 77778a4cf09be21cfd299b933fafbb52612c97321551a20dd71363d241cf339542bf0bca007e60658f3988bf14b04c2f008b911e865fd590c9b29a24966d25ad
6
+ metadata.gz: 10e7df2875422208a84cba70711289d21c427adbde04fdfbab00a0847d44a4a8ba7b15922342fc0f7d6b976297fe4f4cf139e905e03bb4ab51b97aaf04f88003
7
+ data.tar.gz: ee9d619fa2beed06e8f665af0313babb0902db9caca02f4ffb0c69243d41ad3135f2a174dc6139fe7c29d6cf79a9fb84cca0c5e8bcbe26a3bd920387c0024644
data/.travis.yml CHANGED
@@ -1,8 +1,6 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.0.0
5
- - 2.1.9
6
4
  - 2.2.5
7
5
  - 2.3.1
8
6
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.9.1 (2016-10-21)
2
+
3
+ - Update assets to match upstream version
4
+
1
5
  ## 0.9.0 (2016-10-21)
2
6
 
3
7
  - Update assets to match upstream version
@@ -1,5 +1,5 @@
1
1
  module Mui
2
2
  module Sass
3
- VERSION = '0.9.0'
3
+ VERSION = '0.9.1'
4
4
  end
5
5
  end
@@ -36,7 +36,7 @@
36
36
  });
37
37
  })(window);
38
38
 
39
- },{"src/js/dropdown":6,"src/js/lib/jqLite":7,"src/js/overlay":8,"src/js/ripple":9,"src/js/select":10,"src/js/tabs":11,"src/js/textfield":12}],2:[function(require,module,exports){
39
+ },{"src/js/dropdown":7,"src/js/lib/jqLite":8,"src/js/overlay":9,"src/js/ripple":10,"src/js/select":11,"src/js/tabs":12,"src/js/textfield":13}],2:[function(require,module,exports){
40
40
  /**
41
41
  * MUI config module
42
42
  * @module config
@@ -49,6 +49,98 @@ module.exports = {
49
49
  };
50
50
 
51
51
  },{}],3:[function(require,module,exports){
52
+ /**
53
+ * MUI CSS/JS animation helper module
54
+ * @module lib/animationHelpers
55
+ */
56
+
57
+ 'use strict';
58
+
59
+ var jqLite = require('./jqLite'),
60
+ util = require('./util'),
61
+ animationEvents = 'animationstart mozAnimationStart webkitAnimationStart',
62
+ animationCallbacks = {};
63
+
64
+
65
+ /**
66
+ * Register callbacks
67
+ * @param {String} name - The animation name
68
+ * @param {Function} callbackFn = The callback function
69
+ */
70
+ function onAnimationStartFn(name, callbackFn) {
71
+ // get/set callback function
72
+ var callbacks = animationCallbacks[name];
73
+ if (!callbacks) callbacks = animationCallbacks[name] = [];
74
+ callbacks.push(callbackFn);
75
+
76
+ // initialize listeners
77
+ if (!this.init) {
78
+ // add css classes
79
+ loadCss();
80
+
81
+ // add listener
82
+ jqLite.on(document, animationEvents, animationStartHandler);
83
+
84
+ // set flag
85
+ this.init = true;
86
+ }
87
+ }
88
+
89
+
90
+ /**
91
+ * Animation start handler
92
+ * @param {Event} ev - The DOM event
93
+ */
94
+ function animationStartHandler(ev) {
95
+ var callbacks = animationCallbacks[ev.animationName] || [],
96
+ i = callbacks.length;
97
+
98
+ // iterate through callbacks
99
+ while (i--) callbacks[i](ev);
100
+ }
101
+
102
+
103
+ /**
104
+ * Load animation css
105
+ */
106
+ function loadCss() {
107
+ // define rules
108
+ var rules = [
109
+ ['.mui-btn', 'mui-btn-inserted'],
110
+ ['[data-mui-toggle="dropdown"]', 'mui-dropdown-inserted'],
111
+ ['[data-mui-toggle="tab"]', 'mui-tab-inserted'],
112
+ ['.mui-textfield > input', 'mui-textfield-inserted'],
113
+ ['.mui-textfield > textarea', 'mui-textfield-inserted'],
114
+ ['.mui-select > select', 'mui-select-inserted'],
115
+ ['.mui-select > select ~ .mui-event-trigger', 'mui-node-inserted'],
116
+ ['.mui-select > select:disabled ~ .mui-event-trigger', 'mui-node-disabled']
117
+ ];
118
+
119
+ // build css
120
+ var css = '',
121
+ rule;
122
+
123
+ for (var i=0, m=rules.length; i < m; i++) {
124
+ rule = rules[i];
125
+ css += '@keyframes ' + rule[1] + '{from{opacity:0.99;}to{opacity:1;}}';
126
+ css += rule[0];
127
+ css += '{animation-duration:0.0001s;animation-name:' + rule[1] + ';}';
128
+ }
129
+
130
+ // add CSS to DOM
131
+ util.loadStyle(css);
132
+ }
133
+
134
+
135
+ /**
136
+ * Define module API
137
+ */
138
+ module.exports = {
139
+ animationEvents: animationEvents,
140
+ onAnimationStart: onAnimationStartFn
141
+ }
142
+
143
+ },{"./jqLite":5,"./util":6}],4:[function(require,module,exports){
52
144
  /**
53
145
  * MUI CSS/JS form helpers module
54
146
  * @module lib/forms.py
@@ -109,7 +201,7 @@ module.exports = {
109
201
  getMenuPositionalCSS: getMenuPositionalCSSFn
110
202
  };
111
203
 
112
- },{}],4:[function(require,module,exports){
204
+ },{}],5:[function(require,module,exports){
113
205
  /**
114
206
  * MUI CSS/JS jqLite module
115
207
  * @module lib/jqLite
@@ -509,7 +601,7 @@ module.exports = {
509
601
  scrollTop: jqLiteScrollTop
510
602
  };
511
603
 
512
- },{}],5:[function(require,module,exports){
604
+ },{}],6:[function(require,module,exports){
513
605
  /**
514
606
  * MUI CSS/JS utilities module
515
607
  * @module lib/util
@@ -520,20 +612,25 @@ module.exports = {
520
612
 
521
613
  var config = require('../config'),
522
614
  jqLite = require('./jqLite'),
523
- animationEvents = 'animationstart mozAnimationStart webkitAnimationStart',
524
- nodeInsertedCallbacks = [],
525
615
  scrollLock = 0,
526
- scrollLockCls = 'mui-body--scroll-lock',
527
- scrollLockPos,
616
+ scrollLockCls = 'mui-scroll-lock',
617
+ scrollStyleEl,
618
+ scrollEventHandler,
528
619
  _supportsPointerEvents;
529
620
 
530
621
 
622
+ scrollEventHandler = function(ev) {
623
+ // stop propagation on window scroll events
624
+ if (!ev.target.tagName) ev.stopImmediatePropagation();
625
+ }
626
+
627
+
531
628
  /**
532
629
  * Logging function
533
630
  */
534
631
  function logFn() {
535
632
  var win = window;
536
-
633
+
537
634
  if (config.debug && typeof win.console !== "undefined") {
538
635
  try {
539
636
  win.console.log.apply(win.console, arguments);
@@ -552,7 +649,7 @@ function logFn() {
552
649
  function loadStyleFn(cssText) {
553
650
  var doc = document,
554
651
  head;
555
-
652
+
556
653
  // copied from jQuery
557
654
  head = doc.head ||
558
655
  doc.getElementsByTagName('head')[0] ||
@@ -560,13 +657,13 @@ function loadStyleFn(cssText) {
560
657
 
561
658
  var e = doc.createElement('style');
562
659
  e.type = 'text/css';
563
-
660
+
564
661
  if (e.styleSheet) e.styleSheet.cssText = cssText;
565
662
  else e.appendChild(doc.createTextNode(cssText));
566
663
 
567
664
  // add to document
568
665
  head.insertBefore(e, head.firstChild);
569
-
666
+
570
667
  return e;
571
668
  }
572
669
 
@@ -584,37 +681,6 @@ function raiseErrorFn(msg, useConsole) {
584
681
  }
585
682
 
586
683
 
587
- /**
588
- * Register callbacks on muiNodeInserted event
589
- * @param {function} callbackFn - The callback function.
590
- */
591
- function onNodeInsertedFn(callbackFn) {
592
- nodeInsertedCallbacks.push(callbackFn);
593
-
594
- // initalize listeners
595
- if (!this.initialized) {
596
- jqLite.on(document, animationEvents, animationHandlerFn);
597
- this.initialized = true;
598
- }
599
- }
600
-
601
-
602
- /**
603
- * Execute muiNodeInserted callbacks
604
- * @param {Event} ev - The DOM event.
605
- */
606
- function animationHandlerFn(ev) {
607
- // check animation name
608
- if (ev.animationName !== 'mui-node-inserted') return;
609
-
610
- var el = ev.target,
611
- i = nodeInsertedCallbacks.length;
612
-
613
- // iterate through callbacks
614
- while (i--) nodeInsertedCallbacks[i](el);
615
- }
616
-
617
-
618
684
  /**
619
685
  * Convert Classname object, with class as key and true/false as value, to an
620
686
  * class string.
@@ -665,17 +731,17 @@ function callbackFn(instance, funcName) {
665
731
  function dispatchEventFn(element, eventType, bubbles, cancelable, data) {
666
732
  var ev = document.createEvent('HTMLEvents'),
667
733
  bubbles = (bubbles !== undefined) ? bubbles : true,
668
- cancelable = (cancelable !== undefined) ? cancelable : true,
669
- k;
670
-
671
- ev.initEvent(eventType, bubbles, cancelable);
734
+ cancelable = (cancelable !== undefined) ? cancelable : true,
735
+ k;
672
736
 
737
+ ev.initEvent(eventType, bubbles, cancelable);
738
+
673
739
  // add data to event object
674
740
  if (data) for (k in data) ev[k] = data[k];
675
-
741
+
676
742
  // dispatch
677
743
  if (element) element.dispatchEvent(ev);
678
-
744
+
679
745
  return ev;
680
746
  }
681
747
 
@@ -686,15 +752,44 @@ function dispatchEventFn(element, eventType, bubbles, cancelable, data) {
686
752
  function enableScrollLockFn() {
687
753
  // increment counter
688
754
  scrollLock += 1;
689
-
755
+
690
756
  // add lock
691
757
  if (scrollLock === 1) {
692
- var win = window,
693
- doc = document;
758
+ var htmlEl = document.documentElement,
759
+ top = jqLite.scrollTop(window),
760
+ left = jqLite.scrollLeft(window),
761
+ cssProps,
762
+ cssStr;
763
+
764
+ // define scroll lock class dynamically
765
+ cssProps = [
766
+ 'position:fixed',
767
+ 'top:' + -top + 'px',
768
+ 'right:0',
769
+ 'bottom:0',
770
+ 'left:' + -left + 'px'
771
+ ];
772
+
773
+ // scrollbar-y
774
+ if (htmlEl.scrollHeight > htmlEl.clientHeight) {
775
+ cssProps.push('overflow-y:scroll');
776
+ }
777
+
778
+ // scrollbar-x
779
+ if (htmlEl.scrollWidth > htmlEl.clientWidth) {
780
+ cssProps.push('overflow-x:scroll');
781
+ }
782
+
783
+ // define css class dynamically
784
+ cssStr = '.' + scrollLockCls + '{';
785
+ cssStr += cssProps.join(' !important;') + ' !important;}';
786
+ scrollStyleEl = loadStyleFn(cssStr);
694
787
 
695
- scrollLockPos = {left: jqLite.scrollLeft(win), top: jqLite.scrollTop(win)};
696
- jqLite.addClass(doc.body, scrollLockCls);
697
- win.scrollTo(scrollLockPos.left, scrollLockPos.top);
788
+ // cancel 'scroll' event listener callbacks
789
+ jqLite.on(window, 'scroll', scrollEventHandler, true);
790
+
791
+ // add scroll lock
792
+ jqLite.addClass(htmlEl, scrollLockCls);
698
793
  }
699
794
  }
700
795
 
@@ -712,15 +807,22 @@ function disableScrollLockFn(resetPos) {
712
807
 
713
808
  // remove lock
714
809
  if (scrollLock === 0) {
715
- var win = window,
716
- doc = document;
810
+ var htmlEl = document.documentElement,
811
+ top = parseInt(jqLite.css(htmlEl, 'top')),
812
+ left = parseInt(jqLite.css(htmlEl, 'left'));
813
+
814
+ // remove scroll lock and delete style element
815
+ jqLite.removeClass(htmlEl, scrollLockCls);
816
+ scrollStyleEl.parentNode.removeChild(scrollStyleEl);
817
+
818
+ // restore scroll position
819
+ window.scrollTo(-left, -top);
717
820
 
718
- jqLite.removeClass(doc.body, scrollLockCls);
719
- if (resetPos) win.scrollTo(scrollLockPos.left, scrollLockPos.top);
821
+ // restore scroll event listeners
822
+ jqLite.off(window, 'scroll', scrollEventHandler, true);
720
823
  }
721
824
  }
722
825
 
723
-
724
826
  /**
725
827
  * requestAnimationFrame polyfilled
726
828
  * @param {Function} callback - The callback function
@@ -736,9 +838,6 @@ function requestAnimationFrameFn(callback) {
736
838
  * Define the module API
737
839
  */
738
840
  module.exports = {
739
- /** List cross-browser animation events */
740
- animationEvents: animationEvents,
741
-
742
841
  /** Create callback closures */
743
842
  callback: callbackFn,
744
843
 
@@ -760,9 +859,6 @@ module.exports = {
760
859
  /** Load CSS text as new stylesheet */
761
860
  loadStyle: loadStyleFn,
762
861
 
763
- /** Register muiNodeInserted handler */
764
- onNodeInserted: onNodeInsertedFn,
765
-
766
862
  /** Raise MUI error */
767
863
  raiseError: raiseErrorFn,
768
864
 
@@ -773,7 +869,7 @@ module.exports = {
773
869
  supportsPointerEvents: supportsPointerEventsFn
774
870
  };
775
871
 
776
- },{"../config":2,"./jqLite":4}],6:[function(require,module,exports){
872
+ },{"../config":2,"./jqLite":5}],7:[function(require,module,exports){
777
873
  /**
778
874
  * MUI CSS/JS dropdown module
779
875
  * @module dropdowns
@@ -784,6 +880,7 @@ module.exports = {
784
880
 
785
881
  var jqLite = require('./lib/jqLite'),
786
882
  util = require('./lib/util'),
883
+ animationHelpers = require('./lib/animationHelpers'),
787
884
  attrKey = 'data-mui-toggle',
788
885
  attrSelector = '[data-mui-toggle="dropdown"]',
789
886
  openClass = 'mui--is-open',
@@ -873,22 +970,21 @@ function toggleDropdown(toggleEl) {
873
970
  module.exports = {
874
971
  /** Initialize module listeners */
875
972
  initListeners: function() {
876
- var doc = document;
877
-
878
973
  // markup elements available when method is called
879
- var elList = doc.querySelectorAll(attrSelector);
880
- for (var i=elList.length - 1; i >= 0; i--) initialize(elList[i]);
974
+ var elList = document.querySelectorAll(attrSelector),
975
+ i = elList.length;
976
+ while (i--) {initialize(elList[i]);}
881
977
 
882
978
  // listen for new elements
883
- util.onNodeInserted(function(el) {
884
- if (el.getAttribute(attrKey) === 'dropdown') initialize(el);
979
+ animationHelpers.onAnimationStart('mui-dropdown-inserted', function(ev) {
980
+ initialize(ev.target);
885
981
  });
886
982
  }
887
983
  };
888
984
 
889
- },{"./lib/jqLite":4,"./lib/util":5}],7:[function(require,module,exports){
890
- module.exports=require(4)
891
- },{}],8:[function(require,module,exports){
985
+ },{"./lib/animationHelpers":3,"./lib/jqLite":5,"./lib/util":6}],8:[function(require,module,exports){
986
+ module.exports=require(5)
987
+ },{}],9:[function(require,module,exports){
892
988
  /**
893
989
  * MUI CSS/JS overlay module
894
990
  * @module overlay
@@ -1094,7 +1190,7 @@ function onClick(ev) {
1094
1190
  /** Define module API */
1095
1191
  module.exports = overlayFn;
1096
1192
 
1097
- },{"./lib/jqLite":4,"./lib/util":5}],9:[function(require,module,exports){
1193
+ },{"./lib/jqLite":5,"./lib/util":6}],10:[function(require,module,exports){
1098
1194
  /**
1099
1195
  * MUI CSS/JS ripple module
1100
1196
  * @module ripple
@@ -1105,6 +1201,7 @@ module.exports = overlayFn;
1105
1201
 
1106
1202
  var jqLite = require('./lib/jqLite'),
1107
1203
  util = require('./lib/util'),
1204
+ animationHelpers = require('./lib/animationHelpers'),
1108
1205
  btnClass = 'mui-btn',
1109
1206
  btnFABClass = 'mui-btn--fab',
1110
1207
  rippleClass = 'mui-ripple-effect',
@@ -1238,20 +1335,19 @@ function createRippleEl(ev, buttonEl) {
1238
1335
  module.exports = {
1239
1336
  /** Initialize module listeners */
1240
1337
  initListeners: function() {
1241
- var doc = document;
1242
-
1243
1338
  // markup elements available when method is called
1244
- var elList = doc.getElementsByClassName(btnClass);
1245
- for (var i=elList.length - 1; i >= 0; i--) initialize(elList[i]);
1339
+ var elList = document.getElementsByClassName(btnClass),
1340
+ i = elList.length;
1341
+ while (i--) initialize(elList[i]);
1246
1342
 
1247
1343
  // listen for new elements
1248
- util.onNodeInserted(function(el) {
1249
- if (jqLite.hasClass(el, btnClass)) initialize(el);
1344
+ animationHelpers.onAnimationStart('mui-btn-inserted', function(ev) {
1345
+ initialize(ev.target);
1250
1346
  });
1251
1347
  }
1252
1348
  };
1253
1349
 
1254
- },{"./lib/jqLite":4,"./lib/util":5}],10:[function(require,module,exports){
1350
+ },{"./lib/animationHelpers":3,"./lib/jqLite":5,"./lib/util":6}],11:[function(require,module,exports){
1255
1351
  /**
1256
1352
  * MUI CSS/JS select module
1257
1353
  * @module forms/select
@@ -1262,6 +1358,7 @@ module.exports = {
1262
1358
 
1263
1359
  var jqLite = require('./lib/jqLite'),
1264
1360
  util = require('./lib/util'),
1361
+ animationHelpers = require('./lib/animationHelpers'),
1265
1362
  formlib = require('./lib/forms'),
1266
1363
  wrapperClass = 'mui-select',
1267
1364
  cssSelector = '.mui-select > select',
@@ -1330,7 +1427,7 @@ function Select(selectEl) {
1330
1427
  wrapperEl.appendChild(el);
1331
1428
 
1332
1429
  // handle 'disabled' add/remove
1333
- jqLite.on(el, util.animationEvents, function(ev) {
1430
+ jqLite.on(el, animationHelpers.animationEvents, function(ev) {
1334
1431
  // no need to propagate
1335
1432
  ev.stopPropagation();
1336
1433
 
@@ -1665,20 +1762,18 @@ module.exports = {
1665
1762
  /** Initialize module listeners */
1666
1763
  initListeners: function() {
1667
1764
  // markup elements available when method is called
1668
- var elList = doc.querySelectorAll(cssSelector);
1669
- for (var i=elList.length - 1; i >= 0; i--) initialize(elList[i]);
1765
+ var elList = doc.querySelectorAll(cssSelector),
1766
+ i = elList.length;
1767
+ while (i--) initialize(elList[i]);
1670
1768
 
1671
1769
  // listen for mui-node-inserted events
1672
- util.onNodeInserted(function(el) {
1673
- if (el.tagName === 'SELECT' &&
1674
- jqLite.hasClass(el.parentNode, wrapperClass)) {
1675
- initialize(el);
1676
- }
1770
+ animationHelpers.onAnimationStart('mui-select-inserted', function(ev) {
1771
+ initialize(ev.target);
1677
1772
  });
1678
1773
  }
1679
1774
  };
1680
1775
 
1681
- },{"./lib/forms":3,"./lib/jqLite":4,"./lib/util":5}],11:[function(require,module,exports){
1776
+ },{"./lib/animationHelpers":3,"./lib/forms":4,"./lib/jqLite":5,"./lib/util":6}],12:[function(require,module,exports){
1682
1777
  /**
1683
1778
  * MUI CSS/JS tabs module
1684
1779
  * @module tabs
@@ -1689,6 +1784,7 @@ module.exports = {
1689
1784
 
1690
1785
  var jqLite = require('./lib/jqLite'),
1691
1786
  util = require('./lib/util'),
1787
+ animationHelpers = require('./lib/animationHelpers'),
1692
1788
  attrKey = 'data-mui-toggle',
1693
1789
  attrSelector = '[' + attrKey + '="tab"]',
1694
1790
  controlsAttrKey = 'data-mui-controls',
@@ -1815,12 +1911,12 @@ module.exports = {
1815
1911
  /** Initialize module listeners */
1816
1912
  initListeners: function() {
1817
1913
  // markup elements available when method is called
1818
- var elList = document.querySelectorAll(attrSelector);
1819
- for (var i=elList.length - 1; i >= 0; i--) initialize(elList[i]);
1914
+ var elList = document.querySelectorAll(attrSelector),
1915
+ i = elList.length;
1916
+ while (i--) {initialize(elList[i]);}
1820
1917
 
1821
- // TODO: listen for new elements
1822
- util.onNodeInserted(function(el) {
1823
- if (el.getAttribute(attrKey) === 'tab') initialize(el);
1918
+ animationHelpers.onAnimationStart('mui-tab-inserted', function(ev) {
1919
+ initialize(ev.target);
1824
1920
  });
1825
1921
  },
1826
1922
 
@@ -1839,7 +1935,7 @@ module.exports = {
1839
1935
  }
1840
1936
  };
1841
1937
 
1842
- },{"./lib/jqLite":4,"./lib/util":5}],12:[function(require,module,exports){
1938
+ },{"./lib/animationHelpers":3,"./lib/jqLite":5,"./lib/util":6}],13:[function(require,module,exports){
1843
1939
  /**
1844
1940
  * MUI CSS/JS form-control module
1845
1941
  * @module forms/form-control
@@ -1850,6 +1946,7 @@ module.exports = {
1850
1946
 
1851
1947
  var jqLite = require('./lib/jqLite'),
1852
1948
  util = require('./lib/util'),
1949
+ animationHelpers = require('./lib/animationHelpers'),
1853
1950
  cssSelector = '.mui-textfield > input, .mui-textfield > textarea',
1854
1951
  emptyClass = 'mui--is-empty',
1855
1952
  notEmptyClass = 'mui--is-not-empty',
@@ -1904,12 +2001,13 @@ module.exports = {
1904
2001
  var doc = document;
1905
2002
 
1906
2003
  // markup elements available when method is called
1907
- var elList = doc.querySelectorAll(cssSelector);
1908
- for (var i=elList.length - 1; i >= 0; i--) initialize(elList[i]);
2004
+ var elList = doc.querySelectorAll(cssSelector),
2005
+ i = elList.length;
2006
+ while (i--) initialize(elList[i]);
1909
2007
 
1910
2008
  // listen for new elements
1911
- util.onNodeInserted(function(el) {
1912
- if (el.tagName === 'INPUT' || el.tagName === 'TEXTAREA') initialize(el);
2009
+ animationHelpers.onAnimationStart('mui-textfield-inserted', function(ev) {
2010
+ initialize(ev.target);
1913
2011
  });
1914
2012
 
1915
2013
  // add transition css for floating labels
@@ -1927,7 +2025,7 @@ module.exports = {
1927
2025
 
1928
2026
  // pointer-events shim for floating labels
1929
2027
  if (util.supportsPointerEvents() === false) {
1930
- jqLite.on(document, 'click', function(ev) {
2028
+ jqLite.on(doc, 'click', function(ev) {
1931
2029
  var targetEl = ev.target;
1932
2030
 
1933
2031
  if (targetEl.tagName === 'LABEL' &&
@@ -1940,4 +2038,4 @@ module.exports = {
1940
2038
  }
1941
2039
  };
1942
2040
 
1943
- },{"./lib/jqLite":4,"./lib/util":5}]},{},[1])
2041
+ },{"./lib/animationHelpers":3,"./lib/jqLite":5,"./lib/util":6}]},{},[1])
@@ -33,7 +33,6 @@
33
33
  // ============================================================================
34
34
 
35
35
  .mui-btn {
36
- @include mui-node-inserted();
37
36
  @include mui-text("button");
38
37
 
39
38
  @include button-variant(
@@ -12,8 +12,6 @@
12
12
 
13
13
  // Toggle element
14
14
  [data-mui-toggle="dropdown"] {
15
- @include mui-node-inserted();
16
-
17
15
  outline: 0;
18
16
  }
19
17
 
@@ -2,23 +2,6 @@
2
2
  * MUI Helpers module
3
3
  */
4
4
 
5
- // ============================================================================
6
- // NODE-INSERTED
7
- // ============================================================================
8
-
9
- @keyframes mui-node-inserted {
10
- from { opacity: 0.99; }
11
- to { opacity: 1; }
12
- }
13
-
14
- @keyframes mui-node-disabled {
15
- from { opacity: 0.99; }
16
- to { opacity: 1;}
17
- }
18
-
19
-
20
-
21
-
22
5
  // ============================================================================
23
6
  // ANIMATION
24
7
  // ============================================================================
@@ -339,9 +322,13 @@
339
322
 
340
323
 
341
324
  // ============================================================================
342
- // SCROLL BLOCK
325
+ // SCROLL LOCK
343
326
  // ============================================================================
344
327
 
345
- body.mui-body--scroll-lock {
346
- overflow: hidden !important;
328
+ .mui-scrlock--showbar-y {
329
+ overflow-y: scroll !important;
330
+ }
331
+
332
+ .mui-scrlock--showbar-x {
333
+ overflow-x: scroll !important;
347
334
  }
@@ -23,8 +23,6 @@ $xFormLabelLineHeight: floor($mui-label-font-size * 1.25);
23
23
  }
24
24
 
25
25
  > select {
26
- @include mui-node-inserted();
27
-
28
26
  // Layout
29
27
  display: block;
30
28
  height: $mui-input-height;
@@ -92,20 +90,6 @@ $xFormLabelLineHeight: floor($mui-label-font-size * 1.25);
92
90
  color: $mui-input-border-color-focus;
93
91
  }
94
92
 
95
- // 'disabled' animations (uses separate element for Firefox/IE)
96
- .mui-select > select {
97
- // re-paint
98
- & ~ .mui-event-trigger {
99
- @include mui-node-inserted();
100
- }
101
-
102
- // disable
103
- &:disabled ~ .mui-event-trigger {
104
- @include mui-node-disabled();
105
- }
106
- }
107
-
108
-
109
93
  .mui-select__menu {
110
94
  @extend .mui--z1;
111
95
 
@@ -69,7 +69,3 @@
69
69
  display: block;
70
70
  }
71
71
  }
72
-
73
- [data-mui-toggle="tab"] {
74
- @include mui-node-inserted();
75
- }
@@ -93,8 +93,6 @@ $xFormLabelLineHeight: floor($mui-label-font-size * 1.25);
93
93
 
94
94
  .mui-textfield > input,
95
95
  .mui-textfield > textarea {
96
- @include mui-node-inserted();
97
-
98
96
  display: block;
99
97
  background-color: $mui-input-bg-color;
100
98
  color: $mui-input-font-color;
@@ -1,13 +1,3 @@
1
- @mixin mui-node-inserted() {
2
- animation-duration: 0.0001s;
3
- animation-name: mui-node-inserted;
4
- }
5
-
6
- @mixin mui-node-disabled() {
7
- animation-duration: 0.0001s;
8
- animation-name: mui-node-disabled;
9
- }
10
-
11
1
  // Clearfix
12
2
  //
13
3
  // For modern browsers
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mui-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Tarasov