emotion-theming
Advanced tools
Comparing version 10.0.27 to 10.3.0
# emotion-theming | ||
## 10.3.0 | ||
### Minor Changes | ||
- [#2560](https://github.com/emotion-js/emotion/pull/2560) [`b5a26619`](https://github.com/emotion-js/emotion/commit/b5a26619b158703e9bc653f6297b33350c9e7b40) Thanks [@eps1lon](https://github.com/eps1lon)! - Dropped usage of a deprecated `SFC` React type in favor of `FC`. The `FC` type has been introduced in `@types/react@16.7.2` so this version of this package is now a minimum requirement for TypeScript users. | ||
## 10.0.27 | ||
@@ -4,0 +10,0 @@ |
@@ -5,15 +5,20 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty')); | ||
var _defineProperty = require('@babel/runtime/helpers/defineProperty'); | ||
var React = require('react'); | ||
var React__default = _interopDefault(React); | ||
var core = require('@emotion/core'); | ||
var weakMemoize = _interopDefault(require('@emotion/weak-memoize')); | ||
var _extends = _interopDefault(require('@babel/runtime/helpers/extends')); | ||
var hoistNonReactStatics = _interopDefault(require('hoist-non-react-statics')); | ||
var weakMemoize = require('@emotion/weak-memoize'); | ||
var _extends = require('@babel/runtime/helpers/extends'); | ||
var hoistNonReactStatics = require('hoist-non-react-statics'); | ||
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } | ||
var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty); | ||
var React__default = /*#__PURE__*/_interopDefault(React); | ||
var weakMemoize__default = /*#__PURE__*/_interopDefault(weakMemoize); | ||
var _extends__default = /*#__PURE__*/_interopDefault(_extends); | ||
var hoistNonReactStatics__default = /*#__PURE__*/_interopDefault(hoistNonReactStatics); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -38,4 +43,4 @@ var getTheme = function getTheme(outerTheme, theme) { | ||
var createCacheWithTheme = weakMemoize(function (outerTheme) { | ||
return weakMemoize(function (theme) { | ||
var createCacheWithTheme = weakMemoize__default['default'](function (outerTheme) { | ||
return weakMemoize__default['default'](function (theme) { | ||
return getTheme(outerTheme, theme); | ||
@@ -46,3 +51,3 @@ }); | ||
var ThemeProvider = function ThemeProvider(props) { | ||
return React.createElement(core.ThemeContext.Consumer, null, function (theme) { | ||
return /*#__PURE__*/React.createElement(core.ThemeContext.Consumer, null, function (theme) { | ||
if (props.theme !== theme) { | ||
@@ -52,3 +57,3 @@ theme = createCacheWithTheme(theme)(props.theme); | ||
return React.createElement(core.ThemeContext.Provider, { | ||
return /*#__PURE__*/React.createElement(core.ThemeContext.Provider, { | ||
value: theme | ||
@@ -64,4 +69,4 @@ }, props.children); | ||
var render = function render(props, ref) { | ||
return React.createElement(core.ThemeContext.Consumer, null, function (theme) { | ||
return React.createElement(Component, _extends({ | ||
return /*#__PURE__*/React.createElement(core.ThemeContext.Consumer, null, function (theme) { | ||
return /*#__PURE__*/React.createElement(Component, _extends__default['default']({ | ||
theme: theme, | ||
@@ -74,9 +79,9 @@ ref: ref | ||
var WithTheme = React.forwardRef(render); | ||
var WithTheme = /*#__PURE__*/React.forwardRef(render); | ||
WithTheme.displayName = "WithTheme(" + componentName + ")"; | ||
return hoistNonReactStatics(WithTheme, Component); | ||
return hoistNonReactStatics__default['default'](WithTheme, Component); | ||
} | ||
function useTheme() { | ||
return React__default.useContext(core.ThemeContext); | ||
return React__default['default'].useContext(core.ThemeContext); | ||
} | ||
@@ -83,0 +88,0 @@ |
@@ -1,6 +0,6 @@ | ||
import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
import React__default, { createElement, forwardRef } from 'react'; | ||
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty'; | ||
import React, { createElement, forwardRef } from 'react'; | ||
import { ThemeContext } from '@emotion/core'; | ||
import weakMemoize from '@emotion/weak-memoize'; | ||
import _extends from '@babel/runtime/helpers/extends'; | ||
import _extends from '@babel/runtime/helpers/esm/extends'; | ||
import hoistNonReactStatics from 'hoist-non-react-statics'; | ||
@@ -10,3 +10,3 @@ | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -38,3 +38,3 @@ var getTheme = function getTheme(outerTheme, theme) { | ||
var ThemeProvider = function ThemeProvider(props) { | ||
return createElement(ThemeContext.Consumer, null, function (theme) { | ||
return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) { | ||
if (props.theme !== theme) { | ||
@@ -44,3 +44,3 @@ theme = createCacheWithTheme(theme)(props.theme); | ||
return createElement(ThemeContext.Provider, { | ||
return /*#__PURE__*/createElement(ThemeContext.Provider, { | ||
value: theme | ||
@@ -56,4 +56,4 @@ }, props.children); | ||
var render = function render(props, ref) { | ||
return createElement(ThemeContext.Consumer, null, function (theme) { | ||
return createElement(Component, _extends({ | ||
return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) { | ||
return /*#__PURE__*/createElement(Component, _extends({ | ||
theme: theme, | ||
@@ -66,3 +66,3 @@ ref: ref | ||
var WithTheme = forwardRef(render); | ||
var WithTheme = /*#__PURE__*/forwardRef(render); | ||
WithTheme.displayName = "WithTheme(" + componentName + ")"; | ||
@@ -73,5 +73,5 @@ return hoistNonReactStatics(WithTheme, Component); | ||
function useTheme() { | ||
return React__default.useContext(ThemeContext); | ||
return React.useContext(ThemeContext); | ||
} | ||
export { ThemeProvider, useTheme, withTheme }; |
@@ -5,15 +5,20 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty')); | ||
var _defineProperty = require('@babel/runtime/helpers/defineProperty'); | ||
var React = require('react'); | ||
var React__default = _interopDefault(React); | ||
var core = require('@emotion/core'); | ||
var weakMemoize = _interopDefault(require('@emotion/weak-memoize')); | ||
var _extends = _interopDefault(require('@babel/runtime/helpers/extends')); | ||
var hoistNonReactStatics = _interopDefault(require('hoist-non-react-statics')); | ||
var weakMemoize = require('@emotion/weak-memoize'); | ||
var _extends = require('@babel/runtime/helpers/extends'); | ||
var hoistNonReactStatics = require('hoist-non-react-statics'); | ||
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } | ||
var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty); | ||
var React__default = /*#__PURE__*/_interopDefault(React); | ||
var weakMemoize__default = /*#__PURE__*/_interopDefault(weakMemoize); | ||
var _extends__default = /*#__PURE__*/_interopDefault(_extends); | ||
var hoistNonReactStatics__default = /*#__PURE__*/_interopDefault(hoistNonReactStatics); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -38,4 +43,4 @@ var getTheme = function getTheme(outerTheme, theme) { | ||
var createCacheWithTheme = weakMemoize(function (outerTheme) { | ||
return weakMemoize(function (theme) { | ||
var createCacheWithTheme = weakMemoize__default['default'](function (outerTheme) { | ||
return weakMemoize__default['default'](function (theme) { | ||
return getTheme(outerTheme, theme); | ||
@@ -46,3 +51,3 @@ }); | ||
var ThemeProvider = function ThemeProvider(props) { | ||
return React.createElement(core.ThemeContext.Consumer, null, function (theme) { | ||
return /*#__PURE__*/React.createElement(core.ThemeContext.Consumer, null, function (theme) { | ||
if (props.theme !== theme) { | ||
@@ -52,3 +57,3 @@ theme = createCacheWithTheme(theme)(props.theme); | ||
return React.createElement(core.ThemeContext.Provider, { | ||
return /*#__PURE__*/React.createElement(core.ThemeContext.Provider, { | ||
value: theme | ||
@@ -64,4 +69,4 @@ }, props.children); | ||
var render = function render(props, ref) { | ||
return React.createElement(core.ThemeContext.Consumer, null, function (theme) { | ||
return React.createElement(Component, _extends({ | ||
return /*#__PURE__*/React.createElement(core.ThemeContext.Consumer, null, function (theme) { | ||
return /*#__PURE__*/React.createElement(Component, _extends__default['default']({ | ||
theme: theme, | ||
@@ -74,9 +79,9 @@ ref: ref | ||
var WithTheme = React.forwardRef(render); | ||
var WithTheme = /*#__PURE__*/React.forwardRef(render); | ||
WithTheme.displayName = "WithTheme(" + componentName + ")"; | ||
return hoistNonReactStatics(WithTheme, Component); | ||
return hoistNonReactStatics__default['default'](WithTheme, Component); | ||
} | ||
function useTheme() { | ||
return React__default.useContext(core.ThemeContext); | ||
return React__default['default'].useContext(core.ThemeContext); | ||
} | ||
@@ -83,0 +88,0 @@ |
"use strict"; | ||
function _interopDefault(ex) { | ||
return ex && "object" == typeof ex && "default" in ex ? ex.default : ex; | ||
} | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -11,4 +7,12 @@ value: !0 | ||
var _defineProperty = _interopDefault(require("@babel/runtime/helpers/defineProperty")), React = require("react"), React__default = _interopDefault(React), core = require("@emotion/core"), weakMemoize = _interopDefault(require("@emotion/weak-memoize")), _extends = _interopDefault(require("@babel/runtime/helpers/extends")), hoistNonReactStatics = _interopDefault(require("hoist-non-react-statics")); | ||
var _defineProperty = require("@babel/runtime/helpers/defineProperty"), React = require("react"), core = require("@emotion/core"), weakMemoize = require("@emotion/weak-memoize"), _extends = require("@babel/runtime/helpers/extends"), hoistNonReactStatics = require("hoist-non-react-statics"); | ||
function _interopDefault(e) { | ||
return e && e.__esModule ? e : { | ||
default: e | ||
}; | ||
} | ||
var _defineProperty__default = _interopDefault(_defineProperty), React__default = _interopDefault(React), weakMemoize__default = _interopDefault(weakMemoize), _extends__default = _interopDefault(_extends), hoistNonReactStatics__default = _interopDefault(hoistNonReactStatics); | ||
function ownKeys(object, enumerableOnly) { | ||
@@ -18,5 +22,5 @@ var keys = Object.keys(object); | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function(sym) { | ||
enumerableOnly && (symbols = symbols.filter((function(sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
}))), keys.push.apply(keys, symbols); | ||
} | ||
@@ -29,7 +33,7 @@ return keys; | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(source, !0).forEach(function(key) { | ||
_defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(source).forEach(function(key) { | ||
i % 2 ? ownKeys(Object(source), !0).forEach((function(key) { | ||
_defineProperty__default.default(target, key, source[key]); | ||
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach((function(key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
})); | ||
} | ||
@@ -40,9 +44,13 @@ return target; | ||
var getTheme = function(outerTheme, theme) { | ||
return "function" == typeof theme ? theme(outerTheme) : _objectSpread({}, outerTheme, {}, theme); | ||
}, createCacheWithTheme = weakMemoize(function(outerTheme) { | ||
return weakMemoize(function(theme) { | ||
if ("function" == typeof theme) { | ||
var mergedTheme = theme(outerTheme); | ||
return mergedTheme; | ||
} | ||
return _objectSpread({}, outerTheme, {}, theme); | ||
}, createCacheWithTheme = weakMemoize__default.default((function(outerTheme) { | ||
return weakMemoize__default.default((function(theme) { | ||
return getTheme(outerTheme, theme); | ||
}); | ||
}), ThemeProvider = function(props) { | ||
return React.createElement(core.ThemeContext.Consumer, null, function(theme) { | ||
})); | ||
})), ThemeProvider = function(props) { | ||
return React.createElement(core.ThemeContext.Consumer, null, (function(theme) { | ||
return props.theme !== theme && (theme = createCacheWithTheme(theme)(props.theme)), | ||
@@ -52,21 +60,21 @@ React.createElement(core.ThemeContext.Provider, { | ||
}, props.children); | ||
}); | ||
})); | ||
}; | ||
function withTheme(Component) { | ||
var componentName = Component.displayName || Component.name || "Component", WithTheme = React.forwardRef(function(props, ref) { | ||
return React.createElement(core.ThemeContext.Consumer, null, function(theme) { | ||
return React.createElement(Component, _extends({ | ||
var componentName = Component.displayName || Component.name || "Component", render = function(props, ref) { | ||
return React.createElement(core.ThemeContext.Consumer, null, (function(theme) { | ||
return React.createElement(Component, _extends__default.default({ | ||
theme: theme, | ||
ref: ref | ||
}, props)); | ||
}); | ||
}); | ||
return WithTheme.displayName = "WithTheme(" + componentName + ")", hoistNonReactStatics(WithTheme, Component); | ||
})); | ||
}, WithTheme = React.forwardRef(render); | ||
return WithTheme.displayName = "WithTheme(" + componentName + ")", hoistNonReactStatics__default.default(WithTheme, Component); | ||
} | ||
function useTheme() { | ||
return React__default.useContext(core.ThemeContext); | ||
return React__default.default.useContext(core.ThemeContext); | ||
} | ||
exports.ThemeProvider = ThemeProvider, exports.useTheme = useTheme, exports.withTheme = withTheme; |
@@ -1,6 +0,6 @@ | ||
import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
import React__default, { createElement, forwardRef } from 'react'; | ||
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty'; | ||
import React, { createElement, forwardRef } from 'react'; | ||
import { ThemeContext } from '@emotion/core'; | ||
import weakMemoize from '@emotion/weak-memoize'; | ||
import _extends from '@babel/runtime/helpers/extends'; | ||
import _extends from '@babel/runtime/helpers/esm/extends'; | ||
import hoistNonReactStatics from 'hoist-non-react-statics'; | ||
@@ -10,3 +10,3 @@ | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -38,3 +38,3 @@ var getTheme = function getTheme(outerTheme, theme) { | ||
var ThemeProvider = function ThemeProvider(props) { | ||
return createElement(ThemeContext.Consumer, null, function (theme) { | ||
return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) { | ||
if (props.theme !== theme) { | ||
@@ -44,3 +44,3 @@ theme = createCacheWithTheme(theme)(props.theme); | ||
return createElement(ThemeContext.Provider, { | ||
return /*#__PURE__*/createElement(ThemeContext.Provider, { | ||
value: theme | ||
@@ -56,4 +56,4 @@ }, props.children); | ||
var render = function render(props, ref) { | ||
return createElement(ThemeContext.Consumer, null, function (theme) { | ||
return createElement(Component, _extends({ | ||
return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) { | ||
return /*#__PURE__*/createElement(Component, _extends({ | ||
theme: theme, | ||
@@ -66,3 +66,3 @@ ref: ref | ||
var WithTheme = forwardRef(render); | ||
var WithTheme = /*#__PURE__*/forwardRef(render); | ||
WithTheme.displayName = "WithTheme(" + componentName + ")"; | ||
@@ -73,5 +73,5 @@ return hoistNonReactStatics(WithTheme, Component); | ||
function useTheme() { | ||
return React__default.useContext(ThemeContext); | ||
return React.useContext(ThemeContext); | ||
} | ||
export { ThemeProvider, useTheme, withTheme }; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@emotion/core")):"function"==typeof define&&define.amd?define(["exports","react","@emotion/core"],t):t((e=e||self).emotionTheming={},e.React,e.emotionCore)}(this,function(e,t,r){"use strict";var o="default"in t?t.default:t;var n=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},i=function(e){var t=new WeakMap;return function(r){if(t.has(r))return t.get(r);var o=e(r);return t.set(r,o),o}};function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}var s=function(e,t){return"function"==typeof t?t(e):function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(r,!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e,{},t)},u=i(function(e){return i(function(t){return s(e,t)})});function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function f(e,t){return e(t={exports:{}},t.exports),t.exports}var p=f(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},t.apply(this,arguments)}e.exports=t}),l=f(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,n=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,a=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,l=r?Symbol.for("react.forward_ref"):60112,y=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.memo"):60115,d=r?Symbol.for("react.lazy"):60116;function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case p:case i:case s:case c:case y:return e;default:switch(e=e&&e.$$typeof){case a:case l:case u:return e;default:return t}}case d:case m:case n:return t}}}function P(e){return b(e)===p}t.typeOf=b,t.AsyncMode=f,t.ConcurrentMode=p,t.ContextConsumer=a,t.ContextProvider=u,t.Element=o,t.ForwardRef=l,t.Fragment=i,t.Lazy=d,t.Memo=m,t.Portal=n,t.Profiler=s,t.StrictMode=c,t.Suspense=y,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===s||e===c||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===m||e.$$typeof===u||e.$$typeof===a||e.$$typeof===l)},t.isAsyncMode=function(e){return P(e)||b(e)===f},t.isConcurrentMode=P,t.isContextConsumer=function(e){return b(e)===a},t.isContextProvider=function(e){return b(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return b(e)===l},t.isFragment=function(e){return b(e)===i},t.isLazy=function(e){return b(e)===d},t.isMemo=function(e){return b(e)===m},t.isPortal=function(e){return b(e)===n},t.isProfiler=function(e){return b(e)===s},t.isStrictMode=function(e){return b(e)===c},t.isSuspense=function(e){return b(e)===y}});a(l);l.typeOf,l.AsyncMode,l.ConcurrentMode,l.ContextConsumer,l.ContextProvider,l.Element,l.ForwardRef,l.Fragment,l.Lazy,l.Memo,l.Portal,l.Profiler,l.StrictMode,l.Suspense,l.isValidElementType,l.isAsyncMode,l.isConcurrentMode,l.isContextConsumer,l.isContextProvider,l.isElement,l.isForwardRef,l.isFragment,l.isLazy,l.isMemo,l.isPortal,l.isProfiler,l.isStrictMode,l.isSuspense;var y=f(function(e,t){});a(y);y.typeOf,y.AsyncMode,y.ConcurrentMode,y.ContextConsumer,y.ContextProvider,y.Element,y.ForwardRef,y.Fragment,y.Lazy,y.Memo,y.Portal,y.Profiler,y.StrictMode,y.Suspense,y.isValidElementType,y.isAsyncMode,y.isConcurrentMode,y.isContextConsumer,y.isContextProvider,y.isElement,y.isForwardRef,y.isFragment,y.isLazy,y.isMemo,y.isPortal,y.isProfiler,y.isStrictMode,y.isSuspense;var m=f(function(e){e.exports=l}),d={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},b={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},P={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},v={};function O(e){return m.isMemo(e)?P:v[e.$$typeof]||d}v[m.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var C=Object.defineProperty,h=Object.getOwnPropertyNames,S=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,x=Object.getPrototypeOf,M=Object.prototype;var w=function e(t,r,o){if("string"!=typeof r){if(M){var n=x(r);n&&n!==M&&e(t,n,o)}var i=h(r);S&&(i=i.concat(S(r)));for(var c=O(t),s=O(r),u=0;u<i.length;++u){var a=i[u];if(!(b[a]||o&&o[a]||s&&s[a]||c&&c[a])){var f=g(r,a);try{C(t,a,f)}catch(e){}}}return t}return t};e.ThemeProvider=function(e){return t.createElement(r.ThemeContext.Consumer,null,function(o){return e.theme!==o&&(o=u(o)(e.theme)),t.createElement(r.ThemeContext.Provider,{value:o},e.children)})},e.useTheme=function(){return o.useContext(r.ThemeContext)},e.withTheme=function(e){var o=e.displayName||e.name||"Component",n=t.forwardRef(function(o,n){return t.createElement(r.ThemeContext.Consumer,null,function(r){return t.createElement(e,p({theme:r,ref:n},o))})});return n.displayName="WithTheme("+o+")",w(n,e)},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@emotion/core")):"function"==typeof define&&define.amd?define(["exports","react","@emotion/core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).emotionTheming={},e.React,e.emotionCore)}(this,(function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var o=n(t);var c=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},u=function(e){var t=new WeakMap;return function(r){if(t.has(r))return t.get(r);var n=e(r);return t.set(r,n),n}};function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var f=function(e,t){if("function"==typeof t){var r=t(e);return r}return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{},t)},a=u((function(e){return u((function(t){return f(e,t)}))}));function s(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var p=s((function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(this,arguments)}e.exports=t})),l=s((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,c=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,i=r?Symbol.for("react.profiler"):60114,f=r?Symbol.for("react.provider"):60109,a=r?Symbol.for("react.context"):60110,s=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,l=r?Symbol.for("react.forward_ref"):60112,y=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.memo"):60115,d=r?Symbol.for("react.lazy"):60116;function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case s:case p:case c:case i:case u:case y:return e;default:switch(e=e&&e.$$typeof){case a:case l:case f:return e;default:return t}}case d:case m:case o:return t}}}function h(e){return b(e)===p}t.typeOf=b,t.AsyncMode=s,t.ConcurrentMode=p,t.ContextConsumer=a,t.ContextProvider=f,t.Element=n,t.ForwardRef=l,t.Fragment=c,t.Lazy=d,t.Memo=m,t.Portal=o,t.Profiler=i,t.StrictMode=u,t.Suspense=y,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===c||e===p||e===i||e===u||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===m||e.$$typeof===f||e.$$typeof===a||e.$$typeof===l)},t.isAsyncMode=function(e){return h(e)||b(e)===s},t.isConcurrentMode=h,t.isContextConsumer=function(e){return b(e)===a},t.isContextProvider=function(e){return b(e)===f},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return b(e)===l},t.isFragment=function(e){return b(e)===c},t.isLazy=function(e){return b(e)===d},t.isMemo=function(e){return b(e)===m},t.isPortal=function(e){return b(e)===o},t.isProfiler=function(e){return b(e)===i},t.isStrictMode=function(e){return b(e)===u},t.isSuspense=function(e){return b(e)===y}})),y=(s((function(e,t){0})),s((function(e){e.exports=l}))),m={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},d={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},b={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},h={};function v(e){return y.isMemo(e)?b:h[e.$$typeof]||m}h[y.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var O=Object.defineProperty,g=Object.getOwnPropertyNames,P=Object.getOwnPropertySymbols,j=Object.getOwnPropertyDescriptor,S=Object.getPrototypeOf,w=Object.prototype;var x=function e(t,r,n){if("string"!=typeof r){if(w){var o=S(r);o&&o!==w&&e(t,o,n)}var c=g(r);P&&(c=c.concat(P(r)));for(var u=v(t),i=v(r),f=0;f<c.length;++f){var a=c[f];if(!(d[a]||n&&n[a]||i&&i[a]||u&&u[a])){var s=j(r,a);try{O(t,a,s)}catch(e){}}}return t}return t};e.ThemeProvider=function(e){return t.createElement(r.ThemeContext.Consumer,null,(function(n){return e.theme!==n&&(n=a(n)(e.theme)),t.createElement(r.ThemeContext.Provider,{value:n},e.children)}))},e.useTheme=function(){return o.default.useContext(r.ThemeContext)},e.withTheme=function(e){var n=e.displayName||e.name||"Component",o=function(n,o){return t.createElement(r.ThemeContext.Consumer,null,(function(r){return t.createElement(e,p({theme:r,ref:o},n))}))},c=t.forwardRef(o);return c.displayName="WithTheme("+n+")",x(c,e)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=emotion-theming.umd.min.js.map |
{ | ||
"name": "emotion-theming", | ||
"version": "10.0.27", | ||
"version": "10.3.0", | ||
"description": "A CSS-in-JS theming solution, inspired by styled-components", | ||
@@ -35,7 +35,7 @@ "main": "dist/emotion-theming.cjs.js", | ||
"devDependencies": { | ||
"@emotion/core": "^10.0.27", | ||
"@emotion/styled": "^10.0.27", | ||
"@emotion/core": "^10.3.0", | ||
"@emotion/styled": "^10.3.0", | ||
"@types/react": "^16.8.20", | ||
"dtslint": "^0.3.0", | ||
"react": "^16.5.2" | ||
"react": "16.14.0" | ||
}, | ||
@@ -42,0 +42,0 @@ "dependencies": { |
@@ -25,3 +25,3 @@ // Definitions by: Junyoung Clare Jang <https://github.com/Ailrun> | ||
component: C | ||
): React.SFC<AddOptionalTo<PropsOf<C>, 'theme'>> | ||
): React.FC<AddOptionalTo<PropsOf<C>, 'theme'>> | ||
@@ -32,3 +32,3 @@ export interface EmotionTheming<Theme> { | ||
component: C | ||
): React.SFC<AddOptionalTo<PropsOf<C>, 'theme'>> | ||
): React.FC<AddOptionalTo<PropsOf<C>, 'theme'>> | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64183
588