@goodhood-web/ui 1.12.0-development.2 → 1.12.0-development.21
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/index.d.ts +4 -3
- package/index.js +81 -81
- package/index.mjs +5957 -5971
- package/lib/Atoms/Badges/LabelPill/LabelPill.types.d.ts +1 -1
- package/lib/Atoms/Buttons/Button/Button.types.d.ts +11 -1
- package/lib/Atoms/Buttons/ButtonPrimary/ButtonPrimary.d.ts +1 -1
- package/lib/Atoms/Buttons/ButtonPrimary/ButtonPrimary.types.d.ts +2 -7
- package/lib/Atoms/Buttons/ButtonSecondary/ButtonSecondary.d.ts +1 -1
- package/lib/Atoms/Buttons/ButtonSecondary/ButtonSecondary.types.d.ts +3 -8
- package/lib/Atoms/Buttons/ButtonTertiary/ButtonTertiary.d.ts +1 -1
- package/lib/Atoms/Buttons/ButtonTertiary/ButtonTertiary.types.d.ts +3 -8
- package/lib/Atoms/Buttons/IconButton/IconButton.d.ts +1 -1
- package/lib/Atoms/Buttons/IconButton/IconButton.types.d.ts +5 -5
- package/lib/Atoms/Buttons/Tiles/MenuTile/MenuTile.type.d.ts +1 -1
- package/lib/Atoms/Dropdowns/DropdownHeader/DropdownHeader.d.ts +4 -0
- package/lib/Atoms/Dropdowns/DropdownHeader/DropdownHeader.types.d.ts +7 -0
- package/lib/Atoms/Dropdowns/DropdownOption/DropdownOption.d.ts +4 -0
- package/lib/Atoms/Dropdowns/DropdownOption/DropdownOption.types.d.ts +8 -0
- package/lib/Atoms/Inputs/InputDetails/InputDetails.d.ts +4 -0
- package/lib/Atoms/Inputs/InputDetails/InputDetails.types.d.ts +6 -0
- package/lib/Atoms/Inputs/TextAreaInput/TextAreaInput.d.ts +4 -0
- package/lib/Atoms/Inputs/TextAreaInput/TextAreaInput.types.d.ts +7 -0
- package/lib/Atoms/Inputs/TextInput/TextInput.d.ts +1 -1
- package/lib/Atoms/Inputs/TextInput/TextInput.types.d.ts +17 -6
- package/lib/Base/Icon/Icon.types.d.ts +3 -0
- package/lib/Molecules/ListItems/NotificationListItem/NotificationListItem.d.ts +1 -1
- package/lib/Molecules/ListItems/NotificationListItem/NotificationListItem.types.d.ts +14 -2
- package/lib/Molecules/Notices/EmptyState/EmptyState.types.d.ts +9 -1
- package/lib/Organisms/Modals/Sheet/Sheet.types.d.ts +1 -1
- package/package.json +4 -8
- package/style.css +1 -1
- package/lib/Atoms/Buttons/Tiles/PointOfInterestIProfileTile/PointOfInterestIProfileTile.d.ts +0 -4
- package/lib/Atoms/Buttons/Tiles/PointOfInterestIProfileTile/PointOfInterestIProfileTile.types.d.ts +0 -8
- package/lib/Atoms/Inputs/TextArea/TextArea.d.ts +0 -4
- package/lib/Atoms/Inputs/TextArea/TextArea.types.d.ts +0 -12
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ButtonOwnProps } from '@mui/base';
|
|
2
|
-
import { AriaRole, ForwardedRef, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { AriaRole, ForwardedRef, MouseEvent, ReactElement, ReactNode } from 'react';
|
|
3
|
+
import { IconProps } from '../../../Base/Icon/Icon.types';
|
|
3
4
|
|
|
4
5
|
interface CommonProps {
|
|
5
6
|
ariaLabel?: string;
|
|
@@ -20,5 +21,14 @@ export interface LinkProps extends CommonProps {
|
|
|
20
21
|
rel?: string;
|
|
21
22
|
target?: string;
|
|
22
23
|
}
|
|
24
|
+
export interface ButtonVariationProps {
|
|
25
|
+
fullWidth?: boolean;
|
|
26
|
+
leftIcon?: ReactElement<IconProps>;
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
rightIcon?: ReactElement<IconProps>;
|
|
29
|
+
size?: 'small' | 'medium' | 'large' | 'extraLarge';
|
|
30
|
+
target?: string;
|
|
31
|
+
text?: string;
|
|
32
|
+
}
|
|
23
33
|
export type ButtonProps = BaseButtonProps | LinkProps;
|
|
24
34
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ButtonPrimaryProps } from './ButtonPrimary.types';
|
|
2
2
|
|
|
3
|
-
declare const ButtonPrimary: ({ children, className, color, disabled, fullWidth, loading, size, text, ...props }: ButtonPrimaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const ButtonPrimary: ({ children, className, color, disabled, fullWidth, leftIcon, loading, rightIcon, size, text, ...props }: ButtonPrimaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default ButtonPrimary;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps } from '../Button/Button.types';
|
|
2
|
+
import { ButtonProps, ButtonVariationProps } from '../Button/Button.types';
|
|
3
3
|
|
|
4
|
-
export interface ButtonPrimaryProps extends Omit<ButtonProps, 'children'> {
|
|
4
|
+
export interface ButtonPrimaryProps extends ButtonVariationProps, Omit<ButtonProps, 'children'> {
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
color?: 'highlight' | 'primary' | 'transparent';
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
size?: 'tiny' | 'small' | 'medium' | 'large';
|
|
10
|
-
target?: string;
|
|
11
|
-
text?: string;
|
|
12
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ButtonSecondaryProps } from './ButtonSecondary.types';
|
|
2
2
|
|
|
3
|
-
declare const ButtonSecondary: ({ children, className, color, disabled, fullWidth, loading, size, text, ...props }: ButtonSecondaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const ButtonSecondary: ({ children, className, color, disabled, fullWidth, leftIcon, loading, rightIcon, size, text, ...props }: ButtonSecondaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default ButtonSecondary;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps } from '../Button/Button.types';
|
|
2
|
+
import { ButtonProps, ButtonVariationProps } from '../Button/Button.types';
|
|
3
3
|
|
|
4
|
-
export interface ButtonSecondaryProps extends Omit<ButtonProps, 'children'> {
|
|
4
|
+
export interface ButtonSecondaryProps extends ButtonVariationProps, Omit<ButtonProps, 'children'> {
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
color?: 'green' | 'pink' | 'grey';
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
size?: 'tiny' | 'small' | 'medium' | 'large';
|
|
10
|
-
target?: string;
|
|
11
|
-
text?: string;
|
|
6
|
+
color?: 'green' | 'pink' | 'grey' | 'teal' | 'lavender' | 'orange';
|
|
12
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ButtonTertiaryProps } from './ButtonTertiary.types';
|
|
2
2
|
|
|
3
|
-
declare const ButtonTertiary: ({ children, className, color, disabled, fullWidth, loading, size, text, ...props }: ButtonTertiaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const ButtonTertiary: ({ children, className, color, disabled, fullWidth, leftIcon, loading, rightIcon, size, text, ...props }: ButtonTertiaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default ButtonTertiary;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps } from '../Button/Button.types';
|
|
2
|
+
import { ButtonProps, ButtonVariationProps } from '../Button/Button.types';
|
|
3
3
|
|
|
4
|
-
export interface ButtonTertiaryProps extends Omit<ButtonProps, 'children'> {
|
|
4
|
+
export interface ButtonTertiaryProps extends ButtonVariationProps, Omit<ButtonProps, 'children'> {
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
color?: 'green' | 'pink' | 'blue';
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
size?: 'tiny' | 'small' | 'medium' | 'large';
|
|
10
|
-
target?: string;
|
|
11
|
-
text?: string;
|
|
6
|
+
color?: 'green' | 'pink' | 'blue' | 'deepPurple';
|
|
12
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IconButtonProps } from './IconButton.types';
|
|
2
2
|
|
|
3
|
-
declare const IconButton: ({ className, icon, iconClassName, size, variant, ...baseButtonProps }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const IconButton: ({ className, icon, iconClassName, loading, size, variant, ...baseButtonProps }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default IconButton;
|
|
@@ -8,17 +8,17 @@ type BaseIconButtonProps = Omit<ButtonProps, 'children' | 'ref' | 'className'> &
|
|
|
8
8
|
}) & {
|
|
9
9
|
className?: string;
|
|
10
10
|
iconClassName?: string;
|
|
11
|
+
loading?: boolean;
|
|
11
12
|
type?: 'button' | 'submit' | 'reset';
|
|
13
|
+
variant?: 'green' | 'white';
|
|
12
14
|
};
|
|
13
|
-
type IconButtonIcon24Props = {
|
|
15
|
+
export type IconButtonIcon24Props = {
|
|
14
16
|
icon: Icon24;
|
|
15
17
|
size?: 'small';
|
|
16
|
-
variant?: 'circular';
|
|
17
18
|
} & BaseIconButtonProps;
|
|
18
|
-
type IconButtonIcon32Props = {
|
|
19
|
+
export type IconButtonIcon32Props = {
|
|
19
20
|
icon: Icon32;
|
|
20
|
-
size
|
|
21
|
-
variant?: 'circular';
|
|
21
|
+
size?: 'medium' | 'large';
|
|
22
22
|
} & BaseIconButtonProps;
|
|
23
23
|
export type IconButtonProps = IconButtonIcon32Props | IconButtonIcon24Props;
|
|
24
24
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Icon24 } from '../../../Base/Icon/Icon.types';
|
|
2
|
+
import { ButtonProps } from '../../Buttons/Button/Button.types';
|
|
3
|
+
|
|
4
|
+
export type DropdownHeaderProps = Pick<ButtonProps, 'onClick' | 'ariaLabel' | 'ariaLabelledBy' | 'disabled' | 'role'> & {
|
|
5
|
+
icon?: Icon24;
|
|
6
|
+
text?: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ButtonProps } from '../../Buttons/Button/Button.types';
|
|
2
|
+
|
|
3
|
+
export type DropdownOptionProps = Pick<ButtonProps, 'onClick' | 'ariaLabel' | 'ariaLabelledBy' | 'disabled' | 'role'> & {
|
|
4
|
+
alt?: string;
|
|
5
|
+
isSelected?: boolean;
|
|
6
|
+
src?: string;
|
|
7
|
+
text: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TextAreaInputProps } from './TextAreaInput.types';
|
|
2
|
+
|
|
3
|
+
declare const TextAreaInput: ({ ariaDescribedby, attachment, charLimit, colorScheme, errorText, hintText, id, label, name, ref, showInputHints, size, ...props }: TextAreaInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default TextAreaInput;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IconButtonIcon24Props } from '../../Buttons/IconButton/IconButton.types';
|
|
2
|
+
import { CommonTextInputProps } from '../TextInput/TextInput.types';
|
|
3
|
+
|
|
4
|
+
export interface TextAreaInputProps extends CommonTextInputProps {
|
|
5
|
+
attachment?: Pick<IconButtonIcon24Props, 'icon' | 'onClick' | 'ariaLabel' | 'disabled'>[];
|
|
6
|
+
size: 'medium' | 'large';
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TextInputProps } from './TextInput.types';
|
|
2
2
|
|
|
3
|
-
declare const TextInput: ({ colorScheme,
|
|
3
|
+
declare const TextInput: ({ ariaDescribedby, charLimit, colorScheme, errorText, hintText, icon, id, inputFieldType, label, name, ref, showInputHints, size, textButton, ...props }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default TextInput;
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
import { UseInputParameters } from '@mui/base
|
|
2
|
-
import { ForwardedRef } from 'react';
|
|
1
|
+
import { UseInputParameters } from '@mui/base';
|
|
2
|
+
import { ForwardedRef, HTMLInputTypeAttribute } from 'react';
|
|
3
|
+
import { IconProps } from '../../../Base/Icon/Icon.types';
|
|
4
|
+
import { IconButtonIcon24Props } from '../../Buttons/IconButton/IconButton.types';
|
|
3
5
|
|
|
4
|
-
export interface
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
export interface CommonTextInputProps extends UseInputParameters {
|
|
7
|
+
ariaDescribedby?: string;
|
|
8
|
+
charLimit?: number;
|
|
9
|
+
colorScheme?: 'outline' | 'filled';
|
|
10
|
+
errorText?: string;
|
|
11
|
+
hintText?: string;
|
|
7
12
|
id: string;
|
|
8
13
|
label: string;
|
|
9
14
|
name?: string;
|
|
10
15
|
ref?: ForwardedRef<null>;
|
|
11
|
-
|
|
16
|
+
showInputHints?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface TextInputProps extends CommonTextInputProps {
|
|
19
|
+
icon?: IconProps;
|
|
20
|
+
inputFieldType?: HTMLInputTypeAttribute;
|
|
21
|
+
size: 'medium' | 'large' | 'small';
|
|
22
|
+
textButton?: IconButtonIcon24Props;
|
|
12
23
|
}
|
|
@@ -6,6 +6,9 @@ import { default as icons32 } from './icons/32x32';
|
|
|
6
6
|
export type Icon32 = keyof typeof icons32;
|
|
7
7
|
export type Icon24 = keyof typeof icons24;
|
|
8
8
|
export type Icon16 = keyof typeof icons16;
|
|
9
|
+
export declare const iconNames16: string[];
|
|
10
|
+
export declare const iconNames24: string[];
|
|
11
|
+
export declare const iconNames32: string[];
|
|
9
12
|
type BaseIconProps = {
|
|
10
13
|
className?: string;
|
|
11
14
|
role?: Extract<AriaRole, 'presentation' | 'img'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { NotificationListItemProps } from './NotificationListItem.types';
|
|
2
2
|
|
|
3
|
-
declare const NotificationListItem: ({
|
|
3
|
+
declare const NotificationListItem: ({ linkText, onNotificationClick, primaryImg, secondaryImg, timeAgo, title, unread, }: NotificationListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default NotificationListItem;
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
+
type Shape = 'circular' | 'square';
|
|
4
|
+
export type NotificationListItemImageProps = {
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
imageURL: string | null | undefined;
|
|
7
|
+
shape: Shape;
|
|
8
|
+
};
|
|
3
9
|
export interface NotificationListItemProps {
|
|
4
|
-
defaultIcon?: React.ReactNode;
|
|
5
|
-
imgSrc?: string;
|
|
6
10
|
linkText: string;
|
|
7
11
|
onNotificationClick?: () => void;
|
|
12
|
+
primaryImg: NotificationListItemImageProps;
|
|
13
|
+
secondaryImg?: NotificationListItemImageProps;
|
|
8
14
|
timeAgo: string;
|
|
9
15
|
title: string;
|
|
10
16
|
unread?: boolean;
|
|
11
17
|
}
|
|
18
|
+
export type ThumbnailProps = {
|
|
19
|
+
className: string;
|
|
20
|
+
imgProps: NotificationListItemImageProps;
|
|
21
|
+
size: '32' | '56';
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { StickerProps } from '../../../Atoms/Badges/Sticker/Sticker.types';
|
|
3
3
|
import { ButtonPrimaryProps } from '../../../Atoms/Buttons/ButtonPrimary/ButtonPrimary.types';
|
|
4
|
+
import { ButtonSecondaryProps } from '../../../Atoms/Buttons/ButtonSecondary/ButtonSecondary.types';
|
|
5
|
+
import { ButtonTertiaryProps } from '../../../Atoms/Buttons/ButtonTertiary/ButtonTertiary.types';
|
|
4
6
|
import { TextButtonProps } from '../../../Atoms/Buttons/TextButton/TextButton.types';
|
|
5
7
|
|
|
6
8
|
type TextButton = Omit<TextButtonProps, 'size'> & {
|
|
@@ -9,7 +11,13 @@ type TextButton = Omit<TextButtonProps, 'size'> & {
|
|
|
9
11
|
type ButtonPrimary = Omit<ButtonPrimaryProps, 'size'> & {
|
|
10
12
|
buttonType: 'primary';
|
|
11
13
|
};
|
|
12
|
-
|
|
14
|
+
type ButtonSecondary = Omit<ButtonSecondaryProps, 'size'> & {
|
|
15
|
+
buttonType: 'secondary';
|
|
16
|
+
};
|
|
17
|
+
type ButtonTertiary = Omit<ButtonTertiaryProps, 'size'> & {
|
|
18
|
+
buttonType: 'tertiary';
|
|
19
|
+
};
|
|
20
|
+
export type ButtonProps = TextButton | ButtonPrimary | ButtonSecondary | ButtonTertiary;
|
|
13
21
|
export default interface EmptyStateProps {
|
|
14
22
|
buttons?: ButtonProps[];
|
|
15
23
|
customVisual?: ReactElement;
|
package/package.json
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodhood-web/ui",
|
|
3
|
-
"version": "1.12.0-development.
|
|
3
|
+
"version": "1.12.0-development.21",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
|
+
"repository": "https://github.com/good-hood-gmbh/goodhood-web",
|
|
6
7
|
"exports": {
|
|
7
8
|
".": {
|
|
8
9
|
"import": "./index.mjs",
|
|
9
10
|
"require": "./index.js"
|
|
10
11
|
}
|
|
11
12
|
},
|
|
12
|
-
"publishConfig": {
|
|
13
|
-
"registry": "https://registry.npmjs.org/",
|
|
14
|
-
"access": "public"
|
|
15
|
-
},
|
|
16
|
-
"private": false,
|
|
17
13
|
"peerDependencies": {
|
|
18
|
-
"@mui/base": "~5.0.0-beta.
|
|
19
|
-
"@goodhood/design-tokens": "1.0.0-develop.
|
|
14
|
+
"@mui/base": "~5.0.0-beta.58",
|
|
15
|
+
"@goodhood/design-tokens": "1.0.0-develop.5"
|
|
20
16
|
}
|
|
21
17
|
}
|