New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

glamorous

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glamorous - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

6

dist/glamorous.cjs.js

@@ -919,2 +919,8 @@ 'use strict';

returnValue.cssOverrides = cssOverrides;
if (typeof rootEl !== 'string') {
// if it's not a string, then we can forward everything
// (because it's a component)
returnValue.toForward = rest;
return returnValue;
}
}

@@ -921,0 +927,0 @@ return Object.keys(rest).reduce(function (split, propName) {

@@ -914,2 +914,8 @@ import React, { Component } from 'react';

returnValue.cssOverrides = cssOverrides;
if (typeof rootEl !== 'string') {
// if it's not a string, then we can forward everything
// (because it's a component)
returnValue.toForward = rest;
return returnValue;
}
}

@@ -916,0 +922,0 @@ return Object.keys(rest).reduce(function (split, propName) {

@@ -919,2 +919,8 @@ (function (global, factory) {

returnValue.cssOverrides = cssOverrides;
if (typeof rootEl !== 'string') {
// if it's not a string, then we can forward everything
// (because it's a component)
returnValue.toForward = rest;
return returnValue;
}
}

@@ -921,0 +927,0 @@ return Object.keys(rest).reduce(function (split, propName) {

2

dist/glamorous.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("glamor")):"function"==typeof define&&define.amd?define(["react","glamor"],t):e.glamorous=t(e.React,e.Glamor)}(this,function(e,t){"use strict";function n(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){var o=e[t]||(e[t]=[]);o.splice(o.indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).map(function(e){e(n)}),(e["*"]||[]).map(function(e){e(t,n)})}}}function o(e,t){void 0===t&&(t="__brcast__");var o=n(),r=e;return{getState:function(){return r},setState:function(e){r=e,o.emit(t,r)},subscribe:function(e){return o.on(t,e),function(){o.off(t,e)}}}}function r(n){function o(){for(var o=arguments.length,r=Array(o),d=0;d<o;d++)r[d]=arguments[d];var f=function(e){function n(){var e,t,o,r;M(this,n);for(var a=arguments.length,i=Array(a),s=0;s<a;s++)i[s]=arguments[s];return t=o=L(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(i))),o.state={theme:null},o.setTheme=function(e){return o.setState({theme:e})},r=t,L(o,r)}return F(n,e),w(n,[{key:"componentWillMount",value:function(){var e=this.props.theme;this.context[R]?this.setTheme(e||this.context[R].getState()):this.setTheme(e||{})}},{key:"componentWillReceiveProps",value:function(e){this.props.theme!==e.theme&&this.setTheme(e.theme)}},{key:"componentDidMount",value:function(){this.context[R]&&!this.props.theme&&(this.unsubscribe=this.context[R].subscribe(this.setTheme))}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe()}},{key:"render",value:function(){var e=this,o=this.props,r=o.className,a=A(o,["className"]),i=u(a,n),l=i.toForward,d=i.cssOverrides,f=n.styles.map(function(t){return"function"==typeof t?t(e.props,P({},e.state.theme)):t}),m=s(r),h=m.glamorStyles,g=m.glamorlessClassName,y=t.css.apply(void 0,j(f).concat(j(h),[d])).toString(),C=c(g,y);return p.createElement(n.comp,P({className:C},l))}}]),n}(e.Component);return f.propTypes={className:D.string,cssOverrides:D.object,theme:D.object},f.contextTypes=E({},R,D.object),Object.assign(f,a({comp:n,styles:r,rootEl:i,displayName:l})),f}var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.rootEl,l=r.displayName;return o}function a(e){var t=e.comp,n=e.styles,o=e.rootEl,r=e.displayName,a=t.comp?t.comp:t;return{styles:t.styles?t.styles.concat(n):n,comp:a,rootEl:o||a,displayName:r||"glamorous("+i(t)+")"}}function i(e){return"string"==typeof e?e:e.displayName||e.name||"unknown"}function s(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().split(" ").reduce(function(e,n){if(0===n.indexOf("css-")){var o=n.slice("css-".length),r=t.styleSheet.registered[o].style;e.glamorStyles.push(r)}else e.glamorlessClassName=c(e.glamorlessClassName,n);return e},{glamorlessClassName:"",glamorStyles:[]})}function u(e,t){var n=t.propsAreCssOverrides,o=t.rootEl,r=e.css,a=void 0===r?{}:r,i=A(e,["css"]),s={toForward:{},cssOverrides:{}};return n||(s.cssOverrides=a),Object.keys(i).reduce(function(e,t){return x(o,t)?e.toForward[t]=i[t]:n&&(e.cssOverrides[t]=i[t]),e},s)}function l(e){return e.slice(0,1).toUpperCase()+e.slice(1)}function c(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}var p="default"in e?e.default:e,d=["children","dangerouslySetInnerHTML","key","ref","autoFocus","defaultValue","valueLink","defaultChecked","checkedLink","innerHTML","suppressContentEditableWarning","onFocusIn","onFocusOut","className","onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onLoad","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onCopyCapture","onCutCapture","onPasteCapture","onCompositionEndCapture","onCompositionStartCapture","onCompositionUpdateCapture","onKeyDownCapture","onKeyPressCapture","onKeyUpCapture","onFocusCapture","onBlurCapture","onChangeCapture","onInputCapture","onSubmitCapture","onClickCapture","onContextMenuCapture","onDoubleClickCapture","onDragCapture","onDragEndCapture","onDragEnterCapture","onDragExitCapture","onDragLeaveCapture","onDragOverCapture","onDragStartCapture","onDropCapture","onMouseDownCapture","onMouseEnterCapture","onMouseLeaveCapture","onMouseMoveCapture","onMouseOutCapture","onMouseOverCapture","onMouseUpCapture","onSelectCapture","onTouchCancelCapture","onTouchEndCapture","onTouchMoveCapture","onTouchStartCapture","onScrollCapture","onWheelCapture","onAbortCapture","onCanPlayCapture","onCanPlayThroughCapture","onDurationChangeCapture","onEmptiedCapture","onEncryptedCapture","onEndedCapture","onErrorCapture","onLoadedDataCapture","onLoadedMetadataCapture","onLoadStartCapture","onPauseCapture","onPlayCapture","onPlayingCapture","onProgressCapture","onRateChangeCapture","onSeekedCapture","onSeekingCapture","onStalledCapture","onSuspendCapture","onTimeUpdateCapture","onVolumeChangeCapture","onWaitingCapture","onLoadCapture","onAnimationStartCapture","onAnimationEndCapture","onAnimationIterationCapture","onTransitionEndCapture"],f=["accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","as","async","autoComplete","// autoFocus","autoPlay","capture","cellPadding","cellSpacing","charSet","challenge","checked","cite","classID","className","cols","colSpan","content","contentEditable","contextMenu","controls","coords","crossOrigin","data","dateTime","default","defer","dir","disabled","download","draggable","encType","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","height","hidden","high","href","hrefLang","htmlFor","httpEquiv","icon","id","inputMode","integrity","is","keyParams","keyType","kind","label","lang","list","loop","low","manifest","marginHeight","marginWidth","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","name","nonce","noValidate","open","optimum","pattern","placeholder","playsInline","poster","preload","profile","radioGroup","readOnly","referrerPolicy","rel","required","reversed","role","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","span","spellCheck","src","srcDoc","srcLang","srcSet","start","step","style","summary","tabIndex","target","title","type","useMap","value","width","wmode","wrap","about","datatype","inlist","prefix","property","resource","typeof","vocab","autoCapitalize","autoCorrect","autoSave","color","itemProp","itemScope","itemType","itemID","itemRef","results","security","unselectable"],m=["accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseProfile","baselineShift","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipRule","clipPathUnits","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","ideographic","imageRendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerMid","markerStart","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textRendering","textLength","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","viewBox","viewTarget","visibility","widths","wordSpacing","writingMode","x","xHeight","x1","x2","xChannelSelector","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlns","xmlnsXlink","xmlLang","xmlSpace","y","y1","y2","yChannelSelector","z","zoomAndPan"],h=["color","height","width"],g=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),y=function(e,t){return-1!==e.indexOf(t)},C=function(e){return y(f,e)},b=function(e){return y(h,e)},v=function(e,t){return"svg"===e&&y(m,t)},k=function(e){return y(d,e)},x=function(e,t){return"string"!=typeof e||(C(t)||v(e,t)||g(t.toLowerCase())||k(t))&&("svg"===e||!b(t))},S=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"],O=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","animation","audio","canvas","circle","clipPath","color-profile","cursor","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","handler","hatch","hatchpath","hkern","iframe","image","line","linearGradient","listener","marker","mask","mesh","meshgradient","meshpatch","meshrow","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","script","set","solidColor","solidcolor","stop","style","svg","switch","symbol","tbreak","text","textArea","textPath","title","tref","tspan","unknown","use","video","view","vkern"],T=S.concat(O).filter(function(e,t,n){return n.indexOf(e)===t}),D=void 0;if("15.5"===p.version.slice(0,4))try{D=require("prop-types")}catch(e){}D=D||p.PropTypes;var M=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},w=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},F=function(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)},A=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},L=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},j=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},R="__glamorous__",U=function(e){function t(){var e,n,r,a;M(this,t);for(var i=arguments.length,s=Array(i),u=0;u<i;u++)s[u]=arguments[u];return n=r=L(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.broadcast=o(r.props.theme),r.setOuterTheme=function(e){r.outerTheme=e},a=n,L(r,a)}return F(t,e),w(t,[{key:"getTheme",value:function(e){var t=e||this.props.theme;return P({},this.outerTheme,t)}},{key:"getChildContext",value:function(){return E({},R,this.broadcast)}},{key:"componentDidMount",value:function(){this.context[R]&&(this.unsubscribe=this.context[R].subscribe(this.setOuterTheme))}},{key:"componentWillMount",value:function(){this.context[R]&&(this.setOuterTheme(this.context[R].getState()),this.broadcast.setState(this.getTheme()))}},{key:"componentWillReceiveProps",value:function(e){this.props.theme!==e.theme&&this.broadcast.setState(this.getTheme(e.theme))}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe()}},{key:"render",value:function(){return this.props.children?p.Children.only(this.props.children):null}}]),t}(e.Component);U.childContextTypes=E({},R,D.object.isRequired),U.contextTypes=E({},R,D.object),U.propTypes={theme:D.object.isRequired,children:D.node},Object.assign(r,T.reduce(function(e,t){return e[t]=r(t),e},{})),Object.assign(r,T.reduce(function(e,t){var n=l(t);return e[n]=r[t](),e[n].displayName="glamorous."+n,e[n].propsAreCssOverrides=!0,e},{}));var _=Object.freeze({default:r,ThemeProvider:U}),N=r;return Object.assign(N,Object.keys(_).reduce(function(e,t){return"default"!==t&&(e[t]=_[t]),e},{})),N});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("glamor")):"function"==typeof define&&define.amd?define(["react","glamor"],t):e.glamorous=t(e.React,e.Glamor)}(this,function(e,t){"use strict";function n(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){var o=e[t]||(e[t]=[]);o.splice(o.indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).map(function(e){e(n)}),(e["*"]||[]).map(function(e){e(t,n)})}}}function o(e,t){void 0===t&&(t="__brcast__");var o=n(),r=e;return{getState:function(){return r},setState:function(e){r=e,o.emit(t,r)},subscribe:function(e){return o.on(t,e),function(){o.off(t,e)}}}}function r(n){function o(){for(var o=arguments.length,r=Array(o),d=0;d<o;d++)r[d]=arguments[d];var f=function(e){function n(){var e,t,o,r;w(this,n);for(var a=arguments.length,i=Array(a),s=0;s<a;s++)i[s]=arguments[s];return t=o=L(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(i))),o.state={theme:null},o.setTheme=function(e){return o.setState({theme:e})},r=t,L(o,r)}return F(n,e),M(n,[{key:"componentWillMount",value:function(){var e=this.props.theme;this.context[R]?this.setTheme(e||this.context[R].getState()):this.setTheme(e||{})}},{key:"componentWillReceiveProps",value:function(e){this.props.theme!==e.theme&&this.setTheme(e.theme)}},{key:"componentDidMount",value:function(){this.context[R]&&!this.props.theme&&(this.unsubscribe=this.context[R].subscribe(this.setTheme))}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe()}},{key:"render",value:function(){var e=this,o=this.props,r=o.className,a=A(o,["className"]),i=u(a,n),l=i.toForward,d=i.cssOverrides,f=n.styles.map(function(t){return"function"==typeof t?t(e.props,P({},e.state.theme)):t}),m=s(r),h=m.glamorStyles,g=m.glamorlessClassName,y=t.css.apply(void 0,j(f).concat(j(h),[d])).toString(),C=c(g,y);return p.createElement(n.comp,P({className:C},l))}}]),n}(e.Component);return f.propTypes={className:D.string,cssOverrides:D.object,theme:D.object},f.contextTypes=E({},R,D.object),Object.assign(f,a({comp:n,styles:r,rootEl:i,displayName:l})),f}var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.rootEl,l=r.displayName;return o}function a(e){var t=e.comp,n=e.styles,o=e.rootEl,r=e.displayName,a=t.comp?t.comp:t;return{styles:t.styles?t.styles.concat(n):n,comp:a,rootEl:o||a,displayName:r||"glamorous("+i(t)+")"}}function i(e){return"string"==typeof e?e:e.displayName||e.name||"unknown"}function s(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().split(" ").reduce(function(e,n){if(0===n.indexOf("css-")){var o=n.slice("css-".length),r=t.styleSheet.registered[o].style;e.glamorStyles.push(r)}else e.glamorlessClassName=c(e.glamorlessClassName,n);return e},{glamorlessClassName:"",glamorStyles:[]})}function u(e,t){var n=t.propsAreCssOverrides,o=t.rootEl,r=e.css,a=void 0===r?{}:r,i=A(e,["css"]),s={toForward:{},cssOverrides:{}};return n||(s.cssOverrides=a,"string"==typeof o)?Object.keys(i).reduce(function(e,t){return x(o,t)?e.toForward[t]=i[t]:n&&(e.cssOverrides[t]=i[t]),e},s):(s.toForward=i,s)}function l(e){return e.slice(0,1).toUpperCase()+e.slice(1)}function c(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}var p="default"in e?e.default:e,d=["children","dangerouslySetInnerHTML","key","ref","autoFocus","defaultValue","valueLink","defaultChecked","checkedLink","innerHTML","suppressContentEditableWarning","onFocusIn","onFocusOut","className","onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onLoad","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onCopyCapture","onCutCapture","onPasteCapture","onCompositionEndCapture","onCompositionStartCapture","onCompositionUpdateCapture","onKeyDownCapture","onKeyPressCapture","onKeyUpCapture","onFocusCapture","onBlurCapture","onChangeCapture","onInputCapture","onSubmitCapture","onClickCapture","onContextMenuCapture","onDoubleClickCapture","onDragCapture","onDragEndCapture","onDragEnterCapture","onDragExitCapture","onDragLeaveCapture","onDragOverCapture","onDragStartCapture","onDropCapture","onMouseDownCapture","onMouseEnterCapture","onMouseLeaveCapture","onMouseMoveCapture","onMouseOutCapture","onMouseOverCapture","onMouseUpCapture","onSelectCapture","onTouchCancelCapture","onTouchEndCapture","onTouchMoveCapture","onTouchStartCapture","onScrollCapture","onWheelCapture","onAbortCapture","onCanPlayCapture","onCanPlayThroughCapture","onDurationChangeCapture","onEmptiedCapture","onEncryptedCapture","onEndedCapture","onErrorCapture","onLoadedDataCapture","onLoadedMetadataCapture","onLoadStartCapture","onPauseCapture","onPlayCapture","onPlayingCapture","onProgressCapture","onRateChangeCapture","onSeekedCapture","onSeekingCapture","onStalledCapture","onSuspendCapture","onTimeUpdateCapture","onVolumeChangeCapture","onWaitingCapture","onLoadCapture","onAnimationStartCapture","onAnimationEndCapture","onAnimationIterationCapture","onTransitionEndCapture"],f=["accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","as","async","autoComplete","// autoFocus","autoPlay","capture","cellPadding","cellSpacing","charSet","challenge","checked","cite","classID","className","cols","colSpan","content","contentEditable","contextMenu","controls","coords","crossOrigin","data","dateTime","default","defer","dir","disabled","download","draggable","encType","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","height","hidden","high","href","hrefLang","htmlFor","httpEquiv","icon","id","inputMode","integrity","is","keyParams","keyType","kind","label","lang","list","loop","low","manifest","marginHeight","marginWidth","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","name","nonce","noValidate","open","optimum","pattern","placeholder","playsInline","poster","preload","profile","radioGroup","readOnly","referrerPolicy","rel","required","reversed","role","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","span","spellCheck","src","srcDoc","srcLang","srcSet","start","step","style","summary","tabIndex","target","title","type","useMap","value","width","wmode","wrap","about","datatype","inlist","prefix","property","resource","typeof","vocab","autoCapitalize","autoCorrect","autoSave","color","itemProp","itemScope","itemType","itemID","itemRef","results","security","unselectable"],m=["accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseProfile","baselineShift","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipRule","clipPathUnits","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","ideographic","imageRendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerMid","markerStart","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textRendering","textLength","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","viewBox","viewTarget","visibility","widths","wordSpacing","writingMode","x","xHeight","x1","x2","xChannelSelector","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlns","xmlnsXlink","xmlLang","xmlSpace","y","y1","y2","yChannelSelector","z","zoomAndPan"],h=["color","height","width"],g=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),y=function(e,t){return-1!==e.indexOf(t)},C=function(e){return y(f,e)},b=function(e){return y(h,e)},v=function(e,t){return"svg"===e&&y(m,t)},k=function(e){return y(d,e)},x=function(e,t){return"string"!=typeof e||(C(t)||v(e,t)||g(t.toLowerCase())||k(t))&&("svg"===e||!b(t))},S=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"],O=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","animation","audio","canvas","circle","clipPath","color-profile","cursor","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","handler","hatch","hatchpath","hkern","iframe","image","line","linearGradient","listener","marker","mask","mesh","meshgradient","meshpatch","meshrow","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","script","set","solidColor","solidcolor","stop","style","svg","switch","symbol","tbreak","text","textArea","textPath","title","tref","tspan","unknown","use","video","view","vkern"],T=S.concat(O).filter(function(e,t,n){return n.indexOf(e)===t}),D=void 0;if("15.5"===p.version.slice(0,4))try{D=require("prop-types")}catch(e){}D=D||p.PropTypes;var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},M=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},F=function(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)},A=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},L=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},j=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},R="__glamorous__",U=function(e){function t(){var e,n,r,a;w(this,t);for(var i=arguments.length,s=Array(i),u=0;u<i;u++)s[u]=arguments[u];return n=r=L(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.broadcast=o(r.props.theme),r.setOuterTheme=function(e){r.outerTheme=e},a=n,L(r,a)}return F(t,e),M(t,[{key:"getTheme",value:function(e){var t=e||this.props.theme;return P({},this.outerTheme,t)}},{key:"getChildContext",value:function(){return E({},R,this.broadcast)}},{key:"componentDidMount",value:function(){this.context[R]&&(this.unsubscribe=this.context[R].subscribe(this.setOuterTheme))}},{key:"componentWillMount",value:function(){this.context[R]&&(this.setOuterTheme(this.context[R].getState()),this.broadcast.setState(this.getTheme()))}},{key:"componentWillReceiveProps",value:function(e){this.props.theme!==e.theme&&this.broadcast.setState(this.getTheme(e.theme))}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe()}},{key:"render",value:function(){return this.props.children?p.Children.only(this.props.children):null}}]),t}(e.Component);U.childContextTypes=E({},R,D.object.isRequired),U.contextTypes=E({},R,D.object),U.propTypes={theme:D.object.isRequired,children:D.node},Object.assign(r,T.reduce(function(e,t){return e[t]=r(t),e},{})),Object.assign(r,T.reduce(function(e,t){var n=l(t);return e[n]=r[t](),e[n].displayName="glamorous."+n,e[n].propsAreCssOverrides=!0,e},{}));var _=Object.freeze({default:r,ThemeProvider:U}),N=r;return Object.assign(N,Object.keys(_).reduce(function(e,t){return"default"!==t&&(e[t]=_[t]),e},{})),N});
//# sourceMappingURL=glamorous.umd.min.js.map
{
"name": "glamorous",
"version": "3.1.0",
"version": "3.2.0",
"description": "React component styling solved",

@@ -5,0 +5,0 @@ "main": "dist/glamorous.cjs.js",

@@ -300,2 +300,4 @@ <img src="https://github.com/paypal/glamorous/raw/master/other/glamorous.png" alt="glamorous logo" title="glamorous" align="right" width="150" height="150" />

> Try this out in your browser [here](https://codesandbox.io/s/o2yq9MkQk)!
```jsx

@@ -502,3 +504,3 @@ import glamorous, {ThemeProvider} from glamorous

| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars1.githubusercontent.com/u/417268?v=3" width="100px;"/><br /><sub>Pavithra Kodmad</sub>](https://github.com/pksjce)<br />💡 | [<img src="https://avatars0.githubusercontent.com/u/82070?v=3" width="100px;"/><br /><sub>Alessandro Arnodo</sub>](http://alessandro.arnodo.net)<br />[💻](https://github.com/paypal/glamorous/commits?author=vesparny) [📖](https://github.com/paypal/glamorous/commits?author=vesparny) [⚠️](https://github.com/paypal/glamorous/commits?author=vesparny) | [<img src="https://avatars1.githubusercontent.com/u/105127?v=3" width="100px;"/><br /><sub>Jason Miller</sub>](https://jasonformat.com)<br />👀 | [<img src="https://avatars0.githubusercontent.com/u/1295580?v=3" width="100px;"/><br /><sub>Kyle Welch</sub>](http://krwelch.com)<br />👀 | [<img src="https://avatars0.githubusercontent.com/u/1634922?v=3" width="100px;"/><br /><sub>Javi Velasco</sub>](http://javivelasco.com)<br />👀 | [<img src="https://avatars1.githubusercontent.com/u/6886061?v=3" width="100px;"/><br /><sub>Brandon Dail</sub>](https://twitter.com/aweary)<br />👀 | [<img src="https://avatars2.githubusercontent.com/u/1714673?v=3" width="100px;"/><br /><sub>Jason Brown</sub>](http://browniefed.com)<br />👀 |
| [<img src="https://avatars1.githubusercontent.com/u/417268?v=3" width="100px;"/><br /><sub>Pavithra Kodmad</sub>](https://github.com/pksjce)<br />💡 | [<img src="https://avatars0.githubusercontent.com/u/82070?v=3" width="100px;"/><br /><sub>Alessandro Arnodo</sub>](http://alessandro.arnodo.net)<br />[💻](https://github.com/paypal/glamorous/commits?author=vesparny) [📖](https://github.com/paypal/glamorous/commits?author=vesparny) [⚠️](https://github.com/paypal/glamorous/commits?author=vesparny) | [<img src="https://avatars1.githubusercontent.com/u/105127?v=3" width="100px;"/><br /><sub>Jason Miller</sub>](https://jasonformat.com)<br />👀 | [<img src="https://avatars0.githubusercontent.com/u/1295580?v=3" width="100px;"/><br /><sub>Kyle Welch</sub>](http://www.krwelch.com)<br />👀 💡 | [<img src="https://avatars0.githubusercontent.com/u/1634922?v=3" width="100px;"/><br /><sub>Javi Velasco</sub>](http://javivelasco.com)<br />👀 | [<img src="https://avatars1.githubusercontent.com/u/6886061?v=3" width="100px;"/><br /><sub>Brandon Dail</sub>](https://twitter.com/aweary)<br />👀 | [<img src="https://avatars2.githubusercontent.com/u/1714673?v=3" width="100px;"/><br /><sub>Jason Brown</sub>](http://browniefed.com)<br />👀 |
<!-- ALL-CONTRIBUTORS-LIST:END -->

@@ -505,0 +507,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc