@gearbox-protocol/permissionless-ui 1.10.7 → 1.10.8
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/buttons/button/button.cjs +12 -2
- package/dist/cjs/components/dialog/dialog-form.cjs +66 -0
- package/dist/cjs/components/dialog/index.cjs +4 -0
- package/dist/cjs/components/dialog/one-field-dialog.cjs +104 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu.cjs +6 -1
- package/dist/cjs/components/error-message/error-line-message.cjs +26 -0
- package/dist/cjs/components/error-message/index.cjs +2 -0
- package/dist/cjs/components/error-view/error-view.cjs +50 -0
- package/dist/cjs/components/error-view/index.cjs +9 -0
- package/dist/cjs/components/filter/filter-modal.cjs +4 -1
- package/dist/cjs/components/index.cjs +14 -0
- package/dist/cjs/components/layout/block/block.cjs +53 -0
- package/dist/cjs/components/layout/block/index.cjs +9 -0
- package/dist/cjs/components/layout/index.cjs +2 -0
- package/dist/cjs/components/loader-guard/loader-guard.cjs +3 -0
- package/dist/cjs/components/next/markdown-viewer.cjs +2 -0
- package/dist/cjs/components/select/select.cjs +5 -1
- package/dist/cjs/components/skeleton/index.cjs +2 -0
- package/dist/cjs/components/skeleton/skeleton-stack.cjs +35 -0
- package/dist/cjs/components/with-copy/index.cjs +9 -0
- package/dist/cjs/components/with-copy/with-copy.cjs +57 -0
- package/dist/cjs/index.cjs +14 -0
- package/dist/esm/components/buttons/button/button.js +12 -2
- package/dist/esm/components/dialog/dialog-form.js +62 -0
- package/dist/esm/components/dialog/index.js +2 -0
- package/dist/esm/components/dialog/one-field-dialog.js +100 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu.js +6 -1
- package/dist/esm/components/error-message/error-line-message.js +22 -0
- package/dist/esm/components/error-message/index.js +1 -0
- package/dist/esm/components/error-view/error-view.js +46 -0
- package/dist/esm/components/error-view/index.js +1 -0
- package/dist/esm/components/filter/filter-modal.js +4 -1
- package/dist/esm/components/index.js +7 -0
- package/dist/esm/components/layout/block/block.js +49 -0
- package/dist/esm/components/layout/block/index.js +1 -0
- package/dist/esm/components/layout/index.js +1 -0
- package/dist/esm/components/loader-guard/loader-guard.js +3 -0
- package/dist/esm/components/next/markdown-viewer.js +2 -0
- package/dist/esm/components/select/select.js +5 -1
- package/dist/esm/components/skeleton/index.js +1 -0
- package/dist/esm/components/skeleton/skeleton-stack.js +31 -0
- package/dist/esm/components/with-copy/index.js +1 -0
- package/dist/esm/components/with-copy/with-copy.js +53 -0
- package/dist/esm/index.js +7 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/dialog/dialog-form.d.ts +50 -0
- package/dist/types/components/dialog/index.d.ts +2 -0
- package/dist/types/components/dialog/one-field-dialog.d.ts +43 -0
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +10 -6
- package/dist/types/components/error-message/error-line-message.d.ts +19 -0
- package/dist/types/components/error-message/index.d.ts +1 -0
- package/dist/types/components/error-view/error-view.d.ts +28 -0
- package/dist/types/components/error-view/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/layout/block/block.d.ts +23 -0
- package/dist/types/components/layout/block/index.d.ts +1 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +4 -1
- package/dist/types/components/skeleton/index.d.ts +1 -0
- package/dist/types/components/skeleton/skeleton-stack.d.ts +19 -0
- package/dist/types/components/with-copy/index.d.ts +1 -0
- package/dist/types/components/with-copy/with-copy.d.ts +29 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ function _interopNamespaceDefault(e) {
|
|
|
30
30
|
const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
31
31
|
|
|
32
32
|
const buttonVariants = classVarianceAuthority.cva(
|
|
33
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors cursor-pointer disabled:cursor-not-allowed disabled:
|
|
33
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([style*='width']):not([style*='height'])]:size-4 [&_svg]:shrink-0 border border-transparent outline-none focus-visible:outline-none",
|
|
34
34
|
{
|
|
35
35
|
variants: {
|
|
36
36
|
variant: {
|
|
@@ -62,13 +62,23 @@ const buttonVariants = classVarianceAuthority.cva(
|
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
64
|
const Button = React__namespace.forwardRef(
|
|
65
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
65
|
+
({ className, variant, size, asChild = false, disabled, onClick, ...props }, ref) => {
|
|
66
66
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
67
|
+
const handleClick = (e) => {
|
|
68
|
+
if (disabled) {
|
|
69
|
+
e.preventDefault();
|
|
70
|
+
e.stopPropagation();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
onClick?.(e);
|
|
74
|
+
};
|
|
67
75
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
68
76
|
Comp,
|
|
69
77
|
{
|
|
70
78
|
className: utils_cn.cn(buttonVariants({ variant, size, className })),
|
|
71
79
|
ref,
|
|
80
|
+
disabled,
|
|
81
|
+
onClick: handleClick,
|
|
72
82
|
...props
|
|
73
83
|
}
|
|
74
84
|
);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
const components_buttons_button_button = require('../buttons/button/button.cjs');
|
|
7
|
+
require('react');
|
|
8
|
+
const utils_cn = require('../../utils/cn.cjs');
|
|
9
|
+
require('sonner');
|
|
10
|
+
require('@gearbox-protocol/sdk');
|
|
11
|
+
const components_dialog_dialog = require('./dialog.cjs');
|
|
12
|
+
const components_dialog_dialogContent = require('./dialog-content.cjs');
|
|
13
|
+
const components_dialog_dialogFooter = require('./dialog-footer.cjs');
|
|
14
|
+
const components_dialog_dialogHeader = require('./dialog-header.cjs');
|
|
15
|
+
const components_dialog_dialogTitle = require('./dialog-title.cjs');
|
|
16
|
+
|
|
17
|
+
function DialogForm({
|
|
18
|
+
title,
|
|
19
|
+
isFormValid,
|
|
20
|
+
isLoading,
|
|
21
|
+
saveButtonText = "Save changes",
|
|
22
|
+
loadingText = "Saving...",
|
|
23
|
+
onCancel,
|
|
24
|
+
onSubmit,
|
|
25
|
+
submitButtonVariant = "pink",
|
|
26
|
+
authWrapper: AuthWrapper,
|
|
27
|
+
className,
|
|
28
|
+
children
|
|
29
|
+
}) {
|
|
30
|
+
const handleSubmit = (e) => {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
onSubmit(e);
|
|
33
|
+
};
|
|
34
|
+
const submitButton = /* @__PURE__ */ jsxRuntime.jsx(
|
|
35
|
+
components_buttons_button_button.Button,
|
|
36
|
+
{
|
|
37
|
+
disabled: !isFormValid || isLoading,
|
|
38
|
+
type: "submit",
|
|
39
|
+
variant: submitButtonVariant,
|
|
40
|
+
children: isLoading ? loadingText : saveButtonText
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_dialog_dialog.Dialog, { open: true, onOpenChange: onCancel, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
44
|
+
components_dialog_dialogContent.DialogContent,
|
|
45
|
+
{
|
|
46
|
+
className: utils_cn.cn(
|
|
47
|
+
"bg-[#141414] p-8 rounded-lg w-full max-w-4xl",
|
|
48
|
+
"flex flex-col justify-between overflow-y-auto",
|
|
49
|
+
className
|
|
50
|
+
),
|
|
51
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [
|
|
52
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_dialog_dialogHeader.DialogHeader, { className: "mb-6", children: /* @__PURE__ */ jsxRuntime.jsx(components_dialog_dialogTitle.DialogTitle, { children: title }) }),
|
|
53
|
+
children,
|
|
54
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_dialog_dialogFooter.DialogFooter, { className: "w-full mt-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center w-full justify-between", children: [
|
|
55
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center space-x-2" }),
|
|
56
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
57
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_buttons_button_button.Button, { type: "button", variant: "outline", onClick: onCancel, children: "Cancel" }),
|
|
58
|
+
AuthWrapper ? /* @__PURE__ */ jsxRuntime.jsx(AuthWrapper, { variant: submitButtonVariant, children: submitButton }) : submitButton
|
|
59
|
+
] })
|
|
60
|
+
] }) })
|
|
61
|
+
] })
|
|
62
|
+
}
|
|
63
|
+
) });
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
exports.DialogForm = DialogForm;
|
|
@@ -7,9 +7,11 @@ const components_dialog_dialogContainer = require('./dialog-container.cjs');
|
|
|
7
7
|
const components_dialog_dialogContent = require('./dialog-content.cjs');
|
|
8
8
|
const components_dialog_dialogDescription = require('./dialog-description.cjs');
|
|
9
9
|
const components_dialog_dialogFooter = require('./dialog-footer.cjs');
|
|
10
|
+
const components_dialog_dialogForm = require('./dialog-form.cjs');
|
|
10
11
|
const components_dialog_dialogHeader = require('./dialog-header.cjs');
|
|
11
12
|
const components_dialog_dialogOverlay = require('./dialog-overlay.cjs');
|
|
12
13
|
const components_dialog_dialogTitle = require('./dialog-title.cjs');
|
|
14
|
+
const components_dialog_oneFieldDialog = require('./one-field-dialog.cjs');
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
|
|
@@ -20,6 +22,8 @@ exports.DialogContainer = components_dialog_dialogContainer.DialogContainer;
|
|
|
20
22
|
exports.DialogContent = components_dialog_dialogContent.DialogContent;
|
|
21
23
|
exports.DialogDescription = components_dialog_dialogDescription.DialogDescription;
|
|
22
24
|
exports.DialogFooter = components_dialog_dialogFooter.DialogFooter;
|
|
25
|
+
exports.DialogForm = components_dialog_dialogForm.DialogForm;
|
|
23
26
|
exports.DialogHeader = components_dialog_dialogHeader.DialogHeader;
|
|
24
27
|
exports.DialogOverlay = components_dialog_dialogOverlay.DialogOverlay;
|
|
25
28
|
exports.DialogTitle = components_dialog_dialogTitle.DialogTitle;
|
|
29
|
+
exports.OneFieldDialog = components_dialog_oneFieldDialog.OneFieldDialog;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
const React = require('react');
|
|
7
|
+
const viem = require('viem');
|
|
8
|
+
const components_input_input = require('../input/input.cjs');
|
|
9
|
+
const components_label_label = require('../label/label.cjs');
|
|
10
|
+
const components_dialog_dialogForm = require('./dialog-form.cjs');
|
|
11
|
+
|
|
12
|
+
function OneFieldDialog({
|
|
13
|
+
title,
|
|
14
|
+
label,
|
|
15
|
+
initialValue,
|
|
16
|
+
onSet,
|
|
17
|
+
onClose,
|
|
18
|
+
isFormValid: customValidation,
|
|
19
|
+
type,
|
|
20
|
+
saveButtonText,
|
|
21
|
+
loadingText,
|
|
22
|
+
placeholder,
|
|
23
|
+
errorMessage,
|
|
24
|
+
step = "0.01",
|
|
25
|
+
min = 0,
|
|
26
|
+
max,
|
|
27
|
+
authWrapper,
|
|
28
|
+
submitButtonVariant
|
|
29
|
+
}) {
|
|
30
|
+
const [value, setValue] = React.useState(initialValue.toString());
|
|
31
|
+
const [isLoading, setIsLoading] = React.useState(false);
|
|
32
|
+
const isValid = () => {
|
|
33
|
+
if (value === "") return false;
|
|
34
|
+
if (customValidation) {
|
|
35
|
+
return customValidation(value);
|
|
36
|
+
}
|
|
37
|
+
if (type === "number") {
|
|
38
|
+
const numValue = parseFloat(value);
|
|
39
|
+
return !isNaN(numValue) && numValue >= 0;
|
|
40
|
+
}
|
|
41
|
+
if (type === "address") {
|
|
42
|
+
return viem.isAddress(value);
|
|
43
|
+
}
|
|
44
|
+
return true;
|
|
45
|
+
};
|
|
46
|
+
const handleSubmit = async (e) => {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
setIsLoading(true);
|
|
49
|
+
try {
|
|
50
|
+
if (type === "number") {
|
|
51
|
+
const numValue = parseFloat(value);
|
|
52
|
+
if (!isNaN(numValue)) {
|
|
53
|
+
await onSet(numValue);
|
|
54
|
+
}
|
|
55
|
+
} else if (type === "address") {
|
|
56
|
+
if (viem.isAddress(value)) {
|
|
57
|
+
await onSet(value);
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
await onSet(value);
|
|
61
|
+
}
|
|
62
|
+
} finally {
|
|
63
|
+
setIsLoading(false);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const handleCancel = () => {
|
|
67
|
+
setValue("");
|
|
68
|
+
onClose();
|
|
69
|
+
};
|
|
70
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
71
|
+
components_dialog_dialogForm.DialogForm,
|
|
72
|
+
{
|
|
73
|
+
title,
|
|
74
|
+
isFormValid: isValid(),
|
|
75
|
+
onCancel: handleCancel,
|
|
76
|
+
onSubmit: handleSubmit,
|
|
77
|
+
isLoading,
|
|
78
|
+
saveButtonText,
|
|
79
|
+
loadingText,
|
|
80
|
+
authWrapper,
|
|
81
|
+
submitButtonVariant,
|
|
82
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-4 space-y-2", children: [
|
|
83
|
+
/* @__PURE__ */ jsxRuntime.jsx(components_label_label.Label, { children: label ?? title }),
|
|
84
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
85
|
+
components_input_input.Input,
|
|
86
|
+
{
|
|
87
|
+
type: type === "number" ? "number" : "text",
|
|
88
|
+
value,
|
|
89
|
+
onChange: (e) => setValue(e.target.value),
|
|
90
|
+
placeholder: placeholder || `Enter ${type}`,
|
|
91
|
+
hasError: value !== "" && !isValid(),
|
|
92
|
+
errorMessage: errorMessage || `Invalid ${type}`,
|
|
93
|
+
className: "w-full",
|
|
94
|
+
step,
|
|
95
|
+
min,
|
|
96
|
+
max
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] })
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
exports.OneFieldDialog = OneFieldDialog;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
5
6
|
const DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
6
7
|
|
|
7
8
|
function _interopNamespaceDefault(e) {
|
|
@@ -23,7 +24,11 @@ function _interopNamespaceDefault(e) {
|
|
|
23
24
|
|
|
24
25
|
const DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(DropdownMenuPrimitive);
|
|
25
26
|
|
|
26
|
-
const DropdownMenu =
|
|
27
|
+
const DropdownMenu = ({
|
|
28
|
+
modal = false,
|
|
29
|
+
...props
|
|
30
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Root, { modal, ...props });
|
|
31
|
+
DropdownMenu.displayName = "DropdownMenu";
|
|
27
32
|
const DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
28
33
|
const DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
29
34
|
const DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
require('react');
|
|
7
|
+
const utils_cn = require('../../utils/cn.cjs');
|
|
8
|
+
require('sonner');
|
|
9
|
+
require('@gearbox-protocol/sdk');
|
|
10
|
+
|
|
11
|
+
function ErrorLineMessage({
|
|
12
|
+
err,
|
|
13
|
+
title,
|
|
14
|
+
className
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_cn.cn("text-destructive", className), children: [
|
|
17
|
+
/* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
|
|
18
|
+
title ?? "Error",
|
|
19
|
+
":"
|
|
20
|
+
] }),
|
|
21
|
+
" ",
|
|
22
|
+
err.message
|
|
23
|
+
] });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.ErrorLineMessage = ErrorLineMessage;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
+
const components_errorMessage_errorLineMessage = require('./error-line-message.cjs');
|
|
5
6
|
const components_errorMessage_errorMessage = require('./error-message.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
10
|
+
exports.ErrorLineMessage = components_errorMessage_errorLineMessage.ErrorLineMessage;
|
|
9
11
|
exports.ErrorMessage = components_errorMessage_errorMessage.ErrorMessage;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
const components_buttons_backButton_backButton = require('../buttons/back-button/back-button.cjs');
|
|
7
|
+
require('react');
|
|
8
|
+
const utils_cn = require('../../utils/cn.cjs');
|
|
9
|
+
require('sonner');
|
|
10
|
+
require('@gearbox-protocol/sdk');
|
|
11
|
+
|
|
12
|
+
function ErrorView({
|
|
13
|
+
status,
|
|
14
|
+
message,
|
|
15
|
+
backButton,
|
|
16
|
+
className
|
|
17
|
+
}) {
|
|
18
|
+
const messageSize = message.length > 32 ? "default" : "large";
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: utils_cn.cn("w-full flex items-center justify-center py-16", className),
|
|
23
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: utils_cn.cn(
|
|
27
|
+
"flex flex-col items-center max-w-md mx-auto px-4 py-8 text-center",
|
|
28
|
+
messageSize === "default" && "gap-4"
|
|
29
|
+
),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-6xl font-bold text-foreground font-mono", children: status }),
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils_cn.cn("flex flex-col items-center gap-4"), children: [
|
|
33
|
+
messageSize === "large" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-semibold text-foreground", children: message }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-foreground", children: message }),
|
|
34
|
+
backButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
35
|
+
components_buttons_backButton_backButton.BackButton,
|
|
36
|
+
{
|
|
37
|
+
text: backButton.text,
|
|
38
|
+
href: backButton.href,
|
|
39
|
+
className: "inline-flex items-center text-md"
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] })
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
exports.ErrorView = ErrorView;
|
|
@@ -22,8 +22,11 @@ const components_dialog_dialogContent = require('../dialog/dialog-content.cjs');
|
|
|
22
22
|
require('../dialog/dialog-description.cjs');
|
|
23
23
|
const components_dialog_dialogFooter = require('../dialog/dialog-footer.cjs');
|
|
24
24
|
const components_dialog_dialogHeader = require('../dialog/dialog-header.cjs');
|
|
25
|
-
require('../dialog/dialog-overlay.cjs');
|
|
26
25
|
const components_dialog_dialogTitle = require('../dialog/dialog-title.cjs');
|
|
26
|
+
require('../dialog/dialog-overlay.cjs');
|
|
27
|
+
require('viem');
|
|
28
|
+
require('../input/input.cjs');
|
|
29
|
+
require('../label/label.cjs');
|
|
27
30
|
const components_searchLine_searchLine = require('../search-line/search-line.cjs');
|
|
28
31
|
const components_tabs_tabs = require('../tabs/tabs.cjs');
|
|
29
32
|
|
|
@@ -37,9 +37,11 @@ const components_dialog_dialogContainer = require('./dialog/dialog-container.cjs
|
|
|
37
37
|
const components_dialog_dialogContent = require('./dialog/dialog-content.cjs');
|
|
38
38
|
const components_dialog_dialogDescription = require('./dialog/dialog-description.cjs');
|
|
39
39
|
const components_dialog_dialogFooter = require('./dialog/dialog-footer.cjs');
|
|
40
|
+
const components_dialog_dialogForm = require('./dialog/dialog-form.cjs');
|
|
40
41
|
const components_dialog_dialogHeader = require('./dialog/dialog-header.cjs');
|
|
41
42
|
const components_dialog_dialogOverlay = require('./dialog/dialog-overlay.cjs');
|
|
42
43
|
const components_dialog_dialogTitle = require('./dialog/dialog-title.cjs');
|
|
44
|
+
const components_dialog_oneFieldDialog = require('./dialog/one-field-dialog.cjs');
|
|
43
45
|
const components_dropdownMenu_dropdownMenu = require('./dropdown-menu/dropdown-menu.cjs');
|
|
44
46
|
const components_dropdownMenu_dropdownMenuCheckboxItem = require('./dropdown-menu/dropdown-menu-checkbox-item.cjs');
|
|
45
47
|
const components_dropdownMenu_dropdownMenuContent = require('./dropdown-menu/dropdown-menu-content.cjs');
|
|
@@ -50,7 +52,9 @@ const components_dropdownMenu_dropdownMenuSeparator = require('./dropdown-menu/d
|
|
|
50
52
|
const components_dropdownMenu_dropdownMenuShortcut = require('./dropdown-menu/dropdown-menu-shortcut.cjs');
|
|
51
53
|
const components_dropdownMenu_dropdownMenuSubContent = require('./dropdown-menu/dropdown-menu-sub-content.cjs');
|
|
52
54
|
const components_dropdownMenu_dropdownMenuSubTrigger = require('./dropdown-menu/dropdown-menu-sub-trigger.cjs');
|
|
55
|
+
const components_errorMessage_errorLineMessage = require('./error-message/error-line-message.cjs');
|
|
53
56
|
const components_errorMessage_errorMessage = require('./error-message/error-message.cjs');
|
|
57
|
+
const components_errorView_errorView = require('./error-view/error-view.cjs');
|
|
54
58
|
const components_filter_filterBlock = require('./filter/filter-block.cjs');
|
|
55
59
|
const components_filter_filterCheckboxItem = require('./filter/filter-checkbox-item.cjs');
|
|
56
60
|
const components_filter_filterChip = require('./filter/filter-chip.cjs');
|
|
@@ -80,6 +84,7 @@ const components_image_image = require('./image/image.cjs');
|
|
|
80
84
|
const components_input_input = require('./input/input.cjs');
|
|
81
85
|
const components_label_label = require('./label/label.cjs');
|
|
82
86
|
const components_layout_appLogo_appLogo = require('./layout/app-logo/app-logo.cjs');
|
|
87
|
+
const components_layout_block_block = require('./layout/block/block.cjs');
|
|
83
88
|
const components_layout_col_col = require('./layout/col/col.cjs');
|
|
84
89
|
const components_layout_container_container = require('./layout/container/container.cjs');
|
|
85
90
|
const components_layout_footer_footer = require('./layout/footer/footer.cjs');
|
|
@@ -109,6 +114,7 @@ const components_signatures_confirmationItem = require('./signatures/confirmatio
|
|
|
109
114
|
const components_signatures_identicon = require('./signatures/identicon.cjs');
|
|
110
115
|
const components_signatures_verticalTimeline = require('./signatures/vertical-timeline.cjs');
|
|
111
116
|
const components_skeleton_skeleton = require('./skeleton/skeleton.cjs');
|
|
117
|
+
const components_skeleton_skeletonStack = require('./skeleton/skeleton-stack.cjs');
|
|
112
118
|
const components_statBadge_statBadge = require('./stat-badge/stat-badge.cjs');
|
|
113
119
|
const components_tabControl_tabControl = require('./tab-control/tab-control.cjs');
|
|
114
120
|
const components_table_editButton = require('./table/edit-button.cjs');
|
|
@@ -135,6 +141,7 @@ const components_tradingView_graphDropdown = require('./trading-view/graph-dropd
|
|
|
135
141
|
const components_tradingView_tradingView = require('./trading-view/trading-view.cjs');
|
|
136
142
|
const components_typedIntl_index = require('./typed-intl/index.cjs');
|
|
137
143
|
const components_vspace_vspace = require('./vspace/vspace.cjs');
|
|
144
|
+
const components_withCopy_withCopy = require('./with-copy/with-copy.cjs');
|
|
138
145
|
const components_withFilterButton_withFilterButton = require('./with-filter-button/with-filter-button.cjs');
|
|
139
146
|
|
|
140
147
|
|
|
@@ -195,9 +202,11 @@ exports.DialogContainer = components_dialog_dialogContainer.DialogContainer;
|
|
|
195
202
|
exports.DialogContent = components_dialog_dialogContent.DialogContent;
|
|
196
203
|
exports.DialogDescription = components_dialog_dialogDescription.DialogDescription;
|
|
197
204
|
exports.DialogFooter = components_dialog_dialogFooter.DialogFooter;
|
|
205
|
+
exports.DialogForm = components_dialog_dialogForm.DialogForm;
|
|
198
206
|
exports.DialogHeader = components_dialog_dialogHeader.DialogHeader;
|
|
199
207
|
exports.DialogOverlay = components_dialog_dialogOverlay.DialogOverlay;
|
|
200
208
|
exports.DialogTitle = components_dialog_dialogTitle.DialogTitle;
|
|
209
|
+
exports.OneFieldDialog = components_dialog_oneFieldDialog.OneFieldDialog;
|
|
201
210
|
exports.DropdownMenu = components_dropdownMenu_dropdownMenu.DropdownMenu;
|
|
202
211
|
exports.DropdownMenuGroup = components_dropdownMenu_dropdownMenu.DropdownMenuGroup;
|
|
203
212
|
exports.DropdownMenuPortal = components_dropdownMenu_dropdownMenu.DropdownMenuPortal;
|
|
@@ -213,7 +222,9 @@ exports.DropdownMenuSeparator = components_dropdownMenu_dropdownMenuSeparator.Dr
|
|
|
213
222
|
exports.DropdownMenuShortcut = components_dropdownMenu_dropdownMenuShortcut.DropdownMenuShortcut;
|
|
214
223
|
exports.DropdownMenuSubContent = components_dropdownMenu_dropdownMenuSubContent.DropdownMenuSubContent;
|
|
215
224
|
exports.DropdownMenuSubTrigger = components_dropdownMenu_dropdownMenuSubTrigger.DropdownMenuSubTrigger;
|
|
225
|
+
exports.ErrorLineMessage = components_errorMessage_errorLineMessage.ErrorLineMessage;
|
|
216
226
|
exports.ErrorMessage = components_errorMessage_errorMessage.ErrorMessage;
|
|
227
|
+
exports.ErrorView = components_errorView_errorView.ErrorView;
|
|
217
228
|
exports.FilterBlock = components_filter_filterBlock.FilterBlock;
|
|
218
229
|
exports.FilterCheckboxItem = components_filter_filterCheckboxItem.FilterCheckboxItem;
|
|
219
230
|
exports.FilterChip = components_filter_filterChip.FilterChip;
|
|
@@ -259,6 +270,7 @@ exports.inputVariants = components_input_input.inputVariants;
|
|
|
259
270
|
exports.Label = components_label_label.Label;
|
|
260
271
|
exports.labelVariants = components_label_label.labelVariants;
|
|
261
272
|
exports.AppLogo = components_layout_appLogo_appLogo.AppLogo;
|
|
273
|
+
exports.Block = components_layout_block_block.Block;
|
|
262
274
|
exports.Col = components_layout_col_col.Col;
|
|
263
275
|
exports.Container = components_layout_container_container.Container;
|
|
264
276
|
exports.Footer = components_layout_footer_footer.Footer;
|
|
@@ -313,6 +325,7 @@ exports.Identicon = components_signatures_identicon.Identicon;
|
|
|
313
325
|
exports.VerticalTimeline = components_signatures_verticalTimeline.VerticalTimeline;
|
|
314
326
|
exports.Skeleton = components_skeleton_skeleton.Skeleton;
|
|
315
327
|
exports.skeletonVariants = components_skeleton_skeleton.skeletonVariants;
|
|
328
|
+
exports.SkeletonStack = components_skeleton_skeletonStack.SkeletonStack;
|
|
316
329
|
exports.StatBadge = components_statBadge_statBadge.StatBadge;
|
|
317
330
|
exports.StatBadgeGrid = components_statBadge_statBadge.StatBadgeGrid;
|
|
318
331
|
exports.statBadgeContentVariants = components_statBadge_statBadge.statBadgeContentVariants;
|
|
@@ -383,4 +396,5 @@ exports.TradingView = components_tradingView_tradingView.TradingView;
|
|
|
383
396
|
exports.FormattedMessageTyped = components_typedIntl_index.FormattedMessageTyped;
|
|
384
397
|
exports.useIntlTyped = components_typedIntl_index.useIntlTyped;
|
|
385
398
|
exports.VSpace = components_vspace_vspace.VSpace;
|
|
399
|
+
exports.WithCopy = components_withCopy_withCopy.WithCopy;
|
|
386
400
|
exports.WithFilterButton = components_withFilterButton_withFilterButton.WithFilterButton;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
require('react');
|
|
7
|
+
const utils_cn = require('../../../utils/cn.cjs');
|
|
8
|
+
require('sonner');
|
|
9
|
+
require('@gearbox-protocol/sdk');
|
|
10
|
+
|
|
11
|
+
const marginClasses = {
|
|
12
|
+
none: "mb-0",
|
|
13
|
+
sm: "mb-4",
|
|
14
|
+
md: "mb-6",
|
|
15
|
+
lg: "mb-8"
|
|
16
|
+
};
|
|
17
|
+
const justifyClasses = {
|
|
18
|
+
"flex-start": "justify-start",
|
|
19
|
+
center: "justify-center",
|
|
20
|
+
"flex-end": "justify-end",
|
|
21
|
+
between: "justify-between"
|
|
22
|
+
};
|
|
23
|
+
const alignClasses = {
|
|
24
|
+
"flex-start": "items-start",
|
|
25
|
+
center: "items-center",
|
|
26
|
+
"flex-end": "items-end",
|
|
27
|
+
stretch: "items-stretch"
|
|
28
|
+
};
|
|
29
|
+
function Block({
|
|
30
|
+
children,
|
|
31
|
+
margin = "md",
|
|
32
|
+
justify = "flex-start",
|
|
33
|
+
align = "flex-start",
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: utils_cn.cn(
|
|
41
|
+
"flex flex-row flex-nowrap",
|
|
42
|
+
marginClasses[margin],
|
|
43
|
+
justifyClasses[justify],
|
|
44
|
+
alignClasses[align],
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
...props,
|
|
48
|
+
children
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
exports.Block = Block;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const components_layout_appLogo_appLogo = require('./app-logo/app-logo.cjs');
|
|
6
|
+
const components_layout_block_block = require('./block/block.cjs');
|
|
6
7
|
const components_layout_col_col = require('./col/col.cjs');
|
|
7
8
|
const components_layout_container_container = require('./container/container.cjs');
|
|
8
9
|
const components_layout_footer_footer = require('./footer/footer.cjs');
|
|
@@ -15,6 +16,7 @@ const components_layout_pageLayout_pageLayout = require('./page-layout/page-layo
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
exports.AppLogo = components_layout_appLogo_appLogo.AppLogo;
|
|
19
|
+
exports.Block = components_layout_block_block.Block;
|
|
18
20
|
exports.Col = components_layout_col_col.Col;
|
|
19
21
|
exports.Container = components_layout_container_container.Container;
|
|
20
22
|
exports.Footer = components_layout_footer_footer.Footer;
|
|
@@ -6,6 +6,9 @@ const jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
const components_guard_guard = require('../guard/guard.cjs');
|
|
7
7
|
require('clsx');
|
|
8
8
|
require('tailwind-merge');
|
|
9
|
+
require('react');
|
|
10
|
+
require('sonner');
|
|
11
|
+
require('@gearbox-protocol/sdk');
|
|
9
12
|
require('../layout/col/col.cjs');
|
|
10
13
|
const components_layout_container_container = require('../layout/container/container.cjs');
|
|
11
14
|
require('../layout/footer/footer.cjs');
|
|
@@ -9,6 +9,8 @@ const ReactMarkdown = require('react-markdown');
|
|
|
9
9
|
const remarkGfm = require('remark-gfm');
|
|
10
10
|
require('clsx');
|
|
11
11
|
require('tailwind-merge');
|
|
12
|
+
require('sonner');
|
|
13
|
+
require('@gearbox-protocol/sdk');
|
|
12
14
|
require('../layout/col/col.cjs');
|
|
13
15
|
require('../layout/container/container.cjs');
|
|
14
16
|
require('../layout/footer/footer.cjs');
|
|
@@ -31,7 +31,11 @@ function _interopNamespaceDefault(e) {
|
|
|
31
31
|
const SelectPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SelectPrimitive);
|
|
32
32
|
const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
33
33
|
|
|
34
|
-
const Select =
|
|
34
|
+
const Select = ({
|
|
35
|
+
modal = false,
|
|
36
|
+
...props
|
|
37
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Root, { modal, ...props });
|
|
38
|
+
Select.displayName = "Select";
|
|
35
39
|
const SelectGroup = SelectPrimitive__namespace.Group;
|
|
36
40
|
const SelectValue = SelectPrimitive__namespace.Value;
|
|
37
41
|
const selectTriggerVariants = classVarianceAuthority.cva(
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const components_skeleton_skeleton = require('./skeleton.cjs');
|
|
6
|
+
const components_skeleton_skeletonStack = require('./skeleton-stack.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
exports.Skeleton = components_skeleton_skeleton.Skeleton;
|
|
10
11
|
exports.skeletonVariants = components_skeleton_skeleton.skeletonVariants;
|
|
12
|
+
exports.SkeletonStack = components_skeleton_skeletonStack.SkeletonStack;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
const React = require('react');
|
|
7
|
+
const utils_cn = require('../../utils/cn.cjs');
|
|
8
|
+
require('sonner');
|
|
9
|
+
require('@gearbox-protocol/sdk');
|
|
10
|
+
const components_skeleton_skeleton = require('./skeleton.cjs');
|
|
11
|
+
|
|
12
|
+
const gapClasses = {
|
|
13
|
+
sm: "space-y-2",
|
|
14
|
+
md: "space-y-3",
|
|
15
|
+
lg: "space-y-4"
|
|
16
|
+
};
|
|
17
|
+
function SkeletonStack({
|
|
18
|
+
lines = 5,
|
|
19
|
+
className,
|
|
20
|
+
gap = "md"
|
|
21
|
+
}) {
|
|
22
|
+
const skeletonKeys = React.useMemo(
|
|
23
|
+
() => Array.from({ length: lines }, () => crypto.randomUUID()),
|
|
24
|
+
[lines]
|
|
25
|
+
);
|
|
26
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_cn.cn(gapClasses[gap], className), children: skeletonKeys.map((key, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
27
|
+
components_skeleton_skeleton.Skeleton,
|
|
28
|
+
{
|
|
29
|
+
className: utils_cn.cn("h-4 w-full", index === lines - 1 && "w-3/4")
|
|
30
|
+
},
|
|
31
|
+
key
|
|
32
|
+
)) });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
exports.SkeletonStack = SkeletonStack;
|