@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.
Files changed (49) hide show
  1. package/dist/cjs/components/buttons/external-button.js +1 -1
  2. package/dist/cjs/components/cards/expandable-call.js +81 -0
  3. package/dist/cjs/components/cards/expandable-card.js +2 -1
  4. package/dist/cjs/components/cards/index.js +2 -0
  5. package/dist/esm/components/buttons/external-button.js +1 -1
  6. package/dist/esm/components/cards/expandable-call.js +47 -0
  7. package/dist/esm/components/cards/expandable-card.js +2 -1
  8. package/dist/esm/components/cards/index.js +1 -0
  9. package/dist/types/components/alert-dialog.d.ts +27 -0
  10. package/dist/types/components/auth/signin-required.d.ts +25 -0
  11. package/dist/types/components/auth/siwe-provider.d.ts +23 -0
  12. package/dist/types/components/badge.d.ts +19 -0
  13. package/dist/types/components/buttons/back-button.d.ts +19 -2
  14. package/dist/types/components/buttons/button.d.ts +30 -0
  15. package/dist/types/components/buttons/copy-button.d.ts +17 -0
  16. package/dist/types/components/buttons/external-button.d.ts +17 -0
  17. package/dist/types/components/buttons/navigation-button.d.ts +18 -0
  18. package/dist/types/components/buttons/tab-button.d.ts +16 -0
  19. package/dist/types/components/cards/card.d.ts +43 -0
  20. package/dist/types/components/cards/danger-zone.d.ts +17 -0
  21. package/dist/types/components/cards/expandable-call.d.ts +28 -0
  22. package/dist/types/components/cards/expandable-card.d.ts +20 -0
  23. package/dist/types/components/cards/index.d.ts +1 -0
  24. package/dist/types/components/checkbox.d.ts +18 -0
  25. package/dist/types/components/dialog.d.ts +22 -0
  26. package/dist/types/components/dropdown-menu.d.ts +32 -0
  27. package/dist/types/components/editable-table/edit-button.d.ts +14 -0
  28. package/dist/types/components/editable-table/editable-table.d.ts +60 -0
  29. package/dist/types/components/editable-table/updated-value.d.ts +19 -0
  30. package/dist/types/components/input.d.ts +20 -0
  31. package/dist/types/components/label.d.ts +15 -0
  32. package/dist/types/components/layout/app-logo.d.ts +17 -0
  33. package/dist/types/components/layout/footer.d.ts +21 -0
  34. package/dist/types/components/layout/header.d.ts +19 -0
  35. package/dist/types/components/layout/legal-disclaimer.d.ts +23 -0
  36. package/dist/types/components/layout/page-layout.d.ts +25 -0
  37. package/dist/types/components/markdown-viewer.d.ts +26 -0
  38. package/dist/types/components/search-bar.d.ts +19 -0
  39. package/dist/types/components/select.d.ts +26 -0
  40. package/dist/types/components/signatures/confirmation-item.d.ts +18 -0
  41. package/dist/types/components/signatures/identicon.d.ts +17 -0
  42. package/dist/types/components/signatures/vertical-timeline.d.ts +36 -0
  43. package/dist/types/components/skeleton.d.ts +18 -0
  44. package/dist/types/components/table.d.ts +81 -0
  45. package/dist/types/components/tabs.d.ts +20 -0
  46. package/dist/types/components/textarea.d.ts +17 -0
  47. package/dist/types/components/token-icon.d.ts +20 -0
  48. package/dist/types/components/tooltip.d.ts +18 -0
  49. package/package.json +1 -1
@@ -51,7 +51,7 @@ const ExternalButton = React.forwardRef(
51
51
  );
52
52
  }
53
53
  );
54
- ExternalButton.displayName = "CopyButton";
54
+ ExternalButton.displayName = "ExternalButton";
55
55
  // Annotate the CommonJS export names for ESM import in node:
56
56
  0 && (module.exports = {
57
57
  ExternalButton
@@ -0,0 +1,81 @@
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 expandable_call_exports = {};
31
+ __export(expandable_call_exports, {
32
+ ExpandablCall: () => ExpandablCall
33
+ });
34
+ module.exports = __toCommonJS(expandable_call_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
+ function ExpandablCall({
40
+ header,
41
+ children,
42
+ index,
43
+ isExpandable = true
44
+ }) {
45
+ const [isExpanded, setIsExpanded] = React.useState(false);
46
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded bg-gray-900/50", children: [
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
48
+ "div",
49
+ {
50
+ className: `flex ${isExpandable ? "cursor-pointer" : ""} items-center gap-2 p-3`,
51
+ onClick: () => {
52
+ if (isExpandable) {
53
+ setIsExpanded(!isExpanded);
54
+ }
55
+ },
56
+ children: [
57
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-muted-foreground", children: [
58
+ "#",
59
+ index
60
+ ] }),
61
+ header,
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
+ import_lucide_react.ChevronDown,
64
+ {
65
+ className: (0, import_utils.default)(
66
+ "ml-auto h-4 w-4 text-muted-foreground",
67
+ isExpanded ? "rotate-180" : "",
68
+ "transition-transform duration-200 ease-in-out"
69
+ )
70
+ }
71
+ )
72
+ ]
73
+ }
74
+ ),
75
+ isExpanded && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "border-t border-gray-800 p-4 space-y-2", children })
76
+ ] });
77
+ }
78
+ // Annotate the CommonJS export names for ESM import in node:
79
+ 0 && (module.exports = {
80
+ ExpandablCall
81
+ });
@@ -48,7 +48,8 @@ function ExpandableCard({
48
48
  "div",
49
49
  {
50
50
  className: (0, import_utils.default)(
51
- "flex items-center justify-between gap-4 p-4 rounded-t-xl cursor-pointer hover:bg-accent/50",
51
+ "flex items-center justify-between gap-4 p-4 rounded-t-xl",
52
+ alwaysExpanded ? "" : "cursor-pointer hover:bg-accent/50",
52
53
  isExpanded ? "" : "rounded-b-xl"
53
54
  ),
54
55
  onClick: () => {
@@ -17,10 +17,12 @@ var cards_exports = {};
17
17
  module.exports = __toCommonJS(cards_exports);
18
18
  __reExport(cards_exports, require('./card.js'), module.exports);
19
19
  __reExport(cards_exports, require('./danger-zone.js'), module.exports);
20
+ __reExport(cards_exports, require('./expandable-call.js'), module.exports);
20
21
  __reExport(cards_exports, require('./expandable-card.js'), module.exports);
21
22
  // Annotate the CommonJS export names for ESM import in node:
22
23
  0 && (module.exports = {
23
24
  ...require('./card.js'),
24
25
  ...require('./danger-zone.js'),
26
+ ...require('./expandable-call.js'),
25
27
  ...require('./expandable-card.js')
26
28
  });
@@ -18,7 +18,7 @@ const ExternalButton = React.forwardRef(
18
18
  );
19
19
  }
20
20
  );
21
- ExternalButton.displayName = "CopyButton";
21
+ ExternalButton.displayName = "ExternalButton";
22
22
  export {
23
23
  ExternalButton
24
24
  };
@@ -0,0 +1,47 @@
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
+ function ExpandablCall({
7
+ header,
8
+ children,
9
+ index,
10
+ isExpandable = true
11
+ }) {
12
+ const [isExpanded, setIsExpanded] = React.useState(false);
13
+ return /* @__PURE__ */ jsxs("div", { className: "rounded bg-gray-900/50", children: [
14
+ /* @__PURE__ */ jsxs(
15
+ "div",
16
+ {
17
+ className: `flex ${isExpandable ? "cursor-pointer" : ""} items-center gap-2 p-3`,
18
+ onClick: () => {
19
+ if (isExpandable) {
20
+ setIsExpanded(!isExpanded);
21
+ }
22
+ },
23
+ children: [
24
+ /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
25
+ "#",
26
+ index
27
+ ] }),
28
+ header,
29
+ /* @__PURE__ */ jsx(
30
+ ChevronDown,
31
+ {
32
+ className: cn(
33
+ "ml-auto h-4 w-4 text-muted-foreground",
34
+ isExpanded ? "rotate-180" : "",
35
+ "transition-transform duration-200 ease-in-out"
36
+ )
37
+ }
38
+ )
39
+ ]
40
+ }
41
+ ),
42
+ isExpanded && /* @__PURE__ */ jsx("div", { className: "border-t border-gray-800 p-4 space-y-2", children })
43
+ ] });
44
+ }
45
+ export {
46
+ ExpandablCall
47
+ };
@@ -15,7 +15,8 @@ function ExpandableCard({
15
15
  "div",
16
16
  {
17
17
  className: cn(
18
- "flex items-center justify-between gap-4 p-4 rounded-t-xl cursor-pointer hover:bg-accent/50",
18
+ "flex items-center justify-between gap-4 p-4 rounded-t-xl",
19
+ alwaysExpanded ? "" : "cursor-pointer hover:bg-accent/50",
19
20
  isExpanded ? "" : "rounded-b-xl"
20
21
  ),
21
22
  onClick: () => {
@@ -1,3 +1,4 @@
1
1
  export * from "./card.js";
2
2
  export * from "./danger-zone.js";
3
+ export * from "./expandable-call.js";
3
4
  export * from "./expandable-card.js";
@@ -1,5 +1,32 @@
1
1
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
2
2
  import * as React from "react";
3
+ /**
4
+ * AlertDialog — alert dialog component and its subcomponents.
5
+ *
6
+ * @usage
7
+ * Use AlertDialog to display critical alerts and confirmations:
8
+ * confirmation dialogs, warning dialogs, error alerts, destructive action confirmations.
9
+ *
10
+ * AlertDialog Components:
11
+ * - `AlertDialog` — root component (AlertDialogPrimitive.Root).
12
+ * - `AlertDialogTrigger` — trigger button that opens the dialog.
13
+ * - `AlertDialogContent` — dialog content container.
14
+ * - `AlertDialogHeader` — header section for title and description.
15
+ * - `AlertDialogFooter` — footer section for actions.
16
+ * - `AlertDialogTitle` — dialog title.
17
+ * - `AlertDialogDescription` — dialog description text.
18
+ * - `AlertDialogAction` — primary action button.
19
+ * - `AlertDialogCancel` — cancel/close button.
20
+ * - `AlertDialogOverlay` — backdrop overlay.
21
+ * - `AlertDialogPortal` — portal for rendering dialog.
22
+ *
23
+ * Note: All components are based on Radix UI AlertDialog primitive.
24
+ * Prefer using these components instead of @radix-ui/react-alert-dialog directly.
25
+ *
26
+ * Do NOT use AlertDialog:
27
+ * - for non-critical information (use Dialog component).
28
+ * - for complex forms or content (use Dialog component).
29
+ */
3
30
  declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
31
  declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
32
  declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
@@ -1,6 +1,31 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { Address } from "viem";
3
3
  import { type TabButtonProps } from "../buttons";
4
+ /**
5
+ * SignInRequired — component that requires SIWE authentication to display content.
6
+ *
7
+ * @usage
8
+ * Use SignInRequired to protect content that requires authentication:
9
+ * action buttons, editable content, owner-specific features, authenticated actions.
10
+ *
11
+ * Props:
12
+ * - `owner` — optional address that must match signed-in address to display content.
13
+ * - `children` — content displayed when authenticated (required).
14
+ * - `skipSignIn` — if true, skips authentication requirement (defaults to false).
15
+ * - All Button props are supported (variant, size, className, onClick, etc.).
16
+ *
17
+ * Behavior:
18
+ * - If `skipSignIn={true}` or user is signed in: renders children (or "You are not the author" if owner mismatch).
19
+ * - If wallet connected but not signed in: shows "Sign In as {address}" button or "Try Again" if rejected.
20
+ * - If wallet not connected: shows "Connect Wallet" button.
21
+ *
22
+ * Note: Uses TabButton by default, but switches to Button if custom props are provided.
23
+ * Button text changes based on authentication state and loading status.
24
+ *
25
+ * Do NOT use SignInRequired:
26
+ * - for public content that doesn't require authentication (render content directly).
27
+ * - when you need different authentication flow (use appropriate authentication components).
28
+ */
4
29
  export interface SignInRequiredProps extends TabButtonProps {
5
30
  owner?: Address;
6
31
  children: ReactNode;
@@ -1,3 +1,26 @@
1
+ /**
2
+ * SIWEClientProvider — provider component for Sign-In With Ethereum (SIWE) authentication.
3
+ *
4
+ * @usage
5
+ * Use SIWEClientProvider to wrap your application and enable SIWE authentication:
6
+ * app root, authentication context, wallet-based authentication.
7
+ *
8
+ * Props:
9
+ * - `apiRoutePrefix` — API route prefix for SIWE endpoints (required):
10
+ * - `/api/nonce` — endpoint for fetching nonce.
11
+ * - `/api/signin` — endpoint for verifying signature.
12
+ * - `/api/session` — endpoint for getting current session.
13
+ * - `/api/logout` — endpoint for signing out.
14
+ * - `statement` — optional custom statement for SIWE message (defaults to "Sign In With Ethereum.").
15
+ * - `children` — application content wrapped by provider (required).
16
+ *
17
+ * Note: SIWEClientProvider wraps ConnectKit's SIWEProvider with custom API integration.
18
+ * Handles nonce generation, message creation, signature verification, session management, and sign out.
19
+ * Automatically refreshes router on sign in/out.
20
+ *
21
+ * Do NOT use SIWEClientProvider:
22
+ * - when you don't need SIWE authentication (use regular ConnectKit providers).
23
+ */
1
24
  interface SIWEProviderProps {
2
25
  apiRoutePrefix: string;
3
26
  statement?: string;
@@ -3,6 +3,25 @@ import type * as React from "react";
3
3
  declare const badgeVariants: (props?: ({
4
4
  variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
5
5
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
+ /**
7
+ * Badge — component for displaying labels, tags, or status indicators.
8
+ *
9
+ * @usage
10
+ * Use Badge to display labels, tags, or status indicators:
11
+ * status badges, category tags, count indicators, metadata labels.
12
+ *
13
+ * Variants (variant):
14
+ * - `default` — primary badge with background and shadow.
15
+ * - `secondary` — secondary badge with muted background.
16
+ * - `destructive` — destructive badge with red background for errors/warnings.
17
+ * - `outline` — outlined badge with border only.
18
+ *
19
+ * Note: Prefer using this component instead of native HTML div element for badges.
20
+ *
21
+ * Do NOT use Badge:
22
+ * - for interactive elements (use Button instead).
23
+ * - for large text content (use appropriate text components).
24
+ */
6
25
  export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
26
  }
8
27
  declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,25 @@
1
- interface BackButtonProps {
1
+ export interface BackButtonProps {
2
2
  href: string;
3
3
  text?: string;
4
4
  onClick?: () => void;
5
5
  className?: string;
6
6
  }
7
+ /**
8
+ * BackButton — component for navigation back to previous page.
9
+ *
10
+ * @usage
11
+ * Use BackButton to provide users with a way to return to the previous page or section:
12
+ * breadcrumb navigation, detail pages, multi-step forms, nested views.
13
+ * Mostly used in PageLayout component.
14
+ *
15
+ * Props:
16
+ * - `href` — destination URL for navigation (required).
17
+ * - `text` — custom text label (defaults to "Back" if not provided).
18
+ * - `onClick` — optional callback function executed on click.
19
+ * - `className` — additional CSS classes for styling.
20
+ *
21
+ * Do NOT use BackButton:
22
+ * - for primary navigation menus (use NavigationButton or dedicated navigation components).
23
+ * - for actions that don't navigate to a different page (use regular Button instead).
24
+ */
7
25
  export declare function BackButton({ href, text, onClick, className, }: BackButtonProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -7,5 +7,35 @@ declare const buttonVariants: (props?: ({
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
9
9
  }
10
+ /**
11
+ * Button — universal component for user actions.
12
+ *
13
+ * @usage
14
+ * Use Button for most clickable actions that represent a clearly defined intent:
15
+ * submitting a form, creating an entity, confirming an operation, navigating the interface.
16
+ *
17
+ * Variants (variant):
18
+ * - `default` — main action on a page (submit, create, confirm).
19
+ * - `secondary` — alternative actions next to the primary one.
20
+ * - `outline` — actions with border, medium priority, mostly used.
21
+ * - `ghost` — low-emphasis actions (filters, "View details", icon-only actions).
22
+ * - `destructive` — dangerous or irreversible actions (deleting entities, closing positions, liquidations).
23
+ * - `link` — actions styled as a text link.
24
+ * - `text` — text actions with muted color.
25
+ * - `pink` / `pink-outline` — special variants with pink theme.
26
+ * - `blue` / `blue-outline` — special variants with blue theme.
27
+ *
28
+ * Sizes (size):
29
+ * - `auto` — automatic height without padding.
30
+ * - `xs` — extra small (rounded-full, px-3, text-xs).
31
+ * - `sm` — small (h-8, px-3, text-xs).
32
+ * - `default` — standard (h-9, px-4, py-2).
33
+ * - `lg` — large (h-10, px-8).
34
+ * - `icon` — square button for icons (h-9 w-9).
35
+ *
36
+ * Do NOT use Button:
37
+ * - for passive labels or decorative UI elements.
38
+ * - for elements that don't perform actions (use appropriate semantic elements instead).
39
+ */
10
40
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
41
  export { Button, buttonVariants };
@@ -4,5 +4,22 @@ export interface CopyButtonProps extends ButtonProps {
4
4
  text: string;
5
5
  name?: string;
6
6
  }
7
+ /**
8
+ * CopyButton — component for copying text to clipboard.
9
+ *
10
+ * @usage
11
+ * Use CopyButton to allow users to quickly copy text content to their clipboard:
12
+ * addresses, transaction hashes, API keys, code snippets, shareable links.
13
+ *
14
+ * Props:
15
+ * - `text` — text content to copy to clipboard (required).
16
+ * - `name` — optional name/description shown in copy notification, defaults to "Address".
17
+ * - `size` — size of the copy icon, defaults to "3.5".
18
+ * - All standard Button props are supported (variant, className, etc.).
19
+ *
20
+ * Do NOT use CopyButton:
21
+ * - when the text to copy is not clearly visible or accessible to the user.
22
+ * - as a primary action button (use regular Button with copy functionality if needed).
23
+ */
7
24
  declare const CopyButton: React.ForwardRefExoticComponent<CopyButtonProps & React.RefAttributes<HTMLButtonElement>>;
8
25
  export { CopyButton };
@@ -3,5 +3,22 @@ import { type ButtonProps } from "./button";
3
3
  export interface ExternalButtonProps extends ButtonProps {
4
4
  url: string;
5
5
  }
6
+ /**
7
+ * ExternalButton — component for opening external links in a new tab.
8
+ *
9
+ * @usage
10
+ * Use ExternalButton to open external URLs in a new browser tab:
11
+ * documentation links, external services, social media profiles, third-party tools.
12
+ *
13
+ * Props:
14
+ * - `url` — external URL to open (required).
15
+ * - `size` — size of the copy icon, defaults to "3.5".
16
+ * - All standard Button props are supported (variant, className, etc.).
17
+ *
18
+ * Do NOT use ExternalButton:
19
+ * - for internal navigation within the application (use Link or NavigationButton).
20
+ * - when you want to open links in the same tab (use regular Link component).
21
+ * - for actions that don't involve opening URLs (use regular Button instead).
22
+ */
6
23
  declare const ExternalButton: React.ForwardRefExoticComponent<ExternalButtonProps & React.RefAttributes<HTMLButtonElement>>;
7
24
  export { ExternalButton };
@@ -4,5 +4,23 @@ export interface NavigationButtonProps {
4
4
  text: string;
5
5
  isActive: boolean;
6
6
  }
7
+ /**
8
+ * NavigationButton — component for internal navigation with active state indication.
9
+ *
10
+ * @usage
11
+ * Use NavigationButton for navigation within the application that requires active state:
12
+ * main navigation menus, tab navigation, sidebar navigation, breadcrumb navigation.
13
+ * Used in Header component.
14
+ *
15
+ * Props:
16
+ * - `href` — destination URL for navigation (required).
17
+ * - `text` — button label text (required).
18
+ * - `isActive` — indicates if the current route matches this button's destination (required).
19
+ *
20
+ * Do NOT use NavigationButton:
21
+ * - for external links (use ExternalButton instead).
22
+ * - for actions that don't navigate (use regular Button instead).
23
+ * - when active state indication is not needed (use regular Link component).
24
+ */
7
25
  declare const NavigationButton: React.ForwardRefExoticComponent<NavigationButtonProps & React.RefAttributes<HTMLAnchorElement>>;
8
26
  export { NavigationButton };
@@ -4,5 +4,21 @@ export interface TabButtonProps extends ButtonProps {
4
4
  size?: "sm" | "lg" | "default";
5
5
  children: React.ReactNode;
6
6
  }
7
+ /**
8
+ * TabButton — styled "sm" "outline" button variant commonly used with Tabs, Table, or Card components.
9
+ *
10
+ * @usage
11
+ * Use TabButton as a styled action button in contexts where it pairs well with other UI components:
12
+ * action buttons in EditableTable, buttons in Card headers, actions alongside Tabs.
13
+ * Commonly used as main subpage action.
14
+ *
15
+ * Props:
16
+ * - All standard Button props are supported (variant, className, onClick, etc.).
17
+ *
18
+ * Do NOT use TabButton:
19
+ * - for primary page actions (use regular Button with appropriate variant instead).
20
+ * - for navigation between different pages (use NavigationButton or Link).
21
+ * - when you need different styling that doesn't match the dark theme outline variant.
22
+ */
7
23
  declare const TabButton: React.ForwardRefExoticComponent<TabButtonProps & React.RefAttributes<HTMLButtonElement>>;
8
24
  export { TabButton };
@@ -6,10 +6,53 @@ declare const cardVariants: (props?: ({
6
6
  export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
7
7
  asChild?: boolean;
8
8
  }
9
+ /**
10
+ * Card — container component for grouping related content.
11
+ *
12
+ * @usage
13
+ * Use Card to create visually distinct containers for related content:
14
+ * information panels, settings sections, content blocks, grouped actions.
15
+ *
16
+ * Variants (variant):
17
+ * - `default` — standard card with background and border.
18
+ * - `interactive` — clickable card with hover effects.
19
+ * - `transparent` — card without background (transparent).
20
+ *
21
+ * Card Components:
22
+ * - `CardHeader` — header section with border-bottom, typically contains title and/or description, actions.
23
+ * - `CardTitle` — title text with semibold font and large size.
24
+ * - `CardDescription` — description text with muted color and small size.
25
+ * - `CardContent` — main content area with padding.
26
+ * - `CardFooter` — footer section with border-top, typically contains actions.
27
+ *
28
+ * Do NOT use Card:
29
+ * - for simple layout containers without visual grouping (use div with appropriate styling).
30
+ * - when you need a different visual style that doesn't match card semantics.
31
+ */
9
32
  declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
33
+ /**
34
+ * CardHeader — header section of a Card with border-bottom.
35
+ * Typically contains CardTitle and/or CardDescription and/or action buttons.
36
+ */
10
37
  declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
38
+ /**
39
+ * CardTitle — title text component for Card header.
40
+ * Uses semibold font and large text size.
41
+ */
11
42
  declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
43
+ /**
44
+ * CardDescription — description text component for Card header.
45
+ * Uses muted color and small text size.
46
+ */
12
47
  declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
48
+ /**
49
+ * CardContent — main content area of a Card.
50
+ * Provides padding for card content.
51
+ */
13
52
  declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
53
+ /**
54
+ * CardFooter — footer section of a Card with border-top.
55
+ * Typically contains action buttons and/or additional information.
56
+ */
14
57
  declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
58
  export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, };
@@ -1,5 +1,22 @@
1
1
  interface DangerZoneProps {
2
2
  children: React.ReactNode;
3
3
  }
4
+ /**
5
+ * DangerZone — specialized card component for dangerous or destructive actions.
6
+ *
7
+ * @usage
8
+ * Use DangerZone to visually group and highlight dangerous or irreversible actions:
9
+ * account deletion, data removal, critical settings changes, destructive operations.
10
+ *
11
+ * Props:
12
+ * - `children` — content containing dangerous actions (required).
13
+ *
14
+ * Note: DangerZone uses destructive red styling (border and title color) to indicate danger.
15
+ *
16
+ * Do NOT use DangerZone:
17
+ * - for regular actions or settings (use regular Card instead).
18
+ * - for warnings or informational content (use regular Card with appropriate styling).
19
+ * - when actions are not actually dangerous or destructive.
20
+ */
4
21
  export declare function DangerZone({ children }: DangerZoneProps): import("react/jsx-runtime").JSX.Element;
5
22
  export {};
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ export interface ExpandablCallProps {
3
+ header: React.ReactNode;
4
+ children: React.ReactNode;
5
+ index: string | number;
6
+ isExpandable?: boolean;
7
+ }
8
+ /**
9
+ * ExpandablCall — component for displaying calls within transactions.
10
+ *
11
+ * @usage
12
+ * Use ExpandablCall to display individual function calls inside transaction cards (ExpandableCard):
13
+ * contract method calls, function invocations, call details within transaction data.
14
+ *
15
+ * Props:
16
+ * - `header` — content displayed in the always-visible header section (required).
17
+ * - `children` — content shown when expanded (required).
18
+ * - `index` — call index number displayed as "#{index}" in the header (required).
19
+ * - `isExpandable` — if false, call cannot be expanded/collapsed (defaults to true).
20
+ *
21
+ * Note: Uses rounded background (bg-gray-900/50) and border-top for expanded content to distinguish from transaction card.
22
+ *
23
+ * Do NOT use ExpandablCall:
24
+ * - for displaying transactions themselves (use ExpandableCard instead).
25
+ * - outside of transaction context (use ExpandableCard or regular Card instead).
26
+ */
27
+ declare function ExpandablCall({ header, children, index, isExpandable, }: ExpandablCallProps): import("react/jsx-runtime").JSX.Element;
28
+ export { ExpandablCall };
@@ -4,5 +4,25 @@ export interface ExpandableCardProps {
4
4
  children: React.ReactNode;
5
5
  alwaysExpanded?: boolean;
6
6
  }
7
+ /**
8
+ * ExpandableCard — card component with collapsible content section.
9
+ *
10
+ * @usage
11
+ * Use ExpandableCard to show/hide content sections:
12
+ * collapsible information panels, expandable details, accordion-style content.
13
+ * Exclusively used for displaying transactions (even with `alwaysExpanded={true}`).
14
+ *
15
+ * Props:
16
+ * - `header` — content displayed in the always-visible header section (required).
17
+ * - `children` — content shown when expanded (required).
18
+ * - `alwaysExpanded` — if true, card is always expanded and not collapsible (defaults to false).
19
+ *
20
+ * Note: Expanded content uses a slightly different background color (bg-gray-900/30) to distinguish it from the header.
21
+ *
22
+ * Do NOT use ExpandableCard:
23
+ * - for navigation menus or dropdowns (use appropriate navigation components).
24
+ * - when you need multiple independent expandable sections (consider using Tabs or separate ExpandableCards).
25
+ * - for non-transaction content when a regular Card would suffice.
26
+ */
7
27
  declare function ExpandableCard({ header, children, alwaysExpanded, }: ExpandableCardProps): import("react/jsx-runtime").JSX.Element;
8
28
  export { ExpandableCard };
@@ -1,3 +1,4 @@
1
1
  export * from "./card";
2
2
  export * from "./danger-zone";
3
+ export * from "./expandable-call";
3
4
  export * from "./expandable-card";
@@ -1,4 +1,22 @@
1
1
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
2
2
  import * as React from "react";
3
+ /**
4
+ * Checkbox — checkbox input component.
5
+ *
6
+ * @usage
7
+ * Use Checkbox for binary selection:
8
+ * form checkboxes, option toggles, agreement checkboxes, multi-select options.
9
+ *
10
+ * Props:
11
+ * - All standard Radix UI Checkbox props are supported (checked, onCheckedChange, disabled, etc.).
12
+ *
13
+ * Note: Supports focus states and disabled states.
14
+ * Based on Radix UI Checkbox primitive.
15
+ * Prefer using this component instead of @radix-ui/react-checkbox directly.
16
+ *
17
+ * Do NOT use Checkbox:
18
+ * - for radio button selection (use RadioGroup or Select component).
19
+ * - for toggle switches (use Switch component if available).
20
+ */
3
21
  declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
22
  export { Checkbox };