css-in-props 3.0.6 → 3.0.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -41,7 +41,7 @@ const usePropsAsCSS = (sourceObj, element, opts) => {
|
|
|
41
41
|
};
|
|
42
42
|
for (const key in sourceObj) {
|
|
43
43
|
const value = sourceObj[key];
|
|
44
|
-
if (key === "
|
|
44
|
+
if (key === "class" && element.call("isString", sourceObj.class)) {
|
|
45
45
|
const val = value.split(" ");
|
|
46
46
|
if (val.length) {
|
|
47
47
|
const CLASS = element.context.designSystem.CLASS;
|
|
@@ -67,7 +67,7 @@ const usePropsAsCSS = (sourceObj, element, opts) => {
|
|
|
67
67
|
} else if (import_defaults.DEFAULT_CSS_PROPERTIES_LIST.includes(key)) {
|
|
68
68
|
const result = (0, import_utils.exec)(value, element);
|
|
69
69
|
setToObj(key, { [key]: result });
|
|
70
|
-
if (!isProd) obj[key].label = key;
|
|
70
|
+
if (!isProd && (0, import_utils.isObject)(obj[key])) obj[key].label = key;
|
|
71
71
|
} else {
|
|
72
72
|
rest[key] = value;
|
|
73
73
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "css-in-props",
|
|
3
3
|
"description": "Utilize props as CSS methods",
|
|
4
4
|
"author": "symbo.ls",
|
|
5
|
-
"version": "3.0.
|
|
5
|
+
"version": "3.0.102",
|
|
6
6
|
"repository": "https://github.com/symbo-ls/smbls",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"module": "src/index.js",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@domql/utils": "^3.0.0",
|
|
29
|
-
"@symbo.ls/atoms": "^3.0.
|
|
29
|
+
"@symbo.ls/atoms": "^3.0.100",
|
|
30
30
|
"@symbo.ls/emotion": "^3.0.1",
|
|
31
31
|
"@symbo.ls/scratch": "^3.0.2"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "0d71cb88356157e28c841e9d62985200b81cd093"
|
|
34
34
|
}
|
|
@@ -27,7 +27,7 @@ export const usePropsAsCSS = (sourceObj, element, opts) => {
|
|
|
27
27
|
|
|
28
28
|
for (const key in sourceObj) {
|
|
29
29
|
const value = sourceObj[key]
|
|
30
|
-
if (key === '
|
|
30
|
+
if (key === 'class' && element.call('isString', sourceObj.class)) {
|
|
31
31
|
const val = value.split(' ')
|
|
32
32
|
if (val.length) {
|
|
33
33
|
const CLASS = element.context.designSystem.CLASS
|
|
@@ -57,7 +57,7 @@ export const usePropsAsCSS = (sourceObj, element, opts) => {
|
|
|
57
57
|
// they can be grouped
|
|
58
58
|
const result = exec(value, element)
|
|
59
59
|
setToObj(key, { [key]: result })
|
|
60
|
-
if (!isProd) obj[key].label = key
|
|
60
|
+
if (!isProd && isObject(obj[key])) obj[key].label = key
|
|
61
61
|
} else {
|
|
62
62
|
rest[key] = value
|
|
63
63
|
}
|