@goodhood-web/ui 2.1.0-development.22 → 2.1.0-development.24

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.
@@ -1,8 +1,9 @@
1
1
  import { AriaRole } from 'react';
2
+ import { BadgeIconType } from '../../../../../../api/src/lib/types/newsFeeds';
2
3
  export default interface BadgeIconProps {
3
4
  ariaLabel?: string;
4
5
  className?: string;
5
6
  role?: AriaRole;
6
7
  size: 'small' | 'medium';
7
- type: 'ben' | 'localBiz' | 'localOrg' | 'is_supporter' | 'muted';
8
+ type: BadgeIconType;
8
9
  }
@@ -5,5 +5,5 @@ export default interface BadgeLabelProps {
5
5
  buttonOnClick: TextButtonProps['onClick'];
6
6
  buttonText: string;
7
7
  text: string;
8
- type: Extract<BadgeIconProps['type'], 'ben' | 'is_supporter' | 'muted'>;
8
+ type: Extract<BadgeIconProps['type'], 'is_super_neighbour' | 'is_supporter' | 'muted'>;
9
9
  }
@@ -9,7 +9,7 @@ type BaseIconButtonProps = Omit<ButtonProps, 'children' | 'ref' | 'className'> &
9
9
  iconClassName?: string;
10
10
  loading?: boolean;
11
11
  type?: 'button' | 'submit' | 'reset';
12
- variant?: 'green' | 'white';
12
+ variant?: 'green' | 'white' | 'grey';
13
13
  };
14
14
  export type IconButtonIcon24Props = {
15
15
  icon: Icon24;
@@ -1,8 +1,6 @@
1
- export type BadgeIconType = 'ben' | 'localBiz' | 'localOrg' | 'is_supporter' | 'muted';
2
1
  export type User = {
3
2
  achievements: unknown[];
4
3
  address: string | null;
5
- badges: [] | BadgeIconType[];
6
4
  business_profile_id: number | null;
7
5
  city: string;
8
6
  created_at: string;
@@ -6,7 +6,6 @@ export declare const generateSampleUser: ({ firstname, id, lastname, photo_thumb
6
6
  }) => {
7
7
  achievements: never[];
8
8
  address: null;
9
- badges: never[];
10
9
  business_profile_id: null;
11
10
  city: string;
12
11
  created_at: string;
@@ -1,4 +1,4 @@
1
1
  import { ReactElement } from 'react';
2
- import { IconProps } from './SocialIcon.types';
3
- declare const SocialIcon: ({ className, platform, role, size, style, title, }: IconProps) => ReactElement | null;
2
+ import { SocialIconProps } from './SocialIcon.types';
3
+ declare const SocialIcon: ({ className, onClick, platform, role, size, style, title, url, }: SocialIconProps) => ReactElement | null;
4
4
  export default SocialIcon;
@@ -7,12 +7,14 @@ export declare const iconNames48Dark: string[];
7
7
  export declare const iconNames48Light: string[];
8
8
  type BaseIconProps = {
9
9
  className?: string;
10
+ onClick?: () => void;
10
11
  role?: Extract<AriaRole, 'presentation' | 'img'>;
11
12
  size?: '48';
12
13
  style?: 'light' | 'dark';
13
14
  title?: string;
15
+ url?: string;
14
16
  };
15
- export type IconProps = ({
17
+ export type SocialIconProps = ({
16
18
  platform: DarkIcon48;
17
19
  } & BaseIconProps) | ({
18
20
  platform: LightIcon48;
@@ -0,0 +1,3 @@
1
+ import { ListItemClusterProps } from './ListItemCluster.types';
2
+ declare const ListItemCluster: ({ items }: ListItemClusterProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default ListItemCluster;
@@ -0,0 +1,4 @@
1
+ import { ListItemProps } from '../ListItems/ListItem.types';
2
+ export interface ListItemClusterProps {
3
+ items: ListItemProps[];
4
+ }
@@ -0,0 +1,3 @@
1
+ import { ListItemProps } from './ListItem.types';
2
+ declare const ListItem: ({ data, type }: ListItemProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ export default ListItem;
@@ -0,0 +1,9 @@
1
+ import { NeighbourListItemProps } from './Neighbour/Neighbour.types';
2
+ export declare enum EListItem {
3
+ neighbour = "neighbour",
4
+ notification = "notification"
5
+ }
6
+ export type ListItemProps = {
7
+ data: NeighbourListItemProps;
8
+ type: EListItem.neighbour;
9
+ };
@@ -0,0 +1,3 @@
1
+ import { NeighbourListItemProps } from './Neighbour.types';
2
+ declare const Neighbour: ({ address, altText, callToAction, fullName, iconType, imageUrl, linkTarget, onClick, profileUrl, }: NeighbourListItemProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Neighbour;
@@ -0,0 +1,22 @@
1
+ export interface NeighbourListItemBaseProps {
2
+ address: string;
3
+ altText: string;
4
+ callToAction?: {
5
+ label: string;
6
+ target?: string;
7
+ url: string;
8
+ };
9
+ fullName: string;
10
+ imageUrl: string;
11
+ linkTarget?: string;
12
+ profileUrl: string;
13
+ }
14
+ export interface NeighbourListItemWithIcon extends NeighbourListItemBaseProps {
15
+ iconType: 'invite_neighbour' | 'envelope';
16
+ onClick: () => void;
17
+ }
18
+ export interface NeighbourListItemWithoutIcon extends NeighbourListItemBaseProps {
19
+ iconType?: never;
20
+ onClick?: never;
21
+ }
22
+ export type NeighbourListItemProps = NeighbourListItemWithIcon | NeighbourListItemWithoutIcon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/ui",
3
- "version": "2.1.0-development.22",
3
+ "version": "2.1.0-development.24",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",