@goodhood-web/ui 3.0.0-development.8 → 3.0.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.
Files changed (69) hide show
  1. package/index.d.ts +5 -2
  2. package/index.js +174 -127
  3. package/index.mjs +30815 -18474
  4. package/lib/Atoms/Badges/Badge/Badge.d.ts +1 -1
  5. package/lib/Atoms/Badges/Badge/Badge.types.d.ts +1 -0
  6. package/lib/Atoms/Badges/BadgeIcon/BadgeIcon.d.ts +1 -1
  7. package/lib/Atoms/Badges/BadgeIcon/BadgeIcon.types.d.ts +1 -1
  8. package/lib/Atoms/Badges/LabelPill/LabelPill.types.d.ts +1 -1
  9. package/lib/Atoms/Badges/Sticker/Sticker.types.d.ts +1 -1
  10. package/lib/Atoms/Buttons/Button/Button.types.d.ts +5 -1
  11. package/lib/Atoms/Buttons/ButtonPrimary/ButtonPrimary.d.ts +1 -1
  12. package/lib/Atoms/Buttons/ButtonSecondary/ButtonSecondary.d.ts +1 -1
  13. package/lib/Atoms/Buttons/ButtonTertiary/ButtonTertiary.d.ts +1 -1
  14. package/lib/Atoms/Buttons/IconButton/IconButton.types.d.ts +11 -7
  15. package/lib/Atoms/Buttons/IconButton/utils.d.ts +2 -2
  16. package/lib/Atoms/Buttons/TextButton/TextButton.d.ts +1 -0
  17. package/lib/Atoms/Buttons/TextButton/TextButton.types.d.ts +2 -2
  18. package/lib/Atoms/Content/AvatarWithPlaceholder/AvatarWithPlaceholder.d.ts +3 -0
  19. package/lib/Atoms/Content/AvatarWithPlaceholder/AvatarWithPlaceholder.types.d.ts +16 -0
  20. package/lib/Atoms/Content/PlaceholderThumbnail/PlaceholderThumbnail.d.ts +1 -1
  21. package/lib/Atoms/Content/PlaceholderThumbnail/PlaceholderThumbnail.type.d.ts +2 -0
  22. package/lib/Atoms/Content/PoiAvatar/PoiAvatar.d.ts +3 -0
  23. package/lib/Atoms/Content/PoiAvatar/PoiAvatar.type.d.ts +6 -0
  24. package/lib/Atoms/Content/Thumbnail/Thumbnail.type.d.ts +1 -1
  25. package/lib/Atoms/Content/ThumbnailWrapper/ThumbnailWrapper.d.ts +2 -2
  26. package/lib/Atoms/Content/ThumbnailWrapper/ThumbnailWrapper.types.d.ts +9 -1
  27. package/lib/Atoms/Inputs/DateTimeInput/DateInput/DateInput.d.ts +3 -0
  28. package/lib/Atoms/Inputs/DateTimeInput/DateInput/DateInput.types.d.ts +9 -0
  29. package/lib/Atoms/Inputs/DateTimeInput/DateInput/components/CustomHeader.d.ts +3 -0
  30. package/lib/Atoms/Inputs/DateTimeInput/DateInput/util.d.ts +1 -0
  31. package/lib/Atoms/Inputs/DateTimeInput/DateTimeInput.d.ts +3 -0
  32. package/lib/Atoms/Inputs/DateTimeInput/DateTimeInput.types.d.ts +7 -0
  33. package/lib/Atoms/Inputs/DateTimeInput/TimeInput/TimeInput.d.ts +3 -0
  34. package/lib/Atoms/Inputs/DateTimeInput/TimeInput/TimeInput.types.d.ts +10 -0
  35. package/lib/Atoms/Inputs/InputFieldSpecial/InputFieldSpecial.types.d.ts +1 -1
  36. package/lib/Atoms/Inputs/RadioButton/RadioButton.d.ts +2 -2
  37. package/lib/Atoms/Inputs/RadioButton/RadioButton.types.d.ts +10 -3
  38. package/lib/Atoms/Inputs/TextInput/TextInput.d.ts +1 -1
  39. package/lib/Atoms/Inputs/TextInput/TextInput.types.d.ts +10 -2
  40. package/lib/Atoms/Progress/ProgressBar/ProgressBar.d.ts +3 -0
  41. package/lib/Atoms/Progress/ProgressBar/ProgressBar.types.d.ts +4 -0
  42. package/lib/Atoms/Selectables/SelectablePill/SelectablePill.d.ts +1 -1
  43. package/lib/Atoms/Selectables/SelectablePill/SelectablePill.types.d.ts +4 -2
  44. package/lib/Base/Icon/icons/index.d.ts +36 -0
  45. package/lib/Base/Icon/icons/outline/16x16/index.d.ts +18 -0
  46. package/lib/Base/Icon/icons/outline/24x24/index.d.ts +12 -0
  47. package/lib/Base/Icon/icons/outline/32x32/index.d.ts +6 -0
  48. package/lib/Base/Icon/icons/outline/index.d.ts +36 -0
  49. package/lib/Base/Typography/Typography.types.d.ts +2 -1
  50. package/lib/Molecules/Card/Card.d.ts +1 -1
  51. package/lib/Molecules/Card/Card.types.d.ts +10 -2
  52. package/lib/Molecules/Card/CardHeader/CardHeader.types.d.ts +1 -1
  53. package/lib/Molecules/Markdown/Markdown.d.ts +1 -3
  54. package/lib/Molecules/Markdown/Markdown.types.d.ts +1 -0
  55. package/lib/Molecules/Navigation/MenuItem/MenuItem.d.ts +1 -1
  56. package/lib/Molecules/Navigation/MenuItem/MenuItem.types.d.ts +1 -0
  57. package/lib/Molecules/Notices/EmptyState/EmptyState.types.d.ts +3 -3
  58. package/lib/Molecules/Notices/Notice/Notice.d.ts +2 -2
  59. package/lib/Molecules/Notices/Notice/Notice.types.d.ts +62 -12
  60. package/lib/Molecules/Notices/Snackbar/Snackbar.d.ts +1 -1
  61. package/lib/Molecules/Notices/Snackbar/Snackbar.types.d.ts +2 -0
  62. package/lib/Organisms/Modals/Popup/Popup.types.d.ts +1 -0
  63. package/package.json +1 -1
  64. package/style.css +1 -1
  65. package/styles/_functions.scss +5 -0
  66. package/lib/Atoms/Content/GroupAvatar/GroupAvatar.d.ts +0 -3
  67. package/lib/Atoms/Content/GroupAvatar/GroupAvatar.types.d.ts +0 -10
  68. package/lib/Molecules/Notices/Notice/InfoNotice/InfoNotice.d.ts +0 -3
  69. package/lib/Molecules/Notices/Notice/WarningNotice/WarningNotice.d.ts +0 -3
@@ -1,9 +1,10 @@
1
1
  import { ComponentPropsWithoutRef, ElementType, PropsWithChildren } from 'react';
2
2
  export type TypographyTypeLanding = 'claim' | 'claim-uppercase' | 'h1' | 'h1-uppercase' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'overline' | 'body-large' | 'body-large-semibold' | 'body' | 'body-semibold' | 'body-italic' | 'quote-large' | 'detail-small' | 'detail-small-bold';
3
- export type TypographyTypeProduct = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7' | 'h8' | 'body-large' | 'body-regular' | 'body-semibold' | 'body-italic' | 'body-text-link' | 'detail-medium' | 'detail-bold' | 'detail-upper-case' | 'detail-regular';
3
+ export type TypographyTypeProduct = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7' | 'h8' | 'body-large' | 'body-regular' | 'body-semibold' | 'body-italic' | 'body-text-link' | 'detail-medium' | 'detail-bold' | 'detail-upper-case' | 'detail-regular' | 'detail-text-link';
4
4
  type AsProp<C extends ElementType> = {
5
5
  as?: C;
6
6
  markdown?: boolean;
7
+ markdownInline?: boolean;
7
8
  };
8
9
  type PropsToOmit<C extends ElementType, P> = keyof (AsProp<C> & P);
9
10
  type PolymorphicComponentProp<C extends ElementType, Props = Record<string, unknown>> = PropsWithChildren<Props & AsProp<C>> & Omit<ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
@@ -1,3 +1,3 @@
1
1
  import { CardProps } from './Card.types';
2
- declare const Card: ({ allowedElement, ariaLabel, as: Tag, borderRadius, children, className, role, withoutPadding, }: CardProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Card: ({ allowedElement, ariaLabel, as: Tag, borderRadius, children, className, responsive, role, withoutPadding, }: CardProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Card;
@@ -1,13 +1,21 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { CardBodyProps } from './CardBody/CardBody.types';
3
3
  import { CardHeaderProps } from './CardHeader/CardHeader.types';
4
- export interface CardProps {
4
+ export interface CardBaseProps {
5
5
  allowedElement?: React.ElementType;
6
6
  ariaLabel?: string;
7
7
  as?: Extract<keyof JSX.IntrinsicElements, 'section' | 'div'>;
8
- borderRadius?: boolean;
9
8
  children: ReactElement<CardBodyProps | CardHeaderProps> | ReactElement<CardBodyProps | CardHeaderProps>[];
10
9
  className?: string;
11
10
  role?: string;
12
11
  withoutPadding?: boolean;
13
12
  }
13
+ export type ResponsiveProps = {
14
+ borderRadius: true;
15
+ responsive?: boolean;
16
+ } & CardBaseProps;
17
+ export type NonResponsiveProps = {
18
+ borderRadius?: boolean;
19
+ responsive?: false;
20
+ } & CardBaseProps;
21
+ export type CardProps = ResponsiveProps | NonResponsiveProps;
@@ -6,7 +6,7 @@ export type CardHeaderProps = {
6
6
  as?: Exclude<AllowedTypographyHTMLTags, 'h1' | 'p' | 'span'>;
7
7
  className?: string;
8
8
  headline: string;
9
- leftElement?: ReactElement<IconProps | IconButtonProps>;
9
+ leftElement?: ReactElement<IconProps | IconButtonProps> | ReactNode;
10
10
  rightElement?: ReactElement<IconButtonProps> | ReactNode;
11
11
  type?: Exclude<TypographyTypeProduct, 'h1'>;
12
12
  };
@@ -1,5 +1,3 @@
1
1
  import { MarkdownProps } from './Markdown.types';
2
- export declare const quotesToTokens: (string: string) => string;
3
- export declare const tokensToQuotes: (string: string) => string;
4
- declare function Markdown({ className, elementTag, inline, text, }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function Markdown({ className, elementTag, inline, isExternalLinksIcon, text, }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
5
3
  export default Markdown;
@@ -3,5 +3,6 @@ export type MarkdownProps = {
3
3
  className?: string;
4
4
  elementTag?: AllowedHTMLElements;
5
5
  inline?: boolean;
6
+ isExternalLinksIcon?: boolean;
6
7
  text: string;
7
8
  };
@@ -1,3 +1,3 @@
1
1
  import { MenuItemProps } from './MenuItem.types';
2
- declare const MenuItem: ({ className: passedClassName, compact, href, isSelected, labelPillClassName, labelPillText, leftIcon, onClick, rightIcon, role, text, }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const MenuItem: ({ className: passedClassName, compact, descriptionText, href, isSelected, labelPillClassName, labelPillText, leftIcon, onClick, rightIcon, role, text, }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default MenuItem;
@@ -3,6 +3,7 @@ import { ButtonProps } from '../../../Atoms/Buttons/Button/Button.types';
3
3
  export interface MenuItemProps {
4
4
  className?: string;
5
5
  compact?: boolean;
6
+ descriptionText?: string;
6
7
  href?: string;
7
8
  id?: string;
8
9
  isSelected?: boolean;
@@ -7,13 +7,13 @@ import { TextButtonProps } from '../../../Atoms/Buttons/TextButton/TextButton.ty
7
7
  type TextButton = Omit<TextButtonProps, 'size'> & {
8
8
  buttonType: 'text';
9
9
  };
10
- type ButtonPrimary = Omit<ButtonPrimaryProps, 'size'> & {
10
+ type ButtonPrimary = ButtonPrimaryProps & {
11
11
  buttonType: 'primary';
12
12
  };
13
- type ButtonSecondary = Omit<ButtonSecondaryProps, 'size'> & {
13
+ type ButtonSecondary = ButtonSecondaryProps & {
14
14
  buttonType: 'secondary';
15
15
  };
16
- type ButtonTertiary = Omit<ButtonTertiaryProps, 'size'> & {
16
+ type ButtonTertiary = ButtonTertiaryProps & {
17
17
  buttonType: 'tertiary';
18
18
  };
19
19
  export type ButtonProps = TextButton | ButtonPrimary | ButtonSecondary | ButtonTertiary;
@@ -1,3 +1,3 @@
1
- import { default as NoticeProps } from './Notice.types';
2
- declare const Notice: (props: NoticeProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { NoticeInfoProps, NoticeWarningProps } from './Notice.types';
2
+ declare const Notice: ({ bodyText, color, context, cta, dismissible, headline, icon, markdown, notificationBubble, onDismiss, size, type, variant, }: NoticeWarningProps | NoticeInfoProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Notice;
@@ -1,17 +1,67 @@
1
1
  import { IconButtonProps } from '../../../Atoms/Buttons/IconButton/IconButton.types';
2
2
  import { TextButtonProps } from '../../../Atoms/Buttons/TextButton/TextButton.types';
3
3
  import { NotificationBubbleProps } from '../../../Atoms/NotificationBubble/NotificationBubble.types';
4
- import { Icon24 } from '../../../Base/Icon/Icon.types';
5
- export default interface NoticeProps {
6
- context: 'warning' | 'infoGrey' | 'infoGreen';
7
- dismissible?: boolean;
8
- iconName?: Icon24;
4
+ import { Icon24, Icon32 } from '../../../Base/Icon/Icon.types';
5
+ interface NoticePropsBase {
6
+ bodyText?: string;
7
+ cta?: {
8
+ color?: TextButtonProps['color'];
9
+ onClick: TextButtonProps['onClick'];
10
+ text: string;
11
+ };
12
+ headline?: string;
13
+ icon?: {
14
+ name: Icon24;
15
+ size?: '24';
16
+ } | {
17
+ name: Icon32;
18
+ size: '32';
19
+ };
20
+ markdown?: boolean;
9
21
  notificationBubble?: NotificationBubbleProps;
10
- onClick?: TextButtonProps['onClick'];
11
- onDismiss?: IconButtonProps['onClick'];
12
- primaryText: string;
13
- secondaryText?: string;
14
- size: 'small' | 'medium';
15
- textButton?: string;
16
- type: 'embedded' | 'sticky';
22
+ size?: 'small' | 'medium';
23
+ type?: 'embedded' | 'sticky';
24
+ variant?: 'detailed' | 'simple';
17
25
  }
26
+ type NoticeProps = (NoticePropsBase & ({
27
+ bodyText?: never;
28
+ headline: string;
29
+ variant?: 'simple';
30
+ } | {
31
+ bodyText: string;
32
+ variant: 'detailed';
33
+ }) & {
34
+ dismissible?: false;
35
+ onDismiss?: IconButtonProps['onClick'];
36
+ }) | (NoticePropsBase & ({
37
+ bodyText: string;
38
+ variant: 'detailed';
39
+ } | {
40
+ bodyText?: never;
41
+ headline: string;
42
+ variant?: 'simple';
43
+ }) & {
44
+ dismissible?: true;
45
+ onDismiss: IconButtonProps['onClick'];
46
+ });
47
+ export type NoticeWarningProps = {
48
+ color?: 'pinkDark' | 'pinkLight';
49
+ context: 'warning';
50
+ } & NoticeProps;
51
+ export type NoticeInfoProps = {
52
+ color?: 'green' | 'grey' | 'vanilla';
53
+ context?: 'info';
54
+ } & NoticeProps;
55
+ export declare const VariantEnum: {
56
+ readonly DETAILED: "detailed";
57
+ readonly SIMPLE: "simple";
58
+ };
59
+ export declare const SizeEnum: {
60
+ readonly MEDIUM: "medium";
61
+ readonly SMALL: "small";
62
+ };
63
+ export declare const ContextEnum: {
64
+ readonly INFO: "info";
65
+ readonly WARNING: "warning";
66
+ };
67
+ export {};
@@ -1,3 +1,3 @@
1
1
  import { default as SnackbarProps } from './Snackbar.types';
2
- declare const Snackbar: ({ dismissable, isOpen, leftIconLarge, leftIconSmall, onClick, onClose, rightIconLarge, rightIconSmall, textButton, textLabel, }: SnackbarProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Snackbar: ({ color, dismissable, isOpen, leftIconLarge, leftIconSmall, onClick, onClose, rightIconLarge, rightIconSmall, textButton, textLabel, }: SnackbarProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Snackbar;
@@ -1,5 +1,7 @@
1
+ import { TextButtonProps } from '../../../Atoms/Buttons/TextButton/TextButton.types';
1
2
  import { Icon24, Icon32 } from '../../../Base/Icon/Icon.types';
2
3
  export default interface SnackbarProps {
4
+ color?: TextButtonProps['color'];
3
5
  dismissable?: boolean;
4
6
  isOpen: boolean;
5
7
  leftIconLarge?: Icon32;
@@ -3,6 +3,7 @@ import { ReactNode } from 'react';
3
3
  export interface PopupProps {
4
4
  anchor?: HTMLElement | null;
5
5
  children: ReactNode;
6
+ className?: string;
6
7
  container?: HTMLElement | null;
7
8
  handleClickAway?: () => void;
8
9
  id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/ui",
3
- "version": "3.0.0-development.8",
3
+ "version": "3.0.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",