@aragon/gov-ui-kit 2.3.1 → 2.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.
@@ -0,0 +1,19 @@
1
+ import type { ComponentProps } from 'react';
2
+ import { type IconType } from '../../icon';
3
+ export type DataListActionItemVariant = 'primary' | 'neutral';
4
+ export interface IDataListActionItemProps extends ComponentProps<'button'> {
5
+ /**
6
+ * Icon rendered inside the circular avatar on the left.
7
+ */
8
+ icon: IconType;
9
+ /**
10
+ * Visual variant — `primary` for affirmative actions (e.g. add),
11
+ * `neutral` for back/secondary actions.
12
+ */
13
+ variant: DataListActionItemVariant;
14
+ /**
15
+ * Row label rendered next to the avatar.
16
+ */
17
+ label: string;
18
+ }
19
+ export declare const DataListActionItem: React.FC<IDataListActionItemProps>;
@@ -0,0 +1 @@
1
+ export { DataListActionItem, type DataListActionItemVariant, type IDataListActionItemProps, } from './dataListActionItem';
@@ -1,7 +1,15 @@
1
1
  import type { AnchorHTMLAttributes, HTMLAttributes } from 'react';
2
+ export type DataListItemVariant = 'primary' | 'select';
3
+ interface IDataListItemVariantProp {
4
+ /**
5
+ * Visual variant of the item.
6
+ * @default 'primary'
7
+ */
8
+ variant?: DataListItemVariant;
9
+ }
2
10
  type DivPropsWithCustomClick = Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> & {
3
11
  onClick?: () => void;
4
12
  };
5
- export type IDataListItemProps = AnchorHTMLAttributes<HTMLAnchorElement> | DivPropsWithCustomClick;
13
+ export type IDataListItemProps = (AnchorHTMLAttributes<HTMLAnchorElement> | DivPropsWithCustomClick) & IDataListItemVariantProp;
6
14
  export declare const DataListItem: React.FC<IDataListItemProps>;
7
15
  export {};
@@ -3,8 +3,10 @@ export declare const DataList: {
3
3
  Filter: import("react").FC<import("./dataListFilter").IDataListFilterProps>;
4
4
  Container: import("react").FC<import("./dataListContainer").IDataListContainerProps>;
5
5
  Item: import("react").FC<import("./dataListItem").IDataListItemProps>;
6
+ ActionItem: import("react").FC<import("./dataListActionItem").IDataListActionItemProps>;
6
7
  Pagination: import("react").FC<import("./dataListPagination").IDataListPaginationProps>;
7
8
  };
9
+ export * from './dataListActionItem';
8
10
  export * from './dataListContainer';
9
11
  export * from './dataListFilter';
10
12
  export * from './dataListItem';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aragon/gov-ui-kit",
3
- "version": "2.3.1",
3
+ "version": "2.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",