@kuma-ui/system
Advanced tools
Comparing version 1.5.1 to 1.5.2
@@ -1267,13 +1267,19 @@ "use strict"; | ||
const pseudoProps = {}; | ||
const findCustomStyle = (value) => { | ||
const userTheme = import_sheet3.theme.getUserTheme(); | ||
const propKey = value.split(".")[0]; | ||
if (userTheme[propKey] === void 0) | ||
return void 0; | ||
for (const key in userTheme[propKey]) { | ||
if (value === key) { | ||
return userTheme[propKey][key]; | ||
} | ||
} | ||
return void 0; | ||
}; | ||
for (const [propName, propValue] of Object.entries(props)) { | ||
if (typeof propValue === "string" && /[a-zA-Z]+\.[a-zA-Z0-9]+/.test(propValue)) { | ||
const userTheme = import_sheet3.theme.getUserTheme(); | ||
const propKey = propValue.split(".")[0]; | ||
if (userTheme[propKey] !== void 0) { | ||
for (const key in userTheme[propKey]) { | ||
if (propValue === key) { | ||
styledProps[propName] = userTheme[propKey][key]; | ||
break; | ||
} | ||
} | ||
const customStyle = findCustomStyle(propValue); | ||
if (customStyle !== void 0) { | ||
styledProps[propName] = customStyle; | ||
} | ||
@@ -1284,2 +1290,12 @@ } else if (isStyledProp(propName)) { | ||
pseudoProps[propName] = propValue; | ||
for (const [name, value] of Object.entries(propValue)) { | ||
if (typeof value === "string" && /[a-zA-Z]+\.[a-zA-Z0-9]+/.test(value)) { | ||
const customStyle = findCustomStyle(value); | ||
if (customStyle !== void 0) { | ||
pseudoProps[propName] = { | ||
[name]: customStyle | ||
}; | ||
} | ||
} | ||
} | ||
} | ||
@@ -1286,0 +1302,0 @@ } |
@@ -1250,13 +1250,19 @@ "use strict"; | ||
const pseudoProps = {}; | ||
const findCustomStyle = (value) => { | ||
const userTheme = import_sheet3.theme.getUserTheme(); | ||
const propKey = value.split(".")[0]; | ||
if (userTheme[propKey] === void 0) | ||
return void 0; | ||
for (const key in userTheme[propKey]) { | ||
if (value === key) { | ||
return userTheme[propKey][key]; | ||
} | ||
} | ||
return void 0; | ||
}; | ||
for (const [propName, propValue] of Object.entries(props)) { | ||
if (typeof propValue === "string" && /[a-zA-Z]+\.[a-zA-Z0-9]+/.test(propValue)) { | ||
const userTheme = import_sheet3.theme.getUserTheme(); | ||
const propKey = propValue.split(".")[0]; | ||
if (userTheme[propKey] !== void 0) { | ||
for (const key in userTheme[propKey]) { | ||
if (propValue === key) { | ||
styledProps[propName] = userTheme[propKey][key]; | ||
break; | ||
} | ||
} | ||
const customStyle = findCustomStyle(propValue); | ||
if (customStyle !== void 0) { | ||
styledProps[propName] = customStyle; | ||
} | ||
@@ -1267,2 +1273,12 @@ } else if (isStyledProp(propName)) { | ||
pseudoProps[propName] = propValue; | ||
for (const [name, value] of Object.entries(propValue)) { | ||
if (typeof value === "string" && /[a-zA-Z]+\.[a-zA-Z0-9]+/.test(value)) { | ||
const customStyle = findCustomStyle(value); | ||
if (customStyle !== void 0) { | ||
pseudoProps[propName] = { | ||
[name]: customStyle | ||
}; | ||
} | ||
} | ||
} | ||
} | ||
@@ -1269,0 +1285,0 @@ } |
{ | ||
"name": "@kuma-ui/system", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "🐻 Kuma UI is a utility-first, zero-runtime CSS-in-JS library that offers an outstanding developer experience and optimized performance.", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
234058
7733