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