@gearbox-protocol/ui-kit 3.14.0-next.28 → 3.14.0-next.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),s=require("../../app-bar/app-bar.cjs"),i=require("../../base-link/base-link.cjs"),c=require("../../navbar-logo/navbar-logo.cjs"),S=require("../../../utils/cn.cjs"),o=require("../../../utils/static.cjs");function N(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const L=N(b);function w({href:t}){return e.jsx(i.BaseLink,{size:"unset",variant:"unset",color:"main",href:t,className:"inline-flex",children:e.jsx(c.NavBarLogo,{src:o.getStatic("/logo/logo_monochrome_white.png"),srcSet:`${o.getStatic("/logo/logo_monochrome_white.png")} 1x, ${o.getStatic("/logo/logo_monochrome_white@2x.png")} 2x, ${o.getStatic("/logo/logo_monochrome_white@2x.png")} 3x`,alt:"Logo",style:{height:"32px"},className:"w-auto cursor-pointer"})})}function v({href:t}){return e.jsx(i.BaseLink,{size:"unset",variant:"unset",color:"main",href:t,className:"inline-flex",children:e.jsx(c.NavBarLogo,{src:o.getStatic("/logo/sign_monochrome_white.png"),srcSet:`${o.getStatic("/logo/sign_monochrome_white.png")} 1x, ${o.getStatic("/logo/sign_monochrome_white@2x.png")} 2x, ${o.getStatic("/logo/sign_monochrome_white@2x.png")} 3x`,alt:"Logo",style:{height:"34px",marginLeft:"4px",marginTop:"4px"},className:"w-auto cursor-pointer"})})}const l=L.forwardRef(({homeHref:t="/",desktopLogo:a,mobileLogo:n,mobileMenu:r,tabs:g,actions:p,wallet:d,extraMenu:m,leftTestId:u,centerTestId:h,rightTestId:x,className:_,...f},j)=>e.jsxs(s.AppBar,{ref:j,className:S.cn("!h-14 md:px-4 lg:px-10",_),...f,children:[e.jsxs(s.AppBarSidePanel,{"data-testid":u,children:[r&&e.jsx("div",{className:"block lg:hidden",children:r}),e.jsx("div",{className:"hidden lg:block",children:a??e.jsx(w,{href:t})}),e.jsx("div",{className:"block lg:hidden",children:n??e.jsx(v,{href:t})})]}),e.jsx(s.AppBarCenter,{"data-testid":h,className:"md:px-0 lg:px-3",children:e.jsx(s.AppBarCenterContent,{className:"md:hidden lg:block",children:g})}),e.jsxs(s.AppBarSidePanel,{"data-testid":x,className:"ml-auto",children:[p,d,m]})]}));l.displayName="AppHeader";exports.AppHeader=l;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { AppBar as
|
|
2
|
+
import * as w from "react";
|
|
3
|
+
import { AppBar as L, AppBarSidePanel as i, AppBarCenter as k, AppBarCenterContent as v } from "../../app-bar/app-bar.js";
|
|
4
4
|
import { BaseLink as a } from "../../base-link/base-link.js";
|
|
5
5
|
import { NavBarLogo as l } from "../../navbar-logo/navbar-logo.js";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as A } from "../../../utils/cn.js";
|
|
7
7
|
import { getStatic as e } from "../../../utils/static.js";
|
|
8
|
-
function
|
|
8
|
+
function B({ href: r }) {
|
|
9
9
|
return /* @__PURE__ */ o(
|
|
10
10
|
a,
|
|
11
11
|
{
|
|
@@ -31,7 +31,7 @@ function A({ href: r }) {
|
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function $({ href: r }) {
|
|
35
35
|
return /* @__PURE__ */ o(
|
|
36
36
|
a,
|
|
37
37
|
{
|
|
@@ -57,7 +57,7 @@ function B({ href: r }) {
|
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const b = w.forwardRef(
|
|
61
61
|
({
|
|
62
62
|
homeHref: r = "/",
|
|
63
63
|
desktopLogo: s,
|
|
@@ -66,33 +66,35 @@ const $ = N.forwardRef(
|
|
|
66
66
|
tabs: c,
|
|
67
67
|
actions: p,
|
|
68
68
|
wallet: g,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
extraMenu: h,
|
|
70
|
+
leftTestId: d,
|
|
71
|
+
centerTestId: x,
|
|
72
|
+
rightTestId: f,
|
|
73
|
+
className: _,
|
|
74
|
+
...u
|
|
75
|
+
}, N) => /* @__PURE__ */ n(
|
|
76
|
+
L,
|
|
76
77
|
{
|
|
77
|
-
ref:
|
|
78
|
-
className:
|
|
79
|
-
...
|
|
78
|
+
ref: N,
|
|
79
|
+
className: A("!h-14 md:px-4 lg:px-10", _),
|
|
80
|
+
...u,
|
|
80
81
|
children: [
|
|
81
|
-
/* @__PURE__ */ n(i, { "data-testid":
|
|
82
|
+
/* @__PURE__ */ n(i, { "data-testid": d, children: [
|
|
82
83
|
t && /* @__PURE__ */ o("div", { className: "block lg:hidden", children: t }),
|
|
83
|
-
/* @__PURE__ */ o("div", { className: "hidden lg:block", children: s ?? /* @__PURE__ */ o(
|
|
84
|
-
/* @__PURE__ */ o("div", { className: "block lg:hidden", children: m ?? /* @__PURE__ */ o(
|
|
84
|
+
/* @__PURE__ */ o("div", { className: "hidden lg:block", children: s ?? /* @__PURE__ */ o(B, { href: r }) }),
|
|
85
|
+
/* @__PURE__ */ o("div", { className: "block lg:hidden", children: m ?? /* @__PURE__ */ o($, { href: r }) })
|
|
85
86
|
] }),
|
|
86
|
-
/* @__PURE__ */ o(
|
|
87
|
-
/* @__PURE__ */ n(i, { "data-testid":
|
|
87
|
+
/* @__PURE__ */ o(k, { "data-testid": x, className: "md:px-0 lg:px-3", children: /* @__PURE__ */ o(v, { className: "md:hidden lg:block", children: c }) }),
|
|
88
|
+
/* @__PURE__ */ n(i, { "data-testid": f, className: "ml-auto", children: [
|
|
88
89
|
p,
|
|
89
|
-
g
|
|
90
|
+
g,
|
|
91
|
+
h
|
|
90
92
|
] })
|
|
91
93
|
]
|
|
92
94
|
}
|
|
93
95
|
)
|
|
94
96
|
);
|
|
95
|
-
|
|
97
|
+
b.displayName = "AppHeader";
|
|
96
98
|
export {
|
|
97
|
-
|
|
99
|
+
b as AppHeader
|
|
98
100
|
};
|
|
@@ -30,6 +30,10 @@ export interface AppHeaderProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
30
30
|
* Wallet / connect button area, rendered on the right.
|
|
31
31
|
*/
|
|
32
32
|
wallet?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Optional dots menu placed after the wallet (e.g. settings, docs links).
|
|
35
|
+
*/
|
|
36
|
+
extraMenu?: React.ReactNode;
|
|
33
37
|
/**
|
|
34
38
|
* Optional `data-testid` applied to the left side panel.
|
|
35
39
|
*/
|