@uob-web-and-digital/component-library 0.0.30 → 0.0.31

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,15 @@
1
+ import { ReactElement } from 'react';
2
+ import { ImageProps } from '../../atoms/Image/Image';
3
+ import { ThemeProps } from '../../../themeProps';
4
+ import './cardImage.scss';
5
+ export interface CardImageProps {
6
+ theme: ThemeProps;
7
+ inverse?: boolean;
8
+ image: ImageProps;
9
+ imageCaption?: string;
10
+ imageCredit?: string;
11
+ }
12
+ /**
13
+ * Primary UI component for user interaction
14
+ */
15
+ export default function CardImage({ theme, inverse, image, imageCaption, imageCredit }: CardImageProps): ReactElement;
@@ -0,0 +1,18 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import CardImage from './CardImage';
3
+ import './cardImage.scss';
4
+ declare const meta: {
5
+ title: string;
6
+ component: typeof CardImage;
7
+ tags: string[];
8
+ parameters: {
9
+ backgrounds: {
10
+ default: string;
11
+ };
12
+ };
13
+ };
14
+ export default meta;
15
+ type Story = StoryObj<typeof CardImage>;
16
+ export declare const Default: Story;
17
+ export declare const Dark: Story;
18
+ export declare const Light: Story;
@@ -0,0 +1,2 @@
1
+ import { CardImageProps } from './CardImage';
2
+ export declare const cardImageProps: CardImageProps;
@@ -0,0 +1,20 @@
1
+ import { ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import { LinkWithArrowProps } from '../../atoms/LinkWithArrow/LinkWithArrow';
4
+ import './heading.scss';
5
+ type LinkProps = Omit<LinkWithArrowProps, 'theme' | 'inverse'>;
6
+ export interface HeadingProps {
7
+ /**
8
+ * The theme to use
9
+ */
10
+ theme: ThemeProps;
11
+ /**
12
+ * Whether to inverse the colours
13
+ */
14
+ inverse?: boolean;
15
+ title?: string;
16
+ description?: string;
17
+ linkProps?: LinkProps;
18
+ }
19
+ export default function Heading({ title, description, linkProps, theme, inverse }: HeadingProps): ReactElement | null;
20
+ export {};
@@ -0,0 +1,18 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import Heading from './Heading';
3
+ import './heading.scss';
4
+ declare const meta: {
5
+ title: string;
6
+ component: typeof Heading;
7
+ tags: string[];
8
+ parameters: {
9
+ backgrounds: {
10
+ default: string;
11
+ };
12
+ };
13
+ };
14
+ export default meta;
15
+ type Story = StoryObj<typeof Heading>;
16
+ export declare const Default: Story;
17
+ export declare const Dark: Story;
18
+ export declare const Light: Story;
@@ -0,0 +1,2 @@
1
+ import { HeadingProps } from './Heading';
2
+ export declare const headingProps: HeadingProps;
@@ -0,0 +1,9 @@
1
+ import { ReactElement } from 'react';
2
+ import './imageBlock.scss';
3
+ import { HeadingProps } from '../../molecules/Heading/Heading';
4
+ import { CardImageProps } from '../../molecules/CardImage/CardImage';
5
+ export interface ImageBlockProps extends HeadingProps {
6
+ fullWidth: boolean;
7
+ images?: Omit<CardImageProps, 'theme' | 'inverse'>[];
8
+ }
9
+ export default function ImageBlock({ theme, inverse, title, description, linkProps, fullWidth, images }: ImageBlockProps): ReactElement | null;
@@ -0,0 +1,23 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import ImageBlock from './ImageBlock';
3
+ import './imageBlock.scss';
4
+ declare const meta: {
5
+ title: string;
6
+ component: typeof ImageBlock;
7
+ tags: string[];
8
+ parameters: {
9
+ backgrounds: {
10
+ default: string;
11
+ };
12
+ };
13
+ };
14
+ export default meta;
15
+ type Story = StoryObj<typeof ImageBlock>;
16
+ export declare const Default: Story;
17
+ export declare const Dark: Story;
18
+ export declare const Light: Story;
19
+ export declare const OneImageFullWidth: Story;
20
+ export declare const TwoImagesFullWidth: Story;
21
+ export declare const OneImage: Story;
22
+ export declare const TwoImages: Story;
23
+ export declare const NoImages: Story;
@@ -0,0 +1,2 @@
1
+ import { ImageBlockProps } from './ImageBlock';
2
+ export declare const imageBlockProps: ImageBlockProps;
package/dist/index.d.ts CHANGED
@@ -433,4 +433,48 @@ interface TextWithBackgroundProps {
433
433
  }
434
434
  declare function TextWithBackground({ text, theme, inverse, headingLevel, headingText, url, linkTitle, externalLink, linkStyle }: TextWithBackgroundProps): ReactElement;
435
435
 
436
- export { Breadcrumbs, Carousel, FeaturedContent, FeaturedSignpost, FeaturedVideo, Footer, Header, HeroCarousel, IntroText, MainWrapper, RichText, SearchCourses, SignPost, SkipToContent, TextWithBackground, VideoCardComponent };
436
+ interface LinkWithArrowProps {
437
+ /**
438
+ * The theme to use
439
+ */
440
+ theme: ThemeProps;
441
+ /**
442
+ * Whether to inverse the colours
443
+ */
444
+ inverse?: boolean;
445
+ url: string;
446
+ title: string;
447
+ externalLink?: boolean;
448
+ onKeyDown?: (e: KeyboardEvent) => void;
449
+ }
450
+
451
+ type LinkProps = Omit<LinkWithArrowProps, 'theme' | 'inverse'>;
452
+ interface HeadingProps {
453
+ /**
454
+ * The theme to use
455
+ */
456
+ theme: ThemeProps;
457
+ /**
458
+ * Whether to inverse the colours
459
+ */
460
+ inverse?: boolean;
461
+ title?: string;
462
+ description?: string;
463
+ linkProps?: LinkProps;
464
+ }
465
+
466
+ interface CardImageProps {
467
+ theme: ThemeProps;
468
+ inverse?: boolean;
469
+ image: ImageProps;
470
+ imageCaption?: string;
471
+ imageCredit?: string;
472
+ }
473
+
474
+ interface ImageBlockProps extends HeadingProps {
475
+ fullWidth: boolean;
476
+ images?: Omit<CardImageProps, 'theme' | 'inverse'>[];
477
+ }
478
+ declare function ImageBlock({ theme, inverse, title, description, linkProps, fullWidth, images }: ImageBlockProps): ReactElement | null;
479
+
480
+ export { Breadcrumbs, Carousel, FeaturedContent, FeaturedSignpost, FeaturedVideo, Footer, Header, HeroCarousel, ImageBlock, IntroText, MainWrapper, RichText, SearchCourses, SignPost, SkipToContent, TextWithBackground, VideoCardComponent };