@kuma-ui/system
Advanced tools
Comparing version 0.0.0-dev-20231112011326 to 0.0.0-dev-20231125141015
@@ -904,3 +904,3 @@ "use strict"; | ||
const pseudoProps = {}; | ||
const findCustomStyle = (value) => { | ||
const findThemeStyle = (value) => { | ||
const userTheme = import_sheet3.theme.getUserTheme(); | ||
@@ -917,5 +917,18 @@ const propKey = value.split(".")[0]; | ||
}; | ||
const isThemeStyle = (propValue) => { | ||
return typeof propValue === "string" && /[a-zA-Z]+\.[a-zA-Z0-9]+/.test(propValue) && !/^\w+\(.*\)$/.test(propValue); | ||
}; | ||
for (const [propName, propValue] of Object.entries(props)) { | ||
if (typeof propValue === "string" && /[a-zA-Z]+\.[a-zA-Z0-9]+/.test(propValue) && !/^\w+\(.*\)$/.test(propValue)) { | ||
const customStyle = findCustomStyle(propValue); | ||
if (Array.isArray(propValue)) { | ||
styledProps[propName] = propValue.map((value) => { | ||
if (isThemeStyle(value)) { | ||
const customStyle = findThemeStyle(value); | ||
if (customStyle !== void 0) { | ||
return customStyle; | ||
} | ||
} | ||
return value; | ||
}); | ||
} else if (isThemeStyle(propValue)) { | ||
const customStyle = findThemeStyle(propValue); | ||
if (customStyle !== void 0) { | ||
@@ -929,4 +942,4 @@ styledProps[propName] = customStyle; | ||
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 (isThemeStyle(value)) { | ||
const customStyle = findThemeStyle(value); | ||
if (customStyle !== void 0) { | ||
@@ -933,0 +946,0 @@ pseudoProps[propName] = { |
@@ -906,3 +906,3 @@ "use strict"; | ||
const pseudoProps = {}; | ||
const findCustomStyle = (value) => { | ||
const findThemeStyle = (value) => { | ||
const userTheme = import_sheet3.theme.getUserTheme(); | ||
@@ -919,5 +919,18 @@ const propKey = value.split(".")[0]; | ||
}; | ||
const isThemeStyle = (propValue) => { | ||
return typeof propValue === "string" && /[a-zA-Z]+\.[a-zA-Z0-9]+/.test(propValue) && !/^\w+\(.*\)$/.test(propValue); | ||
}; | ||
for (const [propName, propValue] of Object.entries(props)) { | ||
if (typeof propValue === "string" && /[a-zA-Z]+\.[a-zA-Z0-9]+/.test(propValue) && !/^\w+\(.*\)$/.test(propValue)) { | ||
const customStyle = findCustomStyle(propValue); | ||
if (Array.isArray(propValue)) { | ||
styledProps[propName] = propValue.map((value) => { | ||
if (isThemeStyle(value)) { | ||
const customStyle = findThemeStyle(value); | ||
if (customStyle !== void 0) { | ||
return customStyle; | ||
} | ||
} | ||
return value; | ||
}); | ||
} else if (isThemeStyle(propValue)) { | ||
const customStyle = findThemeStyle(propValue); | ||
if (customStyle !== void 0) { | ||
@@ -931,4 +944,4 @@ styledProps[propName] = customStyle; | ||
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 (isThemeStyle(value)) { | ||
const customStyle = findThemeStyle(value); | ||
if (customStyle !== void 0) { | ||
@@ -935,0 +948,0 @@ pseudoProps[propName] = { |
{ | ||
"name": "@kuma-ui/system", | ||
"version": "0.0.0-dev-20231112011326", | ||
"version": "0.0.0-dev-20231125141015", | ||
"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
186254
6081