@chakra-ui/styled-system
Advanced tools
Comparing version 1.9.0 to 1.9.1
# Change Log | ||
## 1.9.1 | ||
### Patch Changes | ||
- [`a576f4de8`](https://github.com/chakra-ui/chakra-ui/commit/a576f4de850706ea7088c8a6ea687269cad05e69) | ||
Thanks [@segunadebayo](https://github.com/segunadebayo)! - Fix: avoid mutation | ||
for `getWithPriority` to get `textStyle` and `layerStyle` working | ||
consistently. | ||
## 1.9.0 | ||
@@ -4,0 +13,0 @@ |
@@ -39,9 +39,11 @@ "use strict"; | ||
var getWithPriority = function getWithPriority(theme, key, styles) { | ||
var expanded = (0, _utils.memoizedGet)(theme, key, {}); | ||
var result = {}; | ||
var obj = (0, _utils.memoizedGet)(theme, key, {}); | ||
for (var prop in expanded) { | ||
if (prop in styles) delete expanded[prop]; | ||
for (var prop in obj) { | ||
var isInStyles = prop in styles && styles[prop] != null; | ||
if (!isInStyles) result[prop] = obj[prop]; | ||
} | ||
return expanded; | ||
return result; | ||
}; | ||
@@ -82,6 +84,2 @@ | ||
transform: function transform(value, theme, styles) { | ||
if (styles === void 0) { | ||
styles = {}; | ||
} | ||
return getWithPriority(theme, "textStyles." + value, styles); | ||
@@ -88,0 +86,0 @@ } |
@@ -34,9 +34,11 @@ import { memoizedGet as get } from "@chakra-ui/utils"; | ||
var getWithPriority = (theme, key, styles) => { | ||
var expanded = get(theme, key, {}); | ||
var result = {}; | ||
var obj = get(theme, key, {}); | ||
for (var prop in expanded) { | ||
if (prop in styles) delete expanded[prop]; | ||
for (var prop in obj) { | ||
var isInStyles = prop in styles && styles[prop] != null; | ||
if (!isInStyles) result[prop] = obj[prop]; | ||
} | ||
return expanded; | ||
return result; | ||
}; | ||
@@ -75,9 +77,3 @@ | ||
processResult: true, | ||
transform: function transform(value, theme, styles) { | ||
if (styles === void 0) { | ||
styles = {}; | ||
} | ||
return getWithPriority(theme, "textStyles." + value, styles); | ||
} | ||
transform: (value, theme, styles) => getWithPriority(theme, "textStyles." + value, styles) | ||
}, | ||
@@ -84,0 +80,0 @@ apply: { |
@@ -91,1 +91,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=background.d.ts.map |
@@ -238,1 +238,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=border.d.ts.map |
@@ -27,1 +27,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=color.d.ts.map |
@@ -174,1 +174,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=flexbox.d.ts.map |
@@ -155,1 +155,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=grid.d.ts.map |
@@ -16,1 +16,2 @@ export * from "./background"; | ||
export * from "./transform"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -96,1 +96,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=layout.d.ts.map |
@@ -24,1 +24,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=list.d.ts.map |
@@ -82,1 +82,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=others.d.ts.map |
@@ -42,1 +42,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=outline.d.ts.map |
@@ -70,1 +70,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=position.d.ts.map |
@@ -22,1 +22,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=shadow.d.ts.map |
@@ -190,1 +190,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=space.d.ts.map |
@@ -20,1 +20,2 @@ import * as CSS from "csstype"; | ||
export {}; | ||
//# sourceMappingURL=transform.d.ts.map |
@@ -23,1 +23,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=transition.d.ts.map |
@@ -75,1 +75,2 @@ import * as CSS from "csstype"; | ||
} | ||
//# sourceMappingURL=typography.d.ts.map |
@@ -13,1 +13,2 @@ import { Dict } from "@chakra-ui/utils"; | ||
export {}; | ||
//# sourceMappingURL=create-transform.d.ts.map |
@@ -11,1 +11,2 @@ import { Dict } from "@chakra-ui/utils"; | ||
export declare function toCSSVar<T extends Dict>(rawTheme: T): WithCSSVar<T>; | ||
//# sourceMappingURL=css-var.d.ts.map |
@@ -14,1 +14,2 @@ import { Dict } from "@chakra-ui/utils"; | ||
export {}; | ||
//# sourceMappingURL=css.d.ts.map |
@@ -9,1 +9,2 @@ export * from "./config"; | ||
export { tokenToCSSVar } from "./create-transform"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -47,1 +47,2 @@ import { Dict } from "@chakra-ui/utils"; | ||
export {}; | ||
//# sourceMappingURL=prop-config.d.ts.map |
@@ -199,1 +199,2 @@ export declare const pseudoSelectors: { | ||
export declare const pseudoPropNames: ("_hover" | "_active" | "_focus" | "_highlighted" | "_focusWithin" | "_focusVisible" | "_disabled" | "_readOnly" | "_before" | "_after" | "_empty" | "_expanded" | "_checked" | "_grabbed" | "_pressed" | "_invalid" | "_valid" | "_loading" | "_selected" | "_hidden" | "_autofill" | "_even" | "_odd" | "_first" | "_last" | "_notFirst" | "_notLast" | "_visited" | "_activeLink" | "_indeterminate" | "_groupHover" | "_groupFocus" | "_groupActive" | "_groupDisabled" | "_groupInvalid" | "_groupChecked" | "_placeholder" | "_fullScreen" | "_selection" | "_rtl" | "_mediaDark" | "_dark")[]; | ||
//# sourceMappingURL=pseudos.d.ts.map |
@@ -5,1 +5,2 @@ export declare const systemProps: any; | ||
export declare const isStyleProp: (prop: string) => boolean; | ||
//# sourceMappingURL=system.d.ts.map |
@@ -53,1 +53,2 @@ import { Dict, AnalyzeBreakpointsReturn } from "@chakra-ui/utils"; | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -11,1 +11,2 @@ /** | ||
export declare function parseBorder(value: string, key?: string): {}; | ||
//# sourceMappingURL=parse-border.d.ts.map |
@@ -5,1 +5,2 @@ import { Dict } from "@chakra-ui/utils"; | ||
export declare const gradientTransform: PropConfig["transform"]; | ||
//# sourceMappingURL=parse-gradient.d.ts.map |
@@ -8,1 +8,2 @@ import { ThemeTypings } from "../theming.types"; | ||
export declare type Token<CSSType, ThemeKey = unknown> = ThemeKey extends keyof ThemeTypings ? ResponsiveValue<Union<CSSType | ThemeTypings[ThemeKey]>> : ResponsiveValue<CSSType>; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@chakra-ui/styled-system", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"description": "Style function for css-in-js building component libraries", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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 too big to display
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
762483
177
5996