Browse Source

Rebuild dist #1256

pull/1257/head
jlukic 10 years ago
parent
commit
1c1e7f4ef4
14 changed files with 115 additions and 63 deletions
  1. 4
      dist/components/checkbox.js
  2. 2
      dist/components/checkbox.min.js
  3. 2
      dist/components/dropdown.css
  4. 12
      dist/components/dropdown.js
  5. 2
      dist/components/dropdown.min.css
  6. 2
      dist/components/dropdown.min.js
  7. 12
      dist/components/popup.css
  8. 46
      dist/components/popup.js
  9. 2
      dist/components/popup.min.css
  10. 2
      dist/components/popup.min.js
  11. 14
      dist/semantic.css
  12. 62
      dist/semantic.js
  13. 2
      dist/semantic.min.css
  14. 14
      dist/semantic.min.js

4
dist/components/checkbox.js

@ -203,14 +203,14 @@ $.fn.checkbox = function(parameters) {
}
},
disable: function() {
enable: function() {
module.debug('Enabling checkbox functionality');
$module.addClass(className.disabled);
$input.prop('disabled', false);
$.proxy(settings.onDisabled, $input.get())();
},
enable: function() {
disable: function() {
module.debug('Disabling checkbox functionality');
$module.removeClass(className.disabled);
$input.prop('disabled', 'disabled');

2
dist/components/checkbox.min.js
File diff suppressed because it is too large
View File

2
dist/components/dropdown.css

@ -484,7 +484,7 @@ select.ui.dropdown {
.ui.search.dropdown.visible > input.search {
cursor: auto;
}
.ui.search.dropdown > input.search:focus + .text {
.ui.active.search.dropdown > input.search:focus + .text {
color: rgba(0, 0, 0, 0.4) !important;
}

12
dist/components/dropdown.js

@ -390,6 +390,12 @@ $.fn.dropdown = function(parameters) {
;
},
focusSearch: function() {
$search
.focus()
;
},
event: {
// prevents focus callback from occuring on mousedown
mousedown: function() {
@ -451,17 +457,12 @@ $.fn.dropdown = function(parameters) {
// close shortcuts
if(pressedKey == keys.escape) {
module.verbose('Escape key pressed, closing dropdown');
$search.blur();
module.hide();
}
// result shortcuts
if(module.is.visible()) {
if(pressedKey == keys.enter && hasSelectedItem) {
module.verbose('Enter key pressed, choosing selected item');
if(module.is.searchable()) {
module.verbose('Removing focus from search input');
$search.blur();
}
$.proxy(module.event.item.click, $selectedItem)(event);
event.preventDefault();
return false;
@ -1071,6 +1072,7 @@ $.fn.dropdown = function(parameters) {
if( module.can.click() ) {
module.unbind.intent();
}
module.focusSearch();
module.hideSubMenus();
module.remove.active();
}

2
dist/components/dropdown.min.css
File diff suppressed because it is too large
View File

2
dist/components/dropdown.min.js
File diff suppressed because it is too large
View File

12
dist/components/popup.css

@ -204,6 +204,14 @@
*******************************/
/*--------------
Basic
---------------*/
.ui.basic.popup:before {
display: none;
}
/*--------------
Wide
---------------*/
@ -223,7 +231,7 @@
.ui.fluid.popup {
width: 100%;
max-width: 99999px;
max-width: none;
}
/*--------------
@ -252,7 +260,7 @@
---------------*/
.ui.flowing.popup {
max-width: 9999px;
max-width: none;
}
/*--------------

46
dist/components/popup.js

@ -119,6 +119,11 @@ $.fn.popup = function(parameters) {
;
},
reposition: function() {
module.refresh();
module.set.position();
},
destroy: function() {
module.debug('Destroying previous module');
if($popup && !settings.preserve) {
@ -205,7 +210,7 @@ $.fn.popup = function(parameters) {
if(settings.hoverable) {
module.bind.popup();
}
$.proxy(settings.onCreate, $popup)();
$.proxy(settings.onCreate, $popup)(element);
}
else if($target.next(settings.selector.popup).size() !== 0) {
module.verbose('Pre-existing popup found, reverting to inline');
@ -293,6 +298,7 @@ $.fn.popup = function(parameters) {
removePopup: function() {
module.debug('Removing popup');
$.proxy(settings.onRemove, $popup)(element);
$popup
.removePopup()
;
@ -333,7 +339,8 @@ $.fn.popup = function(parameters) {
duration : settings.duration,
onComplete : function() {
module.bind.close();
$.proxy(callback, element)();
$.proxy(callback, $popup)(element);
$.proxy(settings.onVisible, $popup)(element);
}
})
;
@ -348,7 +355,7 @@ $.fn.popup = function(parameters) {
})
;
}
$.proxy(settings.onShow, element)();
$.proxy(settings.onShow, $popup)(element);
},
hide: function(callback) {
callback = $.isFunction(callback) ? callback : function(){};
@ -363,7 +370,8 @@ $.fn.popup = function(parameters) {
verbose : settings.verbose,
onComplete : function() {
module.reset();
callback();
$.proxy(callback, $popup)(element);
$.proxy(settings.onHidden, $popup)(element);
}
})
;
@ -377,7 +385,7 @@ $.fn.popup = function(parameters) {
})
;
}
$.proxy(settings.onHide, element)();
$.proxy(settings.onHide, $popup)(element);
}
},
@ -400,8 +408,9 @@ $.fn.popup = function(parameters) {
}
return false;
},
offstagePosition: function() {
offstagePosition: function(position) {
var
position = position || false,
boundary = {
top : $(window).scrollTop(),
bottom : $(window).scrollTop() + $(window).height(),
@ -410,13 +419,14 @@ $.fn.popup = function(parameters) {
},
popup = {
width : $popup.width(),
height : $popup.outerHeight(),
height : $popup.height(),
offset : $popup.offset()
},
offstage = {},
offstagePositions = []
;
if(popup.offset) {
if(popup.offset && position) {
module.verbose('Checking if outside viewable area', popup.offset);
offstage = {
top : (popup.offset.top < boundary.top),
bottom : (popup.offset.top + popup.height > boundary.bottom),
@ -424,7 +434,6 @@ $.fn.popup = function(parameters) {
left : (popup.offset.left < boundary.left)
};
}
module.verbose('Checking if outside viewable area', popup.offset);
// return only boundaries that have been surpassed
$.each(offstage, function(direction, isOffstage) {
if(isOffstage) {
@ -479,17 +488,22 @@ $.fn.popup = function(parameters) {
popupWidth = $popup.outerWidth(),
popupHeight = $popup.outerHeight(),
parentWidth = $offsetParent.outerWidth(),
parentHeight = $offsetParent.outerHeight(),
parentWidth = ( $offsetParent.is('html') )
? $offsetParent.find('body').width()
: $offsetParent.outerWidth(),
parentHeight = ( $offsetParent.is('html') )
? $offsetParent.find('body').height()
: $offsetParent.outerHeight(),
distanceAway = settings.distanceAway,
targetElement = $target[0],
marginTop = (settings.inline)
marginTop = (settings.inline)
? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-top'), 10)
: 0,
marginLeft = (settings.inline)
marginLeft = (settings.inline)
? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-left'), 10)
: 0,
@ -502,7 +516,6 @@ $.fn.popup = function(parameters) {
;
position = position || $module.data(metadata.position) || settings.position;
arrowOffset = arrowOffset || $module.data(metadata.offset) || settings.offset;
if(settings.inline) {
module.debug('Adding targets margin to calculation');
if(position == 'left center' || position == 'right center') {
@ -596,7 +609,7 @@ $.fn.popup = function(parameters) {
.addClass(className.loading)
;
// check if is offstage
offstagePosition = module.get.offstagePosition();
offstagePosition = module.get.offstagePosition(position);
// recursively find new positioning
if(offstagePosition) {
module.debug('Element is outside boundaries', offstagePosition);
@ -904,8 +917,11 @@ $.fn.popup.settings = {
onCreate : function(){},
onRemove : function(){},
onShow : function(){},
onVisible : function(){},
onHide : function(){},
onHidden : function(){},
variation : '',
content : false,

2
dist/components/popup.min.css

@ -8,4 +8,4 @@
* http://opensource.org/licenses/MIT
*
*/
.ui.popup{display:none;position:absolute;top:0;right:0;z-index:900;border:1px solid #ccc;max-width:250px;background-color:#fff;padding:.8em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.8);border-radius:.2857rem;box-shadow:0 2px 4px rgba(0,0,0,.1)}.ui.popup>.header{padding:0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1.125em;line-height:1.2;font-weight:700}.ui.popup>.header+.content{padding-top:.5em}.ui.popup:before{position:absolute;content:'';width:.75em;height:.75em;background:#fff;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);z-index:2;box-shadow:1px 1px 0 0 #b3b3b3}.ui.popup{margin:0}.ui.popup.bottom{margin:.75em 0 0}.ui.popup.top{margin:0 0 .75em}.ui.popup.left.center{margin:0 .75em 0 0}.ui.popup.right.center{margin:0 0 0 .75em}.ui.bottom.center.popup:before{margin-left:-.325em;top:-.325em;left:50%;right:auto;bottom:auto;box-shadow:-1px -1px 0 0 #b3b3b3}.ui.bottom.left.popup{margin-left:0}.ui.bottom.left.popup:before{top:-.325em;left:1em;right:auto;bottom:auto;margin-left:0;box-shadow:-1px -1px 0 0 #b3b3b3}.ui.bottom.right.popup{margin-right:0}.ui.bottom.right.popup:before{top:-.325em;right:1em;bottom:auto;left:auto;margin-left:0;box-shadow:-1px -1px 0 0 #b3b3b3}.ui.top.center.popup:before{top:auto;right:auto;bottom:-.325em;left:50%;margin-left:-.325em}.ui.top.left.popup{margin-left:0}.ui.top.left.popup:before{bottom:-.325em;left:1em;top:auto;right:auto;margin-left:0}.ui.top.right.popup{margin-right:0}.ui.top.right.popup:before{bottom:-.325em;right:1em;top:auto;left:auto;margin-left:0}.ui.left.center.popup:before{top:50%;right:-.325em;bottom:auto;left:auto;margin-top:-.325em;box-shadow:1px -1px 0 0 #b3b3b3}.ui.right.center.popup:before{top:50%;left:-.325em;bottom:auto;right:auto;margin-top:-.325em;box-shadow:-1px 1px 0 0 #b3b3b3}.ui.popup>.ui.grid:not(.padded){width:-webkit-calc(100% + 1.75rem);width:calc(100% + 1.75rem);margin:-.7rem -.875rem}.ui.loading.popup{display:block;visibility:hidden;z-index:-1}.ui.animating.popup,.ui.visible.popup{display:block}.ui.wide.popup{width:350px;max-width:350px}.ui[class*="very wide"].popup{width:550px;max-width:550px}.ui.fluid.popup{width:100%;max-width:99999px}.ui.inverted.popup{background:#1b1c1d;color:#fff;border:none;box-shadow:none}.ui.inverted.popup .header{background-color:none;color:#fff}.ui.inverted.popup:before{background-color:#1b1c1d;box-shadow:none!important}.ui.flowing.popup{max-width:9999px}.ui.small.popup{font-size:.8rem}.ui.popup{font-size:.875rem}.ui.large.popup{font-size:1rem}.ui.huge.popup{font-size:1.1rem}
.ui.popup{display:none;position:absolute;top:0;right:0;z-index:900;border:1px solid #ccc;max-width:250px;background-color:#fff;padding:.8em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.8);border-radius:.2857rem;box-shadow:0 2px 4px rgba(0,0,0,.1)}.ui.popup>.header{padding:0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1.125em;line-height:1.2;font-weight:700}.ui.popup>.header+.content{padding-top:.5em}.ui.popup:before{position:absolute;content:'';width:.75em;height:.75em;background:#fff;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);z-index:2;box-shadow:1px 1px 0 0 #b3b3b3}.ui.popup{margin:0}.ui.popup.bottom{margin:.75em 0 0}.ui.popup.top{margin:0 0 .75em}.ui.popup.left.center{margin:0 .75em 0 0}.ui.popup.right.center{margin:0 0 0 .75em}.ui.bottom.center.popup:before{margin-left:-.325em;top:-.325em;left:50%;right:auto;bottom:auto;box-shadow:-1px -1px 0 0 #b3b3b3}.ui.bottom.left.popup{margin-left:0}.ui.bottom.left.popup:before{top:-.325em;left:1em;right:auto;bottom:auto;margin-left:0;box-shadow:-1px -1px 0 0 #b3b3b3}.ui.bottom.right.popup{margin-right:0}.ui.bottom.right.popup:before{top:-.325em;right:1em;bottom:auto;left:auto;margin-left:0;box-shadow:-1px -1px 0 0 #b3b3b3}.ui.top.center.popup:before{top:auto;right:auto;bottom:-.325em;left:50%;margin-left:-.325em}.ui.top.left.popup{margin-left:0}.ui.top.left.popup:before{bottom:-.325em;left:1em;top:auto;right:auto;margin-left:0}.ui.top.right.popup{margin-right:0}.ui.top.right.popup:before{bottom:-.325em;right:1em;top:auto;left:auto;margin-left:0}.ui.left.center.popup:before{top:50%;right:-.325em;bottom:auto;left:auto;margin-top:-.325em;box-shadow:1px -1px 0 0 #b3b3b3}.ui.right.center.popup:before{top:50%;left:-.325em;bottom:auto;right:auto;margin-top:-.325em;box-shadow:-1px 1px 0 0 #b3b3b3}.ui.popup>.ui.grid:not(.padded){width:-webkit-calc(100% + 1.75rem);width:calc(100% + 1.75rem);margin:-.7rem -.875rem}.ui.loading.popup{display:block;visibility:hidden;z-index:-1}.ui.animating.popup,.ui.visible.popup{display:block}.ui.basic.popup:before{display:none}.ui.wide.popup{width:350px;max-width:350px}.ui[class*="very wide"].popup{width:550px;max-width:550px}.ui.fluid.popup{width:100%;max-width:none}.ui.inverted.popup{background:#1b1c1d;color:#fff;border:none;box-shadow:none}.ui.inverted.popup .header{background-color:none;color:#fff}.ui.inverted.popup:before{background-color:#1b1c1d;box-shadow:none!important}.ui.flowing.popup{max-width:none}.ui.small.popup{font-size:.8rem}.ui.popup{font-size:.875rem}.ui.large.popup{font-size:1rem}.ui.huge.popup{font-size:1.1rem}

2
dist/components/popup.min.js
File diff suppressed because it is too large
View File

14
dist/semantic.css

@ -5962,7 +5962,7 @@ select.ui.dropdown {
cursor: auto;
}
.ui.search.dropdown > input.search:focus + .text {
.ui.active.search.dropdown > input.search:focus + .text {
color: rgba(0, 0, 0, 0.4) !important;
}
@ -20198,6 +20198,14 @@ a.ui.nag {
Variations
*******************************/
/*--------------
Basic
---------------*/
.ui.basic.popup:before {
display: none;
}
/*--------------
Wide
---------------*/
@ -20218,7 +20226,7 @@ a.ui.nag {
.ui.fluid.popup {
width: 100%;
max-width: 99999px;
max-width: none;
}
/*--------------
@ -20249,7 +20257,7 @@ a.ui.nag {
---------------*/
.ui.flowing.popup {
max-width: 9999px;
max-width: none;
}
/*--------------

62
dist/semantic.js

@ -2334,14 +2334,14 @@ $.fn.checkbox = function(parameters) {
}
},
disable: function() {
enable: function() {
module.debug('Enabling checkbox functionality');
$module.addClass(className.disabled);
$input.prop('disabled', false);
$.proxy(settings.onDisabled, $input.get())();
},
enable: function() {
disable: function() {
module.debug('Disabling checkbox functionality');
$module.removeClass(className.disabled);
$input.prop('disabled', 'disabled');
@ -3890,6 +3890,12 @@ $.fn.dropdown = function(parameters) {
;
},
focusSearch: function() {
$search
.focus()
;
},
event: {
// prevents focus callback from occuring on mousedown
mousedown: function() {
@ -3951,17 +3957,12 @@ $.fn.dropdown = function(parameters) {
// close shortcuts
if(pressedKey == keys.escape) {
module.verbose('Escape key pressed, closing dropdown');
$search.blur();
module.hide();
}
// result shortcuts
if(module.is.visible()) {
if(pressedKey == keys.enter && hasSelectedItem) {
module.verbose('Enter key pressed, choosing selected item');
if(module.is.searchable()) {
module.verbose('Removing focus from search input');
$search.blur();
}
$.proxy(module.event.item.click, $selectedItem)(event);
event.preventDefault();
return false;
@ -4571,6 +4572,7 @@ $.fn.dropdown = function(parameters) {
if( module.can.click() ) {
module.unbind.intent();
}
module.focusSearch();
module.hideSubMenus();
module.remove.active();
}
@ -7157,6 +7159,11 @@ $.fn.popup = function(parameters) {
;
},
reposition: function() {
module.refresh();
module.set.position();
},
destroy: function() {
module.debug('Destroying previous module');
if($popup && !settings.preserve) {
@ -7243,7 +7250,7 @@ $.fn.popup = function(parameters) {
if(settings.hoverable) {
module.bind.popup();
}
$.proxy(settings.onCreate, $popup)();
$.proxy(settings.onCreate, $popup)(element);
}
else if($target.next(settings.selector.popup).size() !== 0) {
module.verbose('Pre-existing popup found, reverting to inline');
@ -7331,6 +7338,7 @@ $.fn.popup = function(parameters) {
removePopup: function() {
module.debug('Removing popup');
$.proxy(settings.onRemove, $popup)(element);
$popup
.removePopup()
;
@ -7371,7 +7379,8 @@ $.fn.popup = function(parameters) {
duration : settings.duration,
onComplete : function() {
module.bind.close();
$.proxy(callback, element)();
$.proxy(callback, $popup)(element);
$.proxy(settings.onVisible, $popup)(element);
}
})
;
@ -7386,7 +7395,7 @@ $.fn.popup = function(parameters) {
})
;
}
$.proxy(settings.onShow, element)();
$.proxy(settings.onShow, $popup)(element);
},
hide: function(callback) {
callback = $.isFunction(callback) ? callback : function(){};
@ -7401,7 +7410,8 @@ $.fn.popup = function(parameters) {
verbose : settings.verbose,
onComplete : function() {
module.reset();
callback();
$.proxy(callback, $popup)(element);
$.proxy(settings.onHidden, $popup)(element);
}
})
;
@ -7415,7 +7425,7 @@ $.fn.popup = function(parameters) {
})
;
}
$.proxy(settings.onHide, element)();
$.proxy(settings.onHide, $popup)(element);
}
},
@ -7438,8 +7448,9 @@ $.fn.popup = function(parameters) {
}
return false;
},
offstagePosition: function() {
offstagePosition: function(position) {
var
position = position || false,
boundary = {
top : $(window).scrollTop(),
bottom : $(window).scrollTop() + $(window).height(),
@ -7448,13 +7459,14 @@ $.fn.popup = function(parameters) {
},
popup = {
width : $popup.width(),
height : $popup.outerHeight(),
height : $popup.height(),
offset : $popup.offset()
},
offstage = {},
offstagePositions = []
;
if(popup.offset) {
if(popup.offset && position) {
module.verbose('Checking if outside viewable area', popup.offset);
offstage = {
top : (popup.offset.top < boundary.top),
bottom : (popup.offset.top + popup.height > boundary.bottom),
@ -7462,7 +7474,6 @@ $.fn.popup = function(parameters) {
left : (popup.offset.left < boundary.left)
};
}
module.verbose('Checking if outside viewable area', popup.offset);
// return only boundaries that have been surpassed
$.each(offstage, function(direction, isOffstage) {
if(isOffstage) {
@ -7517,17 +7528,22 @@ $.fn.popup = function(parameters) {
popupWidth = $popup.outerWidth(),
popupHeight = $popup.outerHeight(),
parentWidth = $offsetParent.outerWidth(),
parentHeight = $offsetParent.outerHeight(),
parentWidth = ( $offsetParent.is('html') )
? $offsetParent.find('body').width()
: $offsetParent.outerWidth(),
parentHeight = ( $offsetParent.is('html') )
? $offsetParent.find('body').height()
: $offsetParent.outerHeight(),
distanceAway = settings.distanceAway,
targetElement = $target[0],
marginTop = (settings.inline)
marginTop = (settings.inline)
? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-top'), 10)
: 0,
marginLeft = (settings.inline)
marginLeft = (settings.inline)
? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-left'), 10)
: 0,
@ -7540,7 +7556,6 @@ $.fn.popup = function(parameters) {
;
position = position || $module.data(metadata.position) || settings.position;
arrowOffset = arrowOffset || $module.data(metadata.offset) || settings.offset;
if(settings.inline) {
module.debug('Adding targets margin to calculation');
if(position == 'left center' || position == 'right center') {
@ -7634,7 +7649,7 @@ $.fn.popup = function(parameters) {
.addClass(className.loading)
;
// check if is offstage
offstagePosition = module.get.offstagePosition();
offstagePosition = module.get.offstagePosition(position);
// recursively find new positioning
if(offstagePosition) {
module.debug('Element is outside boundaries', offstagePosition);
@ -7942,8 +7957,11 @@ $.fn.popup.settings = {
onCreate : function(){},
onRemove : function(){},
onShow : function(){},
onVisible : function(){},
onHide : function(){},
onHidden : function(){},
variation : '',
content : false,

2
dist/semantic.min.css
File diff suppressed because it is too large
View File

14
dist/semantic.min.js
File diff suppressed because it is too large
View File

Loading…
Cancel
Save