@kbach/react 0.3.11 → 0.3.12

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-SMSQ7JQV.mjs";
11
+ } from "./chunk-UGBTZ7VN.mjs";
12
12
 
13
13
  // src/jsx-runtime.tsx
14
14
  import { jsx as _jsx, jsxs as _jsxs, Fragment } from "react/jsx-runtime";
@@ -1532,6 +1532,13 @@ var RESOLVERS = {
1532
1532
  const r = resolveRadius(value, borderRadius, isArbitrary);
1533
1533
  return r !== null ? { borderBottomRightRadius: r } : null;
1534
1534
  },
1535
+ // ── Grid (responsive column count: grid-1 … grid-12) ─────────────────────
1536
+ grid: ({ value }) => {
1537
+ if (!value || !isWeb) return null;
1538
+ const n = parseInt(value, 10);
1539
+ if (isNaN(n) || n < 1 || n > 12) return null;
1540
+ return { display: "grid", gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` };
1541
+ },
1535
1542
  // ── Flex ───────────────────────────────────────────────────────────────────
1536
1543
  flex: ({ value, isArbitrary }, { flex }) => {
1537
1544
  if (!value) return { display: "flex" };
package/dist/index.js CHANGED
@@ -1698,6 +1698,13 @@ var RESOLVERS = {
1698
1698
  const r = resolveRadius(value, borderRadius, isArbitrary);
1699
1699
  return r !== null ? { borderBottomRightRadius: r } : null;
1700
1700
  },
1701
+ // ── Grid (responsive column count: grid-1 … grid-12) ─────────────────────
1702
+ grid: ({ value }) => {
1703
+ if (!value || !isWeb) return null;
1704
+ const n = parseInt(value, 10);
1705
+ if (isNaN(n) || n < 1 || n > 12) return null;
1706
+ return { display: "grid", gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` };
1707
+ },
1701
1708
  // ── Flex ───────────────────────────────────────────────────────────────────
1702
1709
  flex: ({ value, isArbitrary }, { flex }) => {
1703
1710
  if (!value) return { display: "flex" };
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  updateConfig,
22
22
  useGlobalDarkMode,
23
23
  useGlobalWidth
24
- } from "./chunk-SMSQ7JQV.mjs";
24
+ } from "./chunk-UGBTZ7VN.mjs";
25
25
 
26
26
  // src/context.tsx
27
27
  import { createContext, useContext } from "react";
@@ -1601,6 +1601,13 @@ var RESOLVERS = {
1601
1601
  const r = resolveRadius(value, borderRadius, isArbitrary);
1602
1602
  return r !== null ? { borderBottomRightRadius: r } : null;
1603
1603
  },
1604
+ // ── Grid (responsive column count: grid-1 … grid-12) ─────────────────────
1605
+ grid: ({ value }) => {
1606
+ if (!value || !isWeb) return null;
1607
+ const n = parseInt(value, 10);
1608
+ if (isNaN(n) || n < 1 || n > 12) return null;
1609
+ return { display: "grid", gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` };
1610
+ },
1604
1611
  // ── Flex ───────────────────────────────────────────────────────────────────
1605
1612
  flex: ({ value, isArbitrary }, { flex }) => {
1606
1613
  if (!value) return { display: "flex" };
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-PIVTTJGI.mjs";
6
- import "./chunk-SMSQ7JQV.mjs";
5
+ } from "./chunk-BAI72FG4.mjs";
6
+ import "./chunk-UGBTZ7VN.mjs";
7
7
 
8
8
  // src/jsx-dev-runtime.tsx
9
9
  function jsxDEV(type, props, key, isStaticChildren, _source, _self) {
@@ -1600,6 +1600,13 @@ var RESOLVERS = {
1600
1600
  const r = resolveRadius(value, borderRadius, isArbitrary);
1601
1601
  return r !== null ? { borderBottomRightRadius: r } : null;
1602
1602
  },
1603
+ // ── Grid (responsive column count: grid-1 … grid-12) ─────────────────────
1604
+ grid: ({ value }) => {
1605
+ if (!value || !isWeb) return null;
1606
+ const n = parseInt(value, 10);
1607
+ if (isNaN(n) || n < 1 || n > 12) return null;
1608
+ return { display: "grid", gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` };
1609
+ },
1603
1610
  // ── Flex ───────────────────────────────────────────────────────────────────
1604
1611
  flex: ({ value, isArbitrary }, { flex }) => {
1605
1612
  if (!value) return { display: "flex" };
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-PIVTTJGI.mjs";
6
- import "./chunk-SMSQ7JQV.mjs";
5
+ } from "./chunk-BAI72FG4.mjs";
6
+ import "./chunk-UGBTZ7VN.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.11",
3
+ "version": "0.3.12",
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",