From 1664454201bb20926bebbc267286905607d49b76 Mon Sep 17 00:00:00 2001 From: rofrischmann Date: Wed, 21 Oct 2015 11:49:20 +0200 Subject: [PATCH] version 0.5 update --- dist/look-core.min.js | 18 ----- dist/look-dom.min.js | 164 ------------------------------------------ dist/look.min.js | 48 ------------- docs/FAQ.md | 69 ++++-------------- package.json | 2 +- 5 files changed, 14 insertions(+), 287 deletions(-) delete mode 100644 dist/look-core.min.js delete mode 100644 dist/look-dom.min.js delete mode 100644 dist/look.min.js diff --git a/dist/look-core.min.js b/dist/look-core.min.js deleted file mode 100644 index 29a4db0..0000000 --- a/dist/look-core.min.js +++ /dev/null @@ -1,18 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;on;n++)r[n]=arguments[n];var o=r.splice(1),s=r[0];return o.forEach(function(e){if(e)for(t in e)s.hasOwnProperty(t)&&isImportant(s[t])||(s[t]=e[t])}),s}function isImportant(t){return"string"==typeof t&&t.toLowerCase().indexOf("!important")>-1}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=assignStyles,module.exports=exports["default"]; -},{}],2:[function(require,module,exports){ -"use strict";function toObject(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;module.exports=Object.assign||function(e,r){for(var t,n,o=toObject(e),a=1;a=0?config.processors.pop(e):console.warn("You can only deregister processors that have been registered before.")},getProcessors:function(){return config.processors}},module.exports=exports["default"]; -},{}],4:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _coreEnhancer=require("./core/enhancer"),_coreEnhancer2=_interopRequireDefault(_coreEnhancer),_apiConfig=require("./api/Config"),_apiConfig2=_interopRequireDefault(_apiConfig);exports["default"]=function(){for(var e=arguments.length,r=Array(e),n=0;e>n;n++)r[n]=arguments[n];return r[0]instanceof Function?_coreEnhancer2["default"].apply(void 0,r):function(e){return _coreEnhancer2["default"].apply(void 0,[e].concat(r))}},exports.Config=_apiConfig2["default"]; -},{"./api/Config":3,"./core/enhancer":5}],5:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t0?_resolver2["default"](this,_get(Object.getPrototypeOf(o.prototype),"render",this).call(this)):(console.warn(_react.Component+" was enhanced with Look, but did not provide any styles."),console.warn("This might affect performance and rendering time."),_get(Object.getPrototypeOf(o.prototype),"render",this).call(this))}}]),o}(e);return{v:s}}();if("object"==typeof s)return s.v}else{var o=function(){var s=function(s){function o(){_classCallCheck(this,o),_get(Object.getPrototypeOf(o.prototype),"constructor",this).apply(this,arguments),this._processors=prepareProcessors(this,r)}return _inherits(o,s),_createClass(o,[{key:"render",value:function(){return this.lookStyles=prepareStyles(this,_objectAssign2["default"]({},t)),_resolver2["default"](this,e(this.props))}}]),o}(_react.Component);return{v:s}}();if("object"==typeof o)return o.v}}function flattenStyles(e){return e instanceof Array?_assignStyles2["default"].apply(void 0,_toConsumableArray(e)):e instanceof Object?e:(console.warn("Pass either a valid object or an array of valid objects."),console.warn("Look can not flatten and will ignore the following styles input:",e),!1)}function prepareStyles(e,t){var r=void 0;return e.styles&&(r=_assignStyles2["default"]({},e.styles instanceof Function?e.styles.call(e):e.styles),r=resolveDefault(flattenStyles(r))),t&&(r=_assignStyles2["default"]({},r,resolveDefault(_objectAssign2["default"]({},t)))),r}function resolveDefault(e){return e&&e[Object.keys(e)[0]]instanceof Object!=!0&&(e={_default:e}),e}function prepareProcessors(e,t){var r=_apiConfig.getProcessors().slice(0);return e.processors&&(e.processors instanceof Function&&(e.processors=e.processors()),e.processors instanceof Array!=!0&&(e.processors=[e.processors]),r.push.apply(r,_toConsumableArray(e.processors))),t&&(t instanceof Array?r.push.apply(r,_toConsumableArray(t)):t instanceof Object&&r.push(t)),r}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;rn;n++)r[n]=arguments[n];var o=r.splice(1),s=r[0];return o.forEach(function(e){if(e)for(t in e)s.hasOwnProperty(t)&&isImportant(s[t])||(s[t]=e[t])}),s}function isImportant(t){return"string"==typeof t&&t.toLowerCase().indexOf("!important")>-1}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=assignStyles,module.exports=exports["default"]; -},{}],2:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r1?t-1:0),r=1;t>r;r++)s[r-1]=arguments[r];e.process.apply(e,s)}else console.warn("Processor needs to have a valid process()-method.");else console.warn("Processor should not be undefined.")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var s=0;s0}},{key:"hasSelector",value:function(e){return this.selectors.hasOwnProperty(e)}},{key:"hasRule",value:function(e,t){return this.selectors.hasOwnProperty(e)?this.selectors[e].hasOwnProperty(t):!1}},{key:"hasValue",value:function(e,t,s){return this.selectors.hasOwnProperty(e)&&this.selectors[e].hasOwnProperty(t)?this.selectors[e][t]===s:!1}},{key:"process",value:function(e){for(var t=arguments.length,s=Array(t>1?t-1:0),r=1;t>r;r++)s[r-1]=arguments[r];s.unshift(this.selectors),e instanceof Array==!1?checkProcessor.apply(void 0,[e].concat(s)):e.forEach(function(e){checkProcessor.apply(void 0,[e].concat(s))})}}]),e}();exports["default"]=Sheet,module.exports=exports["default"]; -},{"assign-styles":1,"type-utils":19}],6:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function diffObject(e,t){var r=new Map;return _typeUtils._Object.each(e,function(i,f){if(t.hasOwn(i)){var s=t[i];if(s instanceof Object){var a=diffObject(f,s);a.size>0&&(r.set(i,Diff.CHANGED),r.set("_"+i,a))}else s!==f&&(e[i]=s,r.set(i,Diff.CHANGED))}else delete e[i],r.set(i,Diff.REMOVED)}),_typeUtils._Object.each(t,function(t,i){e.hasOwnProperty(t)&&(i instanceof Object?e[t]=_typeUtils._Object.clone(i):e[t]=i,r.set(t,Diff.ADDED))}),r}function cssifyObject(e){var t="";return _typeUtils._Object.each(e,function(e,r){t+=toParamCase(e)+":"+r+";"}),t}function isPrefixedProperty(e){return 0==e.indexOf("Webkit")||0==e.indexOf("Moz")||0==e.indexOf("ms")}function getCSSRuleIndex(e,t){return e.findIndex(function(e){return e.selectorText==t})}function toParamCase(e){return(isPrefixedProperty(e)?"-":"")+_paramCase2["default"](e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.diffObject=diffObject,exports.cssifyObject=cssifyObject,exports.isPrefixedProperty=isPrefixedProperty,exports.getCSSRuleIndex=getCSSRuleIndex,exports.toParamCase=toParamCase;var _paramCase=require("param-case"),_paramCase2=_interopRequireDefault(_paramCase),_typeUtils=require("type-utils"),Diff={CHANGED:"change",ADDED:"add",REMOVED:"remove"};exports.Diff=Diff; -},{"param-case":18,"type-utils":19}],7:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _Sheet=require("./Sheet"),_Sheet2=_interopRequireDefault(_Sheet),_CSSSheet=require("./CSSSheet"),_CSSSheet2=_interopRequireDefault(_CSSSheet),_Processors=require("./Processors"),_Processors2=_interopRequireDefault(_Processors);exports["default"]={Sheet:_Sheet2["default"],CSSSheet:_CSSSheet2["default"],Processors:_Processors2["default"]},module.exports=exports["default"]; -},{"./CSSSheet":2,"./Processors":4,"./Sheet":5}],8:[function(require,module,exports){ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var flexboxProperties={2009:{flexDirection:"WebkitBoxDirection",alignItems:"WebkitBoxAlign",flexWrap:"WebkitBoxLines",justifyContent:"WebkitBoxPack",flex:"WebkitBoxFlex",order:"WebkitboxOrdinalGroup",display:"display"},2012:{justifyContent:"msFlexPack",alignItems:"msFlexAlign",alignContent:"msFlexLinePack",order:"msFlexOrder",alignSelf:"msFlexItemAlign",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msPreferredSize"}},ua="undefined"!=typeof navigator?navigator.userAgent:void 0;exports["default"]={isFlexboxProperty:function(e,i){return i&&flexboxProperties[i].hasOwnProperty(e)},getUserAgent:function(){return ua},setUserAgent:function(e){ua=e},getFlexboxSpecification:function(){var e=arguments.length<=0||void 0===arguments[0]?ua:arguments[0],i=e.match(/android\s+([\d\.]+)/),t=e.match(/msie\s+([\d\.]+)/),r="latest";if(i){var n=parseFloat(i[1]);4.4>=n&&(r=2009)}if(t){var o=parseInt(t[1]);10==o&&(r=2012)}return r},addFlexboxProperties2009:function(e){var i=void 0;for(i in e){var t=e[i];if(t instanceof Map)this.addFlexboxProperties2009(t);else if(this.isFlexboxProperty(i,2009)){var r=t;"flexDirection"==i?(r=t.indexOf("reverse")>-1?"reverse":"normal",e.WebkitBoxOrient=t.indexOf("column")>-1?"vertical":"horizontal"):"flexWrap"!=i||"wrap"!=t&&"wrap-reverse"!=t?"justifyContent"==i?r=t.indexOf("space")>-1?"justify":t.replace("flex-",""):"order"==i?r=t+1:"flex"==i?isNaN(t)&&(r=t.split(" ")[0]):"display"==i&&t.indexOf("flex")>-1&&(r="-webkit-box"):r="multiple",e[flexboxProperties[2009][i]]=r}}},addFlexboxProperties2012:function(e){var i=void 0;for(i in e){var t=e[i];if(t instanceof Object)this.addFlexboxProperties2012(t);else if(this.isFlexboxProperty(i,2012)){var r=t;isNaN(t)&&(r=t.replace("flex-","").replace("space-around","distribute").replace("space-between","justify")),"display"==i&&t.indexOf("flex")>-1&&(r="-ms-"+(t.indexOf("inline")>-1?"inline-flex":"flex")+"box"),e[flexboxProperties[2012][i]]=r}}},handleFlexboxDisplay:function(e){var i=void 0;for(i in e)if(e[i]instanceof Object)this.handleFlexboxDisplay(e[i]);else if("display"==i){var t=e[i];t.indexOf("flex")>-1&&(e[i]="-webkit-"+(t.indexOf("inline")>-1?"inline-flex":"flex"))}},process:function(e){var i=arguments.length<=1||void 0===arguments[1]?ua:arguments[1];if(i){i=i.toLowerCase();var t=this.getFlexboxSpecification(i);2009==t?this.addFlexboxProperties2009(e):2012==t?this.addFlexboxProperties2012(e):i.match("webkit|safari|chrome").length>0&&this.handleFlexboxDisplay(e)}return e}},module.exports=exports["default"]; -},{}],9:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _assignStyles=require("assign-styles"),_assignStyles2=_interopRequireDefault(_assignStyles),mixins=new Map;exports["default"]={register:function(e,i){mixins.set(e,i)},deregister:function(e){mixins["delete"](e)},get:function(e){return mixins.get(e)},getAll:function(){return mixins},resolveMixins:function(e,i){var s=void 0;for(s in e){var t=e[s];if(t instanceof Object)if(mixins.has(s)){var n=mixins.get(s)(t);i&&(_assignStyles2["default"](e,n),delete e[i])}else this.resolveMixins(t,s)}},process:function(e){return e instanceof Object&&this.resolveMixins(e),e}},module.exports=exports["default"]; -},{"assign-styles":1}],10:[function(require,module,exports){ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var vendorPrefixes={firefox:"Moz",chrome:"Webkit",safari:"Webkit",webkit:"Webkit",msie:"ms"},ua="undefined"!=typeof navigator?navigator.userAgent:void 0,prefixProperties={webkit:["appearance","userSelect","alignContent","alignItems","alignSelf","flex","flexBasis","flexDirection","flexGrow","flexFlow","flexShrink","flexWrap","justifyContent","order","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","perspective","perspectiveOrigin","transform","transformOrigin","transformStyle","animation","animationDelay","animationDirection","animationFillMode","animationDuration","anmationIterationCount","animationName","animationPlayState","animationTimingFunction","backfaceVisibility","calc","backdropFilter"],ms:["userSelect","flex","flexDirection","flexFlow","flexPositive","flexNegative","flexWrap","transform","transformOrigin","transformStyle"],moz:["appearance","userSelect","boxSizing"]};exports["default"]={getVendorPrefix:function(){var e=arguments.length<=0||void 0===arguments[0]?ua:arguments[0];e=e.toLowerCase();var t=e.match("msie")||e.match("firefox")||e.match("webkit|safari|chrome");return t&&vendorPrefixes[t[0]]||""},caplitalizeString:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},getPrefixedProperty:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.getVendorPrefix():arguments[1];return t+this.caplitalizeString(e)},getUserAgent:function(){return ua},setUserAgent:function(e){ua=e},isPrefixProperty:function(e,t){return t=t.toLowerCase(),prefixProperties.hasOwnProperty(t)?prefixProperties[t].indexOf(e)>-1:!1},addPrefixedProperties:function(e,t){var r=void 0;for(r in e){var i=e[r];i instanceof Object?this.addPrefixedProperties(i,t):this.isPrefixProperty(r,t)&&(e[this.getPrefixedProperty(r)]=i)}},process:function(e){var t=arguments.length<=1||void 0===arguments[1]?ua:arguments[1];return t&&e instanceof Object&&this.addPrefixedProperties(e,this.getVendorPrefix()),e}},module.exports=exports["default"]; -},{}],11:[function(require,module,exports){ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var unitlessProperties=["boxFlex","boxFlexGroup","columnCount","flex","flexGrow","flexPositive","flexNegative","flexShrink","fontWeight","lineClamp","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","strokeDashoffest","strokeOpacity","strokeWidth"],validUnits=["px","pt","pc","mm","in","cm","em","rem","ex","vh","vw","%"];exports["default"]={addUnits:function(e,t){var i=void 0;for(i in e){var s=e[i];s instanceof Object?this.addUnits(s,t):unitlessProperties.indexOf(i)<0&&s instanceof Number&&(e[i]=s+t)}},process:function(e){var t=arguments.length<=1||void 0===arguments[1]?"px":arguments[1];return validUnits.indexOf(t)>-1?e instanceof Object&&this.addUnits(e,t):console.warn("The passed unit is not a valid unit. Check https://github.com/dynamicstylesheets/DSS-Units/blob/master/README.md#validunits"),e}},module.exports=exports["default"]; -},{}],12:[function(require,module,exports){ -"use strict";function ToObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function ownEnumerableKeys(e){var r=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(e))),r.filter(function(r){return propIsEnumerable.call(e,r)})}var propIsEnumerable=Object.prototype.propertyIsEnumerable;module.exports=Object.assign||function(e,r){for(var t,n,o=ToObject(e),c=1;c-1:!1}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=includes,module.exports=exports["default"]; -},{}],27:[function(require,module,exports){ -"use strict";function toObject(r){var t=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],e={},n=!0,o=!1,a=void 0;try{for(var i,u=r[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var l=_slicedToArray(i.value,2),f=l[0],c=l[1];c instanceof Map&&t?e[f]=fromMap(c):e[f]=c}}catch(s){o=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(o)throw a}}return e}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,t){var e=[],n=!0,o=!1,a=void 0;try{for(var i,u=r[Symbol.iterator]();!(n=(i=u.next()).done)&&(e.push(i.value),!t||e.length!==t);n=!0);}catch(l){o=!0,a=l}finally{try{!n&&u["return"]&&u["return"]()}finally{if(o)throw a}}return e}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return r(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();exports["default"]=toObject,module.exports=exports["default"]; -},{}],28:[function(require,module,exports){ -"use strict";function toString(r){var t=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],e="{",n=void 0,o=void 0,i=!0,a=!1,u=void 0;try{for(var l,d=r[Symbol.iterator]();!(i=(l=d.next()).done);i=!0){var f=_slicedToArray(l.value,2);n=f[0],o=f[1],e+=o instanceof Map&&t?addString(e,n,toString(o)):addString(e,n,obj[n])}}catch(c){a=!0,u=c}finally{try{!i&&d["return"]&&d["return"]()}finally{if(a)throw u}}return e+"}"}function addString(r,t,e){return("{"!=r?", ":"")+t+" => "+e}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,t){var e=[],n=!0,o=!1,i=void 0;try{for(var a,u=r[Symbol.iterator]();!(n=(a=u.next()).done)&&(e.push(a.value),!t||e.length!==t);n=!0);}catch(l){o=!0,i=l}finally{try{!n&&u["return"]&&u["return"]()}finally{if(o)throw i}}return e}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return r(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();exports["default"]=toString,module.exports=exports["default"]; -},{}],29:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function assign(){return _objectAssign2["default"].apply(void 0,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=assign;var _objectAssign=require("object-assign"),_objectAssign2=_interopRequireDefault(_objectAssign);module.exports=exports["default"]; -},{"object-assign":12}],30:[function(require,module,exports){ -"use strict";function clone(e){if(null===e||void 0===e||"object"!=typeof e)return e;var o=e.constructor(),t=void 0;for(t in e)e.hasOwnProperty(t)&&(o[t]=clone(e[t]));return o}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=clone,module.exports=exports["default"]; -},{}],31:[function(require,module,exports){ -"use strict";function each(e,t){var o=void 0;if(!(e instanceof Object))return console.warn("Input was not an object",e),!1;for(o in e)e.hasOwnProperty(o)&&t(o,e[o])}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=each,module.exports=exports["default"]; -},{}],32:[function(require,module,exports){ -"use strict";function toMap(e){var t=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],o=new Map,r=void 0;for(r in e){var a=e[r];a instanceof Object&&t?o.set(r,toMap(a)):o.set(r,a)}return o}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=toMap,module.exports=exports["default"]; -},{}],33:[function(require,module,exports){ -"use strict";function toString(t){var r=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],e="{",n=void 0;for(n in t)t.hasOwnProperty(n)&&(e+=t[n]instanceof Object&&r?addString(e,n,toString(t[n])):addString(e,n,t[n]));return e+"}"}function addString(t,r,e){var n=e instanceof String?'"':"";return("{"!=t?", ":"")+r+": "+n+e+n}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=toString,module.exports=exports["default"]; -},{}],34:[function(require,module,exports){ -"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}function isCSSProperty(t){return _arrayIncludes2["default"](props,t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=isCSSProperty;var _arrayIncludes=require("../array/includes"),_arrayIncludes2=_interopRequireDefault(_arrayIncludes),props=["color","opacity","background","background-attachment","background-color","background-image","background-position","background-repeat","background-clip","background-origin","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","box-shadow","bottom","clear","clip","display","float","height","left","margin","margin-bottom","margin-left","margin-right","margin-top","max-height","max-width","min-height","min-width","overflow","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","position","right","top","visibility","width","vertical-align","z-index","align-content","align-items","align-self","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","justify-content","order","hanging-punctuation","letter-spacing","line-height","tab-size","text-align","text-align-last","text-indent","text-justify","text-transform","white-space","word-break","word-spacing","word-wrap","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-shadow","@font-face","font","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","direction","unicode-bidi","direction","border-collapse","border-spacing","caption-side","empty-cells","table-layout","counter-increment","counter-reset","list-style","list-style-image","list-style-position","list-style-type","@keyframes","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","perspective","perspective-origin","transform","transform-origin","transform-style","transition","transition-property","transition-duration","transition-timing-function","transition-delay","box-sizing","content","cursor","nav-down","nav-index","nav-left","nav-right","nav-up","outline","outline-color","outline-offset","outline-style","outline-width","resize","text-overflow","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","page-break-after","page-break-before","page-break-inside","quotes"];module.exports=exports["default"]; -},{"../array/includes":26}],35:[function(require,module,exports){ -"use strict";function isEmpty(e){return void 0!==e?!Object.keys(e).length:!0}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=isEmpty,module.exports=exports["default"]; -},{}],36:[function(require,module,exports){ -"use strict";function isNumber(e){return!isNaN(parseFloat(e))&&isFinite(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=isNumber,module.exports=exports["default"]; -},{}],37:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _pluginsCursor=require("./plugins/cursor"),_pluginsCursor2=_interopRequireDefault(_pluginsCursor),_pluginsFlex=require("./plugins/flex"),_pluginsFlex2=_interopRequireDefault(_pluginsFlex),_pluginsSizing=require("./plugins/sizing"),_pluginsSizing2=_interopRequireDefault(_pluginsSizing),_pluginsGradient=require("./plugins/gradient"),_pluginsGradient2=_interopRequireDefault(_pluginsGradient),_pluginsFlexboxIE=require("./plugins/flexboxIE"),_pluginsFlexboxIE2=_interopRequireDefault(_pluginsFlexboxIE),_pluginsFlexboxOld=require("./plugins/flexboxOld"),_pluginsFlexboxOld2=_interopRequireDefault(_pluginsFlexboxOld);exports["default"]=[_pluginsCursor2["default"],_pluginsFlex2["default"],_pluginsSizing2["default"],_pluginsGradient2["default"],_pluginsFlexboxIE2["default"],_pluginsFlexboxOld2["default"]],module.exports=exports["default"]; -},{"./plugins/cursor":41,"./plugins/flex":42,"./plugins/flexboxIE":43,"./plugins/flexboxOld":44,"./plugins/gradient":45,"./plugins/sizing":46}],38:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,r){for(var t=0;t=r._browserInfo.version}).reduce(function(e,r){return e[r]=!0,e},{}),this._hasPropsRequiringPrefix=Object.keys(this._requiresPrefix).length>0):(this._hasPropsRequiringPrefix=!1,console.warn("Your userAgent seems to be not supported by inline-style-prefixer. Feel free to open an issue."))}return _createClass(e,[{key:"prefix",value:function(e){var r=this;return this._hasPropsRequiringPrefix?(e=_objectAssign2["default"]({},e),Object.keys(e).forEach(function(t){var i=e[t];i instanceof Object?e[t]=r.prefix(i):(r._requiresPrefix[t]&&(e[r.jsPrefix+caplitalizeString(t)]=i,delete e[t]),_Plugins2["default"].forEach(function(n){_objectAssign2["default"](e,n(t,i,r._browserInfo,e))}))}),e):e}}]),e}();exports["default"]=Prefixer;var caplitalizeString=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};module.exports=exports["default"]; -},{"./Plugins":37,"./caniuseData":39,"./getBrowserInformation":40,"object-assign":48}],39:[function(require,module,exports){ -var caniuseData={chrome:{backfaceVisibility:35,perspective:35,perspectiveOrigin:35,transform:35,transformOrigin:35,transformStyle:35,transformOriginX:35,transformOriginY:35,animation:42,animationDelay:42,animationDirection:42,animationFillMode:42,animationDuration:42,anmationIterationCount:42,animationName:42,animationPlayState:42,animationTimingFunction:42,appearance:48,userSelect:48,fontKerning:32,textEmphasisPosition:48,textEmphasis:48,textEmphasisStyle:48,textEmphasisColor:48,boxDecorationBreak:48,clipPath:48,maskImage:48,maskMode:48,maskRepeat:48,maskPosition:48,maskClip:48,maskOrigin:48,maskSize:48,maskComposite:48,mask:48,maskBorderSource:48,maskBorderMode:48,maskBorderSlice:48,maskBorderWidth:48,maskBorderOutset:48,maskBorderRepeat:48,maskBorder:48,maskType:48,textDecorationStyle:48,textDecorationSkip:48,textDecorationLine:48,textDecorationColor:48,filter:48,fontFeatureSettings:48,breakAfter:48,breakBefore:48,breakInside:48,columnCount:48,columnFill:48,columnGap:48,columnRule:48,columnRuleColor:48,columnRuleStyle:48,columnRuleWidth:48,columns:48,columnSpan:48,columnWidth:48},safari:{flex:8,flexBasis:8,flexDirection:8,flexGrow:8,flexFlow:8,flexShrink:8,alignContent:8,alignItems:8,alignSelf:8,justifyContent:8,order:8,transition:6,transitionDelay:6,transitionDuration:6,transitionProperty:6,transitionTimingFunction:6,backfaceVisibility:8,perspective:8,perspectiveOrigin:8,transform:8,transformOrigin:8,transformStyle:8,transformOriginX:8,transformOriginY:8,animation:8,animationDelay:8,animationDirection:8,animationFillMode:8,animationDuration:8,anmationIterationCount:8,animationName:8,animationPlayState:8,animationTimingFunction:8,appearance:9,userSelect:9,backdropFilter:9,fontKerning:9,scrollSnapType:9,scrollSnapPointsX:9,scrollSnapPointsY:9,scrollSnapDestination:9,scrollSnapCoordinate:9,textEmphasisPosition:7,textEmphasis:7,textEmphasisStyle:7,textEmphasisColor:7,boxDecorationBreak:9,clipPath:9,maskImage:9,maskMode:9,maskRepeat:9,maskPosition:9,maskClip:9,maskOrigin:9,maskSize:9,maskComposite:9,mask:9,maskBorderSource:9,maskBorderMode:9,maskBorderSlice:9,maskBorderWidth:9,maskBorderOutset:9,maskBorderRepeat:9,maskBorder:9,maskType:9,textDecorationStyle:9,textDecorationSkip:9,textDecorationLine:9,textDecorationColor:9,shapeImageThreshold:9,shapeImageMargin:9,shapeImageOutside:9,filter:9,hyphens:9,flowInto:9,flowFrom:9,breakBefore:8,breakAfter:8,breakInside:8,regionFragment:9,columnCount:8,columnFill:8,columnGap:8,columnRule:8,columnRuleColor:8,columnRuleStyle:8,columnRuleWidth:8,columns:8,columnSpan:8,columnWidth:8},firefox:{appearance:43,userSelect:43,boxSizing:28,textAlignLast:43,textDecorationStyle:35,textDecorationSkip:35,textDecorationLine:35,textDecorationColor:35,tabSize:43,hyphens:42,fontFeatureSettings:33,breakAfter:43,breakBefore:43,breakInside:43,columnCount:43,columnFill:43,columnGap:43,columnRule:43,columnRuleColor:43,columnRuleStyle:43,columnRuleWidth:43,columns:43,columnSpan:43,columnWidth:43},opera:{flex:16,flexBasis:16,flexDirection:16,flexGrow:16,flexFlow:16,flexShrink:16,alignContent:16,alignItems:16,alignSelf:16,justifyContent:16,order:16,backfaceVisibility:22,perspective:22,perspectiveOrigin:22,transform:22,transformOrigin:22,transformStyle:22,transformOriginX:22,transformOriginY:22,animation:29,animationDelay:29,animationDirection:29,animationFillMode:29,animationDuration:29,anmationIterationCount:29,animationName:29,animationPlayState:29,animationTimingFunction:29,appearance:34,userSelect:34,fontKerning:19,textEmphasisPosition:34,textEmphasis:34,textEmphasisStyle:34,textEmphasisColor:34,boxDecorationBreak:34,clipPath:34,maskImage:34,maskMode:34,maskRepeat:34,maskPosition:34,maskClip:34,maskOrigin:34,maskSize:34,maskComposite:34,mask:34,maskBorderSource:34,maskBorderMode:34,maskBorderSlice:34,maskBorderWidth:34,maskBorderOutset:34,maskBorderRepeat:34,maskBorder:34,maskType:34,filter:34,fontFeatureSettings:34,breakAfter:34,breakBefore:34,breakInside:34,columnCount:34,columnFill:34,columnGap:34,columnRule:34,columnRuleColor:34,columnRuleStyle:34,columnRuleWidth:34,columns:34,columnSpan:34,columnWidth:34},ie:{flexFlow:10,gridRow:11,scrollSnapCoordinate:11,gridGap:11,flexDirection:10,columnGap:11,gridRowEnd:11,flex:10,userSelect:11,touchAction:10,wrapMargin:11,breakBefore:11,gridTemplate:11,scrollSnapType:11,wrapThrough:11,gridRowStart:11,flowFrom:11,gridTemplateRows:11,grid:11,gridColumn:11,wrapFlow:11,scrollSnapPointsX:11,gridAutoColumns:11,regionFragment:11,gridTemplateColumns:11,scrollSnapDestination:11,gridAutoFlow:11,gridColumnStart:11,breakInside:11,gridAutoRows:11,rowGap:11,gridArea:11,flowInto:11,breakAfter:11,hyphens:11,gridTemplateAreas:11,scrollSnapPointsY:11,textSizeAdjust:11},ios_saf:{flex:8.1,flexBasis:8.1,flexDirection:8.1,flexGrow:8.1,flexFlow:8.1,flexShrink:8.1,alignContent:8.1,alignItems:8.1,alignSelf:8.1,justifyContent:8.1,order:8.1,transition:6,transitionDelay:6,transitionDuration:6,transitionProperty:6,transitionTimingFunction:6,backfaceVisibility:8.1,perspective:8.1,perspectiveOrigin:8.1,transform:8.1,transformOrigin:8.1,transformStyle:8.1,transformOriginX:8.1,transformOriginY:8.1,animation:8.1,animationDelay:8.1,animationDirection:8.1,animationFillMode:8.1,animationDuration:8.1,anmationIterationCount:8.1,animationName:8.1,animationPlayState:8.1,animationTimingFunction:8.1,appearance:9,userSelect:9,backdropFilter:9,fontKerning:9,scrollSnapType:9,scrollSnapPointsX:9,scrollSnapPointsY:9,scrollSnapDestination:9,scrollSnapCoordinate:9,boxDecorationBreak:9,clipPath:9,maskImage:9,maskMode:9,maskRepeat:9,maskPosition:9,maskClip:9,maskOrigin:9,maskSize:9,maskComposite:9,mask:9,maskBorderSource:9,maskBorderMode:9,maskBorderSlice:9,maskBorderWidth:9,maskBorderOutset:9,maskBorderRepeat:9,maskBorder:9,maskType:9,textSizeAdjust:9,textDecorationStyle:9,textDecorationSkip:9,textDecorationLine:9,textDecorationColor:9,shapeImageThreshold:9,shapeImageMargin:9,shapeImageOutside:9,filter:9,hyphens:9,flowInto:9,flowFrom:9,breakBefore:8.1,breakAfter:8.1,breakInside:8.1,regionFragment:9,columnCount:8.1,columnFill:8.1,columnGap:8.1,columnRule:8.1,columnRuleColor:8.1,columnRuleStyle:8.1,columnRuleWidth:8.1,columns:8.1,columnSpan:8.1,columnWidth:8.1},android:{borderImage:4.2,borderImageOutset:4.2,borderImageRepeat:4.2,borderImageSlice:4.2,borderImageSource:4.2,borderImageWidth:4.2,flex:4.2,flexBasis:4.2,flexDirection:4.2,flexGrow:4.2,flexFlow:4.2,flexShrink:4.2,alignContent:4.2,alignItems:4.2,alignSelf:4.2,justifyContent:4.2,order:4.2,transition:4.2,transitionDelay:4.2,transitionDuration:4.2,transitionProperty:4.2,transitionTimingFunction:4.2,backfaceVisibility:4.4,perspective:4.4,perspectiveOrigin:4.4,transform:4.4,transformOrigin:4.4,transformStyle:4.4,transformOriginX:4.4,transformOriginY:4.4,animation:4.4,animationDelay:4.4,animationDirection:4.4,animationFillMode:4.4,animationDuration:4.4,anmationIterationCount:4.4,animationName:4.4,animationPlayState:4.4,animationTimingFunction:4.4,appearance:44,userSelect:44,fontKerning:4.4,textEmphasisPosition:44,textEmphasis:44,textEmphasisStyle:44,textEmphasisColor:44,boxDecorationBreak:44,clipPath:44,maskImage:44,maskMode:44,maskRepeat:44,maskPosition:44,maskClip:44,maskOrigin:44,maskSize:44,maskComposite:44,mask:44,maskBorderSource:44,maskBorderMode:44,maskBorderSlice:44,maskBorderWidth:44,maskBorderOutset:44,maskBorderRepeat:44,maskBorder:44,maskType:44,filter:44,fontFeatureSettings:44,breakAfter:44,breakBefore:44,breakInside:44,columnCount:44,columnFill:44,columnGap:44,columnRule:44,columnRuleColor:44,columnRuleStyle:44,columnRuleWidth:44,columns:44,columnSpan:44,columnWidth:44},and_chr:{},and_uc:{flex:9.9,flexBasis:9.9,flexDirection:9.9,flexGrow:9.9,flexFlow:9.9,flexShrink:9.9,alignContent:9.9,alignItems:9.9,alignSelf:9.9,justifyContent:9.9,order:9.9,transition:9.9,transitionDelay:9.9,transitionDuration:9.9,transitionProperty:9.9,transitionTimingFunction:9.9,backfaceVisibility:9.9,perspective:9.9,perspectiveOrigin:9.9,transform:9.9,transformOrigin:9.9,transformStyle:9.9,transformOriginX:9.9,transformOriginY:9.9,animation:9.9,animationDelay:9.9,animationDirection:9.9,animationFillMode:9.9,animationDuration:9.9,anmationIterationCount:9.9,animationName:9.9,animationPlayState:9.9,animationTimingFunction:9.9,appearance:9.9,userSelect:9.9,fontKerning:9.9,textEmphasisPosition:9.9,textEmphasis:9.9,textEmphasisStyle:9.9,textEmphasisColor:9.9,maskImage:9.9,maskMode:9.9,maskRepeat:9.9,maskPosition:9.9,maskClip:9.9,maskOrigin:9.9,maskSize:9.9,maskComposite:9.9,mask:9.9,maskBorderSource:9.9,maskBorderMode:9.9,maskBorderSlice:9.9,maskBorderWidth:9.9,maskBorderOutset:9.9,maskBorderRepeat:9.9,maskBorder:9.9,maskType:9.9,textSizeAdjust:9.9,filter:9.9,hyphens:9.9,flowInto:9.9,flowFrom:9.9,breakBefore:9.9,breakAfter:9.9,breakInside:9.9,regionFragment:9.9,fontFeatureSettings:9.9,columnCount:9.9,columnFill:9.9,columnGap:9.9,columnRule:9.9,columnRuleColor:9.9,columnRuleStyle:9.9,columnRuleWidth:9.9,columns:9.9,columnSpan:9.9,columnWidth:9.9},op_mini:{borderImage:5,borderImageOutset:5,borderImageRepeat:5,borderImageSlice:5,borderImageSource:5,borderImageWidth:5,tabSize:5,objectFit:5,objectPosition:5}};module.exports=caniuseData; -},{}],40:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _bowser=require("bowser"),_bowser2=_interopRequireDefault(_bowser),vendorPrefixes={Webkit:["chrome","safari","ios","android","phantom","opera","webos","blackberry","bada","tizen"],Moz:["firefox","seamonkey","sailfish"],ms:["msie","msedge"]},browsers={chrome:[["chrome"],["phantom"],["webos"],["blackberry"],["bada"],["tizenn"]],safari:[["safari"]],firefox:[["firefox"],["seamonkey"],["sailfish"]],ie:[["msie"],["msedge"]],opera:[["opera"]],ios_saf:[["ios","mobile"],["ios","tablet"]],ie_mob:[["windowsphone","mobile","msie"],["windowsphone","tablet","msie"],["windowsphone","mobile","msedge"],["windowsphone","tablet","msedge"]],op_mini:[["opera","mobile"],["opera","tablet"]],and_chr:[["android","chrome","mobile"],["android","chrome","tablet"]],and_uc:[["android","mobile"],["android","mobile"]],android:[["android","mobile"],["android","mobile"]]};exports["default"]=function(e){var o=_bowser2["default"]._detect(e);Object.keys(vendorPrefixes).forEach(function(e){vendorPrefixes[e].forEach(function(r){o[r]&&(o.prefix={inline:e,CSS:"-"+e.toLowerCase()+"-"})})});var r="";return Object.keys(browsers).forEach(function(e){browsers[e].forEach(function(i){var a=0;i.forEach(function(e){o[e]&&(a+=1)}),i.length===a&&(r=e)})}),o.browser=r,o},module.exports=exports["default"]; -},{"bowser":47}],41:[function(require,module,exports){ -"use strict";function _defineProperty(e,r,o){return r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}Object.defineProperty(exports,"__esModule",{value:!0});var values=["zoom-in","zoom-out","grab","grabbing"];exports["default"]=function(e,r,o){var t=o.browser,i=o.version,n=o.prefix;return"cursor"===e&&values.indexOf(r)>-1&&("firefox"===t&&24>i||"chrome"===t&&37>i||"safari"===t&&9>i||"opera"===t&&24>i)?_defineProperty({},e,n.CSS+r):void 0},module.exports=exports["default"]; -},{}],42:[function(require,module,exports){ -"use strict";function _defineProperty(e,r,i){return r in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}Object.defineProperty(exports,"__esModule",{value:!0});var values=["flex","inline-flex"];exports["default"]=function(e,r,i){var o=i.browser,t=i.version,n=i.prefix;return"display"===e&&values.indexOf(r)>-1&&("chrome"===o&&(29>t||t>20)||("safari"===o||"ios_saf"===o)&&(9>t||t>6)||"opera"===o&&(15==t||16==t))?_defineProperty({},e,n.CSS+r):void 0},module.exports=exports["default"]; -},{}],43:[function(require,module,exports){ -"use strict";function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(exports,"__esModule",{value:!0});var alternativeValues={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end",flex:"-ms-flexbox","inline-flex":"-ms-inline-flexbox"},alternativeProps={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msPreferredSize"},properties=Object.keys(alternativeProps).concat("display");exports["default"]=function(e,t,r,i){var l=r.browser,n=r.version;return properties.indexOf(e)>-1&&("ie_mob"===l||"ie"===l)&&10==n?(delete i[e],_defineProperty({},alternativeProps[e]||e,alternativeValues[t]||t)):void 0},module.exports=exports["default"]; -},{}],44:[function(require,module,exports){ -"use strict";function _defineProperty(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}Object.defineProperty(exports,"__esModule",{value:!0});var alternativeValues={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},alternativeProps={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"},properties=Object.keys(alternativeProps).concat(["alignContent","alignSelf","display","order","flexGrow","flexShrink","flexBasis","flexDirection"]);exports["default"]=function(e,r,t){var i=t.browser,a=t.version,n=t.prefix;return properties.indexOf(e)>-1&&("firefox"===i&&22>a||"chrome"===i&&21>a||("safari"===i||"ios_saf"===i)&&6.1>=a||"android"===i&&4.4>a||"and_uc"===i)?"flexDirection"===e?{WebkitBoxOrient:r.indexOf("column")>-1?"vertical":"horizontal",WebkitBoxDirection:r.indexOf("reverse")>-1?"reverse":"normal"}:"display"===e&&alternativeValues[r]?{display:n.CSS+alternativeValues[r]}:_defineProperty({},alternativeProps[e]||e,alternativeValues[r]||r):void 0},module.exports=exports["default"]; -},{}],45:[function(require,module,exports){ -"use strict";function _defineProperty(e,r,i){return r in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}Object.defineProperty(exports,"__esModule",{value:!0});var properties=["background","backgroundImage"],values=["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient"];exports["default"]=function(e,r,i){var a=i.browser,n=i.version,t=i.prefix;return properties.indexOf(e)>-1&&values.indexOf(r)>-1&&("firefox"===a&&16>n||"chrome"===a&&26>n||("safari"===a||"ios_saf"===a)&&7>n||("opera"===a||"op_mini"===a)&&12.1>n||"android"===a&&4.4>n||"and_uc"===a)?_defineProperty({},e,t.CSS+r):void 0},module.exports=exports["default"]; -},{}],46:[function(require,module,exports){ -"use strict";function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}Object.defineProperty(exports,"__esModule",{value:!0});var properties=["maxHeight","maxWidth","width","height","columnWidth","minWidth","minHeight"],values=["min-content","max-content","fill-available","fit-content","contain-floats"];exports["default"]=function(e,t,i){var n=i.prefix;return properties.indexOf(e)>-1&&values.indexOf(t)>-1?_defineProperty({},e,n.CSS+t):void 0},module.exports=exports["default"]; -},{}],47:[function(require,module,exports){ -!function(e,i){"undefined"!=typeof module&&module.exports?module.exports=i():"function"==typeof define&&define.amd?define(i):this[e]=i()}("bowser",function(){function e(e){function o(i){var o=e.match(i);return o&&o.length>1&&o[1]||""}function s(i){var o=e.match(i);return o&&o.length>1&&o[2]||""}var r,n=o(/(ipod|iphone|ipad)/i).toLowerCase(),t=/like android/i.test(e),a=!t&&/android/i.test(e),d=/CrOS/.test(e),m=o(/edge\/(\d+(\.\d+)?)/i),v=o(/version\/(\d+(\.\d+)?)/i),b=/tablet/i.test(e),c=!b&&/[^-]mobi/i.test(e);/opera|opr/i.test(e)?r={name:"Opera",opera:i,version:v||o(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(e)?r={name:"Yandex Browser",yandexbrowser:i,version:v||o(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/windows phone/i.test(e)?(r={name:"Windows Phone",windowsphone:i},m?(r.msedge=i,r.version=m):(r.msie=i,r.version=o(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?r={name:"Internet Explorer",msie:i,version:o(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:d?r={name:"Chrome",chromeBook:i,chrome:i,version:o(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(e)?r={name:"Microsoft Edge",msedge:i,version:m}:/chrome|crios|crmo/i.test(e)?r={name:"Chrome",chrome:i,version:o(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:n?(r={name:"iphone"==n?"iPhone":"ipad"==n?"iPad":"iPod"},v&&(r.version=v)):/sailfish/i.test(e)?r={name:"Sailfish",sailfish:i,version:o(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?r={name:"SeaMonkey",seamonkey:i,version:o(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel/i.test(e)?(r={name:"Firefox",firefox:i,version:o(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(r.firefoxos=i)):/silk/i.test(e)?r={name:"Amazon Silk",silk:i,version:o(/silk\/(\d+(\.\d+)?)/i)}:a?r={name:"Android",version:v}:/phantom/i.test(e)?r={name:"PhantomJS",phantom:i,version:o(/phantomjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?r={name:"BlackBerry",blackberry:i,version:v||o(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:/(web|hpw)os/i.test(e)?(r={name:"WebOS",webos:i,version:v||o(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(r.touchpad=i)):r=/bada/i.test(e)?{name:"Bada",bada:i,version:o(/dolfin\/(\d+(\.\d+)?)/i)}:/tizen/i.test(e)?{name:"Tizen",tizen:i,version:o(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||v}:/safari/i.test(e)?{name:"Safari",safari:i,version:v}:{name:o(/^(.*)\/(.*) /),version:s(/^(.*)\/(.*) /)},!r.msedge&&/(apple)?webkit/i.test(e)?(r.name=r.name||"Webkit",r.webkit=i,!r.version&&v&&(r.version=v)):!r.opera&&/gecko\//i.test(e)&&(r.name=r.name||"Gecko",r.gecko=i,r.version=r.version||o(/gecko\/(\d+(\.\d+)?)/i)),r.msedge||!a&&!r.silk?n&&(r[n]=i,r.ios=i):r.android=i;var f="";r.windowsphone?f=o(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):n?(f=o(/os (\d+([_\s]\d+)*) like mac os x/i),f=f.replace(/[_\s]/g,".")):a?f=o(/android[ \/-](\d+(\.\d+)*)/i):r.webos?f=o(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):r.blackberry?f=o(/rim\stablet\sos\s(\d+(\.\d+)*)/i):r.bada?f=o(/bada\/(\d+(\.\d+)*)/i):r.tizen&&(f=o(/tizen[\/\s](\d+(\.\d+)*)/i)),f&&(r.osversion=f);var l=f.split(".")[0];return b||"ipad"==n||a&&(3==l||4==l&&!c)||r.silk?r.tablet=i:(c||"iphone"==n||"ipod"==n||a||r.blackberry||r.webos||r.bada)&&(r.mobile=i),r.msedge||r.msie&&r.version>=10||r.yandexbrowser&&r.version>=15||r.chrome&&r.version>=20||r.firefox&&r.version>=20||r.safari&&r.version>=6||r.opera&&r.version>=10||r.ios&&r.osversion&&r.osversion.split(".")[0]>=6||r.blackberry&&r.version>=10.1?r.a=i:r.msie&&r.version<10||r.chrome&&r.version<20||r.firefox&&r.version<20||r.safari&&r.version<6||r.opera&&r.version<10||r.ios&&r.osversion&&r.osversion.split(".")[0]<6?r.c=i:r.x=i,r}var i=!0,o=e("undefined"!=typeof navigator?navigator.userAgent:"");return o.test=function(e){for(var i=0;i=0?config.processors.pop(e):console.warn("You can only deregister processors that have been registered before.")},getProcessors:function(){return config.processors}},module.exports=exports["default"]; -},{}],51:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _State=require("./State"),_State2=_interopRequireDefault(_State),keyElementMap=new Map;exports["default"]={createListener:function(e,t,r,a,o){if(_State2["default"].has(e,r)){if(!keyElementMap.get(r)===t)return console.warn('There is a state associated with element.key="'+r+'". Use unqiue `key` or `ref` while using :hover, :focus or :active on multiple elements.'),console.warn("Look will not add state-listeners to",t),t.props}else _State2["default"].add(e,r),keyElementMap.set(r,t);var n=t.props[a];return function(e){n&&n(e),o()}}},module.exports=exports["default"]; -},{"./State":52}],52:[function(require,module,exports){ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _Config=require("./Config"),defaultKey=_Config.getDefaultKey();exports["default"]={add:function(t){var e=arguments.length<=1||void 0===arguments[1]?defaultKey:arguments[1];return t.state._look.set(e,new Map)},get:function(t){var e=arguments.length<=1||void 0===arguments[1]?defaultKey:arguments[1];return t.state._look.get(e)},set:function(t,e){var a=arguments.length<=2||void 0===arguments[2]?defaultKey:arguments[2];return e.state._look.set(a,t)},has:function(t){var e=arguments.length<=1||void 0===arguments[1]?defaultKey:arguments[1];return t.state._look.has(e)},getState:function(t,e){var a=arguments.length<=2||void 0===arguments[2]?defaultKey:arguments[2];return e.state._look.has(a)?e.state._look.get(a).get(t):!1},setState:function(t,e,a){var n=arguments.length<=3||void 0===arguments[3]?defaultKey:arguments[3];return a.state._look.get(n).set(t,e),a.setState(a.state._look)},hasState:function(t,e){var a=arguments.length<=2||void 0===arguments[2]?defaultKey:arguments[2];return e.state._look.has(a).has(t)}},module.exports=exports["default"]; -},{"./Config":50}],53:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t0?_resolver2["default"](this,_get(Object.getPrototypeOf(o.prototype),"render",this).call(this)):(console.warn(_react.Component+" was enhanced with Look, but did not provide any styles."),console.warn("This might affect performance and rendering time."),_get(Object.getPrototypeOf(o.prototype),"render",this).call(this))}}]),o}(e);return{v:s}}();if("object"==typeof s)return s.v}else{var o=function(){var s=function(s){function o(){_classCallCheck(this,o),_get(Object.getPrototypeOf(o.prototype),"constructor",this).apply(this,arguments),this._processors=prepareProcessors(this,r)}return _inherits(o,s),_createClass(o,[{key:"render",value:function(){return this.lookStyles=prepareStyles(this,_objectAssign2["default"]({},t)),_resolver2["default"](this,e(this.props))}}]),o}(_react.Component);return{v:s}}();if("object"==typeof o)return o.v}}function flattenStyles(e){return e instanceof Array?_assignStyles2["default"].apply(void 0,_toConsumableArray(e)):e instanceof Object?e:(console.warn("Pass either a valid object or an array of valid objects."),console.warn("Look can not flatten and will ignore the following styles input:",e),!1)}function prepareStyles(e,t){var r=void 0;return e.styles&&(r=_assignStyles2["default"]({},e.styles instanceof Function?e.styles.call(e):e.styles),r=resolveDefault(flattenStyles(r))),t&&(r=_assignStyles2["default"]({},r,resolveDefault(_objectAssign2["default"]({},t)))),r}function resolveDefault(e){return e&&e[Object.keys(e)[0]]instanceof Object!=!0&&(e={_default:e}),e}function prepareProcessors(e,t){var r=_apiConfig.getProcessors().slice(0);return e.processors&&(e.processors instanceof Function&&(e.processors=e.processors()),e.processors instanceof Array!=!0&&(e.processors=[e.processors]),r.push.apply(r,_toConsumableArray(e.processors))),t&&(t instanceof Array?r.push.apply(r,_toConsumableArray(t)):t instanceof Object&&r.push(t)),r}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;rs;s++)i[s]=arguments[s];return i[0]instanceof Function?_coreEnhancer2["default"].apply(void 0,i):function(e){return _coreEnhancer2["default"].apply(void 0,[e].concat(i))}},exports.Listener=_apiListener2["default"],exports.State=_apiState2["default"],exports.Config=_apiConfig2["default"],exports.MixinTypes=_utilsMixinTypes2["default"]; -},{"./api/Config":50,"./api/Listener":51,"./api/State":52,"./core/enhancer":53,"./mixins/alternative-value":58,"./mixins/condition":59,"./mixins/extend":60,"./mixins/pseudo-class/child-index":64,"./mixins/pseudo-class/child-type-index":65,"./mixins/pseudo-class/empty":66,"./processors/mixin":70,"./utils/MixinTypes":72}],58:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}Object.defineProperty(exports,"__esModule",{value:!0});var _utilsMixinTypes=require("../utils/MixinTypes"),_utilsMixinTypes2=_interopRequireDefault(_utilsMixinTypes),_utilsCamelToDashCase=require("../utils/camelToDashCase"),_utilsCamelToDashCase2=_interopRequireDefault(_utilsCamelToDashCase);exports["default"]=[{key:"",type:_utilsMixinTypes2["default"].ANY,fn:function(e,t,i){return t instanceof Array?_defineProperty({},e,t.join(";"+_utilsCamelToDashCase2["default"](e)+":")):t}}],module.exports=exports["default"]; -},{"../utils/MixinTypes":72,"../utils/camelToDashCase":73}],59:[function(require,module,exports){ -"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(exports,"__esModule",{value:!0});var _utilsMixinTypes=require("../utils/MixinTypes"),_utilsMixinTypes2=_interopRequireDefault(_utilsMixinTypes),_utilsSplitCondition=require("../utils/splitCondition"),_utilsSplitCondition2=_interopRequireDefault(_utilsSplitCondition);exports["default"]=[{key:">=",type:_utilsMixinTypes2["default"].INCLUDE,fn:function(t,i,e){var n=e.Component,u=_utilsSplitCondition2["default"](t,">=",n);return u&&u[0]>=u[1]?i:!1}},{key:"<=",type:_utilsMixinTypes2["default"].INCLUDE,fn:function(t,i,e){var n=e.Component,u=_utilsSplitCondition2["default"](t,"<=",n);return u&&u[0]<=u[1]?i:!1}},{key:"!=",type:_utilsMixinTypes2["default"].INCLUDE,fn:function(t,i,e){var n=e.Component,u=_utilsSplitCondition2["default"](t,"!=",n);return u&&u[0]!=u[1]?i:!1}},{key:">",type:_utilsMixinTypes2["default"].INCLUDE,fn:function(t,i,e){var n=e.Component,u=_utilsSplitCondition2["default"](t,">",n);return u&&u[0]>u[1]?i:!1}},{key:"<",type:_utilsMixinTypes2["default"].INCLUDE,fn:function(t,i,e){var n=e.Component,u=_utilsSplitCondition2["default"](t,"<",n);return u&&u[0]a;++a)if(getChildType(p[a])===l)return p[a]===n?t:!1}else{var u=n._owner._currentElement.key;if(!u)return!1;var o=n._owner._instance.props._parent;if(o){var l=getChildType(n._owner._currentElement),p=_utilsFlattenArray2["default"](o.props.children),a=void 0,f=p.length;for(a=0;f>a;++a)if(getChildType(p[a])===l)return p[a].key===u?t:!1}}}},{key:":last-of-type",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,t,r){var i=r.parent,n=r.element;if(i){var l=getChildType(n),p=_utilsFlattenArray2["default"](i.props.children),a=void 0,s=void 0,u=p.length;for(s=0;u>s;++s)getChildType(p[s])===l&&(a=p[s]===n?!0:!1);if(a)return t}else{var o=n._owner._currentElement.key;if(!o)return!1;var f=n._owner._instance.props._parent;if(f){var l=getChildType(n._owner._currentElement),p=_utilsFlattenArray2["default"](f.props.children),a=void 0,s=void 0,_=p.length;for(s=0;_>s;++s)getChildType(p[s])===l&&(a=p[s].key===o?!0:!1);if(a)return t}}}},{key:":only-of-type",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,t,r){var i=r.parent,n=r.element;if(i){var l=getChildType(n),p=_utilsFlattenArray2["default"](i.props.children),a=0,s=void 0,u=p.length;for(s=0;u>s;++s)getChildType(p[s])===l&&++a;if(1===a)return t}else{var o=n._owner._currentElement.key;if(!o)return!1;var f=n._owner._instance.props._parent;if(f){var l=getChildType(n._owner._currentElement),p=_utilsFlattenArray2["default"](f.props.children),a=-1,s=void 0,_=p.length;for(s=0;_>s;++s)getChildType(p[s])===l&&(++a,p[s].key===o&&++a);if(1===a)return t}}}},{key:":nth-of-type",type:_utilsMixinTypes2["default"].BEGINWITH,fn:function(e,t,r){var i=r.parent,n=r.element;if(i){var l=getChildType(n),p=_utilsFlattenArray2["default"](i.props.children),a=0,s=void 0,u=p.length;for(s=0;u>s;++s)if(getChildType(p[s])===l&&(++a,p[s]===n)){var o=_utilsSplitNthExpression2["default"](e);if(_utilsEvalNthExpression2["default"](o,a))return t}}else{var f=n._owner._currentElement.key;if(!f)return!1;var _=n._owner._instance.props._parent;if(_){var l=getChildType(n._owner._currentElement),p=_utilsFlattenArray2["default"](_.props.children),a=0,s=void 0,y=p.length;for(s=0;y>s;++s)if(getChildType(p[s])===l&&(++a,p[s].key===f)){var o=_utilsSplitNthExpression2["default"](e);if(_utilsEvalNthExpression2["default"](o,a))return t}}}}},{key:":nth-last-of-type",type:_utilsMixinTypes2["default"].BEGINWITH,fn:function(e,t,r){var i=r.parent,n=r.element;if(i){var l=getChildType(n),p=_utilsFlattenArray2["default"](i.props.children),a=void 0,s=0,u=void 0,o=p.length;for(u=0;o>u;++u)getChildType(p[u])===l&&(++s,p[u]===n&&(a=s));if(a){var f=_utilsSplitNthExpression2["default"](e);if(_utilsEvalNthExpression2["default"](f,s+1-a))return t}}else{var _=n._owner._currentElement.key;if(!_)return!1;var y=n._owner._instance.props._parent;if(y){var l=getChildType(n._owner._currentElement),p=_utilsFlattenArray2["default"](y.props.children),a=void 0,s=0,u=void 0,d=p.length;for(u=0;d>u;++u)getChildType(p[u])===l&&(++s,p[u].key===_&&(a=s));if(a){var f=_utilsSplitNthExpression2["default"](e);if(_utilsEvalNthExpression2["default"](f,s+1-a))return t}}}}}]; -},{"../../utils/MixinTypes":72,"../../utils/evalNthExpression":76,"../../utils/flattenArray":77,"../../utils/splitNthExpression":80}],66:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _utilsMixinTypes=require("../../utils/MixinTypes"),_utilsMixinTypes2=_interopRequireDefault(_utilsMixinTypes);exports["default"]=[{key:":empty",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,t,i){var u=i.newProps;return!u.children||u.children.length<1?t:!1}}],module.exports=exports["default"]; -},{"../../utils/MixinTypes":72}],67:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _utilsMixinTypes=require("../../utils/MixinTypes"),_utilsMixinTypes2=_interopRequireDefault(_utilsMixinTypes);exports["default"]=[{key:":checked",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,n,t){var i=t.newProps;return i.checked?n:!1}},{key:":disabled",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,n,t){var i=t.newProps;return i.disabled?n:!1}},{key:":enabled",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,n,t){var i=t.newProps;return i.disabled?!1:n}},{key:":required",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,n,t){var i=t.newProps;return i.required?n:!1}},{key:":optional",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,n,t){var i=t.newProps;return i.required?!1:n}},{key:":read-only",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,n,t){var i=t.newProps;return i.readOnly?n:!1}},{key:":read-write",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,n,t){var i=t.newProps;return i.readOnly?!1:n}},{key:":indeterminate",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,n,t){var i=t.newProps;return i.indeterminate?n:!1}}],module.exports=exports["default"]; -},{"../../utils/MixinTypes":72}],68:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _utilsMixinTypes=require("../../utils/MixinTypes"),_utilsMixinTypes2=_interopRequireDefault(_utilsMixinTypes);exports["default"]=[{key:":lang",type:_utilsMixinTypes2["default"].BEGINWITH,fn:function(e,t,i){var u=i.newProps;return u.lang&&e.indexOf(u.lang)>-1?t:!1}}],module.exports=exports["default"]; -},{"../../utils/MixinTypes":72}],69:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _utilsMixinTypes=require("../../utils/MixinTypes"),_utilsMixinTypes2=_interopRequireDefault(_utilsMixinTypes),_apiState=require("../../api/State"),_apiState2=_interopRequireDefault(_apiState),_apiConfig=require("../../api/Config"),_apiListener=require("../../api/Listener");exports["default"]=[{key:":active",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,t,i){var n=i.element,a=i.Component,o=i.newProps,u=n.key||n.ref||_apiConfig.getDefaultKey();return o.onMouseDown=_apiListener.createListener(a,n,u,"onMouseDown",function(){_apiState2["default"].setState("active",!0,a,u),a._lastActiveElements.push(u)}),a._onMouseUp||"undefined"==typeof window||(a._onMouseUp=function(){for(;a._lastActiveElements.length>0;){var e=a._lastActiveElements[0];_apiState2["default"].setState("active",!1,a,e),a._lastActiveElements.pop(e)}},window.addEventListener("mouseup",a._onMouseUp)),_apiState2["default"].getState("active",a,u)?t:!1}},{key:":hover",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,t,i){var n=i.element,a=i.Component,o=i.newProps,u=n.key||n.ref||_apiConfig.getDefaultKey();return o.onMouseEnter=_apiListener.createListener(a,n,u,"onMouseEnter",function(){_apiState2["default"].setState("hover",!0,a,u)}),o.onMouseLeave=_apiListener.createListener(a,n,u,"onMouseLeave",function(){_apiState2["default"].setState("hover",!1,a,u)}),_apiState2["default"].getState("hover",a,u)?t:!1}},{key:":focus",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,t,i){var n=i.element,a=i.Component,o=i.newProps,u=n.key||n.ref||_apiConfig.getDefaultKey();return o.onFocus=_apiListener.createListener(a,n,u,"onFocus",function(){_apiState2["default"].setState("focus",!0,a,u)}),o.onBlur=_apiListener.createListener(a,n,u,"onBlur",function(){_apiState2["default"].setState("focus",!1,a,u)}),_apiState2["default"].getState("focus",a,u)?t:!1}}],module.exports=exports["default"]; -},{"../../api/Config":50,"../../api/Listener":51,"../../api/State":52,"../../utils/MixinTypes":72}],70:[function(require,module,exports){ -"use strict";function _interopRequireDefault(i){return i&&i.__esModule?i:{"default":i}}function addMixin(i,e){if(_utilsMixinTypes2["default"].hasOwnProperty(i.type))e.push(i);else{var n=Object.keys(_utilsMixinTypes2["default"]).map(function(i){return" '"+i+"'"}).toString();console.warn("A valid mixinType needs to be passed. '"+i.type+"' is not a valid type of "+n)}}function resolveMixins(i,e,n){var s=void 0,t=function(){var t=i[s];if(t instanceof Object){var r=getMixins(s,e);r.length>0?(r.forEach(function(i){t=i.fn(s,t,n)}),_assignStyles2["default"](i,resolveMixins(t,e,n)),delete i[s]):resolveMixins(t,e,n)}};for(s in i)t();return i}function getMixins(i,e){var n=[],s=[];return e.forEach(function(e){isMixin(i,e)&&(e.type===_utilsMixinTypes2["default"].ANY?s.push(e):n.push(e))}),n.concat(s)}function isMixin(i,e){if(!e.hasOwnProperty("type"))return console.warn("Mixins need to provide a valid mixinType. Caused by this mixin: ",e),!1;switch(e.type){case _utilsMixinTypes2["default"].EQUAL:return i===e.key;case _utilsMixinTypes2["default"].BEGINWITH:return 0===i.indexOf(e.key);case _utilsMixinTypes2["default"].INCLUDE:return i.indexOf(e.key)>-1;case _utilsMixinTypes2["default"].REGEX:return null!==i.match(e.key);case _utilsMixinTypes2["default"].ANY:return!0;default:return!1}}function prepareMixins(i,e){return i.mixins?(i.mixins instanceof Function&&(i.mixins=i.mixins()),i.mixins instanceof Array!=!0&&(i.mixins=[i.mixins]),e.concat(i.mixins)):e?e:!1}Object.defineProperty(exports,"__esModule",{value:!0}),exports.addMixin=addMixin,exports.resolveMixins=resolveMixins,exports.getMixins=getMixins,exports.isMixin=isMixin,exports.prepareMixins=prepareMixins;var _assignStyles=require("assign-styles"),_assignStyles2=_interopRequireDefault(_assignStyles),_utilsMixinTypes=require("../utils/MixinTypes"),_utilsMixinTypes2=_interopRequireDefault(_utilsMixinTypes);exports["default"]={name:"Mixins",version:"1.0.1",description:"Resolves any self defined properties also known as mixins.",mixins:[],use:function(i){var e=this;i instanceof Array?i.forEach(function(i){addMixin(i,e.mixins)}):addMixin(i,this.mixins)},process:function(i,e){var n=prepareMixins(e.Component,this.mixins);return n&&n.length>0?resolveMixins(i,n,e):i}}; -},{"../utils/MixinTypes":72,"assign-styles":1}],71:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _inlineStylePrefixer=require("inline-style-prefixer"),_inlineStylePrefixer2=_interopRequireDefault(_inlineStylePrefixer),userAgent="undefined"!=typeof navigator?navigator.userAgent:void 0,prefixer=new _inlineStylePrefixer2["default"];exports["default"]={name:"Prefixer",version:"1.0.1",description:"Adds vendor prefix to properties if environment needs those.",process:function(e){return void 0!==userAgent?e=prefixer.prefix(e):(console.warn("Autoprefixing failed as there is no valid userAgent specified."),void console.warn("Use Config.setUserAgent to specify a custom userAgent for server-side rendering."))}},module.exports=exports["default"]; -},{"inline-style-prefixer":38}],72:[function(require,module,exports){ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]={INCLUDE:"INCLUDE",BEGINWITH:"BEGINWITH",EQUAL:"EQUAL",ANY:"ANY",REGEX:"REGEX"},module.exports=exports["default"]; -},{}],73:[function(require,module,exports){ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var CAMEL_CASE_REGEXP=/([a-z]|^)([A-Z])/g;exports["default"]=function(e){return e.replace(CAMEL_CASE_REGEXP,function(e,t,r){return t+"-"+r.toLowerCase()})},module.exports=exports["default"]; -},{}],74:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function createPseudoElement(e){var t="";e.content&&(t=e.content,delete e.content);var r=t.indexOf("url(")>-1?[_createPseudoImage2["default"](t)]:t,u={style:e};return React.createElement("span",u,r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=createPseudoElement;var _createPseudoImage=require("./createPseudoImage"),_createPseudoImage2=_interopRequireDefault(_createPseudoImage);module.exports=exports["default"]; -},{"./createPseudoImage":75}],75:[function(require,module,exports){ -"use strict";function createPseudoImage(e){return React.createElement("img",{src:e.split("url(")[1].substr(0,e.length-5)})}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=createPseudoImage,module.exports=exports["default"]; -},{}],76:[function(require,module,exports){ -"use strict";function evalNthExpression(e,r){if("odd"===e)return r%2!==0;if("even"===e)return r%2===0;var t=e.split("n");if(t.length>1){t[0]="-"===t[0]?"-1":t[0];var n=t[0]?parseInt(t[0],10):0,s=t[1]?parseInt(t[1],10):0;return n?0>n&&r>s||n>0&&s>r?!1:(r-s)/n%1===0:r>=s}return r==e}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=evalNthExpression,module.exports=exports["default"]; -},{}],77:[function(require,module,exports){ -"use strict";function flattenArray(r){if(r instanceof Array!=!0)return r;var t=[];return r.forEach(function(r){r instanceof Array&&(r=flattenArray(r)),t=t.concat(r)}),t}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=flattenArray,module.exports=exports["default"]; -},{}],78:[function(require,module,exports){ -arguments[4][36][0].apply(exports,arguments) -},{"dup":36}],79:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function splitCondition(e,r,t){var i=_objectAssign2["default"]({},t.props,t.state),n=e.split(r),o=_slicedToArray(n,2),u=o[0],s=o[1];if(i.hasOwnProperty(u)){var a=void 0===i[u]?"undefined":i[u];return _isNumber2["default"](a)||(a=(a+"").toString()),[a,s]}return!1}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function e(e,r){var t=[],i=!0,n=!1,o=void 0;try{for(var u,s=e[Symbol.iterator]();!(i=(u=s.next()).done)&&(t.push(u.value),!r||t.length!==r);i=!0);}catch(a){n=!0,o=a}finally{try{!i&&s["return"]&&s["return"]()}finally{if(n)throw o}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();exports["default"]=splitCondition;var _objectAssign=require("object-assign"),_objectAssign2=_interopRequireDefault(_objectAssign),_isNumber=require("./isNumber"),_isNumber2=_interopRequireDefault(_isNumber);module.exports=exports["default"]; -},{"./isNumber":78,"object-assign":48}],80:[function(require,module,exports){ -"use strict";function getNthExpression(e){var t=e.replace(/ /g,"").split("(");return t[1].substr(0,t[1].length-1)}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=getNthExpression,module.exports=exports["default"]; -},{}],81:[function(require,module,exports){ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=function(e,t,o){t||(t=250);var r=void 0,u=void 0;return function(){var a=o||this,i=+new Date,n=arguments;r&&r+t>i?(clearTimeout(u),u=setTimeout(function(){r=i,e.apply(a,n)},t)):(r=i,e.apply(a,n))}},module.exports=exports["default"]; -},{}]},{},[56]) - diff --git a/dist/look.min.js b/dist/look.min.js deleted file mode 100644 index e7fff2d..0000000 --- a/dist/look.min.js +++ /dev/null @@ -1,48 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;on;n++)r[n]=arguments[n];var o=r.splice(1),s=r[0];return o.forEach(function(e){if(e)for(t in e)s.hasOwnProperty(t)&&isImportant(s[t])||(s[t]=e[t])}),s}function isImportant(t){return"string"==typeof t&&t.toLowerCase().indexOf("!important")>-1}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=assignStyles,module.exports=exports["default"]; -},{}],2:[function(require,module,exports){ -"use strict";function toObject(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;module.exports=Object.assign||function(e,r){for(var t,n,o=toObject(e),a=1;a=0?config.processors.pop(e):console.warn("You can only deregister processors that have been registered before.")},getProcessors:function(){return config.processors}},module.exports=exports["default"]; -},{}],4:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _State=require("./State"),_State2=_interopRequireDefault(_State),keyElementMap=new Map;exports["default"]={createListener:function(e,t,r,a,o){if(_State2["default"].has(e,r)){if(!keyElementMap.get(r)===t)return console.warn('There is a state associated with element.key="'+r+'". Use unqiue `key` or `ref` while using :hover, :focus or :active on multiple elements.'),console.warn("Look will not add state-listeners to",t),t.props}else _State2["default"].add(e,r),keyElementMap.set(r,t);var n=t.props[a];return function(e){n&&n(e),o()}}},module.exports=exports["default"]; -},{"./State":5}],5:[function(require,module,exports){ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _Config=require("./Config"),defaultKey=_Config.getDefaultKey();exports["default"]={add:function(t){var e=arguments.length<=1||void 0===arguments[1]?defaultKey:arguments[1];return t.state._look.set(e,new Map)},get:function(t){var e=arguments.length<=1||void 0===arguments[1]?defaultKey:arguments[1];return t.state._look.get(e)},set:function(t,e){var a=arguments.length<=2||void 0===arguments[2]?defaultKey:arguments[2];return e.state._look.set(a,t)},has:function(t){var e=arguments.length<=1||void 0===arguments[1]?defaultKey:arguments[1];return t.state._look.has(e)},getState:function(t,e){var a=arguments.length<=2||void 0===arguments[2]?defaultKey:arguments[2];return e.state._look.has(a)?e.state._look.get(a).get(t):!1},setState:function(t,e,a){var n=arguments.length<=3||void 0===arguments[3]?defaultKey:arguments[3];return a.state._look.get(n).set(t,e),a.setState(a.state._look)},hasState:function(t,e){var a=arguments.length<=2||void 0===arguments[2]?defaultKey:arguments[2];return e.state._look.has(a).has(t)}},module.exports=exports["default"]; -},{"./Config":3}],6:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t0?_resolver2["default"](this,_get(Object.getPrototypeOf(o.prototype),"render",this).call(this)):(console.warn(_react.Component+" was enhanced with Look, but did not provide any styles."),console.warn("This might affect performance and rendering time."),_get(Object.getPrototypeOf(o.prototype),"render",this).call(this))}}]),o}(e);return{v:s}}();if("object"==typeof s)return s.v}else{var o=function(){var s=function(s){function o(){_classCallCheck(this,o),_get(Object.getPrototypeOf(o.prototype),"constructor",this).apply(this,arguments),this._processors=prepareProcessors(this,r)}return _inherits(o,s),_createClass(o,[{key:"render",value:function(){return this.lookStyles=prepareStyles(this,_objectAssign2["default"]({},t)),_resolver2["default"](this,e(this.props))}}]),o}(_react.Component);return{v:s}}();if("object"==typeof o)return o.v}}function flattenStyles(e){return e instanceof Array?_assignStyles2["default"].apply(void 0,_toConsumableArray(e)):e instanceof Object?e:(console.warn("Pass either a valid object or an array of valid objects."),console.warn("Look can not flatten and will ignore the following styles input:",e),!1)}function prepareStyles(e,t){var r=void 0;return e.styles&&(r=_assignStyles2["default"]({},e.styles instanceof Function?e.styles.call(e):e.styles),r=resolveDefault(flattenStyles(r))),t&&(r=_assignStyles2["default"]({},r,resolveDefault(_objectAssign2["default"]({},t)))),r}function resolveDefault(e){return e&&e[Object.keys(e)[0]]instanceof Object!=!0&&(e={_default:e}),e}function prepareProcessors(e,t){var r=_apiConfig.getProcessors().slice(0);return e.processors&&(e.processors instanceof Function&&(e.processors=e.processors()),e.processors instanceof Array!=!0&&(e.processors=[e.processors]),r.push.apply(r,_toConsumableArray(e.processors))),t&&(t instanceof Array?r.push.apply(r,_toConsumableArray(t)):t instanceof Object&&r.push(t)),r}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;rs;s++)i[s]=arguments[s];return i[0]instanceof Function?_coreEnhancer2["default"].apply(void 0,i):function(e){return _coreEnhancer2["default"].apply(void 0,[e].concat(i))}},exports.Listener=_apiListener2["default"],exports.State=_apiState2["default"],exports.Config=_apiConfig2["default"],exports.MixinTypes=_utilsMixinTypes2["default"]; -},{"./api/Config":3,"./api/Listener":4,"./api/State":5,"./core/enhancer":6,"./mixins/alternative-value":10,"./mixins/condition":11,"./mixins/extend":12,"./mixins/pseudo-class/child-index":13,"./mixins/pseudo-class/child-type-index":14,"./mixins/pseudo-class/empty":15,"./processors/mixin":16,"./utils/MixinTypes":17}],10:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}Object.defineProperty(exports,"__esModule",{value:!0});var _utilsMixinTypes=require("../utils/MixinTypes"),_utilsMixinTypes2=_interopRequireDefault(_utilsMixinTypes),_utilsCamelToDashCase=require("../utils/camelToDashCase"),_utilsCamelToDashCase2=_interopRequireDefault(_utilsCamelToDashCase);exports["default"]=[{key:"",type:_utilsMixinTypes2["default"].ANY,fn:function(e,t,i){return t instanceof Array?_defineProperty({},e,t.join(";"+_utilsCamelToDashCase2["default"](e)+":")):t}}],module.exports=exports["default"]; -},{"../utils/MixinTypes":17,"../utils/camelToDashCase":18}],11:[function(require,module,exports){ -"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(exports,"__esModule",{value:!0});var _utilsMixinTypes=require("../utils/MixinTypes"),_utilsMixinTypes2=_interopRequireDefault(_utilsMixinTypes),_utilsSplitCondition=require("../utils/splitCondition"),_utilsSplitCondition2=_interopRequireDefault(_utilsSplitCondition);exports["default"]=[{key:">=",type:_utilsMixinTypes2["default"].INCLUDE,fn:function(t,i,e){var n=e.Component,u=_utilsSplitCondition2["default"](t,">=",n);return u&&u[0]>=u[1]?i:!1}},{key:"<=",type:_utilsMixinTypes2["default"].INCLUDE,fn:function(t,i,e){var n=e.Component,u=_utilsSplitCondition2["default"](t,"<=",n);return u&&u[0]<=u[1]?i:!1}},{key:"!=",type:_utilsMixinTypes2["default"].INCLUDE,fn:function(t,i,e){var n=e.Component,u=_utilsSplitCondition2["default"](t,"!=",n);return u&&u[0]!=u[1]?i:!1}},{key:">",type:_utilsMixinTypes2["default"].INCLUDE,fn:function(t,i,e){var n=e.Component,u=_utilsSplitCondition2["default"](t,">",n);return u&&u[0]>u[1]?i:!1}},{key:"<",type:_utilsMixinTypes2["default"].INCLUDE,fn:function(t,i,e){var n=e.Component,u=_utilsSplitCondition2["default"](t,"<",n);return u&&u[0]a;++a)if(getChildType(p[a])===l)return p[a]===n?t:!1}else{var u=n._owner._currentElement.key;if(!u)return!1;var o=n._owner._instance.props._parent;if(o){var l=getChildType(n._owner._currentElement),p=_utilsFlattenArray2["default"](o.props.children),a=void 0,f=p.length;for(a=0;f>a;++a)if(getChildType(p[a])===l)return p[a].key===u?t:!1}}}},{key:":last-of-type",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,t,r){var i=r.parent,n=r.element;if(i){var l=getChildType(n),p=_utilsFlattenArray2["default"](i.props.children),a=void 0,s=void 0,u=p.length;for(s=0;u>s;++s)getChildType(p[s])===l&&(a=p[s]===n?!0:!1);if(a)return t}else{var o=n._owner._currentElement.key;if(!o)return!1;var f=n._owner._instance.props._parent;if(f){var l=getChildType(n._owner._currentElement),p=_utilsFlattenArray2["default"](f.props.children),a=void 0,s=void 0,_=p.length;for(s=0;_>s;++s)getChildType(p[s])===l&&(a=p[s].key===o?!0:!1);if(a)return t}}}},{key:":only-of-type",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,t,r){var i=r.parent,n=r.element;if(i){var l=getChildType(n),p=_utilsFlattenArray2["default"](i.props.children),a=0,s=void 0,u=p.length;for(s=0;u>s;++s)getChildType(p[s])===l&&++a;if(1===a)return t}else{var o=n._owner._currentElement.key;if(!o)return!1;var f=n._owner._instance.props._parent;if(f){var l=getChildType(n._owner._currentElement),p=_utilsFlattenArray2["default"](f.props.children),a=-1,s=void 0,_=p.length;for(s=0;_>s;++s)getChildType(p[s])===l&&(++a,p[s].key===o&&++a);if(1===a)return t}}}},{key:":nth-of-type",type:_utilsMixinTypes2["default"].BEGINWITH,fn:function(e,t,r){var i=r.parent,n=r.element;if(i){var l=getChildType(n),p=_utilsFlattenArray2["default"](i.props.children),a=0,s=void 0,u=p.length;for(s=0;u>s;++s)if(getChildType(p[s])===l&&(++a,p[s]===n)){var o=_utilsSplitNthExpression2["default"](e);if(_utilsEvalNthExpression2["default"](o,a))return t}}else{var f=n._owner._currentElement.key;if(!f)return!1;var _=n._owner._instance.props._parent;if(_){var l=getChildType(n._owner._currentElement),p=_utilsFlattenArray2["default"](_.props.children),a=0,s=void 0,y=p.length;for(s=0;y>s;++s)if(getChildType(p[s])===l&&(++a,p[s].key===f)){var o=_utilsSplitNthExpression2["default"](e);if(_utilsEvalNthExpression2["default"](o,a))return t}}}}},{key:":nth-last-of-type",type:_utilsMixinTypes2["default"].BEGINWITH,fn:function(e,t,r){var i=r.parent,n=r.element;if(i){var l=getChildType(n),p=_utilsFlattenArray2["default"](i.props.children),a=void 0,s=0,u=void 0,o=p.length;for(u=0;o>u;++u)getChildType(p[u])===l&&(++s,p[u]===n&&(a=s));if(a){var f=_utilsSplitNthExpression2["default"](e);if(_utilsEvalNthExpression2["default"](f,s+1-a))return t}}else{var _=n._owner._currentElement.key;if(!_)return!1;var y=n._owner._instance.props._parent;if(y){var l=getChildType(n._owner._currentElement),p=_utilsFlattenArray2["default"](y.props.children),a=void 0,s=0,u=void 0,d=p.length;for(u=0;d>u;++u)getChildType(p[u])===l&&(++s,p[u].key===_&&(a=s));if(a){var f=_utilsSplitNthExpression2["default"](e);if(_utilsEvalNthExpression2["default"](f,s+1-a))return t}}}}}]; -},{"../../utils/MixinTypes":17,"../../utils/evalNthExpression":19,"../../utils/flattenArray":20,"../../utils/splitNthExpression":23}],15:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _utilsMixinTypes=require("../../utils/MixinTypes"),_utilsMixinTypes2=_interopRequireDefault(_utilsMixinTypes);exports["default"]=[{key:":empty",type:_utilsMixinTypes2["default"].EQUAL,fn:function(e,t,i){var u=i.newProps;return!u.children||u.children.length<1?t:!1}}],module.exports=exports["default"]; -},{"../../utils/MixinTypes":17}],16:[function(require,module,exports){ -"use strict";function _interopRequireDefault(i){return i&&i.__esModule?i:{"default":i}}function addMixin(i,e){if(_utilsMixinTypes2["default"].hasOwnProperty(i.type))e.push(i);else{var n=Object.keys(_utilsMixinTypes2["default"]).map(function(i){return" '"+i+"'"}).toString();console.warn("A valid mixinType needs to be passed. '"+i.type+"' is not a valid type of "+n)}}function resolveMixins(i,e,n){var s=void 0,t=function(){var t=i[s];if(t instanceof Object){var r=getMixins(s,e);r.length>0?(r.forEach(function(i){t=i.fn(s,t,n)}),_assignStyles2["default"](i,resolveMixins(t,e,n)),delete i[s]):resolveMixins(t,e,n)}};for(s in i)t();return i}function getMixins(i,e){var n=[],s=[];return e.forEach(function(e){isMixin(i,e)&&(e.type===_utilsMixinTypes2["default"].ANY?s.push(e):n.push(e))}),n.concat(s)}function isMixin(i,e){if(!e.hasOwnProperty("type"))return console.warn("Mixins need to provide a valid mixinType. Caused by this mixin: ",e),!1;switch(e.type){case _utilsMixinTypes2["default"].EQUAL:return i===e.key;case _utilsMixinTypes2["default"].BEGINWITH:return 0===i.indexOf(e.key);case _utilsMixinTypes2["default"].INCLUDE:return i.indexOf(e.key)>-1;case _utilsMixinTypes2["default"].REGEX:return null!==i.match(e.key);case _utilsMixinTypes2["default"].ANY:return!0;default:return!1}}function prepareMixins(i,e){return i.mixins?(i.mixins instanceof Function&&(i.mixins=i.mixins()),i.mixins instanceof Array!=!0&&(i.mixins=[i.mixins]),e.concat(i.mixins)):e?e:!1}Object.defineProperty(exports,"__esModule",{value:!0}),exports.addMixin=addMixin,exports.resolveMixins=resolveMixins,exports.getMixins=getMixins,exports.isMixin=isMixin,exports.prepareMixins=prepareMixins;var _assignStyles=require("assign-styles"),_assignStyles2=_interopRequireDefault(_assignStyles),_utilsMixinTypes=require("../utils/MixinTypes"),_utilsMixinTypes2=_interopRequireDefault(_utilsMixinTypes);exports["default"]={name:"Mixins",version:"1.0.1",description:"Resolves any self defined properties also known as mixins.",mixins:[],use:function(i){var e=this;i instanceof Array?i.forEach(function(i){addMixin(i,e.mixins)}):addMixin(i,this.mixins)},process:function(i,e){var n=prepareMixins(e.Component,this.mixins);return n&&n.length>0?resolveMixins(i,n,e):i}}; -},{"../utils/MixinTypes":17,"assign-styles":1}],17:[function(require,module,exports){ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]={INCLUDE:"INCLUDE",BEGINWITH:"BEGINWITH",EQUAL:"EQUAL",ANY:"ANY",REGEX:"REGEX"},module.exports=exports["default"]; -},{}],18:[function(require,module,exports){ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var CAMEL_CASE_REGEXP=/([a-z]|^)([A-Z])/g;exports["default"]=function(e){return e.replace(CAMEL_CASE_REGEXP,function(e,t,r){return t+"-"+r.toLowerCase()})},module.exports=exports["default"]; -},{}],19:[function(require,module,exports){ -"use strict";function evalNthExpression(e,r){if("odd"===e)return r%2!==0;if("even"===e)return r%2===0;var t=e.split("n");if(t.length>1){t[0]="-"===t[0]?"-1":t[0];var n=t[0]?parseInt(t[0],10):0,s=t[1]?parseInt(t[1],10):0;return n?0>n&&r>s||n>0&&s>r?!1:(r-s)/n%1===0:r>=s}return r==e}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=evalNthExpression,module.exports=exports["default"]; -},{}],20:[function(require,module,exports){ -"use strict";function flattenArray(r){if(r instanceof Array!=!0)return r;var t=[];return r.forEach(function(r){r instanceof Array&&(r=flattenArray(r)),t=t.concat(r)}),t}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=flattenArray,module.exports=exports["default"]; -},{}],21:[function(require,module,exports){ -"use strict";function isNumber(e){return!isNaN(parseFloat(e))&&isFinite(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=isNumber,module.exports=exports["default"]; -},{}],22:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function splitCondition(e,r,t){var i=_objectAssign2["default"]({},t.props,t.state),n=e.split(r),o=_slicedToArray(n,2),u=o[0],s=o[1];if(i.hasOwnProperty(u)){var a=void 0===i[u]?"undefined":i[u];return _isNumber2["default"](a)||(a=(a+"").toString()),[a,s]}return!1}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function e(e,r){var t=[],i=!0,n=!1,o=void 0;try{for(var u,s=e[Symbol.iterator]();!(i=(u=s.next()).done)&&(t.push(u.value),!r||t.length!==r);i=!0);}catch(a){n=!0,o=a}finally{try{!i&&s["return"]&&s["return"]()}finally{if(n)throw o}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();exports["default"]=splitCondition;var _objectAssign=require("object-assign"),_objectAssign2=_interopRequireDefault(_objectAssign),_isNumber=require("./isNumber"),_isNumber2=_interopRequireDefault(_isNumber);module.exports=exports["default"]; -},{"./isNumber":21,"object-assign":2}],23:[function(require,module,exports){ -"use strict";function getNthExpression(e){var t=e.replace(/ /g,"").split("(");return t[1].substr(0,t[1].length-1)}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=getNthExpression,module.exports=exports["default"]; -},{}]},{},[9]) - diff --git a/docs/FAQ.md b/docs/FAQ.md index 38e7350..c0f3700 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -2,56 +2,16 @@ The FAQ should help people with common tasks. Look allows you to do a lot of things since it is quite open and customizable, but sometimes it might be a bit hard to get it done all by yourself. That's why I try to ship as many examples as possible. ## Table of content -1. [How to use additional styles & processors?](#1-additional-styles--processors) -2. [Can I reduce boilerplate?](#2-look-shortcut) -3. [Can I still use CSS somehow?](#3-css-compatibility) -4. [What about unsupported pseudo classes?](#4-look-addons) +1. [Can I still use CSS somehow?](#3-css-compatibility) -## 1. Additional styles & processors -In some situations you need to apply additional styles or use some additional processors. You can do this by passing those directly to the `Look()`-method. - -```javascript -import Look from 'react-look' -import themedStyles from './path/to/theme/Header' - -let styles = { - marginLeft: 5 -} - -@Look([styles, themedStyles]) -class Header extends React.Component {} -``` - -## 2. Look shortcut -Quite often you only want a single Look to be applied, so why should you even type a selector and reference it? Well, you don't need to. - -```javascript -import Look from 'react-look' - -@Look -class Button extends React.Component { - styles = { - color: 'blue', - fontSize: 15, - ':hover' : { - color: 'red' - } - } - - render(){ - return
Minimum
- } -} -``` -Look will actually treat a single style object as `default` and reference it automatically by using key-only `look` prop. - -## 3. CSS Compatibility +## 1. CSS Compatibility In some cases it is even useful to apply some global css selectors. This can be achieved using the [CSS](api/CSS.md).
CSS creates a static CSS strings which gets applied within an ``-tag. You can even modify it later on and CSS automatically applies your changes with a minimum of DOM manipulations. ### Usage You can either use it as you would any CSS by just applying a `className` property or use the build-in `css` property provided by extract-css mixin which resolves into a valid `className` string. Look automatically concatenates those. + ```javascript -import Look, {CSS} from 'react-look/dom' +import Look, {CSS, StyleSheet} from 'react-look/dom' let global = new CSS({ '.header' : { @@ -64,20 +24,17 @@ let global = new CSS({ }) @Look -class Header extends React.Component { - styles = { - css : '.header', - ':hover' : { - css : '.header-hover' - } - } - +class Header extends React.Component { render(){ // =>
Header
- return
Header
+ return
Header
} } -``` -## 4. Look Addons -Huh? Addons what? Yeah right, I am currently working on some nice addons which will add support for quite every unsupported CSS pseudo class. \ No newline at end of file +const styles = StyleSheet.create(Header, { + css : '.header', + ':hover' : { + css : '.header-hover' + } +}) +``` \ No newline at end of file diff --git a/package.json b/package.json index 3c22d88..a244de1 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "scripts": { "build:demo": "npm run transpile && browserify ./demo/app.jsx -t babelify -d -p [minifyify --no-map] > ./demo/bundle.js", "build:demo-dev": "npm run transpile && browserify ./demo/app.jsx -t babelify --outfile ./demo/bundle.js", - "bundle": "npm run transpile && mkdir dist && npm run bundle:core && npm run bundle:look && npm run bundle:dom", + "bundle": "npm run transpile && mkdir dist && npm run bundle:core && npm run bundle:look && npm run bundle:dom && npm run bundle:addons", "bundle:addons": "browserify src/addons.js -t babelify --external react -d -p [minifyify --no-map] > ./dist/addons.min.js", "bundle:core": "browserify src/core.js -t babelify --external react -d -p [minifyify --no-map] > ./dist/look-core.min.js", "bundle:dom": "browserify src/dom.js -t babelify --external react -d -p [minifyify --no-map] > ./dist/look-dom.min.js",