diff --git a/definitions/behaviors/form.js b/definitions/behaviors/form.js index c28c546..1451ab9 100644 --- a/definitions/behaviors/form.js +++ b/definitions/behaviors/form.js @@ -603,9 +603,9 @@ $.fn.form = function(parameters) { } else { if(isRadio) { - if(values[name] === undefined) { + if(values[name] === undefined || values[name] == false) { values[name] = (isChecked) - ? true + ? value || true : false ; } @@ -1263,10 +1263,10 @@ $.fn.form.settings = { isExactly : '{name} must be exactly "{ruleValue}"', not : '{name} cannot be set to "{ruleValue}"', notExactly : '{name} cannot be set to exactly "{ruleValue}"', - contain : '{name} cannot contain "{ruleValue}"', - containExactly : '{name} cannot contain exactly "{ruleValue}"', - doesntContain : '{name} must contain "{ruleValue}"', - doesntContainExactly : '{name} must contain exactly "{ruleValue}"', + contain : '{name} must contain "{ruleValue}"', + containExactly : '{name} must contain exactly "{ruleValue}"', + doesntContain : '{name} cannot contain "{ruleValue}"', + doesntContainExactly : '{name} cannot contain exactly "{ruleValue}"', minLength : '{name} must be at least {ruleValue} characters', length : '{name} must be at least {ruleValue} characters', exactLength : '{name} must be exactly {ruleValue} characters', diff --git a/definitions/behaviors/visibility.js b/definitions/behaviors/visibility.js index fcffbd8..d5ab6c2 100644 --- a/definitions/behaviors/visibility.js +++ b/definitions/behaviors/visibility.js @@ -927,8 +927,8 @@ $.fn.visibility = function(parameters) { // visibility element.topPassed = (screen.top >= element.top); element.bottomPassed = (screen.top >= element.bottom); - element.topVisible = (screen.bottom >= element.top) && !element.bottomPassed; - element.bottomVisible = (screen.bottom >= element.bottom) && !element.topPassed; + element.topVisible = (screen.bottom >= element.top) && !element.topPassed; + element.bottomVisible = (screen.bottom >= element.bottom) && !element.bottomPassed; element.pixelsPassed = 0; element.percentagePassed = 0; diff --git a/definitions/collections/menu.less b/definitions/collections/menu.less index defaad5..dff7744 100644 --- a/definitions/collections/menu.less +++ b/definitions/collections/menu.less @@ -349,6 +349,15 @@ Coupling *******************************/ +/*-------------- + List +---------------*/ + +/* Menu divider shouldnt apply */ +.ui.menu .list .item:before { + background: none !important; +} + /*-------------- Sidebar ---------------*/ diff --git a/definitions/elements/button.less b/definitions/elements/button.less index e5b2647..fbb5fe1 100644 --- a/definitions/elements/button.less +++ b/definitions/elements/button.less @@ -743,7 +743,7 @@ .ui.basic.active.button { background: @basicActiveBackground !important; box-shadow: @basicActiveBoxShadow !important; - color: @basicActiveTextColor; + color: @basicActiveTextColor !important; } .ui.basic.buttons .active.button:hover, .ui.basic.active.button:hover { diff --git a/definitions/elements/label.less b/definitions/elements/label.less index 7141666..58fced2 100644 --- a/definitions/elements/label.less +++ b/definitions/elements/label.less @@ -122,6 +122,7 @@ a.ui.label { margin-top: @lineHeightOffset; } + /* Remove border radius on attached segment */ .ui.attached.segment > .ui.top.left.attached.label, .ui.bottom.attached.segment > .ui.top.left.attached.label { diff --git a/definitions/elements/list.less b/definitions/elements/list.less index b9c9cf4..14017a0 100644 --- a/definitions/elements/list.less +++ b/definitions/elements/list.less @@ -421,16 +421,16 @@ ol.ui.list ol li, color: @linkListItemColor; transition: @linkListTransition; } -.ui.link.list a.item:hover, -.ui.link.list .item a:not(.ui):hover { +.ui.link.list.list a.item:hover, +.ui.link.list.list .item a:not(.ui):hover { color: @linkListItemHoverColor; } -.ui.link.list a.item:active, -.ui.link.list .item a:not(.ui):active { +.ui.link.list.list a.item:active, +.ui.link.list.list .item a:not(.ui):active { color: @linkListItemDownColor; } -.ui.link.list .active.item, -.ui.link.list .active.item a:not(.ui) { +.ui.link.list.list .active.item, +.ui.link.list.list .active.item a:not(.ui) { color: @linkListItemActiveColor; } @@ -440,16 +440,16 @@ ol.ui.list ol li, .ui.inverted.link.list .item a:not(.ui) { color: @invertedLinkListItemColor; } -.ui.inverted.link.list a.item:hover, -.ui.inverted.link.list .item a:not(.ui):hover { +.ui.inverted.link.list.list a.item:hover, +.ui.inverted.link.list.list .item a:not(.ui):hover { color: @invertedLinkListItemHoverColor; } -.ui.inverted.link.list a.item:active, -.ui.inverted.link.list .item a:not(.ui):active { +.ui.inverted.link.list.list a.item:active, +.ui.inverted.link.list.list .item a:not(.ui):active { color: @invertedLinkListItemDownColor; } -.ui.inverted.link.list a.active.item, -.ui.inverted.link.list .active.item a:not(.ui) { +.ui.inverted.link.list.list a.active.item, +.ui.inverted.link.list.list .active.item a:not(.ui) { color: @invertedLinkListItemActiveColor; } @@ -471,7 +471,7 @@ ol.ui.list ol li, .ui.selection.list > .item:last-child { margin-bottom: 0em; } -.ui.selection.list.list > .item:hover, +.ui.selection.list.list > .item:hover, .ui.selection.list > .item:hover { background: @selectionListHoverBackground; color: @selectionListHoverColor; diff --git a/definitions/elements/reveal.less b/definitions/elements/reveal.less index 353ba63..4531f31 100644 --- a/definitions/elements/reveal.less +++ b/definitions/elements/reveal.less @@ -233,6 +233,14 @@ } +/******************************* + Coupling +*******************************/ + +.ui.reveal > .ui.ribbon.label { + z-index: @overlayZIndex; +} + /******************************* Variations *******************************/ diff --git a/definitions/globals/site.less b/definitions/globals/site.less index ecb86e6..ffe558b 100644 --- a/definitions/globals/site.less +++ b/definitions/globals/site.less @@ -135,6 +135,7 @@ a:hover { body ::-webkit-scrollbar { -webkit-appearance: none; width: @customScrollbarWidth; + height: @customScrollbarHeight; } body ::-webkit-scrollbar-track { background: @trackBackground; diff --git a/definitions/modules/dropdown.js b/definitions/modules/dropdown.js index 805d06f..82f87f3 100644 --- a/definitions/modules/dropdown.js +++ b/definitions/modules/dropdown.js @@ -496,7 +496,7 @@ $.fn.dropdown = function(parameters) { ? callback : function(){} ; - if( module.is.active() ) { + if( module.is.active() && !module.is.animatingOutward() ) { module.debug('Hiding dropdown'); if(settings.onHide.call(element) !== false) { module.animate.hide(function() { @@ -2435,7 +2435,6 @@ $.fn.dropdown = function(parameters) { var escapedValue = module.escape.value(value), hasInput = ($input.length > 0), - isAddition = !module.has.value(value), currentValue = module.get.values(), stringValue = (value !== undefined) ? String(value) @@ -2538,8 +2537,8 @@ $.fn.dropdown = function(parameters) { module.save.remoteData(selectedText, selectedValue); } if(settings.useLabels) { - module.add.value(selectedValue, selectedText, $selected); module.add.label(selectedValue, selectedText, shouldAnimate); + module.add.value(selectedValue, selectedText, $selected); module.set.activeItem($selected); module.filterActive(); module.select.nextAvailable($selectedItem); @@ -2587,8 +2586,8 @@ $.fn.dropdown = function(parameters) { ; $label = settings.onLabelCreate.call($label, escapedValue, text); - if(module.has.label(value)) { - module.debug('Label already exists, skipping', escapedValue); + if(module.has.value(value)) { + module.debug('User selection already exists, skipping', escapedValue); return; } if(settings.label.variation) { @@ -2727,6 +2726,10 @@ $.fn.dropdown = function(parameters) { currentValue = module.get.values(), newValue ; + if(module.has.value(addedValue)) { + module.debug('Value already selected'); + return; + } if(addedValue === '') { module.debug('Cannot select blank values from multiselect'); return; @@ -3058,6 +3061,12 @@ $.fn.dropdown = function(parameters) { return (module.get.query() !== ''); }, value: function(value) { + return (settings.ignoreCase) + ? module.has.valueIgnoringCase(value) + : module.has.valueMatchingCase(value) + ; + }, + valueMatchingCase: function(value) { var values = module.get.values(), hasValue = $.isArray(values) @@ -3068,6 +3077,22 @@ $.fn.dropdown = function(parameters) { ? true : false ; + }, + valueIgnoringCase: function(value) { + var + values = module.get.values(), + hasValue = false + ; + if(!$.isArray(values)) { + values = [values]; + } + $.each(values, function(index, existingValue) { + if(String(value).toLowerCase() == String(existingValue).toLowerCase()) { + hasValue = true; + return false; + } + }); + return hasValue; } }, @@ -3075,6 +3100,12 @@ $.fn.dropdown = function(parameters) { active: function() { return $module.hasClass(className.active); }, + animatingInward: function() { + return $menu.transition('is inward'); + }, + animatingOutward: function() { + return $menu.transition('is outward'); + }, bubbledLabelClick: function(event) { return $(event.target).is('select, input') && $module.closest('label').length > 0; }, @@ -3210,6 +3241,9 @@ $.fn.dropdown = function(parameters) { ; calculations = { context: { + offset : ($context.get(0) === window) + ? { top: 0, left: 0} + : $context.offset(), scrollTop : $context.scrollTop(), height : $context.outerHeight() }, @@ -3222,8 +3256,8 @@ $.fn.dropdown = function(parameters) { calculations.menu.offset.top += calculations.context.scrollTop; } onScreen = { - above : (calculations.context.scrollTop) <= calculations.menu.offset.top - calculations.menu.height, - below : (calculations.context.scrollTop + calculations.context.height) >= calculations.menu.offset.top + calculations.menu.height + above : (calculations.context.scrollTop) <= calculations.menu.offset.top - calculations.context.offset.top - calculations.menu.height, + below : (calculations.context.scrollTop + calculations.context.height) >= calculations.menu.offset.top - calculations.context.offset.top + calculations.menu.height }; if(onScreen.below) { module.verbose('Dropdown can fit in context downward', onScreen); @@ -3252,6 +3286,9 @@ $.fn.dropdown = function(parameters) { ; calculations = { context: { + offset : ($context.get(0) === window) + ? { top: 0, left: 0} + : $context.offset(), scrollLeft : $context.scrollLeft(), width : $context.outerWidth() }, @@ -3263,7 +3300,7 @@ $.fn.dropdown = function(parameters) { if(module.is.horizontallyScrollableContext()) { calculations.menu.offset.left += calculations.context.scrollLeft; } - isOffscreenRight = (calculations.menu.offset.left + calculations.menu.width >= calculations.context.scrollLeft + calculations.context.width); + isOffscreenRight = (calculations.menu.offset.left - calculations.context.offset.left + calculations.menu.width >= calculations.context.scrollLeft + calculations.context.width); if(isOffscreenRight) { module.verbose('Dropdown cannot fit in context rightward', isOffscreenRight); canOpenRightward = false; @@ -3369,7 +3406,7 @@ $.fn.dropdown = function(parameters) { duration : settings.duration, debug : settings.debug, verbose : settings.verbose, - queue : true, + queue : false, onStart : start, onComplete : function() { callback.call(element); @@ -3657,7 +3694,8 @@ $.fn.dropdown.settings = { forceSelection : true, // force a choice on blur with search selection allowAdditions : false, // whether multiple select should allow user added values - hideAdditions : true, // whether or not to hide special message prompting a user they can enter a value + ignoreCase : false, // whether to consider values not matching in case to be the same + hideAdditions : true, // whether or not to hide special message prompting a user they can enter a value maxSelections : false, // When set to a number limits the number of selections to this count useLabels : true, // whether multiple select should filter currently active selections from choices diff --git a/definitions/modules/dropdown.less b/definitions/modules/dropdown.less index 1e10b6e..ee81f3d 100644 --- a/definitions/modules/dropdown.less +++ b/definitions/modules/dropdown.less @@ -181,7 +181,7 @@ margin: @menuDividerMargin; } -.ui.dropdown .menu > .input { +.ui.dropdown.dropdown .menu > .input { width: auto; display: flex; margin: @menuInputMargin; diff --git a/definitions/modules/modal.less b/definitions/modules/modal.less index eb9f42a..19a535e 100644 --- a/definitions/modules/modal.less +++ b/definitions/modules/modal.less @@ -353,7 +353,9 @@ position: fixed; } .modals.dimmer .ui.scrolling.modal { - position: static !important; + position: relative !important; + left: auto !important; + top: auto !important; margin: @scrollingMargin auto !important; } diff --git a/definitions/modules/popup.js b/definitions/modules/popup.js index 5b8af8e..f97fa15 100644 --- a/definitions/modules/popup.js +++ b/definitions/modules/popup.js @@ -625,11 +625,11 @@ $.fn.popup = function(parameters) { } return distanceFromBoundary; }, - offsetParent: function($target) { + offsetParent: function($element) { var - element = ($target !== undefined) - ? $target[0] - : $module[0], + element = ($element !== undefined) + ? $element[0] + : $target[0], parentNode = element.parentNode, $node = $(parentNode) ; diff --git a/package.js b/package.js index 02197ed..22233c7 100644 --- a/package.js +++ b/package.js @@ -5,7 +5,7 @@ var Package.describe({ name : 'semantic:ui', summary : 'Semantic UI - LESS Release of Semantic UI', - version : '2.2.13', + version : '2.2.14', git : 'git://github.com/Semantic-Org/Semantic-UI-LESS.git', }); diff --git a/package.json b/package.json index 78c6a18..58396c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "semantic-ui-less", - "version": "2.2.13", + "version": "2.2.14", "title": "Semantic UI", "description": "LESS Only distribution of Semantic UI", "homepage": "http://www.semantic-ui.com", diff --git a/themes/default/elements/flag.overrides b/themes/default/elements/flag.overrides index 813525d..20f5056 100644 --- a/themes/default/elements/flag.overrides +++ b/themes/default/elements/flag.overrides @@ -261,6 +261,10 @@ i.flag.eh:before, i.flag.western.sahara:before { background-position: 0px -1664px; } +i.flag.gb.eng:before, +i.flag.england:before { + background-position: 0px -1690px; +} i.flag.er:before, i.flag.eritrea:before { background-position: 0px -1716px; diff --git a/themes/default/elements/reveal.variables b/themes/default/elements/reveal.variables index dafa5de..1c7fac4 100755 --- a/themes/default/elements/reveal.variables +++ b/themes/default/elements/reveal.variables @@ -10,8 +10,9 @@ @bottomZIndex: 2; @topZIndex: 3; @activeZIndex: 4; +@overlayZIndex: 5; /* Types */ @rotateDegrees: 110deg; @moveTransition: transform @transitionDuration @transitionEasing @transitionDelay; -@slideTransition: transform @transitionDuration @defaultEasing @transitionDelay; \ No newline at end of file +@slideTransition: transform @transitionDuration @defaultEasing @transitionDelay; diff --git a/themes/default/globals/site.variables b/themes/default/globals/site.variables index 2d59a73..785d15f 100755 --- a/themes/default/globals/site.variables +++ b/themes/default/globals/site.variables @@ -146,6 +146,7 @@ @useCustomScrollbars: true; @customScrollbarWidth: 10px; +@customScrollbarHeight: 10px; @trackBackground: rgba(0, 0, 0, 0.1); @trackBorderRadius: 0px; @@ -452,7 +453,7 @@ @twitterColor : #55ACEE; @googlePlusColor : #DD4B39; @linkedInColor : #1F88BE; -@youtubeColor : #CC181E; +@youtubeColor : #FF0000; @pinterestColor : #BD081C; @vkColor : #4D7198; @instagramColor : #49769C; diff --git a/themes/default/modules/checkbox.variables b/themes/default/modules/checkbox.variables index 9902583..d262cbb 100755 --- a/themes/default/modules/checkbox.variables +++ b/themes/default/modules/checkbox.variables @@ -176,12 +176,12 @@ @toggleHoverColor: @toggleFocusColor; @toggleOffLabelColor: @checkboxColor; -@toggleOffHandleBoxShadow: none; +@toggleOffHandleBoxShadow: @handleBoxShadow; @toggleOnLabelColor: @selectedTextColor; @toggleOnLaneColor: @primaryColor; -@toggleOnHandleBoxShadow: none; +@toggleOnHandleBoxShadow: @handleBoxShadow; @toggleOnFocusLaneColor: @primaryColorFocus; @toggleOnFocusLabelColor: @toggleOnLabelColor;