eo-css-tools
Advanced tools
Comparing version 0.3.0 to 0.4.0
declare type IValue = number | string | undefined; | ||
declare type ICssString = (cssTemplateString: TemplateStringsArray, ...values: any) => string; | ||
interface IBreakpointParams { | ||
@@ -7,5 +6,4 @@ min?: IValue; | ||
} | ||
export declare function breakpoint(params: IBreakpointParams | IValue[]): { | ||
css: ICssString; | ||
}; | ||
export declare function breakpoint(params: IBreakpointParams | IValue[]): string; | ||
export declare const brp: typeof breakpoint; | ||
export {}; |
@@ -1,15 +0,1 @@ | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
function n(){for(var n=0,r=0,a=arguments.length;r<a;r++)n+=arguments[r].length;var o=Array(n),e=0;for(r=0;r<a;r++)for(var i=arguments[r],t=0,l=i.length;t<l;t++,e++)o[e]=i[t];return o}var r=function(n){if(null!=n){var r=parseFloat(n);return isNaN(r)?void 0:0===r||r===-1/0?"0":isFinite(r)?r+"px":void 0}};function a(n){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];var o=[];return n.forEach((function(n,a){(n||0===n)&&o.push(n),(r[a]||0===r[a])&&o.push(r[a])})),o.join("")}function o(o){var e=void 0,i=void 0;return Array.isArray(o)?(e=r(o[0]),i=r(o[1])):(e=r(o.min),i=r(o.max)),{css:function(r){for(var o=[],t=1;t<arguments.length;t++)o[t-1]=arguments[t];var l=a.apply(void 0,n([r],o));switch(!0){case Boolean(e&&i)||Boolean(0===e)&&Boolean(0===i)||Boolean(0===e)&&Boolean(i)||Boolean(0===i)&&Boolean(e):return"@media only screen and (min-width: "+e+") and (max-width: "+i+") {"+l+"}";case Boolean(e||0===e):return"@media only screen and (min-width: "+e+") {"+l+"}";case Boolean(i||0===i):return"@media only screen and (max-width: "+i+") {"+l+"}";default:return""}}}}export{o as breakpoint}; | ||
var n=function(n){if(null!=n){var a=parseFloat(n);return isNaN(a)?void 0:0===a||a===-1/0?"0":isFinite(a)?a+"px":void 0}};function a(a){var e,o;switch(Array.isArray(a)?(e=n(a[0]),o=n(a[1])):(e=n(a.min),o=n(a.max)),!0){case Boolean(e&&o)||Boolean("0"===e)&&Boolean("0"===o)||Boolean("0"===e)&&Boolean(o)||Boolean("0"===o)&&Boolean(e):return"@media only screen and (min-width: "+e+") and (max-width: "+o+")";case Boolean(e||"0"===e):return"@media only screen and (min-width: "+e+")";case Boolean(o||"0"===o):return"@media only screen and (max-width: "+o+")";default:return""}}var e=a;export{a as breakpoint,e as brp}; |
@@ -1,16 +0,1 @@ | ||
"use strict"; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
function n(){for(var n=0,e=0,r=arguments.length;e<r;e++)n+=arguments[e].length;var o=Array(n),a=0;for(e=0;e<r;e++)for(var t=arguments[e],i=0,l=t.length;i<l;i++,a++)o[a]=t[i];return o}Object.defineProperty(exports,"__esModule",{value:!0});var e=function(n){if(null!=n){var e=parseFloat(n);return isNaN(e)?void 0:0===e||e===-1/0?"0":isFinite(e)?e+"px":void 0}};function r(n){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var o=[];return n.forEach((function(n,r){(n||0===n)&&o.push(n),(e[r]||0===e[r])&&o.push(e[r])})),o.join("")}exports.breakpoint=function(o){var a=void 0,t=void 0;return Array.isArray(o)?(a=e(o[0]),t=e(o[1])):(a=e(o.min),t=e(o.max)),{css:function(e){for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var l=r.apply(void 0,n([e],o));switch(!0){case Boolean(a&&t)||Boolean(0===a)&&Boolean(0===t)||Boolean(0===a)&&Boolean(t)||Boolean(0===t)&&Boolean(a):return"@media only screen and (min-width: "+a+") and (max-width: "+t+") {"+l+"}";case Boolean(a||0===a):return"@media only screen and (min-width: "+a+") {"+l+"}";case Boolean(t||0===t):return"@media only screen and (max-width: "+t+") {"+l+"}";default:return""}}}}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(e){if(null!=e){var n=parseFloat(e);return isNaN(n)?void 0:0===n||n===-1/0?"0":isFinite(n)?n+"px":void 0}};function n(n){var a,o;switch(Array.isArray(n)?(a=e(n[0]),o=e(n[1])):(a=e(n.min),o=e(n.max)),!0){case Boolean(a&&o)||Boolean("0"===a)&&Boolean("0"===o)||Boolean("0"===a)&&Boolean(o)||Boolean("0"===o)&&Boolean(a):return"@media only screen and (min-width: "+a+") and (max-width: "+o+")";case Boolean(a||"0"===a):return"@media only screen and (min-width: "+a+")";case Boolean(o||"0"===o):return"@media only screen and (max-width: "+o+")";default:return""}}var a=n;exports.breakpoint=n,exports.brp=a; |
{ | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "CSS tools that built to simplify CSS-in-JS styling", | ||
@@ -38,10 +38,10 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@types/jest": "^24.0.23", | ||
"@types/jest": "^24.9.1", | ||
"core-js": "^3.5.0", | ||
"expect": "^24.9.0", | ||
"jest": "^24.9.0", | ||
"rollup": "^1.27.11", | ||
"expect": "^25.1.0", | ||
"jest": "^25.1.0", | ||
"rollup": "^1.30.0", | ||
"rollup-plugin-terser": "^5.1.3", | ||
"rollup-plugin-typescript2": "^0.25.3", | ||
"ts-jest": "^24.2.0", | ||
"ts-jest": "^25.0.0", | ||
"typescript": "^3.7.3" | ||
@@ -48,0 +48,0 @@ }, |
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
18066
20
0
70