diff --git a/demos/bootstrap/index.html b/demos/bootstrap/index.html index f43edf3..0c758b2 100644 --- a/demos/bootstrap/index.html +++ b/demos/bootstrap/index.html @@ -7,7 +7,7 @@ Responsive Bootstrap Toolkit - + @@ -21,8 +21,8 @@
Responsive Bootstrap Toolkit
-
-
+
+


Boxes below get highlighted whenever current viewport matches their expression. Alias of current breakpoint is visible in the top right corner.

@@ -45,7 +45,7 @@
Responsive Bootstrap Toolkit
- + diff --git a/dist/bootstrap-toolkit.js b/dist/bootstrap-toolkit.js index bc8bd9d..70f7420 100644 --- a/dist/bootstrap-toolkit.js +++ b/dist/bootstrap-toolkit.js @@ -2,7 +2,7 @@ * Responsive Bootstrap Toolkit * Author: Maciej Gurban * License: MIT - * Version: 2.6.3 (2016-06-21) + * Version: 2.7.0 (2022-04-29) * Origin: https://github.com/maciej-gurban/responsive-bootstrap-toolkit */ var ResponsiveBootstrapToolkit = (function($){ @@ -16,10 +16,12 @@ var ResponsiveBootstrapToolkit = (function($){ detectionDivs: { // Bootstrap 3 bootstrap: { - 'xs': $('
'), - 'sm': $('
'), - 'md': $('
'), - 'lg': $('
') + xs: $('
'), + sm: $('
'), + md: $('
'), + lg: $('
'), + xl: $('
'), + xxl: $('
') }, // Foundation 5 foundation: { diff --git a/dist/bootstrap-toolkit.min.js b/dist/bootstrap-toolkit.min.js index ddec349..2dc1e91 100644 --- a/dist/bootstrap-toolkit.min.js +++ b/dist/bootstrap-toolkit.min.js @@ -2,7 +2,7 @@ * Responsive Bootstrap Toolkit * Author: Maciej Gurban * License: MIT - * Version: 2.6.3 (2016-06-21) + * Version: 2.7.0 (2022-04-29) * Origin: https://github.com/maciej-gurban/responsive-bootstrap-toolkit */ -var ResponsiveBootstrapToolkit=function(i){var e={detectionDivs:{bootstrap:{xs:i('
'),sm:i('
'),md:i('
'),lg:i('
')},foundation:{small:i('
'),medium:i('
'),large:i('
'),xlarge:i('
')}},applyDetectionDivs:function(){i(document).ready(function(){i.each(o.breakpoints,function(i){o.breakpoints[i].appendTo(".responsive-bootstrap-toolkit")})})},isAnExpression:function(i){return"<"==i.charAt(0)||">"==i.charAt(0)},splitExpression:function(i){var e=i.charAt(0),o="="==i.charAt(1),s=1+(o?1:0),n=i.slice(s);return{operator:e,orEqual:o,breakpointName:n}},isAnyActive:function(e){var s=!1;return i.each(e,function(i,e){return o.breakpoints[e].is(":visible")?(s=!0,!1):void 0}),s},isMatchingExpression:function(i){var s=e.splitExpression(i),n=Object.keys(o.breakpoints),r=n.indexOf(s.breakpointName);if(-1!==r){var t=0,a=0;"<"==s.operator&&(t=0,a=s.orEqual?++r:r),">"==s.operator&&(t=s.orEqual?r:++r,a=void 0);var l=n.slice(t,a);return e.isAnyActive(l)}}},o={interval:300,framework:null,breakpoints:null,is:function(i){return e.isAnExpression(i)?e.isMatchingExpression(i):o.breakpoints[i]&&o.breakpoints[i].is(":visible")},use:function(i,s){o.framework=i.toLowerCase(),"bootstrap"===o.framework||"foundation"===o.framework?o.breakpoints=e.detectionDivs[o.framework]:o.breakpoints=s,e.applyDetectionDivs()},current:function(){var e="unrecognized";return i.each(o.breakpoints,function(i){o.is(i)&&(e=i)}),e},changed:function(i,e){var s;return function(){clearTimeout(s),s=setTimeout(function(){i()},e||o.interval)}}};return i(document).ready(function(){i('
').appendTo("body")}),null===o.framework&&o.use("bootstrap"),o}(jQuery);"undefined"!=typeof module&&module.exports&&(module.exports=ResponsiveBootstrapToolkit); \ No newline at end of file +var ResponsiveBootstrapToolkit=function(o){var e={detectionDivs:{bootstrap:{xs:o('
'),sm:o('
'),md:o('
'),lg:o('
'),xl:o('
'),xxl:o('
')},foundation:{small:o('
'),medium:o('
'),large:o('
'),xlarge:o('
')}},applyDetectionDivs:function(){o(document).ready(function(){o.each(n.breakpoints,function(o){n.breakpoints[o].appendTo(".responsive-bootstrap-toolkit")})})},isAnExpression:function(o){return"<"==o.charAt(0)||">"==o.charAt(0)},splitExpression:function(o){var e=o.charAt(0),n="="==o.charAt(1),i=1+(n?1:0);return{operator:e,orEqual:n,breakpointName:o.slice(i)}},isAnyActive:function(e){var i=!1;return o.each(e,function(o,e){if(n.breakpoints[e].is(":visible"))return i=!0,!1}),i},isMatchingExpression:function(o){var i=e.splitExpression(o),r=Object.keys(n.breakpoints),s=r.indexOf(i.breakpointName);if(-1!==s){var t=0,a=0;"<"==i.operator&&(t=0,a=i.orEqual?++s:s),">"==i.operator&&(t=i.orEqual?s:++s,a=void 0);var d=r.slice(t,a);return e.isAnyActive(d)}}},n={interval:300,framework:null,breakpoints:null,is:function(o){return e.isAnExpression(o)?e.isMatchingExpression(o):n.breakpoints[o]&&n.breakpoints[o].is(":visible")},use:function(o,i){n.framework=o.toLowerCase(),"bootstrap"===n.framework||"foundation"===n.framework?n.breakpoints=e.detectionDivs[n.framework]:n.breakpoints=i,e.applyDetectionDivs()},current:function(){var e="unrecognized";return o.each(n.breakpoints,function(o){n.is(o)&&(e=o)}),e},changed:function(o,e){var i;return function(){clearTimeout(i),i=setTimeout(function(){o()},e||n.interval)}}};return o(document).ready(function(){o('
').appendTo("body")}),null===n.framework&&n.use("bootstrap"),n}(jQuery);"undefined"!=typeof module&&module.exports&&(module.exports=ResponsiveBootstrapToolkit); \ No newline at end of file diff --git a/package.json b/package.json index 4d87ba4..c6d2254 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "responsive-toolkit", - "version": "2.6.3", + "version": "2.7.0", "description": "Responsive Bootstrap Toolkit provides an easy way of breakpoint detection in JavaScript, detecting changes in currently active breakpoint, as well as executing any breakpoint-specific JavaScript code. Despite the name, you can use it also with Foundation, or any other framework.", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "gulp-build": "gulp build" }, "main": "src/bootstrap-toolkit.js", "repository": { @@ -17,12 +18,12 @@ }, "homepage": "https://github.com/maciej-gurban/responsive-bootstrap-toolkit", "devDependencies": { - "gulp": "3.9.1", - "gulp-eslint": "2.0.0", - "gulp-notify": "2.2.0", - "gulp-plumber": "1.1.0", + "gulp": "^4.0.2", + "gulp-eslint": "^6.0.0", + "gulp-notify": "^4.0.0", + "gulp-plumber": "^1.2.1", "gulp-rename": "1.2.2", - "gulp-uglify": "1.5.3", + "gulp-uglify": "^3.0.2", "gulp-util": "3.0.7" } } diff --git a/src/bootstrap-toolkit.js b/src/bootstrap-toolkit.js index bc8bd9d..70f7420 100644 --- a/src/bootstrap-toolkit.js +++ b/src/bootstrap-toolkit.js @@ -2,7 +2,7 @@ * Responsive Bootstrap Toolkit * Author: Maciej Gurban * License: MIT - * Version: 2.6.3 (2016-06-21) + * Version: 2.7.0 (2022-04-29) * Origin: https://github.com/maciej-gurban/responsive-bootstrap-toolkit */ var ResponsiveBootstrapToolkit = (function($){ @@ -16,10 +16,12 @@ var ResponsiveBootstrapToolkit = (function($){ detectionDivs: { // Bootstrap 3 bootstrap: { - 'xs': $('
'), - 'sm': $('
'), - 'md': $('
'), - 'lg': $('
') + xs: $('
'), + sm: $('
'), + md: $('
'), + lg: $('
'), + xl: $('
'), + xxl: $('
') }, // Foundation 5 foundation: {