@gearbox-protocol/permissionless-ui 1.0.3 → 1.0.4
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/{back-button.js → buttons/back-button.js} +9 -3
- package/dist/cjs/components/buttons/index.js +2 -0
- package/dist/cjs/components/index.js +0 -2
- package/dist/cjs/components/page-layout.js +30 -6
- package/dist/esm/components/{back-button.js → buttons/back-button.js} +8 -2
- package/dist/esm/components/buttons/index.js +1 -0
- package/dist/esm/components/index.js +0 -1
- package/dist/esm/components/page-layout.js +30 -6
- package/dist/types/components/buttons/back-button.d.ts +8 -0
- package/dist/types/components/buttons/button.d.ts +1 -1
- package/dist/types/components/buttons/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +0 -1
- package/dist/types/components/page-layout.d.ts +6 -2
- package/package.json +1 -1
- package/dist/types/components/back-button.d.ts +0 -7
|
@@ -34,16 +34,22 @@ module.exports = __toCommonJS(back_button_exports);
|
|
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
35
|
var import_lucide_react = require("lucide-react");
|
|
36
36
|
var import_link = __toESM(require("next/link"));
|
|
37
|
-
var import_utils =
|
|
38
|
-
function BackButton({
|
|
37
|
+
var import_utils = require('../../utils/index.js');
|
|
38
|
+
function BackButton({
|
|
39
|
+
href,
|
|
40
|
+
text,
|
|
41
|
+
onClick,
|
|
42
|
+
className
|
|
43
|
+
}) {
|
|
39
44
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
40
45
|
import_link.default,
|
|
41
46
|
{
|
|
42
47
|
href,
|
|
43
|
-
className: (0, import_utils.
|
|
48
|
+
className: (0, import_utils.cn)(
|
|
44
49
|
"flex items-center text-sm text-muted-foreground hover:text-foreground mb-6",
|
|
45
50
|
className
|
|
46
51
|
),
|
|
52
|
+
onClick,
|
|
47
53
|
children: [
|
|
48
54
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowLeft, { className: "mr-2 h-4 w-4" }),
|
|
49
55
|
text || "Back"
|
|
@@ -15,12 +15,14 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
15
15
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
16
|
var buttons_exports = {};
|
|
17
17
|
module.exports = __toCommonJS(buttons_exports);
|
|
18
|
+
__reExport(buttons_exports, require('./back-button.js'), module.exports);
|
|
18
19
|
__reExport(buttons_exports, require('./button.js'), module.exports);
|
|
19
20
|
__reExport(buttons_exports, require('./copy-button.js'), module.exports);
|
|
20
21
|
__reExport(buttons_exports, require('./external-button.js'), module.exports);
|
|
21
22
|
__reExport(buttons_exports, require('./tab-button.js'), module.exports);
|
|
22
23
|
// Annotate the CommonJS export names for ESM import in node:
|
|
23
24
|
0 && (module.exports = {
|
|
25
|
+
...require('./back-button.js'),
|
|
24
26
|
...require('./button.js'),
|
|
25
27
|
...require('./copy-button.js'),
|
|
26
28
|
...require('./external-button.js'),
|
|
@@ -17,7 +17,6 @@ var components_exports = {};
|
|
|
17
17
|
module.exports = __toCommonJS(components_exports);
|
|
18
18
|
__reExport(components_exports, require('./alert-dialog.js'), module.exports);
|
|
19
19
|
__reExport(components_exports, require('./auth/index.js'), module.exports);
|
|
20
|
-
__reExport(components_exports, require('./back-button.js'), module.exports);
|
|
21
20
|
__reExport(components_exports, require('./badge.js'), module.exports);
|
|
22
21
|
__reExport(components_exports, require('./buttons/index.js'), module.exports);
|
|
23
22
|
__reExport(components_exports, require('./card.js'), module.exports);
|
|
@@ -41,7 +40,6 @@ __reExport(components_exports, require('./tooltip.js'), module.exports);
|
|
|
41
40
|
0 && (module.exports = {
|
|
42
41
|
...require('./alert-dialog.js'),
|
|
43
42
|
...require('./auth/index.js'),
|
|
44
|
-
...require('./back-button.js'),
|
|
45
43
|
...require('./badge.js'),
|
|
46
44
|
...require('./buttons/index.js'),
|
|
47
45
|
...require('./card.js'),
|
|
@@ -22,12 +22,36 @@ __export(page_layout_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(page_layout_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
-
var import_back_button = require('./back-button.js');
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
var import_back_button = require('./buttons/back-button.js');
|
|
26
|
+
var import_card = require('./card.js');
|
|
27
|
+
function PageLayout({
|
|
28
|
+
children,
|
|
29
|
+
title,
|
|
30
|
+
description,
|
|
31
|
+
icon,
|
|
32
|
+
backButton,
|
|
33
|
+
actionButton
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-h-screen bg-black text-white p-6 overflow-y-auto", children: [
|
|
36
|
+
backButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
37
|
+
import_back_button.BackButton,
|
|
38
|
+
{
|
|
39
|
+
href: backButton.href,
|
|
40
|
+
text: backButton.text,
|
|
41
|
+
onClick: backButton.onClick
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center space-x-4 mb-6 w-full", children: [
|
|
45
|
+
icon,
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w-full", children: [
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex justify-between items-center w-full", children: [
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-3xl font-bold", children: title }),
|
|
49
|
+
actionButton
|
|
50
|
+
] }),
|
|
51
|
+
description
|
|
52
|
+
] })
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_card.Card, { className: "bg-black border-0 overflow-y-auto", children })
|
|
31
55
|
] });
|
|
32
56
|
}
|
|
33
57
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowLeft } from "lucide-react";
|
|
3
3
|
import Link from "next/link";
|
|
4
|
-
import cn from "
|
|
5
|
-
function BackButton({
|
|
4
|
+
import { cn } from "../../utils/index.js";
|
|
5
|
+
function BackButton({
|
|
6
|
+
href,
|
|
7
|
+
text,
|
|
8
|
+
onClick,
|
|
9
|
+
className
|
|
10
|
+
}) {
|
|
6
11
|
return /* @__PURE__ */ jsxs(
|
|
7
12
|
Link,
|
|
8
13
|
{
|
|
@@ -11,6 +16,7 @@ function BackButton({ href, text, className }) {
|
|
|
11
16
|
"flex items-center text-sm text-muted-foreground hover:text-foreground mb-6",
|
|
12
17
|
className
|
|
13
18
|
),
|
|
19
|
+
onClick,
|
|
14
20
|
children: [
|
|
15
21
|
/* @__PURE__ */ jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }),
|
|
16
22
|
text || "Back"
|
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { BackButton } from "./back-button.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { BackButton } from "./buttons/back-button.js";
|
|
3
|
+
import { Card } from "./card.js";
|
|
4
|
+
function PageLayout({
|
|
5
|
+
children,
|
|
6
|
+
title,
|
|
7
|
+
description,
|
|
8
|
+
icon,
|
|
9
|
+
backButton,
|
|
10
|
+
actionButton
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-black text-white p-6 overflow-y-auto", children: [
|
|
13
|
+
backButton && /* @__PURE__ */ jsx(
|
|
14
|
+
BackButton,
|
|
15
|
+
{
|
|
16
|
+
href: backButton.href,
|
|
17
|
+
text: backButton.text,
|
|
18
|
+
onClick: backButton.onClick
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-4 mb-6 w-full", children: [
|
|
22
|
+
icon,
|
|
23
|
+
/* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
24
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center w-full", children: [
|
|
25
|
+
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold", children: title }),
|
|
26
|
+
actionButton
|
|
27
|
+
] }),
|
|
28
|
+
description
|
|
29
|
+
] })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ jsx(Card, { className: "bg-black border-0 overflow-y-auto", children })
|
|
8
32
|
] });
|
|
9
33
|
}
|
|
10
34
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "pink" | "pink-outline" | "blue" | "blue-outline" | null | undefined;
|
|
5
5
|
size?: "default" | "xs" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
interface PageLayoutProps {
|
|
2
2
|
children: React.ReactNode;
|
|
3
3
|
title: string;
|
|
4
|
+
description?: JSX.Element;
|
|
5
|
+
icon?: JSX.Element;
|
|
4
6
|
backButton?: {
|
|
5
7
|
href: string;
|
|
6
|
-
text
|
|
8
|
+
text?: string;
|
|
9
|
+
onClick?: () => void;
|
|
7
10
|
};
|
|
11
|
+
actionButton?: JSX.Element;
|
|
8
12
|
}
|
|
9
|
-
export declare function PageLayout({ children, title, backButton }: PageLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function PageLayout({ children, title, description, icon, backButton, actionButton, }: PageLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
10
14
|
export {};
|
package/package.json
CHANGED