Browse Source

Merge branch 'next' of github.com:Semantic-Org/Semantic-UI into next

pull/3975/head
Jack Lukic 9 years ago
parent
commit
1cb1099484
7 changed files with 26 additions and 22 deletions
  1. 1
      RELEASE-NOTES.md
  2. 7
      src/definitions/behaviors/form.js
  3. 12
      src/definitions/collections/form.less
  4. 16
      src/definitions/elements/input.less
  5. 5
      src/definitions/modules/dropdown.js
  6. 5
      src/definitions/modules/popup.js
  7. 2
      src/definitions/modules/progress.js

1
RELEASE-NOTES.md

@ -8,6 +8,7 @@
- **Popup** - Added new settings `autoRemove`, which is enabled by default. This will add special event listeners to auto hide a popup if the triggering element is removed from the DOM. This is useful in controlled DOM environments like Meteor/Ember/React to ensure a popup auto-hides itself when a page navigation or other DOM change occurs that may not trigger `mouseout`.
- **Dropdown** - Multiple select dropdown now sizes current dropdown input based on rendered width of a hidden element, not using an estimate based on character count. This means search will never break to a second line earlier than would normally fit in current line.
- **Dropdown** - Added new setting for search selection `hideAdditions` this will remove showing user additions inside the menu, making for a more intuitive adding process. Dropdowns now have a new state `empty` which will format an active dropdown with empty results. #3791
- **Dropdown** - Adds new `allowReselection` option to trigger `onChange` events even when reselecting same value ***NEEEDS DOCUMENTATION***
- **All UI** - All UI now include _all_ sizing variations, `mini`, `tiny`, `small`, `large`, `big`, `huge`, `massive`. Headers remain with only 5 sizes `small-huge` to match `H1-H5`
- **Icons** - Icons now use the latest Font Awesome `4.5.0` Icons. 50+ new icons+ are included. Thanks @BreadMaker for the PR and @davegandy for the font!
- **Progress** - Progress now uses a polling interval for updates. Rapidly updating the progress bar over a period quicker than the animation duration (for example with xhr `onprogress` events say every 50ms) will now appear smooth as butter.

7
src/definitions/behaviors/form.js

@ -1066,7 +1066,7 @@ $.fn.form.settings = {
regExp: {
bracket : /\[(.*)\]/i,
decimal : /^\d*(\.)\d+/,
email : /.+@.+\..+/i,
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+$/,
@ -1174,10 +1174,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

12
src/definitions/collections/form.less

@ -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;

16
src/definitions/elements/input.less

@ -69,7 +69,7 @@
.ui.input input::-moz-placeholder {
color: @placeholderColor;
}
.ui.input input::-ms-input-placeholder {
.ui.input input:-ms-input-placeholder {
color: @placeholderColor;
}
@ -163,8 +163,8 @@
.ui.input input:focus::-moz-placeholder {
color: @placeholderFocusColor;
}
.ui.input.focus input::-ms-input-placeholder,
.ui.input input:focus::-ms-input-placeholder {
.ui.input.focus input:-ms-input-placeholder,
.ui.input input:focus:-ms-input-placeholder {
color: @placeholderFocusColor;
}
@ -188,8 +188,8 @@
.ui.input.error input::-moz-placeholder {
color: @placeholderErrorColor;
}
.ui.input.error input::-ms-input-placeholder {
color: @placeholderErrorColor;
.ui.input.error input:-ms-input-placeholder {
color: @placeholderErrorColor !important;
}
/* Focused Error Placeholder */
@ -199,8 +199,8 @@
.ui.input.error input:focus::-moz-placeholder {
color: @placeholderErrorFocusColor;
}
.ui.input.error input:focus::-ms-input-placeholder {
color: @placeholderErrorFocusColor;
.ui.input.error input:focus:-ms-input-placeholder {
color: @placeholderErrorFocusColor !important;
}
/*******************************
@ -246,7 +246,7 @@
.ui.transparent.inverted.input input::-moz-placeholder {
color: @transparentInvertedPlaceholderColor;
}
.ui.transparent.inverted.input input::-ms-input-placeholder {
.ui.transparent.inverted.input input:-ms-input-placeholder {
color: @transparentInvertedPlaceholderColor;
}

5
src/definitions/modules/dropdown.js

@ -2285,7 +2285,7 @@ $.fn.dropdown = function(parameters) {
newValue
;
if(hasInput) {
if(stringValue == currentValue) {
if(settings.allowReselection && stringValue == currentValue) {
module.verbose('Skipping value update already same value', value, currentValue);
if(!module.is.initialLoad()) {
return;
@ -3185,7 +3185,7 @@ $.fn.dropdown = function(parameters) {
escape: {
value: function(value) {
let
var
multipleValues = $.isArray(value),
stringValue = (typeof value === 'string'),
isUnparsable = (!stringValue && !multipleValues),
@ -3430,6 +3430,7 @@ $.fn.dropdown.settings = {
delimiter : ',', // when multiselect uses normal <input> the values will be delimited with this character
showOnFocus : true, // show menu on focus
allowReselection : false, // whether current value should trigger callbacks when reselected
allowTab : true, // add tabindex to element
allowCategorySelection : false, // allow elements with sub-menus to be selected

5
src/definitions/modules/popup.js

@ -191,6 +191,11 @@ $.fn.popup = function(parameters) {
}
},
hideGracefully: function(event) {
var
$target = $(event.target),
isInDOM = $.contains(document.documentElement, event.target),
inPopup = ($target.closest(selector.popup).length > 0)
;
// don't close on clicks inside popup
if(event && $(event.target).closest(selector.popup).length === 0) {
module.debug('Click occurred outside popup hiding popup');

2
src/definitions/modules/progress.js

@ -601,7 +601,7 @@ $.fn.progress = function(parameters) {
update: {
toNextValue: function() {
let
var
nextValue = module.nextValue
;
if(nextValue) {

Loading…
Cancel
Save