@uob-web-and-digital/component-library 0.0.108 → 1.0.1

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,22 @@
1
+ import { ReactElement } from 'react';
2
+ import { ImageProps } from '../../atoms/Image/Image';
3
+ import { ThemeProps } from '../../../themeProps';
4
+ import './cardPromoProfile.scss';
5
+ import { SearchResultDetailProps } from '../../atoms/SearchResultDetail/SearchResultDetail';
6
+ export interface CardPromoProfileProps {
7
+ theme: ThemeProps;
8
+ inverse?: boolean;
9
+ image: ImageProps;
10
+ name: string;
11
+ jobTitle: string;
12
+ department: string;
13
+ copy: string;
14
+ href: string;
15
+ isSingle?: boolean;
16
+ details?: Omit<SearchResultDetailProps, 'theme'>[];
17
+ titleTag: 'h2' | 'h3' | 'h4';
18
+ }
19
+ /**
20
+ * Primary UI component for user interaction
21
+ */
22
+ export default function CardPromoProfile({ theme, inverse, image, name, jobTitle, department, href, copy, isSingle, titleTag, details }: CardPromoProfileProps): ReactElement;
@@ -5,5 +5,6 @@ import './searchResultDetailList.scss';
5
5
  export interface SearchResultDetailListProps {
6
6
  theme: ThemeProps;
7
7
  details: Omit<SearchResultDetailProps, 'theme'>[];
8
+ verticalDetails?: boolean;
8
9
  }
9
- export default function SearchResultDetailList({ theme, details }: SearchResultDetailListProps): ReactElement;
10
+ export default function SearchResultDetailList({ theme, details, verticalDetails }: SearchResultDetailListProps): ReactElement;
@@ -11,6 +11,7 @@ import { CardImageProps } from '../../molecules/CardImage/CardImage';
11
11
  import { CardFeaturedNewsProps } from '../../molecules/CardFeaturedNews/CardFeaturedNews';
12
12
  import { CardResearchStoryProps } from '../../molecules/CardResearchStory/CardResearchStory';
13
13
  import { CardScholarshipProps } from '../../molecules/CardScholarship/CardScholarship';
14
+ import { CardPromoProfileProps } from '../../molecules/CardPromoProfile/CardPromoProfile';
14
15
  import { ThemeProps } from '../../../themeProps';
15
16
  import './carousel.scss';
16
17
  import { HeadingProps } from '../../atoms/Heading/Heading';
@@ -21,7 +22,7 @@ export interface CarouselProps {
21
22
  title?: string;
22
23
  cardTitleTag?: HeadingProps['htmlTag'];
23
24
  setCardInverse?: 'dark' | 'light';
24
- cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[] | CardResearchStoryProps[] | CardScholarshipProps[];
25
+ cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[] | CardResearchStoryProps[] | CardScholarshipProps[] | CardPromoProfileProps[];
25
26
  exploreMore?: string;
26
27
  cardCopyIsRichText?: boolean;
27
28
  }
@@ -1,4 +1,4 @@
1
- import { ReactElement } from 'react';
1
+ import React, { ReactElement } from 'react';
2
2
  import { ThemeProps } from '../../../themeProps';
3
3
  import './heroProfile.scss';
4
4
  export interface HeroProfileProps {
@@ -16,6 +16,7 @@ export interface HeroProfileProps {
16
16
  default: string;
17
17
  };
18
18
  alt: string;
19
+ fetchPriority?: React.ImgHTMLAttributes<HTMLImageElement>['fetchPriority'];
19
20
  };
20
21
  studentStatus?: string;
21
22
  courseName?: string;
@@ -4,6 +4,7 @@ import { ThemeProps } from '../../../themeProps';
4
4
  import { CardPromoProps } from '../../molecules/CardPromo/CardPromo';
5
5
  import { CardPromoSignpostProps } from '../../molecules/CardPromoSignpost/CardPromoSignpost';
6
6
  import { CardPromoVideoProps } from '../../molecules/CardPromoVideo/CardPromoVideo';
7
+ import { CardPromoProfileProps } from '../../molecules/CardPromoProfile/CardPromoProfile';
7
8
  import './promoBlock.scss';
8
9
  import { FormSelectProps } from '../../atoms/FormSelect/FormSelect';
9
10
  export interface PromoBlockProps {
@@ -38,11 +39,11 @@ export interface PromoBlockProps {
38
39
  /**
39
40
  * Promo block will work with three card types
40
41
  */
41
- type: 'promo' | 'promo-signpost' | 'promo-video';
42
+ type: 'promo' | 'promo-signpost' | 'promo-video' | 'promo-profile';
42
43
  /**
43
44
  * A Promo block component can have any number of items
44
45
  */
45
- cards: CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[];
46
+ cards: CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardPromoProfileProps[];
46
47
  /**
47
48
  * Only applies to the signpost card and if there is only one
48
49
  */
@@ -32,3 +32,4 @@ export declare const PromoBlockVideoTwoCardsOnly: Story;
32
32
  export declare const PromoBlockVideoThreeCardsOnly: Story;
33
33
  export declare const PromoBlockVideoFourCardsPlus: Story;
34
34
  export declare const PromoBlockFilters: Story;
35
+ export declare const PromoBlockProfileThreeCards: Story;
@@ -1,4 +1,5 @@
1
1
  import { PromoBlockProps } from './PromoBlock';
2
+ import { CardPromoProfileProps } from '../../molecules/CardPromoProfile/CardPromoProfile';
2
3
  import { FormSelectProps, SelectOptionsProps } from '../../atoms/FormSelect/FormSelect';
3
4
  export declare const promoBlockProps: PromoBlockProps;
4
5
  export declare const promoBlockPropsAccommodation: PromoBlockProps;
@@ -6,6 +7,8 @@ export declare const promoBlockEventsProps: PromoBlockProps;
6
7
  export declare const promoBlockSignpostProps: PromoBlockProps;
7
8
  export declare const promoBlockVideoProps: PromoBlockProps;
8
9
  export declare const promoBlockForCoursePage: PromoBlockProps;
10
+ export declare const promoBlockProfileCards: CardPromoProfileProps[];
11
+ export declare const promoBlockForProfile: PromoBlockProps;
9
12
  export declare const promoBlockForScholarshipAward: PromoBlockProps;
10
13
  export declare const studyLevelSelectOptions: SelectOptionsProps[];
11
14
  export declare const studyLevelFilterSelect: FormSelectProps;
package/dist/index.d.ts CHANGED
@@ -359,6 +359,46 @@ interface CardScholarshipProps {
359
359
  titleTag?: 'h2' | 'h3';
360
360
  }
361
361
 
362
+ type IconType = 'twitter' | 'facebook' | 'wechat' | 'weibo' | 'youtube' | 'instagram' | 'linkedin' | 'tiktok' | 'chevron-down' | 'chevron-right' | 'arrow-right' | 'arrow-right-large' | 'location' | 'hamburger' | 'cross' | 'slim-cross' | 'arrow-left' | 'search' | 'arrow-down' | 'play' | 'person' | 'people' | 'computer' | 'book' | 'mortar-board' | 'document' | 'briefcase' | 'notepad' | 'external' | 'clearing-tick' | 'phone' | 'email' | 'quote-marks' | 'calendar' | 'clock' | 'internet' | 'slim-location' | 'bathroom' | 'catering' | 'pound' | 'scroll' | 'settings' | 'rocket' | 'staggered-arrow' | 'segmented-pie-chart' | 'home' | 'domain' | 'note-add' | 'flight' | 'one' | 'two' | 'one-two-three' | 'camping' | 'groups' | 'bed' | 'restaurant' | 'success' | 'award_star' | 'warning-light' | 'warning-dark' | 'information' | 'star' | 'menu' | 'co-present' | 'assignment-add' | 'cast-for-education' | 'live-tv' | 'supervisor-account' | 'experiment' | 'footprint' | 'flag' | 'chat' | 'payments' | 'award-star';
363
+ type IconProps = {
364
+ /**
365
+ * The theme to use
366
+ */
367
+ theme: ThemeProps;
368
+ /**
369
+ * Whether to inverse the colours
370
+ */
371
+ inverse?: boolean;
372
+ icon: IconType;
373
+ name?: string;
374
+ ariaHidden?: boolean;
375
+ };
376
+
377
+ interface SearchResultDetailProps {
378
+ theme: ThemeProps;
379
+ iconType: IconType;
380
+ name: string;
381
+ value: string;
382
+ }
383
+
384
+ interface CardPromoProfileProps {
385
+ theme: ThemeProps;
386
+ inverse?: boolean;
387
+ image: ImageProps;
388
+ name: string;
389
+ jobTitle: string;
390
+ department: string;
391
+ copy: string;
392
+ href: string;
393
+ isSingle?: boolean;
394
+ details?: Omit<SearchResultDetailProps, 'theme'>[];
395
+ titleTag: 'h2' | 'h3' | 'h4';
396
+ }
397
+ /**
398
+ * Primary UI component for user interaction
399
+ */
400
+ declare function CardPromoProfile({ theme, inverse, image, name, jobTitle, department, href, copy, isSingle, titleTag, details }: CardPromoProfileProps): ReactElement;
401
+
362
402
  interface CarouselProps {
363
403
  theme: ThemeProps;
364
404
  inverse?: boolean;
@@ -366,7 +406,7 @@ interface CarouselProps {
366
406
  title?: string;
367
407
  cardTitleTag?: HeadingProps$1['htmlTag'];
368
408
  setCardInverse?: 'dark' | 'light';
369
- cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[] | CardResearchStoryProps[] | CardScholarshipProps[];
409
+ cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[] | CardResearchStoryProps[] | CardScholarshipProps[] | CardPromoProfileProps[];
370
410
  exploreMore?: string;
371
411
  cardCopyIsRichText?: boolean;
372
412
  }
@@ -410,21 +450,6 @@ interface ParagraphLinkProps {
410
450
  externalLink?: boolean;
411
451
  }
412
452
 
413
- type IconType = 'twitter' | 'facebook' | 'wechat' | 'weibo' | 'youtube' | 'instagram' | 'linkedin' | 'tiktok' | 'chevron-down' | 'chevron-right' | 'arrow-right' | 'arrow-right-large' | 'location' | 'hamburger' | 'cross' | 'slim-cross' | 'arrow-left' | 'search' | 'arrow-down' | 'play' | 'person' | 'people' | 'computer' | 'book' | 'mortar-board' | 'document' | 'briefcase' | 'notepad' | 'external' | 'clearing-tick' | 'phone' | 'email' | 'quote-marks' | 'calendar' | 'clock' | 'internet' | 'slim-location' | 'bathroom' | 'catering' | 'pound' | 'scroll' | 'settings' | 'rocket' | 'staggered-arrow' | 'segmented-pie-chart' | 'home' | 'domain' | 'note-add' | 'flight' | 'one' | 'two' | 'one-two-three' | 'camping' | 'groups' | 'bed' | 'restaurant' | 'success' | 'award_star' | 'warning-light' | 'warning-dark' | 'information' | 'star' | 'menu' | 'co-present' | 'assignment-add' | 'cast-for-education' | 'live-tv' | 'supervisor-account' | 'experiment' | 'footprint' | 'flag' | 'chat' | 'payments' | 'award-star';
414
- type IconProps = {
415
- /**
416
- * The theme to use
417
- */
418
- theme: ThemeProps;
419
- /**
420
- * Whether to inverse the colours
421
- */
422
- inverse?: boolean;
423
- icon: IconType;
424
- name?: string;
425
- ariaHidden?: boolean;
426
- };
427
-
428
453
  interface TextButtonWithIconProps {
429
454
  /**
430
455
  * The theme to use
@@ -1030,13 +1055,6 @@ interface ListingFilterWrapperProps {
1030
1055
  }
1031
1056
  declare function ListingFilterWrapper({ theme, showFilterButtonLabel, numSelected, filterElement }: ListingFilterWrapperProps): ReactElement;
1032
1057
 
1033
- interface SearchResultDetailProps {
1034
- theme: ThemeProps;
1035
- iconType: IconType;
1036
- name: string;
1037
- value: string;
1038
- }
1039
-
1040
1058
  interface AccomodationCardProps {
1041
1059
  theme: ThemeProps;
1042
1060
  type: 'accomodation';
@@ -1191,11 +1209,11 @@ interface PromoBlockProps$1 {
1191
1209
  /**
1192
1210
  * Promo block will work with three card types
1193
1211
  */
1194
- type: 'promo' | 'promo-signpost' | 'promo-video';
1212
+ type: 'promo' | 'promo-signpost' | 'promo-video' | 'promo-profile';
1195
1213
  /**
1196
1214
  * A Promo block component can have any number of items
1197
1215
  */
1198
- cards: CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[];
1216
+ cards: CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardPromoProfileProps[];
1199
1217
  /**
1200
1218
  * Only applies to the signpost card and if there is only one
1201
1219
  */
@@ -1695,6 +1713,7 @@ interface HeroProfileProps {
1695
1713
  default: string;
1696
1714
  };
1697
1715
  alt: string;
1716
+ fetchPriority?: React.ImgHTMLAttributes<HTMLImageElement>['fetchPriority'];
1698
1717
  };
1699
1718
  studentStatus?: string;
1700
1719
  courseName?: string;
@@ -1714,4 +1733,4 @@ interface TwoColumnWrapperProps {
1714
1733
  }
1715
1734
  declare function TwoColumnWrapper({ theme, firstColumn, secondColumn }: TwoColumnWrapperProps): ReactElement;
1716
1735
 
1717
- export { Accordion, type AccordionProps, type AccreditationPromotionProps, AcreditationPromotion, AlertBanner, type AlertBannerProps, AnchorTarget, type AnchorTargetProps, Breadcrumbs, type BreadcrumbsProps, CTAComponent, type CTAComponentProps, CardProfile, type CardProfileProps, Carousel, type CarouselProps, type CenterWrapperProps, CenterWrapper as CentreWrapper, ClearingBanner, type ClearingBannerProps, CourseDeliveryPills, type CourseDeliveryPillsProps, EmbedWrapper, type EmbedWrapperProps, FactBoxes, type FactBoxesProps, FeaturedContent, type FeaturedContentProps, FeaturedSignpost, type FeaturedSignpostProps, FeaturedVideo, type FeaturedVideoProps, FiveArticlesGrid, type FiveArticlesGridProps, Footer, type FooterProps, type FormSelectProps, GeneralSearchFilter, type GeneralSearchFilterProps, GenericDetailSection, type GenericDetailSectionProps, Header, type HeaderProps, Hero, HeroArticle, type HeroArticleProps, HeroCarousel, type HeroCarouselProps, HeroCourses, type HeroCoursesProps, HeroProfile, type HeroProfileProps, type HeroProps, ImageBlock, type ImageBlockProps, ImageCarousel, type ImageCarouselProps, InPageNavigation, type InPageNavigationProps, IntroText, type IntroTextProps, LeadNewsArticles, type LeadNewsArticlesProps, ListingFilterWrapper, type ListingFilterWrapperProps, ListingResults, ListingResultsCount, type ListingResultsCountProps, type ListingResultsProps, LocationSection, type LocationSectionProps, LocationSelector, type LocationSelectorProps, MainWrapper, type MainWrapperProps, ModalCTA, type ModalCTAProps, NewsArticlesPromoBlock, type NewsArticlesPromoBlockProps, Pagination, type PaginationProps, PromoBlock, PromoBlockGrid, type PromoBlockProps$1 as PromoBlockProps, QuoteBlock, type QuoteBlockProps, RelatedCourses, type RelatedCoursesProps, ResearchStoryCarousel, type ResearchStoryCarouselProps, RichText, type RichTextProps, ScholarshipCarousel, type ScholarshipCarouselProps, ScrollableTable, ScrollableTableCategory, type ScrollableTableProps, SearchCourses, type SearchCoursesProps, type SelectOptionsProps, SidebarWrapper, type SidebarWrapperProps, SignPost, type SignPostProps, SingleButton, type SingleButtonProps, SkipToContent, type SkipToContentProps, StaffListingCarousel, type StaffListingCarouselProps, StandardListingFilter, type StandardListingFilterProps, TabsBlock, type TabsBlockProps, TextWithBackground, type TextWithBackgroundProps, TopicSelector, type TopicSelectorProps, TwoColumnWrapper, type TwoColumnWrapperProps, VideoCardComponent, type VideoCardComponentProps, VideoEmbed, type VideoEmbedProps };
1736
+ export { Accordion, type AccordionProps, type AccreditationPromotionProps, AcreditationPromotion, AlertBanner, type AlertBannerProps, AnchorTarget, type AnchorTargetProps, Breadcrumbs, type BreadcrumbsProps, CTAComponent, type CTAComponentProps, CardProfile, type CardProfileProps, CardPromoProfile, type CardPromoProfileProps, Carousel, type CarouselProps, type CenterWrapperProps, CenterWrapper as CentreWrapper, ClearingBanner, type ClearingBannerProps, CourseDeliveryPills, type CourseDeliveryPillsProps, EmbedWrapper, type EmbedWrapperProps, FactBoxes, type FactBoxesProps, FeaturedContent, type FeaturedContentProps, FeaturedSignpost, type FeaturedSignpostProps, FeaturedVideo, type FeaturedVideoProps, FiveArticlesGrid, type FiveArticlesGridProps, Footer, type FooterProps, type FormSelectProps, GeneralSearchFilter, type GeneralSearchFilterProps, GenericDetailSection, type GenericDetailSectionProps, Header, type HeaderProps, Hero, HeroArticle, type HeroArticleProps, HeroCarousel, type HeroCarouselProps, HeroCourses, type HeroCoursesProps, HeroProfile, type HeroProfileProps, type HeroProps, ImageBlock, type ImageBlockProps, ImageCarousel, type ImageCarouselProps, InPageNavigation, type InPageNavigationProps, IntroText, type IntroTextProps, LeadNewsArticles, type LeadNewsArticlesProps, ListingFilterWrapper, type ListingFilterWrapperProps, ListingResults, ListingResultsCount, type ListingResultsCountProps, type ListingResultsProps, LocationSection, type LocationSectionProps, LocationSelector, type LocationSelectorProps, MainWrapper, type MainWrapperProps, ModalCTA, type ModalCTAProps, NewsArticlesPromoBlock, type NewsArticlesPromoBlockProps, Pagination, type PaginationProps, PromoBlock, PromoBlockGrid, type PromoBlockProps$1 as PromoBlockProps, QuoteBlock, type QuoteBlockProps, RelatedCourses, type RelatedCoursesProps, ResearchStoryCarousel, type ResearchStoryCarouselProps, RichText, type RichTextProps, ScholarshipCarousel, type ScholarshipCarouselProps, ScrollableTable, ScrollableTableCategory, type ScrollableTableProps, SearchCourses, type SearchCoursesProps, type SelectOptionsProps, SidebarWrapper, type SidebarWrapperProps, SignPost, type SignPostProps, SingleButton, type SingleButtonProps, SkipToContent, type SkipToContentProps, StaffListingCarousel, type StaffListingCarouselProps, StandardListingFilter, type StandardListingFilterProps, TabsBlock, type TabsBlockProps, TextWithBackground, type TextWithBackgroundProps, TopicSelector, type TopicSelectorProps, TwoColumnWrapper, type TwoColumnWrapperProps, VideoCardComponent, type VideoCardComponentProps, VideoEmbed, type VideoEmbedProps };