@nuskin/marketing-components 1.23.1 → 1.24.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.
- package/dist/typography/Typography.d.ts +18 -0
- package/dist/typography/Typography.stories.d.ts +6 -0
- package/dist/typography/Typography.styled.d.ts +68 -0
- package/dist/typography/index.d.ts +3 -0
- package/dist/typography/specs/Typography.spec.d.ts +1 -0
- package/dist/typography/types.d.ts +18 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TypographyProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Centralized Typography Component
|
|
4
|
+
*
|
|
5
|
+
* Supports multiple variants with responsive font sizes for desktop and mobile/tablet.
|
|
6
|
+
* Includes ADA compliance features like semantic HTML and ARIA attributes.
|
|
7
|
+
*
|
|
8
|
+
* @param variant - Typography variant
|
|
9
|
+
* @param inputText - Text content to display
|
|
10
|
+
* @param color - Text color (hex code, default: #1D1D1B)
|
|
11
|
+
* @param className - Additional CSS class
|
|
12
|
+
* @param role - ARIA role for accessibility
|
|
13
|
+
* @param ariaLabel - ARIA label for screen readers
|
|
14
|
+
* @param ariaDescribedBy - ARIA described-by attribute
|
|
15
|
+
* @param dataTestId - Data attribute for testing
|
|
16
|
+
*/
|
|
17
|
+
export declare const Typography: ({ variant, inputText, color, className, dataTestId, ...props }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default Typography;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { TypographyStyledProps } from './types';
|
|
2
|
+
export declare const typographyVariants: {
|
|
3
|
+
h1: {
|
|
4
|
+
desktop: {
|
|
5
|
+
fontSize: string;
|
|
6
|
+
lineHeight: string;
|
|
7
|
+
};
|
|
8
|
+
mobile: {
|
|
9
|
+
fontSize: string;
|
|
10
|
+
lineHeight: string;
|
|
11
|
+
};
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
};
|
|
14
|
+
h2: {
|
|
15
|
+
desktop: {
|
|
16
|
+
fontSize: string;
|
|
17
|
+
lineHeight: string;
|
|
18
|
+
};
|
|
19
|
+
mobile: {
|
|
20
|
+
fontSize: string;
|
|
21
|
+
lineHeight: string;
|
|
22
|
+
};
|
|
23
|
+
fontFamily: string;
|
|
24
|
+
};
|
|
25
|
+
h3: {
|
|
26
|
+
desktop: {
|
|
27
|
+
fontSize: string;
|
|
28
|
+
lineHeight: string;
|
|
29
|
+
};
|
|
30
|
+
mobile: {
|
|
31
|
+
fontSize: string;
|
|
32
|
+
lineHeight: string;
|
|
33
|
+
};
|
|
34
|
+
fontFamily: string;
|
|
35
|
+
};
|
|
36
|
+
body: {
|
|
37
|
+
desktop: {
|
|
38
|
+
fontSize: string;
|
|
39
|
+
lineHeight: string;
|
|
40
|
+
};
|
|
41
|
+
mobile: {
|
|
42
|
+
fontSize: string;
|
|
43
|
+
lineHeight: string;
|
|
44
|
+
};
|
|
45
|
+
fontFamily: string;
|
|
46
|
+
};
|
|
47
|
+
disclaimer: {
|
|
48
|
+
desktop: {
|
|
49
|
+
fontSize: string;
|
|
50
|
+
lineHeight: string;
|
|
51
|
+
};
|
|
52
|
+
mobile: {
|
|
53
|
+
fontSize: string;
|
|
54
|
+
lineHeight: string;
|
|
55
|
+
};
|
|
56
|
+
fontFamily: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Common text element styles for rich content
|
|
61
|
+
* Includes styling for paragraphs, links, lists, and text formatting
|
|
62
|
+
* Can be imported and used in other styled components
|
|
63
|
+
*/
|
|
64
|
+
export declare const commonTextStyles = "\n p {\n margin: 0;\n padding: 0;\n font-size: 16px;\n line-height: 22px;\n font-family: 'Inter', sans-serif;\n }\n\n @media (max-width: 768px) {\n p {\n font-size: 16px;\n line-height: 22px;\n }\n }\n\n strong, b {\n font-weight: 600;\n }\n\n em, i {\n font-style: italic;\n }\n\n a {\n color: #008ab0;\n text-decoration: underline;\n\n &:hover {\n opacity: 0.8;\n }\n }\n\n ul, ol {\n margin: 16px 0;\n padding-left: 24px;\n }\n\n li {\n margin: 8px 0;\n }\n";
|
|
65
|
+
export declare const TypographyStyled: import("@emotion/styled").StyledComponent<{
|
|
66
|
+
theme?: import("@emotion/react").Theme;
|
|
67
|
+
as?: React.ElementType;
|
|
68
|
+
} & TypographyStyledProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export type TypographyVariant = 'h1' | 'h2' | 'h3' | 'body' | 'disclaimer';
|
|
3
|
+
export interface TypographyStyledProps {
|
|
4
|
+
variant?: TypographyVariant;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TypographyProps {
|
|
8
|
+
variant?: TypographyVariant;
|
|
9
|
+
inputText?: ReactNode;
|
|
10
|
+
color?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
role?: string;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
ariaDescribedBy?: string;
|
|
15
|
+
dataTestId?: string;
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}
|
package/package.json
CHANGED