@goodhood-web/ui 1.2.0-development.6 → 1.2.0-development.7

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,12 +1,12 @@
1
1
  import { ButtonOwnProps } from '@mui/base';
2
- import { AriaRole } from 'react';
2
+ import { AriaRole, ForwardedRef, MouseEvent } from 'react';
3
3
  export interface BaseButtonProps extends ButtonOwnProps {
4
4
  ariaLabel?: string;
5
5
  ariaLabelledBy?: string;
6
6
  className?: string;
7
7
  disabled?: boolean;
8
- onClick: (event: React.MouseEvent<HTMLElement>) => void;
9
- ref?: React.ForwardedRef<null>;
8
+ onClick: (event: MouseEvent<HTMLElement>) => void;
9
+ ref?: ForwardedRef<null>;
10
10
  role?: AriaRole;
11
11
  selected?: boolean;
12
12
  }
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from 'react';
2
2
  import { CardBodyProps } from './CardBody/CardBody.types';
3
3
  import { CardHeaderProps } from './CardHeader/CardHeader.type';
4
4
  export interface CardProps {
5
5
  ariaLabel?: string;
6
6
  as?: Extract<keyof JSX.IntrinsicElements, 'section' | 'div'>;
7
7
  borderRadius?: boolean;
8
- children: React.ReactElement<CardBodyProps | CardHeaderProps> | React.ReactElement<CardBodyProps | CardHeaderProps>[];
8
+ children: ReactElement<CardBodyProps | CardHeaderProps> | ReactElement<CardBodyProps | CardHeaderProps>[];
9
9
  className?: string;
10
10
  role?: string;
11
11
  }
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- export declare const findAllowedElement: (elements: React.ReactNode, type: React.ElementType) => React.ReactNode;
3
- export declare const filterAllowedElements: (elements: React.ReactNode, allowedElements: React.ElementType[]) => React.ReactNode[];
1
+ import { ElementType, ReactNode } from 'react';
2
+ export declare const findAllowedElement: (elements: ReactNode, type: ElementType) => ReactNode;
3
+ export declare const filterAllowedElements: (elements: ReactNode, allowedElements: ElementType[]) => ReactNode[];
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import { ReactNode } from 'react';
2
2
  export interface CardBodyProps {
3
- children: React.ReactNode;
3
+ children: ReactNode;
4
4
  className?: string;
5
5
  }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from 'react';
2
2
  import { BaseButtonProps } from '../../BaseButton/BaseButton';
3
3
  import { IconProps } from '../../Icon/Icon.types';
4
4
  import { IconButtonProps } from '../../IconButton/IconButton.types';
@@ -6,7 +6,7 @@ import { TypographyProps } from '../../Typography/Typography.types';
6
6
  export type CardHeaderProps = {
7
7
  as?: Exclude<TypographyProps['as'], 'h1' | 'p' | 'span'>;
8
8
  headline: string;
9
- leftElement?: React.ReactElement<IconProps | IconButtonProps>;
10
- rightElement?: React.ReactElement<BaseButtonProps>;
9
+ leftElement?: ReactElement<IconProps | IconButtonProps>;
10
+ rightElement?: ReactElement<BaseButtonProps>;
11
11
  type?: Exclude<TypographyProps['type'], 'h1'>;
12
12
  };
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import { ReactNode } from 'react';
2
2
  export interface FieldsetProps {
3
- children: React.ReactNode;
3
+ children: ReactNode;
4
4
  classname?: string;
5
5
  disabled?: boolean;
6
6
  form?: string;
@@ -1,9 +1,9 @@
1
- import { HTMLProps } from 'react';
1
+ import { HTMLProps, ReactNode } from 'react';
2
2
  type NativeFormProps = HTMLProps<HTMLFormElement>;
3
3
  export type FormProps = {
4
4
  ariaLabel?: NativeFormProps['aria-label'];
5
5
  ariaLabelledBy?: NativeFormProps['aria-labelledby'];
6
- children?: React.ReactNode;
6
+ children?: ReactNode;
7
7
  className?: NativeFormProps['className'];
8
8
  id?: NativeFormProps['id'];
9
9
  };
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from 'react';
2
2
  import { Icon24, Icon32 } from '../../Icon/Icon.types';
3
3
  export type NavItemProps = {
4
4
  active?: boolean;
5
5
  ariaLabel?: string;
6
- icon: React.ReactElement<Icon32 | Icon24>;
6
+ icon: ReactElement<Icon32 | Icon24>;
7
7
  id: string;
8
8
  label?: string;
9
9
  onChange?: (id: string) => void;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from 'react';
2
2
  import { IconProps } from '../Icon/Icon.types';
3
3
  export type PlaceholderThumbnailProps = {
4
4
  className?: string;
5
- icon: React.ReactElement<IconProps>;
5
+ icon: ReactElement<IconProps>;
6
6
  variant: 'secondary1' | 'secondary2' | 'secondary3';
7
7
  };
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import { ReactNode } from 'react';
2
2
  export interface PopupProps {
3
3
  anchor?: HTMLElement | null;
4
- children: React.ReactNode;
4
+ children: ReactNode;
5
5
  id?: string;
6
6
  offset?: 'sm' | 'md' | 'lg' | 'xl';
7
7
  open: boolean;
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from 'react';
2
2
  import { BaseButtonProps } from '../BaseButton/BaseButton';
3
3
  import { IconProps } from '../Icon/Icon.types';
4
4
  import { NotificationBubbleProps } from '../NotificationBubble/NotificationBubble.types';
5
5
  export interface TextButtonProps extends Omit<BaseButtonProps, 'role' | 'className'> {
6
6
  color: 'green' | 'blue' | 'text';
7
- leftIcon?: React.ReactElement<IconProps | NotificationBubbleProps>;
8
- rightIcon?: React.ReactElement<IconProps | NotificationBubbleProps>;
7
+ leftIcon?: ReactElement<IconProps | NotificationBubbleProps>;
8
+ rightIcon?: ReactElement<IconProps | NotificationBubbleProps>;
9
9
  size: 'large' | 'medium' | 'small';
10
10
  text: string;
11
11
  }
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
2
1
  import { UseInputParameters } from '@mui/base/useInput';
2
+ import { ForwardedRef } from 'react';
3
3
  export interface TextInputProps extends UseInputParameters {
4
4
  colorScheme: 'light' | 'dark';
5
5
  errorMessage?: string;
6
6
  id: string;
7
7
  label: string;
8
8
  name?: string;
9
- ref?: React.ForwardedRef<null>;
9
+ ref?: ForwardedRef<null>;
10
10
  size: 'small' | 'medium';
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/ui",
3
- "version": "1.2.0-development.6",
3
+ "version": "1.2.0-development.7",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {