Browse Source

Build dist for demo

pull/4074/head
Jack Lukic 9 years ago
parent
commit
db79dede36
18 changed files with 149 additions and 119 deletions
  1. 2
      dist/components/checkbox.css
  2. 2
      dist/components/checkbox.min.css
  3. 6
      dist/components/dropdown.css
  4. 64
      dist/components/dropdown.js
  5. 2
      dist/components/dropdown.min.css
  6. 4
      dist/components/dropdown.min.js
  7. 1
      dist/components/header.css
  8. 2
      dist/components/header.min.css
  9. 3
      dist/components/input.css
  10. 2
      dist/components/input.min.css
  11. 1
      dist/components/search.css
  12. 40
      dist/components/search.js
  13. 2
      dist/components/search.min.css
  14. 2
      dist/components/search.min.js
  15. 13
      dist/semantic.css
  16. 104
      dist/semantic.js
  17. 2
      dist/semantic.min.css
  18. 16
      dist/semantic.min.js

2
dist/components/checkbox.css

@ -235,7 +235,7 @@
.ui.disabled.checkbox label, .ui.disabled.checkbox label,
.ui.checkbox input[disabled] ~ .box:after, .ui.checkbox input[disabled] ~ .box:after,
.ui.checkbox input[disabled] ~ label { .ui.checkbox input[disabled] ~ label {
cursor: default; cursor: default !important;
opacity: 0.5; opacity: 0.5;
color: #000000; color: #000000;
} }

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

6
dist/components/dropdown.css

@ -661,7 +661,7 @@ select.ui.dropdown {
padding: 0; padding: 0;
max-width: 100%; max-width: 100%;
margin: 0.45240952em 0em 0.45240952em 0.78571429em; margin: 0.45240952em 0em 0.45240952em 0.78571429em;
line-height: 1.2142em; line-height: 1.21428571em;
} }
.ui.multiple.dropdown > .label ~ input.search { .ui.multiple.dropdown > .label ~ input.search {
margin-left: 0.14285714em !important; margin-left: 0.14285714em !important;
@ -683,7 +683,7 @@ select.ui.dropdown {
left: 0; left: 0;
padding: inherit; padding: inherit;
margin: 0.45240952em 0em 0.45240952em 0.78571429em; margin: 0.45240952em 0em 0.45240952em 0.78571429em;
line-height: 1.2142em; line-height: 1.21428571em;
} }
.ui.multiple.search.dropdown > .label ~ .text { .ui.multiple.search.dropdown > .label ~ .text {
display: none; display: none;
@ -696,7 +696,7 @@ select.ui.dropdown {
max-width: 100%; max-width: 100%;
margin: 0.45240952em 0em 0.45240952em 0.78571429em; margin: 0.45240952em 0em 0.45240952em 0.78571429em;
width: 2.2em; width: 2.2em;
line-height: 1.2142em; line-height: 1.21428571em;
} }
/*-------------- /*--------------

64
dist/components/dropdown.js

@ -434,12 +434,12 @@ $.fn.dropdown = function(parameters) {
; ;
if( module.can.show() && !module.is.active() ) { if( module.can.show() && !module.is.active() ) {
module.debug('Showing dropdown'); module.debug('Showing dropdown');
if(module.is.multiple() && !module.has.search() && module.is.allFiltered()) {
return true;
}
if(module.has.message() && !(module.has.maxSelections() || module.has.allResultsFiltered()) ) { if(module.has.message() && !(module.has.maxSelections() || module.has.allResultsFiltered()) ) {
module.remove.message(); module.remove.message();
} }
if(module.is.allFiltered()) {
return true;
}
if(settings.onShow.call(element) !== false) { if(settings.onShow.call(element) !== false) {
module.animate.show(function() { module.animate.show(function() {
if( module.can.click() ) { if( module.can.click() ) {
@ -811,9 +811,16 @@ $.fn.dropdown = function(parameters) {
} }
}, },
focusSearch: function() { focusSearch: function(skipHandler) {
if( module.is.search() && !module.is.focusedOnSearch() ) { if( module.is.search() && !module.is.focusedOnSearch() ) {
$search[0].focus(); if(skipHandler) {
$module.off('focus' + eventNamespace, selector.search);
$search.focus();
$module.on('focus' + eventNamespace, selector.search, module.event.search.focus)
}
else {
$search.focus();
}
} }
}, },
@ -829,11 +836,17 @@ $.fn.dropdown = function(parameters) {
if( module.has.query() ) { if( module.has.query() ) {
if(hasSelected) { if(hasSelected) {
module.debug('Forcing partial selection to selected item', $selectedItem); module.debug('Forcing partial selection to selected item', $selectedItem);
module.event.item.click.call($selectedItem); module.event.item.click.call($selectedItem, {}, true);
return; return;
} }
else { else {
module.remove.searchTerm(); if(settings.allowAdditions) {
module.set.selected(module.get.query());
module.remove.searchTerm();
}
else {
module.remove.searchTerm();
}
} }
} }
module.hide(); module.hide();
@ -905,11 +918,7 @@ $.fn.dropdown = function(parameters) {
pageLostFocus = (document.activeElement === this); pageLostFocus = (document.activeElement === this);
if(!willRefocus) { if(!willRefocus) {
if(!itemActivated && !pageLostFocus) { if(!itemActivated && !pageLostFocus) {
if(module.is.multiple()) { if(settings.forceSelection) {
module.remove.activeLabel();
module.hide();
}
else if(settings.forceSelection) {
module.forceSelection(); module.forceSelection();
} }
else { else {
@ -1055,7 +1064,7 @@ $.fn.dropdown = function(parameters) {
}, settings.delay.hide); }, settings.delay.hide);
} }
}, },
click: function (event) { click: function (event, skipRefocus) {
var var
$choice = $(this), $choice = $(this),
$target = (event) $target = (event)
@ -1073,8 +1082,8 @@ $.fn.dropdown = function(parameters) {
module.remove.userAddition(); module.remove.userAddition();
} }
module.remove.searchTerm(); module.remove.searchTerm();
if(!module.is.focusedOnSearch()) { if(!module.is.focusedOnSearch() && !(skipRefocus == true)) {
module.focusSearch(); module.focusSearch(true);
} }
} }
if(!settings.useLabels) { if(!settings.useLabels) {
@ -1423,7 +1432,7 @@ $.fn.dropdown = function(parameters) {
var var
$target = $(event.target), $target = $(event.target),
$label = $target.closest(selector.siblingLabel), $label = $target.closest(selector.siblingLabel),
inVisibleDOM = document.contains(event.target), inVisibleDOM = document.body.contains(event.target),
notOnLabel = ($module.find($label).length === 0), notOnLabel = ($module.find($label).length === 0),
notInMenu = ($target.closest($menu).length === 0) notInMenu = ($target.closest($menu).length === 0)
; ;
@ -1602,16 +1611,17 @@ $.fn.dropdown = function(parameters) {
if(typeof values == 'string') { if(typeof values == 'string') {
values = [values]; values = [values];
} }
remoteValues = {};
$.each(values, function(index, value) { $.each(values, function(index, value) {
var var
name = module.read.remoteData(value) name = module.read.remoteData(value)
; ;
module.verbose('Restoring value from session data', name, value); module.verbose('Restoring value from session data', name, value);
remoteValues[value] = (name) if(name) {
? name if(!remoteValues) {
: value remoteValues = {};
; }
remoteValues[value] = name;
}
}); });
} }
return remoteValues; return remoteValues;
@ -1888,13 +1898,8 @@ $.fn.dropdown = function(parameters) {
values: function() { values: function() {
// prevents callbacks from occuring on initial load // prevents callbacks from occuring on initial load
module.set.initialLoad(); module.set.initialLoad();
if(settings.apiSettings) { if(settings.apiSettings && settings.saveRemoteData && module.get.remoteValues()) {
if(settings.saveRemoteData) { module.restore.remoteValues();
module.restore.remoteValues();
}
else {
module.clearValue();
}
} }
else { else {
module.set.selected(); module.set.selected();
@ -2751,6 +2756,7 @@ $.fn.dropdown = function(parameters) {
module.debug('Label remove callback cancelled removal'); module.debug('Label remove callback cancelled removal');
return; return;
} }
module.remove.message();
if(isUserValue) { if(isUserValue) {
module.remove.value(stringValue); module.remove.value(stringValue);
module.remove.label(stringValue); module.remove.label(stringValue);
@ -2827,7 +2833,7 @@ $.fn.dropdown = function(parameters) {
return (settings.maxSelections && module.get.selectionCount() >= settings.maxSelections); return (settings.maxSelections && module.get.selectionCount() >= settings.maxSelections);
}, },
allResultsFiltered: function() { allResultsFiltered: function() {
let var
$normalResults = $item.not(selector.addition) $normalResults = $item.not(selector.addition)
; ;
return ($normalResults.filter(selector.unselectable).length === $normalResults.length); return ($normalResults.filter(selector.unselectable).length === $normalResults.length);

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

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

1
dist/components/header.css

@ -259,6 +259,7 @@ h5.ui.header .sub.header {
} }
.ui.icon.header .content { .ui.icon.header .content {
display: block; display: block;
padding: 0em;
} }
.ui.icon.header .circular.icon { .ui.icon.header .circular.icon {
font-size: 2em; font-size: 2em;

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

3
dist/components/input.css

@ -81,7 +81,8 @@
.ui.input input[disabled] { .ui.input input[disabled] {
opacity: 0.45; opacity: 0.45;
} }
.ui.disabled.input input { .ui.disabled.input input,
.ui.input input[disabled] {
pointer-events: none; pointer-events: none;
} }

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

1
dist/components/search.css

@ -59,6 +59,7 @@
-webkit-transform-origin: center top; -webkit-transform-origin: center top;
-ms-transform-origin: center top; -ms-transform-origin: center top;
transform-origin: center top; transform-origin: center top;
white-space: normal;
background: #FFFFFF; background: #FFFFFF;
margin-top: 0.5em; margin-top: 0.5em;
width: 18em; width: 18em;

40
dist/components/search.js

@ -793,12 +793,15 @@ $.fn.search = function(parameters) {
return false; return false;
} }
} }
$results if(html) {
.html(html) $results
; .html(html)
if( module.can.show() ) { ;
module.showResults(); module.showResults();
} }
else {
module.hideResults();
}
}, },
showResults: function() { showResults: function() {
@ -876,7 +879,7 @@ $.fn.search = function(parameters) {
module.error(error.noTemplate, false); module.error(error.noTemplate, false);
} }
} }
else { else if(settings.showNoResults) {
html = module.displayMessage(error.noResults, 'empty'); html = module.displayMessage(error.noResults, 'empty');
} }
settings.onResults.call(element, response); settings.onResults.call(element, response);
@ -1080,44 +1083,47 @@ $.fn.search.settings = {
verbose : false, verbose : false,
performance : true, performance : true,
type : 'standard',
// template to use (specified in settings.templates) // template to use (specified in settings.templates)
type : 'standard',
minCharacters : 1,
// minimum characters required to search // minimum characters required to search
minCharacters : 1,
apiSettings : false,
// API config // API config
apiSettings : false,
source : false,
// object to search // object to search
source : false,
// fields to search
searchFields : [ searchFields : [
'title', 'title',
'description' 'description'
], ],
// fields to search
displayField : '',
// field to display in standard results template // field to display in standard results template
displayField : '',
searchFullText : true,
// whether to include fuzzy results in local search // whether to include fuzzy results in local search
searchFullText : true,
automatic : true,
// whether to add events to prompt automatically // whether to add events to prompt automatically
automatic : true,
hideDelay : 0,
// delay before hiding menu after blur // delay before hiding menu after blur
hideDelay : 0,
searchDelay : 200,
// delay before searching // delay before searching
searchDelay : 200,
maxResults : 7,
// maximum results returned from local // maximum results returned from local
maxResults : 7,
cache : true,
// whether to store lookups in local cache // whether to store lookups in local cache
cache : true,
// whether no results errors should be shown
showNoResults : true,
// transition settings // transition settings
transition : 'scale', transition : 'scale',

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

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

13
dist/semantic.css

@ -6467,6 +6467,7 @@ h5.ui.header .sub.header {
.ui.icon.header .content { .ui.icon.header .content {
display: block; display: block;
padding: 0em;
} }
.ui.icon.header .circular.icon { .ui.icon.header .circular.icon {
@ -11262,7 +11263,8 @@ img.ui.bordered.image {
opacity: 0.45; opacity: 0.45;
} }
.ui.disabled.input input { .ui.disabled.input input,
.ui.input input[disabled] {
pointer-events: none; pointer-events: none;
} }
@ -28021,7 +28023,7 @@ a.ui.card:hover,
.ui.disabled.checkbox label, .ui.disabled.checkbox label,
.ui.checkbox input[disabled] ~ .box:after, .ui.checkbox input[disabled] ~ .box:after,
.ui.checkbox input[disabled] ~ label { .ui.checkbox input[disabled] ~ label {
cursor: default; cursor: default !important;
opacity: 0.5; opacity: 0.5;
color: #000000; color: #000000;
} }
@ -29372,7 +29374,7 @@ select.ui.dropdown {
padding: 0; padding: 0;
max-width: 100%; max-width: 100%;
margin: 0.45240952em 0em 0.45240952em 0.78571429em; margin: 0.45240952em 0em 0.45240952em 0.78571429em;
line-height: 1.2142em; line-height: 1.21428571em;
} }
.ui.multiple.dropdown > .label ~ input.search { .ui.multiple.dropdown > .label ~ input.search {
@ -29396,7 +29398,7 @@ select.ui.dropdown {
left: 0; left: 0;
padding: inherit; padding: inherit;
margin: 0.45240952em 0em 0.45240952em 0.78571429em; margin: 0.45240952em 0em 0.45240952em 0.78571429em;
line-height: 1.2142em; line-height: 1.21428571em;
} }
.ui.multiple.search.dropdown > .label ~ .text { .ui.multiple.search.dropdown > .label ~ .text {
@ -29411,7 +29413,7 @@ select.ui.dropdown {
max-width: 100%; max-width: 100%;
margin: 0.45240952em 0em 0.45240952em 0.78571429em; margin: 0.45240952em 0em 0.45240952em 0.78571429em;
width: 2.2em; width: 2.2em;
line-height: 1.2142em; line-height: 1.21428571em;
} }
/*-------------- /*--------------
@ -32427,6 +32429,7 @@ a.ui.nag {
-webkit-transform-origin: center top; -webkit-transform-origin: center top;
-ms-transform-origin: center top; -ms-transform-origin: center top;
transform-origin: center top; transform-origin: center top;
white-space: normal;
background: #FFFFFF; background: #FFFFFF;
margin-top: 0.5em; margin-top: 0.5em;
width: 18em; width: 18em;

104
dist/semantic.js

@ -4613,12 +4613,12 @@ $.fn.dropdown = function(parameters) {
; ;
if( module.can.show() && !module.is.active() ) { if( module.can.show() && !module.is.active() ) {
module.debug('Showing dropdown'); module.debug('Showing dropdown');
if(module.is.multiple() && !module.has.search() && module.is.allFiltered()) {
return true;
}
if(module.has.message() && !(module.has.maxSelections() || module.has.allResultsFiltered()) ) { if(module.has.message() && !(module.has.maxSelections() || module.has.allResultsFiltered()) ) {
module.remove.message(); module.remove.message();
} }
if(module.is.allFiltered()) {
return true;
}
if(settings.onShow.call(element) !== false) { if(settings.onShow.call(element) !== false) {
module.animate.show(function() { module.animate.show(function() {
if( module.can.click() ) { if( module.can.click() ) {
@ -4990,9 +4990,16 @@ $.fn.dropdown = function(parameters) {
} }
}, },
focusSearch: function() { focusSearch: function(skipHandler) {
if( module.is.search() && !module.is.focusedOnSearch() ) { if( module.is.search() && !module.is.focusedOnSearch() ) {
$search[0].focus(); if(skipHandler) {
$module.off('focus' + eventNamespace, selector.search);
$search.focus();
$module.on('focus' + eventNamespace, selector.search, module.event.search.focus)
}
else {
$search.focus();
}
} }
}, },
@ -5008,11 +5015,17 @@ $.fn.dropdown = function(parameters) {
if( module.has.query() ) { if( module.has.query() ) {
if(hasSelected) { if(hasSelected) {
module.debug('Forcing partial selection to selected item', $selectedItem); module.debug('Forcing partial selection to selected item', $selectedItem);
module.event.item.click.call($selectedItem); module.event.item.click.call($selectedItem, {}, true);
return; return;
} }
else { else {
module.remove.searchTerm(); if(settings.allowAdditions) {
module.set.selected(module.get.query());
module.remove.searchTerm();
}
else {
module.remove.searchTerm();
}
} }
} }
module.hide(); module.hide();
@ -5084,11 +5097,7 @@ $.fn.dropdown = function(parameters) {
pageLostFocus = (document.activeElement === this); pageLostFocus = (document.activeElement === this);
if(!willRefocus) { if(!willRefocus) {
if(!itemActivated && !pageLostFocus) { if(!itemActivated && !pageLostFocus) {
if(module.is.multiple()) { if(settings.forceSelection) {
module.remove.activeLabel();
module.hide();
}
else if(settings.forceSelection) {
module.forceSelection(); module.forceSelection();
} }
else { else {
@ -5234,7 +5243,7 @@ $.fn.dropdown = function(parameters) {
}, settings.delay.hide); }, settings.delay.hide);
} }
}, },
click: function (event) { click: function (event, skipRefocus) {
var var
$choice = $(this), $choice = $(this),
$target = (event) $target = (event)
@ -5252,8 +5261,8 @@ $.fn.dropdown = function(parameters) {
module.remove.userAddition(); module.remove.userAddition();
} }
module.remove.searchTerm(); module.remove.searchTerm();
if(!module.is.focusedOnSearch()) { if(!module.is.focusedOnSearch() && !(skipRefocus == true)) {
module.focusSearch(); module.focusSearch(true);
} }
} }
if(!settings.useLabels) { if(!settings.useLabels) {
@ -5602,7 +5611,7 @@ $.fn.dropdown = function(parameters) {
var var
$target = $(event.target), $target = $(event.target),
$label = $target.closest(selector.siblingLabel), $label = $target.closest(selector.siblingLabel),
inVisibleDOM = document.contains(event.target), inVisibleDOM = document.body.contains(event.target),
notOnLabel = ($module.find($label).length === 0), notOnLabel = ($module.find($label).length === 0),
notInMenu = ($target.closest($menu).length === 0) notInMenu = ($target.closest($menu).length === 0)
; ;
@ -5781,16 +5790,17 @@ $.fn.dropdown = function(parameters) {
if(typeof values == 'string') { if(typeof values == 'string') {
values = [values]; values = [values];
} }
remoteValues = {};
$.each(values, function(index, value) { $.each(values, function(index, value) {
var var
name = module.read.remoteData(value) name = module.read.remoteData(value)
; ;
module.verbose('Restoring value from session data', name, value); module.verbose('Restoring value from session data', name, value);
remoteValues[value] = (name) if(name) {
? name if(!remoteValues) {
: value remoteValues = {};
; }
remoteValues[value] = name;
}
}); });
} }
return remoteValues; return remoteValues;
@ -6067,13 +6077,8 @@ $.fn.dropdown = function(parameters) {
values: function() { values: function() {
// prevents callbacks from occuring on initial load // prevents callbacks from occuring on initial load
module.set.initialLoad(); module.set.initialLoad();
if(settings.apiSettings) { if(settings.apiSettings && settings.saveRemoteData && module.get.remoteValues()) {
if(settings.saveRemoteData) { module.restore.remoteValues();
module.restore.remoteValues();
}
else {
module.clearValue();
}
} }
else { else {
module.set.selected(); module.set.selected();
@ -6930,6 +6935,7 @@ $.fn.dropdown = function(parameters) {
module.debug('Label remove callback cancelled removal'); module.debug('Label remove callback cancelled removal');
return; return;
} }
module.remove.message();
if(isUserValue) { if(isUserValue) {
module.remove.value(stringValue); module.remove.value(stringValue);
module.remove.label(stringValue); module.remove.label(stringValue);
@ -7006,7 +7012,7 @@ $.fn.dropdown = function(parameters) {
return (settings.maxSelections && module.get.selectionCount() >= settings.maxSelections); return (settings.maxSelections && module.get.selectionCount() >= settings.maxSelections);
}, },
allResultsFiltered: function() { allResultsFiltered: function() {
let var
$normalResults = $item.not(selector.addition) $normalResults = $item.not(selector.addition)
; ;
return ($normalResults.filter(selector.unselectable).length === $normalResults.length); return ($normalResults.filter(selector.unselectable).length === $normalResults.length);
@ -13506,12 +13512,15 @@ $.fn.search = function(parameters) {
return false; return false;
} }
} }
$results if(html) {
.html(html) $results
; .html(html)
if( module.can.show() ) { ;
module.showResults(); module.showResults();
} }
else {
module.hideResults();
}
}, },
showResults: function() { showResults: function() {
@ -13589,7 +13598,7 @@ $.fn.search = function(parameters) {
module.error(error.noTemplate, false); module.error(error.noTemplate, false);
} }
} }
else { else if(settings.showNoResults) {
html = module.displayMessage(error.noResults, 'empty'); html = module.displayMessage(error.noResults, 'empty');
} }
settings.onResults.call(element, response); settings.onResults.call(element, response);
@ -13793,44 +13802,47 @@ $.fn.search.settings = {
verbose : false, verbose : false,
performance : true, performance : true,
type : 'standard',
// template to use (specified in settings.templates) // template to use (specified in settings.templates)
type : 'standard',
minCharacters : 1,
// minimum characters required to search // minimum characters required to search
minCharacters : 1,
apiSettings : false,
// API config // API config
apiSettings : false,
source : false,
// object to search // object to search
source : false,
// fields to search
searchFields : [ searchFields : [
'title', 'title',
'description' 'description'
], ],
// fields to search
displayField : '',
// field to display in standard results template // field to display in standard results template
displayField : '',
searchFullText : true,
// whether to include fuzzy results in local search // whether to include fuzzy results in local search
searchFullText : true,
automatic : true,
// whether to add events to prompt automatically // whether to add events to prompt automatically
automatic : true,
hideDelay : 0,
// delay before hiding menu after blur // delay before hiding menu after blur
hideDelay : 0,
searchDelay : 200,
// delay before searching // delay before searching
searchDelay : 200,
maxResults : 7,
// maximum results returned from local // maximum results returned from local
maxResults : 7,
cache : true,
// whether to store lookups in local cache // whether to store lookups in local cache
cache : true,
// whether no results errors should be shown
showNoResults : true,
// transition settings // transition settings
transition : 'scale', transition : 'scale',

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

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

|||||||
100:0
Loading…
Cancel
Save