mui-sass 0.9.0 → 0.9.1
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.
- checksums.yaml +4 -4
- data/.travis.yml +0 -2
- data/CHANGELOG.md +4 -0
- data/lib/mui/sass/version.rb +1 -1
- data/vendor/assets/javascripts/mui.js +202 -104
- data/vendor/assets/stylesheets/mui/_buttons.scss +0 -1
- data/vendor/assets/stylesheets/mui/_dropdown.scss +0 -2
- data/vendor/assets/stylesheets/mui/_helpers.scss +7 -20
- data/vendor/assets/stylesheets/mui/_select.scss +0 -16
- data/vendor/assets/stylesheets/mui/_tabs.scss +0 -4
- data/vendor/assets/stylesheets/mui/_textfield.scss +0 -2
- data/vendor/assets/stylesheets/mui/mixins/_util.scss +0 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03044fa25db3258dfab09763722f5d27e6341757
|
4
|
+
data.tar.gz: 4d2c2213488b1c8803d4e2a9cc69ece150dc8f0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10e7df2875422208a84cba70711289d21c427adbde04fdfbab00a0847d44a4a8ba7b15922342fc0f7d6b976297fe4f4cf139e905e03bb4ab51b97aaf04f88003
|
7
|
+
data.tar.gz: ee9d619fa2beed06e8f665af0313babb0902db9caca02f4ffb0c69243d41ad3135f2a174dc6139fe7c29d6cf79a9fb84cca0c5e8bcbe26a3bd920387c0024644
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/mui/sass/version.rb
CHANGED
@@ -36,7 +36,7 @@
|
|
36
36
|
});
|
37
37
|
})(window);
|
38
38
|
|
39
|
-
},{"src/js/dropdown":
|
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
|
-
},{}],
|
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
|
-
},{}],
|
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-
|
527
|
-
|
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
|
-
|
669
|
-
|
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
|
693
|
-
|
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
|
-
|
696
|
-
jqLite.
|
697
|
-
|
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
|
716
|
-
|
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
|
-
|
719
|
-
|
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":
|
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 =
|
880
|
-
|
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
|
-
|
884
|
-
|
979
|
+
animationHelpers.onAnimationStart('mui-dropdown-inserted', function(ev) {
|
980
|
+
initialize(ev.target);
|
885
981
|
});
|
886
982
|
}
|
887
983
|
};
|
888
984
|
|
889
|
-
},{"./lib/jqLite":
|
890
|
-
module.exports=require(
|
891
|
-
},{}],
|
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":
|
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 =
|
1245
|
-
|
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
|
-
|
1249
|
-
|
1344
|
+
animationHelpers.onAnimationStart('mui-btn-inserted', function(ev) {
|
1345
|
+
initialize(ev.target);
|
1250
1346
|
});
|
1251
1347
|
}
|
1252
1348
|
};
|
1253
1349
|
|
1254
|
-
},{"./lib/jqLite":
|
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,
|
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
|
-
|
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
|
-
|
1673
|
-
|
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/
|
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
|
-
|
1914
|
+
var elList = document.querySelectorAll(attrSelector),
|
1915
|
+
i = elList.length;
|
1916
|
+
while (i--) {initialize(elList[i]);}
|
1820
1917
|
|
1821
|
-
|
1822
|
-
|
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":
|
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
|
-
|
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
|
-
|
1912
|
-
|
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(
|
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":
|
2041
|
+
},{"./lib/animationHelpers":3,"./lib/jqLite":5,"./lib/util":6}]},{},[1])
|
@@ -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
|
325
|
+
// SCROLL LOCK
|
343
326
|
// ============================================================================
|
344
327
|
|
345
|
-
|
346
|
-
overflow:
|
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
|
|
@@ -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
|