@aragon/gov-ui-kit 1.0.64 → 1.0.66
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.
- package/CHANGELOG.md +30 -0
- package/build.css +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/types/src/core/components/alerts/alertCard/alertCard.d.ts +0 -8
- package/dist/types/src/core/components/alerts/alertInline/alertInline.d.ts +0 -1
- package/dist/types/src/core/components/dialogs/dialog/dialogContent/dialogContent.d.ts +9 -3
- package/dist/types/src/core/components/dialogs/dialog/dialogFooter/dialogFooter.d.ts +15 -14
- package/dist/types/src/core/components/dialogs/dialog/dialogHeader/dialogHeader.d.ts +3 -22
- package/dist/types/src/core/components/dialogs/dialog/dialogRoot/dialogRoot.api.d.ts +10 -0
- package/dist/types/src/core/components/dialogs/dialog/dialogRoot/dialogRoot.d.ts +0 -3
- package/dist/types/src/core/components/dialogs/dialog/dialogRoot/dialogRootHiddenElement.d.ts +11 -0
- package/dist/types/src/core/components/dialogs/dialog/dialogStoryComponent.d.ts +1 -0
- package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertContent/dialogAlertContent.d.ts +5 -3
- package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertContext/dialogAlertContext.d.ts +5 -0
- package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertContext/index.d.ts +1 -0
- package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertFooter/dialogAlertFooter.d.ts +5 -12
- package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertHeader/dialogAlertHeader.d.ts +1 -10
- package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertRoot/dialogAlertRoot.api.d.ts +55 -0
- package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertRoot/dialogAlertRoot.d.ts +1 -53
- package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertRoot/dialogAlertRootHiddenElement.d.ts +11 -0
- package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertRoot/index.d.ts +2 -1
- package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertStoryComponent.d.ts +2 -0
- package/dist/types/src/core/test/utils/testLogger.d.ts +2 -0
- package/dist/types/src/modules/assets/copy/modulesCopy.d.ts +1 -1
- package/dist/types/src/modules/hooks/useBlockExplorer/index.d.ts +2 -1
- package/dist/types/src/modules/hooks/useBlockExplorer/useBlockExplorer.api.d.ts +57 -0
- package/dist/types/src/modules/hooks/useBlockExplorer/useBlockExplorer.d.ts +2 -45
- package/package.json +25 -24
- package/src/theme/tokens/primitives/typography.css +3 -3
|
@@ -16,12 +16,4 @@ export interface IAlertCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
16
16
|
*/
|
|
17
17
|
variant?: AlertVariant;
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
20
|
-
* AlertCard Component
|
|
21
|
-
*
|
|
22
|
-
* Displays an alert card with an icon, a main message, and an optional description.
|
|
23
|
-
*
|
|
24
|
-
* @param {IAlertCardProps} props - Component properties.
|
|
25
|
-
* @returns {React.ReactElement} Rendered AlertCard component.
|
|
26
|
-
*/
|
|
27
19
|
export declare const AlertCard: React.FC<IAlertCardProps>;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
export interface IDialogContentProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* Optional description of the dialog.
|
|
6
|
+
*/
|
|
7
|
+
description?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Removes the default paddings when set to true.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
noInset?: boolean;
|
|
4
13
|
}
|
|
5
|
-
/**
|
|
6
|
-
* `Dialog.Content` component.
|
|
7
|
-
*/
|
|
8
14
|
export declare const DialogContent: React.FC<IDialogContentProps>;
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
export type IDialogFooterAction = (Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> | Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'type'>) & Pick<IButtonBaseProps, 'iconRight' | 'iconLeft' | 'disabled' | 'isLoading'> & {
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { type IButtonProps } from '../../../button';
|
|
3
|
+
export type IDialogFooterAction = Exclude<IButtonProps, 'children' | 'variant'> & {
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* Label of the action button.
|
|
7
6
|
*/
|
|
8
7
|
label: string;
|
|
9
8
|
};
|
|
10
9
|
export interface IDialogFooterProps extends ComponentPropsWithoutRef<'div'> {
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
alert?: IAlertInlineProps;
|
|
15
|
-
/**
|
|
16
|
-
* Dialog primary action button
|
|
11
|
+
* Primary action of the dialog.
|
|
17
12
|
*/
|
|
18
13
|
primaryAction?: IDialogFooterAction;
|
|
19
14
|
/**
|
|
20
|
-
*
|
|
15
|
+
* Secondary action of the dialog.
|
|
21
16
|
*/
|
|
22
17
|
secondaryAction?: IDialogFooterAction;
|
|
18
|
+
/**
|
|
19
|
+
* Variant of the dialog footer.
|
|
20
|
+
* @default default
|
|
21
|
+
*/
|
|
22
|
+
variant?: 'default' | 'wizard';
|
|
23
|
+
/**
|
|
24
|
+
* Displays the primary actions with error variant when set to true.
|
|
25
|
+
*/
|
|
26
|
+
hasError?: boolean;
|
|
23
27
|
}
|
|
24
|
-
/**
|
|
25
|
-
* `Dialog.Footer` component
|
|
26
|
-
*/
|
|
27
28
|
export declare const DialogFooter: React.FC<IDialogFooterProps>;
|
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
export interface IDialogHeaderProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
description?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Indicates whether a back button should be shown
|
|
9
|
-
* @default false
|
|
10
|
-
*/
|
|
11
|
-
showBackButton?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Accessible title summarizing dialog's content or purpose. Will be announced when
|
|
14
|
-
* dialog is opened.
|
|
4
|
+
* Title of the dialog displayed on the header and used as the dialog's accessible name.
|
|
15
5
|
*/
|
|
16
6
|
title: string;
|
|
17
7
|
/**
|
|
18
|
-
* Callback
|
|
19
|
-
*/
|
|
20
|
-
onBackClick?: () => void;
|
|
21
|
-
/**
|
|
22
|
-
* Callback invoked when the close button is clicked. Closes the dialog by default
|
|
8
|
+
* Callback triggered on close button click. The close button is not displayed when the property is not set.
|
|
23
9
|
*/
|
|
24
|
-
|
|
10
|
+
onClose?: () => void;
|
|
25
11
|
}
|
|
26
|
-
/**
|
|
27
|
-
* `Dialog.Header` component
|
|
28
|
-
*
|
|
29
|
-
* **NOTE**: This component must be used inside a `<Dialog.Root />` component.
|
|
30
|
-
*/
|
|
31
12
|
export declare const DialogHeader: React.FC<IDialogHeaderProps>;
|
|
@@ -56,4 +56,14 @@ export interface IDialogRootProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
56
56
|
* @default true
|
|
57
57
|
*/
|
|
58
58
|
useFocusTrap?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* An accessible and hidden title for the dialog, to be used when implementing a dialog without a Dialog.Header
|
|
61
|
+
* component.
|
|
62
|
+
*/
|
|
63
|
+
hiddenTitle?: string;
|
|
64
|
+
/**
|
|
65
|
+
* An accessible and hidden description for the dialog, to be used when implementing a dialog without a description
|
|
66
|
+
* on the Dialog.Content component.
|
|
67
|
+
*/
|
|
68
|
+
hiddenDescription?: string;
|
|
59
69
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IDialogRootHiddenElementProps {
|
|
2
|
+
/**
|
|
3
|
+
* Label to be rendered for screen readers only.
|
|
4
|
+
*/
|
|
5
|
+
label?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Type of element to be displayed.
|
|
8
|
+
*/
|
|
9
|
+
type: 'title' | 'description';
|
|
10
|
+
}
|
|
11
|
+
export declare const DialogRootHiddenElement: React.FC<IDialogRootHiddenElementProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DialogStoryComponent: (component: "header" | "content" | "footer" | "root") => (props: object) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
export interface IDialogAlertContentProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* Removes the default paddings when set to true.
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
noInset?: boolean;
|
|
4
9
|
}
|
|
5
|
-
/**
|
|
6
|
-
* `DialogAlert.Content` component.
|
|
7
|
-
*/
|
|
8
10
|
export declare const DialogAlertContent: React.FC<IDialogAlertContentProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IDialogAlertRootProps } from '../dialogAlertRoot';
|
|
2
|
+
export interface IDialogAlertContext extends Required<Pick<IDialogAlertRootProps, 'variant'>> {
|
|
3
|
+
}
|
|
4
|
+
export declare const DialogAlertContextProvider: import("react").Provider<IDialogAlertContext | null>;
|
|
5
|
+
export declare const useDialogAlertContext: () => IDialogAlertContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DialogAlertContextProvider, useDialogAlertContext, type IDialogAlertContext } from './dialogAlertContext';
|
package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertFooter/dialogAlertFooter.d.ts
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
export type IDialogAlertFooterAction = (Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> | Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'>) & Pick<IButtonBaseProps, 'iconRight' | 'iconLeft' | 'disabled' | 'isLoading'> & {
|
|
2
|
+
import { type IButtonProps } from '../../../button';
|
|
3
|
+
export type IDialogAlertFooterAction = Exclude<IButtonProps, 'children' | 'variant'> & {
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* Label of the action button.
|
|
7
6
|
*/
|
|
8
7
|
label: string;
|
|
9
8
|
};
|
|
10
9
|
export interface IDialogAlertFooterProps {
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
11
|
+
* Action button of the alert dialog.
|
|
13
12
|
*/
|
|
14
13
|
actionButton: IDialogAlertFooterAction;
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
17
|
-
* or cancelling the action
|
|
15
|
+
* Secondary button of the alert dialog used for dismissing the dialog or cancelling the action.
|
|
18
16
|
*/
|
|
19
17
|
cancelButton: IDialogAlertFooterAction;
|
|
20
18
|
}
|
|
21
|
-
/**
|
|
22
|
-
* `DialogAlert.Footer` component
|
|
23
|
-
*
|
|
24
|
-
* **NOTE**: This component must be used inside a `<DialogAlert.Root />` component.
|
|
25
|
-
*/
|
|
26
19
|
export declare const DialogAlertFooter: React.FC<IDialogAlertFooterProps>;
|
package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertHeader/dialogAlertHeader.d.ts
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
export interface IDialogAlertHeaderProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
/**
|
|
4
4
|
* Title summarizing dialog's content or purpose.
|
|
5
5
|
*/
|
|
6
6
|
title: string;
|
|
7
|
-
/**
|
|
8
|
-
* Optional visually hidden description announced when the dialog is opened for accessibility.
|
|
9
|
-
*/
|
|
10
|
-
description?: string;
|
|
11
7
|
}
|
|
12
|
-
/**
|
|
13
|
-
* `DialogAlert.Header` component
|
|
14
|
-
*
|
|
15
|
-
* **NOTE**: This component must be used inside a `<DialogAlert.Root />` component.
|
|
16
|
-
*/
|
|
17
8
|
export declare const DialogAlertHeader: React.FC<IDialogAlertHeaderProps>;
|
package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertRoot/dialogAlertRoot.api.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export type DialogAlertVariant = 'critical' | 'info' | 'success' | 'warning';
|
|
3
|
+
export interface IDialogAlertRootProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* Children of the component.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Additional CSS class names for custom styling of the dialog's content container.
|
|
10
|
+
*/
|
|
11
|
+
containerClassName?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Manages the visibility state of the dialog. Should be implemented alongside `onOpenChange` for controlled usage.
|
|
14
|
+
*/
|
|
15
|
+
open?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Additional CSS class names for custom styling of the overlay behind the dialog.
|
|
18
|
+
*/
|
|
19
|
+
overlayClassName?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The visual style variant of the dialog.
|
|
22
|
+
* @default info
|
|
23
|
+
*/
|
|
24
|
+
variant?: DialogAlertVariant;
|
|
25
|
+
/**
|
|
26
|
+
* Callback function invoked when the open state of the dialog changes.
|
|
27
|
+
*/
|
|
28
|
+
onOpenChange?: (open: boolean) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Handler called when focus moves to the trigger after closing the dialog.
|
|
31
|
+
*/
|
|
32
|
+
onCloseAutoFocus?: (e: Event) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Handler called when focus moves to the destructive action after opening the dialog.
|
|
35
|
+
*/
|
|
36
|
+
onOpenAutoFocus?: (e: Event) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Handler called when the escape key is pressed while the dialog is opened. Closes the dialog by default.
|
|
39
|
+
*/
|
|
40
|
+
onEscapeKeyDown?: (e: KeyboardEvent) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Keeps the focus inside the Alert Dialog when set to true.
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
useFocusTrap?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* An accessible and hidden title for the alert dialog, to be used when implementing a dialog without a
|
|
48
|
+
* DialogAlert.Header component.
|
|
49
|
+
*/
|
|
50
|
+
hiddenTitle?: string;
|
|
51
|
+
/**
|
|
52
|
+
* An accessible and hidden description for the alert dialog.
|
|
53
|
+
*/
|
|
54
|
+
hiddenDescription?: string;
|
|
55
|
+
}
|
package/dist/types/src/core/components/dialogs/dialogAlert/dialogAlertRoot/dialogAlertRoot.d.ts
CHANGED
|
@@ -1,54 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export type DialogAlertVariant = 'critical' | 'info' | 'success' | 'warning';
|
|
3
|
-
export interface IDialogAlertRootProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
-
/**
|
|
5
|
-
* Children of the component.
|
|
6
|
-
*/
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* Additional CSS class names for custom styling of the dialog's content container.
|
|
10
|
-
*/
|
|
11
|
-
containerClassName?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Manages the visibility state of the dialog. Should be implemented alongside `onOpenChange` for controlled usage.
|
|
14
|
-
*/
|
|
15
|
-
open?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Additional CSS class names for custom styling of the overlay behind the dialog.
|
|
18
|
-
*/
|
|
19
|
-
overlayClassName?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The visual style variant of the dialog.
|
|
22
|
-
* @default info
|
|
23
|
-
*/
|
|
24
|
-
variant?: DialogAlertVariant;
|
|
25
|
-
/**
|
|
26
|
-
* Callback function invoked when the open state of the dialog changes.
|
|
27
|
-
*/
|
|
28
|
-
onOpenChange?: (open: boolean) => void;
|
|
29
|
-
/**
|
|
30
|
-
* Handler called when focus moves to the trigger after closing the dialog.
|
|
31
|
-
*/
|
|
32
|
-
onCloseAutoFocus?: (e: Event) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Handler called when focus moves to the destructive action after opening the dialog.
|
|
35
|
-
*/
|
|
36
|
-
onOpenAutoFocus?: (e: Event) => void;
|
|
37
|
-
/**
|
|
38
|
-
* Handler called when the escape key is pressed while the dialog is opened. Closes the dialog by default.
|
|
39
|
-
*/
|
|
40
|
-
onEscapeKeyDown?: (e: KeyboardEvent) => void;
|
|
41
|
-
/**
|
|
42
|
-
* Keeps the focus inside the Alert Dialog when set to true.
|
|
43
|
-
* @default true
|
|
44
|
-
*/
|
|
45
|
-
useFocusTrap?: boolean;
|
|
46
|
-
}
|
|
47
|
-
export interface IDialogAlertContext {
|
|
48
|
-
variant: DialogAlertVariant;
|
|
49
|
-
}
|
|
50
|
-
export declare const DialogAlertContext: import("react").Context<IDialogAlertContext>;
|
|
51
|
-
/**
|
|
52
|
-
* `DialogAlert.Root` component.
|
|
53
|
-
*/
|
|
1
|
+
import type { IDialogAlertRootProps } from './dialogAlertRoot.api';
|
|
54
2
|
export declare const DialogAlertRoot: React.FC<IDialogAlertRootProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IDialogAlertRootHiddenElementProps {
|
|
2
|
+
/**
|
|
3
|
+
* Label to be rendered for screen readers only.
|
|
4
|
+
*/
|
|
5
|
+
label?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Type of element to be displayed.
|
|
8
|
+
*/
|
|
9
|
+
type: 'title' | 'description';
|
|
10
|
+
}
|
|
11
|
+
export declare const DialogAlertRootHiddenElement: React.FC<IDialogAlertRootHiddenElementProps>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { DialogAlertRoot } from './dialogAlertRoot';
|
|
2
|
+
export type { DialogAlertVariant, IDialogAlertRootProps } from './dialogAlertRoot.api';
|
|
@@ -27,7 +27,7 @@ export declare const modulesCopy: {
|
|
|
27
27
|
proposalActionsItem: {
|
|
28
28
|
dropdownLabel: string;
|
|
29
29
|
nativeSendAlert: string;
|
|
30
|
-
nativeSendDescription: (amount: string) => string;
|
|
30
|
+
nativeSendDescription: (amount: string, symbol: string) => string;
|
|
31
31
|
notVerified: {
|
|
32
32
|
function: string;
|
|
33
33
|
contract: string;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { useBlockExplorer } from './useBlockExplorer';
|
|
2
|
+
export { ChainEntityType, type IBlockExplorerDefinitions, type IBuildEntityUrlParams, type IUseBlockExplorerParams, type IUseBlockExplorerReturn, } from './useBlockExplorer.api';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Config } from 'wagmi';
|
|
2
|
+
export declare enum ChainEntityType {
|
|
3
|
+
ADDRESS = "address",
|
|
4
|
+
TRANSACTION = "tx",
|
|
5
|
+
TOKEN = "token"
|
|
6
|
+
}
|
|
7
|
+
export interface IUseBlockExplorerParams {
|
|
8
|
+
/**
|
|
9
|
+
* Chains definitions to use for returning the block explorer definitions and building the URLs. Defaults to the
|
|
10
|
+
* chains defined on the Wagmi context provider.
|
|
11
|
+
*/
|
|
12
|
+
chains?: Config['chains'];
|
|
13
|
+
/**
|
|
14
|
+
* Uses the block explorer definition of the specified Chain ID when set. Defaults to the ID of the first chain on
|
|
15
|
+
* the chains list.
|
|
16
|
+
*/
|
|
17
|
+
chainId?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface IBlockExplorerDefinitions {
|
|
20
|
+
/**
|
|
21
|
+
* Name of the block explorer.
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* URL of the block explorer.
|
|
26
|
+
*/
|
|
27
|
+
url: string;
|
|
28
|
+
}
|
|
29
|
+
export interface IUseBlockExplorerReturn {
|
|
30
|
+
/**
|
|
31
|
+
* Definitions for the requested block explorer.
|
|
32
|
+
*/
|
|
33
|
+
blockExplorer?: IBlockExplorerDefinitions;
|
|
34
|
+
/**
|
|
35
|
+
* Function to retrieve the block explorer from the given chain id. Defaults to the first block explorer of the
|
|
36
|
+
* chain defined on the hook params or on the Wagmi context provider.
|
|
37
|
+
*/
|
|
38
|
+
getBlockExplorer: (chainId?: number) => IBlockExplorerDefinitions | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Function to build the url for the given entity.
|
|
41
|
+
*/
|
|
42
|
+
buildEntityUrl: (params: IBuildEntityUrlParams) => string | undefined;
|
|
43
|
+
}
|
|
44
|
+
export interface IBuildEntityUrlParams {
|
|
45
|
+
/**
|
|
46
|
+
* The type of the entity (e.g. address, transaction, token)
|
|
47
|
+
*/
|
|
48
|
+
type: ChainEntityType;
|
|
49
|
+
/**
|
|
50
|
+
* ID of the chain related to the entity. When set, overrides the chainId set as hook parameter.
|
|
51
|
+
*/
|
|
52
|
+
chainId?: number;
|
|
53
|
+
/**
|
|
54
|
+
* The ID of the entity (e.g. transaction hash for a transaction)
|
|
55
|
+
*/
|
|
56
|
+
id?: string;
|
|
57
|
+
}
|
|
@@ -1,45 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
3
|
-
ADDRESS = "address",
|
|
4
|
-
TRANSACTION = "tx",
|
|
5
|
-
TOKEN = "token"
|
|
6
|
-
}
|
|
7
|
-
export interface IUseBlockExplorerParams {
|
|
8
|
-
/**
|
|
9
|
-
* Chains definitions to use for returning the block explorer definitions and building the URLs. Defaults to the
|
|
10
|
-
* chains defined on the Wagmi context provider.
|
|
11
|
-
*/
|
|
12
|
-
chains?: Config['chains'];
|
|
13
|
-
/**
|
|
14
|
-
* Uses the block explorer definition of the specified Chain ID when set. Defaults to the ID of the first chain on
|
|
15
|
-
* the chains list.
|
|
16
|
-
*/
|
|
17
|
-
chainId?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface IBuildEntityUrlParams {
|
|
20
|
-
/**
|
|
21
|
-
* The type of the entity (e.g. address, transaction, token)
|
|
22
|
-
*/
|
|
23
|
-
type: ChainEntityType;
|
|
24
|
-
/**
|
|
25
|
-
* ID of the chain related to the entity. When set, overrides the chainId set as hook parameter.
|
|
26
|
-
*/
|
|
27
|
-
chainId?: number;
|
|
28
|
-
/**
|
|
29
|
-
* The ID of the entity (e.g. transaction hash for a transaction)
|
|
30
|
-
*/
|
|
31
|
-
id?: string;
|
|
32
|
-
}
|
|
33
|
-
export declare const useBlockExplorer: (params?: IUseBlockExplorerParams) => {
|
|
34
|
-
blockExplorer: {
|
|
35
|
-
name: string;
|
|
36
|
-
url: string;
|
|
37
|
-
apiUrl?: string | undefined;
|
|
38
|
-
} | undefined;
|
|
39
|
-
getBlockExplorer: (chainId?: number) => {
|
|
40
|
-
name: string;
|
|
41
|
-
url: string;
|
|
42
|
-
apiUrl?: string | undefined;
|
|
43
|
-
} | undefined;
|
|
44
|
-
buildEntityUrl: ({ type, chainId, id }: IBuildEntityUrlParams) => string | undefined;
|
|
45
|
-
};
|
|
1
|
+
import type { IUseBlockExplorerParams, IUseBlockExplorerReturn } from './useBlockExplorer.api';
|
|
2
|
+
export declare const useBlockExplorer: (params?: IUseBlockExplorerParams) => IUseBlockExplorerReturn;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aragon/gov-ui-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.66",
|
|
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": "^12.
|
|
68
|
+
"framer-motion": "^12.4.0",
|
|
69
69
|
"luxon": "^3.5.0",
|
|
70
70
|
"react-dropzone": "^14.3.0",
|
|
71
71
|
"react-imask": "^7.6.0",
|
|
@@ -74,17 +74,17 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@tailwindcss/typography": "^0.5.0",
|
|
77
|
-
"@tanstack/react-query": "^5.
|
|
77
|
+
"@tanstack/react-query": "^5.66.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.
|
|
82
|
+
"viem": "^2.23.0",
|
|
83
83
|
"wagmi": "^2.14.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@babel/core": "^7.26.
|
|
87
|
-
"@babel/preset-env": "^7.26.
|
|
86
|
+
"@babel/core": "^7.26.8",
|
|
87
|
+
"@babel/preset-env": "^7.26.8",
|
|
88
88
|
"@babel/preset-react": "^7.26.3",
|
|
89
89
|
"@babel/preset-typescript": "^7.26.0",
|
|
90
90
|
"@hookform/devtools": "^4.3.3",
|
|
@@ -93,30 +93,31 @@
|
|
|
93
93
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
94
94
|
"@rollup/plugin-terser": "^0.4.4",
|
|
95
95
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
96
|
-
"@storybook/addon-designs": "^8.0
|
|
97
|
-
"@storybook/addon-essentials": "^8.5.
|
|
98
|
-
"@storybook/addon-links": "^8.5.
|
|
96
|
+
"@storybook/addon-designs": "^8.1.0",
|
|
97
|
+
"@storybook/addon-essentials": "^8.5.3",
|
|
98
|
+
"@storybook/addon-links": "^8.5.3",
|
|
99
99
|
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
100
100
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.5",
|
|
101
|
-
"@storybook/blocks": "^8.5.
|
|
102
|
-
"@storybook/react": "^8.5.
|
|
103
|
-
"@storybook/react-webpack5": "^8.5.
|
|
101
|
+
"@storybook/blocks": "^8.5.3",
|
|
102
|
+
"@storybook/react": "^8.5.3",
|
|
103
|
+
"@storybook/react-webpack5": "^8.5.3",
|
|
104
|
+
"@storybook/test": "^8.5.3",
|
|
104
105
|
"@svgr/rollup": "^8.1.0",
|
|
105
106
|
"@svgr/webpack": "^8.1.0",
|
|
106
107
|
"@tailwindcss/typography": "^0.5.16",
|
|
107
|
-
"@tanstack/react-query": "^5.
|
|
108
|
+
"@tanstack/react-query": "^5.66.0",
|
|
108
109
|
"@testing-library/dom": "^10.4.0",
|
|
109
110
|
"@testing-library/jest-dom": "^6.6.3",
|
|
110
111
|
"@testing-library/react": "^16.2.0",
|
|
111
|
-
"@testing-library/user-event": "^14.6.
|
|
112
|
+
"@testing-library/user-event": "^14.6.1",
|
|
112
113
|
"@types/jest": "^29.5.14",
|
|
113
114
|
"@types/luxon": "^3.4.2",
|
|
114
|
-
"@types/react": "^19.0.
|
|
115
|
+
"@types/react": "^19.0.8",
|
|
115
116
|
"@types/react-dom": "^19.0.3",
|
|
116
117
|
"@types/sanitize-html": "^2.13.0",
|
|
117
118
|
"autoprefixer": "^10.4.20",
|
|
118
119
|
"cross-env": "^7.0.3",
|
|
119
|
-
"eslint": "^9.
|
|
120
|
+
"eslint": "^9.20.0",
|
|
120
121
|
"eslint-import-resolver-typescript": "^3.7.0",
|
|
121
122
|
"eslint-plugin-import": "^2.31.0",
|
|
122
123
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
@@ -128,26 +129,26 @@
|
|
|
128
129
|
"husky": "^9.1.7",
|
|
129
130
|
"jest": "^29.7.0",
|
|
130
131
|
"jest-environment-jsdom": "^29.7.0",
|
|
131
|
-
"lint-staged": "^15.4.
|
|
132
|
+
"lint-staged": "^15.4.3",
|
|
132
133
|
"postcss": "^8.5.1",
|
|
133
134
|
"postcss-loader": "^8.1.1",
|
|
134
|
-
"prettier": "^3.
|
|
135
|
+
"prettier": "^3.5.0",
|
|
135
136
|
"prettier-plugin-organize-imports": "^4.1.0",
|
|
136
|
-
"prettier-plugin-tailwindcss": "^0.6.
|
|
137
|
+
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
137
138
|
"react": "^19.0.0",
|
|
138
139
|
"react-dom": "^19.0.0",
|
|
139
140
|
"react-hook-form": "^7.54.2",
|
|
140
|
-
"rollup": "^4.
|
|
141
|
+
"rollup": "^4.34.6",
|
|
141
142
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
142
143
|
"rollup-plugin-postcss": "^4.0.2",
|
|
143
144
|
"rollup-plugin-visualizer": "^5.14.0",
|
|
144
|
-
"storybook": "^8.5.
|
|
145
|
+
"storybook": "^8.5.3",
|
|
145
146
|
"tailwindcss": "^3.4.17",
|
|
146
147
|
"ts-jest": "^29.2.5",
|
|
147
148
|
"typescript": "^5.7.3",
|
|
148
|
-
"typescript-eslint": "^8.
|
|
149
|
-
"viem": "^2.
|
|
150
|
-
"wagmi": "^2.14.
|
|
149
|
+
"typescript-eslint": "^8.24.0",
|
|
150
|
+
"viem": "^2.23.0",
|
|
151
|
+
"wagmi": "^2.14.11"
|
|
151
152
|
},
|
|
152
153
|
"bugs": {
|
|
153
154
|
"url": "https://github.com/aragon/gov-ui-kit/issues"
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
--guk-line-height-relaxed: 1.65;
|
|
21
21
|
|
|
22
22
|
/******* Font Family *******/
|
|
23
|
-
--guk-font-family:
|
|
24
|
-
"
|
|
25
|
-
"Noto Color Emoji";
|
|
23
|
+
--guk-font-family:
|
|
24
|
+
"Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
|
|
25
|
+
"Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
@font-face {
|