@gearbox-protocol/ui-kit 3.3.0 → 3.4.0

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.
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),d=require("../../../utils/cn.cjs");function l(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const u=l(c),n=u.forwardRef(({header:e,footer:r,children:t,className:o,...s},i)=>a.jsxs("div",{ref:i,className:d.cn("grid min-h-screen grid-rows-[auto_1fr_auto]",o),style:{gridTemplateAreas:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("react"),n=require("../../../utils/cn.cjs");function u(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const f=u(l),s=f.forwardRef(({header:e,footer:r,children:t,className:o,mainClassName:c,...i},d)=>a.jsxs("div",{ref:d,className:n.cn("grid min-h-screen grid-rows-[auto_1fr_auto]",o),style:{gridTemplateAreas:`
2
2
  "header"
3
3
  "main"
4
4
  "footer"
5
- `},...s,children:[e&&a.jsx("div",{className:"border-b border-border",style:{gridArea:"header"},children:e}),a.jsx("main",{className:"overflow-x-hidden py-6",style:{gridArea:"main",backgroundColor:"hsl(var(--background))",color:"hsl(var(--foreground))"},children:t}),r&&a.jsx("div",{style:{gridArea:"footer"},children:r})]}));n.displayName="Layout";exports.Layout=n;
5
+ `},...i,children:[e&&a.jsx("div",{className:"border-b border-border",style:{gridArea:"header"},children:e}),a.jsx("main",{className:n.cn("overflow-x-hidden py-6",c),style:{gridArea:"main",backgroundColor:"hsl(var(--background))",color:"hsl(var(--foreground))"},children:t}),r&&a.jsx("div",{style:{gridArea:"footer"},children:r})]}));s.displayName="Layout";exports.Layout=s;
@@ -1,12 +1,12 @@
1
- import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
- import * as t from "react";
3
- import { cn as m } from "../../../utils/cn.js";
4
- const n = t.forwardRef(
5
- ({ header: e, footer: o, children: a, className: d, ...i }, s) => /* @__PURE__ */ l(
1
+ import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
+ import * as n from "react";
3
+ import { cn as a } from "../../../utils/cn.js";
4
+ const c = n.forwardRef(
5
+ ({ header: e, footer: o, children: d, className: i, mainClassName: s, ...l }, t) => /* @__PURE__ */ m(
6
6
  "div",
7
7
  {
8
- ref: s,
9
- className: m("grid min-h-screen grid-rows-[auto_1fr_auto]", d),
8
+ ref: t,
9
+ className: a("grid min-h-screen grid-rows-[auto_1fr_auto]", i),
10
10
  style: {
11
11
  gridTemplateAreas: `
12
12
  "header"
@@ -14,7 +14,7 @@ const n = t.forwardRef(
14
14
  "footer"
15
15
  `
16
16
  },
17
- ...i,
17
+ ...l,
18
18
  children: [
19
19
  e && /* @__PURE__ */ r(
20
20
  "div",
@@ -27,13 +27,13 @@ const n = t.forwardRef(
27
27
  /* @__PURE__ */ r(
28
28
  "main",
29
29
  {
30
- className: "overflow-x-hidden py-6",
30
+ className: a("overflow-x-hidden py-6", s),
31
31
  style: {
32
32
  gridArea: "main",
33
33
  backgroundColor: "hsl(var(--background))",
34
34
  color: "hsl(var(--foreground))"
35
35
  },
36
- children: a
36
+ children: d
37
37
  }
38
38
  ),
39
39
  o && /* @__PURE__ */ r("div", { style: { gridArea: "footer" }, children: o })
@@ -41,7 +41,7 @@ const n = t.forwardRef(
41
41
  }
42
42
  )
43
43
  );
44
- n.displayName = "Layout";
44
+ c.displayName = "Layout";
45
45
  export {
46
- n as Layout
46
+ c as Layout
47
47
  };
@@ -3,6 +3,7 @@ export interface LayoutProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  header?: React.ReactNode;
4
4
  footer?: React.ReactNode;
5
5
  children: React.ReactNode;
6
+ mainClassName?: string;
6
7
  }
7
8
  /**
8
9
  * Layout component with grid-based structure
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/ui-kit",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "Internal UI components",
5
5
  "repository": "https://github.com/gearbox-protocol/ui-kit",
6
6
  "license": "MIT",