formica-ui-lib 1.0.0 → 1.0.2
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/index.d.ts +1 -0
- package/dist/stories/atoms/Icon/Icon.d.ts +9 -0
- package/dist/stories/atoms/button/Button.d.ts +16 -0
- package/dist/stories/atoms/image/Image.d.ts +10 -0
- package/dist/stories/atoms/text/Text.d.ts +11 -0
- package/dist/stories/molecules/card/featurecard/FeatureCard.d.ts +11 -0
- package/dist/stories/molecules/selectors/CountrySelector.d.ts +11 -0
- package/dist/stories/organisms/banner/featurebanner/FeatureBanner.d.ts +12 -0
- package/dist/stories/organisms/banner/herobanner/HeroBanner.d.ts +9 -0
- package/dist/stories/organisms/footer/Footer.d.ts +27 -0
- package/dist/stories/organisms/menu/TopNavBar.d.ts +24 -0
- package/dist/stories/page/home/HomePage.d.ts +42 -0
- package/package.json +58 -54
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './stories/atoms/text/Text.jsx';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ButtonVariant = 'nav' | 'standard' | 'text' | 'icon' | 'free';
|
|
3
|
+
type IconPosition = 'left' | 'right';
|
|
4
|
+
type ButtonProps = {
|
|
5
|
+
label?: string;
|
|
6
|
+
iconSrc?: string;
|
|
7
|
+
iconAlt?: string;
|
|
8
|
+
iconPosition?: IconPosition;
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
11
|
+
className?: string;
|
|
12
|
+
active?: boolean;
|
|
13
|
+
href?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
16
|
+
export default Button;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ImageProps = React.ImgHTMLAttributes<HTMLImageElement> & {
|
|
3
|
+
src: string;
|
|
4
|
+
alt: string;
|
|
5
|
+
width?: string | number;
|
|
6
|
+
height?: string | number;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const Image: React.FC<ImageProps>;
|
|
10
|
+
export default Image;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TextVariant = 'h1' | 'h2' | 'h3' | 'nav' | 'standard' | 'navlink' | 'free' | 'body' | 'bold' | 'caption';
|
|
3
|
+
type TextTag = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
|
+
interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
5
|
+
as?: TextTag;
|
|
6
|
+
variant?: TextVariant;
|
|
7
|
+
className?: string;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const Text: React.FC<TextProps>;
|
|
11
|
+
export default Text;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type FeatureCardProps = {
|
|
3
|
+
imageSrc: string;
|
|
4
|
+
imageAlt: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
buttonLabel: string;
|
|
8
|
+
buttonHref: string;
|
|
9
|
+
};
|
|
10
|
+
declare const FeatureCard: React.FC<FeatureCardProps>;
|
|
11
|
+
export default FeatureCard;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type AlignOption = 'left' | 'right';
|
|
3
|
+
type FeatureBannerProps = {
|
|
4
|
+
imageSrc: string;
|
|
5
|
+
imageAlt?: string;
|
|
6
|
+
headline: string;
|
|
7
|
+
body: string;
|
|
8
|
+
buttonLabel: string;
|
|
9
|
+
align?: AlignOption;
|
|
10
|
+
};
|
|
11
|
+
declare const FeatureBanner: React.FC<FeatureBannerProps>;
|
|
12
|
+
export default FeatureBanner;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
type SiteLinkGroup = {
|
|
4
|
+
group: string;
|
|
5
|
+
links: {
|
|
6
|
+
label: string;
|
|
7
|
+
}[];
|
|
8
|
+
};
|
|
9
|
+
type SocialLink = {
|
|
10
|
+
href: string;
|
|
11
|
+
icon: IconProp | string;
|
|
12
|
+
};
|
|
13
|
+
type Legal = {
|
|
14
|
+
phone?: string;
|
|
15
|
+
disclaimerText: string;
|
|
16
|
+
footerLinks: {
|
|
17
|
+
label: string;
|
|
18
|
+
href: string;
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
type FooterProps = {
|
|
22
|
+
siteLinks?: SiteLinkGroup[];
|
|
23
|
+
socialLinks?: SocialLink[];
|
|
24
|
+
legal?: Legal;
|
|
25
|
+
};
|
|
26
|
+
declare const Footer: React.FC<FooterProps>;
|
|
27
|
+
export default Footer;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type NavSubItem = {
|
|
3
|
+
label: string;
|
|
4
|
+
href: string;
|
|
5
|
+
};
|
|
6
|
+
type NavGroup = {
|
|
7
|
+
group: string;
|
|
8
|
+
items: NavSubItem[];
|
|
9
|
+
};
|
|
10
|
+
type NavItem = {
|
|
11
|
+
label: string;
|
|
12
|
+
submenu?: NavGroup[];
|
|
13
|
+
};
|
|
14
|
+
type Country = {
|
|
15
|
+
label: string;
|
|
16
|
+
locale: string;
|
|
17
|
+
href: string;
|
|
18
|
+
};
|
|
19
|
+
type TopNavBarProps = {
|
|
20
|
+
NavMenuWithSubItems: NavItem[];
|
|
21
|
+
Countries: Country[];
|
|
22
|
+
};
|
|
23
|
+
declare const TopNavBar: React.FC<TopNavBarProps>;
|
|
24
|
+
export default TopNavBar;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type NavItem = {
|
|
3
|
+
label: string;
|
|
4
|
+
submenu?: {
|
|
5
|
+
group: string;
|
|
6
|
+
items: {
|
|
7
|
+
label: string;
|
|
8
|
+
href: string;
|
|
9
|
+
}[];
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
type Country = {
|
|
13
|
+
label: string;
|
|
14
|
+
locale: string;
|
|
15
|
+
href: string;
|
|
16
|
+
};
|
|
17
|
+
type FooterLink = {
|
|
18
|
+
label: string;
|
|
19
|
+
href: string;
|
|
20
|
+
};
|
|
21
|
+
type FooterDataType = {
|
|
22
|
+
siteLinks: {
|
|
23
|
+
group: string;
|
|
24
|
+
links: FooterLink[];
|
|
25
|
+
}[];
|
|
26
|
+
socialLinks: {
|
|
27
|
+
href: string;
|
|
28
|
+
icon: string | any;
|
|
29
|
+
}[];
|
|
30
|
+
legal: {
|
|
31
|
+
phone?: string;
|
|
32
|
+
footerLinks: FooterLink[];
|
|
33
|
+
disclaimerText: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
type HomepageProps = {
|
|
37
|
+
NavMenuWithSubItems: NavItem[];
|
|
38
|
+
Countries: Country[];
|
|
39
|
+
FooterData: FooterDataType;
|
|
40
|
+
};
|
|
41
|
+
declare const Homepage: React.FC<HomepageProps>;
|
|
42
|
+
export default Homepage;
|
package/package.json
CHANGED
|
@@ -1,54 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "formica-ui-lib",
|
|
3
|
-
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"@storybook
|
|
31
|
-
"@
|
|
32
|
-
"@storybook/
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"eslint
|
|
44
|
-
"eslint-plugin-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "formica-ui-lib",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.2",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev": "vite",
|
|
15
|
+
"build": "vite build && npm run build:types",
|
|
16
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
17
|
+
"lint": "eslint .",
|
|
18
|
+
"preview": "vite preview",
|
|
19
|
+
"storybook": "storybook dev -p 6006",
|
|
20
|
+
"build-storybook": "storybook build"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@fortawesome/free-brands-svg-icons": "^6.7.2",
|
|
24
|
+
"@fortawesome/free-regular-svg-icons": "^6.7.2",
|
|
25
|
+
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
26
|
+
"react": "^19.1.0",
|
|
27
|
+
"react-dom": "^19.1.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@chromatic-com/storybook": "^4.0.1",
|
|
31
|
+
"@eslint/js": "^9.30.1",
|
|
32
|
+
"@storybook/addon-a11y": "^9.0.18",
|
|
33
|
+
"@storybook/addon-docs": "^9.0.18",
|
|
34
|
+
"@storybook/addon-vitest": "^9.0.18",
|
|
35
|
+
"@storybook/react-vite": "^9.0.18",
|
|
36
|
+
"@tailwindcss/postcss": "^4.1.11",
|
|
37
|
+
"@types/react": "^19.1.8",
|
|
38
|
+
"@types/react-dom": "^19.1.6",
|
|
39
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
40
|
+
"@vitest/browser": "^3.2.4",
|
|
41
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
42
|
+
"autoprefixer": "^10.4.21",
|
|
43
|
+
"eslint": "^9.30.1",
|
|
44
|
+
"eslint-plugin-react": "^7.37.5",
|
|
45
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
46
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
47
|
+
"eslint-plugin-storybook": "^9.0.18",
|
|
48
|
+
"globals": "^16.3.0",
|
|
49
|
+
"playwright": "^1.54.1",
|
|
50
|
+
"postcss": "^8.5.6",
|
|
51
|
+
"prop-types": "^15.8.1",
|
|
52
|
+
"storybook": "^9.0.18",
|
|
53
|
+
"tailwindcss": "^4.1.11",
|
|
54
|
+
"typescript": "^5.8.3",
|
|
55
|
+
"vite": "^7.0.4",
|
|
56
|
+
"vitest": "^3.2.4"
|
|
57
|
+
}
|
|
58
|
+
}
|