formica-ui-lib 1.0.7 → 1.0.12

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.
@@ -0,0 +1,13 @@
1
+ export type ButtonVariant = 'nav' | 'standard' | 'text' | 'icon' | 'free';
2
+ export type IconPosition = 'left' | 'right';
3
+ export interface ButtonProps {
4
+ label?: string;
5
+ iconSrc?: string;
6
+ iconAlt?: string;
7
+ iconPosition?: IconPosition;
8
+ variant?: ButtonVariant;
9
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
10
+ className?: string;
11
+ active?: boolean;
12
+ href?: string;
13
+ }
@@ -0,0 +1,6 @@
1
+ export interface IconProps {
2
+ src: string;
3
+ alt?: string;
4
+ size?: number;
5
+ className?: string;
6
+ }
@@ -0,0 +1,7 @@
1
+ export type ImageProps = React.ImgHTMLAttributes<HTMLImageElement> & {
2
+ src: string;
3
+ alt: string;
4
+ width?: string | number;
5
+ height?: string | number;
6
+ className?: string;
7
+ };
@@ -0,0 +1,8 @@
1
+ export type TextVariant = 'h1' | 'h2' | 'h3' | 'nav' | 'standard' | 'navlink' | 'free' | 'body' | 'bold' | 'caption';
2
+ export type TextTag = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
3
+ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
4
+ as?: TextTag;
5
+ variant?: TextVariant;
6
+ className?: string;
7
+ children: React.ReactNode;
8
+ }
@@ -0,0 +1,8 @@
1
+ export interface FeatureCardProps {
2
+ imageSrc: string;
3
+ imageAlt: string;
4
+ title: string;
5
+ description: string;
6
+ buttonLabel: string;
7
+ buttonHref: string;
8
+ }
@@ -0,0 +1,8 @@
1
+ export interface Country {
2
+ label: string;
3
+ locale: string;
4
+ href: string;
5
+ }
6
+ export interface Props {
7
+ countries?: Country[];
8
+ }
@@ -0,0 +1,10 @@
1
+ type AlignOption = 'left' | 'right';
2
+ export interface FeatureBannerProps {
3
+ imageSrc: string;
4
+ imageAlt?: string;
5
+ headline: string;
6
+ body: string;
7
+ buttonLabel: string;
8
+ align?: AlignOption;
9
+ }
10
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface HeroBannerProps {
2
+ imageSrc: string;
3
+ heading: string;
4
+ subheading: string;
5
+ body: string;
6
+ }
@@ -0,0 +1,24 @@
1
+ import { IconProp } from "@fortawesome/fontawesome-svg-core";
2
+ export interface SiteLinkGroup {
3
+ group: string;
4
+ links: {
5
+ label: string;
6
+ }[];
7
+ }
8
+ export interface SocialLink {
9
+ href: string;
10
+ icon: IconProp | string;
11
+ }
12
+ export interface Legal {
13
+ phone?: string;
14
+ disclaimerText: string;
15
+ footerLinks: {
16
+ label: string;
17
+ href: string;
18
+ }[];
19
+ }
20
+ export interface FooterProps {
21
+ siteLinks?: SiteLinkGroup[];
22
+ socialLinks?: SocialLink[];
23
+ legal?: Legal;
24
+ }
@@ -0,0 +1,21 @@
1
+ export interface NavSubItem {
2
+ label: string;
3
+ href: string;
4
+ }
5
+ export interface NavGroup {
6
+ group: string;
7
+ items: NavSubItem[];
8
+ }
9
+ export interface NavItem {
10
+ label: string;
11
+ submenu?: NavGroup[];
12
+ }
13
+ export interface Country {
14
+ label: string;
15
+ locale: string;
16
+ href: string;
17
+ }
18
+ export interface TopNavBarProps {
19
+ NavMenuWithSubItems: NavItem[];
20
+ Countries: Country[];
21
+ }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,13 @@
1
+ export type { TextProps } from './componentProps/atoms/text/TextProps';
2
+ export type { ButtonProps } from './componentProps/atoms/button/ButtonProps';
3
+ export type { ImageProps } from './componentProps/atoms/image/ImageProps';
4
+ export type { IconProps } from './componentProps/atoms/icon/IconProps';
5
+ export type { FeatureCardProps } from './componentProps/molecules/card/featurecard/FeatureCardProps';
6
+ export type { Country, Props } from './componentProps/molecules/selectors/CountrySelectorProps';
7
+ export type { SiteLinkGroup, SocialLink, Legal, FooterProps } from './componentProps/organisms/footer/FooterProps';
8
+ export type { FeatureBannerProps } from './componentProps/organisms/banner/featurebanner/FeatureBannerProps';
9
+ export type { HeroBannerProps } from './componentProps/organisms/banner/herobanner/HeroBannerProps';
10
+ export type { TopNavBarProps } from './componentProps/organisms/menu/TopNavBarProps';
1
11
  export { default as Text } from './stories/atoms/text/Text';
2
12
  export { default as Button } from './stories/atoms/button/Button';
3
13
  export { default as Image } from './stories/atoms/image/Image';
@@ -1,16 +1,4 @@
1
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
- };
2
+ import { ButtonProps } from "../../../componentProps/atoms/button/ButtonProps";
15
3
  export declare const Button: React.FC<ButtonProps>;
16
4
  export default Button;
@@ -1,9 +1,4 @@
1
1
  import React from 'react';
2
- type IconProps = {
3
- src: string;
4
- alt?: string;
5
- size?: number;
6
- className?: string;
7
- };
2
+ import { IconProps } from "../../../componentProps/atoms/icon/IconProps";
8
3
  export declare const Icon: React.FC<IconProps>;
9
4
  export default Icon;
@@ -1,10 +1,4 @@
1
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
- };
2
+ import { ImageProps } from "../../../componentProps/atoms/image/ImageProps";
9
3
  declare const Image: React.FC<ImageProps>;
10
4
  export default Image;
@@ -1,11 +1,4 @@
1
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
- }
2
+ import { TextProps } from "../../../componentProps/atoms/text/TextProps";
10
3
  export declare const Text: React.FC<TextProps>;
11
4
  export default Text;
@@ -1,11 +1,4 @@
1
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
- };
2
+ import { FeatureCardProps } from "../../../../componentProps/molecules/card/featurecard/FeatureCardProps";
10
3
  declare const FeatureCard: React.FC<FeatureCardProps>;
11
4
  export default FeatureCard;
@@ -1,11 +1,4 @@
1
1
  import React from "react";
2
- type Country = {
3
- label: string;
4
- locale: string;
5
- href: string;
6
- };
7
- type Props = {
8
- countries?: Country[];
9
- };
2
+ import { Props } from "../../../componentProps/molecules/selectors/CountrySelectorProps";
10
3
  declare const CountrySelector: React.FC<Props>;
11
4
  export default CountrySelector;
@@ -1,12 +1,4 @@
1
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
- };
2
+ import { FeatureBannerProps } from "../../../../componentProps/organisms/banner/featurebanner/FeatureBannerProps";
11
3
  declare const FeatureBanner: React.FC<FeatureBannerProps>;
12
4
  export default FeatureBanner;
@@ -1,9 +1,4 @@
1
1
  import React from 'react';
2
- type HeroBannerProps = {
3
- imageSrc: string;
4
- heading: string;
5
- subheading: string;
6
- body: string;
7
- };
2
+ import { HeroBannerProps } from "../../../../componentProps/organisms/banner/herobanner/HeroBannerProps";
8
3
  declare const HeroBanner: React.FC<HeroBannerProps>;
9
4
  export default HeroBanner;
@@ -1,27 +1,4 @@
1
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
- };
2
+ import { FooterProps } from '../../../componentProps/organisms/footer/FooterProps';
26
3
  declare const Footer: React.FC<FooterProps>;
27
4
  export default Footer;
@@ -1,24 +1,4 @@
1
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
- };
2
+ import { TopNavBarProps } from "../../../componentProps/organisms/menu/TopNavBarProps";
23
3
  declare const TopNavBar: React.FC<TopNavBarProps>;
24
4
  export default TopNavBar;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "formica-ui-lib",
3
3
  "private": false,
4
- "version": "1.0.7",
4
+ "version": "1.0.12",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [