@goodhood-web/ui 1.6.0-development.2 → 1.6.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.
@@ -1,5 +1,5 @@
1
- import { AriaRole, ForwardedRef, MouseEvent, ReactNode } from 'react';
2
1
  import { ButtonOwnProps } from '@mui/base';
2
+ import { AriaRole, ForwardedRef, MouseEvent, ReactNode } from 'react';
3
3
 
4
4
  interface CommonProps {
5
5
  ariaLabel?: string;
@@ -16,7 +16,7 @@ export interface BaseButtonProps extends ButtonOwnProps, CommonProps {
16
16
  export interface LinkProps extends CommonProps {
17
17
  children: ReactNode;
18
18
  href?: string;
19
- onClick?: (event?: MouseEvent<HTMLElement>) => void;
19
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
20
20
  rel?: string;
21
21
  target?: string;
22
22
  }
@@ -1,8 +1,8 @@
1
+ import { ReactNode } from 'react';
1
2
  import { ButtonProps } from '../Button/Button.types';
2
- import { default as React } from 'react';
3
3
 
4
4
  export interface ButtonPrimaryProps extends Omit<ButtonProps, 'children'> {
5
- children?: React.ReactNode;
5
+ children?: ReactNode;
6
6
  color?: 'highlight' | 'primary' | 'transparent';
7
7
  loading?: boolean;
8
8
  size?: 'tiny' | 'small' | 'medium' | 'large';
@@ -1,6 +1,6 @@
1
- import { CardHeaderProps } from './CardHeader/CardHeader.type';
2
- import { CardBodyProps } from './CardBody/CardBody.types';
3
1
  import { ReactElement } from 'react';
2
+ import { CardBodyProps } from './CardBody/CardBody.types';
3
+ import { CardHeaderProps } from './CardHeader/CardHeader.type';
4
4
 
5
5
  export interface CardProps {
6
6
  ariaLabel?: string;
@@ -1,14 +1,13 @@
1
- import { TypographyProps } from '../../Typography/Typography.types';
2
- import { IconButtonProps } from '../../IconButton/IconButton.types';
3
- import { IconProps } from '../../Icon/Icon.types';
4
- import { BaseButtonProps } from '../../BaseButton/BaseButton';
5
1
  import { ReactElement } from 'react';
2
+ import { IconProps } from '../../Icon/Icon.types';
3
+ import { IconButtonProps } from '../../IconButton/IconButton.types';
4
+ import { TypographyProps } from '../../Typography/Typography.types';
6
5
 
7
6
  export type CardHeaderProps = {
8
7
  as?: Exclude<TypographyProps['as'], 'h1' | 'p' | 'span'>;
9
8
  className?: string;
10
9
  headline: string;
11
10
  leftElement?: ReactElement<IconProps | IconButtonProps>;
12
- rightElement?: ReactElement<BaseButtonProps>;
11
+ rightElement?: ReactElement<IconButtonProps>;
13
12
  type?: Exclude<TypographyProps['type'], 'h1'>;
14
13
  };
@@ -1,5 +1,5 @@
1
- import { IconProps } from './Icon.types';
2
1
  import { ReactElement } from 'react';
2
+ import { IconProps } from './Icon.types';
3
3
 
4
4
  declare const Icon: ({ className, name, role, size, title, }: IconProps) => ReactElement | null;
5
5
  export default Icon;
@@ -1,6 +1,6 @@
1
- import { default as icons32 } from './icons/32x32';
2
- import { default as icons24 } from './icons/24x24';
3
1
  import { AriaRole } from 'react';
2
+ import { default as icons24 } from './icons/24x24';
3
+ import { default as icons32 } from './icons/32x32';
4
4
 
5
5
  export type Icon32 = keyof typeof icons32;
6
6
  export type Icon24 = keyof typeof icons24;
@@ -69,6 +69,12 @@ declare const IconsMap: {
69
69
  readonly heart: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
70
70
  title?: string | undefined;
71
71
  }>;
72
+ readonly heart_filled: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
73
+ title?: string | undefined;
74
+ }>;
75
+ readonly heart_outline: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
76
+ title?: string | undefined;
77
+ }>;
72
78
  readonly image: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
73
79
  title?: string | undefined;
74
80
  }>;
@@ -111,6 +117,9 @@ declare const IconsMap: {
111
117
  readonly privacy_lock_closed: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
112
118
  title?: string | undefined;
113
119
  }>;
120
+ readonly react: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
121
+ title?: string | undefined;
122
+ }>;
114
123
  readonly search: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
115
124
  title?: string | undefined;
116
125
  }>;
@@ -123,6 +132,9 @@ declare const IconsMap: {
123
132
  readonly sort: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
124
133
  title?: string | undefined;
125
134
  }>;
135
+ readonly special_place: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
136
+ title?: string | undefined;
137
+ }>;
126
138
  readonly thanks: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
127
139
  title?: string | undefined;
128
140
  }>;
@@ -126,6 +126,12 @@ declare const IconsMap: {
126
126
  readonly heart: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
127
127
  title?: string | undefined;
128
128
  }>;
129
+ readonly heart_filled: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
130
+ title?: string | undefined;
131
+ }>;
132
+ readonly heart_outline: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
133
+ title?: string | undefined;
134
+ }>;
129
135
  readonly house: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
130
136
  title?: string | undefined;
131
137
  }>;
@@ -171,6 +177,9 @@ declare const IconsMap: {
171
177
  readonly more_dots_alt: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
172
178
  title?: string | undefined;
173
179
  }>;
180
+ readonly more_dots_outline: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
181
+ title?: string | undefined;
182
+ }>;
174
183
  readonly music: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
175
184
  title?: string | undefined;
176
185
  }>;
@@ -70,6 +70,12 @@ declare const iconsMap: {
70
70
  readonly heart: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
71
71
  title?: string | undefined;
72
72
  }>;
73
+ readonly heart_filled: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
74
+ title?: string | undefined;
75
+ }>;
76
+ readonly heart_outline: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
77
+ title?: string | undefined;
78
+ }>;
73
79
  readonly image: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
74
80
  title?: string | undefined;
75
81
  }>;
@@ -112,6 +118,9 @@ declare const iconsMap: {
112
118
  readonly privacy_lock_closed: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
113
119
  title?: string | undefined;
114
120
  }>;
121
+ readonly react: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
122
+ title?: string | undefined;
123
+ }>;
115
124
  readonly search: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
116
125
  title?: string | undefined;
117
126
  }>;
@@ -124,6 +133,9 @@ declare const iconsMap: {
124
133
  readonly sort: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
125
134
  title?: string | undefined;
126
135
  }>;
136
+ readonly special_place: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
137
+ title?: string | undefined;
138
+ }>;
127
139
  readonly thanks: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
128
140
  title?: string | undefined;
129
141
  }>;
@@ -258,6 +270,12 @@ declare const iconsMap: {
258
270
  readonly heart: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
259
271
  title?: string | undefined;
260
272
  }>;
273
+ readonly heart_filled: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
274
+ title?: string | undefined;
275
+ }>;
276
+ readonly heart_outline: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
277
+ title?: string | undefined;
278
+ }>;
261
279
  readonly house: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
262
280
  title?: string | undefined;
263
281
  }>;
@@ -303,6 +321,9 @@ declare const iconsMap: {
303
321
  readonly more_dots_alt: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
304
322
  title?: string | undefined;
305
323
  }>;
324
+ readonly more_dots_outline: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
325
+ title?: string | undefined;
326
+ }>;
306
327
  readonly music: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
307
328
  title?: string | undefined;
308
329
  }>;
@@ -1,5 +1,5 @@
1
- import { Icon24, Icon32 } from '../Icon/Icon.types';
2
1
  import { ButtonProps } from '../Button/Button.types';
2
+ import { Icon24, Icon32 } from '../Icon/Icon.types';
3
3
 
4
4
  type BaseIconButtonProps = Omit<ButtonProps, 'children' | 'ref' | 'className'> & ({
5
5
  ariaLabel: string;
@@ -3,5 +3,5 @@ type MarkdownProps = {
3
3
  inline?: boolean;
4
4
  text: string;
5
5
  };
6
- declare function Markdown({ text }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
6
+ declare function Markdown({ className, text }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
7
7
  export default Markdown;
@@ -1,4 +1,4 @@
1
1
  import { MenuItemProps } from './MenuItem.types';
2
2
 
3
- declare const MenuItem: ({ isSelected, labelPillText, leftIcon, onClick, rightIcon, role, text, }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const MenuItem: ({ className: passedClassName, href, isSelected, labelPillText, leftIcon, onClick, rightIcon, role, text, }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default MenuItem;
@@ -1,12 +1,14 @@
1
- import { BaseButtonProps } from '../BaseButton/BaseButton';
2
1
  import { ReactNode } from 'react';
2
+ import { ButtonProps } from '../Button/Button.types';
3
3
 
4
4
  export interface MenuItemProps {
5
+ className?: string;
6
+ href?: string;
5
7
  isSelected?: boolean;
6
8
  labelPillText?: string;
7
9
  leftIcon: ReactNode;
8
- onClick: BaseButtonProps['onClick'];
10
+ onClick?: ButtonProps['onClick'];
9
11
  rightIcon?: ReactNode;
10
- role?: BaseButtonProps['role'];
12
+ role?: ButtonProps['role'];
11
13
  text: string;
12
14
  }
@@ -1,5 +1,4 @@
1
1
  import { BackdropProps } from './Backdrop.types';
2
- import { default as React } from 'react';
3
2
 
4
- declare const Backdrop: React.ForwardRefExoticComponent<Omit<BackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const Backdrop: import('react').ForwardRefExoticComponent<Omit<BackdropProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
5
4
  export default Backdrop;
@@ -1,4 +1,4 @@
1
1
  import { ModalProps } from './Modal.types';
2
2
 
3
- declare const Modal: ({ ariaLabel, ariaLabelledBy, closeButtonText, modalBody, modalHeader, onClose, open, }: ModalProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const Modal: ({ actionButtonText, ariaLabel, ariaLabelledBy, closeButtonText, modalBody, modalHeader, onAction, onClose, open, }: ModalProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default Modal;
@@ -1,13 +1,15 @@
1
- import { CardHeaderProps } from '../Card/CardHeader/CardHeader.type';
2
- import { CardBodyProps } from '../Card/CardBody/CardBody.types';
3
1
  import { ReactElement } from 'react';
2
+ import { CardBodyProps } from '../Card/CardBody/CardBody.types';
3
+ import { CardHeaderProps } from '../Card/CardHeader/CardHeader.type';
4
4
 
5
5
  export interface ModalProps {
6
+ actionButtonText?: string;
6
7
  ariaLabel?: string;
7
8
  ariaLabelledBy?: string;
8
9
  closeButtonText?: string;
9
10
  modalBody?: ReactElement<CardBodyProps>;
10
11
  modalHeader?: ReactElement<CardHeaderProps>;
12
+ onAction?: () => void;
11
13
  onClose: () => void;
12
14
  open: boolean;
13
15
  }
@@ -1,5 +1,5 @@
1
- import { Icon24, Icon32 } from '../../Icon/Icon.types';
2
1
  import { ReactElement } from 'react';
2
+ import { Icon24, Icon32 } from '../../Icon/Icon.types';
3
3
 
4
4
  export type NavItemProps = {
5
5
  active?: boolean;
@@ -1,7 +1,8 @@
1
+ import { ReactElement } from 'react';
1
2
  import { IconProps } from '../Icon/Icon.types';
2
3
 
3
4
  export type PlaceholderThumbnailProps = {
4
5
  className?: string;
5
- icon: React.ReactElement<IconProps>;
6
+ icon: ReactElement<IconProps>;
6
7
  size: 'small' | 'large';
7
8
  };
@@ -1,4 +1,4 @@
1
1
  import { PopupProps } from './Popup.types';
2
2
 
3
- declare const Popup: ({ anchor, children, id, offset, open, placement }: PopupProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const Popup: import('react').ForwardRefExoticComponent<PopupProps & import('react').RefAttributes<HTMLDivElement>>;
4
4
  export default Popup;
@@ -1,13 +1,15 @@
1
- import { ReactNode } from 'react';
2
1
  import { PopupPlacement } from '@mui/base';
2
+ import { ReactNode } from 'react';
3
3
 
4
4
  export interface PopupProps {
5
5
  anchor?: HTMLElement | null;
6
6
  children: ReactNode;
7
+ container?: HTMLElement | null;
7
8
  id?: string;
8
- offset?: 'sm' | 'md' | 'lg' | 'xl';
9
+ offset?: OffsetType;
9
10
  open: boolean;
10
11
  placement?: PopupPlacement;
12
+ strategy?: 'absolute' | 'fixed';
11
13
  }
12
14
  export declare enum OffsetMap {
13
15
  lg = 16,
@@ -15,3 +17,8 @@ export declare enum OffsetMap {
15
17
  sm = 8,
16
18
  xl = 24
17
19
  }
20
+ type OffsetType = keyof typeof OffsetMap | Partial<{
21
+ crossAxis: number;
22
+ mainAxis: number;
23
+ }>;
24
+ export {};
@@ -1,7 +1,7 @@
1
- import { NotificationBubbleProps } from '../NotificationBubble/NotificationBubble.types';
2
- import { IconProps } from '../Icon/Icon.types';
3
- import { ButtonProps } from '../Button/Button.types';
4
1
  import { ReactElement } from 'react';
2
+ import { ButtonProps } from '../Button/Button.types';
3
+ import { IconProps } from '../Icon/Icon.types';
4
+ import { NotificationBubbleProps } from '../NotificationBubble/NotificationBubble.types';
5
5
 
6
6
  export interface TextButtonProps extends Omit<ButtonProps, 'role' | 'className'> {
7
7
  color: 'green' | 'blue' | 'text';
@@ -1,5 +1,5 @@
1
- import { ForwardedRef } from 'react';
2
1
  import { UseInputParameters } from '@mui/base/useInput';
2
+ import { ForwardedRef } from 'react';
3
3
 
4
4
  export interface TextInputProps extends UseInputParameters {
5
5
  colorScheme: 'light' | 'dark';
@@ -1,5 +1,5 @@
1
- import { Icon32 } from '../Icon/Icon.types';
2
1
  import { UseSwitchParameters } from '@mui/base';
2
+ import { Icon32 } from '../Icon/Icon.types';
3
3
 
4
4
  export interface ToggleInputProps extends UseSwitchParameters {
5
5
  icon?: Icon32;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/ui",
3
- "version": "1.6.0-development.2",
3
+ "version": "1.6.0-development.21",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {