@kbach/react 0.4.1 → 0.4.3
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.
|
@@ -130,8 +130,10 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
130
130
|
return makeElement(isStaticChildren, type, rawProps, key);
|
|
131
131
|
}
|
|
132
132
|
const config = getConfig();
|
|
133
|
-
const
|
|
134
|
-
const
|
|
133
|
+
const isOnWeb = typeof document !== "undefined" && classStr != null;
|
|
134
|
+
const isGridOnWeb = isOnWeb && /(?:^|\s)(?:[\w-]+:)*(?:grd|grid-(?:\d+|cols-\d+|rows-\d+))(?:\s|$)/.test(classStr);
|
|
135
|
+
const hasWebPosition = isOnWeb && /(?:^|\s)(?:[\w-]+:)*(?:fixed|sticky)(?:\s|$)/.test(classStr);
|
|
136
|
+
const actualType = isGridOnWeb || hasWebPosition ? "div" : type;
|
|
135
137
|
const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
|
|
136
138
|
const { style: userStyle, ...passProps } = omitConsumed(rawProps);
|
|
137
139
|
const { interactive, modeOrResponsive } = bucketMods(resolved);
|
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -2690,8 +2690,10 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2690
2690
|
return makeElement(isStaticChildren, type, rawProps, key);
|
|
2691
2691
|
}
|
|
2692
2692
|
const config = getConfig();
|
|
2693
|
-
const
|
|
2694
|
-
const
|
|
2693
|
+
const isOnWeb = typeof document !== "undefined" && classStr != null;
|
|
2694
|
+
const isGridOnWeb = isOnWeb && /(?:^|\s)(?:[\w-]+:)*(?:grd|grid-(?:\d+|cols-\d+|rows-\d+))(?:\s|$)/.test(classStr);
|
|
2695
|
+
const hasWebPosition = isOnWeb && /(?:^|\s)(?:[\w-]+:)*(?:fixed|sticky)(?:\s|$)/.test(classStr);
|
|
2696
|
+
const actualType = isGridOnWeb || hasWebPosition ? "div" : type;
|
|
2695
2697
|
const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
|
|
2696
2698
|
const { style: userStyle, ...passProps } = omitConsumed(rawProps);
|
|
2697
2699
|
const { interactive, modeOrResponsive } = bucketMods(resolved);
|
package/dist/jsx-dev-runtime.mjs
CHANGED
package/dist/jsx-runtime.js
CHANGED
|
@@ -2689,8 +2689,10 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2689
2689
|
return makeElement(isStaticChildren, type, rawProps, key);
|
|
2690
2690
|
}
|
|
2691
2691
|
const config = getConfig();
|
|
2692
|
-
const
|
|
2693
|
-
const
|
|
2692
|
+
const isOnWeb = typeof document !== "undefined" && classStr != null;
|
|
2693
|
+
const isGridOnWeb = isOnWeb && /(?:^|\s)(?:[\w-]+:)*(?:grd|grid-(?:\d+|cols-\d+|rows-\d+))(?:\s|$)/.test(classStr);
|
|
2694
|
+
const hasWebPosition = isOnWeb && /(?:^|\s)(?:[\w-]+:)*(?:fixed|sticky)(?:\s|$)/.test(classStr);
|
|
2695
|
+
const actualType = isGridOnWeb || hasWebPosition ? "div" : type;
|
|
2694
2696
|
const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
|
|
2695
2697
|
const { style: userStyle, ...passProps } = omitConsumed(rawProps);
|
|
2696
2698
|
const { interactive, modeOrResponsive } = bucketMods(resolved);
|
package/dist/jsx-runtime.mjs
CHANGED