@xdcs-protocol/ui-kit 1.0.1 → 1.0.3

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.
@@ -1,10 +1,2 @@
1
- export declare const boldSx: {
2
- fontFamily: string;
3
- fontWeight: number;
4
- fontSize: string;
5
- lineHeight: string;
6
- letterSpacing: string;
7
- mb: number;
8
- };
9
1
  declare const LeftPanel: () => import("react/jsx-runtime").JSX.Element;
10
2
  export default LeftPanel;
@@ -0,0 +1,10 @@
1
+ export interface NewTanstacktableProps {
2
+ title?: string;
3
+ data: any[];
4
+ columns: any;
5
+ rowSize?: number;
6
+ showSearchField?: boolean;
7
+ showCardFooter?: boolean;
8
+ }
9
+ declare const NewTanstacktable: ({ title, data, columns, rowSize, showSearchField, showCardFooter, }: NewTanstacktableProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default NewTanstacktable;
@@ -0,0 +1,2 @@
1
+ declare const ROICalculatorCard: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ROICalculatorCard;
@@ -0,0 +1,2 @@
1
+ declare const StakingAPYCard: () => import("react/jsx-runtime").JSX.Element;
2
+ export default StakingAPYCard;
@@ -1,2 +1,2 @@
1
- declare const StyledSlider: import("@emotion/styled").StyledComponent<import("@mui/material").SliderOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "components" | "disabled" | "className" | "style" | "classes" | "sx" | "track" | "defaultValue" | "tabIndex" | "color" | "aria-label" | "aria-labelledby" | "aria-valuetext" | "onChange" | "scale" | "size" | "name" | "value" | "slots" | "slotProps" | "orientation" | "max" | "min" | "componentsProps" | "disableSwap" | "getAriaLabel" | "getAriaValueText" | "marks" | "onChangeCommitted" | "shiftStep" | "step" | "valueLabelDisplay" | "valueLabelFormat"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
1
+ declare const StyledSlider: import("@emotion/styled").StyledComponent<import("@mui/material").SliderOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "components" | "disabled" | "className" | "style" | "classes" | "color" | "scale" | "sx" | "track" | "defaultValue" | "tabIndex" | "aria-label" | "aria-labelledby" | "aria-valuetext" | "onChange" | "size" | "name" | "value" | "slots" | "slotProps" | "orientation" | "max" | "min" | "componentsProps" | "disableSwap" | "getAriaLabel" | "getAriaValueText" | "marks" | "onChangeCommitted" | "shiftStep" | "step" | "valueLabelDisplay" | "valueLabelFormat"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
2
2
  export default StyledSlider;
@@ -0,0 +1,2 @@
1
+ declare const ValidStatsCard: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ValidStatsCard;
@@ -1,8 +1 @@
1
- export declare const regularSx: {
2
- fontFamily: string;
3
- fontWeight: number;
4
- fontStyle: string;
5
- lineHeight: string;
6
- letterSpacing: string;
7
- };
8
1
  export default function XDCLiquidStaking(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const CardFooter: () => import("react/jsx-runtime").JSX.Element;
@@ -14,5 +14,5 @@ export interface AddressFieldToolsProps {
14
14
  onOpenExplorer?: (url: string) => void;
15
15
  onAddToWallet?: () => Promise<void> | void;
16
16
  }
17
- declare const AddressFieldTools: ({ address, showAddress, showCopyButton, showInBlockExplorer, withBackground, isTransaction, showAddToWallet, shrinkAddress, chainId, onCopy, onOpenExplorer, onAddToWallet, }: AddressFieldToolsProps) => import("react/jsx-runtime").JSX.Element;
17
+ declare const AddressFieldTools: ({ address: rawAddress, showAddress, showCopyButton, showInBlockExplorer, withBackground, isTransaction, showAddToWallet, shrinkAddress, chainId, onCopy, onOpenExplorer, onAddToWallet, }: AddressFieldToolsProps) => import("react/jsx-runtime").JSX.Element;
18
18
  export default AddressFieldTools;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * A React component that displays a message indicating that no data is available.
3
+ *
4
+ * It renders an image with a semi-transparent opacity and an optional custom style.
5
+ *
6
+ * @param {object} props - The component props.
7
+ * @param {object} [props.sx] - Optional custom style for the image.
8
+ *
9
+ * @example
10
+ * import React from 'react';
11
+ * import DataNotAvailable from './DataNotAvailable';
12
+ *
13
+ * const MyComponent = () => {
14
+ * return (
15
+ * <DataNotAvailable sx={{ width: 200, height: 200 }} />
16
+ * );
17
+ * };
18
+ *
19
+ * @returns {React.ReactElement} A React element representing the "no data available" message.
20
+ */
21
+ declare const DataNotAvailable: ({ sx }: {
22
+ sx?: any;
23
+ }) => import("react/jsx-runtime").JSX.Element;
24
+ export default DataNotAvailable;
@@ -0,0 +1 @@
1
+ export declare function formatNumberWithSuffix(n: number): string;
@@ -0,0 +1,13 @@
1
+ export default function useRightPanel(): {
2
+ xdcSupply: string | null;
3
+ xdcSupplyRaw: number | null;
4
+ tvlUSD: string | null;
5
+ apys: {
6
+ LSD_APY?: string;
7
+ ANCHOR_APY?: string;
8
+ NATIVE_APY?: string;
9
+ PRIVATE_APY?: string;
10
+ PRFI_LIQUID_APY?: string;
11
+ XDC_TO_USD_RATE?: string;
12
+ };
13
+ };
@@ -1,8 +1,11 @@
1
1
  import LeftPanel from "./components/LeftPanel";
2
2
  import MainLayout from "./components/MainLayout";
3
+ import NewTanstacktable from "./components/NewTanstacktable";
3
4
  export { LeftPanel };
4
5
  export { getTheme } from "./theme";
5
6
  export { MainLayout as ValidProtocolLayout };
6
7
  export { useThemeStore } from "./components/store/useThemeStore";
7
8
  export type { WalletStoreState } from "./types/WalletStore";
8
9
  export { WalletStoreContext, useWalletStore } from "./hooks/useWalletContext";
10
+ export { textStyles } from "./theme";
11
+ export { NewTanstacktable };
@@ -1,2 +1,17 @@
1
1
  import type { PaletteMode } from "@mui/material";
2
2
  export declare const getTheme: (mode: PaletteMode) => import("@mui/material").Theme;
3
+ export declare const textStyles: {
4
+ boldSx: {
5
+ fontFamily: string;
6
+ fontWeight: number;
7
+ lineHeight: string;
8
+ letterSpacing: string;
9
+ };
10
+ regularSx: {
11
+ fontFamily: string;
12
+ fontWeight: number;
13
+ fontStyle: string;
14
+ lineHeight: string;
15
+ letterSpacing: string;
16
+ };
17
+ };
@@ -3,15 +3,41 @@ export interface WalletStoreState {
3
3
  balance: number;
4
4
  wallet: any;
5
5
  logoUrl: string;
6
- liquidStakingUrl?: string;
7
- nativeStakingUrl?: string;
8
- anchorStakingUrl?: string;
9
- privateStakingUrl?: string;
10
- prfiLiquidStakingUrl?: string;
11
- bridgeUrl?: string;
12
- masternodeDashboardUrl?: string;
13
- defiDashboardUrl?: string;
6
+ liquidStakingUrl?: {
7
+ url: string;
8
+ path?: string[];
9
+ };
10
+ nativeStakingUrl?: {
11
+ url: string;
12
+ path?: string[];
13
+ };
14
+ anchorStakingUrl?: {
15
+ url: string;
16
+ path?: string[];
17
+ };
18
+ privateStakingUrl?: {
19
+ url: string;
20
+ path?: string[];
21
+ };
22
+ prfiLiquidStakingUrl?: {
23
+ url: string;
24
+ path?: string[];
25
+ };
26
+ bridgeUrl?: {
27
+ url: string;
28
+ path?: string[];
29
+ };
30
+ masternodeDashboardUrl?: {
31
+ url: string;
32
+ path?: string[];
33
+ };
34
+ defiDashboardUrl?: {
35
+ url: string;
36
+ path?: string[];
37
+ };
14
38
  docsUrl?: string;
39
+ validBackendUrl: string;
40
+ validGraphqlUrl: string;
15
41
  isSupported: boolean;
16
42
  onConnect: () => Promise<void>;
17
43
  onDisconnect: () => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xdcs-protocol/ui-kit",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Common React components library.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -42,8 +42,9 @@
42
42
  "react-hot-toast": "^2.6.0",
43
43
  "react-query": "^3.39.3",
44
44
  "react-router-dom": "^6.24.0",
45
+ "web3-utils": "^4.3.1",
45
46
  "zustand": "^4.5.2",
46
- "web3-utils": "^4.3.1"
47
+ "@tanstack/react-table": "^8.21.3"
47
48
  },
48
49
  "devDependencies": {
49
50
  "@chromatic-com/storybook": "^4.1.1",
@@ -77,7 +78,8 @@
77
78
  "typescript-eslint": "^8.30.1",
78
79
  "vite": "^6.3.5",
79
80
  "vitest": "^3.2.4",
80
- "web3-utils": "^4.3.1"
81
+ "web3-utils": "^4.3.1",
82
+ "@tanstack/react-table": "^8.21.3"
81
83
  },
82
84
  "dependencies": {}
83
85
  }