@gearbox-protocol/permissionless-ui 1.2.15 → 1.2.16

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.
@@ -48,12 +48,14 @@ const buttonVariants = (0, import_class_variance_authority.cva)(
48
48
  secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
49
49
  ghost: "hover:bg-accent hover:text-accent-foreground",
50
50
  link: "text-primary underline-offset-4 hover:underline",
51
+ text: "text-muted-foreground hover:text-white",
51
52
  pink: "bg-pink-700 hover:bg-pink-600 disabled:bg-pink-700 text-white",
52
53
  "pink-outline": "border border-pink-700 hover:border-pink-600 disabled:border-pink-700 text-white",
53
54
  blue: "bg-blue-800 hover:bg-blue-700 disabled:bg-blue-700 text-white",
54
55
  "blue-outline": "border border-blue-800 hover:border-blue-700 disabled:border-blue-800 text-white"
55
56
  },
56
57
  size: {
58
+ auto: "h-auto p-0",
57
59
  xs: "rounded-full px-3 py-0.5 text-xs",
58
60
  sm: "h-8 rounded-md px-3 text-xs",
59
61
  default: "h-9 px-4 py-2",
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(copy_button_exports);
34
34
  var import_jsx_runtime = require("react/jsx-runtime");
35
35
  var import_lucide_react = require("lucide-react");
36
36
  var React = __toESM(require("react"));
37
- var import_utils = __toESM(require('../../utils/index.js'));
37
+ var import_utils = require('../../utils/index.js');
38
38
  var import_button = require('./button.js');
39
39
  const CopyButton = React.forwardRef(
40
40
  ({ text, name, className, size = "3.5", ...props }, ref) => {
@@ -42,12 +42,9 @@ const CopyButton = React.forwardRef(
42
42
  import_button.Button,
43
43
  {
44
44
  ref,
45
- variant: "ghost",
46
- size: "sm",
47
- className: (0, import_utils.default)(
48
- "text-muted-foreground hover:text-white hover:bg-accent/0 p-0 h-auto",
49
- className
50
- ),
45
+ variant: "text",
46
+ size: "auto",
47
+ className,
51
48
  onClick: () => (0, import_utils.copyToClipboard)({ text, name }),
52
49
  ...props,
53
50
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Copy, { className: `h-${size} w-${size}` })
@@ -34,7 +34,6 @@ module.exports = __toCommonJS(external_button_exports);
34
34
  var import_jsx_runtime = require("react/jsx-runtime");
35
35
  var import_lucide_react = require("lucide-react");
36
36
  var React = __toESM(require("react"));
37
- var import_utils = __toESM(require('../../utils/index.js'));
38
37
  var import_button = require('./button.js');
39
38
  const ExternalButton = React.forwardRef(
40
39
  ({ url, className, size = "3.5", ...props }, ref) => {
@@ -42,12 +41,9 @@ const ExternalButton = React.forwardRef(
42
41
  import_button.Button,
43
42
  {
44
43
  ref,
45
- variant: "ghost",
46
- size: "sm",
47
- className: (0, import_utils.default)(
48
- "text-muted-foreground hover:text-white hover:bg-accent/0 p-0 h-auto",
49
- className
50
- ),
44
+ variant: "text",
45
+ size: "auto",
46
+ className,
51
47
  onClick: () => window.open(url, "_blank"),
52
48
  ...props,
53
49
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ExternalLink, { className: `h-${size} w-${size}` })
@@ -42,7 +42,7 @@ const NavigationButton = import_react.default.forwardRef(({ href, text, isActive
42
42
  href,
43
43
  ref,
44
44
  className: (0, import_utils.default)(
45
- "text-foreground px-2 py-1 rounded transition-colors duration-200 ease-in-out ",
45
+ "text-foreground px-2 py-1 rounded transition-colors duration-200 ease-in-out",
46
46
  isActive ? "bg-muted" : "hover:bg-muted"
47
47
  ),
48
48
  ...props,
@@ -136,12 +136,9 @@ const SortingTableHead = React.forwardRef(
136
136
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
137
137
  import_button.Button,
138
138
  {
139
- variant: "ghost",
140
- size: "sm",
141
- className: (0, import_utils.default)(
142
- "hover:bg-accent/0 group-hover:text-white p-0 h-auto",
143
- isSorted ? void 0 : "opacity-0 group-hover:opacity-100"
144
- ),
139
+ variant: "text",
140
+ size: "auto",
141
+ className: isSorted ? void 0 : "opacity-0 group-hover:opacity-100",
145
142
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
146
143
  import_lucide_react.ArrowDown,
147
144
  {
@@ -14,12 +14,14 @@ const buttonVariants = cva(
14
14
  secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
15
15
  ghost: "hover:bg-accent hover:text-accent-foreground",
16
16
  link: "text-primary underline-offset-4 hover:underline",
17
+ text: "text-muted-foreground hover:text-white",
17
18
  pink: "bg-pink-700 hover:bg-pink-600 disabled:bg-pink-700 text-white",
18
19
  "pink-outline": "border border-pink-700 hover:border-pink-600 disabled:border-pink-700 text-white",
19
20
  blue: "bg-blue-800 hover:bg-blue-700 disabled:bg-blue-700 text-white",
20
21
  "blue-outline": "border border-blue-800 hover:border-blue-700 disabled:border-blue-800 text-white"
21
22
  },
22
23
  size: {
24
+ auto: "h-auto p-0",
23
25
  xs: "rounded-full px-3 py-0.5 text-xs",
24
26
  sm: "h-8 rounded-md px-3 text-xs",
25
27
  default: "h-9 px-4 py-2",
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Copy } from "lucide-react";
3
3
  import * as React from "react";
4
- import cn, { copyToClipboard } from "../../utils/index.js";
4
+ import { copyToClipboard } from "../../utils/index.js";
5
5
  import { Button } from "./button.js";
6
6
  const CopyButton = React.forwardRef(
7
7
  ({ text, name, className, size = "3.5", ...props }, ref) => {
@@ -9,12 +9,9 @@ const CopyButton = React.forwardRef(
9
9
  Button,
10
10
  {
11
11
  ref,
12
- variant: "ghost",
13
- size: "sm",
14
- className: cn(
15
- "text-muted-foreground hover:text-white hover:bg-accent/0 p-0 h-auto",
16
- className
17
- ),
12
+ variant: "text",
13
+ size: "auto",
14
+ className,
18
15
  onClick: () => copyToClipboard({ text, name }),
19
16
  ...props,
20
17
  children: /* @__PURE__ */ jsx(Copy, { className: `h-${size} w-${size}` })
@@ -1,7 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { ExternalLink } from "lucide-react";
3
3
  import * as React from "react";
4
- import cn from "../../utils/index.js";
5
4
  import { Button } from "./button.js";
6
5
  const ExternalButton = React.forwardRef(
7
6
  ({ url, className, size = "3.5", ...props }, ref) => {
@@ -9,12 +8,9 @@ const ExternalButton = React.forwardRef(
9
8
  Button,
10
9
  {
11
10
  ref,
12
- variant: "ghost",
13
- size: "sm",
14
- className: cn(
15
- "text-muted-foreground hover:text-white hover:bg-accent/0 p-0 h-auto",
16
- className
17
- ),
11
+ variant: "text",
12
+ size: "auto",
13
+ className,
18
14
  onClick: () => window.open(url, "_blank"),
19
15
  ...props,
20
16
  children: /* @__PURE__ */ jsx(ExternalLink, { className: `h-${size} w-${size}` })
@@ -9,7 +9,7 @@ const NavigationButton = React.forwardRef(({ href, text, isActive, ...props }, r
9
9
  href,
10
10
  ref,
11
11
  className: cn(
12
- "text-foreground px-2 py-1 rounded transition-colors duration-200 ease-in-out ",
12
+ "text-foreground px-2 py-1 rounded transition-colors duration-200 ease-in-out",
13
13
  isActive ? "bg-muted" : "hover:bg-muted"
14
14
  ),
15
15
  ...props,
@@ -100,12 +100,9 @@ const SortingTableHead = React.forwardRef(
100
100
  /* @__PURE__ */ jsx(
101
101
  Button,
102
102
  {
103
- variant: "ghost",
104
- size: "sm",
105
- className: cn(
106
- "hover:bg-accent/0 group-hover:text-white p-0 h-auto",
107
- isSorted ? void 0 : "opacity-0 group-hover:opacity-100"
108
- ),
103
+ variant: "text",
104
+ size: "auto",
105
+ className: isSorted ? void 0 : "opacity-0 group-hover:opacity-100",
109
106
  children: /* @__PURE__ */ jsx(
110
107
  ArrowDown,
111
108
  {
@@ -1,8 +1,8 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "pink" | "pink-outline" | "blue" | "blue-outline" | null | undefined;
5
- size?: "default" | "xs" | "sm" | "lg" | "icon" | null | undefined;
4
+ variant?: "text" | "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "pink" | "pink-outline" | "blue" | "blue-outline" | null | undefined;
5
+ size?: "default" | "auto" | "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> {
8
8
  asChild?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/permissionless-ui",
3
- "version": "1.2.15",
3
+ "version": "1.2.16",
4
4
  "description": "Internal UI components",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/index.js",