@gearbox-protocol/permissionless-ui 1.0.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.
Files changed (104) hide show
  1. package/README.md +7 -0
  2. package/dist/cjs/components/alert-dialog.js +160 -0
  3. package/dist/cjs/components/back-button.js +57 -0
  4. package/dist/cjs/components/badge.js +61 -0
  5. package/dist/cjs/components/buttons/button.js +88 -0
  6. package/dist/cjs/components/buttons/copy-button.js +62 -0
  7. package/dist/cjs/components/buttons/external-button.js +62 -0
  8. package/dist/cjs/components/buttons/tab-button.js +60 -0
  9. package/dist/cjs/components/card.js +103 -0
  10. package/dist/cjs/components/checkbox.js +61 -0
  11. package/dist/cjs/components/danger-zone.js +35 -0
  12. package/dist/cjs/components/dialog.js +137 -0
  13. package/dist/cjs/components/dropdown-menu.js +200 -0
  14. package/dist/cjs/components/editable-table/edit-button.js +46 -0
  15. package/dist/cjs/components/editable-table/editable-table.js +93 -0
  16. package/dist/cjs/components/editable-table/updated-value.js +73 -0
  17. package/dist/cjs/components/index.js +72 -0
  18. package/dist/cjs/components/input.js +69 -0
  19. package/dist/cjs/components/label.js +54 -0
  20. package/dist/cjs/components/page-layout.js +36 -0
  21. package/dist/cjs/components/search-bar.js +66 -0
  22. package/dist/cjs/components/select.js +167 -0
  23. package/dist/cjs/components/skeleton.js +51 -0
  24. package/dist/cjs/components/table.js +121 -0
  25. package/dist/cjs/components/tabs.js +84 -0
  26. package/dist/cjs/components/textarea.js +56 -0
  27. package/dist/cjs/components/token-icon.js +57 -0
  28. package/dist/cjs/components/tooltip.js +63 -0
  29. package/dist/cjs/configs/index.js +38 -0
  30. package/dist/cjs/configs/tailwind.config.js +84 -0
  31. package/dist/cjs/index.js +24 -0
  32. package/dist/cjs/package.json +1 -0
  33. package/dist/cjs/utils/cn.js +32 -0
  34. package/dist/cjs/utils/copy.js +35 -0
  35. package/dist/cjs/utils/index.js +32 -0
  36. package/dist/esm/components/alert-dialog.js +116 -0
  37. package/dist/esm/components/back-button.js +23 -0
  38. package/dist/esm/components/badge.js +26 -0
  39. package/dist/esm/components/buttons/button.js +53 -0
  40. package/dist/esm/components/buttons/copy-button.js +28 -0
  41. package/dist/esm/components/buttons/external-button.js +28 -0
  42. package/dist/esm/components/buttons/tab-button.js +26 -0
  43. package/dist/esm/components/card.js +64 -0
  44. package/dist/esm/components/checkbox.js +27 -0
  45. package/dist/esm/components/danger-zone.js +11 -0
  46. package/dist/esm/components/dialog.js +97 -0
  47. package/dist/esm/components/dropdown-menu.js +152 -0
  48. package/dist/esm/components/editable-table/edit-button.js +22 -0
  49. package/dist/esm/components/editable-table/editable-table.js +68 -0
  50. package/dist/esm/components/editable-table/updated-value.js +49 -0
  51. package/dist/esm/components/index.js +26 -0
  52. package/dist/esm/components/input.js +35 -0
  53. package/dist/esm/components/label.js +20 -0
  54. package/dist/esm/components/page-layout.js +12 -0
  55. package/dist/esm/components/search-bar.js +42 -0
  56. package/dist/esm/components/select.js +124 -0
  57. package/dist/esm/components/skeleton.js +17 -0
  58. package/dist/esm/components/table.js +80 -0
  59. package/dist/esm/components/tabs.js +47 -0
  60. package/dist/esm/components/textarea.js +22 -0
  61. package/dist/esm/components/token-icon.js +23 -0
  62. package/dist/esm/components/tooltip.js +26 -0
  63. package/dist/esm/configs/index.js +4 -0
  64. package/dist/esm/configs/tailwind.config.js +64 -0
  65. package/dist/esm/index.js +2 -0
  66. package/dist/esm/package.json +1 -0
  67. package/dist/esm/utils/cn.js +8 -0
  68. package/dist/esm/utils/copy.js +11 -0
  69. package/dist/esm/utils/index.js +6 -0
  70. package/dist/globals.css +88 -0
  71. package/dist/types/components/alert-dialog.d.ts +20 -0
  72. package/dist/types/components/back-button.d.ts +7 -0
  73. package/dist/types/components/badge.d.ts +9 -0
  74. package/dist/types/components/buttons/button.d.ts +11 -0
  75. package/dist/types/components/buttons/copy-button.d.ts +8 -0
  76. package/dist/types/components/buttons/external-button.d.ts +7 -0
  77. package/dist/types/components/buttons/tab-button.d.ts +8 -0
  78. package/dist/types/components/card.d.ts +8 -0
  79. package/dist/types/components/checkbox.d.ts +4 -0
  80. package/dist/types/components/danger-zone.d.ts +5 -0
  81. package/dist/types/components/dialog.d.ts +16 -0
  82. package/dist/types/components/dropdown-menu.d.ts +27 -0
  83. package/dist/types/components/editable-table/edit-button.d.ts +7 -0
  84. package/dist/types/components/editable-table/editable-table.d.ts +31 -0
  85. package/dist/types/components/editable-table/updated-value.d.ts +12 -0
  86. package/dist/types/components/index.d.ts +26 -0
  87. package/dist/types/components/input.d.ts +7 -0
  88. package/dist/types/components/label.d.ts +5 -0
  89. package/dist/types/components/page-layout.d.ts +10 -0
  90. package/dist/types/components/search-bar.d.ts +8 -0
  91. package/dist/types/components/select.d.ts +13 -0
  92. package/dist/types/components/skeleton.d.ts +2 -0
  93. package/dist/types/components/table.d.ts +10 -0
  94. package/dist/types/components/tabs.d.ts +7 -0
  95. package/dist/types/components/textarea.d.ts +4 -0
  96. package/dist/types/components/token-icon.d.ts +6 -0
  97. package/dist/types/components/tooltip.d.ts +7 -0
  98. package/dist/types/configs/index.d.ts +1 -0
  99. package/dist/types/configs/tailwind.config.d.ts +3 -0
  100. package/dist/types/index.d.ts +2 -0
  101. package/dist/types/utils/cn.d.ts +2 -0
  102. package/dist/types/utils/copy.d.ts +4 -0
  103. package/dist/types/utils/index.d.ts +3 -0
  104. package/package.json +93 -0
@@ -0,0 +1,26 @@
1
+ export * from "./alert-dialog.js";
2
+ export * from "./back-button.js";
3
+ export * from "./badge.js";
4
+ export * from "./buttons/button.js";
5
+ export * from "./buttons/copy-button.js";
6
+ export * from "./buttons/external-button.js";
7
+ export * from "./buttons/tab-button.js";
8
+ export * from "./card.js";
9
+ export * from "./checkbox.js";
10
+ export * from "./danger-zone.js";
11
+ export * from "./dialog.js";
12
+ export * from "./dropdown-menu.js";
13
+ export * from "./editable-table/edit-button.js";
14
+ export * from "./editable-table/editable-table.js";
15
+ export * from "./editable-table/updated-value.js";
16
+ export * from "./input.js";
17
+ export * from "./label.js";
18
+ export * from "./page-layout.js";
19
+ export * from "./search-bar.js";
20
+ export * from "./select.js";
21
+ export * from "./skeleton.js";
22
+ export * from "./table.js";
23
+ export * from "./tabs.js";
24
+ export * from "./textarea.js";
25
+ export * from "./token-icon.js";
26
+ export * from "./tooltip.js";
@@ -0,0 +1,35 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import cn from "../utils/index.js";
4
+ const InputInternal = React.forwardRef(({ className, type, ...props }, ref) => {
5
+ return /* @__PURE__ */ jsx(
6
+ "input",
7
+ {
8
+ type,
9
+ className: cn(
10
+ "flex h-9 w-full rounded-md border border-input px-3 py-1 shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm bg-[rgb(40,40,40)] text-white border-[rgb(100,100,100)] focus:bg-[rgb(40,40,40)] active:bg-[rgb(40,40,40)] [&:not(:placeholder-shown)]:bg-[rgb(40,40,40)] autofill:bg-[rgb(40,40,40)] [-webkit-autofill]:bg-[rgb(40,40,40)] [&:-webkit-autofill]:shadow-[0_0_0_1000px_rgb(40,40,40)_inset] [&:-webkit-autofill]:[text-fill-color:rgb(255,255,255)]",
11
+ className
12
+ ),
13
+ ref,
14
+ ...props
15
+ }
16
+ );
17
+ });
18
+ InputInternal.displayName = "Input";
19
+ function Input({ hasError, errorMessage, value, ...props }) {
20
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-2", children: [
21
+ /* @__PURE__ */ jsx(
22
+ InputInternal,
23
+ {
24
+ ...props,
25
+ value,
26
+ className: cn(hasError ? "border-red-500" : "", props.className),
27
+ onWheel: props.type === "number" ? (e) => e.currentTarget.blur() : void 0
28
+ }
29
+ ),
30
+ hasError && value !== "" && /* @__PURE__ */ jsx("p", { className: "text-red-500", children: errorMessage })
31
+ ] });
32
+ }
33
+ export {
34
+ Input
35
+ };
@@ -0,0 +1,20 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ import { cva } from "class-variance-authority";
4
+ import * as React from "react";
5
+ import cn from "../utils//index.js";
6
+ const labelVariants = cva(
7
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
8
+ );
9
+ const Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
10
+ LabelPrimitive.Root,
11
+ {
12
+ ref,
13
+ className: cn(labelVariants(), "text-white text-lg", className),
14
+ ...props
15
+ }
16
+ ));
17
+ Label.displayName = LabelPrimitive.Root.displayName;
18
+ export {
19
+ Label
20
+ };
@@ -0,0 +1,12 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { BackButton } from "./back-button.js";
3
+ function PageLayout({ children, title, backButton }) {
4
+ return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-black text-white p-6", children: [
5
+ backButton && /* @__PURE__ */ jsx(BackButton, { href: backButton.href, text: backButton.text }),
6
+ /* @__PURE__ */ jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold mb-2", children: title }) }),
7
+ children
8
+ ] });
9
+ }
10
+ export {
11
+ PageLayout
12
+ };
@@ -0,0 +1,42 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Search } from "lucide-react";
3
+ import { useState } from "react";
4
+ import { Input } from "./input.js";
5
+ function SearchBar({
6
+ onChange,
7
+ placeholder = "Search...",
8
+ className = "w-64",
9
+ children
10
+ }) {
11
+ const [searchQuery, setSearchQuery] = useState("");
12
+ const handleSearch = (e) => {
13
+ const query = e.target.value;
14
+ setSearchQuery(query);
15
+ onChange(query);
16
+ };
17
+ return /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center mb-6 mb-2 mt-6", children: [
18
+ /* @__PURE__ */ jsxs("div", { className: `relative ${className}`, children: [
19
+ /* @__PURE__ */ jsx(
20
+ Input,
21
+ {
22
+ type: "text",
23
+ placeholder,
24
+ value: searchQuery,
25
+ onChange: handleSearch,
26
+ className: "pl-10"
27
+ }
28
+ ),
29
+ /* @__PURE__ */ jsx(
30
+ Search,
31
+ {
32
+ className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground",
33
+ size: 18
34
+ }
35
+ )
36
+ ] }),
37
+ children
38
+ ] });
39
+ }
40
+ export {
41
+ SearchBar
42
+ };
@@ -0,0 +1,124 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as SelectPrimitive from "@radix-ui/react-select";
3
+ import { Check, ChevronDown, ChevronUp } from "lucide-react";
4
+ import * as React from "react";
5
+ import cn from "../utils/index.js";
6
+ const Select = SelectPrimitive.Root;
7
+ const SelectGroup = SelectPrimitive.Group;
8
+ const SelectValue = SelectPrimitive.Value;
9
+ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
10
+ SelectPrimitive.Trigger,
11
+ {
12
+ ref,
13
+ className: cn(
14
+ "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 bg-[rgb(40,40,40)] text-white border-[rgb(100,100,100)]",
15
+ className
16
+ ),
17
+ ...props,
18
+ children: [
19
+ children,
20
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
21
+ ]
22
+ }
23
+ ));
24
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
25
+ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
26
+ SelectPrimitive.ScrollUpButton,
27
+ {
28
+ ref,
29
+ className: cn(
30
+ "flex cursor-default items-center justify-center py-1",
31
+ className
32
+ ),
33
+ ...props,
34
+ children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
35
+ }
36
+ ));
37
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
38
+ const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
39
+ SelectPrimitive.ScrollDownButton,
40
+ {
41
+ ref,
42
+ className: cn(
43
+ "flex cursor-default items-center justify-center py-1",
44
+ className
45
+ ),
46
+ ...props,
47
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
48
+ }
49
+ ));
50
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
51
+ const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
52
+ SelectPrimitive.Content,
53
+ {
54
+ ref,
55
+ className: cn(
56
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
57
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
58
+ className
59
+ ),
60
+ position,
61
+ ...props,
62
+ children: [
63
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
64
+ /* @__PURE__ */ jsx(
65
+ SelectPrimitive.Viewport,
66
+ {
67
+ className: cn(
68
+ "p-1",
69
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
70
+ ),
71
+ children
72
+ }
73
+ ),
74
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
75
+ ]
76
+ }
77
+ ) }));
78
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
79
+ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
80
+ SelectPrimitive.Label,
81
+ {
82
+ ref,
83
+ className: cn("px-2 py-1.5 text-sm font-semibold", className),
84
+ ...props
85
+ }
86
+ ));
87
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
88
+ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
89
+ SelectPrimitive.Item,
90
+ {
91
+ ref,
92
+ className: cn(
93
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 bg-[rgb(40,40,40)] text-white border-[rgb(100,100,100)]",
94
+ className
95
+ ),
96
+ ...props,
97
+ children: [
98
+ /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
99
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
100
+ ]
101
+ }
102
+ ));
103
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
104
+ const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
105
+ SelectPrimitive.Separator,
106
+ {
107
+ ref,
108
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
109
+ ...props
110
+ }
111
+ ));
112
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
113
+ export {
114
+ Select,
115
+ SelectContent,
116
+ SelectGroup,
117
+ SelectItem,
118
+ SelectLabel,
119
+ SelectScrollDownButton,
120
+ SelectScrollUpButton,
121
+ SelectSeparator,
122
+ SelectTrigger,
123
+ SelectValue
124
+ };
@@ -0,0 +1,17 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import cn from "../utils/index.js";
3
+ function Skeleton({
4
+ className,
5
+ ...props
6
+ }) {
7
+ return /* @__PURE__ */ jsx(
8
+ "div",
9
+ {
10
+ className: cn("animate-pulse rounded-md bg-muted", className),
11
+ ...props
12
+ }
13
+ );
14
+ }
15
+ export {
16
+ Skeleton
17
+ };
@@ -0,0 +1,80 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import cn from "../utils/index.js";
4
+ const Table = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
5
+ "table",
6
+ {
7
+ ref,
8
+ className: cn("w-full caption-bottom text-sm", className),
9
+ ...props
10
+ }
11
+ ) }));
12
+ Table.displayName = "Table";
13
+ const TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b ", className), ...props }));
14
+ TableHeader.displayName = "TableHeader";
15
+ const TableBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
16
+ "tbody",
17
+ {
18
+ ref,
19
+ className: cn("[&_tr:last-child]:border-0", className),
20
+ ...props
21
+ }
22
+ ));
23
+ TableBody.displayName = "TableBody";
24
+ const TableFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
25
+ "tfoot",
26
+ {
27
+ ref,
28
+ className: cn(
29
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
30
+ className
31
+ ),
32
+ ...props
33
+ }
34
+ ));
35
+ TableFooter.displayName = "TableFooter";
36
+ const TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
37
+ "tr",
38
+ {
39
+ ref,
40
+ className: cn(
41
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
42
+ className
43
+ ),
44
+ ...props
45
+ }
46
+ ));
47
+ TableRow.displayName = "TableRow";
48
+ const TableHead = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
49
+ "th",
50
+ {
51
+ ref,
52
+ className: cn(
53
+ "h-10 px-2 border-b bg-muted/50 text-left align-middle font-medium text-muted-foreground",
54
+ className
55
+ ),
56
+ ...props
57
+ }
58
+ ));
59
+ TableHead.displayName = "TableHead";
60
+ const TableCell = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", { ref, className: cn("p-2 align-middle", className), ...props }));
61
+ TableCell.displayName = "TableCell";
62
+ const TableCaption = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
63
+ "caption",
64
+ {
65
+ ref,
66
+ className: cn("mt-4 text-sm text-muted-foreground", className),
67
+ ...props
68
+ }
69
+ ));
70
+ TableCaption.displayName = "TableCaption";
71
+ export {
72
+ Table,
73
+ TableBody,
74
+ TableCaption,
75
+ TableCell,
76
+ TableFooter,
77
+ TableHead,
78
+ TableHeader,
79
+ TableRow
80
+ };
@@ -0,0 +1,47 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ import * as React from "react";
4
+ import cn from "../utils/index.js";
5
+ const Tabs = TabsPrimitive.Root;
6
+ const TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7
+ TabsPrimitive.List,
8
+ {
9
+ ref,
10
+ className: cn(
11
+ "inline-flex h-fit items-center justify-start rounded-lg bg-muted p-1 text-muted-foreground bg-transparent p-0 space-x-6",
12
+ className
13
+ ),
14
+ ...props
15
+ }
16
+ ));
17
+ TabsList.displayName = TabsPrimitive.List.displayName;
18
+ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
19
+ TabsPrimitive.Trigger,
20
+ {
21
+ ref,
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",
24
+ className
25
+ ),
26
+ ...props
27
+ }
28
+ ));
29
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
30
+ const TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
31
+ TabsPrimitive.Content,
32
+ {
33
+ ref,
34
+ className: cn(
35
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
36
+ className
37
+ ),
38
+ ...props
39
+ }
40
+ ));
41
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
42
+ export {
43
+ Tabs,
44
+ TabsContent,
45
+ TabsList,
46
+ TabsTrigger
47
+ };
@@ -0,0 +1,22 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import cn from "../utils/index.js";
4
+ const Textarea = React.forwardRef(
5
+ ({ className, ...props }, ref) => {
6
+ return /* @__PURE__ */ jsx(
7
+ "textarea",
8
+ {
9
+ className: cn(
10
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
11
+ className
12
+ ),
13
+ ref,
14
+ ...props
15
+ }
16
+ );
17
+ }
18
+ );
19
+ Textarea.displayName = "Textarea";
20
+ export {
21
+ Textarea
22
+ };
@@ -0,0 +1,23 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import Image from "next/image";
3
+ import { useState } from "react";
4
+ function TokenIcon({ symbol, size = 48 }) {
5
+ const name = symbol.replace("/", "").replace(" ", "").replace("-f", "").replace("-", "_").toLowerCase();
6
+ const defaultSrc = "https://static.gearbox.fi/tokens/default.svg";
7
+ const [src, setSrc] = useState(
8
+ `https://static.gearbox.fi/tokens/${name}.svg`
9
+ );
10
+ return /* @__PURE__ */ jsx(
11
+ Image,
12
+ {
13
+ src,
14
+ alt: `${symbol} icon`,
15
+ width: size,
16
+ height: size,
17
+ onError: () => setSrc(defaultSrc)
18
+ }
19
+ );
20
+ }
21
+ export {
22
+ TokenIcon
23
+ };
@@ -0,0 +1,26 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
+ import * as React from "react";
4
+ import cn from "../utils/index.js";
5
+ const TooltipProvider = TooltipPrimitive.Provider;
6
+ const Tooltip = TooltipPrimitive.Root;
7
+ const TooltipTrigger = TooltipPrimitive.Trigger;
8
+ const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
9
+ TooltipPrimitive.Content,
10
+ {
11
+ ref,
12
+ sideOffset,
13
+ className: cn(
14
+ "z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
15
+ className
16
+ ),
17
+ ...props
18
+ }
19
+ ) }));
20
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
21
+ export {
22
+ Tooltip,
23
+ TooltipContent,
24
+ TooltipProvider,
25
+ TooltipTrigger
26
+ };
@@ -0,0 +1,4 @@
1
+ import { default as default2 } from "./tailwind.config.js";
2
+ export {
3
+ default2 as tailwindConfig
4
+ };
@@ -0,0 +1,64 @@
1
+ const tailwindConfig = {
2
+ darkMode: ["class"],
3
+ content: [
4
+ "./pages/**/*.{js,ts,jsx,tsx,mdx}",
5
+ "./components/**/*.{js,ts,jsx,tsx,mdx}",
6
+ "./app/**/*.{js,ts,jsx,tsx,mdx}"
7
+ ],
8
+ theme: {
9
+ extend: {
10
+ colors: {
11
+ background: "hsl(var(--background))",
12
+ foreground: "hsl(var(--foreground))",
13
+ card: {
14
+ DEFAULT: "hsl(var(--card))",
15
+ foreground: "hsl(var(--card-foreground))"
16
+ },
17
+ popover: {
18
+ DEFAULT: "hsl(var(--popover))",
19
+ foreground: "hsl(var(--popover-foreground))"
20
+ },
21
+ primary: {
22
+ DEFAULT: "hsl(var(--primary))",
23
+ foreground: "hsl(var(--primary-foreground))"
24
+ },
25
+ secondary: {
26
+ DEFAULT: "hsl(var(--secondary))",
27
+ foreground: "hsl(var(--secondary-foreground))"
28
+ },
29
+ muted: {
30
+ DEFAULT: "hsl(var(--muted))",
31
+ foreground: "hsl(var(--muted-foreground))"
32
+ },
33
+ accent: {
34
+ DEFAULT: "hsl(var(--accent))",
35
+ foreground: "hsl(var(--accent-foreground))"
36
+ },
37
+ destructive: {
38
+ DEFAULT: "hsl(var(--destructive))",
39
+ foreground: "hsl(var(--destructive-foreground))"
40
+ },
41
+ border: "hsl(var(--border))",
42
+ input: "hsl(var(--input))",
43
+ ring: "hsl(var(--ring))",
44
+ chart: {
45
+ "1": "hsl(var(--chart-1))",
46
+ "2": "hsl(var(--chart-2))",
47
+ "3": "hsl(var(--chart-3))",
48
+ "4": "hsl(var(--chart-4))",
49
+ "5": "hsl(var(--chart-5))"
50
+ }
51
+ },
52
+ borderRadius: {
53
+ lg: "var(--radius)",
54
+ md: "calc(var(--radius) - 2px)",
55
+ sm: "calc(var(--radius) - 4px)"
56
+ }
57
+ }
58
+ },
59
+ plugins: [require("tailwindcss-animate")]
60
+ };
61
+ var tailwind_config_default = tailwindConfig;
62
+ export {
63
+ tailwind_config_default as default
64
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./components/index.js";
2
+ export * from "./utils/index.js";
@@ -0,0 +1 @@
1
+ {"type": "module","sideEffects":false}
@@ -0,0 +1,8 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
6
+ export {
7
+ cn
8
+ };
@@ -0,0 +1,11 @@
1
+ import { toast } from "sonner";
2
+ const copyToClipboard = ({
3
+ text,
4
+ name = "Address"
5
+ }) => {
6
+ navigator.clipboard.writeText(text);
7
+ toast.success(`${name} copied to clipboard`);
8
+ };
9
+ export {
10
+ copyToClipboard
11
+ };
@@ -0,0 +1,6 @@
1
+ export * from "./cn.js";
2
+ import { cn } from "./cn.js";
3
+ export * from "./copy.js";
4
+ export {
5
+ cn as default
6
+ };
@@ -0,0 +1,88 @@
1
+ /** biome-ignore-all lint/suspicious/noUnknownAtRules: <> */
2
+ @tailwind base;
3
+ @tailwind components;
4
+ @tailwind utilities;
5
+
6
+ :root {
7
+ @apply dark;
8
+ }
9
+
10
+ @layer base {
11
+ :root {
12
+ --background: 0 0% 100%;
13
+ --foreground: 0 0% 3.9%;
14
+
15
+ --card: 0 0% 100%;
16
+ --card-foreground: 0 0% 3.9%;
17
+
18
+ --popover: 0 0% 100%;
19
+ --popover-foreground: 0 0% 3.9%;
20
+
21
+ --primary: 0 0% 9%;
22
+ --primary-foreground: 0 0% 98%;
23
+
24
+ --secondary: 0 0% 96.1%;
25
+ --secondary-foreground: 0 0% 9%;
26
+
27
+ --muted: 0 0% 96.1%;
28
+ --muted-foreground: 0 0% 45.1%;
29
+
30
+ --accent: 0 0% 96.1%;
31
+ --accent-foreground: 0 0% 9%;
32
+
33
+ --destructive: 0 84.2% 60.2%;
34
+ --destructive-foreground: 0 0% 98%;
35
+
36
+ --border: 0 0% 89.8%;
37
+ --input: 0 0% 89.8%;
38
+ --ring: 0 0% 3.9%;
39
+
40
+ --radius: 0.5rem;
41
+ }
42
+
43
+ .dark {
44
+ --background: 0 0% 0%;
45
+ --foreground: 0 0% 98%;
46
+
47
+ --card: 0 0% 3.9%;
48
+ --card-foreground: 0 0% 98%;
49
+
50
+ --popover: 0 0% 3.9%;
51
+ --popover-foreground: 0 0% 98%;
52
+
53
+ --primary: 0 0% 98%;
54
+ --primary-foreground: 0 0% 9%;
55
+
56
+ --secondary: 0 0% 14.9%;
57
+ --secondary-foreground: 0 0% 98%;
58
+
59
+ --muted: 0 0% 14.9%;
60
+ --muted-foreground: 0 0% 63.9%;
61
+
62
+ --accent: 0 0% 14.9%;
63
+ --accent-foreground: 0 0% 98%;
64
+
65
+ --destructive: 0 62.8% 30.6%;
66
+ --destructive-foreground: 0 0% 98%;
67
+
68
+ --border: 0 0% 14.9%;
69
+ --input: 0 0% 14.9%;
70
+ --ring: 0 0% 83.1%;
71
+ }
72
+ }
73
+
74
+ @layer base {
75
+ * {
76
+ @apply border-border;
77
+ }
78
+ body {
79
+ @apply bg-background text-foreground;
80
+ }
81
+ }
82
+
83
+ /* Add these styles to fix white background under scroll */
84
+ @layer base {
85
+ html.dark {
86
+ color-scheme: dark;
87
+ }
88
+ }