@uob-web-and-digital/component-library 0.0.54 → 0.0.56
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.
- package/dist/components/atoms/Heading/Heading.d.ts +7 -0
- package/dist/components/atoms/Heading/Heading.stories.d.ts +12 -0
- package/dist/components/molecules/CardNews/CardNews.d.ts +2 -1
- package/dist/components/molecules/CardNews/CardNews.stories.d.ts +2 -0
- package/dist/components/molecules/CardNews/defaultProps.d.ts +2 -0
- package/dist/components/molecules/CardPromo/CardPromo.d.ts +4 -2
- package/dist/components/molecules/CardPromo/CardPromo.stories.d.ts +2 -0
- package/dist/components/molecules/CardPromoSignpost/CardPromoSignpost.d.ts +2 -1
- package/dist/components/molecules/CardPromoSignpost/CardPromoSignpost.stories.d.ts +1 -0
- package/dist/components/molecules/CardVideo/CardVideo.d.ts +2 -1
- package/dist/components/molecules/FilterAccordion/FilterAccordion.d.ts +4 -2
- package/dist/components/molecules/FilterAccordionSelect/FilterAccordionSelect.d.ts +14 -0
- package/dist/components/molecules/FilterAccordionSelect/FilterAccordionSelect.stories.d.ts +10 -0
- package/dist/components/molecules/FilterAccordionSelect/defaultProps.d.ts +2 -0
- package/dist/components/organisms/Carousel/Carousel.d.ts +3 -2
- package/dist/components/organisms/PromoBlock/PromoBlock.d.ts +13 -1
- package/dist/components/organisms/SearchCourses/SearchCourses.d.ts +15 -11
- package/dist/components/organisms/StandardListingFilter/StandardListingFilter.d.ts +9 -1
- package/dist/components/organisms/StandardListingFilter/StandardListingFilter.stories.d.ts +1 -1
- package/dist/index.d.ts +72 -20
- package/dist/main.css +1 -1
- package/dist/main.js +5 -5
- package/dist/module.js +5 -5
- package/package.json +1 -1
- /package/dist/components/molecules/CardModuleCard/{CardModule.Card.stories.d.ts → CardModuleCard.stories.d.ts} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import Heading from './Heading';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Heading;
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof Heading>;
|
|
10
|
+
export declare const Default: Story;
|
|
11
|
+
export declare const h3: Story;
|
|
12
|
+
export declare const h4: Story;
|
|
@@ -2,6 +2,7 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
import { ImageProps } from '../../atoms/Image/Image';
|
|
3
3
|
import { ThemeProps } from '../../../themeProps';
|
|
4
4
|
import './cardNews.scss';
|
|
5
|
+
import { HeadingProps } from '../../atoms/Heading/Heading';
|
|
5
6
|
export interface CardNewsProps {
|
|
6
7
|
theme: ThemeProps;
|
|
7
8
|
inverse?: boolean;
|
|
@@ -10,7 +11,7 @@ export interface CardNewsProps {
|
|
|
10
11
|
title: string;
|
|
11
12
|
href: string;
|
|
12
13
|
publishDate: string;
|
|
13
|
-
titleTag: '
|
|
14
|
+
titleTag: HeadingProps['htmlTag'];
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Primary UI component for user interaction
|
|
@@ -2,6 +2,7 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
import { ImageProps } from '../../atoms/Image/Image';
|
|
3
3
|
import { ThemeProps } from '../../../themeProps';
|
|
4
4
|
import './cardPromo.scss';
|
|
5
|
+
import { HeadingProps } from '../../atoms/Heading/Heading';
|
|
5
6
|
export interface CardPromoProps {
|
|
6
7
|
theme: ThemeProps;
|
|
7
8
|
inverse?: boolean;
|
|
@@ -15,9 +16,10 @@ export interface CardPromoProps {
|
|
|
15
16
|
location?: string;
|
|
16
17
|
copy?: string;
|
|
17
18
|
isSingle?: boolean;
|
|
18
|
-
titleTag: '
|
|
19
|
+
titleTag: HeadingProps['htmlTag'];
|
|
20
|
+
cardCopyIsRichText?: boolean;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Primary UI component for user interaction
|
|
22
24
|
*/
|
|
23
|
-
export default function CardPromo({ theme, inverse, image, tag, title, subtitle, href, publishDate, authorString, location, copy, isSingle, titleTag }: CardPromoProps): ReactElement;
|
|
25
|
+
export default function CardPromo({ theme, inverse, image, tag, title, subtitle, href, publishDate, authorString, location, copy, isSingle, titleTag, cardCopyIsRichText }: CardPromoProps): ReactElement;
|
|
@@ -12,5 +12,7 @@ export default meta;
|
|
|
12
12
|
type Story = StoryObj<typeof CardPromo>;
|
|
13
13
|
export declare const SinglePromoCardLight: Story;
|
|
14
14
|
export declare const SinglePromoCardDark: Story;
|
|
15
|
+
export declare const SinglePromoCardLightRichTextCopy: Story;
|
|
16
|
+
export declare const SinglePromoCardDarkRichTextCopy: Story;
|
|
15
17
|
export declare const CardNoImage: Story;
|
|
16
18
|
export declare const OneOfManyPromoCards: Story;
|
|
@@ -4,6 +4,7 @@ import { ThemeProps } from '../../../themeProps';
|
|
|
4
4
|
import { TextButtonProps } from '../../atoms/TextButton/TextButton';
|
|
5
5
|
import { LinkWithArrowProps } from '../../atoms/LinkWithArrow/LinkWithArrow';
|
|
6
6
|
import './cardPromoSignpost.scss';
|
|
7
|
+
import { HeadingProps } from '../../atoms/Heading/Heading';
|
|
7
8
|
export interface CardPromoSignpostProps {
|
|
8
9
|
theme: ThemeProps;
|
|
9
10
|
inverse?: boolean;
|
|
@@ -20,7 +21,7 @@ export interface CardPromoSignpostProps {
|
|
|
20
21
|
buttonPrimary?: TextButtonProps;
|
|
21
22
|
buttonSecondary?: TextButtonProps;
|
|
22
23
|
link?: LinkWithArrowProps;
|
|
23
|
-
titleTag: '
|
|
24
|
+
titleTag: HeadingProps['htmlTag'];
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
27
|
* Primary UI component for user interaction
|
|
@@ -13,3 +13,4 @@ type Story = StoryObj<typeof CardPromoSignpost>;
|
|
|
13
13
|
export declare const SinglePromoSignpostCardLight: Story;
|
|
14
14
|
export declare const SinglePromoSignpostCardsDarkRightImage: Story;
|
|
15
15
|
export declare const OneOfManyPromoSignpostCardsDark: Story;
|
|
16
|
+
export declare const SinglePromoSignpostCardsDarkRightImageH4Title: Story;
|
|
@@ -2,6 +2,7 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
import { ImageProps } from '../../atoms/Image/Image';
|
|
3
3
|
import { ThemeProps } from '../../../themeProps';
|
|
4
4
|
import './cardVideo.scss';
|
|
5
|
+
import { HeadingProps } from '../../atoms/Heading/Heading';
|
|
5
6
|
export interface CardVideoProps {
|
|
6
7
|
theme: ThemeProps;
|
|
7
8
|
inverse?: boolean;
|
|
@@ -9,7 +10,7 @@ export interface CardVideoProps {
|
|
|
9
10
|
title: string;
|
|
10
11
|
youtubeId: string;
|
|
11
12
|
buttonLabel: string;
|
|
12
|
-
titleTag
|
|
13
|
+
titleTag: HeadingProps['htmlTag'];
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Primary UI component for user interaction
|
|
@@ -8,7 +8,8 @@ interface CheckboxAccordionProps {
|
|
|
8
8
|
theme: ThemeProps;
|
|
9
9
|
heading: string;
|
|
10
10
|
type: 'checkbox';
|
|
11
|
-
inputs
|
|
11
|
+
inputs?: Omit<CheckboxProps, 'theme'>[];
|
|
12
|
+
selectProps?: null;
|
|
12
13
|
/**
|
|
13
14
|
* Whether the accordion is open or closed by default
|
|
14
15
|
*/
|
|
@@ -18,7 +19,8 @@ interface RadioButtonAccordionProps {
|
|
|
18
19
|
theme: ThemeProps;
|
|
19
20
|
heading: string;
|
|
20
21
|
type: 'radio';
|
|
21
|
-
inputs
|
|
22
|
+
inputs?: Omit<RadioButtonProps, 'theme'>[];
|
|
23
|
+
selectProps?: null;
|
|
22
24
|
/**
|
|
23
25
|
* Whether the accordion is open or closed by default
|
|
24
26
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ThemeProps } from '../../../themeProps';
|
|
3
|
+
import { FormSelectProps } from '../../atoms/FormSelect/FormSelect';
|
|
4
|
+
import './filterAccordionSelect.scss';
|
|
5
|
+
export type FilterAccordionSelectProps = {
|
|
6
|
+
theme: ThemeProps;
|
|
7
|
+
heading: string;
|
|
8
|
+
selectContent: Omit<FormSelectProps, 'theme'>;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the accordion is open or closed by default
|
|
11
|
+
*/
|
|
12
|
+
defaultIsOpen?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export default function FilterAccordionSelect({ theme, heading, selectContent, defaultIsOpen }: FilterAccordionSelectProps): ReactElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import FilterAccordionSelect from './FilterAccordionSelect';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof FilterAccordionSelect;
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof FilterAccordionSelect>;
|
|
10
|
+
export declare const Select: Story;
|
|
@@ -11,14 +11,15 @@ import { CardImageProps } from '../../molecules/CardImage/CardImage';
|
|
|
11
11
|
import { CardFeaturedNewsProps } from '../../molecules/CardFeaturedNews/CardFeaturedNews';
|
|
12
12
|
import { ThemeProps } from '../../../themeProps';
|
|
13
13
|
import './carousel.scss';
|
|
14
|
+
import { HeadingProps } from '../../atoms/Heading/Heading';
|
|
14
15
|
export interface CarouselProps {
|
|
15
16
|
theme: ThemeProps;
|
|
16
17
|
inverse?: boolean;
|
|
17
18
|
type: string;
|
|
18
19
|
title?: string;
|
|
19
|
-
|
|
20
|
+
cardTitleTag?: HeadingProps['htmlTag'];
|
|
20
21
|
setCardInverse?: 'dark' | 'light';
|
|
21
22
|
cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[];
|
|
22
23
|
exploreMore?: string;
|
|
23
24
|
}
|
|
24
|
-
export default function Carousel({ theme, inverse, type, title, cards,
|
|
25
|
+
export default function Carousel({ theme, inverse, type, title, cards, cardTitleTag, setCardInverse, exploreMore }: CarouselProps): ReactElement;
|
|
@@ -18,6 +18,14 @@ export interface PromoBlockProps {
|
|
|
18
18
|
* Optional title of the component
|
|
19
19
|
*/
|
|
20
20
|
title?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Optional titleTag of the component
|
|
23
|
+
*/
|
|
24
|
+
titleTag?: 'h2' | 'h3';
|
|
25
|
+
/**
|
|
26
|
+
* Optional cardTitleTag of the component
|
|
27
|
+
*/
|
|
28
|
+
cardTitleTag?: 'h2' | 'h3' | 'h4';
|
|
21
29
|
/**
|
|
22
30
|
* Optional description of the component
|
|
23
31
|
*/
|
|
@@ -38,5 +46,9 @@ export interface PromoBlockProps {
|
|
|
38
46
|
* Only applies to the signpost card and if there is only one
|
|
39
47
|
*/
|
|
40
48
|
imageOrientation: 'left' | 'right';
|
|
49
|
+
/**
|
|
50
|
+
* The copy prop of the card may need to be rendered as Rich Text
|
|
51
|
+
*/
|
|
52
|
+
cardCopyIsRichText?: boolean;
|
|
41
53
|
}
|
|
42
|
-
export default function PromoBlock({ theme, inverse, type, title, description, link, cards, imageOrientation }: PromoBlockProps): ReactElement | null;
|
|
54
|
+
export default function PromoBlock({ theme, inverse, type, title, description, link, cards, imageOrientation, titleTag, cardTitleTag, cardCopyIsRichText }: PromoBlockProps): ReactElement | null;
|
|
@@ -19,6 +19,10 @@ export interface SearchCoursesProps {
|
|
|
19
19
|
* Title for module
|
|
20
20
|
*/
|
|
21
21
|
title?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional description for module
|
|
24
|
+
*/
|
|
25
|
+
description?: string;
|
|
22
26
|
/**
|
|
23
27
|
* Default value to use for the search term
|
|
24
28
|
*/
|
|
@@ -27,10 +31,6 @@ export interface SearchCoursesProps {
|
|
|
27
31
|
* Placeholder text
|
|
28
32
|
*/
|
|
29
33
|
placeholder: string;
|
|
30
|
-
/**
|
|
31
|
-
* Facet of the filter
|
|
32
|
-
*/
|
|
33
|
-
facet?: string;
|
|
34
34
|
/**
|
|
35
35
|
* Display name of the filter
|
|
36
36
|
*/
|
|
@@ -47,10 +47,6 @@ export interface SearchCoursesProps {
|
|
|
47
47
|
* Default value for filter
|
|
48
48
|
*/
|
|
49
49
|
defaultFilter?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Results url
|
|
52
|
-
*/
|
|
53
|
-
resultsUrl: string;
|
|
54
50
|
/**
|
|
55
51
|
* The wrapped version of this component is used for Hero
|
|
56
52
|
*/
|
|
@@ -65,11 +61,19 @@ export interface SearchCoursesProps {
|
|
|
65
61
|
onGrid?: boolean;
|
|
66
62
|
titleTag?: 'h1' | 'h2';
|
|
67
63
|
/**
|
|
68
|
-
*
|
|
64
|
+
* Function to handle what happen whens when form is submitted
|
|
65
|
+
*/
|
|
66
|
+
formSubmitHandler?: () => void | null;
|
|
67
|
+
/**
|
|
68
|
+
* Function to handle what happen whens when filters change
|
|
69
|
+
*/
|
|
70
|
+
filterChangeHandler?: () => void | null;
|
|
71
|
+
/**
|
|
72
|
+
* Function to handle what happen whens when search term changes
|
|
69
73
|
*/
|
|
70
|
-
|
|
74
|
+
searchTermChangeHandler?: () => void | null;
|
|
71
75
|
}
|
|
72
76
|
/**
|
|
73
77
|
* Search component
|
|
74
78
|
*/
|
|
75
|
-
export default function SearchCourses({ theme, inverse, title, defaultSearchTerm, placeholder,
|
|
79
|
+
export default function SearchCourses({ theme, inverse, title, description, defaultSearchTerm, placeholder, filterTitle, filterFieldName, filterOptions, defaultFilter, wrapped, fullWidth, onGrid, titleTag, formSubmitHandler, filterChangeHandler, searchTermChangeHandler }: SearchCoursesProps): ReactElement;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent, ReactElement } from 'react';
|
|
2
|
+
import { FilterAccordionSelectProps } from '../../molecules/FilterAccordionSelect/FilterAccordionSelect';
|
|
2
3
|
import { ThemeProps } from '../../../themeProps';
|
|
3
4
|
import './standardListingFilter.scss';
|
|
4
5
|
export interface StandardListingFilterProps {
|
|
@@ -7,7 +8,7 @@ export interface StandardListingFilterProps {
|
|
|
7
8
|
listingGroups: ListingGroup[];
|
|
8
9
|
onClearFilters: () => void;
|
|
9
10
|
}
|
|
10
|
-
type ListingGroup = DateProps | RadioProps | CheckboxProps;
|
|
11
|
+
type ListingGroup = DateProps | RadioProps | CheckboxProps | SelectProps;
|
|
11
12
|
export interface RadioProps {
|
|
12
13
|
type: 'radio';
|
|
13
14
|
heading: string;
|
|
@@ -40,5 +41,12 @@ export interface DateProps {
|
|
|
40
41
|
onChange?: (e: ChangeEvent) => void;
|
|
41
42
|
defaultValue?: string;
|
|
42
43
|
}
|
|
44
|
+
export interface SelectProps extends FilterAccordionSelectProps {
|
|
45
|
+
type: 'select';
|
|
46
|
+
onChange?: (e: ChangeEvent) => void;
|
|
47
|
+
defaultValue?: string;
|
|
48
|
+
name: string;
|
|
49
|
+
id: string;
|
|
50
|
+
}
|
|
43
51
|
export default function StandardListingFilter({ theme, heading, listingGroups, onClearFilters }: StandardListingFilterProps): ReactElement;
|
|
44
52
|
export {};
|
|
@@ -8,7 +8,7 @@ declare const meta: {
|
|
|
8
8
|
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
9
9
|
theme: import("../../../themeProps").ThemeProps;
|
|
10
10
|
heading: string;
|
|
11
|
-
listingGroups: (import("./StandardListingFilter").DateProps | import("./StandardListingFilter").RadioProps | import("./StandardListingFilter").CheckboxProps)[];
|
|
11
|
+
listingGroups: (import("./StandardListingFilter").DateProps | import("./StandardListingFilter").RadioProps | import("./StandardListingFilter").CheckboxProps | import("./StandardListingFilter").SelectProps)[];
|
|
12
12
|
onClearFilters: () => void;
|
|
13
13
|
}>) => JSX.Element)[];
|
|
14
14
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { KeyboardEvent, ReactElement, PropsWithChildren, MouseEventHandler, ChangeEvent
|
|
1
|
+
import React, { ReactNode, KeyboardEvent, ReactElement, PropsWithChildren, MouseEventHandler, ChangeEvent } from 'react';
|
|
2
2
|
|
|
3
3
|
type ImageProps = {
|
|
4
4
|
src: {
|
|
@@ -15,6 +15,12 @@ type ImageProps = {
|
|
|
15
15
|
|
|
16
16
|
type ThemeProps = 'uobmain' | 'redexample';
|
|
17
17
|
|
|
18
|
+
interface HeadingProps$1 {
|
|
19
|
+
htmlTag: 'h2' | 'h3' | 'h4';
|
|
20
|
+
classNames?: string;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
interface CardNewsProps {
|
|
19
25
|
theme: ThemeProps;
|
|
20
26
|
inverse?: boolean;
|
|
@@ -23,7 +29,7 @@ interface CardNewsProps {
|
|
|
23
29
|
title: string;
|
|
24
30
|
href: string;
|
|
25
31
|
publishDate: string;
|
|
26
|
-
titleTag: '
|
|
32
|
+
titleTag: HeadingProps$1['htmlTag'];
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
interface CardFeaturedProps {
|
|
@@ -56,7 +62,7 @@ interface CardVideoProps {
|
|
|
56
62
|
title: string;
|
|
57
63
|
youtubeId: string;
|
|
58
64
|
buttonLabel: string;
|
|
59
|
-
titleTag
|
|
65
|
+
titleTag: HeadingProps$1['htmlTag'];
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
interface CardPromoProps {
|
|
@@ -72,7 +78,8 @@ interface CardPromoProps {
|
|
|
72
78
|
location?: string;
|
|
73
79
|
copy?: string;
|
|
74
80
|
isSingle?: boolean;
|
|
75
|
-
titleTag: '
|
|
81
|
+
titleTag: HeadingProps$1['htmlTag'];
|
|
82
|
+
cardCopyIsRichText?: boolean;
|
|
76
83
|
}
|
|
77
84
|
|
|
78
85
|
interface TextButtonProps {
|
|
@@ -133,7 +140,7 @@ interface CardPromoSignpostProps {
|
|
|
133
140
|
buttonPrimary?: TextButtonProps;
|
|
134
141
|
buttonSecondary?: TextButtonProps;
|
|
135
142
|
link?: LinkWithArrowProps;
|
|
136
|
-
titleTag: '
|
|
143
|
+
titleTag: HeadingProps$1['htmlTag'];
|
|
137
144
|
}
|
|
138
145
|
|
|
139
146
|
interface CardPromoVideoProps {
|
|
@@ -202,12 +209,12 @@ interface CarouselProps {
|
|
|
202
209
|
inverse?: boolean;
|
|
203
210
|
type: string;
|
|
204
211
|
title?: string;
|
|
205
|
-
|
|
212
|
+
cardTitleTag?: HeadingProps$1['htmlTag'];
|
|
206
213
|
setCardInverse?: 'dark' | 'light';
|
|
207
214
|
cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[];
|
|
208
215
|
exploreMore?: string;
|
|
209
216
|
}
|
|
210
|
-
declare function Carousel({ theme, inverse, type, title, cards,
|
|
217
|
+
declare function Carousel({ theme, inverse, type, title, cards, cardTitleTag, setCardInverse, exploreMore }: CarouselProps): ReactElement;
|
|
211
218
|
|
|
212
219
|
interface FeaturedContentProps {
|
|
213
220
|
/**
|
|
@@ -411,6 +418,18 @@ interface SelectOptionsProps {
|
|
|
411
418
|
value: string;
|
|
412
419
|
selected?: boolean;
|
|
413
420
|
}
|
|
421
|
+
interface FormSelectProps {
|
|
422
|
+
theme: ThemeProps;
|
|
423
|
+
inverse?: boolean;
|
|
424
|
+
fieldName: string;
|
|
425
|
+
title: string;
|
|
426
|
+
onChange?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
427
|
+
ariaControls?: string;
|
|
428
|
+
autoFocus?: boolean;
|
|
429
|
+
selectOptions: SelectOptionsProps[];
|
|
430
|
+
defaultValue: string;
|
|
431
|
+
hiddenLabel?: boolean;
|
|
432
|
+
}
|
|
414
433
|
|
|
415
434
|
interface SearchCoursesProps {
|
|
416
435
|
/**
|
|
@@ -425,6 +444,10 @@ interface SearchCoursesProps {
|
|
|
425
444
|
* Title for module
|
|
426
445
|
*/
|
|
427
446
|
title?: string;
|
|
447
|
+
/**
|
|
448
|
+
* Optional description for module
|
|
449
|
+
*/
|
|
450
|
+
description?: string;
|
|
428
451
|
/**
|
|
429
452
|
* Default value to use for the search term
|
|
430
453
|
*/
|
|
@@ -433,10 +456,6 @@ interface SearchCoursesProps {
|
|
|
433
456
|
* Placeholder text
|
|
434
457
|
*/
|
|
435
458
|
placeholder: string;
|
|
436
|
-
/**
|
|
437
|
-
* Facet of the filter
|
|
438
|
-
*/
|
|
439
|
-
facet?: string;
|
|
440
459
|
/**
|
|
441
460
|
* Display name of the filter
|
|
442
461
|
*/
|
|
@@ -453,10 +472,6 @@ interface SearchCoursesProps {
|
|
|
453
472
|
* Default value for filter
|
|
454
473
|
*/
|
|
455
474
|
defaultFilter?: string;
|
|
456
|
-
/**
|
|
457
|
-
* Results url
|
|
458
|
-
*/
|
|
459
|
-
resultsUrl: string;
|
|
460
475
|
/**
|
|
461
476
|
* The wrapped version of this component is used for Hero
|
|
462
477
|
*/
|
|
@@ -471,14 +486,22 @@ interface SearchCoursesProps {
|
|
|
471
486
|
onGrid?: boolean;
|
|
472
487
|
titleTag?: 'h1' | 'h2';
|
|
473
488
|
/**
|
|
474
|
-
*
|
|
489
|
+
* Function to handle what happen whens when form is submitted
|
|
490
|
+
*/
|
|
491
|
+
formSubmitHandler?: () => void | null;
|
|
492
|
+
/**
|
|
493
|
+
* Function to handle what happen whens when filters change
|
|
494
|
+
*/
|
|
495
|
+
filterChangeHandler?: () => void | null;
|
|
496
|
+
/**
|
|
497
|
+
* Function to handle what happen whens when search term changes
|
|
475
498
|
*/
|
|
476
|
-
|
|
499
|
+
searchTermChangeHandler?: () => void | null;
|
|
477
500
|
}
|
|
478
501
|
/**
|
|
479
502
|
* Search component
|
|
480
503
|
*/
|
|
481
|
-
declare function SearchCourses({ theme, inverse, title, defaultSearchTerm, placeholder,
|
|
504
|
+
declare function SearchCourses({ theme, inverse, title, description, defaultSearchTerm, placeholder, filterTitle, filterFieldName, filterOptions, defaultFilter, wrapped, fullWidth, onGrid, titleTag, formSubmitHandler, filterChangeHandler, searchTermChangeHandler }: SearchCoursesProps): ReactElement;
|
|
482
505
|
|
|
483
506
|
interface SignPostProps {
|
|
484
507
|
/**
|
|
@@ -800,6 +823,14 @@ interface PromoBlockProps$1 {
|
|
|
800
823
|
* Optional title of the component
|
|
801
824
|
*/
|
|
802
825
|
title?: string;
|
|
826
|
+
/**
|
|
827
|
+
* Optional titleTag of the component
|
|
828
|
+
*/
|
|
829
|
+
titleTag?: 'h2' | 'h3';
|
|
830
|
+
/**
|
|
831
|
+
* Optional cardTitleTag of the component
|
|
832
|
+
*/
|
|
833
|
+
cardTitleTag?: 'h2' | 'h3' | 'h4';
|
|
803
834
|
/**
|
|
804
835
|
* Optional description of the component
|
|
805
836
|
*/
|
|
@@ -820,8 +851,12 @@ interface PromoBlockProps$1 {
|
|
|
820
851
|
* Only applies to the signpost card and if there is only one
|
|
821
852
|
*/
|
|
822
853
|
imageOrientation: 'left' | 'right';
|
|
854
|
+
/**
|
|
855
|
+
* The copy prop of the card may need to be rendered as Rich Text
|
|
856
|
+
*/
|
|
857
|
+
cardCopyIsRichText?: boolean;
|
|
823
858
|
}
|
|
824
|
-
declare function PromoBlock({ theme, inverse, type, title, description, link, cards, imageOrientation }: PromoBlockProps$1): ReactElement | null;
|
|
859
|
+
declare function PromoBlock({ theme, inverse, type, title, description, link, cards, imageOrientation, titleTag, cardTitleTag, cardCopyIsRichText }: PromoBlockProps$1): ReactElement | null;
|
|
825
860
|
|
|
826
861
|
type IconType = 'person' | 'people' | 'computer' | 'book' | 'briefcase' | 'notepad';
|
|
827
862
|
interface CourseDeliveryPillProps {
|
|
@@ -972,13 +1007,23 @@ interface ListingResultsProps {
|
|
|
972
1007
|
}
|
|
973
1008
|
declare function ListingResults({ theme, showCategory, cards, headingInfo }: ListingResultsProps): ReactElement;
|
|
974
1009
|
|
|
1010
|
+
type FilterAccordionSelectProps = {
|
|
1011
|
+
theme: ThemeProps;
|
|
1012
|
+
heading: string;
|
|
1013
|
+
selectContent: Omit<FormSelectProps, 'theme'>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Whether the accordion is open or closed by default
|
|
1016
|
+
*/
|
|
1017
|
+
defaultIsOpen?: boolean;
|
|
1018
|
+
};
|
|
1019
|
+
|
|
975
1020
|
interface StandardListingFilterProps {
|
|
976
1021
|
theme: ThemeProps;
|
|
977
1022
|
heading: string;
|
|
978
1023
|
listingGroups: ListingGroup[];
|
|
979
1024
|
onClearFilters: () => void;
|
|
980
1025
|
}
|
|
981
|
-
type ListingGroup = DateProps | RadioProps | CheckboxProps;
|
|
1026
|
+
type ListingGroup = DateProps | RadioProps | CheckboxProps | SelectProps;
|
|
982
1027
|
interface RadioProps {
|
|
983
1028
|
type: 'radio';
|
|
984
1029
|
heading: string;
|
|
@@ -1011,6 +1056,13 @@ interface DateProps {
|
|
|
1011
1056
|
onChange?: (e: ChangeEvent) => void;
|
|
1012
1057
|
defaultValue?: string;
|
|
1013
1058
|
}
|
|
1059
|
+
interface SelectProps extends FilterAccordionSelectProps {
|
|
1060
|
+
type: 'select';
|
|
1061
|
+
onChange?: (e: ChangeEvent) => void;
|
|
1062
|
+
defaultValue?: string;
|
|
1063
|
+
name: string;
|
|
1064
|
+
id: string;
|
|
1065
|
+
}
|
|
1014
1066
|
declare function StandardListingFilter({ theme, heading, listingGroups, onClearFilters }: StandardListingFilterProps): ReactElement;
|
|
1015
1067
|
|
|
1016
1068
|
interface GeneralSearchFilterProps {
|