@aragon/gov-ui-kit 1.3.0 → 1.5.0

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/CHANGELOG.md +30 -0
  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/definitionList/definitionListItem/definitionListItem.d.ts +5 -0
  6. package/dist/types/src/modules/assets/copy/modulesCopy.d.ts +2 -0
  7. package/dist/types/src/modules/components/proposal/proposalActions/index.d.ts +2 -0
  8. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsContext/proposalActionsContext.d.ts +4 -0
  9. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItemSkeleton/index.d.ts +1 -0
  10. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsItemSkeleton/proposalActionsItemSkeleton.d.ts +1 -0
  11. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionChangeSettings/index.d.ts +1 -1
  12. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsList/proposalActionChangeSettings/proposalActionChangeSettings.api.d.ts +3 -12
  13. package/dist/types/src/modules/components/proposal/proposalActions/proposalActionsRoot/proposalActionsRoot.d.ts +5 -0
  14. package/dist/types/src/modules/components/proposal/proposalDataListItem/proposalDataListItemStructure/proposalDataListItemStructure.api.d.ts +1 -1
  15. package/dist/types/src/modules/components/proposal/proposalVoting/proposalVotingBodyContent/proposalVotingBodyContent.d.ts +5 -0
  16. package/dist/types/src/modules/components/proposal/proposalVoting/proposalVotingBodySummaryListItem/proposalVotingBodySummaryListItem.d.ts +5 -0
  17. package/dist/types/src/modules/components/proposal/proposalVoting/proposalVotingDefinitions.d.ts +10 -0
  18. package/dist/types/src/modules/components/proposal/proposalVoting/proposalVotingDetails/proposalVotingDetails.d.ts +2 -11
  19. package/dist/types/src/modules/types/definitionSetting.d.ts +7 -0
  20. package/dist/types/src/modules/types/index.d.ts +1 -0
  21. package/dist/types/src/modules/types/web3ComponentConfig.d.ts +2 -2
  22. package/package.json +31 -31
@@ -1,8 +1,13 @@
1
1
  import { type ComponentPropsWithRef } from 'react';
2
+ import { type ILinkProps } from '../../link';
2
3
  export interface IDefinitionListItemProps extends ComponentPropsWithRef<'div'> {
3
4
  /**
4
5
  * The term to be displayed in the definition list item.
5
6
  */
6
7
  term: string;
8
+ /**
9
+ * The materials for a Link component if necessary.
10
+ */
11
+ link?: ILinkProps;
7
12
  }
8
13
  export declare const DefinitionListItem: React.FC<IDefinitionListItemProps>;
@@ -154,6 +154,8 @@ export declare const modulesCopy: {
154
154
  proposalVotingDetails: {
155
155
  voting: string;
156
156
  governance: string;
157
+ starts: string;
158
+ expires: string;
157
159
  };
158
160
  proposalVotingStage: {
159
161
  stage: (index: number) => string;
@@ -2,11 +2,13 @@ export declare const ProposalActions: {
2
2
  Root: import("react").FC<import("./proposalActionsRoot").IProposalActionsRootProps>;
3
3
  Container: import("react").FC<import("./proposalActionsContainer").IProposalActionsContainerProps>;
4
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;
5
6
  Footer: import("react").FC<import("./proposalActionsFooter").IProposalActionsFooterProps>;
6
7
  };
7
8
  export * from './proposalActionsContainer';
8
9
  export * from './proposalActionsDefinitions';
9
10
  export * from './proposalActionsFooter';
10
11
  export * from './proposalActionsItem';
12
+ export * from './proposalActionsItemSkeleton';
11
13
  export * from './proposalActionsList';
12
14
  export * from './proposalActionsRoot';
@@ -15,6 +15,10 @@ export interface IProposalActionsContext {
15
15
  * Callback used to update the current expanded actions.
16
16
  */
17
17
  setExpandedActions: (items: string[]) => void;
18
+ /**
19
+ * Whether or not the list of actions is loading.
20
+ */
21
+ isLoading: boolean;
18
22
  }
19
23
  export declare const proposalActionsContext: import("react").Context<IProposalActionsContext | null>;
20
24
  export declare const ProposalActionsContextProvider: import("react").Provider<IProposalActionsContext | null>;
@@ -0,0 +1 @@
1
+ export { ProposalActionsItemSkeleton } from './proposalActionsItemSkeleton';
@@ -0,0 +1 @@
1
+ export declare const ProposalActionsItemSkeleton: () => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  export { ProposalActionChangeSettings } from './proposalActionChangeSettings';
2
- export type { IProposalActionChangeSettings, IProposalActionChangeSettingsProps, IProposalActionChangeSettingsSetting, } from './proposalActionChangeSettings.api';
2
+ export type { IProposalActionChangeSettings, IProposalActionChangeSettingsProps, } from './proposalActionChangeSettings.api';
3
3
  export * from './proposalActionChangeSettings.testUtils';
@@ -1,23 +1,14 @@
1
+ import type { IDefinitionSetting } from '../../../../../types';
1
2
  import type { IProposalAction, IProposalActionComponentProps } from '../../proposalActionsDefinitions';
2
- export interface IProposalActionChangeSettingsSetting {
3
- /**
4
- * The term of the setting.
5
- */
6
- term: string;
7
- /**
8
- * The definition of the setting.
9
- */
10
- definition: string | number;
11
- }
12
3
  export interface IProposalActionChangeSettings extends IProposalAction {
13
4
  /**
14
5
  * The settings that are proposed to be changed
15
6
  */
16
- proposedSettings: IProposalActionChangeSettingsSetting[];
7
+ proposedSettings: IDefinitionSetting[];
17
8
  /**
18
9
  * The settings that are currently in place.
19
10
  */
20
- existingSettings: IProposalActionChangeSettingsSetting[];
11
+ existingSettings: IDefinitionSetting[];
21
12
  }
22
13
  export interface IProposalActionChangeSettingsProps extends IProposalActionComponentProps<IProposalActionChangeSettings> {
23
14
  }
@@ -15,5 +15,10 @@ export interface IProposalActionsRootProps extends ComponentProps<'div'> {
15
15
  * Callback called when the expanded state of an action changes.
16
16
  */
17
17
  onExpandedActionsChange?: (expandedActions: string[]) => void;
18
+ /**
19
+ * Whether or not the list of actions is loading.
20
+ * @default false
21
+ */
22
+ isLoading?: boolean;
18
23
  }
19
24
  export declare const ProposalActionsRoot: React.FC<IProposalActionsRootProps>;
@@ -1,7 +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 IProposalDataListItemStructureProps = IDataListItemProps & IWeb3ComponentProps & {
4
+ export type IProposalDataListItemStructureProps = IDataListItemProps & Omit<IWeb3ComponentProps, 'chainId'> & {
5
5
  /**
6
6
  * Proposal id
7
7
  */
@@ -1,5 +1,6 @@
1
1
  import { type ComponentProps } from 'react';
2
2
  import { ProposalVotingStatus } from '../../proposalUtils';
3
+ import { type IProposalVotingBodyBrand } from '../proposalVotingDefinitions';
3
4
  import { type IProposalVotingTabsProps } from '../proposalVotingTabs';
4
5
  export interface IProposalVotingBodyContentProps extends Pick<IProposalVotingTabsProps, 'hideTabs'>, ComponentProps<'div'> {
5
6
  /**
@@ -14,5 +15,9 @@ export interface IProposalVotingBodyContentProps extends Pick<IProposalVotingTab
14
15
  * ID of the body used to determine if the content should be rendered or not, only relevant for multi-body stages.
15
16
  */
16
17
  bodyId?: string;
18
+ /**
19
+ * Branded identity assets for an external body.
20
+ */
21
+ bodyBrand?: IProposalVotingBodyBrand;
17
22
  }
18
23
  export declare const ProposalVotingBodyContent: React.FC<IProposalVotingBodyContentProps>;
@@ -1,10 +1,15 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { type IDataListItemProps } from '../../../../../core';
3
+ import type { IProposalVotingBodyBrand } from '../proposalVotingDefinitions';
3
4
  export type IProposalVotingBodySummaryListItemProps = IDataListItemProps & {
4
5
  /**
5
6
  * ID of the body.
6
7
  */
7
8
  id: string;
9
+ /**
10
+ * Branded identity assets for an external body.
11
+ */
12
+ bodyBrand?: IProposalVotingBodyBrand;
8
13
  /**
9
14
  * Children to render.
10
15
  */
@@ -3,3 +3,13 @@ export declare enum ProposalVotingTab {
3
3
  VOTES = "VOTES",
4
4
  DETAILS = "DETAILS"
5
5
  }
6
+ export interface IProposalVotingBodyBrand {
7
+ /**
8
+ * Logo src of the branded identity.
9
+ */
10
+ logo: string;
11
+ /**
12
+ * Label of the branded identity. e.g. "Safe{Wallet}""
13
+ */
14
+ label: string;
15
+ }
@@ -1,18 +1,9 @@
1
1
  import { type ITabsContentProps } from '../../../../../core';
2
- export interface IProposalVotingDetailsSetting {
3
- /**
4
- * Term of the setting.
5
- */
6
- term: string;
7
- /**
8
- * Value of the setting.
9
- */
10
- definition: string;
11
- }
2
+ import type { IDefinitionSetting } from '../../../../types';
12
3
  export interface IProposalVotingDetailsProps extends Omit<ITabsContentProps, 'value'> {
13
4
  /**
14
5
  * Governance settings displayed on the details tab.
15
6
  */
16
- settings?: IProposalVotingDetailsSetting[];
7
+ settings?: IDefinitionSetting[];
17
8
  }
18
9
  export declare const ProposalVotingDetails: React.FC<IProposalVotingDetailsProps>;
@@ -0,0 +1,7 @@
1
+ import type { IDefinitionListItemProps } from '../../core';
2
+ export interface IDefinitionSetting extends Pick<IDefinitionListItemProps, 'term' | 'link'> {
3
+ /**
4
+ * The definition for the term in the list item.
5
+ */
6
+ definition?: string;
7
+ }
@@ -1,2 +1,3 @@
1
1
  export type * from './compositeAddress';
2
+ export type * from './definitionSetting';
2
3
  export type * from './web3ComponentConfig';
@@ -4,8 +4,8 @@ import type { Config } from 'wagmi';
4
4
  */
5
5
  export interface IWeb3ComponentProps {
6
6
  /**
7
- * ID of the chain to use when making RPC requests. Defaults to the first chain set on the Wagmi config.
8
- * (@see https://github.com/wevm/wagmi/blob/main/packages/core/src/createConfig.ts#L193C23-L193C31)
7
+ * ID of the chain to use when making RPC requests.
8
+ * @default mainnet.id (1)
9
9
  */
10
10
  chainId?: number;
11
11
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aragon/gov-ui-kit",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
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",
@@ -55,17 +55,17 @@
55
55
  "@radix-ui/react-toggle-group": "^1.1.0",
56
56
  "@radix-ui/react-tooltip": "^1.2.0",
57
57
  "@radix-ui/react-visually-hidden": "^1.2.0",
58
- "@tiptap/extension-code-block": "^2.11.0",
59
- "@tiptap/extension-image": "^2.11.0",
60
- "@tiptap/extension-link": "^2.11.0",
61
- "@tiptap/extension-placeholder": "^2.11.0",
62
- "@tiptap/extension-text-style": "^2.11.0",
63
- "@tiptap/pm": "^2.11.0",
64
- "@tiptap/react": "^2.11.0",
65
- "@tiptap/starter-kit": "^2.11.0",
58
+ "@tiptap/extension-code-block": "^2.12.0",
59
+ "@tiptap/extension-image": "^2.12.0",
60
+ "@tiptap/extension-link": "^2.12.0",
61
+ "@tiptap/extension-placeholder": "^2.12.0",
62
+ "@tiptap/extension-text-style": "^2.12.0",
63
+ "@tiptap/pm": "^2.12.0",
64
+ "@tiptap/react": "^2.12.0",
65
+ "@tiptap/starter-kit": "^2.12.0",
66
66
  "blockies-ts": "^1.0.0",
67
67
  "classnames": "^2.5.0",
68
- "framer-motion": "^12.7.0",
68
+ "framer-motion": "^12.11.0",
69
69
  "luxon": "^3.6.0",
70
70
  "react-dropzone": "^14.3.0",
71
71
  "react-imask": "^7.6.0",
@@ -74,21 +74,21 @@
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@tailwindcss/typography": "^0.5.0",
77
- "@tanstack/react-query": "^5.74.0",
77
+ "@tanstack/react-query": "^5.76.0",
78
78
  "react": "^18.2.0 || ^19.0.0",
79
79
  "react-dom": "^18.2.0 || ^19.0.0",
80
- "react-hook-form": "^7.55.0",
80
+ "react-hook-form": "^7.56.0",
81
81
  "tailwindcss": "^3.4.0",
82
- "viem": "^2.27.0",
83
- "wagmi": "^2.14.0"
82
+ "viem": "^2.29.0",
83
+ "wagmi": "^2.15.0"
84
84
  },
85
85
  "devDependencies": {
86
- "@babel/core": "^7.26.10",
87
- "@babel/preset-env": "^7.26.9",
88
- "@babel/preset-react": "^7.26.3",
89
- "@babel/preset-typescript": "^7.27.0",
86
+ "@babel/core": "^7.27.1",
87
+ "@babel/preset-env": "^7.27.2",
88
+ "@babel/preset-react": "^7.27.1",
89
+ "@babel/preset-typescript": "^7.27.1",
90
90
  "@changesets/changelog-github": "^0.5.1",
91
- "@changesets/cli": "^2.29.2",
91
+ "@changesets/cli": "^2.29.4",
92
92
  "@hookform/devtools": "^4.4.0",
93
93
  "@rollup/plugin-commonjs": "^28.0.3",
94
94
  "@rollup/plugin-image": "^3.0.3",
@@ -107,19 +107,19 @@
107
107
  "@svgr/rollup": "^8.1.0",
108
108
  "@svgr/webpack": "^8.1.0",
109
109
  "@tailwindcss/typography": "^0.5.16",
110
- "@tanstack/react-query": "^5.74.4",
110
+ "@tanstack/react-query": "^5.76.0",
111
111
  "@testing-library/dom": "^10.4.0",
112
112
  "@testing-library/jest-dom": "^6.6.3",
113
113
  "@testing-library/react": "^16.3.0",
114
114
  "@testing-library/user-event": "^14.6.1",
115
115
  "@types/jest": "^29.5.14",
116
116
  "@types/luxon": "^3.6.2",
117
- "@types/react": "^19.1.1",
118
- "@types/react-dom": "^19.1.2",
119
- "@types/sanitize-html": "^2.15.0",
117
+ "@types/react": "^19.1.3",
118
+ "@types/react-dom": "^19.1.4",
119
+ "@types/sanitize-html": "^2.16.0",
120
120
  "autoprefixer": "^10.4.21",
121
121
  "cross-env": "^7.0.3",
122
- "eslint": "^9.25.1",
122
+ "eslint": "^9.26.0",
123
123
  "eslint-import-resolver-typescript": "^4.3.4",
124
124
  "eslint-plugin-import": "^2.31.0",
125
125
  "eslint-plugin-jsx-a11y": "^6.10.2",
@@ -131,7 +131,7 @@
131
131
  "husky": "^9.1.7",
132
132
  "jest": "^29.7.0",
133
133
  "jest-environment-jsdom": "^29.7.0",
134
- "lint-staged": "^15.5.1",
134
+ "lint-staged": "^16.0.0",
135
135
  "postcss": "^8.5.3",
136
136
  "postcss-loader": "^8.1.1",
137
137
  "prettier": "^3.5.3",
@@ -139,8 +139,8 @@
139
139
  "prettier-plugin-tailwindcss": "^0.6.11",
140
140
  "react": "^19.1.0",
141
141
  "react-dom": "^19.1.0",
142
- "react-hook-form": "^7.56.0",
143
- "rollup": "^4.40.0",
142
+ "react-hook-form": "^7.56.3",
143
+ "rollup": "^4.40.2",
144
144
  "rollup-plugin-peer-deps-external": "^2.2.4",
145
145
  "rollup-plugin-postcss": "^4.0.2",
146
146
  "rollup-plugin-visualizer": "^5.14.0",
@@ -148,10 +148,10 @@
148
148
  "tailwindcss": "^3.4.17",
149
149
  "ts-jest": "^29.3.2",
150
150
  "typescript": "^5.8.3",
151
- "typescript-eslint": "^8.31.0",
152
- "vercel": "^41.6.1",
153
- "viem": "^2.27.2",
154
- "wagmi": "^2.14.16"
151
+ "typescript-eslint": "^8.32.1",
152
+ "vercel": "^41.7.4",
153
+ "viem": "^2.29.2",
154
+ "wagmi": "^2.15.2"
155
155
  },
156
156
  "bugs": {
157
157
  "url": "https://github.com/aragon/gov-ui-kit/issues"