@gearbox-protocol/permissionless-ui 1.2.21 → 1.2.23
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/{card.js → cards/card.js} +2 -4
- package/dist/cjs/components/{danger-zone.js → cards/danger-zone.js} +4 -4
- package/dist/cjs/components/cards/expendable-card.js +69 -0
- package/dist/cjs/components/cards/index.js +26 -0
- package/dist/cjs/components/index.js +2 -4
- package/dist/cjs/components/table.js +1 -1
- package/dist/esm/components/{card.js → cards/card.js} +2 -4
- package/dist/esm/components/{danger-zone.js → cards/danger-zone.js} +1 -1
- package/dist/esm/components/cards/expendable-card.js +35 -0
- package/dist/esm/components/cards/index.js +3 -0
- package/dist/esm/components/index.js +1 -2
- package/dist/esm/components/table.js +1 -1
- package/dist/types/components/{card.d.ts → cards/card.d.ts} +1 -1
- package/dist/types/components/cards/expendable-card.d.ts +7 -0
- package/dist/types/components/cards/index.d.ts +3 -0
- package/dist/types/components/index.d.ts +1 -2
- package/package.json +1 -1
- /package/dist/types/components/{danger-zone.d.ts → cards/danger-zone.d.ts} +0 -0
|
@@ -39,7 +39,7 @@ module.exports = __toCommonJS(card_exports);
|
|
|
39
39
|
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
|
-
var import_utils = __toESM(require('
|
|
42
|
+
var import_utils = __toESM(require('../../utils/index.js'));
|
|
43
43
|
const cardVariants = (0, import_class_variance_authority.cva)(
|
|
44
44
|
"rounded-xl border bg-card text-card-foreground shadow",
|
|
45
45
|
{
|
|
@@ -47,9 +47,7 @@ const cardVariants = (0, import_class_variance_authority.cva)(
|
|
|
47
47
|
variant: {
|
|
48
48
|
default: "",
|
|
49
49
|
interactive: "hover:bg-accent/50 transition-colors cursor-pointer",
|
|
50
|
-
transparent: "bg-card/0"
|
|
51
|
-
blue: "border-gray-800 bg-gray-900/30 p-4",
|
|
52
|
-
"interactive-blue": "border-gray-800 bg-gray-900/30 p-4 hover:bg-gray-900/50 transition-colors cursor-pointer"
|
|
50
|
+
transparent: "bg-card/0"
|
|
53
51
|
}
|
|
54
52
|
},
|
|
55
53
|
defaultVariants: {
|
|
@@ -22,11 +22,11 @@ __export(danger_zone_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(danger_zone_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
-
var
|
|
25
|
+
var import__ = require(".");
|
|
26
26
|
function DangerZone({ children }) {
|
|
27
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
28
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
29
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
27
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.Card, { className: "border-destructive", children: [
|
|
28
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.CardHeader, { className: "border-destructive", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.CardTitle, { className: "text-destructive", children: "Danger Zone" }) }),
|
|
29
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.CardContent, { children })
|
|
30
30
|
] });
|
|
31
31
|
}
|
|
32
32
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var expendable_card_exports = {};
|
|
31
|
+
__export(expendable_card_exports, {
|
|
32
|
+
ExpendableCard: () => ExpendableCard
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(expendable_card_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_lucide_react = require("lucide-react");
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
var import_utils = __toESM(require('../../utils/index.js'));
|
|
39
|
+
var import_card = require('./card.js');
|
|
40
|
+
function ExpendableCard({ header, children }) {
|
|
41
|
+
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
42
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_card.Card, { children: [
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
className: "flex items-center justify-between gap-4 p-4 cursor-pointer hover:bg-accent/50",
|
|
47
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1", children: header }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground transform transition-transform", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
import_lucide_react.ChevronDown,
|
|
52
|
+
{
|
|
53
|
+
className: (0, import_utils.default)(
|
|
54
|
+
"h-4 w-4 text-muted-foreground",
|
|
55
|
+
isExpanded ? "rotate-180" : "",
|
|
56
|
+
"transition-transform duration-200 ease-in-out"
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
) })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_card.CardContent, { className: "border-t bg-gray-900/30", children })
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
ExpendableCard
|
|
69
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var cards_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(cards_exports);
|
|
18
|
+
__reExport(cards_exports, require('./card.js'), module.exports);
|
|
19
|
+
__reExport(cards_exports, require('./danger-zone.js'), module.exports);
|
|
20
|
+
__reExport(cards_exports, require('./expendable-card.js'), module.exports);
|
|
21
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
+
0 && (module.exports = {
|
|
23
|
+
...require('./card.js'),
|
|
24
|
+
...require('./danger-zone.js'),
|
|
25
|
+
...require('./expendable-card.js')
|
|
26
|
+
});
|
|
@@ -19,9 +19,8 @@ __reExport(components_exports, require('./alert-dialog.js'), module.exports);
|
|
|
19
19
|
__reExport(components_exports, require('./auth/index.js'), module.exports);
|
|
20
20
|
__reExport(components_exports, require('./badge.js'), module.exports);
|
|
21
21
|
__reExport(components_exports, require('./buttons/index.js'), module.exports);
|
|
22
|
-
__reExport(components_exports, require('./
|
|
22
|
+
__reExport(components_exports, require('./cards/index.js'), module.exports);
|
|
23
23
|
__reExport(components_exports, require('./checkbox.js'), module.exports);
|
|
24
|
-
__reExport(components_exports, require('./danger-zone.js'), module.exports);
|
|
25
24
|
__reExport(components_exports, require('./dialog.js'), module.exports);
|
|
26
25
|
__reExport(components_exports, require('./dropdown-menu.js'), module.exports);
|
|
27
26
|
__reExport(components_exports, require('./editable-table/index.js'), module.exports);
|
|
@@ -44,9 +43,8 @@ __reExport(components_exports, require('./tooltip.js'), module.exports);
|
|
|
44
43
|
...require('./auth/index.js'),
|
|
45
44
|
...require('./badge.js'),
|
|
46
45
|
...require('./buttons/index.js'),
|
|
47
|
-
...require('./
|
|
46
|
+
...require('./cards/index.js'),
|
|
48
47
|
...require('./checkbox.js'),
|
|
49
|
-
...require('./danger-zone.js'),
|
|
50
48
|
...require('./dialog.js'),
|
|
51
49
|
...require('./dropdown-menu.js'),
|
|
52
50
|
...require('./editable-table/index.js'),
|
|
@@ -143,7 +143,7 @@ const SortingTableHead = React.forwardRef(
|
|
|
143
143
|
import_lucide_react.ArrowDown,
|
|
144
144
|
{
|
|
145
145
|
className: (0, import_utils.default)(
|
|
146
|
-
|
|
146
|
+
"h-4 w-4",
|
|
147
147
|
direction === "desc" ? "rotate-180" : "",
|
|
148
148
|
"transition-transform duration-200 ease-in-out"
|
|
149
149
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import cn from "
|
|
4
|
+
import cn from "../../utils/index.js";
|
|
5
5
|
const cardVariants = cva(
|
|
6
6
|
"rounded-xl border bg-card text-card-foreground shadow",
|
|
7
7
|
{
|
|
@@ -9,9 +9,7 @@ const cardVariants = cva(
|
|
|
9
9
|
variant: {
|
|
10
10
|
default: "",
|
|
11
11
|
interactive: "hover:bg-accent/50 transition-colors cursor-pointer",
|
|
12
|
-
transparent: "bg-card/0"
|
|
13
|
-
blue: "border-gray-800 bg-gray-900/30 p-4",
|
|
14
|
-
"interactive-blue": "border-gray-800 bg-gray-900/30 p-4 hover:bg-gray-900/50 transition-colors cursor-pointer"
|
|
12
|
+
transparent: "bg-card/0"
|
|
15
13
|
}
|
|
16
14
|
},
|
|
17
15
|
defaultVariants: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Card, CardContent, CardHeader, CardTitle } from "
|
|
2
|
+
import { Card, CardContent, CardHeader, CardTitle } from ".";
|
|
3
3
|
function DangerZone({ children }) {
|
|
4
4
|
return /* @__PURE__ */ jsxs(Card, { className: "border-destructive", children: [
|
|
5
5
|
/* @__PURE__ */ jsx(CardHeader, { className: "border-destructive", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-destructive", children: "Danger Zone" }) }),
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronDown } from "lucide-react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import cn from "../../utils/index.js";
|
|
6
|
+
import { Card, CardContent } from "./card.js";
|
|
7
|
+
function ExpendableCard({ header, children }) {
|
|
8
|
+
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
9
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
10
|
+
/* @__PURE__ */ jsxs(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
className: "flex items-center justify-between gap-4 p-4 cursor-pointer hover:bg-accent/50",
|
|
14
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1", children: header }),
|
|
17
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground transform transition-transform", children: /* @__PURE__ */ jsx(
|
|
18
|
+
ChevronDown,
|
|
19
|
+
{
|
|
20
|
+
className: cn(
|
|
21
|
+
"h-4 w-4 text-muted-foreground",
|
|
22
|
+
isExpanded ? "rotate-180" : "",
|
|
23
|
+
"transition-transform duration-200 ease-in-out"
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
) })
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
isExpanded && /* @__PURE__ */ jsx(CardContent, { className: "border-t bg-gray-900/30", children })
|
|
31
|
+
] });
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
ExpendableCard
|
|
35
|
+
};
|
|
@@ -2,9 +2,8 @@ export * from "./alert-dialog.js";
|
|
|
2
2
|
export * from "./auth/index.js";
|
|
3
3
|
export * from "./badge.js";
|
|
4
4
|
export * from "./buttons/index.js";
|
|
5
|
-
export * from "./
|
|
5
|
+
export * from "./cards/index.js";
|
|
6
6
|
export * from "./checkbox.js";
|
|
7
|
-
export * from "./danger-zone.js";
|
|
8
7
|
export * from "./dialog.js";
|
|
9
8
|
export * from "./dropdown-menu.js";
|
|
10
9
|
export * from "./editable-table/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const cardVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "interactive" | "transparent" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
7
7
|
asChild?: boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface ExpendableCardProps {
|
|
3
|
+
header: React.ReactNode;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare function ExpendableCard({ header, children }: ExpendableCardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { ExpendableCard };
|
|
@@ -2,9 +2,8 @@ export * from "./alert-dialog";
|
|
|
2
2
|
export * from "./auth";
|
|
3
3
|
export * from "./badge";
|
|
4
4
|
export * from "./buttons";
|
|
5
|
-
export * from "./
|
|
5
|
+
export * from "./cards";
|
|
6
6
|
export * from "./checkbox";
|
|
7
|
-
export * from "./danger-zone";
|
|
8
7
|
export * from "./dialog";
|
|
9
8
|
export * from "./dropdown-menu";
|
|
10
9
|
export * from "./editable-table";
|
package/package.json
CHANGED
|
File without changes
|