Browse Source

Build next ver

pull/4273/merge
Jack 7 years ago
parent
commit
15160d6229
28 changed files with 114 additions and 225 deletions
  1. 9
      dist/components/accordion.min.js
  2. 9
      dist/components/api.min.js
  3. 9
      dist/components/checkbox.min.js
  4. 9
      dist/components/dimmer.min.js
  5. 4
      dist/components/dropdown.css
  6. 59
      dist/components/dropdown.js
  7. 2
      dist/components/dropdown.min.css
  8. 13
      dist/components/dropdown.min.js
  9. 9
      dist/components/embed.min.js
  10. 9
      dist/components/form.min.js
  11. 9
      dist/components/modal.min.js
  12. 9
      dist/components/nag.min.js
  13. 9
      dist/components/popup.min.js
  14. 9
      dist/components/progress.min.js
  15. 9
      dist/components/rating.min.js
  16. 9
      dist/components/search.min.js
  17. 9
      dist/components/shape.min.js
  18. 9
      dist/components/sidebar.min.js
  19. 9
      dist/components/site.min.js
  20. 9
      dist/components/state.min.js
  21. 9
      dist/components/sticky.min.js
  22. 9
      dist/components/tab.min.js
  23. 9
      dist/components/transition.min.js
  24. 9
      dist/components/visibility.min.js
  25. 4
      dist/semantic.css
  26. 59
      dist/semantic.js
  27. 2
      dist/semantic.min.css
  28. 16
      dist/semantic.min.js

9
dist/components/accordion.min.js
File diff suppressed because it is too large
View File

9
dist/components/api.min.js
File diff suppressed because it is too large
View File

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

9
dist/components/dimmer.min.js
File diff suppressed because it is too large
View File

4
dist/components/dropdown.css

@ -834,8 +834,8 @@ select.ui.dropdown {
.ui.default.dropdown:not(.button) > .text {
color: rgba(191, 191, 191, 0.87);
}
.ui.dropdown:not(.button) > input:focus + .default.text,
.ui.default.dropdown:not(.button) > input:focus + .text {
.ui.dropdown:not(.button) > input:focus ~ .default.text,
.ui.default.dropdown:not(.button) > input:focus ~ .text {
color: rgba(115, 115, 115, 0.87);
}

59
dist/components/dropdown.js

@ -97,7 +97,13 @@ $.fn.dropdown = function(parameters) {
module.setup.reference();
}
else {
module.setup.layout();
if(settings.values) {
module.change.values(settings.values);
}
module.refreshData();
module.save.defaults();
@ -162,7 +168,7 @@ $.fn.dropdown = function(parameters) {
observe: {
select: function() {
if(module.has.input()) {
selectObserver.observe($input[0], {
selectObserver.observe($module[0], {
childList : true,
subtree : true
});
@ -383,19 +389,16 @@ $.fn.dropdown = function(parameters) {
reference: function() {
module.debug('Dropdown behavior was called on select, replacing with closest dropdown');
// replace module reference
$module = $module.parent(selector.dropdown);
$module = $module.parent(selector.dropdown);
instance = $module.data(moduleNamespace);
element = $module.get(0);
module.refresh();
module.setup.returnedObject();
// invoke method in context of current instance
if(methodInvoked) {
instance = module;
module.invoke(query);
}
},
returnedObject: function() {
var
$firstModules = $allModules.slice(0, elementIndex),
$lastModules = $allModules.slice(elementIndex + 1)
$lastModules = $allModules.slice(elementIndex + 1)
;
// adjust all modules to use correct reference
$allModules = $firstModules.add($module).add($lastModules);
@ -913,6 +916,23 @@ $.fn.dropdown = function(parameters) {
}
},
change: {
values: function(values) {
if(!settings.allowAdditions) {
module.clear();
}
module.debug('Creating dropdown with specified values', values);
module.setup.menu({values: values});
$.each(values, function(index, item) {
if(item.selected == true) {
module.debug('Setting initial selection to', item.value);
module.set.selected(item.value);
return true;
}
});
}
},
event: {
change: function() {
if(!internalChange) {
@ -1081,7 +1101,22 @@ $.fn.dropdown = function(parameters) {
select: {
mutation: function(mutations) {
module.debug('<select> modified, recreating menu');
module.setup.select();
var
isSelectMutation = false
;
$.each(mutations, function(index, mutation) {
if($(mutation.target).is('select') || $(mutation.addedNodes).is('select')) {
isSelectMutation = true;
return true;
}
});
if(isSelectMutation) {
module.disconnect.selectObserver();
module.refresh();
module.setup.select();
module.set.selected();
module.observe.select();
}
}
},
menu: {
@ -1619,6 +1654,9 @@ $.fn.dropdown = function(parameters) {
return $module.data(metadata.defaultValue);
},
placeholderText: function() {
if(settings.placeholder != 'auto' && typeof settings.placeholder == 'string') {
return settings.placeholder;
}
return $module.data(metadata.placeholderText) || '';
},
text: function() {
@ -3044,7 +3082,7 @@ $.fn.dropdown = function(parameters) {
return $(event.target).closest($icon).length > 0;
},
alreadySetup: function() {
return ($module.is('select') && $module.parent(selector.dropdown).length > 0 && $module.prev().length === 0);
return ($module.is('select') && $module.parent(selector.dropdown).data(moduleNamespace) !== undefined && $module.prev().length === 0);
},
animating: function($subMenu) {
return ($subMenu)
@ -3594,6 +3632,7 @@ $.fn.dropdown.settings = {
on : 'click', // what event should show menu action on item selection
action : 'activate', // action on item selection (nothing, activate, select, combo, hide, function(){})
values : false, // specify values to use for dropdown
apiSettings : false,
selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used

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

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

9
dist/components/embed.min.js
File diff suppressed because it is too large
View File

9
dist/components/form.min.js
File diff suppressed because it is too large
View File

9
dist/components/modal.min.js
File diff suppressed because it is too large
View File

9
dist/components/nag.min.js
File diff suppressed because it is too large
View File

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

9
dist/components/progress.min.js
File diff suppressed because it is too large
View File

9
dist/components/rating.min.js
File diff suppressed because it is too large
View File

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

9
dist/components/shape.min.js
File diff suppressed because it is too large
View File

9
dist/components/sidebar.min.js
File diff suppressed because it is too large
View File

9
dist/components/site.min.js
File diff suppressed because it is too large
View File

9
dist/components/state.min.js
File diff suppressed because it is too large
View File

9
dist/components/sticky.min.js
File diff suppressed because it is too large
View File

9
dist/components/tab.min.js
File diff suppressed because it is too large
View File

9
dist/components/transition.min.js
File diff suppressed because it is too large
View File

9
dist/components/visibility.min.js
File diff suppressed because it is too large
View File

4
dist/semantic.css

@ -30109,8 +30109,8 @@ select.ui.dropdown {
color: rgba(191, 191, 191, 0.87);
}
.ui.dropdown:not(.button) > input:focus + .default.text,
.ui.default.dropdown:not(.button) > input:focus + .text {
.ui.dropdown:not(.button) > input:focus ~ .default.text,
.ui.default.dropdown:not(.button) > input:focus ~ .text {
color: rgba(115, 115, 115, 0.87);
}

59
dist/semantic.js

@ -4454,7 +4454,13 @@ $.fn.dropdown = function(parameters) {
module.setup.reference();
}
else {
module.setup.layout();
if(settings.values) {
module.change.values(settings.values);
}
module.refreshData();
module.save.defaults();
@ -4519,7 +4525,7 @@ $.fn.dropdown = function(parameters) {
observe: {
select: function() {
if(module.has.input()) {
selectObserver.observe($input[0], {
selectObserver.observe($module[0], {
childList : true,
subtree : true
});
@ -4740,19 +4746,16 @@ $.fn.dropdown = function(parameters) {
reference: function() {
module.debug('Dropdown behavior was called on select, replacing with closest dropdown');
// replace module reference
$module = $module.parent(selector.dropdown);
$module = $module.parent(selector.dropdown);
instance = $module.data(moduleNamespace);
element = $module.get(0);
module.refresh();
module.setup.returnedObject();
// invoke method in context of current instance
if(methodInvoked) {
instance = module;
module.invoke(query);
}
},
returnedObject: function() {
var
$firstModules = $allModules.slice(0, elementIndex),
$lastModules = $allModules.slice(elementIndex + 1)
$lastModules = $allModules.slice(elementIndex + 1)
;
// adjust all modules to use correct reference
$allModules = $firstModules.add($module).add($lastModules);
@ -5270,6 +5273,23 @@ $.fn.dropdown = function(parameters) {
}
},
change: {
values: function(values) {
if(!settings.allowAdditions) {
module.clear();
}
module.debug('Creating dropdown with specified values', values);
module.setup.menu({values: values});
$.each(values, function(index, item) {
if(item.selected == true) {
module.debug('Setting initial selection to', item.value);
module.set.selected(item.value);
return true;
}
});
}
},
event: {
change: function() {
if(!internalChange) {
@ -5438,7 +5458,22 @@ $.fn.dropdown = function(parameters) {
select: {
mutation: function(mutations) {
module.debug('<select> modified, recreating menu');
module.setup.select();
var
isSelectMutation = false
;
$.each(mutations, function(index, mutation) {
if($(mutation.target).is('select') || $(mutation.addedNodes).is('select')) {
isSelectMutation = true;
return true;
}
});
if(isSelectMutation) {
module.disconnect.selectObserver();
module.refresh();
module.setup.select();
module.set.selected();
module.observe.select();
}
}
},
menu: {
@ -5976,6 +6011,9 @@ $.fn.dropdown = function(parameters) {
return $module.data(metadata.defaultValue);
},
placeholderText: function() {
if(settings.placeholder != 'auto' && typeof settings.placeholder == 'string') {
return settings.placeholder;
}
return $module.data(metadata.placeholderText) || '';
},
text: function() {
@ -7401,7 +7439,7 @@ $.fn.dropdown = function(parameters) {
return $(event.target).closest($icon).length > 0;
},
alreadySetup: function() {
return ($module.is('select') && $module.parent(selector.dropdown).length > 0 && $module.prev().length === 0);
return ($module.is('select') && $module.parent(selector.dropdown).data(moduleNamespace) !== undefined && $module.prev().length === 0);
},
animating: function($subMenu) {
return ($subMenu)
@ -7951,6 +7989,7 @@ $.fn.dropdown.settings = {
on : 'click', // what event should show menu action on item selection
action : 'activate', // action on item selection (nothing, activate, select, combo, hide, function(){})
values : false, // specify values to use for dropdown
apiSettings : false,
selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used

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