@uob-web-and-digital/component-library 0.0.43 → 0.0.44

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.
@@ -25,3 +25,5 @@ export declare const ArrowRightDark: Story;
25
25
  export declare const ArrowRightLight: Story;
26
26
  export declare const ArrowLeftDark: Story;
27
27
  export declare const ArrowLeftLight: Story;
28
+ export declare const EmailDark: Story;
29
+ export declare const EmailLight: Story;
@@ -9,3 +9,4 @@ export declare const LinkedInProps: IconButtonProps;
9
9
  export declare const ArrowLeftProps: IconButtonProps;
10
10
  export declare const ArrowRightProps: IconButtonProps;
11
11
  export declare const HamburgerProps: IconButtonProps;
12
+ export declare const EmailProps: IconButtonProps;
@@ -1,21 +1,20 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ImageProps } from '../../atoms/Image/Image';
3
3
  import { ThemeProps } from '../../../themeProps';
4
- import { ParagraphLinkProps } from '../../atoms/ParagraphLink/ParagraphLink';
5
4
  import './cardPromoVideo.scss';
6
5
  export interface CardPromoVideoProps {
7
6
  theme: ThemeProps;
8
7
  inverse?: boolean;
9
8
  image?: ImageProps;
10
9
  title: string;
10
+ href: string;
11
11
  publishDate?: string;
12
12
  videoLength?: string;
13
13
  copy?: string;
14
14
  isSingle?: boolean;
15
- link?: ParagraphLinkProps;
16
15
  titleTag: 'h2' | 'h3';
17
16
  }
18
17
  /**
19
18
  * Primary UI component for user interaction
20
19
  */
21
- export default function CardPromoVideo({ theme, inverse, image, title, publishDate, videoLength, copy, isSingle, link, titleTag }: CardPromoVideoProps): ReactElement;
20
+ export default function CardPromoVideo({ theme, inverse, image, title, publishDate, videoLength, copy, isSingle, href, titleTag }: CardPromoVideoProps): ReactElement;
@@ -10,5 +10,7 @@ declare const meta: {
10
10
  };
11
11
  export default meta;
12
12
  type Story = StoryObj<typeof CardPromoVideo>;
13
- export declare const SinglePromoVideoCard: Story;
14
- export declare const OneOfManyPromoVideoCards: Story;
13
+ export declare const SinglePromoVideoCardDark: Story;
14
+ export declare const SinglePromoVideoCardLight: Story;
15
+ export declare const OneOfManyPromoVideoCardsDark: Story;
16
+ export declare const OneOfManyPromoVideoCardsLight: Story;
@@ -0,0 +1,11 @@
1
+ import { ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import { IconButtonProps } from '../../atoms/IconButton/IconButton';
4
+ import './shareButtons.scss';
5
+ export interface ShareButtonsProps {
6
+ theme: ThemeProps;
7
+ inverse?: boolean;
8
+ label?: string;
9
+ icons: IconButtonProps[];
10
+ }
11
+ export default function ShareButtons({ theme, inverse, label, icons }: ShareButtonsProps): ReactElement;
@@ -0,0 +1,11 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import ShareButtons from './ShareButtons';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof ShareButtons;
6
+ tags: string[];
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const ExampleLight: Story;
11
+ export declare const ExampleDark: Story;
@@ -0,0 +1,2 @@
1
+ import { ShareButtonsProps } from './ShareButtons';
2
+ export declare const shareButtonsProps: ShareButtonsProps;
@@ -17,7 +17,8 @@ export interface CarouselProps {
17
17
  type: string;
18
18
  title?: string;
19
19
  useH3ForCards?: boolean;
20
+ setCardInverse?: 'dark' | 'light';
20
21
  cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[];
21
22
  exploreMore?: string;
22
23
  }
23
- export default function Carousel({ theme, inverse, type, title, cards, useH3ForCards, exploreMore }: CarouselProps): ReactElement;
24
+ export default function Carousel({ theme, inverse, type, title, cards, useH3ForCards, setCardInverse, exploreMore }: CarouselProps): ReactElement;
@@ -0,0 +1,20 @@
1
+ import { ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import { ImageProps } from '../../atoms/Image/Image';
4
+ import { ShareButtonsProps } from '../../molecules/ShareButtons/ShareButtons';
5
+ import './heroArticle.scss';
6
+ export interface HeroArticleProps {
7
+ /**
8
+ * The theme to use
9
+ */
10
+ theme: ThemeProps;
11
+ inverse?: boolean;
12
+ title: string;
13
+ titleTag?: 'h1' | 'h2' | 'h3' | 'h4';
14
+ description: string;
15
+ image: ImageProps;
16
+ publishDate: string;
17
+ readTime?: string;
18
+ shareButtons: ShareButtonsProps;
19
+ }
20
+ export default function HeroArticle({ theme, inverse, title, titleTag, description, image, publishDate, readTime, shareButtons }: HeroArticleProps): ReactElement | null;
@@ -0,0 +1,10 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import HeroArticle from './HeroArticle';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof HeroArticle;
6
+ tags: string[];
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof HeroArticle>;
10
+ export declare const Example: Story;
@@ -0,0 +1,2 @@
1
+ import { HeroArticleProps } from './HeroArticle';
2
+ export declare const heroArticleProps: HeroArticleProps;
@@ -1,10 +1,12 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ThemeProps } from '../../../themeProps';
3
3
  import { CardFeaturedNewsProps } from '../../molecules/CardFeaturedNews/CardFeaturedNews';
4
+ import { CardPromoVideoProps } from '../../molecules/CardPromoVideo/CardPromoVideo';
4
5
  import './newsArticlesPromoBlock.scss';
5
6
  export interface NewsArticlesPromoBlockProps {
6
7
  theme: ThemeProps;
7
8
  heading: string;
8
- cards: CardFeaturedNewsProps[];
9
+ cards: CardFeaturedNewsProps[] | CardPromoVideoProps[];
10
+ cardType?: 'featured-news' | 'promo-video';
9
11
  }
10
- export default function NewsArticlesPromoBlock({ theme, heading, cards }: NewsArticlesPromoBlockProps): ReactElement;
12
+ export default function NewsArticlesPromoBlock({ theme, heading, cards, cardType }: NewsArticlesPromoBlockProps): ReactElement;
@@ -7,4 +7,5 @@ declare const meta: {
7
7
  };
8
8
  export default meta;
9
9
  type Story = StoryObj<typeof meta>;
10
- export declare const Example: Story;
10
+ export declare const FeaturedNewsExample: Story;
11
+ export declare const VideoCardExample: Story;
@@ -1,2 +1,3 @@
1
1
  import { NewsArticlesPromoBlockProps } from './NewsArticlesPromoBlock';
2
2
  export declare const newsArticlesPromoBlockProps: NewsArticlesPromoBlockProps;
3
+ export declare const videoNewsArticlesPromoBlockProps: NewsArticlesPromoBlockProps;
@@ -6,6 +6,7 @@ export interface RelatedCoursesProps {
6
6
  theme: ThemeProps;
7
7
  inverse?: boolean;
8
8
  heading: string;
9
+ fullWidth?: boolean;
9
10
  cards: CardRelatedProps[];
10
11
  }
11
- export default function RelatedCourses({ theme, inverse, heading, cards }: RelatedCoursesProps): ReactElement;
12
+ export default function RelatedCourses({ theme, inverse, heading, fullWidth, cards }: RelatedCoursesProps): ReactElement;
@@ -1,2 +1,4 @@
1
1
  import { RichTextProps } from './RichText';
2
2
  export declare const richTextProps: RichTextProps;
3
+ export declare const newsArticleRichText: RichTextProps;
4
+ export declare const newsArticleRichTextBullets: RichTextProps;
@@ -1,2 +1,3 @@
1
1
  import { StaffListingCarouselProps } from './StaffListingCarousel';
2
2
  export declare const staffListingCarouselProps: StaffListingCarouselProps;
3
+ export declare const newsStaffListingCarouselProps: StaffListingCarouselProps;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React, { KeyboardEvent, ReactElement, PropsWithChildren, MouseEventHandler, ChangeEvent } from 'react';
1
+ import React, { KeyboardEvent, ReactElement, PropsWithChildren, MouseEventHandler, ChangeEvent, ReactNode } from 'react';
2
2
 
3
3
  type ImageProps = {
4
4
  src: {
@@ -136,30 +136,16 @@ interface CardPromoSignpostProps {
136
136
  titleTag: 'h2' | 'h3';
137
137
  }
138
138
 
139
- interface ParagraphLinkProps {
140
- /**
141
- * The theme to use
142
- */
143
- theme: ThemeProps;
144
- /**
145
- * Whether to inverse the colours
146
- */
147
- inverse?: boolean;
148
- label: string;
149
- url: string;
150
- externalLink?: boolean;
151
- }
152
-
153
139
  interface CardPromoVideoProps {
154
140
  theme: ThemeProps;
155
141
  inverse?: boolean;
156
142
  image?: ImageProps;
157
143
  title: string;
144
+ href: string;
158
145
  publishDate?: string;
159
146
  videoLength?: string;
160
147
  copy?: string;
161
148
  isSingle?: boolean;
162
- link?: ParagraphLinkProps;
163
149
  titleTag: 'h2' | 'h3';
164
150
  }
165
151
 
@@ -217,10 +203,11 @@ interface CarouselProps {
217
203
  type: string;
218
204
  title?: string;
219
205
  useH3ForCards?: boolean;
206
+ setCardInverse?: 'dark' | 'light';
220
207
  cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[];
221
208
  exploreMore?: string;
222
209
  }
223
- declare function Carousel({ theme, inverse, type, title, cards, useH3ForCards, exploreMore }: CarouselProps): ReactElement;
210
+ declare function Carousel({ theme, inverse, type, title, cards, useH3ForCards, setCardInverse, exploreMore }: CarouselProps): ReactElement;
224
211
 
225
212
  interface FeaturedContentProps {
226
213
  /**
@@ -673,6 +660,20 @@ interface CTAComponentProps {
673
660
  }
674
661
  declare function CTAComponent({ theme, inverse, highlight, image, heading, copy, primaryCTA, secondaryCTA, link, fullWidth }: CTAComponentProps): ReactElement;
675
662
 
663
+ interface ParagraphLinkProps {
664
+ /**
665
+ * The theme to use
666
+ */
667
+ theme: ThemeProps;
668
+ /**
669
+ * Whether to inverse the colours
670
+ */
671
+ inverse?: boolean;
672
+ label: string;
673
+ url: string;
674
+ externalLink?: boolean;
675
+ }
676
+
676
677
  interface TextButtonWithIconProps {
677
678
  /**
678
679
  * The theme to use
@@ -857,9 +858,10 @@ interface RelatedCoursesProps {
857
858
  theme: ThemeProps;
858
859
  inverse?: boolean;
859
860
  heading: string;
861
+ fullWidth?: boolean;
860
862
  cards: CardRelatedProps[];
861
863
  }
862
- declare function RelatedCourses({ theme, inverse, heading, cards }: RelatedCoursesProps): ReactElement;
864
+ declare function RelatedCourses({ theme, inverse, heading, fullWidth, cards }: RelatedCoursesProps): ReactElement;
863
865
 
864
866
  interface AccomodationCardProps {
865
867
  theme: ThemeProps;
@@ -1114,9 +1116,10 @@ declare function ImageCarousel({ theme, inverse, title, description, linkProps,
1114
1116
  interface NewsArticlesPromoBlockProps {
1115
1117
  theme: ThemeProps;
1116
1118
  heading: string;
1117
- cards: CardFeaturedNewsProps[];
1119
+ cards: CardFeaturedNewsProps[] | CardPromoVideoProps[];
1120
+ cardType?: 'featured-news' | 'promo-video';
1118
1121
  }
1119
- declare function NewsArticlesPromoBlock({ theme, heading, cards }: NewsArticlesPromoBlockProps): ReactElement;
1122
+ declare function NewsArticlesPromoBlock({ theme, heading, cards, cardType }: NewsArticlesPromoBlockProps): ReactElement;
1120
1123
 
1121
1124
  interface SingleButtonProps {
1122
1125
  theme: ThemeProps;
@@ -1134,4 +1137,50 @@ interface FiveArticlesGridProps {
1134
1137
  }
1135
1138
  declare function FiveArticlesGrid({ theme, heading, featuredArticle, otherLeadArticles }: FiveArticlesGridProps): ReactElement;
1136
1139
 
1137
- export { Accordion, AcreditationPromotion, Breadcrumbs, CTAComponent, Carousel, ClearingBanner, CourseDeliveryPills, FeaturedContent, FeaturedSignpost, FeaturedVideo, FiveArticlesGrid, Footer, GeneralSearchFilter, Header, Hero, HeroCarousel, ImageBlock, ImageCarousel, IntroText, LeadNewsArticles, ListingFilterWrapper, ListingResults, ListingResultsCount, MainWrapper, NewsArticlesPromoBlock, Pagination, PromoBlock, QuoteBlock, RelatedCourses, RichText, SearchCourses, SignPost, SingleButton, SkipToContent, StaffListingCarousel, StandardListingFilter, TabsBlock, TextWithBackground, TopicSelector, VideoCardComponent, VideoEmbed };
1140
+ interface IconButtonProps {
1141
+ theme: ThemeProps;
1142
+ inverse?: boolean;
1143
+ url?: string;
1144
+ title: string;
1145
+ icon: IconType$1;
1146
+ externalLink?: boolean;
1147
+ onClick?: () => void;
1148
+ ariaControls?: string;
1149
+ isSubmit?: boolean;
1150
+ disabled?: boolean;
1151
+ }
1152
+
1153
+ interface ShareButtonsProps {
1154
+ theme: ThemeProps;
1155
+ inverse?: boolean;
1156
+ label?: string;
1157
+ icons: IconButtonProps[];
1158
+ }
1159
+
1160
+ interface HeroArticleProps {
1161
+ /**
1162
+ * The theme to use
1163
+ */
1164
+ theme: ThemeProps;
1165
+ inverse?: boolean;
1166
+ title: string;
1167
+ titleTag?: 'h1' | 'h2' | 'h3' | 'h4';
1168
+ description: string;
1169
+ image: ImageProps;
1170
+ publishDate: string;
1171
+ readTime?: string;
1172
+ shareButtons: ShareButtonsProps;
1173
+ }
1174
+ declare function HeroArticle({ theme, inverse, title, titleTag, description, image, publishDate, readTime, shareButtons }: HeroArticleProps): ReactElement | null;
1175
+
1176
+ interface SidebarWrapperProps {
1177
+ /**
1178
+ * The theme to use
1179
+ */
1180
+ theme: ThemeProps;
1181
+ sidebarElement: ReactNode;
1182
+ children: ReactNode;
1183
+ }
1184
+ declare function SidebarWrapper({ theme, sidebarElement, children }: SidebarWrapperProps): ReactElement;
1185
+
1186
+ export { Accordion, AcreditationPromotion, Breadcrumbs, CTAComponent, Carousel, ClearingBanner, CourseDeliveryPills, FeaturedContent, FeaturedSignpost, FeaturedVideo, FiveArticlesGrid, Footer, GeneralSearchFilter, Header, Hero, HeroArticle, HeroCarousel, ImageBlock, ImageCarousel, IntroText, LeadNewsArticles, ListingFilterWrapper, ListingResults, ListingResultsCount, MainWrapper, NewsArticlesPromoBlock, Pagination, PromoBlock, QuoteBlock, RelatedCourses, RichText, SearchCourses, SidebarWrapper, SignPost, SingleButton, SkipToContent, StaffListingCarousel, StandardListingFilter, TabsBlock, TextWithBackground, TopicSelector, VideoCardComponent, VideoEmbed };