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.checkbox input[disabled] ~ .box:after,
.ui.checkbox input[disabled] ~ label {
cursor: default;
cursor: default !important;
opacity: 0.5;
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;
max-width: 100%;
margin: 0.45240952em 0em 0.45240952em 0.78571429em;
line-height: 1.2142em;
line-height: 1.21428571em;
}
.ui.multiple.dropdown > .label ~ input.search {
margin-left: 0.14285714em !important;
@ -683,7 +683,7 @@ select.ui.dropdown {
left: 0;
padding: inherit;
margin: 0.45240952em 0em 0.45240952em 0.78571429em;
line-height: 1.2142em;
line-height: 1.21428571em;
}
.ui.multiple.search.dropdown > .label ~ .text {
display: none;
@ -696,7 +696,7 @@ select.ui.dropdown {
max-width: 100%;
margin: 0.45240952em 0em 0.45240952em 0.78571429em;
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() ) {
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()) ) {
module.remove.message();
}
if(module.is.allFiltered()) {
return true;
}
if(settings.onShow.call(element) !== false) {
module.animate.show(function() {
if( module.can.click() ) {
@ -811,9 +811,16 @@ $.fn.dropdown = function(parameters) {
}
},
focusSearch: function() {
focusSearch: function(skipHandler) {
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(hasSelected) {
module.debug('Forcing partial selection to selected item', $selectedItem);
module.event.item.click.call($selectedItem);
module.event.item.click.call($selectedItem, {}, true);
return;
}
else {
module.remove.searchTerm();
if(settings.allowAdditions) {
module.set.selected(module.get.query());
module.remove.searchTerm();
}
else {
module.remove.searchTerm();
}
}
}
module.hide();
@ -905,11 +918,7 @@ $.fn.dropdown = function(parameters) {
pageLostFocus = (document.activeElement === this);
if(!willRefocus) {
if(!itemActivated && !pageLostFocus) {
if(module.is.multiple()) {
module.remove.activeLabel();
module.hide();
}
else if(settings.forceSelection) {
if(settings.forceSelection) {
module.forceSelection();
}
else {
@ -1055,7 +1064,7 @@ $.fn.dropdown = function(parameters) {
}, settings.delay.hide);
}
},
click: function (event) {
click: function (event, skipRefocus) {
var
$choice = $(this),
$target = (event)
@ -1073,8 +1082,8 @@ $.fn.dropdown = function(parameters) {
module.remove.userAddition();
}
module.remove.searchTerm();
if(!module.is.focusedOnSearch()) {
module.focusSearch();
if(!module.is.focusedOnSearch() && !(skipRefocus == true)) {
module.focusSearch(true);
}
}
if(!settings.useLabels) {
@ -1423,7 +1432,7 @@ $.fn.dropdown = function(parameters) {
var
$target = $(event.target),
$label = $target.closest(selector.siblingLabel),
inVisibleDOM = document.contains(event.target),
inVisibleDOM = document.body.contains(event.target),
notOnLabel = ($module.find($label).length === 0),
notInMenu = ($target.closest($menu).length === 0)
;
@ -1602,16 +1611,17 @@ $.fn.dropdown = function(parameters) {
if(typeof values == 'string') {
values = [values];
}
remoteValues = {};
$.each(values, function(index, value) {
var
name = module.read.remoteData(value)
;
module.verbose('Restoring value from session data', name, value);
remoteValues[value] = (name)
? name
: value
;
if(name) {
if(!remoteValues) {
remoteValues = {};
}
remoteValues[value] = name;
}
});
}
return remoteValues;
@ -1888,13 +1898,8 @@ $.fn.dropdown = function(parameters) {
values: function() {
// prevents callbacks from occuring on initial load
module.set.initialLoad();
if(settings.apiSettings) {
if(settings.saveRemoteData) {
module.restore.remoteValues();
}
else {
module.clearValue();
}
if(settings.apiSettings && settings.saveRemoteData && module.get.remoteValues()) {
module.restore.remoteValues();
}
else {
module.set.selected();
@ -2751,6 +2756,7 @@ $.fn.dropdown = function(parameters) {
module.debug('Label remove callback cancelled removal');
return;
}
module.remove.message();
if(isUserValue) {
module.remove.value(stringValue);
module.remove.label(stringValue);
@ -2827,7 +2833,7 @@ $.fn.dropdown = function(parameters) {
return (settings.maxSelections && module.get.selectionCount() >= settings.maxSelections);
},
allResultsFiltered: function() {
let
var
$normalResults = $item.not(selector.addition)
;
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 {
display: block;
padding: 0em;
}
.ui.icon.header .circular.icon {
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] {
opacity: 0.45;
}
.ui.disabled.input input {
.ui.disabled.input input,
.ui.input input[disabled] {
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;
-ms-transform-origin: center top;
transform-origin: center top;
white-space: normal;
background: #FFFFFF;
margin-top: 0.5em;
width: 18em;

40
dist/components/search.js

@ -793,12 +793,15 @@ $.fn.search = function(parameters) {
return false;
}
}
$results
.html(html)
;
if( module.can.show() ) {
if(html) {
$results
.html(html)
;
module.showResults();
}
else {
module.hideResults();
}
},
showResults: function() {
@ -876,7 +879,7 @@ $.fn.search = function(parameters) {
module.error(error.noTemplate, false);
}
}
else {
else if(settings.showNoResults) {
html = module.displayMessage(error.noResults, 'empty');
}
settings.onResults.call(element, response);
@ -1080,44 +1083,47 @@ $.fn.search.settings = {
verbose : false,
performance : true,
type : 'standard',
// template to use (specified in settings.templates)
type : 'standard',
minCharacters : 1,
// minimum characters required to search
minCharacters : 1,
apiSettings : false,
// API config
apiSettings : false,
source : false,
// object to search
source : false,
// fields to search
searchFields : [
'title',
'description'
],
// fields to search
displayField : '',
// field to display in standard results template
displayField : '',
searchFullText : true,
// whether to include fuzzy results in local search
searchFullText : true,
automatic : true,
// whether to add events to prompt automatically
automatic : true,
hideDelay : 0,
// delay before hiding menu after blur
hideDelay : 0,
searchDelay : 200,
// delay before searching
searchDelay : 200,
maxResults : 7,
// maximum results returned from local
maxResults : 7,
cache : true,
// whether to store lookups in local cache
cache : true,
// whether no results errors should be shown
showNoResults : true,
// transition settings
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 {
display: block;
padding: 0em;
}
.ui.icon.header .circular.icon {
@ -11262,7 +11263,8 @@ img.ui.bordered.image {
opacity: 0.45;
}
.ui.disabled.input input {
.ui.disabled.input input,
.ui.input input[disabled] {
pointer-events: none;
}
@ -28021,7 +28023,7 @@ a.ui.card:hover,
.ui.disabled.checkbox label,
.ui.checkbox input[disabled] ~ .box:after,
.ui.checkbox input[disabled] ~ label {
cursor: default;
cursor: default !important;
opacity: 0.5;
color: #000000;
}
@ -29372,7 +29374,7 @@ select.ui.dropdown {
padding: 0;
max-width: 100%;
margin: 0.45240952em 0em 0.45240952em 0.78571429em;
line-height: 1.2142em;
line-height: 1.21428571em;
}
.ui.multiple.dropdown > .label ~ input.search {
@ -29396,7 +29398,7 @@ select.ui.dropdown {
left: 0;
padding: inherit;
margin: 0.45240952em 0em 0.45240952em 0.78571429em;
line-height: 1.2142em;
line-height: 1.21428571em;
}
.ui.multiple.search.dropdown > .label ~ .text {
@ -29411,7 +29413,7 @@ select.ui.dropdown {
max-width: 100%;
margin: 0.45240952em 0em 0.45240952em 0.78571429em;
width: 2.2em;
line-height: 1.2142em;
line-height: 1.21428571em;
}
/*--------------
@ -32427,6 +32429,7 @@ a.ui.nag {
-webkit-transform-origin: center top;
-ms-transform-origin: center top;
transform-origin: center top;
white-space: normal;
background: #FFFFFF;
margin-top: 0.5em;
width: 18em;

104
dist/semantic.js

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

Loading…
Cancel
Save