Browse Source

bump semantic to 2.2.4, apparently 369 files were changed

tags/v0.2.0b
Morgan Bazalgette 3 years ago
parent
commit
6f440647f0
100 changed files with 3396 additions and 1277 deletions
  1. +1
    -1
      semantic.json
  2. +3
    -3
      semantic/gulpfile.js
  3. +41
    -16
      semantic/src/definitions/behaviors/api.js
  4. +233
    -227
      semantic/src/definitions/behaviors/colorize.js
  5. +66
    -25
      semantic/src/definitions/behaviors/form.js
  6. +20
    -7
      semantic/src/definitions/behaviors/state.js
  7. +89
    -22
      semantic/src/definitions/behaviors/visibility.js
  8. +13
    -5
      semantic/src/definitions/behaviors/visit.js
  9. +1
    -2
      semantic/src/definitions/collections/breadcrumb.less
  10. +52
    -38
      semantic/src/definitions/collections/form.less
  11. +16
    -9
      semantic/src/definitions/collections/grid.less
  12. +58
    -27
      semantic/src/definitions/collections/menu.less
  13. +21
    -2
      semantic/src/definitions/collections/message.less
  14. +16
    -3
      semantic/src/definitions/collections/table.less
  15. +195
    -56
      semantic/src/definitions/elements/button.less
  16. +1
    -2
      semantic/src/definitions/elements/container.less
  17. +1
    -3
      semantic/src/definitions/elements/divider.less
  18. +1
    -2
      semantic/src/definitions/elements/flag.less
  19. +2
    -2
      semantic/src/definitions/elements/header.less
  20. +3
    -4
      semantic/src/definitions/elements/icon.less
  21. +6
    -1
      semantic/src/definitions/elements/image.less
  22. +14
    -14
      semantic/src/definitions/elements/input.less
  23. +4
    -4
      semantic/src/definitions/elements/label.less
  24. +29
    -16
      semantic/src/definitions/elements/list.less
  25. +72
    -9
      semantic/src/definitions/elements/loader.less
  26. +21
    -2
      semantic/src/definitions/elements/rail.less
  27. +2
    -3
      semantic/src/definitions/elements/reveal.less
  28. +45
    -4
      semantic/src/definitions/elements/segment.less
  29. +28
    -8
      semantic/src/definitions/elements/step.less
  30. +1
    -2
      semantic/src/definitions/globals/reset.less
  31. +2
    -2
      semantic/src/definitions/globals/site.js
  32. +0
    -1
      semantic/src/definitions/globals/site.less
  33. +20
    -6
      semantic/src/definitions/modules/accordion.js
  34. +0
    -1
      semantic/src/definitions/modules/accordion.less
  35. +31
    -9
      semantic/src/definitions/modules/checkbox.js
  36. +9
    -10
      semantic/src/definitions/modules/checkbox.less
  37. +28
    -13
      semantic/src/definitions/modules/dimmer.js
  38. +1
    -2
      semantic/src/definitions/modules/dimmer.less
  39. +509
    -210
      semantic/src/definitions/modules/dropdown.js
  40. +41
    -23
      semantic/src/definitions/modules/dropdown.less
  41. +50
    -13
      semantic/src/definitions/modules/embed.js
  42. +0
    -1
      semantic/src/definitions/modules/embed.less
  43. +37
    -16
      semantic/src/definitions/modules/modal.js
  44. +0
    -1
      semantic/src/definitions/modules/modal.less
  45. +28
    -7
      semantic/src/definitions/modules/nag.js
  46. +1
    -2
      semantic/src/definitions/modules/nag.less
  47. +138
    -76
      semantic/src/definitions/modules/popup.js
  48. +344
    -2
      semantic/src/definitions/modules/popup.less
  49. +177
    -62
      semantic/src/definitions/modules/progress.js
  50. +0
    -1
      semantic/src/definitions/modules/progress.less
  51. +41
    -8
      semantic/src/definitions/modules/rating.js
  52. +0
    -1
      semantic/src/definitions/modules/rating.less
  53. +109
    -56
      semantic/src/definitions/modules/search.js
  54. +1
    -1
      semantic/src/definitions/modules/search.less
  55. +67
    -22
      semantic/src/definitions/modules/shape.js
  56. +1
    -2
      semantic/src/definitions/modules/shape.less
  57. +21
    -7
      semantic/src/definitions/modules/sidebar.js
  58. +1
    -2
      semantic/src/definitions/modules/sidebar.less
  59. +48
    -19
      semantic/src/definitions/modules/sticky.js
  60. +1
    -2
      semantic/src/definitions/modules/sticky.less
  61. +57
    -27
      semantic/src/definitions/modules/tab.js
  62. +1
    -2
      semantic/src/definitions/modules/tab.less
  63. +24
    -9
      semantic/src/definitions/modules/transition.js
  64. +1
    -2
      semantic/src/definitions/modules/transition.less
  65. +0
    -0
      semantic/src/definitions/views/ad.less
  66. +20
    -2
      semantic/src/definitions/views/card.less
  67. +18
    -5
      semantic/src/definitions/views/comment.less
  68. +0
    -1
      semantic/src/definitions/views/feed.less
  69. +1
    -2
      semantic/src/definitions/views/item.less
  70. +18
    -19
      semantic/src/definitions/views/statistic.less
  71. +0
    -0
      semantic/src/theme.less
  72. BIN
      semantic/src/themes/default/assets/fonts/icons.eot
  73. +146
    -26
      semantic/src/themes/default/assets/fonts/icons.svg
  74. BIN
      semantic/src/themes/default/assets/fonts/icons.ttf
  75. BIN
      semantic/src/themes/default/assets/fonts/icons.woff
  76. BIN
      semantic/src/themes/default/assets/fonts/icons.woff2
  77. +0
    -0
      semantic/src/themes/default/assets/images/flags.png
  78. +0
    -0
      semantic/src/themes/default/collections/breadcrumb.overrides
  79. +0
    -0
      semantic/src/themes/default/collections/breadcrumb.variables
  80. +0
    -0
      semantic/src/themes/default/collections/form.overrides
  81. +4
    -5
      semantic/src/themes/default/collections/form.variables
  82. +0
    -0
      semantic/src/themes/default/collections/grid.overrides
  83. +0
    -0
      semantic/src/themes/default/collections/grid.variables
  84. +0
    -0
      semantic/src/themes/default/collections/menu.overrides
  85. +13
    -0
      semantic/src/themes/default/collections/menu.variables
  86. +0
    -0
      semantic/src/themes/default/collections/message.overrides
  87. +48
    -1
      semantic/src/themes/default/collections/message.variables
  88. +0
    -0
      semantic/src/themes/default/collections/table.overrides
  89. +7
    -2
      semantic/src/themes/default/collections/table.variables
  90. +0
    -0
      semantic/src/themes/default/elements/button.overrides
  91. +14
    -0
      semantic/src/themes/default/elements/button.variables
  92. +0
    -0
      semantic/src/themes/default/elements/container.overrides
  93. +0
    -0
      semantic/src/themes/default/elements/container.variables
  94. +0
    -0
      semantic/src/themes/default/elements/divider.overrides
  95. +0
    -0
      semantic/src/themes/default/elements/divider.variables
  96. +0
    -0
      semantic/src/themes/default/elements/flag.overrides
  97. +0
    -0
      semantic/src/themes/default/elements/flag.variables
  98. +0
    -0
      semantic/src/themes/default/elements/header.overrides
  99. +0
    -0
      semantic/src/themes/default/elements/header.variables
  100. +263
    -77
      semantic/src/themes/default/elements/icon.overrides

+ 1
- 1
semantic.json View File

@@ -68,5 +68,5 @@
"state",
"visibility"
],
"version": "2.1.8"
"version": "2.2.4"
}

+ 3
- 3
semantic/gulpfile.js View File

@@ -67,6 +67,6 @@ gulp.task('build-docs', 'Build all files and add to SUI Docs', buildDocs);
---------------*/

if(config.rtl) {
gulp.task('watch-rtl', 'Build all files as RTL', watchRTL);
gulp.task('build-rtl', 'Watch files as RTL ', buildRTL);
}
gulp.task('watch-rtl', 'Watch files as RTL', watchRTL);
gulp.task('build-rtl', 'Build all files as RTL', buildRTL);
}

+ 41
- 16
semantic/src/definitions/behaviors/api.js View File

@@ -3,16 +3,23 @@
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/

;(function ( $, window, document, undefined ) {
;(function ($, window, document, undefined) {

"use strict";

var
window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof self != 'undefined' && self.Math == Math)
? self
: Function('return this')()
;

$.api = $.fn.api = function(parameters) {

var
@@ -141,7 +148,7 @@ $.api = $.fn.api = function(parameters) {
response = sessionStorage.getItem(url);
module.debug('Using cached response', url, response);
response = module.decode.json(response);
return false;
return response;
}
},
write: {
@@ -233,7 +240,6 @@ $.api = $.fn.api = function(parameters) {

module.debug('Querying URL', ajaxSettings.url);
module.verbose('Using AJAX settings', ajaxSettings);

if(settings.cache === 'local' && module.read.cachedResponse(url)) {
module.debug('Response returned from local cache');
module.request = module.create.request();
@@ -276,6 +282,9 @@ $.api = $.fn.api = function(parameters) {
disabled: function() {
return ($module.filter(selector.disabled).length > 0);
},
expectingJSON: function() {
return settings.dataType === 'json' || settings.dataType === 'jsonp';
},
form: function() {
return $module.is('form') || $context.is('form');
},
@@ -286,7 +295,10 @@ $.api = $.fn.api = function(parameters) {
return $module.is('input');
},
loading: function() {
return (module.request && module.request.state() == 'pending');
return (module.request)
? (module.request.state() == 'pending')
: false
;
},
abortedRequest: function(xhr) {
if(xhr && xhr.readyState !== undefined && xhr.readyState === 0) {
@@ -299,7 +311,7 @@ $.api = $.fn.api = function(parameters) {
}
},
validResponse: function(response) {
if( (settings.dataType !== 'json' && settings.dataType !== 'jsonp') || !$.isFunction(settings.successTest) ) {
if( (!module.is.expectingJSON()) || !$.isFunction(settings.successTest) ) {
module.verbose('Response is not JSON, skipping validation', settings.successTest, response);
return true;
}
@@ -469,7 +481,9 @@ $.api = $.fn.api = function(parameters) {
elapsedTime = (new Date().getTime() - requestStartTime),
timeLeft = (settings.loadingDuration - elapsedTime),
translatedResponse = ( $.isFunction(settings.onResponse) )
? settings.onResponse.call(context, $.extend(true, {}, response))
? module.is.expectingJSON()
? settings.onResponse.call(context, $.extend(true, {}, response))
: settings.onResponse.call(context, response)
: false
;
timeLeft = (timeLeft > 0)
@@ -550,11 +564,12 @@ $.api = $.fn.api = function(parameters) {
if(status == 'aborted') {
module.debug('XHR Aborted (Most likely caused by page navigation or CORS Policy)', status, httpMessage);
settings.onAbort.call(context, status, $module, xhr);
return true;
}
else if(status == 'invalid') {
module.debug('JSON did not pass success test. A server-side error has most likely occurred', response);
}
else if(status == 'error') {
else if(status == 'error') {
if(xhr !== undefined) {
module.debug('XHR produced a server error', status, httpMessage);
// make sure we have an error to display to console
@@ -647,7 +662,7 @@ $.api = $.fn.api = function(parameters) {
.done(module.event.xhr.done)
.fail(module.event.xhr.fail)
;
module.verbose('Created server request', xhr);
module.verbose('Created server request', xhr, ajaxSettings);
return xhr;
}
},
@@ -678,7 +693,7 @@ $.api = $.fn.api = function(parameters) {
get: {
responseFromXHR: function(xhr) {
return $.isPlainObject(xhr)
? (settings.dataType == 'json' || settings.dataType == 'jsonp')
? (module.is.expectingJSON())
? module.decode.json(xhr.responseText)
: xhr.responseText
: false
@@ -723,6 +738,9 @@ $.api = $.fn.api = function(parameters) {
if(runSettings === undefined) {
module.error(error.noReturnedValue);
}
if(runSettings === false) {
return runSettings;
}
return (runSettings !== undefined)
? $.extend(true, {}, runSettings)
: $.extend(true, {}, settings)
@@ -749,7 +767,7 @@ $.api = $.fn.api = function(parameters) {
if( module.is.input() ) {
data.value = $module.val();
}
else if( !module.is.form() ) {
else if( module.is.form() ) {

}
else {
@@ -828,7 +846,12 @@ $.api = $.fn.api = function(parameters) {
$.extend(true, settings, name);
}
else if(value !== undefined) {
settings[name] = value;
if($.isPlainObject(settings[name])) {
$.extend(true, settings[name], value);
}
else {
settings[name] = value;
}
}
else {
return settings[name];
@@ -846,7 +869,7 @@ $.api = $.fn.api = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
@@ -857,7 +880,7 @@ $.api = $.fn.api = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
@@ -868,8 +891,10 @@ $.api = $.fn.api = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {


+ 233
- 227
semantic/src/definitions/behaviors/colorize.js View File

@@ -3,272 +3,278 @@
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/

;(function ( $, window, document, undefined ) {
;(function ($, window, document, undefined) {

"use strict";
"use strict";

$.fn.colorize = function(parameters) {
var
settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.colorize.settings, parameters)
: $.extend({}, $.fn.colorize.settings),
// hoist arguments
moduleArguments = arguments || false
;
$(this)
.each(function(instanceIndex) {
window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof self != 'undefined' && self.Math == Math)
? self
: Function('return this')()
;

var
$module = $(this),
$.fn.colorize = function(parameters) {
var
settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.colorize.settings, parameters)
: $.extend({}, $.fn.colorize.settings),
// hoist arguments
moduleArguments = arguments || false
;
$(this)
.each(function(instanceIndex) {

mainCanvas = $('<canvas />')[0],
imageCanvas = $('<canvas />')[0],
overlayCanvas = $('<canvas />')[0],
var
$module = $(this),

backgroundImage = new Image(),
mainCanvas = $('<canvas />')[0],
imageCanvas = $('<canvas />')[0],
overlayCanvas = $('<canvas />')[0],

// defs
mainContext,
imageContext,
overlayContext,
backgroundImage = new Image(),

image,
imageName,
// defs
mainContext,
imageContext,
overlayContext,

width,
height,
image,
imageName,

// shortucts
colors = settings.colors,
paths = settings.paths,
namespace = settings.namespace,
error = settings.error,
width,
height,

// boilerplate
instance = $module.data('module-' + namespace),
module
;
// shortcuts
colors = settings.colors,
paths = settings.paths,
namespace = settings.namespace,
error = settings.error,

module = {
// boilerplate
instance = $module.data('module-' + namespace),
module
;

checkPreconditions: function() {
module.debug('Checking pre-conditions');
module = {

if( !$.isPlainObject(colors) || $.isEmptyObject(colors) ) {
module.error(error.undefinedColors);
return false;
}
return true;
},
checkPreconditions: function() {
module.debug('Checking pre-conditions');

async: function(callback) {
if(settings.async) {
setTimeout(callback, 0);
}
else {
callback();
}
},
if( !$.isPlainObject(colors) || $.isEmptyObject(colors) ) {
module.error(error.undefinedColors);
return false;
}
return true;
},

getMetadata: function() {
module.debug('Grabbing metadata');
image = $module.data('image') || settings.image || undefined;
imageName = $module.data('name') || settings.name || instanceIndex;
width = settings.width || $module.width();
height = settings.height || $module.height();
if(width === 0 || height === 0) {
module.error(error.undefinedSize);
}
},
async: function(callback) {
if(settings.async) {
setTimeout(callback, 0);
}
else {
callback();
}
},

getMetadata: function() {
module.debug('Grabbing metadata');
image = $module.data('image') || settings.image || undefined;
imageName = $module.data('name') || settings.name || instanceIndex;
width = settings.width || $module.width();
height = settings.height || $module.height();
if(width === 0 || height === 0) {
module.error(error.undefinedSize);
}
},

initialize: function() {
module.debug('Initializing with colors', colors);
if( module.checkPreconditions() ) {

module.async(function() {
module.getMetadata();
module.canvas.create();

module.draw.image(function() {
module.draw.colors();
module.canvas.merge();
});
$module
.data('module-' + namespace, module)
;
});
}
},
initialize: function() {
module.debug('Initializing with colors', colors);
if( module.checkPreconditions() ) {

redraw: function() {
module.debug('Redrawing image');
module.async(function() {
module.canvas.clear();
module.draw.colors();
module.canvas.merge();
});
},
module.getMetadata();
module.canvas.create();

change: {
color: function(colorName, color) {
module.debug('Changing color', colorName);
if(colors[colorName] === undefined) {
module.error(error.missingColor);
return false;
}
colors[colorName] = color;
module.redraw();
module.draw.image(function() {
module.draw.colors();
module.canvas.merge();
});
$module
.data('module-' + namespace, module)
;
});
}
},

redraw: function() {
module.debug('Redrawing image');
module.async(function() {
module.canvas.clear();
module.draw.colors();
module.canvas.merge();
});
},

change: {
color: function(colorName, color) {
module.debug('Changing color', colorName);
if(colors[colorName] === undefined) {
module.error(error.missingColor);
return false;
}
},
colors[colorName] = color;
module.redraw();
}
},

canvas: {
create: function() {
module.debug('Creating canvases');
canvas: {
create: function() {
module.debug('Creating canvases');

mainCanvas.width = width;
mainCanvas.height = height;
imageCanvas.width = width;
imageCanvas.height = height;
overlayCanvas.width = width;
overlayCanvas.height = height;
mainCanvas.width = width;
mainCanvas.height = height;
imageCanvas.width = width;
imageCanvas.height = height;
overlayCanvas.width = width;
overlayCanvas.height = height;

mainContext = mainCanvas.getContext('2d');
imageContext = imageCanvas.getContext('2d');
overlayContext = overlayCanvas.getContext('2d');
mainContext = mainCanvas.getContext('2d');
imageContext = imageCanvas.getContext('2d');
overlayContext = overlayCanvas.getContext('2d');

$module
.append( mainCanvas )
;
mainContext = $module.children('canvas')[0].getContext('2d');
},
clear: function(context) {
module.debug('Clearing canvas');
overlayContext.fillStyle = '#FFFFFF';
overlayContext.fillRect(0, 0, width, height);
},
merge: function() {
if( !$.isFunction(mainContext.blendOnto) ) {
module.error(error.missingPlugin);
return;
}
mainContext.putImageData( imageContext.getImageData(0, 0, width, height), 0, 0);
overlayContext.blendOnto(mainContext, 'multiply');
}
$module
.append( mainCanvas )
;
mainContext = $module.children('canvas')[0].getContext('2d');
},
clear: function(context) {
module.debug('Clearing canvas');
overlayContext.fillStyle = '#FFFFFF';
overlayContext.fillRect(0, 0, width, height);
},
merge: function() {
if( !$.isFunction(mainContext.blendOnto) ) {
module.error(error.missingPlugin);
return;
}
mainContext.putImageData( imageContext.getImageData(0, 0, width, height), 0, 0);
overlayContext.blendOnto(mainContext, 'multiply');
}
},

draw: {

image: function(callback) {
module.debug('Drawing image');
callback = callback || function(){};
if(image) {
backgroundImage.src = image;
backgroundImage.onload = function() {
imageContext.drawImage(backgroundImage, 0, 0);
callback();
};
}
else {
module.error(error.noImage);
callback();
}
},
draw: {

colors: function() {
module.debug('Drawing color overlays', colors);
$.each(colors, function(colorName, color) {
settings.onDraw(overlayContext, imageName, colorName, color);
});
image: function(callback) {
module.debug('Drawing image');
callback = callback || function(){};
if(image) {
backgroundImage.src = image;
backgroundImage.onload = function() {
imageContext.drawImage(backgroundImage, 0, 0);
callback();
};
}
else {
module.error(error.noImage);
callback();
}

},

debug: function(message, variableName) {
if(settings.debug) {
if(variableName !== undefined) {
console.info(settings.name + ': ' + message, variableName);
}
else {
console.info(settings.name + ': ' + message);
}
colors: function() {
module.debug('Drawing color overlays', colors);
$.each(colors, function(colorName, color) {
settings.onDraw(overlayContext, imageName, colorName, color);
});
}

},

debug: function(message, variableName) {
if(settings.debug) {
if(variableName !== undefined) {
console.info(settings.name + ': ' + message, variableName);
}
},
error: function(errorMessage) {
console.warn(settings.name + ': ' + errorMessage);
},
invoke: function(methodName, context, methodArguments) {
var
method
;
methodArguments = methodArguments || Array.prototype.slice.call( arguments, 2 );

if(typeof methodName == 'string' && instance !== undefined) {
methodName = methodName.split('.');
$.each(methodName, function(index, name) {
if( $.isPlainObject( instance[name] ) ) {
instance = instance[name];
return true;
}
else if( $.isFunction( instance[name] ) ) {
method = instance[name];
return true;
}
module.error(settings.error.method);
return false;
});
else {
console.info(settings.name + ': ' + message);
}
return ( $.isFunction( method ) )
? method.apply(context, methodArguments)
: false
;
}

};
if(instance !== undefined && moduleArguments) {
// simpler than invoke realizing to invoke itself (and losing scope due prototype.call()
if(moduleArguments[0] == 'invoke') {
moduleArguments = Array.prototype.slice.call( moduleArguments, 1 );
},
error: function(errorMessage) {
console.warn(settings.name + ': ' + errorMessage);
},
invoke: function(methodName, context, methodArguments) {
var
method
;
methodArguments = methodArguments || Array.prototype.slice.call( arguments, 2 );

if(typeof methodName == 'string' && instance !== undefined) {
methodName = methodName.split('.');
$.each(methodName, function(index, name) {
if( $.isPlainObject( instance[name] ) ) {
instance = instance[name];
return true;
}
else if( $.isFunction( instance[name] ) ) {
method = instance[name];
return true;
}
module.error(settings.error.method);
return false;
});
}
return module.invoke(moduleArguments[0], this, Array.prototype.slice.call( moduleArguments, 1 ) );
return ( $.isFunction( method ) )
? method.apply(context, methodArguments)
: false
;
}

};
if(instance !== undefined && moduleArguments) {
// simpler than invoke realizing to invoke itself (and losing scope due prototype.call()
if(moduleArguments[0] == 'invoke') {
moduleArguments = Array.prototype.slice.call( moduleArguments, 1 );
}
// initializing
module.initialize();
})
;
return this;
};

$.fn.colorize.settings = {
name : 'Image Colorizer',
debug : true,
namespace : 'colorize',

onDraw : function(overlayContext, imageName, colorName, color) {},

// whether to block execution while updating canvas
async : true,
// object containing names and default values of color regions
colors : {},

metadata: {
image : 'image',
name : 'name'
},

error: {
noImage : 'No tracing image specified',
undefinedColors : 'No default colors specified.',
missingColor : 'Attempted to change color that does not exist',
missingPlugin : 'Blend onto plug-in must be included',
undefinedHeight : 'The width or height of image canvas could not be automatically determined. Please specify a height.'
}

};
return module.invoke(moduleArguments[0], this, Array.prototype.slice.call( moduleArguments, 1 ) );
}
// initializing
module.initialize();
})
;
return this;
};

$.fn.colorize.settings = {
name : 'Image Colorizer',
debug : true,
namespace : 'colorize',

onDraw : function(overlayContext, imageName, colorName, color) {},

// whether to block execution while updating canvas
async : true,
// object containing names and default values of color regions
colors : {},

metadata: {
image : 'image',
name : 'name'
},

error: {
noImage : 'No tracing image specified',
undefinedColors : 'No default colors specified.',
missingColor : 'Attempted to change color that does not exist',
missingPlugin : 'Blend onto plug-in must be included',
undefinedHeight : 'The width or height of image canvas could not be automatically determined. Please specify a height.'
}

};

})( jQuery, window, document );

+ 66
- 25
semantic/src/definitions/behaviors/form.js View File

@@ -3,16 +3,22 @@
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/

;(function ( $, window, document, undefined ) {
;(function ($, window, document, undefined) {

"use strict";

window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof self != 'undefined' && self.Math == Math)
? self
: Function('return this')()
;

$.fn.form = function(parameters) {
var
$allModules = $(this),
@@ -74,6 +80,9 @@ $.fn.form = function(parameters) {
module.invoke(query);
}
else {
if(instance !== undefined) {
instance.invoke('destroy');
}
module.verbose('Initializing form validation', $module, settings);
module.bindEvents();
module.set.defaults();
@@ -228,6 +237,20 @@ $.fn.form = function(parameters) {
bracketedRule: function(rule) {
return (rule.type && rule.type.match(settings.regExp.bracket));
},
empty: function($field) {
if(!$field || $field.length === 0) {
return true;
}
else if($field.is('input[type="checkbox"]')) {
return !$field.is(':checked');
}
else {
return module.is.blank($field);
}
},
blank: function($field) {
return $.trim($field.val()) === '';
},
valid: function() {
var
allValid = true
@@ -261,9 +284,12 @@ $.fn.form = function(parameters) {
field: {
keydown: function(event) {
var
$field = $(this),
key = event.which,
keyCode = {
$field = $(this),
key = event.which,
isInput = $field.is(selector.input),
isCheckbox = $field.is(selector.checkbox),
isInDropdown = ($field.closest(selector.uiDropdown).length > 0),
keyCode = {
enter : 13,
escape : 27
}
@@ -274,7 +300,7 @@ $.fn.form = function(parameters) {
.blur()
;
}
if(!event.ctrlKey && key == keyCode.enter && $field.is(selector.input) && $field.not(selector.checkbox).length > 0 ) {
if(!event.ctrlKey && key == keyCode.enter && isInput && !isInDropdown && !isCheckbox) {
if(!keyHeldDown) {
$field
.one('keyup' + eventNamespace, module.event.field.keyup)
@@ -296,7 +322,9 @@ $.fn.form = function(parameters) {
;
if( $fieldGroup.hasClass(className.error) ) {
module.debug('Revalidating field', $field, validationRules);
module.validate.form.call(module, event, true);
if(validationRules) {
module.validate.field( validationRules );
}
}
else if(settings.on == 'blur' || settings.on == 'change') {
if(validationRules) {
@@ -307,13 +335,14 @@ $.fn.form = function(parameters) {
change: function(event) {
var
$field = $(this),
$fieldGroup = $field.closest($group)
$fieldGroup = $field.closest($group),
validationRules = module.get.validation($field)
;
if(settings.on == 'change' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) ) {
clearTimeout(module.timer);
module.timer = setTimeout(function() {
module.debug('Revalidating field', $field, module.get.validation($field));
module.validate.form.call(module, event, true);
module.validate.field( validationRules );
}, settings.delay);
}
}
@@ -323,10 +352,13 @@ $.fn.form = function(parameters) {

get: {
ancillaryValue: function(rule) {
if(!rule.type || !module.is.bracketedRule(rule)) {
if(!rule.type || (!rule.value && !module.is.bracketedRule(rule))) {
return false;
}
return rule.type.match(settings.regExp.bracket)[1] + '';
return (rule.value !== undefined)
? rule.value
: rule.type.match(settings.regExp.bracket)[1] + ''
;
},
ruleName: function(rule) {
if( module.is.bracketedRule(rule) ) {
@@ -369,7 +401,7 @@ $.fn.form = function(parameters) {
}
if(requiresName) {
$label = $field.closest(selector.group).find('label').eq(0);
name = ($label.size() == 1)
name = ($label.length == 1)
? $label.text()
: $field.prop('placeholder') || settings.text.unspecifiedField
;
@@ -788,8 +820,11 @@ $.fn.form = function(parameters) {
// takes a validation object and returns whether field passes validation
field: function(field, fieldName) {
var
identifier = field.identifier || fieldName,
$field = module.get.field(identifier),
identifier = field.identifier || fieldName,
$field = module.get.field(identifier),
$dependsField = (field.depends)
? module.get.field(field.depends)
: false,
fieldValid = true,
fieldErrors = []
;
@@ -801,8 +836,12 @@ $.fn.form = function(parameters) {
module.debug('Field is disabled. Skipping', identifier);
fieldValid = true;
}
else if(field.optional && $.trim($field.val()) === ''){
module.debug('Field is optional and empty. Skipping', identifier);
else if(field.optional && module.is.blank($field)){
module.debug('Field is optional and blank. Skipping', identifier);
fieldValid = true;
}
else if(field.depends && module.is.empty($dependsField)) {
module.debug('Field depends on another value that is not present or empty. Skipping', $dependsField);
fieldValid = true;
}
else if(field.rules !== undefined) {
@@ -874,7 +913,7 @@ $.fn.form = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
@@ -885,7 +924,7 @@ $.fn.form = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
@@ -896,8 +935,10 @@ $.fn.form = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
@@ -1051,7 +1092,7 @@ $.fn.form.settings = {
regExp: {
bracket : /\[(.*)\]/i,
decimal : /^\d*(\.)\d+/,
email : "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",
email : /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,
escape : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
flags : /^\/(.*)\/(.*)?/,
integer : /^\-?\d+$/,
@@ -1159,10 +1200,7 @@ $.fn.form.settings = {

// is most likely an email
email: function(value){
var
emailRegExp = new RegExp($.fn.form.settings.regExp.email, 'i')
;
return emailRegExp.test(value);
return $.fn.form.settings.regExp.email.test(value);
},

// value is most likely url
@@ -1172,6 +1210,9 @@ $.fn.form.settings = {

// matches specified regExp
regExp: function(value, regExp) {
if(regExp instanceof RegExp) {
return value.match(regExp);
}
var
regExpParts = regExp.match($.fn.form.settings.regExp.flags),
flags


+ 20
- 7
semantic/src/definitions/behaviors/state.js View File

@@ -3,16 +3,22 @@
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/

;(function ( $, window, document, undefined ) {
;(function ($, window, document, undefined) {

"use strict";

window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof self != 'undefined' && self.Math == Math)
? self
: Function('return this')()
;

$.fn.state = function(parameters) {
var
$allModules = $(this),
@@ -409,7 +415,12 @@ $.fn.state = function(parameters) {
$.extend(true, settings, name);
}
else if(value !== undefined) {
settings[name] = value;
if($.isPlainObject(settings[name])) {
$.extend(true, settings[name], value);
}
else {
settings[name] = value;
}
}
else {
return settings[name];
@@ -427,7 +438,7 @@ $.fn.state = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
@@ -438,7 +449,7 @@ $.fn.state = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
@@ -449,8 +460,10 @@ $.fn.state = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {


+ 89
- 22
semantic/src/definitions/behaviors/visibility.js View File

@@ -3,16 +3,22 @@
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/

;(function ( $, window, document, undefined ) {
;(function ($, window, document, undefined) {

"use strict";

window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof self != 'undefined' && self.Math == Math)
? self
: Function('return this')()
;

$.fn.visibility = function(parameters) {
var
$allModules = $(this),
@@ -24,7 +30,10 @@ $.fn.visibility = function(parameters) {
query = arguments[0],
methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1),
returnedValue
returnedValue,

moduleCount = $allModules.length,
loadedCount = 0
;

$allModules
@@ -61,6 +70,7 @@ $.fn.visibility = function(parameters) {
element = this,
disabled = false,

contextObserver,
observer,
module
;
@@ -111,13 +121,21 @@ $.fn.visibility = function(parameters) {
if(observer) {
observer.disconnect();
}
if(contextObserver) {
contextObserver.disconnect();
}
$window
.off('load' + eventNamespace, module.event.load)
.off('resize' + eventNamespace, module.event.resize)
;
$context
.off('scroll' + eventNamespace, module.event.scroll)
.off('scrollchange' + eventNamespace, module.event.scrollchange)
;
if(settings.type == 'fixed') {
module.resetFixed();
module.remove.placeholder();
}
$module
.off(eventNamespace)
.removeData(moduleNamespace)
@@ -126,12 +144,11 @@ $.fn.visibility = function(parameters) {

observeChanges: function() {
if('MutationObserver' in window) {
observer = new MutationObserver(function(mutations) {
module.verbose('DOM tree modified, updating visibility calculations');
module.timer = setTimeout(function() {
module.verbose('DOM tree modified, updating sticky menu');
module.refresh();
}, 100);
contextObserver = new MutationObserver(module.event.contextChanged);
observer = new MutationObserver(module.event.changed);
contextObserver.observe(document, {
childList : true,
subtree : true
});
observer.observe(element, {
childList : true,
@@ -162,6 +179,25 @@ $.fn.visibility = function(parameters) {
},

event: {
changed: function(mutations) {
module.verbose('DOM tree modified, updating visibility calculations');
module.timer = setTimeout(function() {
module.verbose('DOM tree modified, updating sticky menu');
module.refresh();
}, 100);
},
contextChanged: function(mutations) {
[].forEach.call(mutations, function(mutation) {
if(mutation.removedNodes) {
[].forEach.call(mutation.removedNodes, function(node) {
if(node == element || $(node).find(element).length > 0) {
module.debug('Element removed from DOM, tearing down events');
module.destroy();
}
});
}
});
},
resize: function() {
module.debug('Window resized');
if(settings.refreshOnResize) {
@@ -261,7 +297,13 @@ $.fn.visibility = function(parameters) {
settings.onOnScreen = function() {
module.debug('Image on screen', element);
module.precache(src, function() {
module.set.image(src);
module.set.image(src, function() {
loadedCount++;
if(loadedCount == moduleCount) {
settings.onAllLoaded.call(this);
}
settings.onLoad.call(this);
});
});
};
}
@@ -335,20 +377,21 @@ $.fn.visibility = function(parameters) {
position : 'fixed',
top : settings.offset + 'px',
left : 'auto',
zIndex : '1'
zIndex : settings.zIndex
})
;
settings.onFixed.call(element);
},
image: function(src) {
image: function(src, callback) {
$module
.attr('src', src)
;
if(settings.transition) {
if( $.fn.transition !== undefined ) {
$module.transition(settings.transition, settings.duration);
$module.transition(settings.transition, settings.duration, callback);
}
else {
$module.fadeIn(settings.duration);
$module.fadeIn(settings.duration, callback);
}
}
else {
@@ -381,8 +424,7 @@ $.fn.visibility = function(parameters) {
refresh: function() {
module.debug('Refreshing constants (width/height)');
if(settings.type == 'fixed') {
module.remove.fixed();
module.remove.occurred();
module.resetFixed();
}
module.reset();
module.save.position();
@@ -392,8 +434,13 @@ $.fn.visibility = function(parameters) {
settings.onRefresh.call(element);
},

resetFixed: function () {
module.remove.fixed();
module.remove.occurred();
},

reset: function() {
module.verbose('Reseting all cached values');
module.verbose('Resetting all cached values');
if( $.isPlainObject(module.cache) ) {
module.cache.screen = {};
module.cache.element = {};
@@ -756,6 +803,13 @@ $.fn.visibility = function(parameters) {
zIndex : ''
})
;
settings.onUnfixed.call(element);
},
placeholder: function() {
module.debug('Removing placeholder content');
if($placeholder) {
$placeholder.remove();
}
},
occurred: function(callback) {
if(callback) {
@@ -970,7 +1024,7 @@ $.fn.visibility = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
@@ -981,7 +1035,7 @@ $.fn.visibility = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
@@ -992,8 +1046,10 @@ $.fn.visibility = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
@@ -1170,6 +1226,9 @@ $.fn.visibility.settings = {
// special visibility type (image, fixed)
type : false,

// z-index to use with visibility 'fixed'
zIndex : '10',

// image only animation settings
transition : 'fade in',
duration : 1000,
@@ -1193,6 +1252,14 @@ $.fn.visibility.settings = {
onTopPassedReverse : false,
onBottomPassedReverse : false,

// special callbacks for image
onLoad : function() {},
onAllLoaded : function() {},

// special callbacks for fixed position
onFixed : function() {},
onUnfixed : function() {},

// utility callbacks
onUpdate : false, // disabled by default for performance
onRefresh : function(){},
@@ -1213,4 +1280,4 @@ $.fn.visibility.settings = {

};

})( jQuery, window, document );
})( jQuery, window, document );

+ 13
- 5
semantic/src/definitions/behaviors/visit.js View File

@@ -3,7 +3,6 @@
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
@@ -13,6 +12,13 @@

"use strict";

window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof self != 'undefined' && self.Math == Math)
? self
: Function('return this')()
;

$.visit = $.fn.visit = function(parameters) {
var
$allModules = $.isFunction(this)
@@ -322,7 +328,7 @@ $.visit = $.fn.visit = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
@@ -333,7 +339,7 @@ $.visit = $.fn.visit = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
@@ -344,8 +350,10 @@ $.visit = $.fn.visit = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {


+ 1
- 2
semantic/src/definitions/collections/breadcrumb.less View File

@@ -3,7 +3,6 @@
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
@@ -120,4 +119,4 @@
font-size: @massive;
}

.loadUIOverrides();
.loadUIOverrides();

+ 52
- 38
semantic/src/definitions/collections/form.less View File

@@ -3,7 +3,6 @@
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
@@ -18,7 +17,6 @@

@import (multiple) '../../theme.config';


/*******************************
Elements
*******************************/
@@ -56,7 +54,7 @@

.ui.form .fields .field {
clear: both;
margin: @fieldMargin;
margin: 0em;
}


@@ -89,6 +87,7 @@
.ui.form input[type="tel"],
.ui.form input[type="time"],
.ui.form input[type="text"],
.ui.form input[type="file"],
.ui.form input[type="url"] {
width: @inputWidth;
vertical-align: top;
@@ -110,6 +109,7 @@
.ui.form input[type="tel"],
.ui.form input[type="time"],
.ui.form input[type="text"],
.ui.form input[type="file"],
.ui.form input[type="url"] {
font-family: @inputFont;
margin: 0em;
@@ -322,7 +322,7 @@
.ui.form ::-webkit-input-placeholder {
color: @inputPlaceholderColor;
}
.ui.form ::-ms-input-placeholder {
.ui.form :-ms-input-placeholder {
color: @inputPlaceholderColor;
}
.ui.form ::-moz-placeholder {
@@ -332,7 +332,7 @@
.ui.form :focus::-webkit-input-placeholder {
color: @inputPlaceholderFocusColor;
}
.ui.form :focus::-ms-input-placeholder {
.ui.form :focus:-ms-input-placeholder {
color: @inputPlaceholderFocusColor;
}
.ui.form :focus::-moz-placeholder {
@@ -343,8 +343,8 @@
.ui.form .error ::-webkit-input-placeholder {
color: @inputErrorPlaceholderColor;
}
.ui.form .error ::-ms-input-placeholder {
color: @inputErrorPlaceholderColor;
.ui.form .error :-ms-input-placeholder {
color: @inputErrorPlaceholderColor !important;
}
.ui.form .error ::-moz-placeholder {
color: @inputErrorPlaceholderColor;
@@ -353,8 +353,8 @@
.ui.form .error :focus::-webkit-input-placeholder {
color: @inputErrorPlaceholderFocusColor;
}
.ui.form .error :focus::-ms-input-placeholder {
color: @inputErrorPlaceholderFocusColor;
.ui.form .error :focus:-ms-input-placeholder {
color: @inputErrorPlaceholderFocusColor !important;
}
.ui.form .error :focus::-moz-placeholder {
color: @inputErrorPlaceholderFocusColor;
@@ -375,6 +375,7 @@
.ui.form input[type="tel"]:focus,
.ui.form input[type="time"]:focus,
.ui.form input[type="text"]:focus,
.ui.form input[type="file"]:focus,
.ui.form input[type="url"]:focus {
color: @inputFocusColor;
border-color: @inputFocusBorderColor;
@@ -400,6 +401,9 @@
.ui.form.success .success.message:not(:empty) {
display: block;
}
.ui.form.success .compact.success.message:not(:empty) {
display: inline-block;
}
.ui.form.success .icon.success.message:not(:empty) {
display: flex;
}
@@ -412,6 +416,9 @@
.ui.form.warning .warning.message:not(:empty) {
display: block;
}
.ui.form.warning .compact.warning.message:not(:empty) {
display: inline-block;
}
.ui.form.warning .icon.warning.message:not(:empty) {
display: flex;
}
@@ -424,6 +431,9 @@
.ui.form.error .error.message:not(:empty) {
display: block;
}
.ui.form.error .compact.error.message:not(:empty) {
display: inline-block;
}
.ui.form.error .icon.error.message:not(:empty) {
display: flex;
}
@@ -454,6 +464,7 @@
.ui.form .fields.error .field input[type="tel"],
.ui.form .fields.error .field input[type="time"],
.ui.form .fields.error .field input[type="text"],
.ui.form .fields.error .field input[type="file"],
.ui.form .fields.error .field input[type="url"],
.ui.form .field.error textarea,
.ui.form .field.error select,
@@ -467,6 +478,7 @@
.ui.form .field.error input[type="tel"],
.ui.form .field.error input[type="time"],
.ui.form .field.error input[type="text"],
.ui.form .field.error input[type="file"],
.ui.form .field.error input[type="url"] {
background: @formErrorBackground;
border-color: @formErrorBorder;
@@ -486,6 +498,7 @@
.ui.form .field.error input[type="tel"]:focus,
.ui.form .field.error input[type="time"]:focus,
.ui.form .field.error input[type="text"]:focus,
.ui.form .field.error input[type="file"]:focus,
.ui.form .field.error input[type="url"]:focus {
background: @inputErrorFocusBackground;
border-color: @inputErrorFocusBorder;
@@ -583,7 +596,8 @@
pointer-events: none;
opacity: @disabledOpacity;
}
.ui.form .field.disabled label {
.ui.form .field.disabled > label,
.ui.form .fields.disabled > label {
opacity: @disabledLabelOpacity;
}
.ui.form .field.disabled :disabled {
@@ -598,7 +612,7 @@
.ui.loading.form {
position: relative;
cursor: default;
point-events: none;
pointer-events: none;
}
.ui.loading.form:before {
position: absolute;
@@ -691,7 +705,12 @@
.ui.form .inverted.segment .ui.checkbox label,
.ui.form .inverted.segment .ui.checkbox .box,
.ui.inverted.form .ui.checkbox label,
.ui.inverted.form .ui.checkbox .box {
.ui.inverted.form .ui.checkbox .box,
.ui.inverted.form .inline.fields > label,
.ui.inverted.form .inline.fields .field > label,
.ui.inverted.form .inline.fields .field > p,
.ui.inverted.form .inline.field > label,
.ui.inverted.form .inline.field > p {
color: @invertedLabelColor;
}

@@ -706,6 +725,7 @@
.ui.inverted.form input[type="tel"],
.ui.inverted.form input[type="time"],
.ui.inverted.form input[type="text"],
.ui.inverted.form input[type="file"],
.ui.inverted.form input[type="url"] {
background: @invertedInputBackground;
border-color: @invertedInputBorderColor;
@@ -750,6 +770,7 @@
.ui.form .fields {
display: flex;
flex-direction: row;
margin: @fieldsMargin;
}
.ui.form .fields > .field {
flex: 0 1 auto;
@@ -804,6 +825,9 @@
.ui.form .fields {
flex-wrap: wrap;
}

.ui[class*="equal width"].form .fields > .field,
.ui.form [class*="equal width"].fields > .field,
.ui.form .two.fields > .fields,
.ui.form .two.fields > .field,
.ui.form .three.fields > .fields,
@@ -823,19 +847,10 @@
.ui.form .ten.fields > .fields,
.ui.form .ten.fields > .field {
width: @oneColumn !important;
margin: @fieldMargin;
padding-left: 0%;
padding-right: 0%;
margin: 0em 0em @rowDistance;
}
}

.ui.form .fields .field:first-child {
padding-left: 0%;
}
.ui.form .fields .field:last-child {
padding-right: 0%;
}


/* Sizing Combinations */
.ui.form .fields .wide.field {
@@ -843,12 +858,6 @@
padding-left: (@gutterWidth / 2);
padding-right: (@gutterWidth / 2);
}
.ui.form .fields .wide.field:first-child {
padding-left: 0%;
}
.ui.form .fields .wide.field:last-child {
padding-right: 0%;
}

.ui.form .one.wide.field {
width: @oneWide !important;
@@ -925,9 +934,9 @@
.ui.form .fields > .fifteen.wide.field,
.ui.form .fields > .sixteen.wide.field {
width: @oneColumn !important;
margin: @fieldMargin;
padding-left: 0%;
padding-right: 0%;
}
.ui.form .fields {
margin-bottom: 0em;
}
}

@@ -1016,24 +1025,29 @@
Sizes
---------------------*/

/* Standard */
.ui.mini.form {
font-size: @mini;
}
.ui.tiny.form {
font-size: @tiny;
}
.ui.small.form {
font-size: @small;
}

/* Medium */
.ui.form {
font-size: @medium;
}

/* Large */
.ui.large.form {
font-size: @large;
}

/* Huge */
.ui.big.form {
font-size: @big;
}
.ui.huge.form {
font-size: @huge;
}
.ui.massive.form {
font-size: @massive;
}

.loadUIOverrides();

+ 16
- 9
semantic/src/definitions/collections/grid.less View File

@@ -3,7 +3,6 @@
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
@@ -952,9 +951,9 @@
text-align: center;
justify-content: center;
}
.ui.centered.grid > .column:not(.aligned):not(.row),
.ui.centered.grid > .row > .column:not(.aligned),
.ui.grid .centered.row > .column:not(.aligned) {
.ui.centered.grid > .column:not(.aligned):not(.justified):not(.row),
.ui.centered.grid > .row > .column:not(.aligned):not(.justified),
.ui.grid .centered.row > .column:not(.aligned):not(.justified) {
text-align: left;
}

@@ -1046,12 +1045,20 @@
margin-bottom: 0em;
}



/* No divider on first column on row */
.ui.divided.grid:not([class*="vertically divided"]) > .column:first-child,
.ui.divided.grid:not([class*="vertically divided"]) > .row > .column:first-child {
box-shadow: none;
}

/* No space on top of first row */
.ui[class*="vertically divided"].grid > .row:first-child > .column {
margin-top: 0em;
}


/* Divided Row */
.ui.grid > .divided.row > .column {
box-shadow: @dividedBorder;
@@ -1229,7 +1236,7 @@
.ui[class*="left aligned"].grid > .row > .column,
.ui.grid > [class*="left aligned"].row > .column,
.ui.grid > [class*="left aligned"].column.column,
.ui.grid > .row > [class*="left aligned"].column {
.ui.grid > .row > [class*="left aligned"].column.column {
text-align: left;
align-self: inherit;
}
@@ -1239,7 +1246,7 @@
.ui[class*="center aligned"].grid > .row > .column,
.ui.grid > [class*="center aligned"].row > .column,
.ui.grid > [class*="center aligned"].column.column,
.ui.grid > .row > [class*="center aligned"].column {
.ui.grid > .row > [class*="center aligned"].column.column {
text-align: center;
align-self: inherit;
}
@@ -1252,7 +1259,7 @@
.ui[class*="right aligned"].grid > .row > .column,
.ui.grid > [class*="right aligned"].row > .column,
.ui.grid > [class*="right aligned"].column.column,
.ui.grid > .row > [class*="right aligned"].column {
.ui.grid > .row > [class*="right aligned"].column.column {
text-align: right;
align-self: inherit;
}
@@ -1262,7 +1269,7 @@
.ui.justified.grid > .row > .column,
.ui.grid > .justified.row > .column,
.ui.grid > .justified.column.column,
.ui.grid > .row > .justified.column {
.ui.grid > .row > .justified.column.column {
text-align: justify;
hyphens: auto;
}
@@ -1614,7 +1621,7 @@
}
}

/* Mobily Only */
/* Mobile Only */
@media only screen and (max-width: @largestMobileScreen) {
.ui.grid > .doubling.row,
.ui.doubling.grid > .row {


+ 58
- 27
semantic/src/definitions/collections/menu.less View File

@@ -29,7 +29,7 @@

.ui.menu {
display: flex;
/*margin: @margin; removed because we got the huge heading*/
margin: @margin;
font-family: @fontFamily;
background: @background;
font-weight: @fontWeight;
@@ -197,18 +197,6 @@
font-weight: @verticalHeaderFontWeight;
}

/*--------------
Popup
---------------*/

.ui.menu .ui.popup {
display: none;
}
.ui.menu .ui.visible.popup {
display: block;
}


/*--------------
Dropdowns
---------------*/
@@ -296,13 +284,18 @@
margin-left: 1em;
}
.ui.vertical.menu .dropdown.item .menu {
top: 0% !important;
left: 100%;
min-width: 0;
margin: 0em 0em 0em @dropdownMenuDistance;
box-shadow: @dropdownVerticalMenuBoxShadow;
border-radius: 0em @dropdownMenuBorderRadius @dropdownMenuBorderRadius @dropdownMenuBorderRadius;
}
.ui.vertical.menu .dropdown.item.upward .menu {
bottom: 0;
}
.ui.vertical.menu .dropdown.item:not(.upward) .menu {
top: 0;
}
.ui.vertical.menu .active.dropdown.item {
border-top-right-radius: 0em;
border-bottom-right-radius: 0em;
@@ -538,7 +531,6 @@ Floated Menu / Item
width: 100%;
height: @dividerSize;
background: @verticalDividerBackground;
height: 1px;
}

.ui.vertical.menu .item:first-child:before {
@@ -639,7 +631,9 @@ Floated Menu / Item
.ui.tabular.menu + .attached:not(.top).segment,
.ui.tabular.menu + .attached:not(.top).segment + .attached:not(.top).segment {
border-top: none;
margin: 0px;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
width: 100%;
}
.top.attached.segment + .ui.bottom.tabular.menu {
@@ -887,6 +881,11 @@ Floated Menu / Item
background-color: transparent;
}

/* Inverted */
.ui.secondary.inverted.menu {
background-color: transparent;
}

/*---------------------
Secondary Pointing
-----------------------*/
@@ -994,10 +993,12 @@ Floated Menu / Item
}

/* Hover */
.ui.secondary.inverted.pointing.menu .item:hover {
.ui.secondary.inverted.pointing.menu .link.item:hover,
.ui.secondary.inverted.pointing.menu a.item:hover {
color: @secondaryPointingInvertedItemHoverTextColor;
}


/* Active */
.ui.secondary.inverted.pointing.menu .active.item {
border-color: @secondaryPointingInvertedActiveBorderColor;
@@ -1065,6 +1066,8 @@ Floated Menu / Item
}
.ui.vertical.text.menu .item {
margin: @textVerticalMenuItemMargin;
padding-left: 0em;
padding-right: 0em;
}
.ui.vertical.text.menu .item > i.icon {
float: @textVerticalMenuIconFloat;
@@ -1225,7 +1228,15 @@ Floated Menu / Item
width: 100%;
height: @dividerSize;
background: @verticalDividerBackground;
height: 1px;
}

.ui.stackable.menu .left.menu,
.ui.stackable.menu .left.item {
margin-right: 0 !important;
}
.ui.stackable.menu .right.menu,
.ui.stackable.menu .right.item {
margin-left: 0 !important;
}
}

@@ -1359,8 +1370,7 @@ Floated Menu / Item

/*--- Pressed ---*/
.ui.inverted.menu a.item:active,
.ui.inverted.menu .link.item:active,
.ui.inverted.menu a.item:active {
.ui.inverted.menu .link.item:active{
background: @invertedMenuPressedBackground;
color: @invertedMenuPressedColor;
}
@@ -1888,6 +1898,22 @@ Floated Menu / Item
Sizes
---------------*/

/* Mini */