@kbach/react 0.6.28 → 0.6.29
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.
|
@@ -110,6 +110,12 @@ function mergeStyle(computed, userStyle) {
|
|
|
110
110
|
if (Array.isArray(userStyle)) return Object.assign({}, computed, ...userStyle);
|
|
111
111
|
return { ...computed, ...userStyle };
|
|
112
112
|
}
|
|
113
|
+
function withImpliedFlexIfNeeded(webTag, resolvedBase, userStyle) {
|
|
114
|
+
if (!webTag || !resolvedBase || resolvedBase.display !== void 0 || !("flexGrow" in resolvedBase || "flexShrink" in resolvedBase || "flex" in resolvedBase)) {
|
|
115
|
+
return userStyle;
|
|
116
|
+
}
|
|
117
|
+
return Array.isArray(userStyle) ? [{ display: "flex" }, ...userStyle] : { display: "flex", ...userStyle };
|
|
118
|
+
}
|
|
113
119
|
function makeElement(isStaticChildren, type, props, key) {
|
|
114
120
|
return (isStaticChildren ? _jsxs : _jsx)(type, props, key);
|
|
115
121
|
}
|
|
@@ -152,7 +158,8 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
152
158
|
}
|
|
153
159
|
const config = getConfig();
|
|
154
160
|
const resolved = !isWeb && __kbachStyles != null ? __kbachStyles : classStr ? resolve(classStr, config.theme, config.darkMode) : {};
|
|
155
|
-
const { style:
|
|
161
|
+
const { style: rawUserStyle, ...passProps } = omitConsumed(workingProps);
|
|
162
|
+
const userStyle = withImpliedFlexIfNeeded(webTag, resolved.base, rawUserStyle);
|
|
156
163
|
const { interactive, modeOrResponsive } = bucketMods(resolved);
|
|
157
164
|
if (interactive) {
|
|
158
165
|
return _jsx(InteractiveWrapper, {
|
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -622,6 +622,12 @@ function mergeStyle(computed, userStyle) {
|
|
|
622
622
|
if (Array.isArray(userStyle)) return Object.assign({}, computed, ...userStyle);
|
|
623
623
|
return { ...computed, ...userStyle };
|
|
624
624
|
}
|
|
625
|
+
function withImpliedFlexIfNeeded(webTag, resolvedBase, userStyle) {
|
|
626
|
+
if (!webTag || !resolvedBase || resolvedBase.display !== void 0 || !("flexGrow" in resolvedBase || "flexShrink" in resolvedBase || "flex" in resolvedBase)) {
|
|
627
|
+
return userStyle;
|
|
628
|
+
}
|
|
629
|
+
return Array.isArray(userStyle) ? [{ display: "flex" }, ...userStyle] : { display: "flex", ...userStyle };
|
|
630
|
+
}
|
|
625
631
|
function makeElement(isStaticChildren, type, props, key) {
|
|
626
632
|
return (isStaticChildren ? import_jsx_runtime.jsxs : import_jsx_runtime.jsx)(type, props, key);
|
|
627
633
|
}
|
|
@@ -664,7 +670,8 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
664
670
|
}
|
|
665
671
|
const config = (0, import_core6.getConfig)();
|
|
666
672
|
const resolved = !import_core6.isWeb && __kbachStyles != null ? __kbachStyles : classStr ? (0, import_core6.resolve)(classStr, config.theme, config.darkMode) : {};
|
|
667
|
-
const { style:
|
|
673
|
+
const { style: rawUserStyle, ...passProps } = omitConsumed(workingProps);
|
|
674
|
+
const userStyle = withImpliedFlexIfNeeded(webTag, resolved.base, rawUserStyle);
|
|
668
675
|
const { interactive, modeOrResponsive } = bucketMods(resolved);
|
|
669
676
|
if (interactive) {
|
|
670
677
|
return (0, import_jsx_runtime.jsx)(InteractiveWrapper, {
|
package/dist/jsx-dev-runtime.mjs
CHANGED
package/dist/jsx-runtime.js
CHANGED
|
@@ -628,6 +628,12 @@ function mergeStyle(computed, userStyle) {
|
|
|
628
628
|
if (Array.isArray(userStyle)) return Object.assign({}, computed, ...userStyle);
|
|
629
629
|
return { ...computed, ...userStyle };
|
|
630
630
|
}
|
|
631
|
+
function withImpliedFlexIfNeeded(webTag, resolvedBase, userStyle) {
|
|
632
|
+
if (!webTag || !resolvedBase || resolvedBase.display !== void 0 || !("flexGrow" in resolvedBase || "flexShrink" in resolvedBase || "flex" in resolvedBase)) {
|
|
633
|
+
return userStyle;
|
|
634
|
+
}
|
|
635
|
+
return Array.isArray(userStyle) ? [{ display: "flex" }, ...userStyle] : { display: "flex", ...userStyle };
|
|
636
|
+
}
|
|
631
637
|
function makeElement(isStaticChildren, type, props, key) {
|
|
632
638
|
return (isStaticChildren ? import_jsx_runtime.jsxs : import_jsx_runtime.jsx)(type, props, key);
|
|
633
639
|
}
|
|
@@ -670,7 +676,8 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
670
676
|
}
|
|
671
677
|
const config = (0, import_core6.getConfig)();
|
|
672
678
|
const resolved = !import_core6.isWeb && __kbachStyles != null ? __kbachStyles : classStr ? (0, import_core6.resolve)(classStr, config.theme, config.darkMode) : {};
|
|
673
|
-
const { style:
|
|
679
|
+
const { style: rawUserStyle, ...passProps } = omitConsumed(workingProps);
|
|
680
|
+
const userStyle = withImpliedFlexIfNeeded(webTag, resolved.base, rawUserStyle);
|
|
674
681
|
const { interactive, modeOrResponsive } = bucketMods(resolved);
|
|
675
682
|
if (interactive) {
|
|
676
683
|
return (0, import_jsx_runtime.jsx)(InteractiveWrapper, {
|
package/dist/jsx-runtime.mjs
CHANGED