@uob-web-and-digital/component-library 0.0.39 → 0.0.41

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,23 @@
1
+ import { ReactElement } from 'react';
2
+ import { ImageProps } from '../../atoms/Image/Image';
3
+ import { ThemeProps } from '../../../themeProps';
4
+ import './cardFeaturedNews.scss';
5
+ export interface CardFeaturedNewsProps {
6
+ theme: ThemeProps;
7
+ inverse?: boolean;
8
+ image?: ImageProps;
9
+ tag?: string;
10
+ title: string;
11
+ subtitle?: string;
12
+ href: string;
13
+ publishDate?: string;
14
+ authorString?: string;
15
+ location?: string;
16
+ copy?: string;
17
+ isPrimary?: boolean;
18
+ titleTag: 'h2' | 'h3';
19
+ }
20
+ /**
21
+ * Primary UI component for user interaction
22
+ */
23
+ export default function CardFeaturedNews({ theme, inverse, image, title, href, publishDate, copy, isPrimary, titleTag }: CardFeaturedNewsProps): ReactElement;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import CardFeaturedNews from './CardFeaturedNews';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof CardFeaturedNews;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof CardFeaturedNews>;
13
+ export declare const FeaturedNewsCardExample: Story;
@@ -0,0 +1,12 @@
1
+ import { ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import { CardFeaturedNewsProps } from '../CardFeaturedNews/CardFeaturedNews';
4
+ import { LinkWithArrowProps } from '../../atoms/LinkWithArrow/LinkWithArrow';
5
+ import './mostReadNews.scss';
6
+ export interface MostReadNewsProps {
7
+ theme: ThemeProps;
8
+ heading: string;
9
+ cards: Omit<CardFeaturedNewsProps, 'theme'>[];
10
+ link?: LinkWithArrowProps;
11
+ }
12
+ export default function MostReadNews({ theme, heading, cards, link }: MostReadNewsProps): ReactElement;
@@ -0,0 +1,10 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import MostReadNews from './MostReadNews';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof MostReadNews;
6
+ tags: string[];
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const Example: Story;
@@ -0,0 +1,2 @@
1
+ import { MostReadNewsProps } from './MostReadNews';
2
+ export declare const mostReadNewsProps: MostReadNewsProps;
@@ -7,6 +7,7 @@ import './ctaComponent.scss';
7
7
  export interface CTAComponentProps {
8
8
  theme: ThemeProps;
9
9
  inverse: boolean;
10
+ highlight?: boolean;
10
11
  image?: ImageProps | null;
11
12
  heading: string;
12
13
  copy: string;
@@ -18,4 +19,4 @@ export interface CTAComponentProps {
18
19
  */
19
20
  fullWidth?: boolean;
20
21
  }
21
- export default function CTAComponent({ theme, inverse, image, heading, copy, primaryCTA, secondaryCTA, link, fullWidth }: CTAComponentProps): ReactElement;
22
+ export default function CTAComponent({ theme, inverse, highlight, image, heading, copy, primaryCTA, secondaryCTA, link, fullWidth }: CTAComponentProps): ReactElement;
@@ -8,5 +8,6 @@ declare const meta: {
8
8
  export default meta;
9
9
  type Story = StoryObj<typeof meta>;
10
10
  export declare const Dark: Story;
11
+ export declare const Light: Story;
11
12
  export declare const Highlighted: Story;
12
13
  export declare const ExampleNoImage: Story;
@@ -8,6 +8,7 @@ import { CardPromoVideoProps } from '../../molecules/CardPromoVideo/CardPromoVid
8
8
  import { CardStaffProps } from '../../molecules/CardStaff/CardStaff';
9
9
  import { CardRelatedProps } from '../../molecules/CardRelatedCourse/CardRelatedCourse';
10
10
  import { CardImageProps } from '../../molecules/CardImage/CardImage';
11
+ import { CardFeaturedNewsProps } from '../../molecules/CardFeaturedNews/CardFeaturedNews';
11
12
  import { ThemeProps } from '../../../themeProps';
12
13
  import './carousel.scss';
13
14
  export interface CarouselProps {
@@ -15,7 +16,7 @@ export interface CarouselProps {
15
16
  inverse?: boolean;
16
17
  type: string;
17
18
  title?: string;
18
- cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[];
19
+ cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[];
19
20
  exploreMore?: string;
20
21
  }
21
22
  export default function Carousel({ theme, inverse, type, title, cards, exploreMore }: CarouselProps): ReactElement;
@@ -6,7 +6,8 @@ import './clearingBanner.scss';
6
6
  export interface ClearingBannerProps {
7
7
  theme: ThemeProps;
8
8
  text: string;
9
+ showIcon?: boolean;
9
10
  smallLink?: ParagraphLinkProps;
10
11
  mainLink?: TextButtonWithIconProps;
11
12
  }
12
- export default function ClearingBanner({ theme, text, smallLink, mainLink }: ClearingBannerProps): ReactElement;
13
+ export default function ClearingBanner({ theme, text, showIcon, smallLink, mainLink }: ClearingBannerProps): ReactElement;
@@ -0,0 +1,10 @@
1
+ import { ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import { CardFeaturedNewsProps } from '../../molecules/CardFeaturedNews/CardFeaturedNews';
4
+ import './leadNewsArticles.scss';
5
+ export interface LeadNewsArticlesProps {
6
+ theme: ThemeProps;
7
+ featuredArticle: CardFeaturedNewsProps;
8
+ otherLeadArticles: Omit<CardFeaturedNewsProps, 'theme'>[];
9
+ }
10
+ export default function LeadNewsArticles({ theme, featuredArticle, otherLeadArticles }: LeadNewsArticlesProps): ReactElement;
@@ -0,0 +1,10 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import LeadNewsArticles from './LeadNewsArticles';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof LeadNewsArticles;
6
+ tags: string[];
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const Example: Story;
@@ -0,0 +1,2 @@
1
+ import { LeadNewsArticlesProps } from './LeadNewsArticles';
2
+ export declare const leadNewsArticlesProps: LeadNewsArticlesProps;
@@ -0,0 +1,10 @@
1
+ import { ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import { CardFeaturedNewsProps } from '../../molecules/CardFeaturedNews/CardFeaturedNews';
4
+ import './newsArticlesPromoBlock.scss';
5
+ export interface NewsArticlesPromoBlockProps {
6
+ theme: ThemeProps;
7
+ heading: string;
8
+ cards: CardFeaturedNewsProps[];
9
+ }
10
+ export default function NewsArticlesPromoBlock({ theme, heading, cards }: NewsArticlesPromoBlockProps): ReactElement;
@@ -0,0 +1,10 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import NewsArticlesPromoBlock from './NewsArticlesPromoBlock';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof NewsArticlesPromoBlock;
6
+ tags: string[];
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const Example: Story;
@@ -0,0 +1,2 @@
1
+ import { NewsArticlesPromoBlockProps } from './NewsArticlesPromoBlock';
2
+ export declare const newsArticlesPromoBlockProps: NewsArticlesPromoBlockProps;
package/dist/index.d.ts CHANGED
@@ -192,12 +192,28 @@ interface CardImageProps {
192
192
  imageCredit?: string;
193
193
  }
194
194
 
195
+ interface CardFeaturedNewsProps {
196
+ theme: ThemeProps;
197
+ inverse?: boolean;
198
+ image?: ImageProps;
199
+ tag?: string;
200
+ title: string;
201
+ subtitle?: string;
202
+ href: string;
203
+ publishDate?: string;
204
+ authorString?: string;
205
+ location?: string;
206
+ copy?: string;
207
+ isPrimary?: boolean;
208
+ titleTag: 'h2' | 'h3';
209
+ }
210
+
195
211
  interface CarouselProps {
196
212
  theme: ThemeProps;
197
213
  inverse?: boolean;
198
214
  type: string;
199
215
  title?: string;
200
- cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[];
216
+ cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[];
201
217
  exploreMore?: string;
202
218
  }
203
219
  declare function Carousel({ theme, inverse, type, title, cards, exploreMore }: CarouselProps): ReactElement;
@@ -639,6 +655,7 @@ declare function ImageBlock({ theme, inverse, title, description, linkProps, ful
639
655
  interface CTAComponentProps {
640
656
  theme: ThemeProps;
641
657
  inverse: boolean;
658
+ highlight?: boolean;
642
659
  image?: ImageProps | null;
643
660
  heading: string;
644
661
  copy: string;
@@ -650,7 +667,7 @@ interface CTAComponentProps {
650
667
  */
651
668
  fullWidth?: boolean;
652
669
  }
653
- declare function CTAComponent({ theme, inverse, image, heading, copy, primaryCTA, secondaryCTA, link, fullWidth }: CTAComponentProps): ReactElement;
670
+ declare function CTAComponent({ theme, inverse, highlight, image, heading, copy, primaryCTA, secondaryCTA, link, fullWidth }: CTAComponentProps): ReactElement;
654
671
 
655
672
  interface TextButtonWithIconProps {
656
673
  /**
@@ -689,10 +706,11 @@ interface TextButtonWithIconProps {
689
706
  interface ClearingBannerProps {
690
707
  theme: ThemeProps;
691
708
  text: string;
709
+ showIcon?: boolean;
692
710
  smallLink?: ParagraphLinkProps;
693
711
  mainLink?: TextButtonWithIconProps;
694
712
  }
695
- declare function ClearingBanner({ theme, text, smallLink, mainLink }: ClearingBannerProps): ReactElement;
713
+ declare function ClearingBanner({ theme, text, showIcon, smallLink, mainLink }: ClearingBannerProps): ReactElement;
696
714
 
697
715
  type LinkProps = Omit<LinkWithArrowProps, 'theme' | 'inverse'>;
698
716
  interface QuoteBlockProps extends HeadingProps {
@@ -1001,6 +1019,37 @@ interface ListingFilterWrapperProps {
1001
1019
  }
1002
1020
  declare function ListingFilterWrapper({ theme, showFilterButtonLabel, numSelected, filterElement }: ListingFilterWrapperProps): ReactElement;
1003
1021
 
1022
+ interface PillProps {
1023
+ /**
1024
+ * The theme to use
1025
+ */
1026
+ theme: ThemeProps;
1027
+ label: string;
1028
+ url?: string;
1029
+ externalLink?: boolean;
1030
+ }
1031
+
1032
+ interface TopicSelectorProps {
1033
+ /**
1034
+ * The theme to use
1035
+ */
1036
+ theme?: string;
1037
+ /**
1038
+ * The pills to display the list
1039
+ */
1040
+ topics: Omit<PillProps, 'theme'>[];
1041
+ titleTag: 'h2' | 'h3';
1042
+ heading: string;
1043
+ }
1044
+ declare function TopicSelector({ topics, theme, titleTag, heading }: TopicSelectorProps): ReactElement | null;
1045
+
1046
+ interface LeadNewsArticlesProps {
1047
+ theme: ThemeProps;
1048
+ featuredArticle: CardFeaturedNewsProps;
1049
+ otherLeadArticles: Omit<CardFeaturedNewsProps, 'theme'>[];
1050
+ }
1051
+ declare function LeadNewsArticles({ theme, featuredArticle, otherLeadArticles }: LeadNewsArticlesProps): ReactElement;
1052
+
1004
1053
  interface TabItemProps {
1005
1054
  title: string;
1006
1055
  content: string;
@@ -1042,4 +1091,18 @@ interface TabsBlockProps {
1042
1091
  }
1043
1092
  declare function TabsBlock({ theme, inverse, title, description, tabItems }: TabsBlockProps): ReactElement | null;
1044
1093
 
1045
- export { Accordion, AcreditationPromotion, Breadcrumbs, CTAComponent, Carousel, ClearingBanner, CourseDeliveryPills, FeaturedContent, FeaturedSignpost, FeaturedVideo, Footer, GeneralSearchFilter, Header, Hero, HeroCarousel, ImageBlock, IntroText, ListingFilterWrapper, ListingResults, ListingResultsCount, MainWrapper, Pagination, PromoBlock, QuoteBlock, RelatedCourses, RichText, SearchCourses, SignPost, SkipToContent, StaffListingCarousel, StandardListingFilter, TabsBlock, TextWithBackground, VideoCardComponent, VideoEmbed };
1094
+ interface ImageCarouselProps extends HeadingProps {
1095
+ fullWidth?: boolean;
1096
+ widerImage: boolean;
1097
+ images: CardImageProps[];
1098
+ }
1099
+ declare function ImageCarousel({ theme, inverse, title, description, linkProps, fullWidth, widerImage, images }: ImageCarouselProps): ReactElement;
1100
+
1101
+ interface NewsArticlesPromoBlockProps {
1102
+ theme: ThemeProps;
1103
+ heading: string;
1104
+ cards: CardFeaturedNewsProps[];
1105
+ }
1106
+ declare function NewsArticlesPromoBlock({ theme, heading, cards }: NewsArticlesPromoBlockProps): ReactElement;
1107
+
1108
+ export { Accordion, AcreditationPromotion, Breadcrumbs, CTAComponent, Carousel, ClearingBanner, CourseDeliveryPills, FeaturedContent, FeaturedSignpost, FeaturedVideo, Footer, GeneralSearchFilter, Header, Hero, HeroCarousel, ImageBlock, ImageCarousel, IntroText, LeadNewsArticles, ListingFilterWrapper, ListingResults, ListingResultsCount, MainWrapper, NewsArticlesPromoBlock, Pagination, PromoBlock, QuoteBlock, RelatedCourses, RichText, SearchCourses, SignPost, SkipToContent, StaffListingCarousel, StandardListingFilter, TabsBlock, TextWithBackground, TopicSelector, VideoCardComponent, VideoEmbed };