@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: userStyle, ...passProps } = omitConsumed(workingProps);
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, {
@@ -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: userStyle, ...passProps } = omitConsumed(workingProps);
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, {
@@ -3,7 +3,7 @@ import {
3
3
  Fragment,
4
4
  jsx,
5
5
  jsxs
6
- } from "./chunk-X4XQQZN6.mjs";
6
+ } from "./chunk-S6AHQ5M6.mjs";
7
7
  import "./chunk-TKBIGAR2.mjs";
8
8
 
9
9
  // src/jsx-dev-runtime.tsx
@@ -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: userStyle, ...passProps } = omitConsumed(workingProps);
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, {
@@ -4,7 +4,7 @@ import {
4
4
  _invalidateDefaultFontCache,
5
5
  jsx,
6
6
  jsxs
7
- } from "./chunk-X4XQQZN6.mjs";
7
+ } from "./chunk-S6AHQ5M6.mjs";
8
8
  import {
9
9
  registerWebElement
10
10
  } from "./chunk-TKBIGAR2.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react",
3
- "version": "0.6.28",
3
+ "version": "0.6.29",
4
4
  "description": "React / React Native components and hooks for the Kbach framework",
5
5
  "repository": {
6
6
  "type": "git",