@uob-web-and-digital/component-library 0.0.57 → 0.0.59

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/atoms/InPageNavLink/InPageNavLink.d.ts +10 -0
  3. package/dist/components/atoms/InPageNavLink/InPageNavLink.stories.d.ts +11 -0
  4. package/dist/components/atoms/MainWrapper/MainWrapper.d.ts +1 -2
  5. package/dist/components/molecules/InPageNavigationLinks/InPageNavigationLinks.d.ts +12 -0
  6. package/dist/components/molecules/InPageNavigationLinks/InPageNavigationLinks.stories.d.ts +13 -0
  7. package/dist/components/molecules/InPageNavigationLinks/defaultProps.d.ts +2 -0
  8. package/dist/components/organisms/Carousel/Carousel.d.ts +2 -1
  9. package/dist/components/organisms/Carousel/Carousel.stories.d.ts +1 -0
  10. package/dist/components/organisms/GeneralSearchFilter/GeneralSearchFilter.d.ts +2 -1
  11. package/dist/components/organisms/GeneralSearchFilter/GeneralSearchFilter.stories.d.ts +1 -0
  12. package/dist/components/organisms/InPageNavigation/InPageNavigation.d.ts +11 -0
  13. package/dist/components/organisms/InPageNavigation/InPageNavigation.stories.d.ts +11 -0
  14. package/dist/components/organisms/InPageNavigation/defaultProps.d.ts +2 -0
  15. package/dist/components/organisms/SkipToContent/SkipToContent.d.ts +1 -2
  16. package/dist/components/organisms/StandardListingFilter/StandardListingFilter.d.ts +2 -1
  17. package/dist/components/organisms/StandardListingFilter/StandardListingFilter.stories.d.ts +1 -0
  18. package/dist/hooks/useOnClickOutside.d.ts +2 -0
  19. package/dist/index.d.ts +800 -775
  20. package/dist/main.css +1 -1
  21. package/dist/main.js +5 -5
  22. package/dist/module.js +5 -5
  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' | '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' | 'warning-light' | 'warning-dark' | 'information' | 'star';
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' | 'domain' | 'note-add' | 'flight' | 'one' | 'two' | 'one-two-three' | 'camping' | 'groups' | 'bed' | 'restaurant' | 'success' | 'warning-light' | 'warning-dark' | 'information' | 'star' | 'menu';
5
5
  export type IconProps = {
6
6
  /**
7
7
  * The theme to use
@@ -0,0 +1,10 @@
1
+ import { ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import './inPageNavLink.scss';
4
+ export interface InPageNavLinkProps {
5
+ theme: ThemeProps;
6
+ inverse?: boolean;
7
+ url: string;
8
+ title: string;
9
+ }
10
+ export default function InPageNavLink({ theme, inverse, url, title }: InPageNavLinkProps): ReactElement;
@@ -0,0 +1,11 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import InPageNavLink from './InPageNavLink';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof InPageNavLink;
6
+ tags: string[];
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const Dark: Story;
11
+ export declare const Light: Story;
@@ -1,5 +1,4 @@
1
1
  import { PropsWithChildren, ReactElement } from 'react';
2
- interface MainWrapperProps {
2
+ export interface MainWrapperProps {
3
3
  }
4
4
  export default function MainWrapper({ children }: PropsWithChildren<MainWrapperProps>): ReactElement;
5
- export {};
@@ -0,0 +1,12 @@
1
+ import { ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import { InPageNavLinkProps } from '../../atoms/InPageNavLink/InPageNavLink';
4
+ import { TextButtonProps } from '../../atoms/TextButton/TextButton';
5
+ import './inPageNavigationLinks.scss';
6
+ export type InPageNavigationLinksProps = {
7
+ theme: ThemeProps;
8
+ heading?: string;
9
+ links: Omit<InPageNavLinkProps, 'theme'>[];
10
+ buttonLinks?: Omit<TextButtonProps, 'theme'>[];
11
+ };
12
+ export default function InPageNavigationLinks({ theme, heading, links, buttonLinks }: InPageNavigationLinksProps): ReactElement;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import InPageNavigationLinks from './InPageNavigationLinks';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof InPageNavigationLinks;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Example: Story;
@@ -0,0 +1,2 @@
1
+ import { InPageNavigationLinksProps } from './InPageNavigationLinks';
2
+ export declare const inPageNavigationLinksProps: InPageNavigationLinksProps;
@@ -21,5 +21,6 @@ export interface CarouselProps {
21
21
  setCardInverse?: 'dark' | 'light';
22
22
  cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[];
23
23
  exploreMore?: string;
24
+ cardCopyIsRichText?: boolean;
24
25
  }
25
- export default function Carousel({ theme, inverse, type, title, cards, cardTitleTag, setCardInverse, exploreMore }: CarouselProps): ReactElement;
26
+ export default function Carousel({ theme, inverse, type, title, cards, cardTitleTag, setCardInverse, exploreMore, cardCopyIsRichText }: CarouselProps): ReactElement;
@@ -8,3 +8,4 @@ declare const meta: {
8
8
  export default meta;
9
9
  type Story = StoryObj<typeof Carousel>;
10
10
  export declare const CarouselExample: Story;
11
+ export declare const CarouselWithPromoCards: Story;
@@ -7,6 +7,7 @@ export interface GeneralSearchFilterProps {
7
7
  typeName: string;
8
8
  defaultCheckedType?: string;
9
9
  typeGroups: TypeGroup[];
10
+ onViewResults: () => void;
10
11
  onClearFilters: () => void;
11
12
  }
12
13
  export interface TypeGroup {
@@ -27,4 +28,4 @@ export interface CheckboxGroupProps {
27
28
  onChange?: (e: ChangeEvent) => void;
28
29
  defaultValues?: string[];
29
30
  }
30
- export default function GeneralSearchFilter({ theme, heading, typeName, typeGroups, onClearFilters, defaultCheckedType }: GeneralSearchFilterProps): ReactElement;
31
+ export default function GeneralSearchFilter({ theme, heading, typeName, typeGroups, onClearFilters, onViewResults, defaultCheckedType }: GeneralSearchFilterProps): ReactElement;
@@ -11,6 +11,7 @@ declare const meta: {
11
11
  typeName: string;
12
12
  defaultCheckedType?: string | undefined;
13
13
  typeGroups: import("./GeneralSearchFilter").TypeGroup[];
14
+ onViewResults: () => void;
14
15
  onClearFilters: () => void;
15
16
  }>) => JSX.Element)[];
16
17
  };
@@ -0,0 +1,11 @@
1
+ import { ReactElement } from 'react';
2
+ import { ThemeProps } from '../../../themeProps';
3
+ import './inPageNavigation.scss';
4
+ import { InPageNavigationLinksProps } from '../../molecules/InPageNavigationLinks/InPageNavigationLinks';
5
+ export interface InPageNavigationProps {
6
+ theme: ThemeProps;
7
+ inverse?: boolean;
8
+ expandableHeader?: string;
9
+ links: InPageNavigationLinksProps;
10
+ }
11
+ export default function InPageNavigation({ theme, inverse, links, expandableHeader }: InPageNavigationProps): ReactElement;
@@ -0,0 +1,11 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import InPageNavigation from './InPageNavigation';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof InPageNavigation;
6
+ tags: string[];
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const Dark: Story;
11
+ export declare const Light: Story;
@@ -0,0 +1,2 @@
1
+ import { InPageNavigationProps } from './InPageNavigation';
2
+ export declare const inPageNavigationProps: InPageNavigationProps;
@@ -1,8 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import './SkipToContent.scss';
3
3
  import { ThemeProps } from '../../../themeProps';
4
- interface SkipToContentProps {
4
+ export interface SkipToContentProps {
5
5
  theme: ThemeProps;
6
6
  }
7
7
  export default function SkipToContent({ theme }: SkipToContentProps): ReactElement;
8
- export {};
@@ -7,6 +7,7 @@ export interface StandardListingFilterProps {
7
7
  heading: string;
8
8
  listingGroups: ListingGroup[];
9
9
  onClearFilters: () => void;
10
+ onViewResults: () => void;
10
11
  }
11
12
  type ListingGroup = DateProps | RadioProps | CheckboxProps | SelectProps;
12
13
  export interface RadioProps {
@@ -48,5 +49,5 @@ export interface SelectProps extends FilterAccordionSelectProps {
48
49
  name: string;
49
50
  id: string;
50
51
  }
51
- export default function StandardListingFilter({ theme, heading, listingGroups, onClearFilters }: StandardListingFilterProps): ReactElement;
52
+ export default function StandardListingFilter({ theme, heading, listingGroups, onClearFilters, onViewResults }: StandardListingFilterProps): ReactElement;
52
53
  export {};
@@ -10,6 +10,7 @@ declare const meta: {
10
10
  heading: string;
11
11
  listingGroups: (import("./StandardListingFilter").DateProps | import("./StandardListingFilter").RadioProps | import("./StandardListingFilter").CheckboxProps | import("./StandardListingFilter").SelectProps)[];
12
12
  onClearFilters: () => void;
13
+ onViewResults: () => void;
13
14
  }>) => JSX.Element)[];
14
15
  };
15
16
  export default meta;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export default function useOnClickOutside(ref: React.RefObject<HTMLElement>, handler: () => void): void;