@theme-ui/theme-provider
Advanced tools
Comparing version 0.15.0--canary.2215.ff6a38fe74fc9efa00cc1961a6061e030a67fce5.0 to 0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0
@@ -16,37 +16,38 @@ 'use strict'; | ||
const RootStyles = () => core.jsx(react.Global, { | ||
styles: emotionTheme => { | ||
var _theme$config; | ||
var RootStyles = function RootStyles() { | ||
return core.jsx(react.Global, { | ||
styles: function styles(emotionTheme) { | ||
var _theme$config; | ||
const theme = emotionTheme; | ||
const { | ||
useRootStyles | ||
} = theme.config || theme; | ||
var theme = emotionTheme; | ||
if (useRootStyles === false || theme.styles && !theme.styles.root) { | ||
return null; | ||
} | ||
var _ref = theme.config || theme, | ||
useRootStyles = _ref.useRootStyles; | ||
const boxSizing = ((_theme$config = theme.config) == null ? void 0 : _theme$config.useBorderBox) === false ? undefined : 'border-box'; | ||
return css.css({ | ||
'*': { | ||
boxSizing | ||
}, | ||
html: { | ||
variant: 'styles.root' | ||
}, | ||
body: { | ||
margin: 0 | ||
if (useRootStyles === false || theme.styles && !theme.styles.root) { | ||
return null; | ||
} | ||
})(theme); | ||
} | ||
}); | ||
const ThemeProvider = ({ | ||
theme, | ||
components, | ||
children | ||
}) => { | ||
const outer = core.useThemeUI(); | ||
const isTopLevel = outer === core.__themeUiDefaultContextValue; | ||
var boxSizing = ((_theme$config = theme.config) == null ? void 0 : _theme$config.useBorderBox) === false ? undefined : 'border-box'; | ||
return css.css({ | ||
'*': { | ||
boxSizing: boxSizing | ||
}, | ||
html: { | ||
variant: 'styles.root' | ||
}, | ||
body: { | ||
margin: 0 | ||
} | ||
})(theme); | ||
} | ||
}); | ||
}; | ||
var ThemeProvider = function ThemeProvider(_ref2) { | ||
var theme = _ref2.theme, | ||
components = _ref2.components, | ||
children = _ref2.children; | ||
var outer = core.useThemeUI(); | ||
var isTopLevel = outer === core.__themeUiDefaultContextValue; | ||
return /*#__PURE__*/React__default['default'].createElement(core.ThemeProvider, { | ||
@@ -53,0 +54,0 @@ theme: theme |
@@ -16,37 +16,38 @@ 'use strict'; | ||
const RootStyles = () => core.jsx(react.Global, { | ||
styles: emotionTheme => { | ||
var _theme$config; | ||
var RootStyles = function RootStyles() { | ||
return core.jsx(react.Global, { | ||
styles: function styles(emotionTheme) { | ||
var _theme$config; | ||
const theme = emotionTheme; | ||
const { | ||
useRootStyles | ||
} = theme.config || theme; | ||
var theme = emotionTheme; | ||
if (useRootStyles === false || theme.styles && !theme.styles.root) { | ||
return null; | ||
} | ||
var _ref = theme.config || theme, | ||
useRootStyles = _ref.useRootStyles; | ||
const boxSizing = ((_theme$config = theme.config) == null ? void 0 : _theme$config.useBorderBox) === false ? undefined : 'border-box'; | ||
return css.css({ | ||
'*': { | ||
boxSizing | ||
}, | ||
html: { | ||
variant: 'styles.root' | ||
}, | ||
body: { | ||
margin: 0 | ||
if (useRootStyles === false || theme.styles && !theme.styles.root) { | ||
return null; | ||
} | ||
})(theme); | ||
} | ||
}); | ||
const ThemeProvider = ({ | ||
theme, | ||
components, | ||
children | ||
}) => { | ||
const outer = core.useThemeUI(); | ||
const isTopLevel = outer === core.__themeUiDefaultContextValue; | ||
var boxSizing = ((_theme$config = theme.config) == null ? void 0 : _theme$config.useBorderBox) === false ? undefined : 'border-box'; | ||
return css.css({ | ||
'*': { | ||
boxSizing: boxSizing | ||
}, | ||
html: { | ||
variant: 'styles.root' | ||
}, | ||
body: { | ||
margin: 0 | ||
} | ||
})(theme); | ||
} | ||
}); | ||
}; | ||
var ThemeProvider = function ThemeProvider(_ref2) { | ||
var theme = _ref2.theme, | ||
components = _ref2.components, | ||
children = _ref2.children; | ||
var outer = core.useThemeUI(); | ||
var isTopLevel = outer === core.__themeUiDefaultContextValue; | ||
return /*#__PURE__*/React__default['default'].createElement(core.ThemeProvider, { | ||
@@ -53,0 +54,0 @@ theme: theme |
@@ -8,37 +8,38 @@ import React from 'react'; | ||
const RootStyles = () => jsx(Global, { | ||
styles: emotionTheme => { | ||
var _theme$config; | ||
var RootStyles = function RootStyles() { | ||
return jsx(Global, { | ||
styles: function styles(emotionTheme) { | ||
var _theme$config; | ||
const theme = emotionTheme; | ||
const { | ||
useRootStyles | ||
} = theme.config || theme; | ||
var theme = emotionTheme; | ||
if (useRootStyles === false || theme.styles && !theme.styles.root) { | ||
return null; | ||
} | ||
var _ref = theme.config || theme, | ||
useRootStyles = _ref.useRootStyles; | ||
const boxSizing = ((_theme$config = theme.config) == null ? void 0 : _theme$config.useBorderBox) === false ? undefined : 'border-box'; | ||
return css({ | ||
'*': { | ||
boxSizing | ||
}, | ||
html: { | ||
variant: 'styles.root' | ||
}, | ||
body: { | ||
margin: 0 | ||
if (useRootStyles === false || theme.styles && !theme.styles.root) { | ||
return null; | ||
} | ||
})(theme); | ||
} | ||
}); | ||
const ThemeProvider = ({ | ||
theme, | ||
components, | ||
children | ||
}) => { | ||
const outer = useThemeUI(); | ||
const isTopLevel = outer === __themeUiDefaultContextValue; | ||
var boxSizing = ((_theme$config = theme.config) == null ? void 0 : _theme$config.useBorderBox) === false ? undefined : 'border-box'; | ||
return css({ | ||
'*': { | ||
boxSizing: boxSizing | ||
}, | ||
html: { | ||
variant: 'styles.root' | ||
}, | ||
body: { | ||
margin: 0 | ||
} | ||
})(theme); | ||
} | ||
}); | ||
}; | ||
var ThemeProvider = function ThemeProvider(_ref2) { | ||
var theme = _ref2.theme, | ||
components = _ref2.components, | ||
children = _ref2.children; | ||
var outer = useThemeUI(); | ||
var isTopLevel = outer === __themeUiDefaultContextValue; | ||
return /*#__PURE__*/React.createElement(ThemeProvider$1, { | ||
@@ -45,0 +46,0 @@ theme: theme |
{ | ||
"name": "@theme-ui/theme-provider", | ||
"version": "0.15.0--canary.2215.ff6a38fe74fc9efa00cc1961a6061e030a67fce5.0", | ||
"version": "0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0", | ||
"repository": "system-ui/theme-ui", | ||
@@ -15,6 +15,6 @@ "main": "dist/theme-ui-theme-provider.cjs.js", | ||
"dependencies": { | ||
"@theme-ui/color-modes": "0.15.0--canary.2215.ff6a38fe74fc9efa00cc1961a6061e030a67fce5.0", | ||
"@theme-ui/core": "0.15.0--canary.2215.ff6a38fe74fc9efa00cc1961a6061e030a67fce5.0", | ||
"@theme-ui/css": "0.15.0--canary.2215.ff6a38fe74fc9efa00cc1961a6061e030a67fce5.0", | ||
"@theme-ui/mdx": "0.15.0--canary.2215.ff6a38fe74fc9efa00cc1961a6061e030a67fce5.0" | ||
"@theme-ui/color-modes": "0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0", | ||
"@theme-ui/core": "0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0", | ||
"@theme-ui/css": "0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0", | ||
"@theme-ui/mdx": "0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0" | ||
}, | ||
@@ -25,3 +25,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "ff6a38fe74fc9efa00cc1961a6061e030a67fce5" | ||
"gitHead": "a5dfac6ee7342fb74c68b915d82541eea905f5a7" | ||
} |
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
22890
+ Added@theme-ui/color-modes@0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0(transitive)
+ Added@theme-ui/core@0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0(transitive)
+ Added@theme-ui/css@0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0(transitive)
+ Added@theme-ui/mdx@0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0(transitive)
+ Added@theme-ui/parse-props@0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0(transitive)
- Removed@theme-ui/color-modes@0.15.0--canary.2215.ff6a38fe74fc9efa00cc1961a6061e030a67fce5.0(transitive)
- Removed@theme-ui/core@0.15.0--canary.2215.ff6a38fe74fc9efa00cc1961a6061e030a67fce5.0(transitive)
- Removed@theme-ui/css@0.15.0--canary.2215.ff6a38fe74fc9efa00cc1961a6061e030a67fce5.0(transitive)
- Removed@theme-ui/mdx@0.15.0--canary.2215.ff6a38fe74fc9efa00cc1961a6061e030a67fce5.0(transitive)
- Removed@theme-ui/parse-props@0.15.0--canary.2215.ff6a38fe74fc9efa00cc1961a6061e030a67fce5.0(transitive)
Updated@theme-ui/color-modes@0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0
Updated@theme-ui/core@0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0
Updated@theme-ui/css@0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0
Updated@theme-ui/mdx@0.15.0--canary.2250.a5dfac6ee7342fb74c68b915d82541eea905f5a7.0