@goodhood-web/ui 2.0.1-development.1 → 2.1.0-development.1
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.js +133 -125
- package/index.mjs +16817 -12116
- package/lib/Atoms/Badges/Tooltip/Tooltip.d.ts +1 -1
- package/lib/Atoms/Badges/Tooltip/Tooltip.types.d.ts +1 -0
- package/lib/Base/Typography/Typography.d.ts +2 -2
- package/lib/Base/Typography/Typography.types.d.ts +14 -11
- package/lib/Molecules/Card/CardHeader/CardHeader.types.d.ts +2 -2
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as TooltipProps } from './Tooltip.types';
|
|
2
|
-
declare const Tooltip: ({ children, hasPointer, id, position, text, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const Tooltip: ({ children, className, hasPointer, id, position, text, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Tooltip;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TypographyProps } from './Typography.types';
|
|
2
|
-
declare
|
|
1
|
+
import { AllowedHTMLElements, TypographyProps } from './Typography.types';
|
|
2
|
+
declare const Typography: <T extends AllowedHTMLElements>(props: TypographyProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Typography;
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef, ElementType, PropsWithChildren } from 'react';
|
|
2
2
|
export type TypographyTypeLanding = 'claim' | 'claim-uppercase' | 'h1' | 'h1-uppercase' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'overline';
|
|
3
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';
|
|
4
|
-
|
|
5
|
-
as?:
|
|
6
|
-
|
|
4
|
+
type AsProp<C extends ElementType> = {
|
|
5
|
+
as?: C;
|
|
6
|
+
};
|
|
7
|
+
type PropsToOmit<C extends ElementType, P> = keyof (AsProp<C> & P);
|
|
8
|
+
type PolymorphicComponentProp<C extends ElementType, Props = Record<string, unknown>> = PropsWithChildren<Props & AsProp<C>> & Omit<ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
9
|
+
export type AllowedTypographyHTMLTags = 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
10
|
+
export type AllowedHTMLElements = ElementType<{
|
|
7
11
|
className?: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
interface TypographyProduct extends TypographyBaseProps {
|
|
12
|
+
}, AllowedTypographyHTMLTags>;
|
|
13
|
+
export type TypographyProductProps<T extends AllowedHTMLElements> = PolymorphicComponentProp<T, {
|
|
11
14
|
fontSet?: 'product';
|
|
12
15
|
type: TypographyTypeProduct;
|
|
13
|
-
}
|
|
14
|
-
|
|
16
|
+
}>;
|
|
17
|
+
export type TypographyLandingProps<T extends AllowedHTMLElements> = PolymorphicComponentProp<T, {
|
|
15
18
|
fontSet: 'landing';
|
|
16
19
|
type: TypographyTypeLanding;
|
|
17
|
-
}
|
|
18
|
-
export type TypographyProps =
|
|
20
|
+
}>;
|
|
21
|
+
export type TypographyProps<T extends AllowedHTMLElements> = TypographyProductProps<T> | TypographyLandingProps<T>;
|
|
19
22
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { IconButtonProps } from '../../../Atoms/Buttons/IconButton/IconButton.types';
|
|
3
3
|
import { IconProps } from '../../../Base/Icon/Icon.types';
|
|
4
|
-
import {
|
|
4
|
+
import { AllowedTypographyHTMLTags, TypographyTypeProduct } from '../../../Base/Typography/Typography.types';
|
|
5
5
|
export type CardHeaderProps = {
|
|
6
|
-
as?: Exclude<
|
|
6
|
+
as?: Exclude<AllowedTypographyHTMLTags, 'h1' | 'p' | 'span'>;
|
|
7
7
|
className?: string;
|
|
8
8
|
headline: string;
|
|
9
9
|
leftElement?: ReactElement<IconProps | IconButtonProps>;
|