fomantic-ui 2.9.2-beta.7 → 2.9.2-beta.9
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.
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +4 -4
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +1 -1
- package/dist/components/api.min.js +1 -1
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +1 -1
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +1 -1
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +3 -3
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +3 -3
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +2 -2
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +18 -30
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +3 -3
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +14 -8
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +147 -2
- package/dist/components/popup.js +20 -8
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +3 -29
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +1 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +1 -1
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +2 -2
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +15 -37
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +7 -27
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +1 -1
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +1 -1
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +3 -3
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +9 -57
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +229 -51
- package/dist/semantic.js +118 -228
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/form.js +2 -2
- package/src/definitions/modules/accordion.js +3 -3
- package/src/definitions/modules/dimmer.js +2 -2
- package/src/definitions/modules/dropdown.js +2 -2
- package/src/definitions/modules/embed.js +1 -1
- package/src/definitions/modules/flyout.js +17 -29
- package/src/definitions/modules/modal.js +13 -7
- package/src/definitions/modules/popup.js +19 -7
- package/src/definitions/modules/popup.less +47 -3
- package/src/definitions/modules/progress.js +2 -28
- package/src/definitions/modules/search.js +1 -1
- package/src/definitions/modules/shape.js +14 -36
- package/src/definitions/modules/sidebar.js +6 -26
- package/src/definitions/modules/toast.js +2 -2
- package/src/definitions/modules/transition.js +8 -56
- package/src/themes/default/modules/popup.variables +8 -0
package/package.json
CHANGED
@@ -888,7 +888,7 @@
|
|
888
888
|
.html(settings.templates.prompt(errors))
|
889
889
|
;
|
890
890
|
if (!promptExists) {
|
891
|
-
if (settings.transition && module.can.useElement('transition')
|
891
|
+
if (settings.transition && module.can.useElement('transition')) {
|
892
892
|
module.verbose('Displaying error with css transition', settings.transition);
|
893
893
|
$prompt.transition(settings.transition + ' in', settings.duration);
|
894
894
|
} else {
|
@@ -984,7 +984,7 @@
|
|
984
984
|
;
|
985
985
|
if (settings.inline && $prompt.is(':visible')) {
|
986
986
|
module.verbose('Removing prompt for field', identifier);
|
987
|
-
if (settings.transition && module.can.useElement('transition')
|
987
|
+
if (settings.transition && module.can.useElement('transition')) {
|
988
988
|
$prompt.transition(settings.transition + ' out', settings.duration, function () {
|
989
989
|
$prompt.remove();
|
990
990
|
});
|
@@ -175,7 +175,7 @@
|
|
175
175
|
.addClass(className.animating)
|
176
176
|
;
|
177
177
|
if (settings.animateChildren) {
|
178
|
-
if ($.fn.transition !== undefined
|
178
|
+
if ($.fn.transition !== undefined) {
|
179
179
|
$activeContent
|
180
180
|
.children()
|
181
181
|
.transition({
|
@@ -239,7 +239,7 @@
|
|
239
239
|
.addClass(className.animating)
|
240
240
|
;
|
241
241
|
if (settings.animateChildren) {
|
242
|
-
if ($.fn.transition !== undefined
|
242
|
+
if ($.fn.transition !== undefined) {
|
243
243
|
$activeContent
|
244
244
|
.children()
|
245
245
|
.transition({
|
@@ -308,7 +308,7 @@
|
|
308
308
|
.stop(true, true)
|
309
309
|
;
|
310
310
|
if (settings.animateChildren) {
|
311
|
-
if ($.fn.transition !== undefined
|
311
|
+
if ($.fn.transition !== undefined) {
|
312
312
|
$openContents
|
313
313
|
.children()
|
314
314
|
.transition({
|
@@ -229,7 +229,7 @@
|
|
229
229
|
callback = isFunction(callback)
|
230
230
|
? callback
|
231
231
|
: function () {};
|
232
|
-
if (settings.useCSS && $.fn.transition !== undefined
|
232
|
+
if (settings.useCSS && $.fn.transition !== undefined) {
|
233
233
|
if (settings.useFlex) {
|
234
234
|
module.debug('Using flex dimmer');
|
235
235
|
module.remove.legacy();
|
@@ -288,7 +288,7 @@
|
|
288
288
|
callback = isFunction(callback)
|
289
289
|
? callback
|
290
290
|
: function () {};
|
291
|
-
if (settings.useCSS && $.fn.transition !== undefined
|
291
|
+
if (settings.useCSS && $.fn.transition !== undefined) {
|
292
292
|
module.verbose('Hiding dimmer with css');
|
293
293
|
$dimmer
|
294
294
|
.transition({
|
@@ -3637,7 +3637,7 @@
|
|
3637
3637
|
displayType: module.get.displayType(),
|
3638
3638
|
}).transition('show');
|
3639
3639
|
callback.call(element);
|
3640
|
-
} else if (module.can.useElement('transition')
|
3640
|
+
} else if (module.can.useElement('transition')) {
|
3641
3641
|
$currentMenu
|
3642
3642
|
.transition({
|
3643
3643
|
animation: transition + ' in',
|
@@ -3679,7 +3679,7 @@
|
|
3679
3679
|
displayType: module.get.displayType(),
|
3680
3680
|
}).transition('hide');
|
3681
3681
|
callback.call(element);
|
3682
|
-
} else if ($.fn.transition !== undefined
|
3682
|
+
} else if ($.fn.transition !== undefined) {
|
3683
3683
|
$currentMenu
|
3684
3684
|
.transition({
|
3685
3685
|
animation: transition + ' out',
|
@@ -655,7 +655,7 @@
|
|
655
655
|
return ''
|
656
656
|
+ '<iframe src="' + deQuote(src) + '"'
|
657
657
|
+ ' width="100%" height="100%"'
|
658
|
-
+ '
|
658
|
+
+ ' msallowFullScreen allowFullScreen></iframe>';
|
659
659
|
},
|
660
660
|
placeholder: function (image, icon) {
|
661
661
|
var
|
@@ -80,8 +80,8 @@
|
|
80
80
|
elementNamespace,
|
81
81
|
id,
|
82
82
|
observer,
|
83
|
+
observeAttributes = false,
|
83
84
|
currentScroll,
|
84
|
-
transitionEvent,
|
85
85
|
|
86
86
|
module
|
87
87
|
;
|
@@ -145,8 +145,6 @@
|
|
145
145
|
});
|
146
146
|
}
|
147
147
|
|
148
|
-
transitionEvent = module.get.transitionEvent();
|
149
|
-
|
150
148
|
// avoids locking rendering if initialized in onReady
|
151
149
|
if (settings.delaySetup) {
|
152
150
|
requestAnimationFrame(module.setup.layout);
|
@@ -498,7 +496,7 @@
|
|
498
496
|
;
|
499
497
|
mutations.every(function (mutation) {
|
500
498
|
if (mutation.type === 'attributes') {
|
501
|
-
if (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input')) {
|
499
|
+
if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').length > 0)) {
|
502
500
|
shouldRefreshInputs = true;
|
503
501
|
}
|
504
502
|
} else {
|
@@ -549,13 +547,14 @@
|
|
549
547
|
if (!settings.dimPage) {
|
550
548
|
return;
|
551
549
|
}
|
552
|
-
$inputs = $module.find('[tabindex], :input:enabled').filter(':visible').filter(function () {
|
550
|
+
$inputs = $module.find('a[href], [tabindex], :input:enabled').filter(':visible').filter(function () {
|
553
551
|
return $(this).closest('.disabled').length === 0;
|
554
552
|
});
|
555
|
-
$module.removeAttr('tabindex');
|
556
553
|
if ($inputs.length === 0) {
|
557
554
|
$inputs = $module;
|
558
555
|
$module.attr('tabindex', -1);
|
556
|
+
} else {
|
557
|
+
$module.removeAttr('tabindex');
|
559
558
|
}
|
560
559
|
$inputs.first()
|
561
560
|
.on('keydown' + elementNamespace, module.event.inputKeyDown.first)
|
@@ -652,6 +651,7 @@
|
|
652
651
|
}
|
653
652
|
}
|
654
653
|
module.set.dimmerStyles();
|
654
|
+
module.set.observeAttributes(false);
|
655
655
|
module.pushPage(function () {
|
656
656
|
callback.call(element);
|
657
657
|
settings.onVisible.call(element);
|
@@ -660,6 +660,7 @@
|
|
660
660
|
}
|
661
661
|
module.save.focus();
|
662
662
|
module.refreshInputs();
|
663
|
+
requestAnimationFrame(module.set.observeAttributes);
|
663
664
|
});
|
664
665
|
settings.onChange.call(element);
|
665
666
|
} else {
|
@@ -680,6 +681,7 @@
|
|
680
681
|
if (module.is.visible() || module.is.animating()) {
|
681
682
|
module.debug('Hiding flyout', callback);
|
682
683
|
module.refreshFlyouts();
|
684
|
+
module.set.observeAttributes(false);
|
683
685
|
module.pullPage(function () {
|
684
686
|
callback.call(element);
|
685
687
|
if (isFunction(settings.onHidden)) {
|
@@ -752,13 +754,13 @@
|
|
752
754
|
};
|
753
755
|
transitionEnd = function (event) {
|
754
756
|
if (event.target === $module[0]) {
|
755
|
-
$module.off(
|
757
|
+
$module.off('transitionend' + elementNamespace, transitionEnd);
|
756
758
|
module.remove.animating();
|
757
759
|
callback.call(element);
|
758
760
|
}
|
759
761
|
};
|
760
|
-
$module.off(
|
761
|
-
$module.on(
|
762
|
+
$module.off('transitionend' + elementNamespace);
|
763
|
+
$module.on('transitionend' + elementNamespace, transitionEnd);
|
762
764
|
requestAnimationFrame(animate);
|
763
765
|
if (settings.dimPage && !module.othersVisible()) {
|
764
766
|
requestAnimationFrame(dim);
|
@@ -793,7 +795,7 @@
|
|
793
795
|
};
|
794
796
|
transitionEnd = function (event) {
|
795
797
|
if (event.target === $module[0]) {
|
796
|
-
$module.off(
|
798
|
+
$module.off('transitionend' + elementNamespace, transitionEnd);
|
797
799
|
module.remove.animating();
|
798
800
|
module.remove.closing();
|
799
801
|
module.remove.overlay();
|
@@ -807,8 +809,8 @@
|
|
807
809
|
callback.call(element);
|
808
810
|
}
|
809
811
|
};
|
810
|
-
$module.off(
|
811
|
-
$module.on(
|
812
|
+
$module.off('transitionend' + elementNamespace);
|
813
|
+
$module.on('transitionend' + elementNamespace, transitionEnd);
|
812
814
|
requestAnimationFrame(animate);
|
813
815
|
},
|
814
816
|
|
@@ -831,6 +833,9 @@
|
|
831
833
|
},
|
832
834
|
|
833
835
|
set: {
|
836
|
+
observeAttributes: function (state) {
|
837
|
+
observeAttributes = state !== false;
|
838
|
+
},
|
834
839
|
autofocus: function () {
|
835
840
|
var
|
836
841
|
$autofocus = $inputs.filter('[autofocus]'),
|
@@ -973,23 +978,6 @@
|
|
973
978
|
|
974
979
|
return className.left;
|
975
980
|
},
|
976
|
-
transitionEvent: function () {
|
977
|
-
var
|
978
|
-
element = document.createElement('element'),
|
979
|
-
transitions = {
|
980
|
-
transition: 'transitionend',
|
981
|
-
OTransition: 'oTransitionEnd',
|
982
|
-
MozTransition: 'transitionend',
|
983
|
-
WebkitTransition: 'webkitTransitionEnd',
|
984
|
-
},
|
985
|
-
transition
|
986
|
-
;
|
987
|
-
for (transition in transitions) {
|
988
|
-
if (element.style[transition] !== undefined) {
|
989
|
-
return transitions[transition];
|
990
|
-
}
|
991
|
-
}
|
992
|
-
},
|
993
981
|
id: function () {
|
994
982
|
return id;
|
995
983
|
},
|
@@ -82,6 +82,7 @@
|
|
82
82
|
elementEventNamespace,
|
83
83
|
id,
|
84
84
|
observer,
|
85
|
+
observeAttributes = false,
|
85
86
|
module
|
86
87
|
;
|
87
88
|
module = {
|
@@ -265,7 +266,7 @@
|
|
265
266
|
;
|
266
267
|
mutations.every(function (mutation) {
|
267
268
|
if (mutation.type === 'attributes') {
|
268
|
-
if (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input')) {
|
269
|
+
if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').length > 0)) {
|
269
270
|
shouldRefreshInputs = true;
|
270
271
|
}
|
271
272
|
} else {
|
@@ -324,10 +325,11 @@
|
|
324
325
|
$inputs = $module.find('a[href], [tabindex], :input:enabled').filter(':visible').filter(function () {
|
325
326
|
return $(this).closest('.disabled').length === 0;
|
326
327
|
});
|
327
|
-
$module.removeAttr('tabindex');
|
328
328
|
if ($inputs.length === 0) {
|
329
329
|
$inputs = $module;
|
330
330
|
$module.attr('tabindex', -1);
|
331
|
+
} else {
|
332
|
+
$module.removeAttr('tabindex');
|
331
333
|
}
|
332
334
|
$inputs.first()
|
333
335
|
.on('keydown' + elementEventNamespace, module.event.inputKeyDown.first)
|
@@ -604,8 +606,9 @@
|
|
604
606
|
$module.detach().appendTo($dimmer);
|
605
607
|
}
|
606
608
|
}
|
607
|
-
if (settings.transition && $.fn.transition !== undefined
|
609
|
+
if (settings.transition && $.fn.transition !== undefined) {
|
608
610
|
module.debug('Showing modal with css animations');
|
611
|
+
module.set.observeAttributes(false);
|
609
612
|
$module
|
610
613
|
.transition({
|
611
614
|
debug: settings.debug,
|
@@ -623,6 +626,7 @@
|
|
623
626
|
module.save.focus();
|
624
627
|
module.set.active();
|
625
628
|
module.refreshInputs();
|
629
|
+
requestAnimationFrame(module.set.observeAttributes);
|
626
630
|
callback();
|
627
631
|
},
|
628
632
|
})
|
@@ -652,8 +656,9 @@
|
|
652
656
|
|
653
657
|
if (module.is.animating() || module.is.active()) {
|
654
658
|
module.debug('Hiding modal');
|
655
|
-
if (settings.transition && $.fn.transition !== undefined
|
659
|
+
if (settings.transition && $.fn.transition !== undefined) {
|
656
660
|
module.remove.active();
|
661
|
+
module.set.observeAttributes(false);
|
657
662
|
$module
|
658
663
|
.transition({
|
659
664
|
debug: settings.debug,
|
@@ -989,9 +994,7 @@
|
|
989
994
|
return module.cache.isIE;
|
990
995
|
},
|
991
996
|
animating: function () {
|
992
|
-
return $module.transition('is
|
993
|
-
? $module.transition('is animating')
|
994
|
-
: $module.is(':visible');
|
997
|
+
return $module.transition('is animating');
|
995
998
|
},
|
996
999
|
scrolling: function () {
|
997
1000
|
return $dimmable.hasClass(className.scrolling);
|
@@ -1034,6 +1037,9 @@
|
|
1034
1037
|
},
|
1035
1038
|
|
1036
1039
|
set: {
|
1040
|
+
observeAttributes: function (state) {
|
1041
|
+
observeAttributes = state !== false;
|
1042
|
+
},
|
1037
1043
|
autofocus: function () {
|
1038
1044
|
var
|
1039
1045
|
$autofocus = $inputs.filter('[autofocus]'),
|
@@ -125,9 +125,9 @@
|
|
125
125
|
}
|
126
126
|
}
|
127
127
|
if (settings.popup) {
|
128
|
-
|
128
|
+
module.set.invisible();
|
129
129
|
$offsetParent = module.get.offsetParent();
|
130
|
-
|
130
|
+
module.remove.invisible();
|
131
131
|
if (settings.movePopup && module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) {
|
132
132
|
module.debug('Moving popup to the same offset parent as target');
|
133
133
|
$popup
|
@@ -414,7 +414,7 @@
|
|
414
414
|
animate: {
|
415
415
|
show: function (callback) {
|
416
416
|
callback = isFunction(callback) ? callback : function () {};
|
417
|
-
if (settings.transition && module.can.useElement('transition')
|
417
|
+
if (settings.transition && module.can.useElement('transition')) {
|
418
418
|
module.set.visible();
|
419
419
|
$popup
|
420
420
|
.transition({
|
@@ -436,7 +436,7 @@
|
|
436
436
|
hide: function (callback) {
|
437
437
|
callback = isFunction(callback) ? callback : function () {};
|
438
438
|
module.debug('Hiding pop-up');
|
439
|
-
if (settings.transition && $.fn.transition !== undefined
|
439
|
+
if (settings.transition && $.fn.transition !== undefined) {
|
440
440
|
$popup
|
441
441
|
.transition({
|
442
442
|
animation: (settings.transition.hideMethod || settings.transition) + ' out',
|
@@ -901,8 +901,8 @@
|
|
901
901
|
.css(positioning)
|
902
902
|
.removeClass(className.position)
|
903
903
|
.addClass(position)
|
904
|
-
.addClass(className.loading)
|
905
904
|
;
|
905
|
+
module.set.invisible();
|
906
906
|
|
907
907
|
popupOffset = module.get.popupOffset();
|
908
908
|
|
@@ -926,7 +926,7 @@
|
|
926
926
|
module.debug('Popup could not find a position to display', $popup);
|
927
927
|
module.error(error.cannotPlace, element);
|
928
928
|
module.remove.attempts();
|
929
|
-
module.remove.
|
929
|
+
module.remove.invisible();
|
930
930
|
module.reset();
|
931
931
|
settings.onUnplaceable.call($popup, element);
|
932
932
|
|
@@ -935,7 +935,7 @@
|
|
935
935
|
}
|
936
936
|
module.debug('Position is on stage', position);
|
937
937
|
module.remove.attempts();
|
938
|
-
module.remove.
|
938
|
+
module.remove.invisible();
|
939
939
|
if (settings.setFluidWidth && module.is.fluid()) {
|
940
940
|
module.set.fluidWidth(calculations);
|
941
941
|
}
|
@@ -949,6 +949,14 @@
|
|
949
949
|
$popup.css('width', calculations.container.width);
|
950
950
|
},
|
951
951
|
|
952
|
+
loading: function () {
|
953
|
+
$popup.addClass(className.loading);
|
954
|
+
},
|
955
|
+
|
956
|
+
invisible: function () {
|
957
|
+
$popup.addClass(className.invisible);
|
958
|
+
},
|
959
|
+
|
952
960
|
variation: function (variation) {
|
953
961
|
variation = variation || module.get.variation();
|
954
962
|
if (variation && module.has.popup()) {
|
@@ -966,6 +974,9 @@
|
|
966
974
|
loading: function () {
|
967
975
|
$popup.removeClass(className.loading);
|
968
976
|
},
|
977
|
+
invisible: function () {
|
978
|
+
$popup.removeClass(className.invisible);
|
979
|
+
},
|
969
980
|
variation: function (variation) {
|
970
981
|
variation = variation || module.get.variation();
|
971
982
|
if (variation) {
|
@@ -1475,6 +1486,7 @@
|
|
1475
1486
|
basic: 'basic',
|
1476
1487
|
animating: 'animating',
|
1477
1488
|
dropdown: 'dropdown',
|
1489
|
+
invisible: 'invisible',
|
1478
1490
|
fluid: 'fluid',
|
1479
1491
|
loading: 'loading',
|
1480
1492
|
popup: 'ui popup',
|
@@ -704,12 +704,36 @@
|
|
704
704
|
*******************************/
|
705
705
|
& when (@variationPopupLoading) {
|
706
706
|
.ui.loading.popup {
|
707
|
-
|
708
|
-
|
709
|
-
|
707
|
+
cursor: default;
|
708
|
+
pointer-events: @loadingPointerEvents;
|
709
|
+
user-select: none;
|
710
|
+
& * {
|
711
|
+
opacity: @loadingOpacity;
|
712
|
+
}
|
713
|
+
&::after {
|
714
|
+
position: absolute;
|
715
|
+
content: "";
|
716
|
+
top: 50%;
|
717
|
+
left: 50%;
|
718
|
+
margin: @loaderMargin;
|
719
|
+
width: @loaderSize;
|
720
|
+
height: @loaderSize;
|
721
|
+
animation: loader @loaderSpeed infinite linear;
|
722
|
+
border: @loaderLineWidth solid @loaderLineColor;
|
723
|
+
border-radius: @circularRadius;
|
724
|
+
box-shadow: 0 0 0 1px transparent;
|
725
|
+
visibility: visible;
|
726
|
+
z-index: @loaderLineZIndex;
|
727
|
+
}
|
710
728
|
}
|
711
729
|
}
|
712
730
|
|
731
|
+
.ui.invisible.popup {
|
732
|
+
display: block;
|
733
|
+
visibility: hidden !important;
|
734
|
+
z-index: @invisibleZIndex;
|
735
|
+
}
|
736
|
+
|
713
737
|
.ui.animating.popup,
|
714
738
|
.ui.visible.popup {
|
715
739
|
display: block;
|
@@ -807,6 +831,8 @@
|
|
807
831
|
@color: @value;
|
808
832
|
@c: @colors[@@color][color];
|
809
833
|
@l: @colors[@@color][light];
|
834
|
+
@cl: lighten(@c, @loadingColoredPercent);
|
835
|
+
@ll: darken(@l, @loadingColoredPercent);
|
810
836
|
|
811
837
|
& when not (@variationPopupTooltip) {
|
812
838
|
.ui.ui.ui.@{color}.popup::before,
|
@@ -814,6 +840,9 @@
|
|
814
840
|
background: @c;
|
815
841
|
color: @white;
|
816
842
|
border: none;
|
843
|
+
.loading& when (@variationPopupLoading) {
|
844
|
+
background: @cl;
|
845
|
+
}
|
817
846
|
}
|
818
847
|
.ui.ui.ui.@{color}.popup::before {
|
819
848
|
box-shadow: none;
|
@@ -823,6 +852,9 @@
|
|
823
852
|
.ui.inverted.@{color}.popup {
|
824
853
|
background: @l;
|
825
854
|
color: @black;
|
855
|
+
.loading& when (@variationPopupLoading) {
|
856
|
+
background: @ll;
|
857
|
+
}
|
826
858
|
}
|
827
859
|
}
|
828
860
|
}
|
@@ -835,6 +867,12 @@
|
|
835
867
|
color: @white;
|
836
868
|
border: none;
|
837
869
|
}
|
870
|
+
& when (@variationPopupLoading) {
|
871
|
+
.ui.ui.ui.@{color}.loading.popup::before,
|
872
|
+
.ui.@{color}.loading.popup {
|
873
|
+
background: @cl;
|
874
|
+
}
|
875
|
+
}
|
838
876
|
.ui.ui.ui.@{color}.popup::before,
|
839
877
|
[data-tooltip][data-variation~="@{color}"]::before {
|
840
878
|
box-shadow: none;
|
@@ -847,6 +885,12 @@
|
|
847
885
|
background: @l;
|
848
886
|
color: @black;
|
849
887
|
}
|
888
|
+
& when (@variationPopupLoading) {
|
889
|
+
.ui.ui.ui.inverted.@{color}.loading.popup::before,
|
890
|
+
.ui.inverted.@{color}.loading.popup {
|
891
|
+
background: @ll;
|
892
|
+
}
|
893
|
+
}
|
850
894
|
}
|
851
895
|
}
|
852
896
|
});
|
@@ -59,7 +59,6 @@
|
|
59
59
|
instance = $module.data(moduleNamespace),
|
60
60
|
|
61
61
|
animating = false,
|
62
|
-
transitionEnd,
|
63
62
|
module
|
64
63
|
;
|
65
64
|
module = {
|
@@ -115,7 +114,6 @@
|
|
115
114
|
|
116
115
|
initialize: function () {
|
117
116
|
module.set.duration();
|
118
|
-
module.set.transitionEvent();
|
119
117
|
module.debug(element);
|
120
118
|
|
121
119
|
module.read.metadata();
|
@@ -195,17 +193,14 @@
|
|
195
193
|
|
196
194
|
bind: {
|
197
195
|
transitionEnd: function (callback) {
|
198
|
-
var
|
199
|
-
transitionEnd = module.get.transitionEnd()
|
200
|
-
;
|
201
196
|
$bars
|
202
|
-
.one(
|
197
|
+
.one('transitionend' + eventNamespace, function (event) {
|
203
198
|
clearTimeout(module.failSafeTimer);
|
204
199
|
callback.call(this, event);
|
205
200
|
})
|
206
201
|
;
|
207
202
|
module.failSafeTimer = setTimeout(function () {
|
208
|
-
$bars.triggerHandler(
|
203
|
+
$bars.triggerHandler('transitionend');
|
209
204
|
}, settings.duration + settings.failSafeDelay);
|
210
205
|
module.verbose('Adding fail safe timer', module.timer);
|
211
206
|
},
|
@@ -330,24 +325,6 @@
|
|
330
325
|
: value;
|
331
326
|
},
|
332
327
|
|
333
|
-
transitionEnd: function () {
|
334
|
-
var
|
335
|
-
element = document.createElement('element'),
|
336
|
-
transitions = {
|
337
|
-
transition: 'transitionend',
|
338
|
-
OTransition: 'oTransitionEnd',
|
339
|
-
MozTransition: 'transitionend',
|
340
|
-
WebkitTransition: 'webkitTransitionEnd',
|
341
|
-
},
|
342
|
-
transition
|
343
|
-
;
|
344
|
-
for (transition in transitions) {
|
345
|
-
if (element.style[transition] !== undefined) {
|
346
|
-
return transitions[transition];
|
347
|
-
}
|
348
|
-
}
|
349
|
-
},
|
350
|
-
|
351
328
|
// gets current displayed percentage (if animating values this is the intermediary value)
|
352
329
|
displayPercent: function (index) {
|
353
330
|
var
|
@@ -687,9 +664,6 @@
|
|
687
664
|
settings.onError.call(element, module.value, module.total);
|
688
665
|
});
|
689
666
|
},
|
690
|
-
transitionEvent: function () {
|
691
|
-
transitionEnd = module.get.transitionEnd();
|
692
|
-
},
|
693
667
|
total: function (totalValue) {
|
694
668
|
module.total = totalValue;
|
695
669
|
},
|
@@ -408,7 +408,7 @@
|
|
408
408
|
return module.is.focused() && !module.is.visible() && !module.is.empty();
|
409
409
|
},
|
410
410
|
transition: function () {
|
411
|
-
return settings.transition && $.fn.transition !== undefined
|
411
|
+
return settings.transition && $.fn.transition !== undefined;
|
412
412
|
},
|
413
413
|
},
|
414
414
|
|
@@ -116,33 +116,29 @@
|
|
116
116
|
module.set.active();
|
117
117
|
};
|
118
118
|
settings.onBeforeChange.call($nextSide[0]);
|
119
|
-
|
120
|
-
|
119
|
+
module.verbose('Starting CSS animation');
|
120
|
+
$module
|
121
|
+
.addClass(className.animating)
|
122
|
+
;
|
123
|
+
$sides
|
124
|
+
.css(propertyObject)
|
125
|
+
.one('transitionend', callback)
|
126
|
+
;
|
127
|
+
module.set.duration(settings.duration);
|
128
|
+
requestAnimationFrame(function () {
|
121
129
|
$module
|
122
130
|
.addClass(className.animating)
|
123
131
|
;
|
124
|
-
$
|
125
|
-
.
|
126
|
-
.one(module.get.transitionEvent(), callback)
|
132
|
+
$activeSide
|
133
|
+
.addClass(className.hidden)
|
127
134
|
;
|
128
|
-
|
129
|
-
requestAnimationFrame(function () {
|
130
|
-
$module
|
131
|
-
.addClass(className.animating)
|
132
|
-
;
|
133
|
-
$activeSide
|
134
|
-
.addClass(className.hidden)
|
135
|
-
;
|
136
|
-
});
|
137
|
-
} else {
|
138
|
-
callback();
|
139
|
-
}
|
135
|
+
});
|
140
136
|
},
|
141
137
|
|
142
138
|
queue: function (method) {
|
143
139
|
module.debug('Queueing animation of', method);
|
144
140
|
$sides
|
145
|
-
.one(
|
141
|
+
.one('transitionend', function () {
|
146
142
|
module.debug('Executing queued animation');
|
147
143
|
setTimeout(function () {
|
148
144
|
$module.shape(method);
|
@@ -412,24 +408,6 @@
|
|
412
408
|
},
|
413
409
|
},
|
414
410
|
|
415
|
-
transitionEvent: function () {
|
416
|
-
var
|
417
|
-
element = document.createElement('element'),
|
418
|
-
transitions = {
|
419
|
-
transition: 'transitionend',
|
420
|
-
OTransition: 'oTransitionEnd',
|
421
|
-
MozTransition: 'transitionend',
|
422
|
-
WebkitTransition: 'webkitTransitionEnd',
|
423
|
-
},
|
424
|
-
transition
|
425
|
-
;
|
426
|
-
for (transition in transitions) {
|
427
|
-
if (element.style[transition] !== undefined) {
|
428
|
-
return transitions[transition];
|
429
|
-
}
|
430
|
-
}
|
431
|
-
},
|
432
|
-
|
433
411
|
nextSide: function () {
|
434
412
|
return $activeSide.next(selector.side).length > 0
|
435
413
|
? $activeSide.next(selector.side)
|