@rudra-studio/rudra-layout 1.0.20 → 1.0.22

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.
@@ -4,6 +4,13 @@ export interface GridProps extends Omit<React.HTMLAttributes<HTMLElement>, "chil
4
4
  children?: React.ReactNode;
5
5
  /** @select|div|section|article|main|aside */
6
6
  as?: GridElement;
7
+ /**
8
+ * Explicit equal-width column count. This is preferred when the desired
9
+ * count is data-driven or not represented by a Tailwind utility.
10
+ *
11
+ * @type|number
12
+ */
13
+ columns?: number;
7
14
  /**
8
15
  * @type|class
9
16
  * @schema [
@@ -18,6 +25,11 @@ export interface GridProps extends Omit<React.HTMLAttributes<HTMLElement>, "chil
18
25
  * {"key":"4","label":"4 Columns"},
19
26
  * {"key":"5","label":"5 Columns"},
20
27
  * {"key":"6","label":"6 Columns"},
28
+ * {"key":"7","label":"7 Columns"},
29
+ * {"key":"8","label":"8 Columns"},
30
+ * {"key":"9","label":"9 Columns"},
31
+ * {"key":"10","label":"10 Columns"},
32
+ * {"key":"11","label":"11 Columns"},
21
33
  * {"key":"12","label":"12 Columns"}
22
34
  * ]
23
35
  * },
@@ -135,4 +147,4 @@ export interface GridProps extends Omit<React.HTMLAttributes<HTMLElement>, "chil
135
147
  */
136
148
  className?: string;
137
149
  }
138
- export default function Grid({ children, as, className, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
150
+ export default function Grid({ children, as, columns, className, style, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,14 @@
1
1
  import "react";
2
2
  import { jsx as e } from "react/jsx-runtime";
3
3
  //#region src/components/Grid/index.tsx
4
- function t({ children: t, as: n = "div", className: r = "", ...i }) {
4
+ function t({ children: t, as: n = "div", columns: r, className: i = "", style: a, ...o }) {
5
5
  return /* @__PURE__ */ e(n, {
6
- ...i,
7
- className: ["grid", r].filter(Boolean).join(" "),
6
+ ...o,
7
+ className: ["grid", i].filter(Boolean).join(" "),
8
+ style: r ? {
9
+ ...a,
10
+ gridTemplateColumns: `repeat(${Math.max(1, Math.min(12, Math.floor(r)))}, minmax(0, 1fr))`
11
+ } : a,
8
12
  children: t
9
13
  });
10
14
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "dependencies": {
3
3
  "@monaco-editor/react": "4.7.0",
4
4
  "@react-three/fiber": "9.6.1",
5
- "@tanstack/react-table": "8",
5
+ "@tanstack/react-table": "8.21.3",
6
6
  "gsap": "3.12.5",
7
7
  "lucide-react": "^1.8.0",
8
8
  "motion": "12.0.0",
@@ -43,5 +43,5 @@
43
43
  },
44
44
  "types": "./index.d.ts",
45
45
  "unpkg": "./index.umd.js",
46
- "version": "1.0.20"
46
+ "version": "1.0.22"
47
47
  }