@aragon/gov-ui-kit 1.0.54 → 1.0.56

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 (99) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/build.css +2 -2
  3. package/dist/index.es.js +1 -1
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/types/.storybook/main.d.ts +3 -0
  6. package/dist/types/.storybook/manager.d.ts +1 -0
  7. package/dist/types/.storybook/preview.d.ts +5 -0
  8. package/dist/types/.storybook/theme.d.ts +2 -0
  9. package/dist/types/src/core/components/avatars/avatar/avatar.d.ts +1 -1
  10. package/dist/types/src/core/components/dialogs/dialogUtils.d.ts +25 -27
  11. package/dist/types/src/core/components/illustrations/illustrationObject/index.d.ts +1 -1
  12. package/dist/types/src/core/index.d.ts +1 -1
  13. package/dist/types/src/core/types/index.d.ts +1 -1
  14. package/dist/types/src/modules/assets/copy/modulesCopy.d.ts +18 -14
  15. package/dist/types/src/modules/components/dao/daoDataListItem/daoDataListItemStructure/daoDataListItemStructure.d.ts +0 -5
  16. package/dist/types/src/modules/components/proposal/proposalActions/index.d.ts +12 -5
  17. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsContainer/index.d.ts +1 -0
  18. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsContainer/proposalActionsContainer.d.ts +8 -0
  19. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsContext/index.d.ts +1 -0
  20. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsContext/proposalActionsContext.d.ts +21 -0
  21. package/dist/types/src/modules/components/proposal/proposalActions/{proposalActionsTypes/proposalAction.d.ts → proposalActionsDefinitions.d.ts} +22 -0
  22. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsFooter/index.d.ts +1 -0
  23. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsFooter/proposalActionsFooter.d.ts +4 -0
  24. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItem/index.d.ts +2 -0
  25. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItem.api.d.ts +35 -0
  26. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItem.d.ts +8 -0
  27. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItemBasicView/index.d.ts +1 -0
  28. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItemBasicView/proposalActionsItemBasicView.d.ts +8 -0
  29. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItemDecodedView/index.d.ts +1 -0
  30. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItemDecodedView/proposalActionsItemDecodedView.d.ts +8 -0
  31. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItemRawView/index.d.ts +1 -0
  32. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItemRawView/proposalActionsItemRawView.d.ts +8 -0
  33. package/dist/types/src/modules/components/proposal/proposalActions/{proposalActionsUtils.d.ts → proposalActionsItem/proposalActionsItemUtils.d.ts} +5 -3
  34. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionChangeMembers/index.d.ts +3 -0
  35. package/dist/types/src/modules/components/proposal/proposalActions/{proposalActionsTypes/proposalActionChangeMembers.d.ts → proposalActionsList/proposalActionChangeMembers/proposalActionChangeMembers.api.d.ts} +4 -3
  36. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionChangeMembers/proposalActionChangeMembers.d.ts +2 -0
  37. package/dist/types/src/modules/components/proposal/proposalActions/{actions/generators/proposalActionChangeMembers.d.ts → proposalActionsList/proposalActionChangeMembers/proposalActionChangeMembers.testUtils.d.ts} +1 -1
  38. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionChangeSettings/index.d.ts +3 -0
  39. package/dist/types/src/modules/components/proposal/proposalActions/{proposalActionsTypes/proposalActionChangeSettings.d.ts → proposalActionsList/proposalActionChangeSettings/proposalActionChangeSettings.api.d.ts} +3 -1
  40. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionChangeSettings/proposalActionChangeSettings.d.ts +2 -0
  41. package/dist/types/src/modules/components/proposal/proposalActions/{actions/generators/proposalActionChangeSettings.d.ts → proposalActionsList/proposalActionChangeSettings/proposalActionChangeSettings.testUtils.d.ts} +1 -1
  42. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionTokenMint/index.d.ts +3 -0
  43. package/dist/types/src/modules/components/proposal/proposalActions/{proposalActionsTypes/proposalActionTokenMint.d.ts → proposalActionsList/proposalActionTokenMint/proposalActionTokenMint.api.d.ts} +4 -3
  44. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionTokenMint/proposalActionTokenMint.d.ts +2 -0
  45. package/dist/types/src/modules/components/proposal/proposalActions/{actions/generators/proposalActionTokenMint.d.ts → proposalActionsList/proposalActionTokenMint/proposalActionTokenMint.testUtils.d.ts} +1 -1
  46. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionUpdateMetadata/index.d.ts +3 -0
  47. package/dist/types/src/modules/components/proposal/proposalActions/{proposalActionsTypes/proposalActionUpdateMetadata.d.ts → proposalActionsList/proposalActionUpdateMetadata/proposalActionUpdateMetadata.api.d.ts} +3 -2
  48. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionUpdateMetadata/proposalActionUpdateMetadata.d.ts +2 -0
  49. package/dist/types/src/modules/components/proposal/proposalActions/{actions/generators/proposalActionUpdateMetadata.d.ts → proposalActionsList/proposalActionUpdateMetadata/proposalActionUpdateMetadata.testUtils.d.ts} +1 -1
  50. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionWithdrawToken/index.d.ts +3 -0
  51. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionWithdrawToken/proposalActionWithdrawToken.api.d.ts +48 -0
  52. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionWithdrawToken/proposalActionWithdrawToken.d.ts +2 -0
  53. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionWithdrawToken/proposalActionWithdrawToken.testUtils.d.ts +2 -0
  54. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsRoot/index.d.ts +1 -0
  55. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsRoot/proposalActionsRoot.d.ts +11 -0
  56. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsTestUtils.d.ts +4 -0
  57. package/dist/types/src/modules/components/proposal/proposalDataListItem/proposalDataListItemStructure/index.d.ts +1 -1
  58. package/dist/types/src/modules/components/proposal/proposalVoting/proposalVotingContainer/proposalVotingContainer.d.ts +2 -10
  59. package/dist/types/src/modules/components/proposal/proposalVoting/proposalVotingStage/proposalVotingStage.d.ts +0 -4
  60. package/dist/types/src/modules/components/transaction/transactionDataListItem/transactionDataListItemStructure/transactionDataListItemStructure.api.d.ts +6 -10
  61. package/dist/types/src/modules/components/vote/voteDataListItem/voteDataListItemStructure/voteDataListItemStructure.d.ts +4 -0
  62. package/dist/types/src/modules/index.d.ts +1 -1
  63. package/dist/types/src/modules/types/index.d.ts +2 -2
  64. package/package.json +34 -34
  65. package/src/core/components/index.css +0 -1
  66. package/dist/types/src/modules/components/proposal/proposalActions/actions/generators/index.d.ts +0 -6
  67. package/dist/types/src/modules/components/proposal/proposalActions/actions/generators/proposalAction.d.ts +0 -2
  68. package/dist/types/src/modules/components/proposal/proposalActions/actions/generators/proposalActionWithdrawToken.d.ts +0 -3
  69. package/dist/types/src/modules/components/proposal/proposalActions/actions/proposalActionChangeMembers/index.d.ts +0 -1
  70. package/dist/types/src/modules/components/proposal/proposalActions/actions/proposalActionChangeMembers/proposalActionChangeMembers.d.ts +0 -4
  71. package/dist/types/src/modules/components/proposal/proposalActions/actions/proposalActionChangeSettings/index.d.ts +0 -1
  72. package/dist/types/src/modules/components/proposal/proposalActions/actions/proposalActionChangeSettings/proposalActionChangeSettings.d.ts +0 -4
  73. package/dist/types/src/modules/components/proposal/proposalActions/actions/proposalActionTokenMint/index.d.ts +0 -1
  74. package/dist/types/src/modules/components/proposal/proposalActions/actions/proposalActionTokenMint/proposalActionTokenMint.d.ts +0 -4
  75. package/dist/types/src/modules/components/proposal/proposalActions/actions/proposalActionUpdateMetadata/index.d.ts +0 -1
  76. package/dist/types/src/modules/components/proposal/proposalActions/actions/proposalActionUpdateMetadata/proposalActionUpdateMetadata.d.ts +0 -4
  77. package/dist/types/src/modules/components/proposal/proposalActions/actions/proposalActionWithdrawToken/index.d.ts +0 -1
  78. package/dist/types/src/modules/components/proposal/proposalActions/actions/proposalActionWithdrawToken/proposalActionWithdrawToken.d.ts +0 -4
  79. package/dist/types/src/modules/components/proposal/proposalActions/proposalActions/index.d.ts +0 -2
  80. package/dist/types/src/modules/components/proposal/proposalActions/proposalActions/proposalActions.api.d.ts +0 -53
  81. package/dist/types/src/modules/components/proposal/proposalActions/proposalActions/proposalActions.d.ts +0 -3
  82. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsAction/index.d.ts +0 -1
  83. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsAction.d.ts +0 -26
  84. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionDecodedView/index.d.ts +0 -1
  85. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionDecodedView/proposalActionsActionDecodedView.d.ts +0 -8
  86. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionRawView/index.d.ts +0 -1
  87. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionRawView/proposalActionsActionRawView.d.ts +0 -8
  88. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionViewAsMenu/index.d.ts +0 -1
  89. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionViewAsMenu/proposalActionsActionViewAsMenu.d.ts +0 -20
  90. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsActionVerification/index.d.ts +0 -1
  91. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsActionVerification/proposalActionsActionVerification.d.ts +0 -9
  92. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsTypes/index.d.ts +0 -9
  93. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsTypes/proposalActionComponent.d.ts +0 -14
  94. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsTypes/proposalActionType.d.ts +0 -9
  95. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsTypes/proposalActionViewMode.d.ts +0 -5
  96. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsTypes/proposalActionWithdrawToken.d.ts +0 -50
  97. package/src/core/components/accordion/accordionItemContent/index.css +0 -21
  98. package/src/core/components/accordion/index.css +0 -1
  99. /package/dist/types/src/modules/components/proposal/proposalActions/{actions → proposalActionsList}/index.d.ts +0 -0
@@ -0,0 +1,3 @@
1
+ import type { StorybookConfig } from '@storybook/react-webpack5';
2
+ declare const config: StorybookConfig;
3
+ export default config;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { Preview } from '@storybook/react';
2
+ import '../index.css';
3
+ import './style.css';
4
+ declare const preview: Preview;
5
+ export default preview;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@storybook/theming").ThemeVars;
2
+ export default _default;
@@ -1,7 +1,7 @@
1
1
  import type React from 'react';
2
2
  import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
3
3
  import { type ResponsiveAttribute } from '../../../types';
4
- export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
4
+ export type AvatarSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
5
5
  export interface IAvatarProps extends ComponentPropsWithoutRef<'img'> {
6
6
  /**
7
7
  * Fallback content to display when the image fails to load or no image is provided.
@@ -1,31 +1,29 @@
1
- export declare class DialogUtils {
2
- static readonly overlayAnimationVariants: {
3
- closed: {
4
- opacity: number;
5
- };
6
- open: {
7
- opacity: number;
8
- };
1
+ export declare const dialogOverlayAnimationVariants: {
2
+ closed: {
3
+ opacity: number;
9
4
  };
10
- static readonly contentAnimationVariants: {
11
- closed: {
12
- opacity: number;
13
- scale: number;
14
- y: number;
15
- };
16
- open: {
17
- opacity: number;
18
- scale: number;
19
- y: number;
20
- transition: {
21
- duration: number;
22
- };
5
+ open: {
6
+ opacity: number;
7
+ };
8
+ };
9
+ export declare const dialogContentAnimationVariants: {
10
+ closed: {
11
+ opacity: number;
12
+ scale: number;
13
+ y: number;
14
+ };
15
+ open: {
16
+ opacity: number;
17
+ scale: number;
18
+ y: number;
19
+ transition: {
20
+ duration: number;
23
21
  };
24
- exit: {
25
- opacity: number;
26
- transition: {
27
- duration: number;
28
- };
22
+ };
23
+ exit: {
24
+ opacity: number;
25
+ transition: {
26
+ duration: number;
29
27
  };
30
28
  };
31
- }
29
+ };
@@ -1,2 +1,2 @@
1
1
  export { IllustrationObject, type IIllustrationObjectProps } from './illustrationObject';
2
- export { IllustrationObjectType } from './illustrationObjectType';
2
+ export type { IllustrationObjectType } from './illustrationObjectType';
@@ -1,5 +1,5 @@
1
1
  export * from './assets';
2
2
  export * from './components';
3
3
  export * from './hooks';
4
- export * from './types';
4
+ export type * from './types';
5
5
  export * from './utils';
@@ -1 +1 @@
1
- export * from './responsive';
1
+ export type * from './responsive';
@@ -26,34 +26,37 @@ export declare const modulesCopy: {
26
26
  stage: string;
27
27
  };
28
28
  proposalActionsContainer: {
29
+ emptyHeader: string;
30
+ };
31
+ proposalActionsFooter: {
29
32
  collapse: string;
30
33
  expand: string;
31
- empty: {
32
- heading: string;
33
- };
34
34
  };
35
- proposalActionsAction: {
35
+ proposalActionsItem: {
36
36
  dropdownLabel: string;
37
- notVerified: string;
38
37
  nativeSendAlert: string;
39
38
  nativeSendDescription: (amount: string) => string;
39
+ notVerified: {
40
+ function: string;
41
+ contract: string;
42
+ };
43
+ menu: {
44
+ BASIC: string;
45
+ dropdownLabel: string;
46
+ DECODED: string;
47
+ RAW: string;
48
+ };
40
49
  };
41
- proposalActionsActionDecodedView: {
50
+ proposalActionsItemDecodedView: {
42
51
  valueHelper: string;
43
52
  valueLabel: string;
44
53
  };
45
- proposalActionsActionRawView: {
54
+ proposalActionsItemRawView: {
46
55
  to: string;
47
56
  data: string;
48
57
  value: string;
49
58
  copyButton: string;
50
59
  };
51
- proposalActionsActionViewAsMenu: {
52
- basic: string;
53
- dropdownLabel: string;
54
- decoded: string;
55
- raw: string;
56
- };
57
60
  proposalActionChangeMembers: {
58
61
  summary: string;
59
62
  added: string;
@@ -115,7 +118,7 @@ export declare const modulesCopy: {
115
118
  };
116
119
  proposalVotingBreakdownMultisig: {
117
120
  name: string;
118
- description: (count: string | null) => string;
121
+ description: (count: string) => string;
119
122
  };
120
123
  proposalVotingBreakdownToken: {
121
124
  option: {
@@ -163,6 +166,7 @@ export declare const modulesCopy: {
163
166
  voteDataListItemStructure: {
164
167
  yourDelegate: string;
165
168
  you: string;
169
+ voted: string;
166
170
  };
167
171
  voteProposalDataListItemStructure: {
168
172
  voted: string;
@@ -21,11 +21,6 @@ export type IDaoDataListItemStructureProps = IDataListItemProps & {
21
21
  * The ENS (Ethereum Name Service) address of the DAO.
22
22
  */
23
23
  ens?: string;
24
- /**
25
- * The plugin used by the DAO.
26
- * @default token-based
27
- */
28
- plugin?: string;
29
24
  /**
30
25
  * The network on which the DAO operates.
31
26
  */
@@ -1,5 +1,12 @@
1
- export * from './actions';
2
- export * from './proposalActions';
3
- export * from './proposalActionsAction';
4
- export * from './proposalActionsTypes';
5
- export { proposalActionsUtils } from './proposalActionsUtils';
1
+ export declare const ProposalActions: {
2
+ Root: import("react").FC<import("./proposalActionsRoot").IProposalActionsRootProps>;
3
+ Container: import("react").FC<import("./proposalActionsContainer").IProposalActionsContainerProps>;
4
+ Item: <TAction extends import("./proposalActionsDefinitions").IProposalAction = import("./proposalActionsDefinitions").IProposalAction>(props: import("./proposalActionsItem").IProposalActionsItemProps<TAction>) => import("react/jsx-runtime").JSX.Element;
5
+ Footer: import("react").FC<import("./proposalActionsFooter").IProposalActionsFooterProps>;
6
+ };
7
+ export * from './proposalActionsContainer';
8
+ export * from './proposalActionsDefinitions';
9
+ export * from './proposalActionsFooter';
10
+ export * from './proposalActionsItem';
11
+ export * from './proposalActionsList';
12
+ export * from './proposalActionsRoot';
@@ -0,0 +1 @@
1
+ export { ProposalActionsContainer, type IProposalActionsContainerProps } from './proposalActionsContainer';
@@ -0,0 +1,8 @@
1
+ import React, { type ComponentProps } from 'react';
2
+ export interface IProposalActionsContainerProps extends Omit<ComponentProps<'div'>, 'defaultValue'> {
3
+ /**
4
+ * Custom description for the empty state.
5
+ */
6
+ emptyStateDescription: string;
7
+ }
8
+ export declare const ProposalActionsContainer: React.FC<IProposalActionsContainerProps>;
@@ -0,0 +1 @@
1
+ export { ProposalActionsContextProvider, proposalActionsContext, useProposalActionsContext, type IProposalActionsContext, } from './proposalActionsContext';
@@ -0,0 +1,21 @@
1
+ export interface IProposalActionsContext {
2
+ /**
3
+ * Total number of proposal actions.
4
+ */
5
+ actionsCount: number;
6
+ /**
7
+ * Callback used to update the actions count.
8
+ */
9
+ setActionsCount: (count: number) => void;
10
+ /**
11
+ * List of the expanded actions ids.
12
+ */
13
+ expandedActions: string[];
14
+ /**
15
+ * Callback used to update the current expanded actions.
16
+ */
17
+ setExpandedActions: (items: string[]) => void;
18
+ }
19
+ export declare const proposalActionsContext: import("react").Context<IProposalActionsContext | null>;
20
+ export declare const ProposalActionsContextProvider: import("react").Provider<IProposalActionsContext | null>;
21
+ export declare const useProposalActionsContext: () => IProposalActionsContext;
@@ -1,3 +1,14 @@
1
+ import type { ComponentType } from 'react';
2
+ import type { IWeb3ComponentProps } from '../../../types';
3
+ export declare enum ProposalActionType {
4
+ WITHDRAW_TOKEN = "WITHDRAW_TOKEN",
5
+ ADD_MEMBERS = "ADD_MEMBERS",
6
+ REMOVE_MEMBERS = "REMOVE_MEMBERS",
7
+ UPDATE_METADATA = "UPDATE_METADATA",
8
+ TOKEN_MINT = "TOKEN_MINT",
9
+ CHANGE_SETTINGS_MULTISIG = "CHANGE_SETTINGS_MULTISIG",
10
+ CHANGE_SETTINGS_TOKENVOTE = "CHANGE_SETTINGS_TOKENVOTE"
11
+ }
1
12
  export interface IProposalActionInputDataParameter {
2
13
  /**
3
14
  * The name of the parameter being passed.
@@ -56,3 +67,14 @@ export interface IProposalAction {
56
67
  */
57
68
  inputData: IProposalActionInputData | null;
58
69
  }
70
+ export interface IProposalActionComponentProps<TAction extends IProposalAction = IProposalAction> extends IWeb3ComponentProps {
71
+ /**
72
+ * Action to be rendered.
73
+ */
74
+ action: TAction;
75
+ /**
76
+ * Index of the action.
77
+ */
78
+ index: number;
79
+ }
80
+ export type ProposalActionComponent<TAction extends IProposalAction = IProposalAction> = ComponentType<IProposalActionComponentProps<TAction>>;
@@ -0,0 +1 @@
1
+ export { ProposalActionsFooter, type IProposalActionsFooterProps } from './proposalActionsFooter';
@@ -0,0 +1,4 @@
1
+ import type { ComponentProps } from 'react';
2
+ export interface IProposalActionsFooterProps extends ComponentProps<'div'> {
3
+ }
4
+ export declare const ProposalActionsFooter: React.FC<IProposalActionsFooterProps>;
@@ -0,0 +1,2 @@
1
+ export { ProposalActionsItem } from './proposalActionsItem';
2
+ export type { IProposalActionsItemDropdownItem, IProposalActionsItemProps } from './proposalActionsItem.api';
@@ -0,0 +1,35 @@
1
+ import type { IconType } from '../../../../../core';
2
+ import type { IWeb3ComponentProps } from '../../../../types';
3
+ import type { IProposalAction, ProposalActionComponent } from '../proposalActionsDefinitions';
4
+ export interface IProposalActionsItemDropdownItem<TAction extends IProposalAction = IProposalAction> {
5
+ /**
6
+ * Label of the item.
7
+ */
8
+ label: string;
9
+ /**
10
+ * Icon of the item.
11
+ */
12
+ icon: IconType;
13
+ /**
14
+ * Callback called with the current action and its index on item click.
15
+ */
16
+ onClick: (action: TAction, index: number) => void;
17
+ }
18
+ export interface IProposalActionsItemProps<TAction extends IProposalAction = IProposalAction> extends IWeb3ComponentProps {
19
+ /**
20
+ * Proposal action to be rendered.
21
+ */
22
+ action: TAction;
23
+ /**
24
+ * Index of the action injected by the <ProposalActions.Container /> component.
25
+ */
26
+ index?: number;
27
+ /**
28
+ * Custom component for the action to be rendered on BASIC view.
29
+ */
30
+ CustomComponent?: ProposalActionComponent<TAction>;
31
+ /**
32
+ * Items displayed beside the "View as" menu.
33
+ */
34
+ dropdownItems?: Array<IProposalActionsItemDropdownItem<TAction>>;
35
+ }
@@ -0,0 +1,8 @@
1
+ import type { IProposalAction } from '../proposalActionsDefinitions';
2
+ import type { IProposalActionsItemProps } from './proposalActionsItem.api';
3
+ export declare enum ProposalActionViewMode {
4
+ BASIC = "BASIC",
5
+ DECODED = "DECODED",
6
+ RAW = "RAW"
7
+ }
8
+ export declare const ProposalActionsItem: <TAction extends IProposalAction = IProposalAction>(props: IProposalActionsItemProps<TAction>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { ProposalActionsItemBasicView, type IProposalActionsItemBasicViewProps } from './proposalActionsItemBasicView';
@@ -0,0 +1,8 @@
1
+ import type { IProposalAction, IProposalActionComponentProps, ProposalActionComponent } from '../../proposalActionsDefinitions';
2
+ export interface IProposalActionsItemBasicViewProps<TAction extends IProposalAction = IProposalAction> extends IProposalActionComponentProps<TAction> {
3
+ /**
4
+ * Custom component to be rendered.
5
+ */
6
+ CustomComponent?: ProposalActionComponent<TAction>;
7
+ }
8
+ export declare const ProposalActionsItemBasicView: <TAction extends IProposalAction = IProposalAction>(props: IProposalActionsItemBasicViewProps<TAction>) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export { ProposalActionsItemDecodedView, type IProposalActionsItemDecodedViewProps, } from './proposalActionsItemDecodedView';
@@ -0,0 +1,8 @@
1
+ import type { IProposalAction } from '../../proposalActionsDefinitions';
2
+ export interface IProposalActionsItemDecodedViewProps {
3
+ /**
4
+ * Proposal action to render decoded view for.
5
+ */
6
+ action: IProposalAction;
7
+ }
8
+ export declare const ProposalActionsItemDecodedView: React.FC<IProposalActionsItemDecodedViewProps>;
@@ -0,0 +1 @@
1
+ export { ProposalActionsItemRawView, type IProposalActionsItemRawViewProps } from './proposalActionsItemRawView';
@@ -0,0 +1,8 @@
1
+ import type { IProposalAction } from '../../proposalActionsDefinitions';
2
+ export interface IProposalActionsItemRawViewProps {
3
+ /**
4
+ * Proposal action to render the raw view for.
5
+ */
6
+ action: IProposalAction;
7
+ }
8
+ export declare const ProposalActionsItemRawView: React.FC<IProposalActionsItemRawViewProps>;
@@ -1,10 +1,12 @@
1
- import { type IProposalAction, type IProposalActionChangeMembers, type IProposalActionChangeSettings, type IProposalActionTokenMint, type IProposalActionUpdateMetadata, type IProposalActionWithdrawToken } from './proposalActionsTypes';
2
- declare class ProposalActionsUtils {
1
+ import { type IProposalAction } from '../proposalActionsDefinitions';
2
+ import type { IProposalActionChangeMembers, IProposalActionChangeSettings, IProposalActionTokenMint, IProposalActionUpdateMetadata, IProposalActionWithdrawToken } from '../proposalActionsList';
3
+ declare class ProposalActionsItemUtils {
4
+ isActionSupported: (action: IProposalAction) => boolean;
3
5
  isWithdrawTokenAction: (action: Partial<IProposalAction>) => action is IProposalActionWithdrawToken;
4
6
  isChangeMembersAction: (action: Partial<IProposalAction>) => action is IProposalActionChangeMembers;
5
7
  isUpdateMetadataAction: (action: Partial<IProposalAction>) => action is IProposalActionUpdateMetadata;
6
8
  isTokenMintAction: (action: Partial<IProposalAction>) => action is IProposalActionTokenMint;
7
9
  isChangeSettingsAction: (action: Partial<IProposalAction>) => action is IProposalActionChangeSettings;
8
10
  }
9
- export declare const proposalActionsUtils: ProposalActionsUtils;
11
+ export declare const proposalActionsItemUtils: ProposalActionsItemUtils;
10
12
  export {};
@@ -0,0 +1,3 @@
1
+ export { ProposalActionChangeMembers } from './proposalActionChangeMembers';
2
+ export type { IProposalActionChangeMembers, IProposalActionChangeMembersProps, } from './proposalActionChangeMembers.api';
3
+ export * from './proposalActionChangeMembers.testUtils';
@@ -1,6 +1,5 @@
1
- import type { ICompositeAddress } from '../../../../types';
2
- import type { IProposalAction } from './proposalAction';
3
- import type { ProposalActionType } from './proposalActionType';
1
+ import type { ICompositeAddress } from '../../../../../types';
2
+ import type { IProposalAction, IProposalActionComponentProps, ProposalActionType } from '../../proposalActionsDefinitions';
4
3
  export interface IProposalActionChangeMembers extends IProposalAction {
5
4
  /**
6
5
  * Adjust member count action
@@ -15,3 +14,5 @@ export interface IProposalActionChangeMembers extends IProposalAction {
15
14
  */
16
15
  currentMembers: number;
17
16
  }
17
+ export interface IProposalActionChangeMembersProps extends IProposalActionComponentProps<IProposalActionChangeMembers> {
18
+ }
@@ -0,0 +1,2 @@
1
+ import type { IProposalActionChangeMembersProps } from './proposalActionChangeMembers.api';
2
+ export declare const ProposalActionChangeMembers: React.FC<IProposalActionChangeMembersProps>;
@@ -1,2 +1,2 @@
1
- import { type IProposalActionChangeMembers } from '../../proposalActionsTypes';
1
+ import type { IProposalActionChangeMembers } from './proposalActionChangeMembers.api';
2
2
  export declare const generateProposalActionChangeMembers: (action?: Partial<IProposalActionChangeMembers>) => IProposalActionChangeMembers;
@@ -0,0 +1,3 @@
1
+ export { ProposalActionChangeSettings } from './proposalActionChangeSettings';
2
+ export type { IProposalActionChangeSettings, IProposalActionChangeSettingsProps, IProposalActionChangeSettingsSetting, } from './proposalActionChangeSettings.api';
3
+ export * from './proposalActionChangeSettings.testUtils';
@@ -1,4 +1,4 @@
1
- import { type IProposalAction } from './proposalAction';
1
+ import type { IProposalAction, IProposalActionComponentProps } from '../../proposalActionsDefinitions';
2
2
  export interface IProposalActionChangeSettingsSetting {
3
3
  /**
4
4
  * The term of the setting.
@@ -19,3 +19,5 @@ export interface IProposalActionChangeSettings extends IProposalAction {
19
19
  */
20
20
  existingSettings: IProposalActionChangeSettingsSetting[];
21
21
  }
22
+ export interface IProposalActionChangeSettingsProps extends IProposalActionComponentProps<IProposalActionChangeSettings> {
23
+ }
@@ -0,0 +1,2 @@
1
+ import type { IProposalActionChangeSettingsProps } from './proposalActionChangeSettings.api';
2
+ export declare const ProposalActionChangeSettings: React.FC<IProposalActionChangeSettingsProps>;
@@ -1,2 +1,2 @@
1
- import { type IProposalActionChangeSettings } from '../../proposalActionsTypes/proposalActionChangeSettings';
1
+ import type { IProposalActionChangeSettings } from './proposalActionChangeSettings.api';
2
2
  export declare const generateProposalActionChangeSettings: (action?: Partial<IProposalActionChangeSettings>) => IProposalActionChangeSettings;
@@ -0,0 +1,3 @@
1
+ export { ProposalActionTokenMint } from './proposalActionTokenMint';
2
+ export type { IProposalActionTokenMint, IProposalActionTokenMintMetadataReceiver, IProposalActionTokenMintProps, } from './proposalActionTokenMint.api';
3
+ export * from './proposalActionTokenMint.testUtils';
@@ -1,6 +1,5 @@
1
- import { type ICompositeAddress } from '../../../../types';
2
- import type { IProposalAction } from './proposalAction';
3
- import { type ProposalActionType } from './proposalActionType';
1
+ import type { ICompositeAddress } from '../../../../../types';
2
+ import type { IProposalAction, IProposalActionComponentProps, ProposalActionType } from '../../proposalActionsDefinitions';
4
3
  export interface IProposalActionTokenMintMetadataReceiver extends ICompositeAddress {
5
4
  /**
6
5
  * Receivers current token balance.
@@ -25,3 +24,5 @@ export interface IProposalActionTokenMint extends IProposalAction {
25
24
  */
26
25
  tokenSymbol: string;
27
26
  }
27
+ export interface IProposalActionTokenMintProps extends IProposalActionComponentProps<IProposalActionTokenMint> {
28
+ }
@@ -0,0 +1,2 @@
1
+ import type { IProposalActionTokenMintProps } from './proposalActionTokenMint.api';
2
+ export declare const ProposalActionTokenMint: React.FC<IProposalActionTokenMintProps>;
@@ -1,2 +1,2 @@
1
- import { type IProposalActionTokenMint } from '../../proposalActionsTypes/proposalActionTokenMint';
1
+ import type { IProposalActionTokenMint } from './proposalActionTokenMint.api';
2
2
  export declare const generateProposalActionTokenMint: (action?: Partial<IProposalActionTokenMint>) => IProposalActionTokenMint;
@@ -0,0 +1,3 @@
1
+ export { ProposalActionUpdateMetadata } from './proposalActionUpdateMetadata';
2
+ export type { IProposalActionUpdateMetadata, IProposalActionUpdateMetadataDaoMetadata, IProposalActionUpdateMetadataDaoMetadataLink, IProposalActionUpdateMetadataProps, } from './proposalActionUpdateMetadata.api';
3
+ export * from './proposalActionUpdateMetadata.testUtils';
@@ -1,5 +1,4 @@
1
- import { type IProposalAction } from './proposalAction';
2
- import { type ProposalActionType } from './proposalActionType';
1
+ import type { IProposalAction, IProposalActionComponentProps, ProposalActionType } from '../../proposalActionsDefinitions';
3
2
  export interface IProposalActionUpdateMetadataDaoMetadataLink {
4
3
  /**
5
4
  * Human readable label for link.
@@ -42,3 +41,5 @@ export interface IProposalActionUpdateMetadata extends IProposalAction {
42
41
  */
43
42
  existingMetadata: IProposalActionUpdateMetadataDaoMetadata;
44
43
  }
44
+ export interface IProposalActionUpdateMetadataProps extends IProposalActionComponentProps<IProposalActionUpdateMetadata> {
45
+ }
@@ -0,0 +1,2 @@
1
+ import type { IProposalActionUpdateMetadataProps } from './proposalActionUpdateMetadata.api';
2
+ export declare const ProposalActionUpdateMetadata: React.FC<IProposalActionUpdateMetadataProps>;
@@ -1,2 +1,2 @@
1
- import { type IProposalActionUpdateMetadata } from '../../proposalActionsTypes';
1
+ import type { IProposalActionUpdateMetadata } from './proposalActionUpdateMetadata.api';
2
2
  export declare const generateProposalActionUpdateMetadata: (action?: Partial<IProposalActionUpdateMetadata>) => IProposalActionUpdateMetadata;
@@ -0,0 +1,3 @@
1
+ export { ProposalActionWithdrawToken } from './proposalActionWithdrawToken';
2
+ export type { IProposalActionWithdrawToken, IProposalActionWithdrawTokenProps, } from './proposalActionWithdrawToken.api';
3
+ export * from './proposalActionWithdrawToken.testUtils';
@@ -0,0 +1,48 @@
1
+ import type { ICompositeAddress } from '../../../../../types';
2
+ import type { IProposalAction, IProposalActionComponentProps, ProposalActionType } from '../../proposalActionsDefinitions';
3
+ export interface IProposalActionWithdrawTokenAsset {
4
+ /**
5
+ * Name of the token.
6
+ */
7
+ name: string;
8
+ /**
9
+ * Symbol of the token.
10
+ */
11
+ symbol: string;
12
+ /**
13
+ * URL of the token logo.
14
+ */
15
+ logo: string;
16
+ /**
17
+ * Token price in USD.
18
+ */
19
+ priceUsd: string;
20
+ /**
21
+ * Decimals of the token.
22
+ */
23
+ decimals: number;
24
+ }
25
+ export interface IProposalActionWithdrawToken extends IProposalAction {
26
+ /**
27
+ * Withdraw token action type.
28
+ */
29
+ type: ProposalActionType.WITHDRAW_TOKEN;
30
+ /**
31
+ * Sender handle (the DAO treasury in this case), object with address and optional ensName.
32
+ */
33
+ sender: ICompositeAddress;
34
+ /**
35
+ * Receiver handle, object with address and optional ensName.
36
+ */
37
+ receiver: ICompositeAddress;
38
+ /**
39
+ * Amount of tokens to withdraw.
40
+ */
41
+ amount: string;
42
+ /**
43
+ * Details of the token to withdraw.
44
+ */
45
+ token: IProposalActionWithdrawTokenAsset;
46
+ }
47
+ export interface IProposalActionWithdrawTokenProps extends IProposalActionComponentProps<IProposalActionWithdrawToken> {
48
+ }
@@ -0,0 +1,2 @@
1
+ import type { IProposalActionWithdrawTokenProps } from './proposalActionWithdrawToken.api';
2
+ export declare const ProposalActionWithdrawToken: React.FC<IProposalActionWithdrawTokenProps>;
@@ -0,0 +1,2 @@
1
+ import type { IProposalActionWithdrawToken } from './proposalActionWithdrawToken.api';
2
+ export declare const generateProposalActionWithdrawToken: (action?: Partial<IProposalActionWithdrawToken>) => IProposalActionWithdrawToken;
@@ -0,0 +1 @@
1
+ export { ProposalActionsRoot, type IProposalActionsRootProps } from './proposalActionsRoot';
@@ -0,0 +1,11 @@
1
+ import { type ComponentProps } from 'react';
2
+ export interface IProposalActionsRootProps extends ComponentProps<'div'> {
3
+ /**
4
+ * Number of proposal actions needed to handle the toggle-all logic. This is also calculated and set at runtime from
5
+ * the number of children of the ProposalActions.Container component. To be set to render a correct view when the
6
+ * component is rendered on the server side.
7
+ * @default 0
8
+ */
9
+ actionsCount?: number;
10
+ }
11
+ export declare const ProposalActionsRoot: React.FC<IProposalActionsRootProps>;
@@ -0,0 +1,4 @@
1
+ import type { IProposalActionsContext } from './proposalActionsContext';
2
+ import type { IProposalAction } from './proposalActionsDefinitions';
3
+ export declare const generateProposalAction: (action?: Partial<IProposalAction>) => IProposalAction;
4
+ export declare const generateProposalActionsContext: (values?: Partial<IProposalActionsContext>) => IProposalActionsContext;
@@ -1,2 +1,2 @@
1
1
  export { ProposalDataListItemStructure } from './proposalDataListItemStructure';
2
- export * from './proposalDataListItemStructure.api';
2
+ export type * from './proposalDataListItemStructure.api';
@@ -1,13 +1,5 @@
1
- import React, { type ComponentProps } from 'react';
2
- export interface IProposalVotingContainerProps extends ComponentProps<'div'> {
3
- /**
4
- * Title displayed on top.
5
- */
6
- title: string;
7
- /**
8
- * Description of the proposal voting.
9
- */
10
- description: string;
1
+ import { type ComponentProps } from 'react';
2
+ export interface IProposalVotingContainerProps extends Omit<ComponentProps<'div'>, 'defaultValue'> {
11
3
  /**
12
4
  * Active stage that will be expanded for multi-stage proposals.
13
5
  */