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

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.
@@ -31,12 +31,12 @@ export interface TabProps {
31
31
  */
32
32
  tabListTopRef: React.MutableRefObject<HTMLDivElement | null>;
33
33
  /**
34
- * The method to set the active tab
34
+ * The method to handle a mouse click on the tab
35
35
  */
36
- setActiveTab: (id: number) => void;
36
+ handleClick: (event: React.MouseEvent, activeTabId: number) => void;
37
37
  /**
38
38
  * The method to handle keyboard navigation events
39
39
  */
40
- onKeyboardNavigation: (e: KeyboardEvent) => void;
40
+ handleKeyboardNavigation: (e: KeyboardEvent) => void;
41
41
  }
42
- export default function Tab({ id, theme, inverse, tabItem, isActive, hasFocus, setActiveTab, onKeyboardNavigation: onKeyboardNavigation }: TabProps): ReactElement | null;
42
+ export default function Tab({ id, theme, inverse, tabItem, isActive, hasFocus, handleClick, handleKeyboardNavigation: handleKeyboardNavigation }: TabProps): ReactElement | null;
@@ -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 { MostReadNewsProps } from '../../molecules/MostReadNews/MostReadNews';
4
5
  import './leadNewsArticles.scss';
5
6
  export interface LeadNewsArticlesProps {
6
7
  theme: ThemeProps;
7
8
  featuredArticle: CardFeaturedNewsProps;
8
9
  otherLeadArticles: Omit<CardFeaturedNewsProps, 'theme'>[];
10
+ mostReadNews: MostReadNewsProps;
9
11
  }
10
- export default function LeadNewsArticles({ theme, featuredArticle, otherLeadArticles }: LeadNewsArticlesProps): ReactElement;
12
+ export default function LeadNewsArticles({ theme, featuredArticle, otherLeadArticles, mostReadNews }: LeadNewsArticlesProps): ReactElement;
@@ -0,0 +1,12 @@
1
+ import { ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import { TextButtonWithIconProps } from '../../atoms/TextButtonWithIcon/TextButtonWithIcon';
4
+ import { TextButtonProps } from '../../atoms/TextButton/TextButton';
5
+ import './singleButton.scss';
6
+ export interface SingleButtonProps {
7
+ theme: ThemeProps;
8
+ inverse?: boolean;
9
+ includeIcon: boolean;
10
+ link: TextButtonWithIconProps | TextButtonProps;
11
+ }
12
+ export default function SingleButton({ theme, inverse, includeIcon, link }: SingleButtonProps): ReactElement;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import SingleButton from './SingleButton';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof SingleButton;
6
+ tags: string[];
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const DarkWithIcon: Story;
11
+ export declare const LightWithIcon: Story;
12
+ export declare const DarkNoIcon: Story;
13
+ export declare const LightNoIcon: Story;
@@ -0,0 +1,2 @@
1
+ import { SingleButtonProps } from './SingleButton';
2
+ export declare const singleButtonProps: SingleButtonProps;
package/dist/index.d.ts CHANGED
@@ -1048,12 +1048,20 @@ interface TopicSelectorProps {
1048
1048
  }
1049
1049
  declare function TopicSelector({ topics, theme, titleTag, heading }: TopicSelectorProps): ReactElement | null;
1050
1050
 
1051
+ interface MostReadNewsProps {
1052
+ theme: ThemeProps;
1053
+ heading: string;
1054
+ cards: Omit<CardFeaturedNewsProps, 'theme'>[];
1055
+ link?: LinkWithArrowProps;
1056
+ }
1057
+
1051
1058
  interface LeadNewsArticlesProps {
1052
1059
  theme: ThemeProps;
1053
1060
  featuredArticle: CardFeaturedNewsProps;
1054
1061
  otherLeadArticles: Omit<CardFeaturedNewsProps, 'theme'>[];
1062
+ mostReadNews: MostReadNewsProps;
1055
1063
  }
1056
- declare function LeadNewsArticles({ theme, featuredArticle, otherLeadArticles }: LeadNewsArticlesProps): ReactElement;
1064
+ declare function LeadNewsArticles({ theme, featuredArticle, otherLeadArticles, mostReadNews }: LeadNewsArticlesProps): ReactElement;
1057
1065
 
1058
1066
  interface TabItemProps {
1059
1067
  title: string;
@@ -1110,6 +1118,14 @@ interface NewsArticlesPromoBlockProps {
1110
1118
  }
1111
1119
  declare function NewsArticlesPromoBlock({ theme, heading, cards }: NewsArticlesPromoBlockProps): ReactElement;
1112
1120
 
1121
+ interface SingleButtonProps {
1122
+ theme: ThemeProps;
1123
+ inverse?: boolean;
1124
+ includeIcon: boolean;
1125
+ link: TextButtonWithIconProps | TextButtonProps;
1126
+ }
1127
+ declare function SingleButton({ theme, inverse, includeIcon, link }: SingleButtonProps): ReactElement;
1128
+
1113
1129
  interface FiveArticlesGridProps {
1114
1130
  theme: ThemeProps;
1115
1131
  heading?: string;
@@ -1118,4 +1134,4 @@ interface FiveArticlesGridProps {
1118
1134
  }
1119
1135
  declare function FiveArticlesGrid({ theme, heading, featuredArticle, otherLeadArticles }: FiveArticlesGridProps): ReactElement;
1120
1136
 
1121
- 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, SkipToContent, StaffListingCarousel, StandardListingFilter, TabsBlock, TextWithBackground, TopicSelector, VideoCardComponent, VideoEmbed };
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 };