fomantic-ui 2.9.0-beta.285 → 2.9.0-beta.286
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/FAQ.md +38 -38
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- 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 +1 -1
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +1 -1
- 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 +37 -59
- 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 +1 -1
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +1 -1
- 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/form.css +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +1 -1
- 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 +1 -1
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +1 -1
- 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 +1 -1
- package/dist/components/popup.js +1 -1
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +1 -1
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- 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 +1 -1
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +1 -1
- 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 +1 -1
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +1 -1
- 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 +1 -1
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +1 -1
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -1
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +49 -49
- package/dist/semantic.js +61 -83
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/examples/components/button.html +1 -1
- package/examples/components/card.html +1 -1
- package/examples/components/input.html +1 -1
- package/examples/components/menu.html +1 -1
- package/examples/components/site.html +1 -1
- package/examples/components/table.html +1 -1
- package/package.json +1 -1
- package/src/definitions/modules/accordion.less +371 -371
- package/src/definitions/modules/dropdown.js +36 -58
- package/tasks/admin/distributions/create.js +1 -1
- package/tasks/admin/publish.js +1 -1
- package/tasks/admin/release.js +1 -1
- package/tasks/build/assets.js +1 -1
- package/tasks/build/css.js +1 -1
- package/tasks/build/javascript.js +1 -1
- package/tasks/check-install.js +1 -1
- package/tasks/clean.js +1 -1
- package/tasks/collections/README.md +1 -1
- package/tasks/collections/admin.js +1 -1
- package/tasks/config/admin/oauth.example.js +1 -1
- package/tasks/config/admin/templates/composer.json +1 -1
- package/tasks/rtl/watch.js +1 -1
- package/tasks/version.js +1 -1
- package/test/fixtures/accordion.html +1 -1
- package/test/fixtures/checkbox.html +1 -1
- package/test/fixtures/dropdown.html +1 -1
- package/test/fixtures/modal.html +1 -1
- package/test/fixtures/popup.html +1 -1
- package/test/fixtures/rating.html +1 -1
- package/test/fixtures/shape.html +1 -1
- package/test/fixtures/sidebar.html +1 -1
- package/test/fixtures/tab.html +1 -1
- package/test/fixtures/transition.html +1 -1
- package/test/fixtures/video.html +1 -1
- package/test/helpers/jasmine-jquery.js +1 -1
- package/test/helpers/jasmine-sinon.js +1 -1
- package/test/helpers/jquery-events.js +1 -1
- package/test/helpers/sinon.js +1 -1
- package/test/meteor/fonts.js +1 -1
- package/test/modules/accordion.spec.js +1 -1
- package/test/modules/checkbox.spec.js +1 -1
- package/test/modules/dropdown.spec.js +1 -1
- package/test/modules/modal.spec.js +1 -1
- package/test/modules/module.spec.js +1 -1
- package/test/modules/popup.spec.js +1 -1
- package/test/modules/search.spec.js +1 -1
- package/test/modules/shape.spec.js +1 -1
- package/test/modules/sidebar.spec.js +1 -1
- package/test/modules/tab.spec.js +1 -1
- package/test/modules/transition.spec.js +1 -1
- package/test/modules/video.spec.js +1 -1
@@ -30,11 +30,6 @@ $.fn.dropdown = function(parameters) {
|
|
30
30
|
|
31
31
|
moduleSelector = $allModules.selector || '',
|
32
32
|
|
33
|
-
hasTouch = ('ontouchstart' in document.documentElement),
|
34
|
-
clickEvent = hasTouch
|
35
|
-
? 'touchstart'
|
36
|
-
: 'click',
|
37
|
-
|
38
33
|
time = new Date().getTime(),
|
39
34
|
performance = [],
|
40
35
|
|
@@ -541,9 +536,7 @@ $.fn.dropdown = function(parameters) {
|
|
541
536
|
}
|
542
537
|
if(settings.onShow.call(element) !== false) {
|
543
538
|
module.animate.show(function() {
|
544
|
-
|
545
|
-
module.bind.intent();
|
546
|
-
}
|
539
|
+
module.bind.intent();
|
547
540
|
if(module.has.search() && !preventFocus) {
|
548
541
|
module.focusSearch();
|
549
542
|
}
|
@@ -570,8 +563,17 @@ $.fn.dropdown = function(parameters) {
|
|
570
563
|
}
|
571
564
|
callback.call(element);
|
572
565
|
});
|
566
|
+
// Hide submenus explicitly. On some browsers (esp. mobile), they will not automatically receive a
|
567
|
+
// mouseleave event
|
568
|
+
var $subMenu = $module.find(selector.menu);
|
569
|
+
if($subMenu.length > 0) {
|
570
|
+
module.verbose('Hiding sub-menu', $subMenu);
|
571
|
+
$subMenu.each(function() {
|
572
|
+
module.animate.hide(false, $(this));
|
573
|
+
});
|
574
|
+
}
|
573
575
|
}
|
574
|
-
} else
|
576
|
+
} else {
|
575
577
|
module.unbind.intent();
|
576
578
|
}
|
577
579
|
iconClicked = false;
|
@@ -639,8 +641,8 @@ $.fn.dropdown = function(parameters) {
|
|
639
641
|
module.verbose('Binding mouse events');
|
640
642
|
if(module.is.multiple()) {
|
641
643
|
$module
|
642
|
-
.on(
|
643
|
-
.on(
|
644
|
+
.on('click' + eventNamespace, selector.label, module.event.label.click)
|
645
|
+
.on('click' + eventNamespace, selector.remove, module.event.remove.click)
|
644
646
|
;
|
645
647
|
}
|
646
648
|
if( module.is.searchSelection() ) {
|
@@ -649,31 +651,33 @@ $.fn.dropdown = function(parameters) {
|
|
649
651
|
.on('mouseup' + eventNamespace, module.event.mouseup)
|
650
652
|
.on('mousedown' + eventNamespace, selector.menu, module.event.menu.mousedown)
|
651
653
|
.on('mouseup' + eventNamespace, selector.menu, module.event.menu.mouseup)
|
652
|
-
.on(
|
653
|
-
.on(
|
654
|
+
.on('click' + eventNamespace, selector.icon, module.event.icon.click)
|
655
|
+
.on('click' + eventNamespace, selector.clearIcon, module.event.clearIcon.click)
|
654
656
|
.on('focus' + eventNamespace, selector.search, module.event.search.focus)
|
655
|
-
.on(
|
657
|
+
.on('click' + eventNamespace, selector.search, module.event.search.focus)
|
656
658
|
.on('blur' + eventNamespace, selector.search, module.event.search.blur)
|
657
|
-
.on(
|
659
|
+
.on('click' + eventNamespace, selector.text, module.event.text.focus)
|
658
660
|
;
|
659
661
|
if(module.is.multiple()) {
|
660
662
|
$module
|
661
|
-
.on(
|
662
|
-
.on(
|
663
|
+
.on('click' + eventNamespace, module.event.click)
|
664
|
+
.on('click' + eventNamespace, module.event.search.focus)
|
663
665
|
;
|
664
666
|
}
|
665
667
|
}
|
666
668
|
else {
|
667
669
|
if(settings.on == 'click') {
|
668
670
|
$module
|
669
|
-
.on(
|
670
|
-
.on(
|
671
|
+
.on('click' + eventNamespace, selector.icon, module.event.icon.click)
|
672
|
+
.on('click' + eventNamespace, module.event.test.toggle)
|
671
673
|
;
|
672
674
|
}
|
673
675
|
else if(settings.on == 'hover') {
|
674
676
|
$module
|
675
677
|
.on('mouseenter' + eventNamespace, module.delay.show)
|
676
678
|
.on('mouseleave' + eventNamespace, module.delay.hide)
|
679
|
+
.on('touchstart' + eventNamespace, module.event.test.toggle)
|
680
|
+
.on('touchstart' + eventNamespace, selector.icon, module.event.icon.click)
|
677
681
|
;
|
678
682
|
}
|
679
683
|
else {
|
@@ -685,7 +689,7 @@ $.fn.dropdown = function(parameters) {
|
|
685
689
|
.on('mousedown' + eventNamespace, module.event.mousedown)
|
686
690
|
.on('mouseup' + eventNamespace, module.event.mouseup)
|
687
691
|
.on('focus' + eventNamespace, module.event.focus)
|
688
|
-
.on(
|
692
|
+
.on('click' + eventNamespace, selector.clearIcon, module.event.clearIcon.click)
|
689
693
|
;
|
690
694
|
if(module.has.menuSearch() ) {
|
691
695
|
$module
|
@@ -699,21 +703,16 @@ $.fn.dropdown = function(parameters) {
|
|
699
703
|
}
|
700
704
|
}
|
701
705
|
$menu
|
702
|
-
.on(
|
706
|
+
.on('mouseenter' + eventNamespace, selector.item, module.event.item.mouseenter)
|
707
|
+
.on('touchstart' + eventNamespace, selector.item, module.event.item.mouseenter)
|
703
708
|
.on('mouseleave' + eventNamespace, selector.item, module.event.item.mouseleave)
|
704
709
|
.on('click' + eventNamespace, selector.item, module.event.item.click)
|
705
710
|
;
|
706
711
|
},
|
707
712
|
intent: function() {
|
708
713
|
module.verbose('Binding hide intent event to document');
|
709
|
-
if(hasTouch) {
|
710
|
-
$document
|
711
|
-
.on('touchstart' + elementNamespace, module.event.test.touch)
|
712
|
-
.on('touchmove' + elementNamespace, module.event.test.touch)
|
713
|
-
;
|
714
|
-
}
|
715
714
|
$document
|
716
|
-
.on(
|
715
|
+
.on('click' + elementNamespace, module.event.test.hide)
|
717
716
|
;
|
718
717
|
}
|
719
718
|
},
|
@@ -721,14 +720,8 @@ $.fn.dropdown = function(parameters) {
|
|
721
720
|
unbind: {
|
722
721
|
intent: function() {
|
723
722
|
module.verbose('Removing hide intent event from document');
|
724
|
-
if(hasTouch) {
|
725
|
-
$document
|
726
|
-
.off('touchstart' + elementNamespace)
|
727
|
-
.off('touchmove' + elementNamespace)
|
728
|
-
;
|
729
|
-
}
|
730
723
|
$document
|
731
|
-
.off(
|
724
|
+
.off('click' + elementNamespace)
|
732
725
|
;
|
733
726
|
}
|
734
727
|
},
|
@@ -1267,23 +1260,12 @@ $.fn.dropdown = function(parameters) {
|
|
1267
1260
|
if (!module.is.multiple() || (module.is.multiple() && !module.is.active())) {
|
1268
1261
|
focused = true;
|
1269
1262
|
}
|
1270
|
-
if( module.determine.eventOnElement(event, toggleBehavior) ) {
|
1263
|
+
if( module.determine.eventOnElement(event, toggleBehavior) && event.type !== 'touchstart') {
|
1264
|
+
// do not preventDefault of touchstart; so emulated mouseenter is triggered on first touch and not later
|
1265
|
+
// (when selecting an item). The double-showing of the dropdown through both events does not hurt.
|
1271
1266
|
event.preventDefault();
|
1272
1267
|
}
|
1273
1268
|
},
|
1274
|
-
touch: function(event) {
|
1275
|
-
module.determine.eventOnElement(event, function() {
|
1276
|
-
if(event.type == 'touchstart') {
|
1277
|
-
module.timer = setTimeout(function() {
|
1278
|
-
module.hide();
|
1279
|
-
}, settings.delay.touch);
|
1280
|
-
}
|
1281
|
-
else if(event.type == 'touchmove') {
|
1282
|
-
clearTimeout(module.timer);
|
1283
|
-
}
|
1284
|
-
});
|
1285
|
-
event.stopPropagation();
|
1286
|
-
},
|
1287
1269
|
hide: function(event) {
|
1288
1270
|
if(module.determine.eventInModule(event, module.hide)){
|
1289
1271
|
if(element.id && $(event.target).attr('for') === element.id){
|
@@ -1367,13 +1349,15 @@ $.fn.dropdown = function(parameters) {
|
|
1367
1349
|
},
|
1368
1350
|
mouseleave: function(event) {
|
1369
1351
|
var
|
1370
|
-
$subMenu = $(this).
|
1352
|
+
$subMenu = $(this).find(selector.menu)
|
1371
1353
|
;
|
1372
1354
|
if($subMenu.length > 0) {
|
1373
1355
|
clearTimeout(module.itemTimer);
|
1374
1356
|
module.itemTimer = setTimeout(function() {
|
1375
1357
|
module.verbose('Hiding sub-menu', $subMenu);
|
1376
|
-
|
1358
|
+
$subMenu.each(function() {
|
1359
|
+
module.animate.hide(false, $(this));
|
1360
|
+
});
|
1377
1361
|
}, settings.delay.hide);
|
1378
1362
|
}
|
1379
1363
|
},
|
@@ -3626,9 +3610,6 @@ $.fn.dropdown = function(parameters) {
|
|
3626
3610
|
$currentMenu.removeClass(className.loading);
|
3627
3611
|
return canOpenRightward;
|
3628
3612
|
},
|
3629
|
-
click: function() {
|
3630
|
-
return (hasTouch || settings.on == 'click');
|
3631
|
-
},
|
3632
3613
|
extendSelect: function() {
|
3633
3614
|
return settings.allowAdditions || settings.apiSettings;
|
3634
3615
|
},
|
@@ -3698,9 +3679,7 @@ $.fn.dropdown = function(parameters) {
|
|
3698
3679
|
start = ($subMenu)
|
3699
3680
|
? function() {}
|
3700
3681
|
: function() {
|
3701
|
-
|
3702
|
-
module.unbind.intent();
|
3703
|
-
}
|
3682
|
+
module.unbind.intent();
|
3704
3683
|
module.remove.active();
|
3705
3684
|
},
|
3706
3685
|
transition = settings.transition.hideMethod || module.get.transition($subMenu)
|
@@ -4077,7 +4056,6 @@ $.fn.dropdown.settings = {
|
|
4077
4056
|
hide : 300,
|
4078
4057
|
show : 200,
|
4079
4058
|
search : 20,
|
4080
|
-
touch : 50
|
4081
4059
|
},
|
4082
4060
|
|
4083
4061
|
/* Callbacks */
|
package/tasks/admin/publish.js
CHANGED
package/tasks/admin/release.js
CHANGED
package/tasks/build/assets.js
CHANGED
package/tasks/build/css.js
CHANGED
package/tasks/check-install.js
CHANGED
package/tasks/clean.js
CHANGED
package/tasks/rtl/watch.js
CHANGED
package/tasks/version.js
CHANGED
@@ -21,4 +21,4 @@
|
|
21
21
|
<p>Three common ways for a prospective owner to acquire a dog is from pet shops, private owners, or shelters.</p>
|
22
22
|
<p>A pet shop may be the most convenient way to buy a dog. Buying a dog from a private owner allows you to assess the pedigree and upbringing of your dog before choosing to take it home. Lastly, finding your dog from a shelter, helps give a good home to a dog who may not find one so readily.</p>
|
23
23
|
</div>
|
24
|
-
</div>
|
24
|
+
</div>
|
package/test/fixtures/modal.html
CHANGED
package/test/fixtures/popup.html
CHANGED
@@ -5,4 +5,4 @@
|
|
5
5
|
<i class="circular heart icon link" data-content="Right Center" data-position="right center"></i>
|
6
6
|
<i class="circular heart icon link" data-content="Bottom Left" data-position="bottom left"></i>
|
7
7
|
<i class="circular heart icon link" data-content="Bottom Center" data-position="bottom center"></i>
|
8
|
-
<i class="circular heart icon link" data-content="Bottom Right" data-position="bottom right"></i>
|
8
|
+
<i class="circular heart icon link" data-content="Bottom Right" data-position="bottom right"></i>
|
package/test/fixtures/shape.html
CHANGED
package/test/fixtures/tab.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<div class="ui image"></div>
|
1
|
+
<div class="ui image"></div>
|
package/test/fixtures/video.html
CHANGED
package/test/helpers/sinon.js
CHANGED
@@ -4816,4 +4816,4 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
4816
4816
|
}
|
4817
4817
|
}(typeof sinon == "object" && sinon || null, typeof window != "undefined" ? window : (typeof self != "undefined") ? self : global));
|
4818
4818
|
|
4819
|
-
return sinon;}.call(typeof window != 'undefined' && window || {}));
|
4819
|
+
return sinon;}.call(typeof window != 'undefined' && window || {}));
|
package/test/meteor/fonts.js
CHANGED
package/test/modules/tab.spec.js
CHANGED