Skip to content

Commit

Permalink
Updated distribution to version 2.2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Semantic-Pusher-Robot committed Aug 7, 2017
1 parent b3b095e commit 97c2a7e
Show file tree
Hide file tree
Showing 16 changed files with 99 additions and 28 deletions.
1 change: 0 additions & 1 deletion definitions/collections/menu.less
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@

/* Menu */
.ui.menu .dropdown.item .menu {
left: 0px;
min-width: ~"calc(100% - 1px)";
border-radius: 0em 0em @dropdownMenuBorderRadius @dropdownMenuBorderRadius;
background: @dropdownBackground;
Expand Down
59 changes: 49 additions & 10 deletions definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ $.fn.dropdown = function(parameters) {
module.setup.reference();
}
else {

module.setup.layout();

if(settings.values) {
module.change.values(settings.values);
}

module.refreshData();

module.save.defaults();
Expand Down Expand Up @@ -162,7 +168,7 @@ $.fn.dropdown = function(parameters) {
observe: {
select: function() {
if(module.has.input()) {
selectObserver.observe($input[0], {
selectObserver.observe($module[0], {
childList : true,
subtree : true
});
Expand Down Expand Up @@ -383,19 +389,16 @@ $.fn.dropdown = function(parameters) {
reference: function() {
module.debug('Dropdown behavior was called on select, replacing with closest dropdown');
// replace module reference
$module = $module.parent(selector.dropdown);
$module = $module.parent(selector.dropdown);
instance = $module.data(moduleNamespace);
element = $module.get(0);
module.refresh();
module.setup.returnedObject();
// invoke method in context of current instance
if(methodInvoked) {
instance = module;
module.invoke(query);
}
},
returnedObject: function() {
var
$firstModules = $allModules.slice(0, elementIndex),
$lastModules = $allModules.slice(elementIndex + 1)
$lastModules = $allModules.slice(elementIndex + 1)
;
// adjust all modules to use correct reference
$allModules = $firstModules.add($module).add($lastModules);
Expand Down Expand Up @@ -913,6 +916,23 @@ $.fn.dropdown = function(parameters) {
}
},

change: {
values: function(values) {
if(!settings.allowAdditions) {
module.clear();
}
module.debug('Creating dropdown with specified values', values);
module.setup.menu({values: values});
$.each(values, function(index, item) {
if(item.selected == true) {
module.debug('Setting initial selection to', item.value);
module.set.selected(item.value);
return true;
}
});
}
},

event: {
change: function() {
if(!internalChange) {
Expand Down Expand Up @@ -1081,7 +1101,22 @@ $.fn.dropdown = function(parameters) {
select: {
mutation: function(mutations) {
module.debug('<select> modified, recreating menu');
module.setup.select();
var
isSelectMutation = false
;
$.each(mutations, function(index, mutation) {
if($(mutation.target).is('select') || $(mutation.addedNodes).is('select')) {
isSelectMutation = true;
return true;
}
});
if(isSelectMutation) {
module.disconnect.selectObserver();
module.refresh();
module.setup.select();
module.set.selected();
module.observe.select();
}
}
},
menu: {
Expand Down Expand Up @@ -1619,6 +1654,9 @@ $.fn.dropdown = function(parameters) {
return $module.data(metadata.defaultValue);
},
placeholderText: function() {
if(settings.placeholder != 'auto' && typeof settings.placeholder == 'string') {
return settings.placeholder;
}
return $module.data(metadata.placeholderText) || '';
},
text: function() {
Expand Down Expand Up @@ -3044,7 +3082,7 @@ $.fn.dropdown = function(parameters) {
return $(event.target).closest($icon).length > 0;
},
alreadySetup: function() {
return ($module.is('select') && $module.parent(selector.dropdown).length > 0 && $module.prev().length === 0);
return ($module.is('select') && $module.parent(selector.dropdown).data(moduleNamespace) !== undefined && $module.prev().length === 0);
},
animating: function($subMenu) {
return ($subMenu)
Expand Down Expand Up @@ -3594,6 +3632,7 @@ $.fn.dropdown.settings = {
on : 'click', // what event should show menu action on item selection
action : 'activate', // action on item selection (nothing, activate, select, combo, hide, function(){})

values : false, // specify values to use for dropdown

apiSettings : false,
selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used
Expand Down
4 changes: 2 additions & 2 deletions definitions/modules/dropdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,8 @@ select.ui.dropdown {
.ui.default.dropdown:not(.button) > .text {
color: @defaultTextColor;
}
.ui.dropdown:not(.button) > input:focus + .default.text,
.ui.default.dropdown:not(.button) > input:focus + .text {
.ui.dropdown:not(.button) > input:focus ~ .default.text,
.ui.default.dropdown:not(.button) > input:focus ~ .text {
color: @defaultTextFocusColor;
}
/*--------------------
Expand Down
29 changes: 25 additions & 4 deletions definitions/modules/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ $.fn.modal = function(parameters) {
module.hideOthers(module.showModal);
}
else {
if(settings.allowMultiple && settings.detachable) {
$module.detach().appendTo($dimmer);
}
settings.onShow.call(element);
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
module.debug('Showing modal with css animations');
Expand Down Expand Up @@ -532,24 +535,41 @@ $.fn.modal = function(parameters) {
},

cacheSizes: function() {
$module.addClass(className.loading);
var
modalHeight = $module.outerHeight()
scrollHeight = $module.prop('scrollHeight'),
modalHeight = $module.outerHeight()
;
if(module.cache === undefined || modalHeight !== 0) {
module.cache = {
pageHeight : $(document).outerHeight(),
height : modalHeight + settings.offset,
scrollHeight : scrollHeight + settings.offset,
contextHeight : (settings.context == 'body')
? $(window).height()
: $dimmable.height()
: $dimmable.height(),
};
module.cache.topOffset = -(module.cache.height / 2);
}
$module.removeClass(className.loading);
module.debug('Caching modal and container sizes', module.cache);
},

can: {
fit: function() {
return ( ( module.cache.height + (settings.padding * 2) ) < module.cache.contextHeight);
var
contextHeight = module.cache.contextHeight,
verticalCenter = module.cache.contextHeight / 2,
topOffset = module.cache.topOffset,
scrollHeight = module.cache.scrollHeight,
height = module.cache.height,
paddingHeight = settings.padding,
startPosition = (verticalCenter + topOffset)
;
return (scrollHeight > height)
? (startPosition + scrollHeight + paddingHeight < contextHeight)
: (height + (paddingHeight * 2) < contextHeight)
;
}
},

Expand Down Expand Up @@ -664,7 +684,7 @@ $.fn.modal = function(parameters) {
$module
.css({
top: '',
marginTop: -(module.cache.height / 2)
marginTop: module.cache.topOffset
})
;
}
Expand Down Expand Up @@ -937,6 +957,7 @@ $.fn.modal.settings = {
animating : 'animating',
blurring : 'blurring',
inverted : 'inverted',
loading : 'loading',
scrolling : 'scrolling',
undetached : 'undetached'
}
Expand Down
6 changes: 6 additions & 0 deletions definitions/modules/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@
States
*******************************/

.ui.loading.modal {
display: block;
visibility: hidden;
z-index: @loadingZIndex;
}

.ui.active.modal {
display: block;
}
Expand Down
4 changes: 2 additions & 2 deletions definitions/modules/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ $.fn.popup = function(parameters) {
}
if(settings.popup) {
$popup.addClass(className.loading);
$offsetParent = module.get.offsetParent($target);
$offsetParent = module.get.offsetParent();
$popup.removeClass(className.loading);
if(settings.movePopup && module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) {
module.debug('Moving popup to the same offset parent as target');
Expand All @@ -139,7 +139,7 @@ $.fn.popup = function(parameters) {
$offsetParent = (settings.inline)
? module.get.offsetParent($target)
: module.has.popup()
? module.get.offsetParent($target)
? module.get.offsetParent($popup)
: $body
;
}
Expand Down
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var
Package.describe({
name : 'semantic:ui',
summary : 'Semantic UI - LESS Release of Semantic UI',
version : '2.2.11',
version : '2.2.12',
git : 'git://github.com/Semantic-Org/Semantic-UI-LESS.git',
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "semantic-ui-less",
"version": "2.2.11",
"version": "2.2.12",
"title": "Semantic UI",
"description": "LESS Only distribution of Semantic UI",
"homepage": "http://www.semantic-ui.com",
Expand Down
2 changes: 1 addition & 1 deletion themes/bookish/elements/header.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Overrides
*******************************/

@import url(http://fonts.googleapis.com/css?family=Karma);
@import url(https://fonts.googleapis.com/css?family=Karma);

h1.ui.header,
.ui.huge.header {
Expand Down
2 changes: 1 addition & 1 deletion themes/chubby/elements/button.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Overrides
*******************************/

@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro);
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);

.ui.labeled.icon.buttons > .button > .icon,
.ui.labeled.icon.button > .icon {
Expand Down
2 changes: 1 addition & 1 deletion themes/chubby/elements/header.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Overrides
*******************************/

@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro);
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);
2 changes: 1 addition & 1 deletion themes/default/elements/header.variables
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/* Icon */
@iconOpacity: 1;
@iconSize: 1.5em;
@iconOffset: @lineHeightOffset;
@iconOffset: 0em;
@iconMargin: 0.75rem;
@iconAlignment: middle;

Expand Down
2 changes: 1 addition & 1 deletion themes/default/elements/list.variables
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

/* Icon */
@iconDistance: @relative4px;
@iconOffset: ((@itemLineHeight - 1rem) / 2);
@iconOffset: 0em;
@iconTransition: color @defaultDuration @defaultEasing;
@iconVerticalAlign: top;
@iconContentVerticalAlign: top;
Expand Down
6 changes: 6 additions & 0 deletions themes/default/modules/modal.variables
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@
/* Coupling */
@invertedBoxShadow: 1px 3px 10px 2px rgba(0, 0, 0, 0.2);

/*-------------------
States
--------------------*/

@loadingZIndex: -1;

/*-------------------
Types
--------------------*/
Expand Down
2 changes: 1 addition & 1 deletion themes/instagram/views/card.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*******************************/


@import url(http://fonts.googleapis.com/css?family=Montserrat:700,400);
@import url(https://fonts.googleapis.com/css?family=Montserrat:700,400);

.ui.cards > .card,
.ui.card {
Expand Down
2 changes: 1 addition & 1 deletion themes/rtl/globals/site.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
*******************************/

/* Import Droid Arabic Kufi */
@import 'http://fonts.googleapis.com/earlyaccess/droidarabickufi.css';
@import 'https://fonts.googleapis.com/earlyaccess/droidarabickufi.css';

0 comments on commit 97c2a7e

Please sign in to comment.