@vtex/admin-core
Advanced tools
Comparing version 0.9.2-experimental.5 to 0.9.2
@@ -6,50 +6,13 @@ # Change Log | ||
## [0.9.2-experimental.5](https://github.com/vtex/onda/compare/@vtex/admin-core@0.9.2-experimental.4...@vtex/admin-core@0.9.2-experimental.5) (2021-03-19) | ||
## [0.9.2](https://github.com/vtex/onda/compare/@vtex/admin-core@0.9.1...@vtex/admin-core@0.9.2) (2021-03-19) | ||
**Note:** Version bump only for package @vtex/admin-core | ||
### Bug Fixes | ||
* **theme-provider:** use jsxs on ThemeProvider were returning console warnings ([4b46ab3](https://github.com/vtex/onda/commit/4b46ab38450cef09d50c0f7001de5ad9d769d03b)) | ||
## [0.9.2-experimental.4](https://github.com/vtex/onda/compare/@vtex/admin-core@0.9.1...@vtex/admin-core@0.9.2-experimental.4) (2021-03-17) | ||
**Note:** Version bump only for package @vtex/admin-core | ||
## [0.9.2-experimental.3](https://github.com/vtex/onda/compare/@vtex/admin-core@0.9.1...@vtex/admin-core@0.9.2-experimental.3) (2021-03-17) | ||
**Note:** Version bump only for package @vtex/admin-core | ||
## [0.9.2-experimental.2](https://github.com/vtex/onda/compare/@vtex/admin-core@0.9.1...@vtex/admin-core@0.9.2-experimental.2) (2021-03-17) | ||
**Note:** Version bump only for package @vtex/admin-core | ||
## [0.9.2-experimental.1](https://github.com/vtex/onda/compare/@vtex/admin-core@0.9.1...@vtex/admin-core@0.9.2-experimental.1) (2021-03-17) | ||
**Note:** Version bump only for package @vtex/admin-core | ||
## [0.9.2-experimental.0](https://github.com/vtex/onda/compare/@vtex/admin-core@0.9.1...@vtex/admin-core@0.9.2-experimental.0) (2021-03-17) | ||
**Note:** Version bump only for package @vtex/admin-core | ||
## [0.9.1](https://github.com/vtex/onda/compare/@vtex/admin-core@0.9.0...@vtex/admin-core@0.9.1) (2021-03-16) | ||
@@ -77,5 +40,3 @@ | ||
* **font:** add VTEX Trust font preload ([07f432d](https://github.com/vtex/onda/commit/07f432d8c6f74e8af4de6d5ca5f188466480f567)) | ||
## [0.8.1-experimental.2](https://github.com/vtex/onda/compare/@vtex/admin-core@0.8.0...@vtex/admin-core@0.8.1-experimental.2) (2021-03-17) | ||
**Note:** Version bump only for package @vtex/admin-core | ||
@@ -85,19 +46,2 @@ | ||
## [0.8.1-experimental.1](https://github.com/vtex/onda/compare/@vtex/admin-core@0.8.0...@vtex/admin-core@0.8.1-experimental.1) (2021-03-16) | ||
**Note:** Version bump only for package @vtex/admin-core | ||
## [0.8.1-experimental.0](https://github.com/vtex/onda/compare/@vtex/admin-core@0.8.0...@vtex/admin-core@0.8.1-experimental.0) (2021-03-16) | ||
**Note:** Version bump only for package @vtex/admin-core | ||
# [0.8.0](https://github.com/vtex/onda/compare/@vtex/admin-core@0.7.2...@vtex/admin-core@0.8.0) (2021-03-10) | ||
@@ -104,0 +48,0 @@ |
@@ -7,3 +7,4 @@ 'use strict'; | ||
var react = require('react'); | ||
var React = require('react'); | ||
var React__default = _interopDefault(React); | ||
var adminUiSystem = require('@vtex/admin-ui-system'); | ||
@@ -13,3 +14,3 @@ var invariant = _interopDefault(require('tiny-invariant')); | ||
var adminUiTheme = require('@vtex/admin-ui-theme'); | ||
var react$1 = require('@emotion/react'); | ||
var react = require('@emotion/react'); | ||
var reactHelmet = require('react-helmet'); | ||
@@ -85,4 +86,4 @@ | ||
function Imports() { | ||
return adminUiSystem.jsxs(react$1.Global, { | ||
styles: react$1.css(_templateObject(), imports) | ||
return adminUiSystem.jsxs(react.Global, { | ||
styles: react.css(_templateObject(), imports) | ||
}); | ||
@@ -102,3 +103,3 @@ } | ||
return adminUiSystem.jsxs(react$1.Global, { | ||
return adminUiSystem.jsxs(react.Global, { | ||
styles: adminUiSystem.styles(adminUiTheme.theme === null || adminUiTheme.theme === void 0 ? void 0 : (_theme$global2 = adminUiTheme.theme.global) === null || _theme$global2 === void 0 ? void 0 : _theme$global2.styles)(adminUiTheme.theme) | ||
@@ -108,3 +109,3 @@ }); | ||
var SystemContext = /*#__PURE__*/react.createContext(null); | ||
var SystemContext = /*#__PURE__*/React.createContext(null); | ||
function ThemeProvider(props) { | ||
@@ -114,10 +115,10 @@ var children = props.children, | ||
system = _props$system === void 0 ? defaultSystem : _props$system; | ||
return adminUiSystem.jsxs(adminUiSystem.CacheProvider, { | ||
return React__default.createElement(adminUiSystem.CacheProvider, { | ||
value: system.emotionInstance.cache | ||
}, [adminUiSystem.jsxs.apply(void 0, [SystemContext.Provider, { | ||
}, React__default.createElement(SystemContext.Provider, { | ||
value: system | ||
}].concat([adminUiSystem.jsxs(FontsPreload, {}), adminUiSystem.jsxs(Imports, {}), adminUiSystem.jsxs(Styles, {}), adminUiSystem.jsxs(system.ThemeProvider, {}, children)]))]); | ||
}, React__default.createElement(FontsPreload, null), React__default.createElement(Imports, null), React__default.createElement(Styles, null), React__default.createElement(system.ThemeProvider, null, children))); | ||
} | ||
function useSystem() { | ||
var context = react.useContext(SystemContext); | ||
var context = React.useContext(SystemContext); | ||
!context ? invariant(false, "Do not use admin core functionalities outside of Admin context") : void 0; | ||
@@ -124,0 +125,0 @@ var cn = context.cn, |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=require("@vtex/admin-ui-system"),n=(e=require("tiny-invariant"))&&"object"==typeof e&&"default"in e?e.default:e;require("focus-visible/dist/focus-visible");var o=require("@vtex/admin-ui-theme"),u=require("@emotion/react"),i=require("react-helmet");function s(){return(s=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}).apply(this,arguments)}function a(e,t){void 0===t&&(t={overrides:{}});var n=t.components,u=r.merge(o.theme,t.overrides),i=n?Object.assign(u,{components:s({},n,o.theme.components)}):u;return r.createSystem(i,"vtex-"+e)}var c,p,l,f=a("admin-ui");function b(){var e,t,r=(e=["\n ","\n "],t||(t=e.slice(0)),e.raw=t,e);return b=function(){return r},r}var m=null!==(c=null===(p=o.theme.global)||void 0===p||null===(l=p.imports)||void 0===l?void 0:l.reduce((function(e,t){return e+" @import '"+t+"';"}),""))&&void 0!==c?c:"";function d(){return r.jsxs(u.Global,{styles:u.css(b(),m)})}function y(){return r.jsxs.apply(void 0,[i.Helmet,{}].concat([r.jsxs("link",{rel:"preload",href:"https://io.vtex.com.br/fonts/vtex-trust/VTEXTrust-Variable.woff2",as:"font",type:"font/woff2",crossorigin:"anonymous"})]))}function x(){var e;return r.jsxs(u.Global,{styles:r.styles(null==o.theme||null===(e=o.theme.global)||void 0===e?void 0:e.styles)(o.theme)})}var g=t.createContext(null);Object.defineProperty(exports,"Global",{enumerable:!0,get:function(){return r.Global}}),Object.defineProperty(exports,"alpha",{enumerable:!0,get:function(){return r.alpha}}),Object.defineProperty(exports,"complement",{enumerable:!0,get:function(){return r.complement}}),Object.defineProperty(exports,"createComponent",{enumerable:!0,get:function(){return r.createComponent}}),Object.defineProperty(exports,"css",{enumerable:!0,get:function(){return r.css}}),Object.defineProperty(exports,"darken",{enumerable:!0,get:function(){return r.darken}}),Object.defineProperty(exports,"desaturate",{enumerable:!0,get:function(){return r.desaturate}}),Object.defineProperty(exports,"forwardRef",{enumerable:!0,get:function(){return r.forwardRef}}),Object.defineProperty(exports,"get",{enumerable:!0,get:function(){return r.get}}),Object.defineProperty(exports,"getColor",{enumerable:!0,get:function(){return r.getColor}}),Object.defineProperty(exports,"grayscale",{enumerable:!0,get:function(){return r.grayscale}}),Object.defineProperty(exports,"hue",{enumerable:!0,get:function(){return r.hue}}),Object.defineProperty(exports,"inlineVariant",{enumerable:!0,get:function(){return r.inlineVariant}}),Object.defineProperty(exports,"invert",{enumerable:!0,get:function(){return r.invert}}),Object.defineProperty(exports,"isFunction",{enumerable:!0,get:function(){return r.isFunction}}),Object.defineProperty(exports,"isObjectEmpty",{enumerable:!0,get:function(){return r.isObjectEmpty}}),Object.defineProperty(exports,"jsxs",{enumerable:!0,get:function(){return r.jsxs}}),Object.defineProperty(exports,"lighten",{enumerable:!0,get:function(){return r.lighten}}),Object.defineProperty(exports,"lightness",{enumerable:!0,get:function(){return r.lightness}}),Object.defineProperty(exports,"merge",{enumerable:!0,get:function(){return r.merge}}),Object.defineProperty(exports,"mix",{enumerable:!0,get:function(){return r.mix}}),Object.defineProperty(exports,"omit",{enumerable:!0,get:function(){return r.omit}}),Object.defineProperty(exports,"pick",{enumerable:!0,get:function(){return r.pick}}),Object.defineProperty(exports,"rotate",{enumerable:!0,get:function(){return r.rotate}}),Object.defineProperty(exports,"saturate",{enumerable:!0,get:function(){return r.saturate}}),Object.defineProperty(exports,"saturation",{enumerable:!0,get:function(){return r.saturation}}),Object.defineProperty(exports,"shade",{enumerable:!0,get:function(){return r.shade}}),Object.defineProperty(exports,"styles",{enumerable:!0,get:function(){return r.styles}}),Object.defineProperty(exports,"tint",{enumerable:!0,get:function(){return r.tint}}),Object.defineProperty(exports,"transparentize",{enumerable:!0,get:function(){return r.transparentize}}),Object.defineProperty(exports,"useMediaQuery",{enumerable:!0,get:function(){return r.useMediaQuery}}),Object.defineProperty(exports,"useResponsiveValue",{enumerable:!0,get:function(){return r.useResponsiveValue}}),Object.defineProperty(exports,"useTheme",{enumerable:!0,get:function(){return r.useTheme}}),Object.defineProperty(exports,"theme",{enumerable:!0,get:function(){return o.theme}}),exports.ThemeProvider=function(e){var t=e.children,n=e.system,o=void 0===n?f:n;return r.jsxs(r.CacheProvider,{value:o.emotionInstance.cache},[r.jsxs.apply(void 0,[g.Provider,{value:o}].concat([r.jsxs(y,{}),r.jsxs(d,{}),r.jsxs(x,{}),r.jsxs(o.ThemeProvider,{},t)]))])},exports.createSystem=a,exports.defaultSystem=f,exports.useSystem=function(){var e=t.useContext(g);e||n(!1);var r=e.emotionInstance;return{cn:e.cn,stylesOf:e.stylesOf,keyframes:r.keyframes,cx:r.cx}}; | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),r=e(t),n=require("@vtex/admin-ui-system"),o=e(require("tiny-invariant"));require("focus-visible/dist/focus-visible");var u=require("@vtex/admin-ui-theme"),i=require("@emotion/react"),s=require("react-helmet");function a(){return(a=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}).apply(this,arguments)}function c(e,t){void 0===t&&(t={overrides:{}});var r=t.components,o=n.merge(u.theme,t.overrides),i=r?Object.assign(o,{components:a({},r,u.theme.components)}):o;return n.createSystem(i,"vtex-"+e)}var l,f,p,m=c("admin-ui");function b(){var e,t,r=(e=["\n ","\n "],t||(t=e.slice(0)),e.raw=t,e);return b=function(){return r},r}var d=null!==(l=null===(f=u.theme.global)||void 0===f||null===(p=f.imports)||void 0===p?void 0:p.reduce((function(e,t){return e+" @import '"+t+"';"}),""))&&void 0!==l?l:"";function y(){return n.jsxs(i.Global,{styles:i.css(b(),d)})}function x(){return n.jsxs.apply(void 0,[s.Helmet,{}].concat([n.jsxs("link",{rel:"preload",href:"https://io.vtex.com.br/fonts/vtex-trust/VTEXTrust-Variable.woff2",as:"font",type:"font/woff2",crossorigin:"anonymous"})]))}function g(){var e;return n.jsxs(i.Global,{styles:n.styles(null==u.theme||null===(e=u.theme.global)||void 0===e?void 0:e.styles)(u.theme)})}var j=t.createContext(null);Object.defineProperty(exports,"Global",{enumerable:!0,get:function(){return n.Global}}),Object.defineProperty(exports,"alpha",{enumerable:!0,get:function(){return n.alpha}}),Object.defineProperty(exports,"complement",{enumerable:!0,get:function(){return n.complement}}),Object.defineProperty(exports,"createComponent",{enumerable:!0,get:function(){return n.createComponent}}),Object.defineProperty(exports,"css",{enumerable:!0,get:function(){return n.css}}),Object.defineProperty(exports,"darken",{enumerable:!0,get:function(){return n.darken}}),Object.defineProperty(exports,"desaturate",{enumerable:!0,get:function(){return n.desaturate}}),Object.defineProperty(exports,"forwardRef",{enumerable:!0,get:function(){return n.forwardRef}}),Object.defineProperty(exports,"get",{enumerable:!0,get:function(){return n.get}}),Object.defineProperty(exports,"getColor",{enumerable:!0,get:function(){return n.getColor}}),Object.defineProperty(exports,"grayscale",{enumerable:!0,get:function(){return n.grayscale}}),Object.defineProperty(exports,"hue",{enumerable:!0,get:function(){return n.hue}}),Object.defineProperty(exports,"inlineVariant",{enumerable:!0,get:function(){return n.inlineVariant}}),Object.defineProperty(exports,"invert",{enumerable:!0,get:function(){return n.invert}}),Object.defineProperty(exports,"isFunction",{enumerable:!0,get:function(){return n.isFunction}}),Object.defineProperty(exports,"isObjectEmpty",{enumerable:!0,get:function(){return n.isObjectEmpty}}),Object.defineProperty(exports,"jsxs",{enumerable:!0,get:function(){return n.jsxs}}),Object.defineProperty(exports,"lighten",{enumerable:!0,get:function(){return n.lighten}}),Object.defineProperty(exports,"lightness",{enumerable:!0,get:function(){return n.lightness}}),Object.defineProperty(exports,"merge",{enumerable:!0,get:function(){return n.merge}}),Object.defineProperty(exports,"mix",{enumerable:!0,get:function(){return n.mix}}),Object.defineProperty(exports,"omit",{enumerable:!0,get:function(){return n.omit}}),Object.defineProperty(exports,"pick",{enumerable:!0,get:function(){return n.pick}}),Object.defineProperty(exports,"rotate",{enumerable:!0,get:function(){return n.rotate}}),Object.defineProperty(exports,"saturate",{enumerable:!0,get:function(){return n.saturate}}),Object.defineProperty(exports,"saturation",{enumerable:!0,get:function(){return n.saturation}}),Object.defineProperty(exports,"shade",{enumerable:!0,get:function(){return n.shade}}),Object.defineProperty(exports,"styles",{enumerable:!0,get:function(){return n.styles}}),Object.defineProperty(exports,"tint",{enumerable:!0,get:function(){return n.tint}}),Object.defineProperty(exports,"transparentize",{enumerable:!0,get:function(){return n.transparentize}}),Object.defineProperty(exports,"useMediaQuery",{enumerable:!0,get:function(){return n.useMediaQuery}}),Object.defineProperty(exports,"useResponsiveValue",{enumerable:!0,get:function(){return n.useResponsiveValue}}),Object.defineProperty(exports,"useTheme",{enumerable:!0,get:function(){return n.useTheme}}),Object.defineProperty(exports,"theme",{enumerable:!0,get:function(){return u.theme}}),exports.ThemeProvider=function(e){var t=e.children,o=e.system,u=void 0===o?m:o;return r.createElement(n.CacheProvider,{value:u.emotionInstance.cache},r.createElement(j.Provider,{value:u},r.createElement(x,null),r.createElement(y,null),r.createElement(g,null),r.createElement(u.ThemeProvider,null,t)))},exports.createSystem=c,exports.defaultSystem=m,exports.useSystem=function(){var e=t.useContext(j);e||o(!1);var r=e.emotionInstance;return{cn:e.cn,stylesOf:e.stylesOf,keyframes:r.keyframes,cx:r.cx}}; | ||
//# sourceMappingURL=admin-core.cjs.production.min.js.map |
@@ -1,2 +0,2 @@ | ||
import { useContext, createContext } from 'react'; | ||
import React, { useContext, createContext } from 'react'; | ||
import { merge, createSystem as createSystem$1, jsxs, styles, CacheProvider } from '@vtex/admin-ui-system'; | ||
@@ -105,7 +105,7 @@ export { Global, alpha, complement, createComponent, css, darken, desaturate, forwardRef, get, getColor, grayscale, hue, inlineVariant, invert, isFunction, isObjectEmpty, jsxs, lighten, lightness, merge, mix, omit, pick, rotate, saturate, saturation, shade, styles, tint, transparentize, useMediaQuery, useResponsiveValue, useTheme } from '@vtex/admin-ui-system'; | ||
system = _props$system === void 0 ? defaultSystem : _props$system; | ||
return jsxs(CacheProvider, { | ||
return React.createElement(CacheProvider, { | ||
value: system.emotionInstance.cache | ||
}, [jsxs.apply(void 0, [SystemContext.Provider, { | ||
}, React.createElement(SystemContext.Provider, { | ||
value: system | ||
}].concat([jsxs(FontsPreload, {}), jsxs(Imports, {}), jsxs(Styles, {}), jsxs(system.ThemeProvider, {}, children)]))]); | ||
}, React.createElement(FontsPreload, null), React.createElement(Imports, null), React.createElement(Styles, null), React.createElement(system.ThemeProvider, null, children))); | ||
} | ||
@@ -112,0 +112,0 @@ function useSystem() { |
@@ -5,3 +5,3 @@ import { ReactNode } from 'react'; | ||
import { createSystem } from './system'; | ||
export declare function ThemeProvider(props: ThemeProviderProps): import("react").ReactElement<import("react").ProviderProps<import("@emotion/css").EmotionCache>, string | ((props: any) => import("react").ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)>; | ||
export declare function ThemeProvider(props: ThemeProviderProps): JSX.Element; | ||
export declare function useSystem(): { | ||
@@ -8,0 +8,0 @@ cn: (styleProp: import("@vtex/admin-ui-system").StyleProp) => string; |
{ | ||
"name": "@vtex/admin-core", | ||
"version": "0.9.2-experimental.5", | ||
"version": "0.9.2", | ||
"main": "dist/index.js", | ||
@@ -39,3 +39,3 @@ "module": "dist/admin-core.esm.js", | ||
"@vtex/admin-ui-system": "^0.15.0", | ||
"@vtex/admin-ui-theme": "^0.20.2-experimental.5", | ||
"@vtex/admin-ui-theme": "^0.20.1", | ||
"deepmerge": "^4.2.2", | ||
@@ -47,3 +47,3 @@ "focus-visible": "^5.1.0", | ||
}, | ||
"gitHead": "f154713deadf85cce70fb7322db4f7ee27ae4109" | ||
"gitHead": "4868ffcc42dfb9d858cf985b7b693e5a2d86c5f3" | ||
} |
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
50039
670
Updated@vtex/admin-ui-theme@^0.20.1