@uob-web-and-digital/component-library 0.0.46 → 0.0.48

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.
Files changed (23) hide show
  1. package/dist/components/atoms/Icons/Icons.d.ts +1 -1
  2. package/dist/components/molecules/ListingResultCard/Cards/CourseCard.d.ts +4 -1
  3. package/dist/components/organisms/AnchorTarget/AnchorTarget.d.ts +10 -0
  4. package/dist/components/organisms/AnchorTarget/AnchorTarget.stories.d.ts +15 -0
  5. package/dist/components/organisms/CentreWrapper/CentreWrapper.d.ts +11 -0
  6. package/dist/components/organisms/CentreWrapper/CentreWrapper.stories.d.ts +15 -0
  7. package/dist/components/organisms/FeaturedSignpost/defaultProps.d.ts +1 -0
  8. package/dist/components/organisms/QuoteBlock/QuoteBlock.d.ts +5 -4
  9. package/dist/components/organisms/QuoteBlock/QuoteBlock.stories.d.ts +4 -1
  10. package/dist/components/organisms/QuoteBlock/defatultProps.d.ts +2 -0
  11. package/dist/components/organisms/RelatedCourses/RelatedCourses.d.ts +2 -1
  12. package/dist/components/organisms/RelatedCourses/RelatedCourses.stories.d.ts +4 -1
  13. package/dist/components/organisms/SearchCourses/SearchCourses.d.ts +9 -1
  14. package/dist/components/organisms/SearchCourses/SearchCourses.stories.d.ts +1 -0
  15. package/dist/components/organisms/StaffListingCarousel/StaffListingCarousel.stories.d.ts +3 -2
  16. package/dist/components/organisms/TextWithBackground/TextWithBackground.d.ts +3 -3
  17. package/dist/components/organisms/TextWithBackground/TextWithBackground.stories.d.ts +2 -0
  18. package/dist/components/organisms/TopicSelector/TopicSelector.d.ts +2 -1
  19. package/dist/index.d.ts +42 -12
  20. package/dist/main.css +1 -1
  21. package/dist/main.js +2 -2
  22. package/dist/module.js +4 -4
  23. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ThemeProps } from '../../../themeProps';
3
3
  import './icons.scss';
4
- export 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' | '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';
4
+ export 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';
5
5
  export type IconProps = {
6
6
  /**
7
7
  * The theme to use
@@ -12,7 +12,10 @@ export interface CourseCardProps {
12
12
  department?: string;
13
13
  studyLevel: string;
14
14
  studyMode: string;
15
+ courseType?: string;
16
+ qualification?: string;
17
+ studyLocation?: string;
15
18
  fundingType?: string;
16
19
  showCategory?: boolean;
17
20
  }
18
- export default function CourseCard({ theme, type, image, title, url, description, supervisors, department, studyLevel, studyMode, fundingType, showCategory }: CourseCardProps): ReactElement;
21
+ export default function CourseCard({ theme, type, image, title, url, description, supervisors, department, studyLevel, studyMode, fundingType, courseType, qualification, studyLocation, showCategory }: CourseCardProps): ReactElement;
@@ -0,0 +1,10 @@
1
+ import { ReactNode, ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import './anchorTarget.scss';
4
+ export interface AnchorTargetProps {
5
+ theme: ThemeProps;
6
+ inverse?: boolean;
7
+ targetLabel: string;
8
+ children: ReactNode;
9
+ }
10
+ export default function AnchorTarget({ theme, inverse, targetLabel, children }: AnchorTargetProps): ReactElement;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import AnchorTarget from './AnchorTarget';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof AnchorTarget;
6
+ tags: string[];
7
+ parameters: {
8
+ backgrounds: {
9
+ default: string;
10
+ };
11
+ };
12
+ };
13
+ export default meta;
14
+ type Story = StoryObj<typeof AnchorTarget>;
15
+ export declare const Default: Story;
@@ -0,0 +1,11 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import './centreWrapper.scss';
4
+ export interface CenterWrapperProps {
5
+ /**
6
+ * The theme to use
7
+ */
8
+ theme: ThemeProps;
9
+ children: ReactNode;
10
+ }
11
+ export default function CenterWrapper({ theme, children }: CenterWrapperProps): ReactElement;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import CentreWrapper from './CentreWrapper';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof CentreWrapper;
6
+ tags: string[];
7
+ parameters: {
8
+ backgrounds: {
9
+ default: string;
10
+ };
11
+ };
12
+ };
13
+ export default meta;
14
+ type Story = StoryObj<typeof CentreWrapper>;
15
+ export declare const Default: Story;
@@ -1,2 +1,3 @@
1
1
  import { FeaturedSignpostProps } from './FeaturedSignpost';
2
2
  export declare const featuredSignpostProps: FeaturedSignpostProps;
3
+ export declare const featuredSignpostCourseListingProps: FeaturedSignpostProps;
@@ -6,12 +6,13 @@ import './QuoteBlock.scss';
6
6
  type LinkProps = Omit<LinkWithArrowProps, 'theme' | 'inverse'>;
7
7
  export interface QuoteBlockProps extends HeadingProps {
8
8
  theme: ThemeProps;
9
+ inverse?: boolean;
9
10
  title?: string;
10
- cite: string;
11
- role: string;
11
+ cite?: string;
12
+ role?: string;
12
13
  quote: string;
13
- quoteeProfileImage: string;
14
- quoteeProfileImageAltText: string;
14
+ quoteeProfileImage?: string;
15
+ quoteeProfileImageAltText?: string;
15
16
  cta?: LinkProps;
16
17
  }
17
18
  export default function QuoteBlock({ theme, inverse, title, description, cite, role, quote, quoteeProfileImage, quoteeProfileImageAltText, cta }: QuoteBlockProps): ReactElement;
@@ -13,4 +13,7 @@ declare const meta: {
13
13
  };
14
14
  export default meta;
15
15
  type Story = StoryObj<typeof QuoteBlock>;
16
- export declare const Default: Story;
16
+ export declare const ExampleIncludingHeading: Story;
17
+ export declare const ExampleIncludingHeadingLight: Story;
18
+ export declare const ExampleQuoteOnly: Story;
19
+ export declare const ExampleQuoteWithCite: Story;
@@ -1,2 +1,4 @@
1
1
  import { QuoteBlockProps } from './QuoteBlock';
2
2
  export declare const quoteBlockProps: QuoteBlockProps;
3
+ export declare const quoteWithCite: QuoteBlockProps;
4
+ export declare const quoteOnly: QuoteBlockProps;
@@ -7,6 +7,7 @@ export interface RelatedCoursesProps {
7
7
  inverse?: boolean;
8
8
  heading: string;
9
9
  fullWidth?: boolean;
10
+ headingStyle?: 'news' | null;
10
11
  cards: CardRelatedProps[];
11
12
  }
12
- export default function RelatedCourses({ theme, inverse, heading, fullWidth, cards }: RelatedCoursesProps): ReactElement;
13
+ export default function RelatedCourses({ theme, inverse, heading, headingStyle, fullWidth, cards }: RelatedCoursesProps): ReactElement;
@@ -7,5 +7,8 @@ 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 ExampleFourOrMoreCourses: Story;
11
+ export declare const ExampleWithNewsStyleHeading: Story;
11
12
  export declare const ExampleOneCourse: Story;
13
+ export declare const ExampleTwoCourses: Story;
14
+ export declare const ExampleThreeCourses: Story;
@@ -27,6 +27,10 @@ export interface SearchCoursesProps {
27
27
  * Placeholder text
28
28
  */
29
29
  placeholder: string;
30
+ /**
31
+ * Facet of the filter
32
+ */
33
+ facet?: string;
30
34
  /**
31
35
  * Display name of the filter
32
36
  */
@@ -60,8 +64,12 @@ export interface SearchCoursesProps {
60
64
  */
61
65
  onGrid?: boolean;
62
66
  titleTag?: 'h1' | 'h2';
67
+ /**
68
+ * Use onClick event on Search button (eg to update search results on the same page)
69
+ */
70
+ useOnClickHandler?: () => void | null;
63
71
  }
64
72
  /**
65
73
  * Search component
66
74
  */
67
- export default function SearchCourses({ theme, inverse, title, defaultSearchTerm, placeholder, filterTitle, filterFieldName, filterOptions, defaultFilter, resultsUrl, wrapped, fullWidth, onGrid, titleTag }: SearchCoursesProps): ReactElement;
75
+ export default function SearchCourses({ theme, inverse, title, defaultSearchTerm, placeholder, facet, filterTitle, filterFieldName, filterOptions, defaultFilter, resultsUrl, wrapped, fullWidth, onGrid, titleTag, useOnClickHandler }: SearchCoursesProps): ReactElement;
@@ -13,6 +13,7 @@ declare const meta: {
13
13
  export default meta;
14
14
  type Story = StoryObj<typeof SearchCourses>;
15
15
  export declare const Dark: Story;
16
+ export declare const DarkFunctionNotUrl: Story;
16
17
  export declare const Light: Story;
17
18
  export declare const WithDefaultValues: Story;
18
19
  export declare const Wrapped: Story;
@@ -7,5 +7,6 @@ declare const meta: {
7
7
  };
8
8
  export default meta;
9
9
  type Story = StoryObj<typeof meta>;
10
- export declare const Example: Story;
11
- export declare const ExampleOneCard: Story;
10
+ export declare const ExampleThreeOrMoreStaff: Story;
11
+ export declare const ExampleOneStaff: Story;
12
+ export declare const ExampleTwoStaff: Story;
@@ -13,9 +13,9 @@ export interface TextWithBackgroundProps {
13
13
  headingLevel: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
14
14
  headingText: string;
15
15
  text: string;
16
- url: string;
17
- linkTitle: string;
16
+ url?: string;
17
+ linkTitle?: string;
18
18
  externalLink?: boolean;
19
- linkStyle: 'primary' | 'secondary' | 'paragraph-link';
19
+ linkStyle?: 'primary' | 'secondary' | 'paragraph-link';
20
20
  }
21
21
  export default function TextWithBackground({ text, theme, inverse, headingLevel, headingText, url, linkTitle, externalLink, linkStyle }: TextWithBackgroundProps): ReactElement;
@@ -15,6 +15,8 @@ type Story = StoryObj<typeof TextWithBackground>;
15
15
  export declare const DarkWithPrimaryButton: Story;
16
16
  export declare const DarkWithSecondaryButton: Story;
17
17
  export declare const DarkWithParagraphLink: Story;
18
+ export declare const DarkNoLink: Story;
18
19
  export declare const LightWithPrimaryButton: Story;
19
20
  export declare const LightWithSecondaryButton: Story;
20
21
  export declare const LightWithParagraphLink: Story;
22
+ export declare const LightNoLink: Story;
@@ -1,11 +1,12 @@
1
1
  import { ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
2
3
  import './topicSelector.scss';
3
4
  import { PillProps } from '../../atoms/Pill/Pill';
4
5
  export interface TopicSelectorProps {
5
6
  /**
6
7
  * The theme to use
7
8
  */
8
- theme?: string;
9
+ theme: ThemeProps;
9
10
  /**
10
11
  * The pills to display the list
11
12
  */
package/dist/index.d.ts CHANGED
@@ -261,7 +261,7 @@ interface FeaturedVideoProps {
261
261
  */
262
262
  declare function FeaturedVideo({ theme, title, image, youtubeId, youtubeButtonLabel, audioYoutubeButtonLabel, audioYoutubeId }: FeaturedVideoProps): ReactElement | null;
263
263
 
264
- type IconType$1 = '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' | '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';
264
+ type IconType$1 = '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';
265
265
 
266
266
  interface FooterLinkProps {
267
267
  label: string;
@@ -433,6 +433,10 @@ interface SearchCoursesProps {
433
433
  * Placeholder text
434
434
  */
435
435
  placeholder: string;
436
+ /**
437
+ * Facet of the filter
438
+ */
439
+ facet?: string;
436
440
  /**
437
441
  * Display name of the filter
438
442
  */
@@ -466,11 +470,15 @@ interface SearchCoursesProps {
466
470
  */
467
471
  onGrid?: boolean;
468
472
  titleTag?: 'h1' | 'h2';
473
+ /**
474
+ * Use onClick event on Search button (eg to update search results on the same page)
475
+ */
476
+ useOnClickHandler?: () => void | null;
469
477
  }
470
478
  /**
471
479
  * Search component
472
480
  */
473
- declare function SearchCourses({ theme, inverse, title, defaultSearchTerm, placeholder, filterTitle, filterFieldName, filterOptions, defaultFilter, resultsUrl, wrapped, fullWidth, onGrid, titleTag }: SearchCoursesProps): ReactElement;
481
+ declare function SearchCourses({ theme, inverse, title, defaultSearchTerm, placeholder, facet, filterTitle, filterFieldName, filterOptions, defaultFilter, resultsUrl, wrapped, fullWidth, onGrid, titleTag, useOnClickHandler }: SearchCoursesProps): ReactElement;
474
482
 
475
483
  interface SignPostProps {
476
484
  /**
@@ -578,10 +586,10 @@ interface TextWithBackgroundProps {
578
586
  headingLevel: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
579
587
  headingText: string;
580
588
  text: string;
581
- url: string;
582
- linkTitle: string;
589
+ url?: string;
590
+ linkTitle?: string;
583
591
  externalLink?: boolean;
584
- linkStyle: 'primary' | 'secondary' | 'paragraph-link';
592
+ linkStyle?: 'primary' | 'secondary' | 'paragraph-link';
585
593
  }
586
594
  declare function TextWithBackground({ text, theme, inverse, headingLevel, headingText, url, linkTitle, externalLink, linkStyle }: TextWithBackgroundProps): ReactElement;
587
595
 
@@ -720,12 +728,13 @@ declare function ClearingBanner({ theme, text, showIcon, smallLink, mainLink }:
720
728
  type LinkProps = Omit<LinkWithArrowProps, 'theme' | 'inverse'>;
721
729
  interface QuoteBlockProps extends HeadingProps {
722
730
  theme: ThemeProps;
731
+ inverse?: boolean;
723
732
  title?: string;
724
- cite: string;
725
- role: string;
733
+ cite?: string;
734
+ role?: string;
726
735
  quote: string;
727
- quoteeProfileImage: string;
728
- quoteeProfileImageAltText: string;
736
+ quoteeProfileImage?: string;
737
+ quoteeProfileImageAltText?: string;
729
738
  cta?: LinkProps;
730
739
  }
731
740
  declare function QuoteBlock({ theme, inverse, title, description, cite, role, quote, quoteeProfileImage, quoteeProfileImageAltText, cta }: QuoteBlockProps): ReactElement;
@@ -859,9 +868,10 @@ interface RelatedCoursesProps {
859
868
  inverse?: boolean;
860
869
  heading: string;
861
870
  fullWidth?: boolean;
871
+ headingStyle?: 'news' | null;
862
872
  cards: CardRelatedProps[];
863
873
  }
864
- declare function RelatedCourses({ theme, inverse, heading, fullWidth, cards }: RelatedCoursesProps): ReactElement;
874
+ declare function RelatedCourses({ theme, inverse, heading, headingStyle, fullWidth, cards }: RelatedCoursesProps): ReactElement;
865
875
 
866
876
  interface AccomodationCardProps {
867
877
  theme: ThemeProps;
@@ -887,6 +897,9 @@ interface CourseCardProps {
887
897
  department?: string;
888
898
  studyLevel: string;
889
899
  studyMode: string;
900
+ courseType?: string;
901
+ qualification?: string;
902
+ studyLocation?: string;
890
903
  fundingType?: string;
891
904
  showCategory?: boolean;
892
905
  }
@@ -1040,7 +1053,7 @@ interface TopicSelectorProps {
1040
1053
  /**
1041
1054
  * The theme to use
1042
1055
  */
1043
- theme?: string;
1056
+ theme: ThemeProps;
1044
1057
  /**
1045
1058
  * The pills to display the list
1046
1059
  */
@@ -1183,4 +1196,21 @@ interface SidebarWrapperProps {
1183
1196
  }
1184
1197
  declare function SidebarWrapper({ theme, sidebarElement, children }: SidebarWrapperProps): ReactElement;
1185
1198
 
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 };
1199
+ interface AnchorTargetProps {
1200
+ theme: ThemeProps;
1201
+ inverse?: boolean;
1202
+ targetLabel: string;
1203
+ children: ReactNode;
1204
+ }
1205
+ declare function AnchorTarget({ theme, inverse, targetLabel, children }: AnchorTargetProps): ReactElement;
1206
+
1207
+ interface CenterWrapperProps {
1208
+ /**
1209
+ * The theme to use
1210
+ */
1211
+ theme: ThemeProps;
1212
+ children: ReactNode;
1213
+ }
1214
+ declare function CenterWrapper({ theme, children }: CenterWrapperProps): ReactElement;
1215
+
1216
+ export { Accordion, AcreditationPromotion, AnchorTarget, Breadcrumbs, CTAComponent, Carousel, CenterWrapper as CentreWrapper, 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 };