@kbach/react 0.3.10 → 0.3.11

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.
@@ -8,7 +8,7 @@ import {
8
8
  resolve,
9
9
  useConditionalWidth,
10
10
  useGlobalDarkMode
11
- } from "./chunk-LZYPVC5K.mjs";
11
+ } from "./chunk-SMSQ7JQV.mjs";
12
12
 
13
13
  // src/jsx-runtime.tsx
14
14
  import { jsx as _jsx, jsxs as _jsxs, Fragment } from "react/jsx-runtime";
@@ -1134,14 +1134,15 @@ function resolveFontSize(value, fontSizes, isArbitrary) {
1134
1134
  }
1135
1135
  var STANDALONE = {
1136
1136
  // Display
1137
- // On native, Views are flex containers by default — `display: 'flex'` is a no-op.
1137
+ // React Native only supports display:'flex'|'none'. Setting 'flex' explicitly is
1138
+ // a no-op normally, but is needed to re-show an element that was hidden via `hidden`.
1138
1139
  // `grid`, `inline-*`, `contents`, `flow-root` have no native equivalent.
1139
- flex: isWeb ? { display: "flex" } : {},
1140
+ flex: { display: "flex" },
1140
1141
  block: isWeb ? { display: "block" } : null,
1141
1142
  "inline-block": isWeb ? { display: "inline-block" } : null,
1142
1143
  inline: isWeb ? { display: "inline" } : null,
1143
1144
  grid: isWeb ? { display: "grid" } : null,
1144
- "inline-flex": isWeb ? { display: "inline-flex" } : {},
1145
+ "inline-flex": { display: isWeb ? "inline-flex" : "flex" },
1145
1146
  "inline-grid": isWeb ? { display: "inline-grid" } : null,
1146
1147
  hidden: { display: "none" },
1147
1148
  contents: isWeb ? { display: "contents" } : null,
@@ -1533,7 +1534,7 @@ var RESOLVERS = {
1533
1534
  },
1534
1535
  // ── Flex ───────────────────────────────────────────────────────────────────
1535
1536
  flex: ({ value, isArbitrary }, { flex }) => {
1536
- if (!value) return isWeb ? { display: "flex" } : {};
1537
+ if (!value) return { display: "flex" };
1537
1538
  if (isArbitrary) {
1538
1539
  const v = parseFloat(value);
1539
1540
  return isNaN(v) ? null : { flex: v };
package/dist/index.js CHANGED
@@ -1300,14 +1300,15 @@ function resolveFontSize(value, fontSizes, isArbitrary) {
1300
1300
  }
1301
1301
  var STANDALONE = {
1302
1302
  // Display
1303
- // On native, Views are flex containers by default — `display: 'flex'` is a no-op.
1303
+ // React Native only supports display:'flex'|'none'. Setting 'flex' explicitly is
1304
+ // a no-op normally, but is needed to re-show an element that was hidden via `hidden`.
1304
1305
  // `grid`, `inline-*`, `contents`, `flow-root` have no native equivalent.
1305
- flex: isWeb ? { display: "flex" } : {},
1306
+ flex: { display: "flex" },
1306
1307
  block: isWeb ? { display: "block" } : null,
1307
1308
  "inline-block": isWeb ? { display: "inline-block" } : null,
1308
1309
  inline: isWeb ? { display: "inline" } : null,
1309
1310
  grid: isWeb ? { display: "grid" } : null,
1310
- "inline-flex": isWeb ? { display: "inline-flex" } : {},
1311
+ "inline-flex": { display: isWeb ? "inline-flex" : "flex" },
1311
1312
  "inline-grid": isWeb ? { display: "inline-grid" } : null,
1312
1313
  hidden: { display: "none" },
1313
1314
  contents: isWeb ? { display: "contents" } : null,
@@ -1699,7 +1700,7 @@ var RESOLVERS = {
1699
1700
  },
1700
1701
  // ── Flex ───────────────────────────────────────────────────────────────────
1701
1702
  flex: ({ value, isArbitrary }, { flex }) => {
1702
- if (!value) return isWeb ? { display: "flex" } : {};
1703
+ if (!value) return { display: "flex" };
1703
1704
  if (isArbitrary) {
1704
1705
  const v = parseFloat(value);
1705
1706
  return isNaN(v) ? null : { flex: v };
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  updateConfig,
22
22
  useGlobalDarkMode,
23
23
  useGlobalWidth
24
- } from "./chunk-LZYPVC5K.mjs";
24
+ } from "./chunk-SMSQ7JQV.mjs";
25
25
 
26
26
  // src/context.tsx
27
27
  import { createContext, useContext } from "react";
@@ -1203,14 +1203,15 @@ function resolveFontSize(value, fontSizes, isArbitrary) {
1203
1203
  }
1204
1204
  var STANDALONE = {
1205
1205
  // Display
1206
- // On native, Views are flex containers by default — `display: 'flex'` is a no-op.
1206
+ // React Native only supports display:'flex'|'none'. Setting 'flex' explicitly is
1207
+ // a no-op normally, but is needed to re-show an element that was hidden via `hidden`.
1207
1208
  // `grid`, `inline-*`, `contents`, `flow-root` have no native equivalent.
1208
- flex: isWeb ? { display: "flex" } : {},
1209
+ flex: { display: "flex" },
1209
1210
  block: isWeb ? { display: "block" } : null,
1210
1211
  "inline-block": isWeb ? { display: "inline-block" } : null,
1211
1212
  inline: isWeb ? { display: "inline" } : null,
1212
1213
  grid: isWeb ? { display: "grid" } : null,
1213
- "inline-flex": isWeb ? { display: "inline-flex" } : {},
1214
+ "inline-flex": { display: isWeb ? "inline-flex" : "flex" },
1214
1215
  "inline-grid": isWeb ? { display: "inline-grid" } : null,
1215
1216
  hidden: { display: "none" },
1216
1217
  contents: isWeb ? { display: "contents" } : null,
@@ -1602,7 +1603,7 @@ var RESOLVERS = {
1602
1603
  },
1603
1604
  // ── Flex ───────────────────────────────────────────────────────────────────
1604
1605
  flex: ({ value, isArbitrary }, { flex }) => {
1605
- if (!value) return isWeb ? { display: "flex" } : {};
1606
+ if (!value) return { display: "flex" };
1606
1607
  if (isArbitrary) {
1607
1608
  const v = parseFloat(value);
1608
1609
  return isNaN(v) ? null : { flex: v };
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-3AMSZMOL.mjs";
6
- import "./chunk-LZYPVC5K.mjs";
5
+ } from "./chunk-PIVTTJGI.mjs";
6
+ import "./chunk-SMSQ7JQV.mjs";
7
7
 
8
8
  // src/jsx-dev-runtime.tsx
9
9
  function jsxDEV(type, props, key, isStaticChildren, _source, _self) {
@@ -1202,14 +1202,15 @@ function resolveFontSize(value, fontSizes, isArbitrary) {
1202
1202
  }
1203
1203
  var STANDALONE = {
1204
1204
  // Display
1205
- // On native, Views are flex containers by default — `display: 'flex'` is a no-op.
1205
+ // React Native only supports display:'flex'|'none'. Setting 'flex' explicitly is
1206
+ // a no-op normally, but is needed to re-show an element that was hidden via `hidden`.
1206
1207
  // `grid`, `inline-*`, `contents`, `flow-root` have no native equivalent.
1207
- flex: isWeb ? { display: "flex" } : {},
1208
+ flex: { display: "flex" },
1208
1209
  block: isWeb ? { display: "block" } : null,
1209
1210
  "inline-block": isWeb ? { display: "inline-block" } : null,
1210
1211
  inline: isWeb ? { display: "inline" } : null,
1211
1212
  grid: isWeb ? { display: "grid" } : null,
1212
- "inline-flex": isWeb ? { display: "inline-flex" } : {},
1213
+ "inline-flex": { display: isWeb ? "inline-flex" : "flex" },
1213
1214
  "inline-grid": isWeb ? { display: "inline-grid" } : null,
1214
1215
  hidden: { display: "none" },
1215
1216
  contents: isWeb ? { display: "contents" } : null,
@@ -1601,7 +1602,7 @@ var RESOLVERS = {
1601
1602
  },
1602
1603
  // ── Flex ───────────────────────────────────────────────────────────────────
1603
1604
  flex: ({ value, isArbitrary }, { flex }) => {
1604
- if (!value) return isWeb ? { display: "flex" } : {};
1605
+ if (!value) return { display: "flex" };
1605
1606
  if (isArbitrary) {
1606
1607
  const v = parseFloat(value);
1607
1608
  return isNaN(v) ? null : { flex: v };
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-3AMSZMOL.mjs";
6
- import "./chunk-LZYPVC5K.mjs";
5
+ } from "./chunk-PIVTTJGI.mjs";
6
+ import "./chunk-SMSQ7JQV.mjs";
7
7
  export {
8
8
  Fragment,
9
9
  jsx,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react",
3
- "version": "0.3.10",
3
+ "version": "0.3.11",
4
4
  "description": "React / React Native components and hooks for the Kbach framework",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",