@gearbox-protocol/permissionless-ui 1.5.0 → 1.6.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.
- package/dist/cjs/components/auth/siwe-provider.js +0 -1
- package/dist/cjs/components/cards/card.js +13 -10
- package/dist/cjs/components/layout/footer.js +2 -2
- package/dist/cjs/components/layout/header.js +1 -1
- package/dist/cjs/components/layout/layout.js +12 -1
- package/dist/cjs/components/layout/page-layout.js +5 -2
- package/dist/cjs/components/tabs.js +1 -1
- package/dist/esm/components/auth/siwe-provider.js +0 -1
- package/dist/esm/components/cards/card.js +13 -10
- package/dist/esm/components/layout/footer.js +2 -2
- package/dist/esm/components/layout/header.js +1 -1
- package/dist/esm/components/layout/layout.js +12 -1
- package/dist/esm/components/layout/page-layout.js +5 -2
- package/dist/esm/components/tabs.js +1 -1
- package/dist/globals.css +5 -1
- package/dist/types/components/layout/page-layout.d.ts +3 -1
- package/package.json +2 -2
|
@@ -40,18 +40,21 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
40
40
|
var import_class_variance_authority = require("class-variance-authority");
|
|
41
41
|
var React = __toESM(require("react"));
|
|
42
42
|
var import_utils = __toESM(require('../../utils/index.js'));
|
|
43
|
-
const cardVariants = (0, import_class_variance_authority.cva)(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
const cardVariants = (0, import_class_variance_authority.cva)(
|
|
44
|
+
"rounded-xl border border-border bg-card text-card-foreground",
|
|
45
|
+
{
|
|
46
|
+
variants: {
|
|
47
|
+
variant: {
|
|
48
|
+
default: "",
|
|
49
|
+
interactive: "hover:bg-secondary transition-colors cursor-pointer",
|
|
50
|
+
transparent: "bg-card/0"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
variant: "default"
|
|
49
55
|
}
|
|
50
|
-
},
|
|
51
|
-
defaultVariants: {
|
|
52
|
-
variant: "default"
|
|
53
56
|
}
|
|
54
|
-
|
|
57
|
+
);
|
|
55
58
|
const Card = React.forwardRef(
|
|
56
59
|
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
60
|
"div",
|
|
@@ -58,7 +58,7 @@ const Footer = import_react.default.forwardRef(
|
|
|
58
58
|
{
|
|
59
59
|
ref,
|
|
60
60
|
className: (0, import_cn.cn)(
|
|
61
|
-
"relative w-full border-t bg-card border-border
|
|
61
|
+
"relative w-full border-t bg-card border-border flex items-center justify-center",
|
|
62
62
|
className
|
|
63
63
|
),
|
|
64
64
|
...props,
|
|
@@ -138,7 +138,7 @@ function GearboxFooter({
|
|
|
138
138
|
"footer",
|
|
139
139
|
{
|
|
140
140
|
className: (0, import_cn.cn)(
|
|
141
|
-
"relative w-full border-t bg-card border-border
|
|
141
|
+
"relative w-full border-t bg-card border-border flex items-center justify-center",
|
|
142
142
|
className
|
|
143
143
|
),
|
|
144
144
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 items-top py-6 w-full px-4 max-w-[1440px]", children: [
|
|
@@ -65,7 +65,7 @@ const Header = import_react.default.forwardRef(
|
|
|
65
65
|
{
|
|
66
66
|
ref,
|
|
67
67
|
className: (0, import_cn.cn)(
|
|
68
|
-
"relative w-full bg-background h-18
|
|
68
|
+
"relative w-full bg-background h-18 border-b flex flex-nowrap items-center border-border",
|
|
69
69
|
fixed && "fixed top-0 left-0 right-0 z-50",
|
|
70
70
|
sticky && "sticky top-0 z-50",
|
|
71
71
|
className
|
|
@@ -51,7 +51,18 @@ const Layout = import_react.default.forwardRef(
|
|
|
51
51
|
...props,
|
|
52
52
|
children: [
|
|
53
53
|
header && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { gridArea: "header" }, children: header }),
|
|
54
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
"main",
|
|
56
|
+
{
|
|
57
|
+
className: "overflow-x-hidden py-6",
|
|
58
|
+
style: {
|
|
59
|
+
gridArea: "main",
|
|
60
|
+
backgroundColor: "hsl(var(--main-background))",
|
|
61
|
+
color: "hsl(var(--main-foreground))"
|
|
62
|
+
},
|
|
63
|
+
children
|
|
64
|
+
}
|
|
65
|
+
),
|
|
55
66
|
footer && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { gridArea: "footer" }, children: footer })
|
|
56
67
|
]
|
|
57
68
|
}
|
|
@@ -23,15 +23,18 @@ __export(page_layout_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(page_layout_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_back_button = require('../buttons/back-button.js');
|
|
26
|
+
var import_container = require('./container.js');
|
|
26
27
|
function PageLayout({
|
|
27
28
|
children,
|
|
28
29
|
title,
|
|
29
30
|
description,
|
|
30
31
|
icon,
|
|
31
32
|
backButton,
|
|
32
|
-
actionButton
|
|
33
|
+
actionButton,
|
|
34
|
+
maxContainerWidth = "xl",
|
|
35
|
+
containerClassName
|
|
33
36
|
}) {
|
|
34
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
37
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_container.Container, { maxWidth: maxContainerWidth, className: containerClassName, children: [
|
|
35
38
|
backButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
36
39
|
import_back_button.BackButton,
|
|
37
40
|
{
|
|
@@ -56,7 +56,7 @@ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
56
56
|
{
|
|
57
57
|
ref,
|
|
58
58
|
className: (0, import_utils.default)(
|
|
59
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow rounded-none border-b-2 border-transparent px-2 py-2 text-gray-400 hover:text-white data-[state=active]:border-white data-[state=active]:bg-transparent data-[state=active]:text-white focus:outline-none",
|
|
59
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow rounded-none border-b-2 border-transparent px-2 py-2 text-gray-400 hover:text-white data-[state=active]:border-white data-[state=active]:bg-transparent data-[state=active]:text-white focus:outline-none cursor-pointer",
|
|
60
60
|
className
|
|
61
61
|
),
|
|
62
62
|
...props
|
|
@@ -2,18 +2,21 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import cn from "../../utils/index.js";
|
|
5
|
-
const cardVariants = cva(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
const cardVariants = cva(
|
|
6
|
+
"rounded-xl border border-border bg-card text-card-foreground",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "",
|
|
11
|
+
interactive: "hover:bg-secondary transition-colors cursor-pointer",
|
|
12
|
+
transparent: "bg-card/0"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
variant: "default"
|
|
11
17
|
}
|
|
12
|
-
},
|
|
13
|
-
defaultVariants: {
|
|
14
|
-
variant: "default"
|
|
15
18
|
}
|
|
16
|
-
|
|
19
|
+
);
|
|
17
20
|
const Card = React.forwardRef(
|
|
18
21
|
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
19
22
|
"div",
|
|
@@ -22,7 +22,7 @@ const Footer = React.forwardRef(
|
|
|
22
22
|
{
|
|
23
23
|
ref,
|
|
24
24
|
className: cn(
|
|
25
|
-
"relative w-full border-t bg-card border-border
|
|
25
|
+
"relative w-full border-t bg-card border-border flex items-center justify-center",
|
|
26
26
|
className
|
|
27
27
|
),
|
|
28
28
|
...props,
|
|
@@ -102,7 +102,7 @@ function GearboxFooter({
|
|
|
102
102
|
"footer",
|
|
103
103
|
{
|
|
104
104
|
className: cn(
|
|
105
|
-
"relative w-full border-t bg-card border-border
|
|
105
|
+
"relative w-full border-t bg-card border-border flex items-center justify-center",
|
|
106
106
|
className
|
|
107
107
|
),
|
|
108
108
|
children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 items-top py-6 w-full px-4 max-w-[1440px]", children: [
|
|
@@ -31,7 +31,7 @@ const Header = React.forwardRef(
|
|
|
31
31
|
{
|
|
32
32
|
ref,
|
|
33
33
|
className: cn(
|
|
34
|
-
"relative w-full bg-background h-18
|
|
34
|
+
"relative w-full bg-background h-18 border-b flex flex-nowrap items-center border-border",
|
|
35
35
|
fixed && "fixed top-0 left-0 right-0 z-50",
|
|
36
36
|
sticky && "sticky top-0 z-50",
|
|
37
37
|
className
|
|
@@ -18,7 +18,18 @@ const Layout = React.forwardRef(
|
|
|
18
18
|
...props,
|
|
19
19
|
children: [
|
|
20
20
|
header && /* @__PURE__ */ jsx("div", { style: { gridArea: "header" }, children: header }),
|
|
21
|
-
/* @__PURE__ */ jsx(
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
"main",
|
|
23
|
+
{
|
|
24
|
+
className: "overflow-x-hidden py-6",
|
|
25
|
+
style: {
|
|
26
|
+
gridArea: "main",
|
|
27
|
+
backgroundColor: "hsl(var(--main-background))",
|
|
28
|
+
color: "hsl(var(--main-foreground))"
|
|
29
|
+
},
|
|
30
|
+
children
|
|
31
|
+
}
|
|
32
|
+
),
|
|
22
33
|
footer && /* @__PURE__ */ jsx("div", { style: { gridArea: "footer" }, children: footer })
|
|
23
34
|
]
|
|
24
35
|
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { BackButton } from "../buttons/back-button.js";
|
|
3
|
+
import { Container } from "./container.js";
|
|
3
4
|
function PageLayout({
|
|
4
5
|
children,
|
|
5
6
|
title,
|
|
6
7
|
description,
|
|
7
8
|
icon,
|
|
8
9
|
backButton,
|
|
9
|
-
actionButton
|
|
10
|
+
actionButton,
|
|
11
|
+
maxContainerWidth = "xl",
|
|
12
|
+
containerClassName
|
|
10
13
|
}) {
|
|
11
|
-
return /* @__PURE__ */ jsxs(
|
|
14
|
+
return /* @__PURE__ */ jsxs(Container, { maxWidth: maxContainerWidth, className: containerClassName, children: [
|
|
12
15
|
backButton && /* @__PURE__ */ jsx(
|
|
13
16
|
BackButton,
|
|
14
17
|
{
|
|
@@ -20,7 +20,7 @@ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
20
20
|
{
|
|
21
21
|
ref,
|
|
22
22
|
className: cn(
|
|
23
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow rounded-none border-b-2 border-transparent px-2 py-2 text-gray-400 hover:text-white data-[state=active]:border-white data-[state=active]:bg-transparent data-[state=active]:text-white focus:outline-none",
|
|
23
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow rounded-none border-b-2 border-transparent px-2 py-2 text-gray-400 hover:text-white data-[state=active]:border-white data-[state=active]:bg-transparent data-[state=active]:text-white focus:outline-none cursor-pointer",
|
|
24
24
|
className
|
|
25
25
|
),
|
|
26
26
|
...props
|
package/dist/globals.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
1
|
@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap");
|
|
2
|
+
@import "tailwindcss";
|
|
3
3
|
@import "./grid-safelist.css";
|
|
4
4
|
|
|
5
5
|
@layer base {
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
--white: 0 0% 100%;
|
|
33
33
|
--black: 0 0% 0%;
|
|
34
34
|
--border: 0 0% 89.8%;
|
|
35
|
+
--main-background: 240 10% 3.9%;
|
|
36
|
+
--main-foreground: 0 0% 98%;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
.dark {
|
|
@@ -74,6 +76,8 @@
|
|
|
74
76
|
--white: 0 0% 100%;
|
|
75
77
|
--black: 0 0% 0%;
|
|
76
78
|
--border: 225 7% 22%;
|
|
79
|
+
--main-background: 240 10% 3.9%;
|
|
80
|
+
--main-foreground: 0 0% 98%;
|
|
77
81
|
}
|
|
78
82
|
}
|
|
79
83
|
|
|
@@ -9,6 +9,8 @@ interface PageLayoutProps {
|
|
|
9
9
|
onClick?: () => void;
|
|
10
10
|
};
|
|
11
11
|
actionButton?: JSX.Element;
|
|
12
|
+
maxContainerWidth?: "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
13
|
+
containerClassName?: string;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* PageLayout — main layout component for application pages.
|
|
@@ -35,5 +37,5 @@ interface PageLayoutProps {
|
|
|
35
37
|
* - for modal dialogs or overlays (use Dialog component instead).
|
|
36
38
|
* - for nested page sections (use Card or other container components).
|
|
37
39
|
*/
|
|
38
|
-
export declare function PageLayout({ children, title, description, icon, backButton, actionButton, }: PageLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare function PageLayout({ children, title, description, icon, backButton, actionButton, maxContainerWidth, containerClassName, }: PageLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
39
41
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/permissionless-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Internal UI components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@gearbox-protocol/sdk": "*",
|
|
75
|
-
"@tanstack/react-query": "^5.
|
|
75
|
+
"@tanstack/react-query": "^5.64.1",
|
|
76
76
|
"@types/react": "^18 || ^19",
|
|
77
77
|
"@types/react-dom": "^18 || ^19",
|
|
78
78
|
"connectkit": "^1.8.0",
|