@gearbox-protocol/permissionless-ui 1.2.30 → 1.2.32
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/external-button.js +1 -1
- package/dist/cjs/components/cards/expandable-call.js +81 -0
- package/dist/cjs/components/cards/expandable-card.js +2 -1
- package/dist/cjs/components/cards/index.js +2 -0
- package/dist/esm/components/buttons/external-button.js +1 -1
- package/dist/esm/components/cards/expandable-call.js +47 -0
- package/dist/esm/components/cards/expandable-card.js +2 -1
- package/dist/esm/components/cards/index.js +1 -0
- package/dist/types/components/alert-dialog.d.ts +27 -0
- package/dist/types/components/auth/signin-required.d.ts +25 -0
- package/dist/types/components/auth/siwe-provider.d.ts +23 -0
- package/dist/types/components/badge.d.ts +19 -0
- package/dist/types/components/buttons/back-button.d.ts +19 -2
- package/dist/types/components/buttons/button.d.ts +30 -0
- package/dist/types/components/buttons/copy-button.d.ts +17 -0
- package/dist/types/components/buttons/external-button.d.ts +17 -0
- package/dist/types/components/buttons/navigation-button.d.ts +18 -0
- package/dist/types/components/buttons/tab-button.d.ts +16 -0
- package/dist/types/components/cards/card.d.ts +43 -0
- package/dist/types/components/cards/danger-zone.d.ts +17 -0
- package/dist/types/components/cards/expandable-call.d.ts +28 -0
- package/dist/types/components/cards/expandable-card.d.ts +20 -0
- package/dist/types/components/cards/index.d.ts +1 -0
- package/dist/types/components/checkbox.d.ts +18 -0
- package/dist/types/components/dialog.d.ts +22 -0
- package/dist/types/components/dropdown-menu.d.ts +32 -0
- package/dist/types/components/editable-table/edit-button.d.ts +14 -0
- package/dist/types/components/editable-table/editable-table.d.ts +60 -0
- package/dist/types/components/editable-table/updated-value.d.ts +19 -0
- package/dist/types/components/input.d.ts +20 -0
- package/dist/types/components/label.d.ts +15 -0
- package/dist/types/components/layout/app-logo.d.ts +17 -0
- package/dist/types/components/layout/footer.d.ts +21 -0
- package/dist/types/components/layout/header.d.ts +19 -0
- package/dist/types/components/layout/legal-disclaimer.d.ts +23 -0
- package/dist/types/components/layout/page-layout.d.ts +25 -0
- package/dist/types/components/markdown-viewer.d.ts +26 -0
- package/dist/types/components/search-bar.d.ts +19 -0
- package/dist/types/components/select.d.ts +26 -0
- package/dist/types/components/signatures/confirmation-item.d.ts +18 -0
- package/dist/types/components/signatures/identicon.d.ts +17 -0
- package/dist/types/components/signatures/vertical-timeline.d.ts +36 -0
- package/dist/types/components/skeleton.d.ts +18 -0
- package/dist/types/components/table.d.ts +81 -0
- package/dist/types/components/tabs.d.ts +20 -0
- package/dist/types/components/textarea.d.ts +17 -0
- package/dist/types/components/token-icon.d.ts +20 -0
- package/dist/types/components/tooltip.d.ts +18 -0
- package/package.json +1 -1
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Dialog — modal dialog component and its subcomponents.
|
|
5
|
+
*
|
|
6
|
+
* @usage
|
|
7
|
+
* Use Dialog to display modal content:
|
|
8
|
+
* forms, detailed information, complex content, modal overlays.
|
|
9
|
+
*
|
|
10
|
+
* Dialog Components:
|
|
11
|
+
* - `Dialog` — root component (DialogPrimitive.Root).
|
|
12
|
+
* - `DialogTrigger` — trigger button that opens the dialog.
|
|
13
|
+
* - `DialogContent` — dialog content container with close button.
|
|
14
|
+
* - `DialogHeader` — header section for title and description.
|
|
15
|
+
* - `DialogFooter` — footer section for actions.
|
|
16
|
+
* - `DialogTitle` — dialog title (large, bold, white text).
|
|
17
|
+
* - `DialogDescription` — dialog description text.
|
|
18
|
+
* - `DialogOverlay` — backdrop overlay.
|
|
19
|
+
* - `DialogPortal` — portal for rendering dialog.
|
|
20
|
+
*
|
|
21
|
+
* Note: All components are based on Radix UI Dialog primitive.
|
|
22
|
+
* Uses large, bold title styling.
|
|
23
|
+
* Prefer using these components instead of @radix-ui/react-dialog directly.
|
|
24
|
+
*/
|
|
3
25
|
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
26
|
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
27
|
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* DropdownMenu — dropdown menu component and its subcomponents.
|
|
5
|
+
*
|
|
6
|
+
* @usage
|
|
7
|
+
* Use DropdownMenu to create context menus and dropdowns:
|
|
8
|
+
* action menus, context menus, option menus, navigation dropdowns.
|
|
9
|
+
*
|
|
10
|
+
* DropdownMenu Components:
|
|
11
|
+
* - `DropdownMenu` — root component (DropdownMenuPrimitive.Root).
|
|
12
|
+
* - `DropdownMenuTrigger` — trigger button that opens the menu.
|
|
13
|
+
* - `DropdownMenuContent` — menu content container.
|
|
14
|
+
* - `DropdownMenuItem` — individual menu item.
|
|
15
|
+
* - `DropdownMenuCheckboxItem` — checkbox menu item with check indicator.
|
|
16
|
+
* - `DropdownMenuRadioItem` — radio menu item with circle indicator.
|
|
17
|
+
* - `DropdownMenuLabel` — menu section label.
|
|
18
|
+
* - `DropdownMenuSeparator` — visual separator between items.
|
|
19
|
+
* - `DropdownMenuGroup` — groups related items.
|
|
20
|
+
* - `DropdownMenuSub` — submenu container.
|
|
21
|
+
* - `DropdownMenuSubTrigger` — submenu trigger item.
|
|
22
|
+
* - `DropdownMenuSubContent` — submenu content.
|
|
23
|
+
* - `DropdownMenuRadioGroup` — radio group for radio items.
|
|
24
|
+
* - `DropdownMenuShortcut` — keyboard shortcut display.
|
|
25
|
+
* - `DropdownMenuPortal` — portal for rendering menu.
|
|
26
|
+
*
|
|
27
|
+
* Note: All components are based on Radix UI DropdownMenu primitive.
|
|
28
|
+
* Supports nested submenus, checkboxes, radio groups, and keyboard shortcuts.
|
|
29
|
+
* Prefer using these components instead of @radix-ui/react-dropdown-menu directly.
|
|
30
|
+
*
|
|
31
|
+
* Do NOT use DropdownMenu:
|
|
32
|
+
* - for simple selects (use Select component).
|
|
33
|
+
* - for navigation menus (use NavigationButton or appropriate navigation components).
|
|
34
|
+
*/
|
|
3
35
|
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
36
|
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
37
|
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,5 +3,19 @@ interface EditButtonProps {
|
|
|
3
3
|
customButton?: React.ReactNode;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* EditButton — button component for triggering edit actions.
|
|
8
|
+
*
|
|
9
|
+
* @usage
|
|
10
|
+
* Use EditButton to provide edit functionality in editable components:
|
|
11
|
+
* table cells, form fields, editable values.
|
|
12
|
+
*
|
|
13
|
+
* Props:
|
|
14
|
+
* - `onClick` — callback function executed when button is clicked.
|
|
15
|
+
* - `customButton` — custom React node to replace default edit icon.
|
|
16
|
+
* - `disabled` — if true, button is disabled.
|
|
17
|
+
*
|
|
18
|
+
* Note: Uses ghost variant Button with Edit icon by default. Custom button can be provided for different styling.
|
|
19
|
+
*/
|
|
6
20
|
export declare function EditButton({ onClick, customButton, disabled, }: EditButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
7
21
|
export {};
|
|
@@ -6,7 +6,40 @@ interface TableCellAssetProps {
|
|
|
6
6
|
explorerUrl?: string;
|
|
7
7
|
iconSymbol?: string;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* TableCellAsset — table cell component for displaying asset information.
|
|
11
|
+
*
|
|
12
|
+
* @usage
|
|
13
|
+
* Use TableCellAsset to display asset data in table cells:
|
|
14
|
+
* token symbols, asset addresses, icons, explorer links.
|
|
15
|
+
*
|
|
16
|
+
* Props:
|
|
17
|
+
* - `assetAddress` — asset contract address (required).
|
|
18
|
+
* - `symbol` — asset symbol/ticker (required).
|
|
19
|
+
* - `comment` — optional comment displayed next to symbol.
|
|
20
|
+
* - `explorerUrl` — optional explorer URL for external link button.
|
|
21
|
+
* - `iconSymbol` — optional symbol for icon extraction (used when icon doesn't match symbol, e.g., pool tokens).
|
|
22
|
+
*/
|
|
9
23
|
export declare function TableCellAsset({ assetAddress, symbol, iconSymbol, comment, explorerUrl, }: TableCellAssetProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* TableCellUpdatable — table cell component for displaying editable values with old/new value comparison.
|
|
26
|
+
*
|
|
27
|
+
* @usage
|
|
28
|
+
* Use TableCellUpdatable to display values that can be edited in table cells:
|
|
29
|
+
* editable parameters, configurable settings, updatable data with change indication.
|
|
30
|
+
*
|
|
31
|
+
* Props:
|
|
32
|
+
* - `oldValue` — previous value displayed with strikethrough when different from newValue.
|
|
33
|
+
* - `newValue` — current/new value to display (required).
|
|
34
|
+
* - `onEdit` — callback function executed when edit button is clicked.
|
|
35
|
+
* - `isEditable` — if false, edit button is not shown (defaults to true).
|
|
36
|
+
* - `className` — additional CSS classes for styling.
|
|
37
|
+
* - `customButton` — custom React node to replace default edit button.
|
|
38
|
+
* - `align` — text alignment: "left", "right", or "center" (defaults to "right").
|
|
39
|
+
* - `postfix` — optional text displayed after the value.
|
|
40
|
+
* - `disabled` — if true, edit button is disabled.
|
|
41
|
+
* - `nowrap` — if true, prevents text wrapping.
|
|
42
|
+
*/
|
|
10
43
|
export interface TableCellUpdatableProps {
|
|
11
44
|
oldValue?: string;
|
|
12
45
|
newValue: string;
|
|
@@ -20,12 +53,39 @@ export interface TableCellUpdatableProps {
|
|
|
20
53
|
nowrap?: boolean;
|
|
21
54
|
}
|
|
22
55
|
export declare function TableCellUpdatable({ oldValue, newValue, onEdit, isEditable, className, align, customButton, postfix, disabled, nowrap, }: TableCellUpdatableProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* TableEditableAction — action button configuration for TableEditable.
|
|
58
|
+
*/
|
|
23
59
|
export interface TableEditableAction {
|
|
24
60
|
text: string;
|
|
25
61
|
onClick: () => void;
|
|
26
62
|
loadingText?: string;
|
|
27
63
|
isLoading?: boolean;
|
|
28
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* TableEditable — table component with header, action buttons, and editable content.
|
|
67
|
+
*
|
|
68
|
+
* @usage
|
|
69
|
+
* Use TableEditable to create tables with editable content and action buttons:
|
|
70
|
+
* data management tables, configuration tables, editable parameter lists.
|
|
71
|
+
*
|
|
72
|
+
* Props:
|
|
73
|
+
* - `title` — table title displayed in header (required).
|
|
74
|
+
* - `onNew` — callback function for "New" button action.
|
|
75
|
+
* - `newButtonText` — text for "New" button (defaults to "New").
|
|
76
|
+
* - `isLoading` — if true, "New" button shows loading state.
|
|
77
|
+
* - `buttonLoadingText` — text shown in "New" button when loading (defaults to "Adding...").
|
|
78
|
+
* - `actions` — array of additional action buttons (TableEditableAction[]).
|
|
79
|
+
* - `children` — table content (Table rows/cells) (required).
|
|
80
|
+
* - `disabled` — if true, all action buttons are disabled.
|
|
81
|
+
* - `skipSignIn` — if true, skips sign-in requirement for actions (defaults to true).
|
|
82
|
+
*
|
|
83
|
+
* Note: Action buttons are wrapped in SignInRequired component and use TabButton for styling.
|
|
84
|
+
*
|
|
85
|
+
* Do NOT use TableEditable:
|
|
86
|
+
* - for read-only tables without editing capabilities (use regular Table component).
|
|
87
|
+
* - when you don't need action buttons or title (use regular Table component).
|
|
88
|
+
*/
|
|
29
89
|
interface TableEditableProps {
|
|
30
90
|
title: string;
|
|
31
91
|
onNew?: () => void;
|
|
@@ -8,5 +8,24 @@ interface UpdatedValueProps {
|
|
|
8
8
|
customButton?: React.ReactNode;
|
|
9
9
|
postfix?: string;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* UpdatedValue — component for displaying old and new values with edit functionality.
|
|
13
|
+
*
|
|
14
|
+
* @usage
|
|
15
|
+
* Use UpdatedValue to show value changes with visual indication:
|
|
16
|
+
* old value with strikethrough, new value, edit button for modifications.
|
|
17
|
+
*
|
|
18
|
+
* Props:
|
|
19
|
+
* - `oldValue` — previous value displayed with strikethrough when different from newValue.
|
|
20
|
+
* - `newValue` — current/new value to display (required).
|
|
21
|
+
* - `onEdit` — callback function executed when edit button is clicked.
|
|
22
|
+
* - `isEditable` — if false, edit button is not shown (defaults to true).
|
|
23
|
+
* - `disabled` — if true, edit button is disabled (defaults to false).
|
|
24
|
+
* - `nowrap` — if true, prevents text wrapping (defaults to false).
|
|
25
|
+
* - `customButton` — custom React node to replace default edit button.
|
|
26
|
+
* - `postfix` — optional text displayed after the value.
|
|
27
|
+
*
|
|
28
|
+
* Note: When oldValue differs from newValue, old value is shown with strikethrough and arrow (→) separator.
|
|
29
|
+
*/
|
|
11
30
|
export declare function UpdatedValue({ oldValue, newValue, onEdit, isEditable, customButton, postfix, disabled, nowrap, }: UpdatedValueProps): import("react/jsx-runtime").JSX.Element;
|
|
12
31
|
export {};
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Input — text input component with error handling.
|
|
4
|
+
*
|
|
5
|
+
* @usage
|
|
6
|
+
* Use Input for text input fields in forms:
|
|
7
|
+
* text inputs, number inputs, email inputs, password inputs, search inputs, etc.
|
|
8
|
+
*
|
|
9
|
+
* Props:
|
|
10
|
+
* - `hasError` — if true, displays error styling (red border).
|
|
11
|
+
* - `errorMessage` — error message displayed below input when hasError is true and value is not empty.
|
|
12
|
+
* - All standard HTML input props are supported (type, placeholder, value, onChange, etc.).
|
|
13
|
+
*
|
|
14
|
+
* Note: For number inputs, prevents wheel scroll from changing value.
|
|
15
|
+
* Error message is only shown when hasError is true and value is not empty.
|
|
16
|
+
* Prefer using this component instead of native HTML input element.
|
|
17
|
+
*
|
|
18
|
+
* Do NOT use Input:
|
|
19
|
+
* - for multi-line text input (use Textarea component).
|
|
20
|
+
* - for file uploads (use appropriate file input components).
|
|
21
|
+
*/
|
|
2
22
|
interface InputProps extends React.ComponentProps<"input"> {
|
|
3
23
|
hasError?: boolean;
|
|
4
24
|
errorMessage?: string;
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
/**
|
|
5
|
+
* Label — component for form field labels.
|
|
6
|
+
*
|
|
7
|
+
* @usage
|
|
8
|
+
* Use Label to label form inputs and controls:
|
|
9
|
+
* input labels, checkbox labels, select labels, form field labels.
|
|
10
|
+
*
|
|
11
|
+
* Note: Uses white text color and large text size. Automatically handles disabled state styling.
|
|
12
|
+
* All standard Radix UI Label props are supported.
|
|
13
|
+
* Prefer using this component instead of @radix-ui/react-label directly.
|
|
14
|
+
*
|
|
15
|
+
* Do NOT use Label:
|
|
16
|
+
* - for non-form text labels (use appropriate text components).
|
|
17
|
+
* - when you need different styling that doesn't match form label semantics.
|
|
18
|
+
*/
|
|
4
19
|
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
20
|
export { Label };
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AppLogo — application logo component with Gearbox Protocol logo and app name.
|
|
3
|
+
*
|
|
4
|
+
* @usage
|
|
5
|
+
* Use AppLogo to display application branding:
|
|
6
|
+
* header logo, footer logo, page branding.
|
|
7
|
+
*
|
|
8
|
+
* Props:
|
|
9
|
+
* - `appName` — application name displayed next to logo (required).
|
|
10
|
+
* - `size` — logo size: "default" or "small" (defaults to "default").
|
|
11
|
+
*
|
|
12
|
+
* Note: Uses Gearbox Protocol logo from static CDN. Logo size and text size adjust based on size prop.
|
|
13
|
+
*
|
|
14
|
+
* Do NOT use AppLogo:
|
|
15
|
+
* - for custom logos or branding (use Image component with custom logo).
|
|
16
|
+
* - when you need different logo styling (use Image component with appropriate styling).
|
|
17
|
+
*/
|
|
1
18
|
export declare function AppLogo({ appName, size, }: {
|
|
2
19
|
appName: string;
|
|
3
20
|
size?: "default" | "small";
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
import { type LegalReferences } from "./legal-disclaimer";
|
|
2
|
+
/**
|
|
3
|
+
* Footer — application footer component with legal links and branding.
|
|
4
|
+
*
|
|
5
|
+
* @usage
|
|
6
|
+
* Use Footer as the main application footer:
|
|
7
|
+
* legal links, documentation links, app branding, legal disclaimer.
|
|
8
|
+
*
|
|
9
|
+
* Props:
|
|
10
|
+
* - `appName` — application name displayed in logo (required).
|
|
11
|
+
* - `legalReferences` — object containing legal document URLs (required):
|
|
12
|
+
* - `termsOfService` — Terms of Service URL.
|
|
13
|
+
* - `privacyNotice` — Privacy Notice URL.
|
|
14
|
+
* - `riskDisclosure` — Risk Disclosure URL.
|
|
15
|
+
*
|
|
16
|
+
* Note: Footer includes AppLogo, LegalDisclaimer, and predefined link sections for Legal and Developers.
|
|
17
|
+
* Uses responsive grid layout (1 column on mobile, 2 columns on desktop).
|
|
18
|
+
*
|
|
19
|
+
* Do NOT use Footer:
|
|
20
|
+
* - for page-specific footers.
|
|
21
|
+
* - for section footers within content (use appropriate container components).
|
|
22
|
+
*/
|
|
2
23
|
export declare function Footer({ appName, legalReferences, }: {
|
|
3
24
|
appName: string;
|
|
4
25
|
legalReferences: LegalReferences;
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { type NavigationButtonProps } from "../buttons";
|
|
2
|
+
/**
|
|
3
|
+
* Header — application header component with navigation and wallet connection.
|
|
4
|
+
*
|
|
5
|
+
* @usage
|
|
6
|
+
* Use Header as the main application header:
|
|
7
|
+
* top navigation bar, app logo, navigation menu, wallet connection button.
|
|
8
|
+
*
|
|
9
|
+
* Props:
|
|
10
|
+
* - `appName` — application name displayed next to logo (required).
|
|
11
|
+
* - `navigation` — array of NavigationButton props for navigation menu (required).
|
|
12
|
+
* - `connectKitButton` — ConnectKit wallet connection button component (required).
|
|
13
|
+
*
|
|
14
|
+
* Note: Header is sticky at the top with z-50. Navigation is hidden on mobile (md:flex).
|
|
15
|
+
* Uses NavigationButton components for navigation items.
|
|
16
|
+
*
|
|
17
|
+
* Do NOT use Header:
|
|
18
|
+
* - for page-specific headers.
|
|
19
|
+
* - for section headers within content (use CardHeader or h2/h3 elements).
|
|
20
|
+
*/
|
|
2
21
|
export declare function Header({ appName, navigation, connectKitButton, }: {
|
|
3
22
|
appName: string;
|
|
4
23
|
navigation: NavigationButtonProps[];
|
|
@@ -1,8 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LegalReferences — interface for legal document URLs.
|
|
3
|
+
*/
|
|
1
4
|
export interface LegalReferences {
|
|
2
5
|
termsOfService: string;
|
|
3
6
|
privacyNotice: string;
|
|
4
7
|
riskDisclosure: string;
|
|
5
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* LegalDisclaimer — component for displaying legal disclaimer text with links.
|
|
11
|
+
*
|
|
12
|
+
* @usage
|
|
13
|
+
* Use LegalDisclaimer to display legal information and required disclaimers:
|
|
14
|
+
* footer legal text, terms acceptance notices, risk disclosure statements.
|
|
15
|
+
*
|
|
16
|
+
* Props:
|
|
17
|
+
* - `hrefs` — object containing legal document URLs (required):
|
|
18
|
+
* - `termsOfService` — Terms of Service URL.
|
|
19
|
+
* - `privacyNotice` — Privacy Notice URL.
|
|
20
|
+
* - `riskDisclosure` — Risk Disclosure URL.
|
|
21
|
+
*
|
|
22
|
+
* Note: Displays formatted text with links to Terms of Service, Privacy Notice, and Risk Disclosure Statement.
|
|
23
|
+
* Text uses muted color and small size for footer placement.
|
|
24
|
+
*
|
|
25
|
+
* Do NOT use LegalDisclaimer:
|
|
26
|
+
* - for custom legal text (use appropriate text components with links).
|
|
27
|
+
* - when different disclaimer format is needed (use custom component).
|
|
28
|
+
*/
|
|
6
29
|
export declare function LegalDisclaimer({ hrefs }: {
|
|
7
30
|
hrefs: LegalReferences;
|
|
8
31
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,5 +10,30 @@ interface PageLayoutProps {
|
|
|
10
10
|
};
|
|
11
11
|
actionButton?: JSX.Element;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* PageLayout — main layout component for application pages.
|
|
15
|
+
*
|
|
16
|
+
* @usage
|
|
17
|
+
* Use PageLayout as the root layout wrapper for application pages:
|
|
18
|
+
* page containers, content pages, detail pages, settings pages.
|
|
19
|
+
*
|
|
20
|
+
* Props:
|
|
21
|
+
* - `children` — page content (required).
|
|
22
|
+
* - `title` — page title displayed in header (required).
|
|
23
|
+
* - `description` — optional description element displayed below title.
|
|
24
|
+
* - `icon` — optional icon element displayed next to title.
|
|
25
|
+
* - `backButton` — optional back button configuration object:
|
|
26
|
+
* - `href` — destination URL for back navigation (required).
|
|
27
|
+
* - `text` — custom text label (defaults to "Back" if not provided).
|
|
28
|
+
* - `onClick` — optional callback function executed on click.
|
|
29
|
+
* - `actionButton` — optional action button element displayed next to title.
|
|
30
|
+
*
|
|
31
|
+
* Note: PageLayout provides full-screen layout with black background, padding, and overflow handling.
|
|
32
|
+
* BackButton is rendered when backButton prop is provided.
|
|
33
|
+
*
|
|
34
|
+
* Do NOT use PageLayout:
|
|
35
|
+
* - for modal dialogs or overlays (use Dialog component instead).
|
|
36
|
+
* - for nested page sections (use Card or other container components).
|
|
37
|
+
*/
|
|
13
38
|
export declare function PageLayout({ children, title, description, icon, backButton, actionButton, }: PageLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
14
39
|
export {};
|
|
@@ -2,4 +2,30 @@ export interface MarkdownViewerProps {
|
|
|
2
2
|
content: string;
|
|
3
3
|
title?: string;
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* MarkdownViewer — component for rendering markdown content with custom styling.
|
|
7
|
+
*
|
|
8
|
+
* @usage
|
|
9
|
+
* Use MarkdownViewer to display markdown-formatted content:
|
|
10
|
+
* documentation pages, content pages, markdown articles, formatted text.
|
|
11
|
+
*
|
|
12
|
+
* Props:
|
|
13
|
+
* - `content` — markdown content string to render (required).
|
|
14
|
+
* - `title` — optional page title displayed in PageLayout.
|
|
15
|
+
*
|
|
16
|
+
* Features:
|
|
17
|
+
* - Custom heading IDs with slugification or custom IDs (e.g., "## Heading {#custom-id}").
|
|
18
|
+
* - Smooth scroll to hash on mount and anchor link clicks.
|
|
19
|
+
* - Custom styling for all markdown elements (headings, links, lists, code blocks, etc.).
|
|
20
|
+
* - Support for GitHub Flavored Markdown (GFM) via remark-gfm.
|
|
21
|
+
* - Internal anchor links with smooth scrolling.
|
|
22
|
+
* - External links open in new tab.
|
|
23
|
+
*
|
|
24
|
+
* Note: Wraps content in PageLayout with back button. Uses prose styling with dark theme.
|
|
25
|
+
* Automatically handles heading IDs for navigation.
|
|
26
|
+
*
|
|
27
|
+
* Do NOT use MarkdownViewer:
|
|
28
|
+
* - for simple text content (use appropriate text components).
|
|
29
|
+
* - when you need rich text editing (use appropriate rich text editor components).
|
|
30
|
+
*/
|
|
5
31
|
export declare function MarkdownViewer({ content, title }: MarkdownViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,5 +3,24 @@ interface SearchBarProps {
|
|
|
3
3
|
placeholder?: string;
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* SearchBar — search input component with icon.
|
|
8
|
+
*
|
|
9
|
+
* @usage
|
|
10
|
+
* Use SearchBar to provide search functionality:
|
|
11
|
+
* search inputs, filter inputs, query inputs, search forms.
|
|
12
|
+
*
|
|
13
|
+
* Props:
|
|
14
|
+
* - `onChange` — callback function called when search query changes (required).
|
|
15
|
+
* - `placeholder` — placeholder text (defaults to "Search...").
|
|
16
|
+
* - `className` — additional CSS classes for styling (defaults to "w-64").
|
|
17
|
+
*
|
|
18
|
+
* Note: Includes search icon on the left side. Manages internal state for search query.
|
|
19
|
+
* Calls onChange callback on every input change.
|
|
20
|
+
*
|
|
21
|
+
* Do NOT use SearchBar:
|
|
22
|
+
* - for simple text inputs (use Input component).
|
|
23
|
+
* - when you don't need search icon (use Input component).
|
|
24
|
+
*/
|
|
6
25
|
export declare function SearchBar({ onChange, placeholder, className, }: SearchBarProps): import("react/jsx-runtime").JSX.Element;
|
|
7
26
|
export {};
|
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Select — dropdown select component and its subcomponents.
|
|
5
|
+
*
|
|
6
|
+
* @usage
|
|
7
|
+
* Use Select to create dropdown selection menus:
|
|
8
|
+
* form selects, option pickers, filter dropdowns, choice selectors.
|
|
9
|
+
*
|
|
10
|
+
* Select Components:
|
|
11
|
+
* - `Select` — root component (SelectPrimitive.Root).
|
|
12
|
+
* - `SelectTrigger` — trigger button that opens the select menu.
|
|
13
|
+
* - `SelectValue` — displays the selected value.
|
|
14
|
+
* - `SelectContent` — dropdown content container.
|
|
15
|
+
* - `SelectItem` — individual selectable option.
|
|
16
|
+
* - `SelectLabel` — label for option groups.
|
|
17
|
+
* - `SelectGroup` — groups related options.
|
|
18
|
+
* - `SelectSeparator` — visual separator between options.
|
|
19
|
+
* - `SelectScrollUpButton` / `SelectScrollDownButton` — scroll buttons for long lists.
|
|
20
|
+
*
|
|
21
|
+
* Note: All components are based on Radix UI Select.
|
|
22
|
+
* Supports keyboard navigation and accessibility features.
|
|
23
|
+
* Prefer using these components instead of @radix-ui/react-select directly.
|
|
24
|
+
*
|
|
25
|
+
* Do NOT use Select:
|
|
26
|
+
* - for multi-select (use Checkbox or appropriate multi-select components).
|
|
27
|
+
* - for simple toggle switches (use Checkbox or Switch components).
|
|
28
|
+
*/
|
|
3
29
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
30
|
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
31
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import type { Address, Hex } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* ConfirmationItem — component for displaying transaction confirmation with address.
|
|
4
|
+
*
|
|
5
|
+
* @usage
|
|
6
|
+
* Use ConfirmationItem to display confirmation information in timelines:
|
|
7
|
+
* signature confirmations, transaction confirmations, address confirmations.
|
|
8
|
+
*
|
|
9
|
+
* Props:
|
|
10
|
+
* - `confirmation` — confirmation address or hash (Address | Hex) (required).
|
|
11
|
+
* - `note` — optional note text displayed next to address.
|
|
12
|
+
* - `explorerUrl` — optional explorer URL for external link button.
|
|
13
|
+
*
|
|
14
|
+
* Note: Displays Identicon, shortened hash, optional note, and action buttons (Copy, External link).
|
|
15
|
+
* Action buttons are shown on hover. Used in VerticalTimeline ExtentionStep content.
|
|
16
|
+
*
|
|
17
|
+
* Do NOT use ConfirmationItem:
|
|
18
|
+
* - outside of timeline or confirmation contexts (use appropriate address display components).
|
|
19
|
+
*/
|
|
2
20
|
interface ConfirmationItemProps {
|
|
3
21
|
confirmation: Address | Hex;
|
|
4
22
|
note?: string;
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identicon — component for displaying address identifier icon.
|
|
3
|
+
*
|
|
4
|
+
* @usage
|
|
5
|
+
* Use Identicon to display visual identifier for addresses:
|
|
6
|
+
* address avatars, confirmation icons, address representations.
|
|
7
|
+
*
|
|
8
|
+
* Props:
|
|
9
|
+
* - `address` — address string to generate identicon from (required).
|
|
10
|
+
* - `size` — identicon size in pixels (defaults to 32).
|
|
11
|
+
*
|
|
12
|
+
* Note: Uses first two hex characters (after 0x) of address as identifier.
|
|
13
|
+
* Displays as rounded circle with gray background and white text.
|
|
14
|
+
*
|
|
15
|
+
* Do NOT use Identicon:
|
|
16
|
+
* - for token icons or asset images (use TokenIcon component).
|
|
17
|
+
*/
|
|
1
18
|
export declare function Identicon({ address, size, }: {
|
|
2
19
|
address: string;
|
|
3
20
|
size?: number;
|
|
@@ -1,14 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StepCommon — common properties for timeline steps.
|
|
3
|
+
*/
|
|
1
4
|
interface StepCommon {
|
|
2
5
|
status: "success" | "pending" | "not-started" | "error";
|
|
3
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Step — default step type for timeline.
|
|
9
|
+
*/
|
|
4
10
|
interface Step extends StepCommon {
|
|
5
11
|
type: "default";
|
|
6
12
|
title: string;
|
|
7
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* ExtentionStep — expandable step type for timeline with collapsible content.
|
|
16
|
+
*/
|
|
8
17
|
interface ExtentionStep extends StepCommon {
|
|
9
18
|
type: "extention";
|
|
10
19
|
children: React.ReactNode;
|
|
11
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* VerticalTimeline — component for displaying vertical timeline of steps with status indicators.
|
|
23
|
+
*
|
|
24
|
+
* @usage
|
|
25
|
+
* Use VerticalTimeline to display sequential steps with status:
|
|
26
|
+
* transaction confirmation steps, multi-step processes, signature workflows, progress tracking.
|
|
27
|
+
* Commonly used for tracking transaction status: signed, queued,executed, etc.
|
|
28
|
+
*
|
|
29
|
+
* Props:
|
|
30
|
+
* - `steps` — array of step objects (Step | ExtentionStep) (required):
|
|
31
|
+
* - Step: `type: "default"`, `title: string`, `status: "success" | "pending" | "not-started" | "error"`.
|
|
32
|
+
* - ExtentionStep: `type: "extention"`, `children: React.ReactNode`, `status: "success" | "pending" | "not-started" | "error"`.
|
|
33
|
+
* - `minWidth` — minimum width of timeline in pixels (defaults to 300).
|
|
34
|
+
*
|
|
35
|
+
* Step Statuses:
|
|
36
|
+
* - `success` — step completed successfully (green circle with checkmark).
|
|
37
|
+
* - `pending` — step in progress (gray border circle).
|
|
38
|
+
* - `not-started` — step not yet started (not displayed).
|
|
39
|
+
* - `error` — step failed (red circle with X).
|
|
40
|
+
*
|
|
41
|
+
* Note: ExtentionStep provides expandable content with "Show all" / "Hide all" toggle.
|
|
42
|
+
* Steps with "not-started" status are not rendered.
|
|
43
|
+
*
|
|
44
|
+
* Do NOT use VerticalTimeline:
|
|
45
|
+
* - for horizontal progress indicators (use appropriate progress components).
|
|
46
|
+
* - for simple lists without status tracking (use regular list components).
|
|
47
|
+
*/
|
|
12
48
|
interface VerticalTimelineProps {
|
|
13
49
|
steps: (Step | ExtentionStep)[];
|
|
14
50
|
minWidth?: number;
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skeleton — loading placeholder component.
|
|
3
|
+
*
|
|
4
|
+
* @usage
|
|
5
|
+
* Use Skeleton to display loading placeholders:
|
|
6
|
+
* content loading states, data fetching indicators, placeholder animations.
|
|
7
|
+
*
|
|
8
|
+
* Props:
|
|
9
|
+
* - All standard HTML div props are supported (className, style, etc.).
|
|
10
|
+
*
|
|
11
|
+
* Note: Uses pulse animation and muted background color.
|
|
12
|
+
* Can be styled with className to match content dimensions.
|
|
13
|
+
* Prefer using this component instead of native HTML div element for loading placeholders.
|
|
14
|
+
*
|
|
15
|
+
* Do NOT use Skeleton:
|
|
16
|
+
* - for error states (use appropriate error components).
|
|
17
|
+
* - for empty states (use appropriate empty state components).
|
|
18
|
+
*/
|
|
1
19
|
declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
2
20
|
export { Skeleton };
|