@uob-web-and-digital/component-library 2.18.0 → 2.19.0

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.
@@ -11,7 +11,7 @@ export interface CardNewsProps {
11
11
  title: string;
12
12
  href: string;
13
13
  publishDate: string;
14
- titleTag: HeadingProps['htmlTag'];
14
+ titleTag?: HeadingProps['htmlTag'];
15
15
  }
16
16
  /**
17
17
  * Primary UI component for user interaction
@@ -1,5 +1,6 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ThemeProps } from '../../../themeProps';
3
+ import { HeadingProps } from '../../atoms/Heading/Heading';
3
4
  import './cardScholarship.scss';
4
5
  export interface ScholarshipProps {
5
6
  awardType: string;
@@ -13,7 +14,7 @@ export interface CardScholarshipProps {
13
14
  copy: string;
14
15
  href: string;
15
16
  scholarshipDetails: ScholarshipProps;
16
- titleTag?: 'h2' | 'h3';
17
+ titleTag?: HeadingProps['htmlTag'];
17
18
  }
18
19
  /**
19
20
  * Primary UI component for user interaction
@@ -7,6 +7,15 @@ declare const meta: {
7
7
  parameters: {
8
8
  layout: string;
9
9
  };
10
+ argTypes: {
11
+ titleTag: {
12
+ control: "select";
13
+ options: string[];
14
+ mapping: {
15
+ none: undefined;
16
+ };
17
+ };
18
+ };
10
19
  };
11
20
  export default meta;
12
21
  type Story = StoryObj<typeof CardScholarship>;
@@ -1,6 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ImageProps } from '../../atoms/Image/Image';
3
3
  import { ThemeProps } from '../../../themeProps';
4
+ import { HeadingProps } from '../../atoms/Heading/Heading';
4
5
  import './cardStaff.scss';
5
6
  export interface CardStaffProps {
6
7
  theme: ThemeProps;
@@ -14,7 +15,7 @@ export interface CardStaffProps {
14
15
  isSingle?: boolean;
15
16
  phone?: string;
16
17
  email?: string;
17
- titleTag?: 'h2' | 'h3';
18
+ titleTag?: HeadingProps['htmlTag'];
18
19
  }
19
20
  /**
20
21
  * Primary UI component for user interaction
@@ -7,6 +7,15 @@ declare const meta: {
7
7
  parameters: {
8
8
  layout: string;
9
9
  };
10
+ argTypes: {
11
+ titleTag: {
12
+ control: "select";
13
+ options: string[];
14
+ mapping: {
15
+ none: undefined;
16
+ };
17
+ };
18
+ };
10
19
  };
11
20
  export default meta;
12
21
  type Story = StoryObj<typeof CardStaff>;
@@ -2,12 +2,13 @@ import { ReactElement } from 'react';
2
2
  import { ImageProps } from '../../../atoms/Image/Image';
3
3
  import { SearchResultDetailProps } from '../../../atoms/SearchResultDetail/SearchResultDetail';
4
4
  import { ThemeProps } from '../../../../themeProps';
5
+ import { HeadingProps } from '../../../atoms/Heading/Heading';
5
6
  export interface CourseCardProps {
6
7
  theme: ThemeProps;
7
8
  type: 'course';
8
9
  image?: ImageProps;
9
10
  title: string;
10
- titleTag?: string;
11
+ titleTag?: HeadingProps['htmlTag'];
11
12
  url: string;
12
13
  description?: string;
13
14
  supervisors?: string;
@@ -19,4 +19,7 @@ export declare const NewsCardTwoAuthors: Story;
19
19
  export declare const AccomodationCard: Story;
20
20
  export declare const CourseCard: Story;
21
21
  export declare const CourseCardH3Title: Story;
22
+ export declare const CourseCardH4Title: Story;
23
+ export declare const CourseCardH5Title: Story;
24
+ export declare const CourseCardUndefinedTitleTag: Story;
22
25
  export declare const ProfileCard: Story;
@@ -20,10 +20,11 @@ export interface CarouselProps {
20
20
  inverse?: boolean;
21
21
  type: string;
22
22
  title?: string;
23
+ titleTag?: HeadingProps['htmlTag'];
23
24
  cardTitleTag?: HeadingProps['htmlTag'];
24
25
  setCardInverse?: 'dark' | 'light';
25
- cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[] | CardResearchStoryProps[] | CardScholarshipProps[] | CardPromoProfileProps[];
26
+ cards: CardNewsProps[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[] | CardResearchStoryProps[] | CardScholarshipProps[] | CardPromoProfileProps[];
26
27
  exploreMore?: string;
27
28
  cardCopyIsRichText?: boolean;
28
29
  }
29
- export default function Carousel({ theme, inverse, type, title, cards, cardTitleTag, setCardInverse, exploreMore, cardCopyIsRichText }: CarouselProps): ReactElement;
30
+ export default function Carousel({ theme, inverse, type, title, cards, titleTag, cardTitleTag, setCardInverse, exploreMore, cardCopyIsRichText }: CarouselProps): ReactElement;
@@ -0,0 +1,14 @@
1
+ import { ReactElement } from 'react';
2
+ import './imageMosaic.scss';
3
+ import { ImageProps } from '../../atoms/Image/Image';
4
+ import { HeadingProps } from '../../molecules/Heading/Heading';
5
+ export interface ImageMosaicImageData {
6
+ image: ImageProps;
7
+ imageCaption?: string;
8
+ imageCredit?: string;
9
+ }
10
+ export interface ImageMosaicProps extends HeadingProps {
11
+ makeHeadingFullWidth?: boolean;
12
+ images?: ImageMosaicImageData[];
13
+ }
14
+ export default function ImageMosaic({ theme, inverse, title, description, linkProps, fullWidth, makeHeadingFullWidth, htmlTag, images }: ImageMosaicProps): ReactElement | null;
@@ -0,0 +1,28 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import ImageMosaic from './ImageMosaic';
3
+ import './imageMosaic.scss';
4
+ declare const meta: {
5
+ title: string;
6
+ component: typeof ImageMosaic;
7
+ tags: string[];
8
+ parameters: {
9
+ backgrounds: {
10
+ default: string;
11
+ };
12
+ };
13
+ };
14
+ export default meta;
15
+ type Story = StoryObj<typeof ImageMosaic>;
16
+ export declare const Default: Story;
17
+ export declare const ThreeImagesDark: Story;
18
+ export declare const ThreeImagesLight: Story;
19
+ export declare const ThreeImagesFullWidth: Story;
20
+ export declare const ThreeImagesFullWidthLight: Story;
21
+ export declare const TwoImages: Story;
22
+ export declare const TwoImagesFullWidth: Story;
23
+ export declare const TwoImagesLight: Story;
24
+ export declare const OneImage: Story;
25
+ export declare const OneImageFullWidth: Story;
26
+ export declare const ThreeImagesNoCaptions: Story;
27
+ export declare const TwoImagesNoCaptions: Story;
28
+ export declare const NoImages: Story;
@@ -0,0 +1,4 @@
1
+ import { ImageMosaicProps } from './ImageMosaic';
2
+ export declare const imageMosaicPropsThreeImages: ImageMosaicProps;
3
+ export declare const imageMosaicPropsTwoImages: ImageMosaicProps;
4
+ export declare const imageMosaicPropsOneImage: ImageMosaicProps;
package/dist/index.d.ts CHANGED
@@ -29,6 +29,7 @@ import HeroCourses, { HeroCoursesProps } from './components/organisms/HeroCourse
29
29
  import HeroCarousel, { HeroCarouselProps } from './components/organisms/HeroCarousel/HeroCarousel';
30
30
  import HeroVideo, { HeroVideoProps } from './components/organisms/HeroVideo/HeroVideo';
31
31
  import ImageBlock, { ImageBlockProps } from './components/organisms/ImageBlock/ImageBlock';
32
+ import ImageMosaic, { ImageMosaicProps } from './components/organisms/ImageMosaic/ImageMosaic';
32
33
  import ImageCarousel, { ImageCarouselProps } from './components/organisms/ImageCarousel/ImageCarousel';
33
34
  import InPageNavigation, { InPageNavigationProps } from './components/organisms/InPageNavigation/InPageNavigation';
34
35
  import IntroText, { IntroTextProps } from './components/organisms/IntroText/IntroText';
@@ -73,5 +74,5 @@ import LogoWall, { LogoWallProps } from './components/organisms/LogoWall/LogoWal
73
74
  import TextOverMedia, { TextOverMediaProps } from './components/organisms/TextOverMedia/TextOverMedia';
74
75
  import SocialFeed, { SocialFeedProps } from './components/organisms/SocialFeed/SocialFeed';
75
76
  import { HeaderLanding, HeaderLandingProps } from './components/organisms/HeaderLanding/HeaderLanding';
76
- export type { AccordionProps, AccreditationPromotionProps, AlertBannerProps, AnchorTargetProps, BreadcrumbsProps, CarouselProps, CardProfileProps, CardStaffProps, CenterWrapperProps, ClearingBannerProps, CourseDeliveryPillsProps, CTAComponentProps, EmbedWrapperProps, FactBoxesProps, FeaturedContentProps, FeaturedSignpostProps, FeaturedVideoProps, FiveArticlesGridProps, FooterProps, FormSelectProps, GenericDetailSectionProps, GeneralSearchFilterProps, HeaderProps, HeadingProps, HeroProps, HeroArticleProps, HeroCarouselProps, HeroCoursesProps, HeroProfileProps, HeroVideoProps, ImageBlockProps, ImageCarouselProps, InPageNavigationProps, IntroTextProps, LeadNewsArticlesProps, ListingFilterWrapperProps, ListingResultsProps, ListingResultsCountProps, ListTableProps, LocationSelectorProps, MainWrapperProps, ModuleCardGroupProps, NewsArticlesPromoBlockProps, PaginationProps, PromoBlockProps, QuoteBlockProps, RelatedCoursesProps, ResearchStoryCarouselProps, RichTextProps, ScholarshipCarouselProps, SearchCoursesProps, SelectOptionsProps, StaffListingCarouselProps, SidebarWrapperProps, SignPostProps, SingleButtonProps, SkipToContentProps, TabsBlockProps, TextWithBackgroundProps, TwoColumnWrapperProps, TopicSelectorProps, StandardListingFilterProps, VideoCardComponentProps, VideoEmbedProps, ScrollableTableProps, ScrollableTableCategory, ModalCTAProps, LocationSectionProps, CardPromoProfileProps, CardPromoSignpostProps, CardImageAndTextProps, LogoWallProps, TextOverMediaProps, SocialFeedProps, HeaderLandingProps };
77
- export { Accordion, AcreditationPromotion, AlertBanner, AnchorTarget, Breadcrumbs, Carousel, CardProfile, CardPromoSignpost, CardStaff, CentreWrapper, ClearingBanner, CourseDeliveryPills, CTAComponent, EmbedWrapper, FactBoxes, FeaturedContent, FeaturedSignpost, FeaturedVideo, FiveArticlesGrid, Footer, GeneralSearchFilter, GenericDetailSection, Header, Heading, Hero, HeroArticle, HeroCarousel, HeroCourses, HeroProfile, HeroVideo, ImageBlock, ImageCarousel, InPageNavigation, IntroText, LeadNewsArticles, ListingFilterWrapper, ListingResults, ListingResultsCount, ListTable, LocationSelector, MainWrapper, ModuleCardGroup, NewsArticlesPromoBlock, Pagination, PromoBlock, PromoBlockGrid, QuoteBlock, RelatedCourses, ResearchStoryCarousel, RichText, ScholarshipCarousel, SearchCourses, SidebarWrapper, SignPost, SingleButton, SkipToContent, StaffListingCarousel, StandardListingFilter, TabsBlock, TextWithBackground, TopicSelector, TwoColumnWrapper, VideoCardComponent, VideoEmbed, ScrollableTable, ModalCTA, LocationSection, CardPromoProfile, CardImageAndText, LogoWall, TextOverMedia, SocialFeed, HeaderLanding };
77
+ export type { AccordionProps, AccreditationPromotionProps, AlertBannerProps, AnchorTargetProps, BreadcrumbsProps, CarouselProps, CardProfileProps, CardStaffProps, CenterWrapperProps, ClearingBannerProps, CourseDeliveryPillsProps, CTAComponentProps, EmbedWrapperProps, FactBoxesProps, FeaturedContentProps, FeaturedSignpostProps, FeaturedVideoProps, FiveArticlesGridProps, FooterProps, FormSelectProps, GenericDetailSectionProps, GeneralSearchFilterProps, HeaderProps, HeadingProps, HeroProps, HeroArticleProps, HeroCarouselProps, HeroCoursesProps, HeroProfileProps, HeroVideoProps, ImageBlockProps, ImageCarouselProps, ImageMosaicProps, InPageNavigationProps, IntroTextProps, LeadNewsArticlesProps, ListingFilterWrapperProps, ListingResultsProps, ListingResultsCountProps, ListTableProps, LocationSelectorProps, MainWrapperProps, ModuleCardGroupProps, NewsArticlesPromoBlockProps, PaginationProps, PromoBlockProps, QuoteBlockProps, RelatedCoursesProps, ResearchStoryCarouselProps, RichTextProps, ScholarshipCarouselProps, SearchCoursesProps, SelectOptionsProps, StaffListingCarouselProps, SidebarWrapperProps, SignPostProps, SingleButtonProps, SkipToContentProps, TabsBlockProps, TextWithBackgroundProps, TwoColumnWrapperProps, TopicSelectorProps, StandardListingFilterProps, VideoCardComponentProps, VideoEmbedProps, ScrollableTableProps, ScrollableTableCategory, ModalCTAProps, LocationSectionProps, CardPromoProfileProps, CardPromoSignpostProps, CardImageAndTextProps, LogoWallProps, TextOverMediaProps, SocialFeedProps, HeaderLandingProps };
78
+ export { Accordion, AcreditationPromotion, AlertBanner, AnchorTarget, Breadcrumbs, Carousel, CardProfile, CardPromoSignpost, CardStaff, CentreWrapper, ClearingBanner, CourseDeliveryPills, CTAComponent, EmbedWrapper, FactBoxes, FeaturedContent, FeaturedSignpost, FeaturedVideo, FiveArticlesGrid, Footer, GeneralSearchFilter, GenericDetailSection, Header, Heading, Hero, HeroArticle, HeroCarousel, HeroCourses, HeroProfile, HeroVideo, ImageBlock, ImageCarousel, ImageMosaic, InPageNavigation, IntroText, LeadNewsArticles, ListingFilterWrapper, ListingResults, ListingResultsCount, ListTable, LocationSelector, MainWrapper, ModuleCardGroup, NewsArticlesPromoBlock, Pagination, PromoBlock, PromoBlockGrid, QuoteBlock, RelatedCourses, ResearchStoryCarousel, RichText, ScholarshipCarousel, SearchCourses, SidebarWrapper, SignPost, SingleButton, SkipToContent, StaffListingCarousel, StandardListingFilter, TabsBlock, TextWithBackground, TopicSelector, TwoColumnWrapper, VideoCardComponent, VideoEmbed, ScrollableTable, ModalCTA, LocationSection, CardPromoProfile, CardImageAndText, LogoWall, TextOverMedia, SocialFeed, HeaderLanding };