Skip to content

Commit 4778b20

Browse files
committed
chore: merge latest
2 parents 9525246 + f732799 commit 4778b20

13 files changed

Lines changed: 693 additions & 604 deletions

File tree

.changeset/witty-webs-hear.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@aragon/gov-ui-kit': minor
3+
---
4+
5+
Update minor and patch NPM dependencies

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# @aragon/gov-ui-kit
22

3+
## 1.15.0
4+
5+
### Minor Changes
6+
7+
- [#539](https://github.com/aragon/gov-ui-kit/pull/539) [`b3ace0f`](https://github.com/aragon/gov-ui-kit/commit/b3ace0fcf4814fa1d794aa790dd5c7900607571c) Thanks [@dependabot](https://github.com/apps/dependabot)! - Bump cross-env to v10
8+
9+
- [#545](https://github.com/aragon/gov-ui-kit/pull/545) [`6d634e3`](https://github.com/aragon/gov-ui-kit/commit/6d634e37248c85f3d51b30304df4cc5412ef4e61) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update minor and patch NPM dependencies
10+
11+
- [#544](https://github.com/aragon/gov-ui-kit/pull/544) [`af61040`](https://github.com/aragon/gov-ui-kit/commit/af61040cba3e10da8c9ecb1e9aa701413269c837) Thanks [@dependabot](https://github.com/apps/dependabot)! - Bump linkifyjs from 4.2.0 to 4.3.2
12+
13+
- [#543](https://github.com/aragon/gov-ui-kit/pull/543) [`6e11a08`](https://github.com/aragon/gov-ui-kit/commit/6e11a08966e508dbad765330de60b4e98649b50b) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update minor and patch NPM dependencies
14+
15+
### Patch Changes
16+
17+
- [#549](https://github.com/aragon/gov-ui-kit/pull/549) [`3194f3c`](https://github.com/aragon/gov-ui-kit/commit/3194f3cba309e8c997e18e4faaf5913779cd551c) Thanks [@milosh86](https://github.com/milosh86)! - **BREAKING CHANGE:** Update `ProposalActionsItem` and `SmartContractFunctionDataListItemStructure` to accept `functionSelector` as a prop, instead of calculating it internally
18+
19+
## 1.14.0
20+
21+
### Minor Changes
22+
23+
- [#538](https://github.com/aragon/gov-ui-kit/pull/538) [`c0375a5`](https://github.com/aragon/gov-ui-kit/commit/c0375a5f0d25ac0861c39f147d9af260b6b32928) Thanks [@thekidnamedkd](https://github.com/thekidnamedkd)! - Expose additional props on DataListContainer for more control over EmptyState usage
24+
25+
### Patch Changes
26+
27+
- [#537](https://github.com/aragon/gov-ui-kit/pull/537) [`44ec981`](https://github.com/aragon/gov-ui-kit/commit/44ec981cbff82065e6147e23ec816a783cba777c) Thanks [@evanaronson](https://github.com/evanaronson)! - Reduce text size of the descriptions on the RadioCard and CheckboxCard components
28+
329
## 1.13.1
430

531
### Patch Changes

package.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aragon/gov-ui-kit",
3-
"version": "1.13.1",
3+
"version": "1.15.0",
44
"description": "Implementation of the Aragon's Governance UI Kit",
55
"main": "dist/index.es.js",
66
"types": "dist/types/src/index.d.ts",
@@ -74,10 +74,10 @@
7474
},
7575
"peerDependencies": {
7676
"@tailwindcss/typography": "^0.5.0",
77-
"@tanstack/react-query": "^5.83.0",
77+
"@tanstack/react-query": "^5.84.0",
7878
"react": "^18.2.0 || ^19.0.0",
7979
"react-dom": "^18.2.0 || ^19.0.0",
80-
"react-hook-form": "^7.60.0",
80+
"react-hook-form": "^7.62.0",
8181
"tailwindcss": "^4.1.0",
8282
"viem": "^2.33.0",
8383
"wagmi": "^2.16.0"
@@ -95,58 +95,58 @@
9595
"@rollup/plugin-node-resolve": "^16.0.1",
9696
"@rollup/plugin-terser": "^0.4.4",
9797
"@rollup/plugin-typescript": "^12.1.4",
98-
"@storybook/addon-docs": "^9.0.17",
99-
"@storybook/react-vite": "^9.0.17",
98+
"@storybook/addon-docs": "^9.1.2",
99+
"@storybook/react-vite": "^9.1.2",
100100
"@svgr/rollup": "^8.1.0",
101101
"@tailwindcss/postcss": "^4.1.11",
102102
"@tailwindcss/typography": "^0.5.16",
103-
"@tanstack/react-query": "^5.83.0",
104-
"@testing-library/dom": "^10.4.0",
105-
"@testing-library/jest-dom": "^6.6.3",
103+
"@tanstack/react-query": "^5.84.2",
104+
"@testing-library/dom": "^10.4.1",
105+
"@testing-library/jest-dom": "^6.6.4",
106106
"@testing-library/react": "^16.3.0",
107107
"@testing-library/user-event": "^14.6.1",
108108
"@types/jest": "^30.0.0",
109-
"@types/luxon": "^3.6.2",
110-
"@types/react": "^19.1.8",
111-
"@types/react-dom": "^19.1.6",
109+
"@types/luxon": "^3.7.1",
110+
"@types/react": "^19.1.10",
111+
"@types/react-dom": "^19.1.7",
112112
"@types/sanitize-html": "^2.16.0",
113-
"cross-env": "^7.0.3",
114-
"eslint": "^9.31.0",
113+
"cross-env": "^10.0.0",
114+
"eslint": "^9.33.0",
115115
"eslint-import-resolver-typescript": "^4.4.4",
116116
"eslint-plugin-import": "^2.32.0",
117117
"eslint-plugin-jsx-a11y": "^6.10.2",
118118
"eslint-plugin-react": "^7.37.5",
119119
"eslint-plugin-react-hooks": "^5.2.0",
120-
"eslint-plugin-storybook": "^9.0.17",
121-
"eslint-plugin-testing-library": "^7.6.0",
120+
"eslint-plugin-storybook": "^9.1.2",
121+
"eslint-plugin-testing-library": "^7.6.6",
122122
"husky": "^9.1.7",
123123
"jest": "^30.0.5",
124124
"jest-environment-jsdom": "^30.0.5",
125-
"lint-staged": "^16.1.2",
125+
"lint-staged": "^16.1.5",
126126
"postcss": "^8.5.6",
127127
"postcss-loader": "^8.1.1",
128128
"prettier": "^3.6.2",
129-
"prettier-plugin-organize-imports": "^4.1.0",
129+
"prettier-plugin-organize-imports": "^4.2.0",
130130
"prettier-plugin-tailwindcss": "^0.6.14",
131131
"react": "^19.1.0",
132132
"react-dom": "^19.1.0",
133-
"react-hook-form": "^7.60.0",
134-
"rollup": "^4.45.1",
133+
"react-hook-form": "^7.62.0",
134+
"rollup": "^4.46.2",
135135
"rollup-plugin-peer-deps-external": "^2.2.4",
136136
"rollup-plugin-postcss": "^4.0.2",
137137
"rollup-plugin-visualizer": "^6.0.3",
138-
"storybook": "^9.0.17",
138+
"storybook": "^9.1.2",
139139
"tailwindcss": "^4.1.11",
140-
"ts-jest": "^29.4.0",
141-
"typescript": "^5.8.3",
142-
"typescript-eslint": "^8.38.0",
143-
"vercel": "^44.5.1",
144-
"viem": "^2.33.0",
145-
"vite": "^7.0.5",
140+
"ts-jest": "^29.4.1",
141+
"typescript": "^5.9.2",
142+
"typescript-eslint": "^8.39.1",
143+
"vercel": "^44.7.3",
144+
"viem": "^2.33.3",
145+
"vite": "^7.1.2",
146146
"vite-plugin-node-polyfills": "^0.24.0",
147147
"vite-plugin-static-copy": "^3.1.1",
148148
"vite-plugin-svgr": "^4.3.0",
149-
"wagmi": "^2.16.0"
149+
"wagmi": "^2.16.3"
150150
},
151151
"bugs": {
152152
"url": "https://github.com/aragon/gov-ui-kit/issues"

src/core/components/forms/checkboxCard/checkboxCard.tsx

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,22 @@ export const CheckboxCard = forwardRef<HTMLButtonElement, ICheckboxCardProps>((p
6464
const randomId = useRandomId(id);
6565
const labelId = `${randomId}-label`;
6666

67+
const containerClasses = classNames(
68+
'group flex min-w-0 cursor-pointer flex-col gap-3 outline-hidden transition-all', // Layout
69+
'bg-neutral-0 focus-ring-primary rounded-xl border px-4 py-3 md:gap-4 md:px-6 md:py-4', // Style
70+
'border-primary-400 shadow-primary hover:shadow-primary-md', // Checked/indeterminate & hover
71+
'data-[state=unchecked]:enabled:shadow-neutral-sm data-[state=unchecked]:enabled:border-neutral-100', // Unchecked
72+
'data-[state=unchecked]:enabled:hover:shadow-neutral', // Unchecked hover
73+
'disabled:cursor-default disabled:border-neutral-300 disabled:bg-neutral-100 disabled:shadow-none', // Checked/indeterminate & disabled
74+
'disabled:data-[state=unchecked]:border-neutral-200', // Disabled & unchecked
75+
className,
76+
);
77+
78+
const labelClasses = classNames(
79+
'max-w-full cursor-pointer truncate text-neutral-800 group-data-[state=unchecked]:text-neutral-800 md:text-base',
80+
'group-data-disabled:cursor-default group-data-[state=unchecked]:group-data-disabled:text-neutral-300',
81+
);
82+
6783
return (
6884
<RadixCheckbox.Root
6985
id={randomId}
@@ -72,28 +88,13 @@ export const CheckboxCard = forwardRef<HTMLButtonElement, ICheckboxCardProps>((p
7288
checked={checked}
7389
onCheckedChange={onCheckedChange}
7490
disabled={disabled}
75-
className={classNames(
76-
'group flex min-w-0 cursor-pointer flex-col gap-3 outline-hidden transition-all', // Layout
77-
'bg-neutral-0 focus-ring-primary rounded-xl border px-4 py-3 md:gap-4 md:px-6 md:py-4', // Style
78-
'border-primary-400 shadow-primary hover:shadow-primary-md', // Checked/indeterminate & hover
79-
'data-[state=unchecked]:enabled:shadow-neutral-sm data-[state=unchecked]:enabled:border-neutral-100', // Unchecked
80-
'data-[state=unchecked]:enabled:hover:shadow-neutral', // Unchecked hover
81-
'disabled:cursor-default disabled:border-neutral-300 disabled:bg-neutral-100 disabled:shadow-none', // Checked/indeterminate & disabled
82-
'disabled:data-[state=unchecked]:border-neutral-200', // Disabled & unchecked
83-
className,
84-
)}
91+
className={containerClasses}
8592
{...otherProps}
8693
>
8794
<div className={classNames('flex w-full min-w-0 flex-row gap-3', { 'items-center': !description })}>
8895
{avatar && <Avatar size="sm" responsiveSize={{ md: 'md' }} src={avatar} />}
89-
<div className="flex min-w-0 flex-1 flex-col items-start gap-0.5 text-sm leading-tight font-normal md:gap-1 md:text-base">
90-
<p
91-
id={randomId}
92-
className={classNames(
93-
'max-w-full cursor-pointer truncate text-neutral-800 group-data-[state=unchecked]:text-neutral-800',
94-
'group-data-disabled:cursor-default group-data-[state=unchecked]:group-data-disabled:text-neutral-300',
95-
)}
96-
>
96+
<div className="flex min-w-0 flex-1 flex-col items-start gap-0.5 text-sm leading-tight font-normal md:gap-1">
97+
<p id={randomId} className={labelClasses}>
9798
{label}
9899
</p>
99100
{description && (

src/core/components/forms/radioCard/radioCard.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,8 @@ export const RadioCard = forwardRef<HTMLButtonElement, IRadioCardProps>((props,
5353
className,
5454
);
5555

56-
const baseTextClasses =
57-
'text-sm leading-tight text-left text-neutral-500 md:text-base w-full group-disabled:text-neutral-300 truncate';
58-
5956
const labelClasses = classNames(
60-
baseTextClasses,
57+
'text-left text-neutral-500 w-full group-disabled:text-neutral-300 truncate md:text-base',
6158
'group-data-[state=checked]:text-neutral-800 group-data-[state=checked]:group-disabled:text-neutral-800',
6259
);
6360

@@ -74,15 +71,17 @@ export const RadioCard = forwardRef<HTMLButtonElement, IRadioCardProps>((props,
7471
<div className="flex size-full items-center gap-x-3 md:gap-x-4">
7572
{avatar && <Avatar size="sm" responsiveSize={{ md: 'md' }} src={avatar} />}
7673
<div
77-
className={classNames('flex min-w-0 flex-1 gap-x-0.5 md:gap-x-4', {
78-
'items-center': !description,
79-
})}
74+
className={classNames('flex min-w-0 flex-1 gap-x-0.5 md:gap-x-4', { 'items-center': !description })}
8075
>
81-
<div className="flex min-w-0 flex-1 flex-col gap-y-0.5 md:gap-y-1">
76+
<div className="flex min-w-0 flex-1 flex-col gap-y-0.5 text-sm leading-tight font-normal md:gap-y-1">
8277
<p className={labelClasses} id={labelId}>
8378
{label}
8479
</p>
85-
{description && <p className={baseTextClasses}>{description}</p>}
80+
{description && (
81+
<p className="w-full truncate text-left text-neutral-500 group-disabled:text-neutral-300">
82+
{description}
83+
</p>
84+
)}
8685
</div>
8786
{tag && <Tag {...tag} />}
8887
</div>

src/modules/components/proposal/proposalActions/proposalActionsDecoder/proposalActionsDecoderTextField/proposalActionsDecoderTextFieldEdit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const ProposalActionsDecoderTextFieldEdit: React.FC<IProposalActionsDecod
4545
const newValue = event.target.value;
4646
const parsedValue = proposalActionsDecoderUtils.validateBoolean(newValue)
4747
? newValue === 'true'
48-
: newValue.toString().toLocaleLowerCase();
48+
: newValue.toLocaleLowerCase();
4949
onChange(parsedValue);
5050
} else if (proposalActionsDecoderUtils.isNumberType(type)) {
5151
// Allow only numbers and one "-" negative sign

src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItem.api.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ export interface IProposalActionsItemProps<TAction extends IProposalAction = IPr
2626
* Proposal action to be rendered.
2727
*/
2828
action: TAction;
29+
/**
30+
* Function selector of the action to be displayed optionally.
31+
*/
32+
actionFunctionSelector?: string;
2933
/**
3034
* Index of the action injected by the <ProposalActions.Container /> component.
3135
*/

src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItem.stories.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export const VerifiedDecoded: Story = {
7878
],
7979
},
8080
}),
81+
actionFunctionSelector: '0x7ff36ab5',
8182
},
8283
};
8384

@@ -98,6 +99,7 @@ export const VerifiedRaw: Story = {
9899
parameters: [],
99100
},
100101
}),
102+
actionFunctionSelector: '0x7ff36ab5',
101103
},
102104
};
103105

src/modules/components/proposal/proposalActions/proposalActionsItem/proposalActionsItem.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const ProposalActionsItem = <TAction extends IProposalAction = IProposalA
2222
) => {
2323
const {
2424
action,
25+
actionFunctionSelector,
2526
index,
2627
value,
2728
CustomComponent,
@@ -81,10 +82,10 @@ export const ProposalActionsItem = <TAction extends IProposalAction = IProposalA
8182
<Accordion.Item value={value ?? index.toString()} ref={itemRef}>
8283
<Accordion.ItemHeader className="min-w-0">
8384
<SmartContractFunctionDataListItem.Structure
84-
functionName={action.inputData?.function}
8585
contractName={action.inputData?.contract}
8686
contractAddress={action.to}
87-
functionParameters={action.inputData?.parameters}
87+
functionName={action.inputData?.function}
88+
functionSelector={actionFunctionSelector}
8889
chainId={chainId}
8990
className="w-full bg-transparent"
9091
asChild={true}

src/modules/components/smartContract/smartContractFunctionDataListItem/smartContractFunctionDataListItemStructure/smartContractFunctionDataListItemStructure.stories.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,14 @@ export const Unverified: Story = {
3636
};
3737

3838
/**
39-
* Usage example of the SmartContractFunctionDataListItem.Structure component with a function signature.
39+
* Usage example of the SmartContractFunctionDataListItem.Structure component with a function selector.
4040
*/
41-
export const WithFunctionSignature: Story = {
41+
export const WithFunctionSelector: Story = {
4242
args: {
4343
contractAddress: '0x1234567890abcdef1234567890abcdef12345678',
4444
contractName: 'Uniswap V2 Router',
4545
functionName: 'addLiquidity',
46-
functionParameters: [
47-
{ name: 'tokenA', type: 'address', value: 0 },
48-
{ name: 'tokenB', type: 'address', value: 0 },
49-
],
46+
functionSelector: '0x7ff36ab5',
5047
},
5148
};
5249

0 commit comments

Comments
 (0)