@uob-web-and-digital/component-library 0.0.35 → 0.0.36

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,5 +11,9 @@ export interface RichTextProps {
11
11
  */
12
12
  inverse?: boolean;
13
13
  text: string;
14
+ /**
15
+ * The fullWidth version of this component is used for in study pages
16
+ */
17
+ fullWidth?: boolean;
14
18
  }
15
- export default function RichText({ text, theme, inverse }: RichTextProps): ReactElement;
19
+ export default function RichText({ text, theme, inverse, fullWidth }: RichTextProps): ReactElement;
@@ -51,8 +51,12 @@ export interface SearchCoursesProps {
51
51
  * The wrapped version of this component is used for Hero
52
52
  */
53
53
  wrapped?: boolean;
54
+ /**
55
+ * The fullWidth version of this component is used for in study pages
56
+ */
57
+ fullWidth?: boolean;
54
58
  }
55
59
  /**
56
60
  * Search component
57
61
  */
58
- export default function SearchCourses({ theme, inverse, title, defaultSearchTerm, placeholder, filterTitle, filterFieldName, filterOptions, defaultFilter, resultsUrl, wrapped }: SearchCoursesProps): ReactElement;
62
+ export default function SearchCourses({ theme, inverse, title, defaultSearchTerm, placeholder, filterTitle, filterFieldName, filterOptions, defaultFilter, resultsUrl, wrapped, fullWidth }: SearchCoursesProps): ReactElement;
@@ -0,0 +1,11 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import './sidebarWrapper.scss';
4
+ export interface SidebarWrapperProps {
5
+ /**
6
+ * The theme to use
7
+ */
8
+ theme: ThemeProps;
9
+ children: ReactNode;
10
+ }
11
+ export default function SidebarWrapper({ theme, children }: SidebarWrapperProps): ReactElement;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import SidebarWrapper from './SidebarWrapper';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof SidebarWrapper;
6
+ tags: string[];
7
+ parameters: {
8
+ backgrounds: {
9
+ default: string;
10
+ };
11
+ };
12
+ };
13
+ export default meta;
14
+ type Story = StoryObj<typeof SidebarWrapper>;
15
+ export declare const Default: Story;
@@ -14,6 +14,10 @@ export interface SignPostProps {
14
14
  * A SignPost can have 2 or 4 items
15
15
  */
16
16
  items: readonly [SignPostItem, SignPostItem];
17
+ /**
18
+ * The fullWidth version of this component is used for in study pages
19
+ */
20
+ fullWidth?: boolean;
17
21
  }
18
22
  type SignPostItem = {
19
23
  title: string;
@@ -25,5 +29,5 @@ type SignPostItem = {
25
29
  /**
26
30
  * Text promo block with a link
27
31
  */
28
- export default function SignPost({ theme, inverse, items }: SignPostProps): ReactElement;
32
+ export default function SignPost({ theme, inverse, items, fullWidth }: SignPostProps): ReactElement;
29
33
  export {};
package/dist/index.d.ts CHANGED
@@ -415,11 +415,15 @@ interface SearchCoursesProps {
415
415
  * The wrapped version of this component is used for Hero
416
416
  */
417
417
  wrapped?: boolean;
418
+ /**
419
+ * The fullWidth version of this component is used for in study pages
420
+ */
421
+ fullWidth?: boolean;
418
422
  }
419
423
  /**
420
424
  * Search component
421
425
  */
422
- declare function SearchCourses({ theme, inverse, title, defaultSearchTerm, placeholder, filterTitle, filterFieldName, filterOptions, defaultFilter, resultsUrl, wrapped }: SearchCoursesProps): ReactElement;
426
+ declare function SearchCourses({ theme, inverse, title, defaultSearchTerm, placeholder, filterTitle, filterFieldName, filterOptions, defaultFilter, resultsUrl, wrapped, fullWidth }: SearchCoursesProps): ReactElement;
423
427
 
424
428
  interface SignPostProps {
425
429
  /**
@@ -434,6 +438,10 @@ interface SignPostProps {
434
438
  * A SignPost can have 2 or 4 items
435
439
  */
436
440
  items: readonly [SignPostItem, SignPostItem];
441
+ /**
442
+ * The fullWidth version of this component is used for in study pages
443
+ */
444
+ fullWidth?: boolean;
437
445
  }
438
446
  type SignPostItem = {
439
447
  title: string;
@@ -445,7 +453,7 @@ type SignPostItem = {
445
453
  /**
446
454
  * Text promo block with a link
447
455
  */
448
- declare function SignPost({ theme, inverse, items }: SignPostProps): ReactElement;
456
+ declare function SignPost({ theme, inverse, items, fullWidth }: SignPostProps): ReactElement;
449
457
 
450
458
  interface SkipToContentProps {
451
459
  theme: ThemeProps;
@@ -504,8 +512,12 @@ interface RichTextProps {
504
512
  */
505
513
  inverse?: boolean;
506
514
  text: string;
515
+ /**
516
+ * The fullWidth version of this component is used for in study pages
517
+ */
518
+ fullWidth?: boolean;
507
519
  }
508
- declare function RichText({ text, theme, inverse }: RichTextProps): ReactElement;
520
+ declare function RichText({ text, theme, inverse, fullWidth }: RichTextProps): ReactElement;
509
521
 
510
522
  interface TextWithBackgroundProps {
511
523
  /**
@@ -591,4 +603,57 @@ interface ImageBlockProps extends HeadingProps {
591
603
  }
592
604
  declare function ImageBlock({ theme, inverse, title, description, linkProps, fullWidth, images }: ImageBlockProps): ReactElement | null;
593
605
 
594
- export { Breadcrumbs, Carousel, FeaturedContent, FeaturedSignpost, FeaturedVideo, Footer, Header, Hero, HeroCarousel, ImageBlock, IntroText, MainWrapper, RichText, SearchCourses, SignPost, SkipToContent, TextWithBackground, VideoCardComponent };
606
+ interface AccordionItemProps {
607
+ key?: number;
608
+ title: string;
609
+ text: string;
610
+ theme: ThemeProps;
611
+ inverse?: boolean;
612
+ titleTag: 'h2' | 'h3' | 'h4';
613
+ }
614
+
615
+ interface AccordionProps {
616
+ theme: ThemeProps;
617
+ inverse?: boolean;
618
+ heading?: Omit<HeadingProps, 'theme' | 'inverse'>;
619
+ accordionItems: AccordionItemProps[];
620
+ }
621
+ declare function Accordion({ theme, inverse, heading, accordionItems }: AccordionProps): ReactElement;
622
+
623
+ interface PromoBlockProps {
624
+ /**
625
+ * The theme to use
626
+ */
627
+ theme: ThemeProps;
628
+ /**
629
+ * Whether to inverse the colours
630
+ */
631
+ inverse?: boolean;
632
+ /**
633
+ * Optional title of the component
634
+ */
635
+ title?: string;
636
+ /**
637
+ * Optional description of the component
638
+ */
639
+ description?: string;
640
+ /**
641
+ * Optional link elements
642
+ */
643
+ link?: LinkWithArrowProps;
644
+ /**
645
+ * Promo block will work with three card types
646
+ */
647
+ type: 'promo' | 'promo-signpost' | 'promo-video';
648
+ /**
649
+ * A Promo block component can have any number of items
650
+ */
651
+ cards: CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[];
652
+ /**
653
+ * Only applies to the signpost card and if there is only one
654
+ */
655
+ imageOrientation: 'left' | 'right';
656
+ }
657
+ declare function PromoBlock({ theme, inverse, type, title, description, link, cards, imageOrientation }: PromoBlockProps): ReactElement | null;
658
+
659
+ export { Accordion, Breadcrumbs, Carousel, FeaturedContent, FeaturedSignpost, FeaturedVideo, Footer, Header, Hero, HeroCarousel, ImageBlock, IntroText, MainWrapper, PromoBlock, RichText, SearchCourses, SignPost, SkipToContent, TextWithBackground, VideoCardComponent };