@aragon/gov-ui-kit 1.0.62 → 1.0.63

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,2 +1,2 @@
1
1
  export { InputFileAvatar } from './inputFileAvatar';
2
- export { InputFileAvatarError, type IInputFileAvatarProps } from './inputFileAvatar.api';
2
+ export { InputFileAvatarError, type IInputFileAvatarProps, type IInputFileAvatarValue } from './inputFileAvatar.api';
@@ -8,17 +8,31 @@ export declare enum InputFileAvatarError {
8
8
  TOO_MANY_FILES = "too-many-files",
9
9
  FILE_TOO_LARGE = "file-too-large"
10
10
  }
11
+ export interface IInputFileAvatarValue {
12
+ /**
13
+ * URL of the image for the preview.
14
+ */
15
+ url?: string;
16
+ /**
17
+ * File object of the image.
18
+ */
19
+ file?: File;
20
+ /**
21
+ * Error message if image upload fails.
22
+ */
23
+ error?: InputFileAvatarError;
24
+ }
11
25
  export interface IInputFileAvatarProps extends Pick<IInputContainerBaseProps, 'alert' | 'label' | 'helpText' | 'isOptional' | 'variant' | 'disabled'> {
12
26
  /**
13
- * Function that is called when a file is selected. Passes the file to the parent component.
27
+ * Function that is called when a file is selected.
14
28
  * If the file is rejected, the function is not called.
15
- * If the file is accepted, the function is called with the file as an argument.
29
+ * If the file is accepted, the function is called with the file as an argument and a url string for generating the preview.
16
30
  */
17
- onFileSelect?: (file: File) => void;
31
+ onChange: (value?: IInputFileAvatarValue) => void;
18
32
  /**
19
- * Function that is called when a file is rejected. Passes the error message to the parent component.
33
+ * The current value of the input.
20
34
  */
21
- onFileError?: (error: InputFileAvatarError) => void;
35
+ value?: IInputFileAvatarValue;
22
36
  /**
23
37
  * Allowed file extensions, it must be an object with the keys set to the MIME type
24
38
  * and the values an array of file extensions (see https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker#accept)
@@ -17,14 +17,6 @@ export declare const modulesCopy: {
17
17
  delegations: string;
18
18
  votingPower: string;
19
19
  };
20
- approvalThresholdResult: {
21
- stage: string;
22
- outOf: (threshold: string) => string;
23
- };
24
- majorityVotingResult: {
25
- winningOption: string;
26
- stage: string;
27
- };
28
20
  proposalActionsContainer: {
29
21
  emptyHeader: string;
30
22
  };
@@ -95,15 +87,15 @@ export declare const modulesCopy: {
95
87
  voted: string;
96
88
  ago: string;
97
89
  left: string;
90
+ in: string;
98
91
  statusLabel: {
99
92
  ACCEPTED: string;
93
+ ADVANCEABLE: string;
100
94
  ACTIVE: string;
101
- CHALLENGED: string;
102
95
  DRAFT: string;
103
96
  EXECUTED: string;
104
97
  EXPIRED: string;
105
98
  FAILED: string;
106
- PARTIALLY_EXECUTED: string;
107
99
  PENDING: string;
108
100
  EXECUTABLE: string;
109
101
  REJECTED: string;
@@ -11,9 +11,9 @@ export interface IProposalActionUpdateMetadataDaoMetadataLink {
11
11
  }
12
12
  export interface IProposalActionUpdateMetadataDaoMetadata {
13
13
  /**
14
- * URL of the logo, only set for DAO metadata.
14
+ * URL of the avatar, only set for DAO metadata.
15
15
  */
16
- logo?: string;
16
+ avatar?: string;
17
17
  /**
18
18
  * Name of the DAO or Plugin.
19
19
  */
@@ -1,4 +1,4 @@
1
1
  import { type IProposalDataListItemStructureProps } from '../proposalDataListItemStructure';
2
- export interface IProposalDataListItemStatusProps extends Pick<IProposalDataListItemStructureProps, 'date' | 'status' | 'voted'> {
2
+ export interface IProposalDataListItemStatusProps extends Pick<IProposalDataListItemStructureProps, 'date' | 'status' | 'voted' | 'statusContext'> {
3
3
  }
4
4
  export declare const ProposalDataListItemStatus: React.FC<IProposalDataListItemStatusProps>;
@@ -1,9 +1,7 @@
1
1
  import type { IDataListItemProps } from '../../../../../core';
2
2
  import { type ICompositeAddress, type IWeb3ComponentProps } from '../../../../types';
3
3
  import { type ProposalStatus } from '../../proposalUtils';
4
- export type ProposalType = 'majorityVoting' | 'approvalThreshold' | undefined;
5
- export type ProposalResult<TType extends ProposalType> = TType extends 'majorityVoting' ? IMajorityVotingResult : TType extends 'approvalThreshold' ? IApprovalThresholdResult : undefined;
6
- export type IProposalDataListItemStructureBaseProps<TType extends ProposalType = ProposalType> = IDataListItemProps & IWeb3ComponentProps & {
4
+ export type IProposalDataListItemStructureProps = IDataListItemProps & IWeb3ComponentProps & {
7
5
  /**
8
6
  * Proposal id
9
7
  */
@@ -20,14 +18,15 @@ export type IProposalDataListItemStructureBaseProps<TType extends ProposalType =
20
18
  * Publisher(s) address (and optional ENS name and profile link)
21
19
  */
22
20
  publisher: IPublisher | IPublisher[];
23
- /**
24
- * Result of the proposal shown only when it is active, challenged or vetoed.
25
- */
26
- result?: ProposalResult<TType>;
27
21
  /**
28
22
  * Proposal status
29
23
  */
30
24
  status: ProposalStatus;
25
+ /**
26
+ * Provides additional context about the current status of a proposal within a multistage voting process.
27
+ * Only displayed when proposal status is `ACTIVE` or `ADVANCEABLE`.
28
+ */
29
+ statusContext?: string;
31
30
  /**
32
31
  * Proposal description
33
32
  */
@@ -36,10 +35,6 @@ export type IProposalDataListItemStructureBaseProps<TType extends ProposalType =
36
35
  * Proposal title
37
36
  */
38
37
  title: string;
39
- /**
40
- * Type of the ProposalDataListItem
41
- */
42
- type?: TType;
43
38
  /**
44
39
  * Indicates whether the connected wallet has voted
45
40
  */
@@ -51,44 +46,3 @@ export interface IPublisher extends ICompositeAddress {
51
46
  */
52
47
  link?: string;
53
48
  }
54
- export interface IProposalStage {
55
- /**
56
- * Name of the proposal stage
57
- */
58
- title?: string;
59
- /**
60
- * Id of the proposal stage
61
- */
62
- id: string | number;
63
- }
64
- export interface IProposalResultBase {
65
- /**
66
- * Proposal stage
67
- */
68
- stage?: IProposalStage;
69
- }
70
- export interface IApprovalThresholdResult extends IProposalResultBase {
71
- /**
72
- * Number of approvals for the proposal
73
- */
74
- approvalAmount: number;
75
- /**
76
- * Proposal approval threshold
77
- */
78
- approvalThreshold: number;
79
- }
80
- export interface IMajorityVotingResult extends IProposalResultBase {
81
- /**
82
- * Winning option
83
- */
84
- option: string;
85
- /**
86
- * Number of votes for the winning option
87
- */
88
- voteAmount: string;
89
- /**
90
- * Percentage of votes for the winning option
91
- */
92
- votePercentage: number;
93
- }
94
- export type IProposalDataListItemStructureProps = IProposalDataListItemStructureBaseProps<undefined> | IProposalDataListItemStructureBaseProps<'majorityVoting'> | IProposalDataListItemStructureBaseProps<'approvalThreshold'>;
@@ -2,12 +2,11 @@ import type { TagVariant } from '../../../core';
2
2
  export declare enum ProposalStatus {
3
3
  ACCEPTED = "ACCEPTED",
4
4
  ACTIVE = "ACTIVE",
5
- CHALLENGED = "CHALLENGED",
5
+ ADVANCEABLE = "ADVANCEABLE",
6
6
  DRAFT = "DRAFT",
7
7
  EXECUTED = "EXECUTED",
8
8
  EXPIRED = "EXPIRED",
9
9
  FAILED = "FAILED",
10
- PARTIALLY_EXECUTED = "PARTIALLY_EXECUTED",
11
10
  PENDING = "PENDING",
12
11
  EXECUTABLE = "EXECUTABLE",
13
12
  REJECTED = "REJECTED",
@@ -15,8 +14,8 @@ export declare enum ProposalStatus {
15
14
  }
16
15
  export declare enum ProposalVotingStatus {
17
16
  ACTIVE = "ACTIVE",
18
- PENDING = "PENDING",
19
17
  ACCEPTED = "ACCEPTED",
18
+ PENDING = "PENDING",
20
19
  EXPIRED = "EXPIRED",
21
20
  REJECTED = "REJECTED",
22
21
  UNREACHED = "UNREACHED",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aragon/gov-ui-kit",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
4
4
  "description": "Implementation of the Aragon's Governance UI Kit",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/types/src/index.d.ts",
@@ -65,7 +65,7 @@
65
65
  "@tiptap/starter-kit": "^2.11.0",
66
66
  "blockies-ts": "^1.0.0",
67
67
  "classnames": "^2.5.0",
68
- "framer-motion": "^11.16.0",
68
+ "framer-motion": "^11.17.0",
69
69
  "luxon": "^3.5.0",
70
70
  "react-dropzone": "^14.3.0",
71
71
  "react-imask": "^7.6.0",
@@ -74,12 +74,12 @@
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@tailwindcss/typography": "^0.5.0",
77
- "@tanstack/react-query": "^5.62.0",
77
+ "@tanstack/react-query": "^5.64.0",
78
78
  "react": "^18.2.0 || ^19.0.0",
79
79
  "react-dom": "^18.2.0 || ^19.0.0",
80
80
  "react-hook-form": "^7.54.0",
81
81
  "tailwindcss": "^3.4.0",
82
- "viem": "^2.21.0",
82
+ "viem": "^2.22.0",
83
83
  "wagmi": "^2.14.0"
84
84
  },
85
85
  "devDependencies": {
@@ -103,24 +103,24 @@
103
103
  "@storybook/react-webpack5": "^8.4.7",
104
104
  "@svgr/rollup": "^8.1.0",
105
105
  "@svgr/webpack": "^8.1.0",
106
- "@tailwindcss/typography": "^0.5.15",
107
- "@tanstack/react-query": "^5.62.16",
106
+ "@tailwindcss/typography": "^0.5.16",
107
+ "@tanstack/react-query": "^5.64.1",
108
108
  "@testing-library/dom": "^10.4.0",
109
109
  "@testing-library/jest-dom": "^6.6.3",
110
110
  "@testing-library/react": "^16.1.0",
111
111
  "@testing-library/user-event": "^14.5.2",
112
112
  "@types/jest": "^29.5.14",
113
113
  "@types/luxon": "^3.4.2",
114
- "@types/react": "^19.0.3",
115
- "@types/react-dom": "^19.0.2",
114
+ "@types/react": "^19.0.7",
115
+ "@types/react-dom": "^19.0.3",
116
116
  "@types/sanitize-html": "^2.13.0",
117
117
  "autoprefixer": "^10.4.20",
118
118
  "cross-env": "^7.0.3",
119
- "eslint": "^9.17.0",
119
+ "eslint": "^9.18.0",
120
120
  "eslint-import-resolver-typescript": "^3.7.0",
121
121
  "eslint-plugin-import": "^2.31.0",
122
122
  "eslint-plugin-jsx-a11y": "^6.10.2",
123
- "eslint-plugin-react": "^7.37.3",
123
+ "eslint-plugin-react": "^7.37.4",
124
124
  "eslint-plugin-react-hooks": "^5.1.0",
125
125
  "eslint-plugin-storybook": "^0.11.2",
126
126
  "eslint-plugin-tailwindcss": "^3.17.5",
@@ -129,7 +129,7 @@
129
129
  "jest": "^29.7.0",
130
130
  "jest-environment-jsdom": "^29.7.0",
131
131
  "lint-staged": "^15.3.0",
132
- "postcss": "^8.4.49",
132
+ "postcss": "^8.5.0",
133
133
  "postcss-loader": "^8.1.1",
134
134
  "prettier": "^3.4.2",
135
135
  "prettier-plugin-organize-imports": "^4.1.0",
@@ -137,17 +137,17 @@
137
137
  "react": "^19.0.0",
138
138
  "react-dom": "^19.0.0",
139
139
  "react-hook-form": "^7.54.2",
140
- "rollup": "^4.30.0",
140
+ "rollup": "^4.30.1",
141
141
  "rollup-plugin-peer-deps-external": "^2.2.4",
142
142
  "rollup-plugin-postcss": "^4.0.2",
143
143
  "rollup-plugin-visualizer": "^5.14.0",
144
144
  "storybook": "^8.4.7",
145
145
  "tailwindcss": "^3.4.17",
146
146
  "ts-jest": "^29.2.5",
147
- "typescript": "^5.7.2",
148
- "typescript-eslint": "^8.19.1",
149
- "viem": "^2.22.3",
150
- "wagmi": "^2.14.6"
147
+ "typescript": "^5.7.3",
148
+ "typescript-eslint": "^8.20.0",
149
+ "viem": "^2.22.8",
150
+ "wagmi": "^2.14.7"
151
151
  },
152
152
  "bugs": {
153
153
  "url": "https://github.com/aragon/gov-ui-kit/issues"
@@ -1,7 +0,0 @@
1
- import { type IApprovalThresholdResult } from '../proposalDataListItemStructure';
2
- export interface IApprovalThresholdResultProps extends IApprovalThresholdResult {
3
- }
4
- /**
5
- * `ApprovalThresholdResult` component
6
- */
7
- export declare const ApprovalThresholdResult: React.FC<IApprovalThresholdResultProps>;
@@ -1 +0,0 @@
1
- export { ApprovalThresholdResult, type IApprovalThresholdResultProps } from './approvalThresholdResult';
@@ -1 +0,0 @@
1
- export { MajorityVotingResult, type IMajorityVotingResultProps } from './majorityVotingResult';
@@ -1,7 +0,0 @@
1
- import { type IMajorityVotingResult } from '../proposalDataListItemStructure';
2
- export interface IMajorityVotingResultProps extends IMajorityVotingResult {
3
- }
4
- /**
5
- * `MajorityVotingResult` component
6
- */
7
- export declare const MajorityVotingResult: React.FC<IMajorityVotingResultProps>;
@@ -1,7 +0,0 @@
1
- import { ProposalStatus } from '../proposalUtils';
2
- declare class ProposalDataListItemUtils {
3
- ongoingStatuses: ProposalStatus[];
4
- isOngoingStatus: (status: ProposalStatus) => boolean;
5
- }
6
- export declare const proposalDataListItemUtils: ProposalDataListItemUtils;
7
- export {};