@aragon/gov-ui-kit 2.6.0 → 2.7.1

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 (22) hide show
  1. package/README.md +11 -6
  2. package/build.css +1 -1
  3. package/dist/index.es.js +1 -1
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/types/src/core/components/dialogs/dialog/dialogStoryComponent.d.ts +1 -1
  6. package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertStoryComponent.d.ts +1 -1
  7. package/dist/types/src/core/components/toggles/toggleGroup/toggleGroup.d.ts +1 -1
  8. package/dist/types/src/modules/assets/copy/modulesCopy.d.ts +20 -0
  9. package/dist/types/src/modules/components/proposal/proposalActions/index.d.ts +2 -2
  10. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItem.d.ts +1 -1
  11. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItemBasicView.d.ts +1 -1
  12. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItemSkeleton/proposalActionsItemSkeleton.d.ts +1 -1
  13. package/dist/types/src/modules/components/transaction/index.d.ts +2 -0
  14. package/dist/types/src/modules/components/transaction/transactionDataListItem/transactionDataListItemStructure/index.d.ts +1 -1
  15. package/dist/types/src/modules/components/transaction/transactionDataListItem/transactionDataListItemStructure/transactionDataListItemStructure.api.d.ts +53 -10
  16. package/dist/types/src/modules/components/transaction/transactionDetail/index.d.ts +4 -0
  17. package/dist/types/src/modules/components/transaction/transactionDetail/transactionDetailRoot/index.d.ts +1 -0
  18. package/dist/types/src/modules/components/transaction/transactionDetail/transactionDetailRoot/transactionDetailRoot.d.ts +17 -0
  19. package/dist/types/src/modules/components/transaction/transactionDetailSummary/index.d.ts +2 -0
  20. package/dist/types/src/modules/components/transaction/transactionDetailSummary/transactionDetailSummary.api.d.ts +60 -0
  21. package/dist/types/src/modules/components/transaction/transactionDetailSummary/transactionDetailSummary.d.ts +2 -0
  22. package/package.json +51 -51
@@ -1 +1 @@
1
- export declare const DialogStoryComponent: (component: "header" | "content" | "footer" | "root") => (props: object) => import("react/jsx-runtime").JSX.Element;
1
+ export declare const DialogStoryComponent: (component: "header" | "content" | "footer" | "root") => (props: object) => import("react").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { type DialogAlertVariant } from './index';
2
- export declare const DialogAlertStoryComponent: (component: "header" | "content" | "footer" | "root", variant?: DialogAlertVariant) => (props: object) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const DialogAlertStoryComponent: (component: "header" | "content" | "footer" | "root", variant?: DialogAlertVariant) => (props: object) => import("react").JSX.Element;
@@ -29,4 +29,4 @@ export interface IToggleGroupBaseProps<TMulti extends boolean> extends Omit<Comp
29
29
  onChange?: (value: ToggleGroupValue<TMulti>) => void;
30
30
  }
31
31
  export type IToggleGroupProps = IToggleGroupBaseProps<true> | IToggleGroupBaseProps<false>;
32
- export declare const ToggleGroup: (props: IToggleGroupProps) => import("react/jsx-runtime").JSX.Element;
32
+ export declare const ToggleGroup: (props: IToggleGroupProps) => import("react").JSX.Element;
@@ -203,5 +203,25 @@ export declare const modulesCopy: {
203
203
  contract: string;
204
204
  };
205
205
  };
206
+ transactionDataListItemStructure: {
207
+ received: string;
208
+ sent: string;
209
+ action: string;
210
+ executed: string;
211
+ actionCount: (count: number) => string;
212
+ };
213
+ transactionDetailSummary: {
214
+ executedBy: string;
215
+ proposal: string;
216
+ totalActions: string;
217
+ transaction: string;
218
+ executedOn: string;
219
+ };
220
+ transactionDetail: {
221
+ title: string;
222
+ more: string;
223
+ expand: string;
224
+ collapse: string;
225
+ };
206
226
  };
207
227
  export type ModulesCopy = typeof modulesCopy;
@@ -1,8 +1,8 @@
1
1
  export declare const ProposalActions: {
2
2
  Root: import("react").FC<import("./proposalActionsRoot").IProposalActionsRootProps>;
3
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
- ItemSkeleton: () => import("react/jsx-runtime").JSX.Element;
4
+ Item: <TAction extends import("./proposalActionsDefinitions").IProposalAction = import("./proposalActionsDefinitions").IProposalAction>(props: import("./proposalActionsItem").IProposalActionsItemProps<TAction>) => import("react").JSX.Element;
5
+ ItemSkeleton: () => import("react").JSX.Element;
6
6
  Footer: import("react").FC<import("./proposalActionsFooter").IProposalActionsFooterProps>;
7
7
  };
8
8
  export * from './proposalActionsContainer';
@@ -5,4 +5,4 @@ import type { IProposalActionsItemProps } from './proposalActionsItem.api';
5
5
  * and if the parameters for the actions are defined.
6
6
  * **_NOTE:_** The component must be used inside a `<FormProvider />` component from `react-hook-form` when used in `editMode`.
7
7
  */
8
- export declare const ProposalActionsItem: <TAction extends IProposalAction = IProposalAction>(props: IProposalActionsItemProps<TAction>) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const ProposalActionsItem: <TAction extends IProposalAction = IProposalAction>(props: IProposalActionsItemProps<TAction>) => import("react").JSX.Element;
@@ -5,4 +5,4 @@ export interface IProposalActionsItemBasicViewProps<TAction extends IProposalAct
5
5
  */
6
6
  CustomComponent?: ProposalActionComponent<TAction>;
7
7
  }
8
- export declare const ProposalActionsItemBasicView: <TAction extends IProposalAction = IProposalAction>(props: IProposalActionsItemBasicViewProps<TAction>) => import("react/jsx-runtime").JSX.Element | null;
8
+ export declare const ProposalActionsItemBasicView: <TAction extends IProposalAction = IProposalAction>(props: IProposalActionsItemBasicViewProps<TAction>) => import("react").JSX.Element | null;
@@ -1 +1 @@
1
- export declare const ProposalActionsItemSkeleton: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const ProposalActionsItemSkeleton: () => import("react").JSX.Element;
@@ -1 +1,3 @@
1
1
  export * from './transactionDataListItem';
2
+ export * from './transactionDetail';
3
+ export * from './transactionDetailSummary';
@@ -1,2 +1,2 @@
1
1
  export { TransactionDataListItemStructure } from './transactionDataListItemStructure';
2
- export { type ITransactionDataListItemProps, TransactionStatus, TransactionType, } from './transactionDataListItemStructure.api';
2
+ export { type ITransactionDataListItemProps, TransactionStatus, type TransactionTransferType, TransactionType, } from './transactionDataListItemStructure.api';
@@ -8,21 +8,15 @@ export declare enum TransactionStatus {
8
8
  export declare enum TransactionType {
9
9
  DEPOSIT = "DEPOSIT",
10
10
  WITHDRAW = "WITHDRAW",
11
- ACTION = "ACTION"
11
+ ACTION = "ACTION",
12
+ EXECUTION = "EXECUTION"
12
13
  }
13
- export type ITransactionDataListItemProps = IDataListItemProps & {
14
+ export type TransactionTransferType = Exclude<TransactionType, TransactionType.EXECUTION>;
15
+ type TransactionDataListItemBaseProps = IDataListItemProps & {
14
16
  /**
15
17
  * The chain ID of the transaction.
16
18
  */
17
19
  chainId: number;
18
- /**
19
- * The symbol of the token (e.g. 'ETH').
20
- */
21
- tokenSymbol: string;
22
- /**
23
- * The token value in the transaction.
24
- */
25
- tokenAmount?: number | string;
26
20
  /**
27
21
  * The price of the transaction in USD.
28
22
  */
@@ -50,3 +44,52 @@ export type ITransactionDataListItemProps = IDataListItemProps & {
50
44
  */
51
45
  hash?: Hash;
52
46
  };
47
+ export type ITransactionDataListItemTransferProps = TransactionDataListItemBaseProps & {
48
+ /**
49
+ * The symbol of the token (e.g. 'ETH').
50
+ */
51
+ tokenSymbol: string;
52
+ /**
53
+ * The token value in the transaction.
54
+ */
55
+ tokenAmount?: number | string;
56
+ /**
57
+ * The type of transaction.
58
+ * @default TransactionType.ACTION
59
+ */
60
+ type?: TransactionTransferType;
61
+ /**
62
+ * Executor labels are only rendered for `TransactionType.EXECUTION` transactions.
63
+ */
64
+ label?: never;
65
+ /**
66
+ * Action counts are only rendered for `TransactionType.EXECUTION` transactions.
67
+ */
68
+ actionCount?: never;
69
+ };
70
+ export type ITransactionDataListItemExecutionProps = TransactionDataListItemBaseProps & {
71
+ /**
72
+ * Execution transaction type.
73
+ */
74
+ type: TransactionType.EXECUTION;
75
+ /**
76
+ * Label of the executor for `TransactionType.EXECUTION` transactions, rendered as `Executed {label}`. Accepts a
77
+ * human-readable plugin name (e.g. 'Token Voting') or an address, which gets truncated automatically.
78
+ */
79
+ label?: string;
80
+ /**
81
+ * Number of actions bundled in a `TransactionType.EXECUTION` transaction. Rendered as the right-side value
82
+ * (e.g. '5 actions') in place of the token amount.
83
+ */
84
+ actionCount: number;
85
+ /**
86
+ * Token amounts are not rendered for execution transactions.
87
+ */
88
+ tokenAmount?: never;
89
+ /**
90
+ * Token symbols are not rendered for execution transactions.
91
+ */
92
+ tokenSymbol?: never;
93
+ };
94
+ export type ITransactionDataListItemProps = ITransactionDataListItemTransferProps | ITransactionDataListItemExecutionProps;
95
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const TransactionDetail: {
2
+ Root: import("react").FC<import("./transactionDetailRoot").ITransactionDetailRootProps>;
3
+ };
4
+ export * from './transactionDetailRoot';
@@ -0,0 +1,17 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export interface ITransactionDetailRootProps extends ComponentPropsWithoutRef<'div'> {
3
+ /**
4
+ * Title displayed in the dialog header. Defaults to the localized "Executed" copy.
5
+ */
6
+ title?: string;
7
+ /**
8
+ * Callback triggered on close-button click. The close button is hidden when the property is not set.
9
+ */
10
+ onClose?: () => void;
11
+ }
12
+ /**
13
+ * The `<TransactionDetail.Root />` component renders the dialog header and the scrollable content shell of an
14
+ * execution detail dialog. Compose it with `<TransactionDetailSummary />` and an action-list component such as
15
+ * `<ProposalActions />` for decoded execution actions. It must be rendered inside a `<Dialog.Root />`.
16
+ */
17
+ export declare const TransactionDetailRoot: React.FC<ITransactionDetailRootProps>;
@@ -0,0 +1,2 @@
1
+ export { TransactionDetailSummary } from './transactionDetailSummary';
2
+ export type * from './transactionDetailSummary.api';
@@ -0,0 +1,60 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ import type { Hash } from 'viem';
3
+ /**
4
+ * Entity that executed the transaction, rendered on the `Executed by` row.
5
+ *
6
+ * The three states from the design map onto these fields:
7
+ * - Not an active-process execution: set `label` (plugin name or address) and `address`; omit `href` so the label
8
+ * links to the block explorer, and omit `helptext`.
9
+ * - Active-process execution: set `label` to the process name, `helptext` to the plugin name and version (e.g.
10
+ * 'SPP v1.3') and `href` to the process detail page.
11
+ */
12
+ export interface ITransactionDetailSummaryExecutedBy {
13
+ /**
14
+ * Address of the executor. Builds the block-explorer link (unless `href` is set) and the copy button, and is used
15
+ * as the label (truncated) when `label` is not provided.
16
+ */
17
+ address?: string;
18
+ /**
19
+ * Label displayed for the executor (e.g. a process or plugin name). Defaults to the truncated `address`.
20
+ */
21
+ label?: string;
22
+ /**
23
+ * Helptext displayed below the label (e.g. the plugin name and version, 'SPP v1.3'). Hidden when not provided.
24
+ */
25
+ helptext?: string;
26
+ /**
27
+ * Internal link applied to the label (e.g. the process detail page). Takes precedence over the block-explorer link.
28
+ */
29
+ href?: string;
30
+ }
31
+ export interface ITransactionDetailSummaryProps extends ComponentPropsWithoutRef<'dl'> {
32
+ /**
33
+ * Chain ID of the transaction, used to build the block-explorer links.
34
+ */
35
+ chainId: number;
36
+ /**
37
+ * Entity that executed the transaction, rendered on the `Executed by` row.
38
+ */
39
+ executedBy: ITransactionDetailSummaryExecutedBy;
40
+ /**
41
+ * Identifier of the proposal that triggered the execution (e.g. 'CRE-54'). The row is omitted when not set.
42
+ */
43
+ proposalId?: string;
44
+ /**
45
+ * Internal link applied to the proposal identifier (e.g. the proposal detail page).
46
+ */
47
+ proposalHref?: string;
48
+ /**
49
+ * Total number of actions bundled in the execution.
50
+ */
51
+ totalActions: number;
52
+ /**
53
+ * Hash of the execution transaction. Rendered truncated with an explorer link and a copy button.
54
+ */
55
+ transactionHash: Hash;
56
+ /**
57
+ * Date of the execution in ISO format or as a timestamp.
58
+ */
59
+ date: number | string;
60
+ }
@@ -0,0 +1,2 @@
1
+ import type { ITransactionDetailSummaryProps } from './transactionDetailSummary.api';
2
+ export declare const TransactionDetailSummary: React.FC<ITransactionDetailSummaryProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aragon/gov-ui-kit",
3
- "version": "2.6.0",
3
+ "version": "2.7.1",
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",
@@ -25,29 +25,29 @@
25
25
  ],
26
26
  "author": "Aragon Association",
27
27
  "dependencies": {
28
- "@radix-ui/react-accordion": "^1.2.12",
29
- "@radix-ui/react-alert-dialog": "^1.1.15",
30
- "@radix-ui/react-avatar": "^1.1.11",
31
- "@radix-ui/react-checkbox": "^1.3.3",
32
- "@radix-ui/react-dialog": "^1.1.15",
33
- "@radix-ui/react-dropdown-menu": "^2.1.16",
34
- "@radix-ui/react-focus-scope": "^1.1.8",
35
- "@radix-ui/react-progress": "^1.1.8",
36
- "@radix-ui/react-radio-group": "^1.3.8",
37
- "@radix-ui/react-switch": "^1.2.6",
38
- "@radix-ui/react-tabs": "^1.1.13",
39
- "@radix-ui/react-toggle-group": "^1.1.11",
40
- "@radix-ui/react-tooltip": "^1.2.8",
41
- "@radix-ui/react-visually-hidden": "^1.2.4",
42
- "@tiptap/core": "^3.23.4",
43
- "@tiptap/extension-image": "^3.23.4",
44
- "@tiptap/extensions": "^3.23.4",
45
- "@tiptap/pm": "^3.23.4",
46
- "@tiptap/react": "^3.23.4",
47
- "@tiptap/starter-kit": "^3.23.4",
28
+ "@radix-ui/react-accordion": "^1.2.13",
29
+ "@radix-ui/react-alert-dialog": "^1.1.16",
30
+ "@radix-ui/react-avatar": "^1.1.12",
31
+ "@radix-ui/react-checkbox": "^1.3.4",
32
+ "@radix-ui/react-dialog": "^1.1.16",
33
+ "@radix-ui/react-dropdown-menu": "^2.1.17",
34
+ "@radix-ui/react-focus-scope": "^1.1.9",
35
+ "@radix-ui/react-progress": "^1.1.9",
36
+ "@radix-ui/react-radio-group": "^1.4.0",
37
+ "@radix-ui/react-switch": "^1.3.0",
38
+ "@radix-ui/react-tabs": "^1.1.14",
39
+ "@radix-ui/react-toggle-group": "^1.1.12",
40
+ "@radix-ui/react-tooltip": "^1.2.9",
41
+ "@radix-ui/react-visually-hidden": "^1.2.5",
42
+ "@tiptap/core": "^3.26.0",
43
+ "@tiptap/extension-image": "^3.26.0",
44
+ "@tiptap/extensions": "^3.26.0",
45
+ "@tiptap/pm": "^3.26.0",
46
+ "@tiptap/react": "^3.26.0",
47
+ "@tiptap/starter-kit": "^3.26.0",
48
48
  "blockies-ts": "^1.0.0",
49
49
  "classnames": "^2.5.1",
50
- "framer-motion": "^12.38.0",
50
+ "framer-motion": "^12.40.0",
51
51
  "imask": "^7.6.1",
52
52
  "luxon": "^3.7.2",
53
53
  "react-dropzone": "^15.0.0",
@@ -74,33 +74,33 @@
74
74
  }
75
75
  },
76
76
  "devDependencies": {
77
- "@babel/core": "^7.29.0",
78
- "@babel/preset-env": "^7.29.5",
79
- "@babel/preset-react": "^7.28.5",
80
- "@babel/preset-typescript": "^7.28.5",
81
- "@biomejs/biome": "^2.4.15",
77
+ "@babel/core": "^7.29.7",
78
+ "@babel/preset-env": "^7.29.7",
79
+ "@babel/preset-react": "^7.29.7",
80
+ "@babel/preset-typescript": "^7.29.7",
81
+ "@biomejs/biome": "^2.4.16",
82
82
  "@changesets/changelog-github": "^0.6.0",
83
83
  "@changesets/cli": "^2.31.0",
84
84
  "@hookform/devtools": "^4.4.0",
85
- "@rollup/plugin-commonjs": "^29.0.2",
85
+ "@rollup/plugin-commonjs": "^29.0.3",
86
86
  "@rollup/plugin-image": "^3.0.3",
87
87
  "@rollup/plugin-node-resolve": "^16.0.3",
88
88
  "@rollup/plugin-terser": "^1.0.0",
89
89
  "@rollup/plugin-typescript": "^12.3.0",
90
- "@storybook/addon-docs": "^10.4.0",
91
- "@storybook/react-vite": "^10.4.0",
90
+ "@storybook/addon-docs": "^10.4.2",
91
+ "@storybook/react-vite": "^10.4.2",
92
92
  "@svgr/rollup": "^8.1.0",
93
93
  "@tailwindcss/postcss": "^4.3.0",
94
- "@tailwindcss/typography": "^0.5.19",
95
- "@tanstack/react-query": "^5.100.10",
94
+ "@tailwindcss/typography": "^0.5.20",
95
+ "@tanstack/react-query": "^5.101.0",
96
96
  "@testing-library/dom": "^10.4.1",
97
97
  "@testing-library/jest-dom": "^6.9.1",
98
98
  "@testing-library/react": "^16.3.2",
99
99
  "@testing-library/user-event": "^14.6.1",
100
100
  "@types/jest": "^30.0.0",
101
101
  "@types/luxon": "^3.7.1",
102
- "@types/node": "^22.19.19",
103
- "@types/react": "^19.2.14",
102
+ "@types/node": "^24.13.1",
103
+ "@types/react": "^19.2.17",
104
104
  "@types/react-dom": "^19.2.3",
105
105
  "@types/sanitize-html": "^2.16.1",
106
106
  "cross-env": "^10.1.0",
@@ -108,37 +108,37 @@
108
108
  "jest": "^30.4.2",
109
109
  "jest-environment-jsdom": "^30.4.1",
110
110
  "lint-staged": "^16.4.0",
111
- "postcss": "^8.5.14",
111
+ "postcss": "^8.5.15",
112
112
  "postcss-loader": "^8.2.1",
113
- "react": "^19.2.6",
114
- "react-dom": "^19.2.6",
115
- "react-hook-form": "^7.75.0",
116
- "rollup": "^4.60.3",
113
+ "react": "^19.2.7",
114
+ "react-dom": "^19.2.7",
115
+ "react-hook-form": "^7.78.0",
116
+ "rollup": "^4.61.1",
117
117
  "rollup-plugin-peer-deps-external": "^2.2.4",
118
118
  "rollup-plugin-postcss": "^4.0.2",
119
119
  "rollup-plugin-visualizer": "^7.0.1",
120
- "storybook": "^10.4.0",
120
+ "storybook": "^10.4.2",
121
121
  "tailwindcss": "^4.3.0",
122
- "ts-jest": "^29.4.9",
122
+ "ts-jest": "^29.4.11",
123
123
  "tslib": "^2.8.1",
124
- "turbo": "^2.9.12",
124
+ "turbo": "^2.9.16",
125
125
  "typescript": "^5.9.3",
126
- "ultracite": "^7.7.0",
127
- "vercel": "^50.44.0",
128
- "viem": "^2.49.0",
129
- "vite": "^8.0.13",
130
- "vite-plugin-static-copy": "^4.1.0",
126
+ "ultracite": "^7.8.2",
127
+ "vercel": "^52.2.1",
128
+ "viem": "^2.52.2",
129
+ "vite": "^8.0.16",
130
+ "vite-plugin-static-copy": "^4.1.1",
131
131
  "vite-plugin-svgr": "^5.2.0",
132
- "wagmi": "^3.6.14",
133
- "zod": "^3.25.76"
132
+ "wagmi": "^3.6.16",
133
+ "zod": "^4.4.3"
134
134
  },
135
135
  "bugs": {
136
136
  "url": "https://github.com/aragon/gov-ui-kit/issues"
137
137
  },
138
138
  "homepage": "https://github.com/aragon/gov-ui-kit#readme",
139
139
  "engines": {
140
- "node": ">=22.0.0",
141
- "pnpm": ">=10.0.0"
140
+ "node": ">=24.13.0",
141
+ "pnpm": ">=11.0.0"
142
142
  },
143
143
  "exports": {
144
144
  ".": {