@chakra-ui/styled-system
Advanced tools
Comparing version 2.7.0 to 2.8.0
@@ -37,2 +37,3 @@ "use strict"; | ||
cssVar: () => cssVar, | ||
defineCssVars: () => defineCssVars, | ||
defineStyle: () => defineStyle, | ||
@@ -682,3 +683,4 @@ defineStyleConfig: () => defineStyleConfig, | ||
var _a, _b, _c; | ||
const mq = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b.minWQuery) != null ? _c : `@media screen and (min-width: ${value})`; | ||
const breakpoint = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b.minW) != null ? _c : value; | ||
const mq = `@media screen and (min-width: ${breakpoint})`; | ||
return { [mq]: { display: "none" } }; | ||
@@ -691,3 +693,4 @@ } | ||
var _a, _b, _c; | ||
const mq = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b.maxWQuery) != null ? _c : `@media screen and (max-width: ${value})`; | ||
const breakpoint = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b._minW) != null ? _c : value; | ||
const mq = `@media screen and (max-width: ${breakpoint})`; | ||
return { [mq]: { display: "none" } }; | ||
@@ -1078,2 +1081,14 @@ } | ||
} | ||
function defineCssVars(scope, keys2) { | ||
const vars = {}; | ||
for (const key of keys2) { | ||
if (Array.isArray(key)) { | ||
const [name, fallback] = key; | ||
vars[name] = cssVar(`${scope}-${name}`, fallback); | ||
continue; | ||
} | ||
vars[key] = cssVar(`${scope}-${key}`); | ||
} | ||
return vars; | ||
} | ||
@@ -1322,3 +1337,3 @@ // ../../utilities/breakpoint-utils/src/breakpoint.ts | ||
var _a, _b; | ||
const maybeReference = lookupToken(conditionValue); | ||
const maybeReference = lookupToken(conditionValue.toString()); | ||
if (conditionAlias === "default") { | ||
@@ -1768,2 +1783,3 @@ acc[variable] = maybeReference; | ||
cssVar, | ||
defineCssVars, | ||
defineStyle, | ||
@@ -1770,0 +1786,0 @@ defineStyleConfig, |
{ | ||
"name": "@chakra-ui/styled-system", | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "Style function for css-in-js building component libraries", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
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
209206
6321