@vellumlabs/cexplorer-sdk 1.1.12 → 1.1.14
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/index.es.js +1 -1
- package/dist/stories/navigation/Pagination.stories.d.ts +1 -1
- package/dist/ui/delegatorsLabel/index.d.ts +10 -0
- package/dist/ui/delegatorsLabel/index.d.ts.map +1 -1
- package/dist/ui/displayVoteModal/index.d.ts +45 -0
- package/dist/ui/displayVoteModal/index.d.ts.map +1 -1
- package/dist/ui/exportTableModal/index.d.ts +35 -0
- package/dist/ui/exportTableModal/index.d.ts.map +1 -1
- package/dist/ui/featureModal/index.d.ts +20 -0
- package/dist/ui/featureModal/index.d.ts.map +1 -1
- package/dist/ui/funnelFilter/index.d.ts +11 -1
- package/dist/ui/funnelFilter/index.d.ts.map +1 -1
- package/dist/ui/globalSearch/components/GlobalSearchDropdown.d.ts +23 -0
- package/dist/ui/globalSearch/components/GlobalSearchDropdown.d.ts.map +1 -1
- package/dist/ui/globalSearch/components/GlobalSearchRecent.d.ts +16 -1
- package/dist/ui/globalSearch/components/GlobalSearchRecent.d.ts.map +1 -1
- package/dist/ui/globalSearch/index.d.ts +25 -0
- package/dist/ui/globalSearch/index.d.ts.map +1 -1
- package/dist/ui/globalTable/index.d.ts +9 -1
- package/dist/ui/globalTable/index.d.ts.map +1 -1
- package/dist/ui/governanceStatusBadge/index.d.ts +19 -1
- package/dist/ui/governanceStatusBadge/index.d.ts.map +1 -1
- package/dist/ui/header/index.d.ts +21 -1
- package/dist/ui/header/index.d.ts.map +1 -1
- package/dist/ui/jsonDisplay/index.d.ts +5 -0
- package/dist/ui/jsonDisplay/index.d.ts.map +1 -1
- package/dist/ui/noResultsFound/index.d.ts +18 -1
- package/dist/ui/noResultsFound/index.d.ts.map +1 -1
- package/dist/ui/pagination/components/PaginationEllipsis.d.ts +13 -2
- package/dist/ui/pagination/components/PaginationEllipsis.d.ts.map +1 -1
- package/dist/ui/pagination/components/PaginationNext.d.ts +13 -2
- package/dist/ui/pagination/components/PaginationNext.d.ts.map +1 -1
- package/dist/ui/pagination/components/PaginationPrevious.d.ts +13 -2
- package/dist/ui/pagination/components/PaginationPrevious.d.ts.map +1 -1
- package/dist/ui/pagination/index.d.ts +25 -1
- package/dist/ui/pagination/index.d.ts.map +1 -1
- package/dist/ui/safetyLinkModal/index.d.ts +15 -0
- package/dist/ui/safetyLinkModal/index.d.ts.map +1 -1
- package/dist/ui/sensitiveContentWarning/index.d.ts +11 -1
- package/dist/ui/sensitiveContentWarning/index.d.ts.map +1 -1
- package/dist/ui/stakeCell/index.d.ts +10 -1
- package/dist/ui/stakeCell/index.d.ts.map +1 -1
- package/dist/ui/tableSettingsDropdown/index.d.ts +5 -0
- package/dist/ui/tableSettingsDropdown/index.d.ts.map +1 -1
- package/dist/ui/votingBreakdownTooltip/index.d.ts +23 -88
- package/dist/ui/votingBreakdownTooltip/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Labels for pagination navigation elements
|
|
3
|
+
*/
|
|
4
|
+
export interface PaginationLabels {
|
|
5
|
+
/**
|
|
6
|
+
* Screen reader label for ellipsis
|
|
7
|
+
* @default "More pages"
|
|
8
|
+
*/
|
|
9
|
+
ellipsisSrLabel?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Accessible label for next button
|
|
12
|
+
* @default "Go to next page"
|
|
13
|
+
*/
|
|
14
|
+
nextAriaLabel?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Accessible label for previous button
|
|
17
|
+
* @default "Go to previous page"
|
|
18
|
+
*/
|
|
19
|
+
previousAriaLabel?: string;
|
|
20
|
+
}
|
|
1
21
|
/**
|
|
2
22
|
* Props for real pagination using TanStack Router navigation.
|
|
3
23
|
*
|
|
@@ -12,6 +32,8 @@ export type RealPaginationProps = {
|
|
|
12
32
|
totalPages: number;
|
|
13
33
|
/** Should not be provided for real pagination */
|
|
14
34
|
setCurrentPage?: never;
|
|
35
|
+
/** Labels for pagination navigation elements */
|
|
36
|
+
labels?: PaginationLabels;
|
|
15
37
|
};
|
|
16
38
|
/**
|
|
17
39
|
* Props for fake (controlled) pagination without router integration.
|
|
@@ -26,6 +48,8 @@ export type FakePaginationProps = {
|
|
|
26
48
|
totalPages: number;
|
|
27
49
|
/** State setter to update current page */
|
|
28
50
|
setCurrentPage: React.Dispatch<React.SetStateAction<number>>;
|
|
51
|
+
/** Labels for pagination navigation elements */
|
|
52
|
+
labels?: PaginationLabels;
|
|
29
53
|
};
|
|
30
54
|
/**
|
|
31
55
|
* Pagination component for navigating through multi-page data sets.
|
|
@@ -85,5 +109,5 @@ export type FakePaginationProps = {
|
|
|
85
109
|
* @param {React.Dispatch<React.SetStateAction<number>>} [props.setCurrentPage] - State setter for fake pagination
|
|
86
110
|
* @returns {JSX.Element} Complete pagination control with navigation and page jump
|
|
87
111
|
*/
|
|
88
|
-
export declare const Pagination: ({ currentPage, totalPages, setCurrentPage, }: RealPaginationProps | FakePaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
112
|
+
export declare const Pagination: ({ currentPage, totalPages, setCurrentPage, labels, }: RealPaginationProps | FakePaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
89
113
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/pagination/index.tsx"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,cAAc,CAAC,EAAE,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/pagination/index.tsx"],"names":[],"mappings":"AAaA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,cAAc,CAAC,EAAE,KAAK,CAAC;IACvB,gDAAgD;IAChD,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,gDAAgD;IAChD,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,eAAO,MAAM,UAAU,GAAI,sDAKxB,mBAAmB,GAAG,mBAAmB,4CAsI3C,CAAC"}
|
|
@@ -23,6 +23,21 @@ export interface SafetyLinkModalProps {
|
|
|
23
23
|
* />
|
|
24
24
|
*/
|
|
25
25
|
onClose: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Warning message displayed before the URL
|
|
28
|
+
* @default "You are switching to an external, unmoderated url: "
|
|
29
|
+
*/
|
|
30
|
+
warningText?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Label for the "Go back" button
|
|
33
|
+
* @default "Go back"
|
|
34
|
+
*/
|
|
35
|
+
goBackLabel?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Label for the "Visit" button/link
|
|
38
|
+
* @default "Visit"
|
|
39
|
+
*/
|
|
40
|
+
visitLabel?: string;
|
|
26
41
|
}
|
|
27
42
|
/**
|
|
28
43
|
* SafetyLinkModal displays a safety warning before redirecting users to external URLs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/safetyLinkModal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;;;;;;OASG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/safetyLinkModal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;;;;;;OASG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAiCpD,CAAC"}
|
|
@@ -44,6 +44,16 @@ export interface SensitiveContentWarningProps {
|
|
|
44
44
|
* />
|
|
45
45
|
*/
|
|
46
46
|
description?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Label for the "Remember this setting" checkbox
|
|
49
|
+
* @default "Remember this setting"
|
|
50
|
+
*/
|
|
51
|
+
rememberLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Label for the Display button
|
|
54
|
+
* @default "Display"
|
|
55
|
+
*/
|
|
56
|
+
displayLabel?: string;
|
|
47
57
|
}
|
|
48
58
|
/**
|
|
49
59
|
* SensitiveContentWarning displays a warning message before showing user-generated or sensitive content.
|
|
@@ -127,5 +137,5 @@ export interface SensitiveContentWarningProps {
|
|
|
127
137
|
* @param {string} [props.description] - Warning description text
|
|
128
138
|
* @returns {JSX.Element} A centered warning component with icon, text, checkbox, and display button
|
|
129
139
|
*/
|
|
130
|
-
export declare const SensitiveContentWarning: ({ onDisplay, localStorageKey, title, description, }: SensitiveContentWarningProps) => import("react/jsx-runtime").JSX.Element;
|
|
140
|
+
export declare const SensitiveContentWarning: ({ onDisplay, localStorageKey, title, description, rememberLabel, displayLabel, }: SensitiveContentWarningProps) => import("react/jsx-runtime").JSX.Element;
|
|
131
141
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/sensitiveContentWarning/index.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/sensitiveContentWarning/index.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AACH,eAAO,MAAM,uBAAuB,GAAI,kFAOrC,4BAA4B,4CA0C9B,CAAC"}
|
|
@@ -16,6 +16,14 @@ export interface StakeCellProps {
|
|
|
16
16
|
* <StakeCell stake={75000000000} maxStake={100000000000} />
|
|
17
17
|
*/
|
|
18
18
|
maxStake: number;
|
|
19
|
+
/**
|
|
20
|
+
* Text to display when stake or maxStake is not available
|
|
21
|
+
*
|
|
22
|
+
* @default "Unknown"
|
|
23
|
+
* @example
|
|
24
|
+
* <StakeCell stake={0} maxStake={0} unknownLabel="N/A" />
|
|
25
|
+
*/
|
|
26
|
+
unknownLabel?: string;
|
|
19
27
|
}
|
|
20
28
|
/**
|
|
21
29
|
* StakeCell displays Cardano stake amount in ADA with a visual progress bar showing percentage of maximum stake.
|
|
@@ -47,7 +55,8 @@ export interface StakeCellProps {
|
|
|
47
55
|
* @param {StakeCellProps} props - Component props
|
|
48
56
|
* @param {number} props.stake - Current stake amount in Lovelace (1 ADA = 1,000,000 Lovelace)
|
|
49
57
|
* @param {number} props.maxStake - Maximum stake amount in Lovelace used to calculate percentage
|
|
58
|
+
* @param {string} [props.unknownLabel="Unknown"] - Text to display when stake data is unavailable
|
|
50
59
|
* @returns {JSX.Element} Stake display in ADA with percentage and visual progress bar
|
|
51
60
|
*/
|
|
52
|
-
export declare const StakeCell: ({ stake, maxStake }: StakeCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare const StakeCell: ({ stake, maxStake, unknownLabel, }: StakeCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
62
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/stakeCell/index.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/stakeCell/index.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,SAAS,GAAI,oCAIvB,cAAc,4CAoBhB,CAAC"}
|
|
@@ -44,6 +44,11 @@ export type TableSettingsDropdownProps = {
|
|
|
44
44
|
* Custom inline styles for the dropdown panel
|
|
45
45
|
*/
|
|
46
46
|
customStyles?: CSSProperties;
|
|
47
|
+
/**
|
|
48
|
+
* Custom label for "Rows:" text (for i18n)
|
|
49
|
+
* @default "Rows:"
|
|
50
|
+
*/
|
|
51
|
+
rowsLabel?: string;
|
|
47
52
|
};
|
|
48
53
|
/**
|
|
49
54
|
* TableSettingsDropdown provides controls for table configuration.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/tableSettingsDropdown/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiB1D;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC;;;OAGG;IACH,cAAc,EAAE;QACd;;WAEG;QACH,KAAK,EAAE,SAAS,CAAC;QACjB;;WAEG;QACH,SAAS,EAAE,OAAO,CAAC;QACnB;;WAEG;QACH,OAAO,CAAC,EAAE,GAAG,CAAC;KACf,EAAE,CAAC;IACJ;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/tableSettingsDropdown/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiB1D;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC;;;OAGG;IACH,cAAc,EAAE;QACd;;WAEG;QACH,KAAK,EAAE,SAAS,CAAC;QACjB;;WAEG;QACH,SAAS,EAAE,OAAO,CAAC;QACnB;;WAEG;QACH,OAAO,CAAC,EAAE,GAAG,CAAC;KACf,EAAE,CAAC;IACJ;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAyFhE,CAAC"}
|
|
@@ -69,94 +69,29 @@ export interface VotingBreakdownTooltipProps {
|
|
|
69
69
|
* <VotingBreakdownTooltip voters={30} delegators={45} voterType="spo" />
|
|
70
70
|
*/
|
|
71
71
|
voterType?: "drep" | "spo";
|
|
72
|
+
/**
|
|
73
|
+
* Custom labels for text in the tooltip
|
|
74
|
+
*/
|
|
75
|
+
labels?: {
|
|
76
|
+
/** @default "voter" */
|
|
77
|
+
voterSingular?: string;
|
|
78
|
+
/** @default "voters" */
|
|
79
|
+
voterPlural?: string;
|
|
80
|
+
/** @default "Represented by" */
|
|
81
|
+
representedBy?: string;
|
|
82
|
+
/** @default "stake pool" */
|
|
83
|
+
stakePoolSingular?: string;
|
|
84
|
+
/** @default "stake pools" */
|
|
85
|
+
stakePoolPlural?: string;
|
|
86
|
+
/** @default "delegator" */
|
|
87
|
+
delegatorSingular?: string;
|
|
88
|
+
/** @default "delegators" */
|
|
89
|
+
delegatorPlural?: string;
|
|
90
|
+
/** @default "Auto stake:" */
|
|
91
|
+
autoStake?: string;
|
|
92
|
+
/** @default "Manual stake:" */
|
|
93
|
+
manualStake?: string;
|
|
94
|
+
};
|
|
72
95
|
}
|
|
73
|
-
/**
|
|
74
|
-
* VotingBreakdownTooltip displays detailed voting information in a tooltip with an info icon.
|
|
75
|
-
*
|
|
76
|
-
* This component provides a breakdown of voting data for blockchain governance, showing
|
|
77
|
-
* the number of voters, delegators (or stake pools), and stake distribution. For "Abstain"
|
|
78
|
-
* votes, it also displays the split between automatic and manual abstentions. The tooltip
|
|
79
|
-
* appears when hovering over an info icon, making it perfect for displaying supplementary
|
|
80
|
-
* voting details without cluttering the main UI.
|
|
81
|
-
*
|
|
82
|
-
* **Key Features:**
|
|
83
|
-
* - Shows voter count with singular/plural handling
|
|
84
|
-
* - Displays delegator or stake pool representation
|
|
85
|
-
* - Special handling for "Abstain" votes with auto/manual stake breakdown
|
|
86
|
-
* - Supports both DRep and SPO voting contexts
|
|
87
|
-
* - Info icon trigger for clean UI integration
|
|
88
|
-
*
|
|
89
|
-
* **Vote Types:**
|
|
90
|
-
* - **Yes/No**: Shows voters and delegators/pools
|
|
91
|
-
* - **Abstain**: Shows voters, delegators, auto stake, and manual stake
|
|
92
|
-
* - **No confidence**: Shows voters and delegators
|
|
93
|
-
* - **Not voted**: Shows representation data
|
|
94
|
-
*
|
|
95
|
-
* **Voter Types:**
|
|
96
|
-
* - **drep**: Uses "delegator/delegators" terminology
|
|
97
|
-
* - **spo**: Uses "stake pool/stake pools" terminology
|
|
98
|
-
*
|
|
99
|
-
* **Common Use Cases:**
|
|
100
|
-
* - Display voting breakdown in governance proposals
|
|
101
|
-
* - Show delegation representation in voting results
|
|
102
|
-
* - Explain abstention types (automatic vs manual)
|
|
103
|
-
* - Provide detailed voting statistics
|
|
104
|
-
* - Show SPO voting participation
|
|
105
|
-
* - Display DRep voting breakdown
|
|
106
|
-
*
|
|
107
|
-
* @component
|
|
108
|
-
* @example
|
|
109
|
-
* ```tsx
|
|
110
|
-
* // Basic DRep voting breakdown
|
|
111
|
-
* <VotingBreakdownTooltip
|
|
112
|
-
* voters={125}
|
|
113
|
-
* delegators={3500}
|
|
114
|
-
* type="Yes"
|
|
115
|
-
* />
|
|
116
|
-
* // Tooltip shows: "125 voters" and "Represented by 3,500 delegators"
|
|
117
|
-
*
|
|
118
|
-
* // SPO voting breakdown
|
|
119
|
-
* <VotingBreakdownTooltip
|
|
120
|
-
* voters={30}
|
|
121
|
-
* delegators={45}
|
|
122
|
-
* type="Yes"
|
|
123
|
-
* voterType="spo"
|
|
124
|
-
* />
|
|
125
|
-
* // Tooltip shows: "30 voters" and "Represented by 45 stake pools"
|
|
126
|
-
*
|
|
127
|
-
* // Abstain vote with stake breakdown
|
|
128
|
-
* <VotingBreakdownTooltip
|
|
129
|
-
* voters={50}
|
|
130
|
-
* delegators={1200}
|
|
131
|
-
* type="Abstain"
|
|
132
|
-
* autoStake={1500000}
|
|
133
|
-
* manualStake={500000}
|
|
134
|
-
* />
|
|
135
|
-
* // Tooltip shows voters, delegators, auto stake, and manual stake
|
|
136
|
-
*
|
|
137
|
-
* // Single voter (singular form)
|
|
138
|
-
* <VotingBreakdownTooltip
|
|
139
|
-
* voters={1}
|
|
140
|
-
* delegators={15}
|
|
141
|
-
* type="No"
|
|
142
|
-
* />
|
|
143
|
-
* // Tooltip shows: "1 voter" and "Represented by 15 delegators"
|
|
144
|
-
*
|
|
145
|
-
* // In a voting result display
|
|
146
|
-
* <div className="flex items-center">
|
|
147
|
-
* <span>Yes: 125 votes</span>
|
|
148
|
-
* <VotingBreakdownTooltip voters={125} delegators={3500} type="Yes" />
|
|
149
|
-
* </div>
|
|
150
|
-
* ```
|
|
151
|
-
*
|
|
152
|
-
* @param {VotingBreakdownTooltipProps} props - Component props
|
|
153
|
-
* @param {number} [props.voters] - Number of voters who cast this vote
|
|
154
|
-
* @param {number} [props.delegators] - Number of delegators or stake pools represented
|
|
155
|
-
* @param {number} [props.autoStake] - Automatic abstention stake (Abstain only)
|
|
156
|
-
* @param {number} [props.manualStake] - Manual abstention stake (Abstain only)
|
|
157
|
-
* @param {"Abstain" | "No confidence" | "Yes" | "No" | "Not voted"} [props.type] - Vote type
|
|
158
|
-
* @param {"drep" | "spo"} [props.voterType="drep"] - Type of voter (DRep or SPO)
|
|
159
|
-
* @returns {JSX.Element} Info icon with voting breakdown tooltip
|
|
160
|
-
*/
|
|
161
96
|
export declare const VotingBreakdownTooltip: FC<VotingBreakdownTooltipProps>;
|
|
162
97
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/votingBreakdownTooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,eAAe,GAAG,KAAK,GAAG,IAAI,GAAG,WAAW,CAAC;IAEhE;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/votingBreakdownTooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,eAAe,GAAG,KAAK,GAAG,IAAI,GAAG,WAAW,CAAC;IAEhE;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE;QACP,uBAAuB;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,wBAAwB;QACxB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,gCAAgC;QAChC,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,4BAA4B;QAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,6BAA6B;QAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,2BAA2B;QAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,4BAA4B;QAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,6BAA6B;QAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,+BAA+B;QAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAsGD,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAsDlE,CAAC"}
|