diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 73e444722..ace7d8d39 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,5 +1,25 @@ ## RELEASE NOTES +### Version 2.0.3 - July 8, 2015 + +**Docs Updates** +- **Examples** - Source code examples have been greatly improved. Required class names for each example will be highlighted in yellow. Other UI elements used in examples will now link out to their respective by clicking on their respective html. + +**[Reported Bugs](https://github.com/Semantic-Org/Semantic-UI/issues?q=is%3Aissue+milestone%3A2.0.3+is%3Aclosed)** +- **Checkbox** - Checkbox initialized with JS and with `for/id` matching would cause toggle to occur twice on click (making it seem as if nothing was updated) **thanks @malacalypse** #2572 +- **Steps** - Last `step` no longer incorrectly shows arrow #2552 +- **Steps** - Fixed `github` theme for steps not displaying correctly in 2.0 #2545 +- **Modal** - Modal that is larger than page height will now correctly reset body height on remove #2576 +- **Popup** - Popup `preserve` setting (which preserves popup in DOM to avoid regenerating on each show/hide) was set to `true` by default causing generated popups to remain in DOM. #1369 +- **Input** - Fixed errored input field having incorrect border radius with `labeled input` +- **Divider/Grid** - `vertical divider` no longer has inexplicable right border when stacked on mobile #2558 +- **Icon** - `black icon` have been added back as a color option #2556 +- **Icon** - Adds missing `square` and `square outline` icon #2532 +- **Transition** - Fixes `get current animation` erroring when `module cache` is cleared. #2469 + +**Additional Bugs** +- **Form** - URL regexp will now match now works correctly, and matches against non `http://` prefixed urls like `www.google.com` + ### Version 2.0.2 - July 7, 2015 **[Reported Bugs](https://github.com/Semantic-Org/Semantic-UI/issues?q=is%3Aissue+milestone%3A2.0.2+is%3Aclosed)** diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index 15baef78f..2d9f6ada2 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -989,7 +989,7 @@ $.fn.form.settings = { 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])?", integer : /^\-?\d+$/, flags : /^\/(.*)\/(.*)?/, - url : /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/i + url : /(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i }, selector : { @@ -1247,7 +1247,7 @@ $.fn.form.settings = { // value is most likely url url: function(value) { - return $.fn.form.settings.regExp.url.match(value); + return $.fn.form.settings.regExp.url.test(value); } } diff --git a/src/definitions/elements/divider.less b/src/definitions/elements/divider.less index 7539a622b..863a61fcd 100755 --- a/src/definitions/elements/divider.less +++ b/src/definitions/elements/divider.less @@ -155,6 +155,7 @@ position: static; left: 0; border-left: none; + border-right: none; content: ''; display: table-cell; position: relative; diff --git a/src/definitions/elements/icon.less b/src/definitions/elements/icon.less index 0fc4c9bc7..3e5bd8bd1 100755 --- a/src/definitions/elements/icon.less +++ b/src/definitions/elements/icon.less @@ -362,6 +362,19 @@ i.inverted.circular.grey.icon { color: @white !important; } +/* Black */ +i.black.icon { + color: @black !important; +} +i.inverted.black.icon { + color: @lightBlack !important; +} +i.inverted.bordeblack.black.icon, +i.inverted.circular.black.icon { + background-color: @black !important; + color: @white !important; +} + /*------------------- Sizes --------------------*/ diff --git a/src/definitions/elements/step.less b/src/definitions/elements/step.less index ab51bfdbf..2b1fdca0e 100755 --- a/src/definitions/elements/step.less +++ b/src/definitions/elements/step.less @@ -39,33 +39,16 @@ border: @stepsBorder; } +/* First Steps */ .ui.steps:first-child { margin-top: 0em; } + +/* Last Steps */ .ui.steps:last-child { margin-bottom: 0em; } -.ui.steps .step:first-child { - padding-left: @horizontalPadding; - border-radius: @stepsBorderRadius 0em 0em @stepsBorderRadius; -} -.ui.steps .step:last-child { - border-radius: 0em @stepsBorderRadius @stepsBorderRadius 0em; -} -.ui.steps .step:only-child { - -webkit-border-radius: @stepsBorderRadius; - -moz-border-radius: @stepsBorderRadius; - border-radius: @stepsBorderRadius; -} - -.ui.steps .step:last-child { - border-right: none; - margin-right: 0em; -} -.ui.steps .step:last-child:after { - display: @lastArrowDisplay; -} /******************************* Singular @@ -89,9 +72,10 @@ border-radius: @borderRadius; border: @border; border-right: @divider; + transition: @transition; } - +/* Arrow */ .ui.steps .step:after { display: none; position: absolute; @@ -108,13 +92,32 @@ border-color: @borderColor; border-width: @arrowBorderWidth; + transition: @transition; transform: translateY(-50%) translateX(50%) rotate(-45deg); } -.ui.steps .step, -.ui.steps .step:after { - transition: @transition; +/* First Step */ +.ui.steps .step:first-child { + padding-left: @horizontalPadding; + border-radius: @stepsBorderRadius 0em 0em @stepsBorderRadius; +} + +/* Only Step */ +.ui.steps .step:only-child { + -webkit-border-radius: @stepsBorderRadius; + -moz-border-radius: @stepsBorderRadius; + border-radius: @stepsBorderRadius; +} + +/* Last Step */ +.ui.steps .step:last-child { + border-radius: 0em @stepsBorderRadius @stepsBorderRadius 0em; } +.ui.steps .step:last-child { + border-right: none; + margin-right: 0em; +} + /******************************* Content @@ -213,6 +216,7 @@ justify-content: flex-start; border-radius: @borderRadius; padding: @verticalPadding @horizontalPadding; + border-right: none; border-bottom: @verticalDivider; } .ui.vertical.steps .step:first-child { @@ -243,6 +247,9 @@ .ui.vertical.steps .step:last-child:after { display: @verticalLastArrowDisplay; } +.ui.vertical.steps .active.step:last-child:after { + display: @verticalActiveLastArrowDisplay; +} /*--------------- @@ -334,7 +341,12 @@ .ui.steps .active.step:after { display: @activeArrowDisplay; } - +.ui.steps .step:last-child:after { + display: @lastArrowDisplay; +} +.ui.steps .active.step:last-child:after { + display: @activeLastArrowDisplay; +} /* Active Hover */ .ui.steps .link.active.step:hover::after, diff --git a/src/definitions/modules/checkbox.js b/src/definitions/modules/checkbox.js index 029344bf0..b7e7c197c 100644 --- a/src/definitions/modules/checkbox.js +++ b/src/definitions/modules/checkbox.js @@ -177,6 +177,7 @@ $.fn.checkbox = function(parameters) { return; } module.toggle(); + event.preventDefault(); }, keydown: function(event) { var diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index 8c44f34f8..b2adead4b 100644 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -408,10 +408,8 @@ $.fn.modal = function(parameters) { hideDimmer: function() { if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) { $dimmable.dimmer('hide', function() { - if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { - module.remove.clickaway(); - module.remove.screenHeight(); - } + module.remove.clickaway(); + module.remove.screenHeight(); }); } else { @@ -497,14 +495,18 @@ $.fn.modal = function(parameters) { ; } }, - screenHeight: function() { - if(module.cache.height > module.cache.pageHeight) { - module.debug('Removing page height'); - $body - .css('height', '') - ; + bodyStyle: function() { + if($body.attr('style') === '') { + module.verbose('Removing style attribute'); + $body.removeAttr('style'); } }, + screenHeight: function() { + module.debug('Removing page height'); + $body + .css('height', '') + ; + }, keyboardShortcuts: function() { module.verbose('Removing keyboard shortcuts'); $document diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index 16360ab44..a5eaecaef 100644 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -1219,7 +1219,7 @@ $.fn.popup.settings = { inline : false, // popup should be removed from page on hide - preserve : true, + preserve : false, // popup should not close when being hovered on hoverable : false, diff --git a/src/definitions/modules/transition.js b/src/definitions/modules/transition.js index 0f84f314f..40b895fb6 100644 --- a/src/definitions/modules/transition.js +++ b/src/definitions/modules/transition.js @@ -553,7 +553,10 @@ $.fn.transition = function() { ; }, currentAnimation: function() { - return module.cache.animation || false; + return (module.cache && module.cache.animation !== undefined) + ? module.cache.animation + : false + ; }, currentDirection: function() { return module.is.inward() diff --git a/src/themes/default/collections/form.variables b/src/themes/default/collections/form.variables index 6413b8e1a..05f562784 100644 --- a/src/themes/default/collections/form.variables +++ b/src/themes/default/collections/form.variables @@ -110,7 +110,7 @@ /* Input Error */ -@inputErrorBorderRadius: @inputBorderRadius; +@inputErrorBorderRadius: ''; @inputErrorBoxShadow: none; /* Dropdown Error */ diff --git a/src/themes/default/elements/icon.overrides b/src/themes/default/elements/icon.overrides index 159c360f1..bcb938336 100644 --- a/src/themes/default/elements/icon.overrides +++ b/src/themes/default/elements/icon.overrides @@ -235,6 +235,8 @@ i.icon.cube:before { content: "\f1b2"; } i.icon.cubes:before { content: "\f1b3"; } i.icon.circle.notched:before { content: "\f1ce"; } i.icon.circle.thin:before { content: "\f1db"; } +i.icon.square.outline:before { content: "\f096"; } +i.icon.square:before { content: "\f0c8"; } /* Item Selection */ i.icon.checkmark:before { content: "\f00c"; } diff --git a/src/themes/default/elements/step.variables b/src/themes/default/elements/step.variables index 8156aa9c3..2635b609a 100644 --- a/src/themes/default/elements/step.variables +++ b/src/themes/default/elements/step.variables @@ -66,9 +66,11 @@ @arrowBorderWidth: 0px @borderWidth @borderWidth 0px; @arrowDisplay: block; -@activeArrowDisplay: block; @lastArrowDisplay: none; +@activeArrowDisplay: block; +@activeLastArrowDisplay: none; + /* Mobile */ @mobileIconDistance: @iconDistance; @@ -83,8 +85,10 @@ @verticalArrowBorderWidth: 0px @borderWidth @borderWidth 0px; @verticalArrowDisplay: none; +@verticalLastArrowDisplay: @verticalArrowDisplay; + @verticalActiveArrowDisplay: block; -@verticalLastArrowDisplay: block; +@verticalActiveLastArrowDisplay: block; /*------------------- Variations diff --git a/src/themes/github/elements/step.variables b/src/themes/github/elements/step.variables index f62891c83..ff8dad8dc 100644 --- a/src/themes/github/elements/step.variables +++ b/src/themes/github/elements/step.variables @@ -6,6 +6,11 @@ @background: transparent linear-gradient(transparent, rgba(0, 0, 0, 0.07)); @verticalPadding: 1em; +@arrowDisplay: none; +@lastArrowDisplay: none; +@activeArrowDisplay: block; +@activeLastArrowDisplay: block; + /* Group */ @stepsBackground: #FFFFFF; @stepsBoxShadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.15); @@ -17,4 +22,5 @@ /* Arrow */ @arrowTopOffset: 100%; @arrowRightOffset: 50%; -@arrowBorderColor: rgba(0, 0, 0, 0.2); \ No newline at end of file +@arrowBorderColor: rgba(0, 0, 0, 0.2); +@arrowBorderWidth: 0px 0px @borderWidth @borderWidth; diff --git a/tasks/docs/metadata.js b/tasks/docs/metadata.js index 95009e7db..bfc86305d 100644 --- a/tasks/docs/metadata.js +++ b/tasks/docs/metadata.js @@ -51,7 +51,7 @@ function parser(file, callback) { var /** @type {string} */ text = String(file.contents.toString('utf8')), - lines = text.split('\n') + lines = text.split('\n'), filename = file.path.substring(0, file.path.length - 4), key = 'server/documents', position = filename.indexOf(key) @@ -106,11 +106,12 @@ function parser(file, callback) { // Parse yaml. meta = YAML.parse(yaml.join('\n')); if(meta && meta.type && meta.title && inArray(meta.type, categories) ) { - meta.category = meta.type; - meta.filename = filename; - meta.title = meta.title; + meta.category = meta.type; + meta.filename = filename; + meta.url = '/' + filename; + meta.title = meta.title; // Primary key will by filepath - data[filename] = meta; + data[meta.element] = meta; } else { // skip