@royaloperahouse/harmonic 0.4.1-j → 0.5.0-a

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 (105) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +18 -2
  3. package/dist/components/Typography/Typography.d.ts +277 -6
  4. package/dist/components/atoms/Dropdown/Dropdown.d.ts +1 -1
  5. package/dist/components/atoms/Icons/SvgIcons/Arrows/ArrowPagination.svg.d.ts +4 -0
  6. package/dist/components/atoms/Icons/SvgIcons/Arrows/LastPageArrow.svg.d.ts +4 -0
  7. package/dist/components/atoms/Icons/SvgIcons/index.d.ts +2 -0
  8. package/dist/components/atoms/RotatorButtons/RotatorButtons.d.ts +1 -1
  9. package/dist/components/atoms/RotatorButtons/RotatorButtons.style.d.ts +1 -0
  10. package/dist/components/atoms/Search/Search.d.ts +1 -1
  11. package/dist/components/atoms/Search/Search.style.d.ts +1 -1
  12. package/dist/components/atoms/SectionSplitter/SectionSplitter.d.ts +1 -1
  13. package/dist/components/atoms/Tab/Tab.d.ts +1 -1
  14. package/dist/components/atoms/TextField/TextField.style.d.ts +1 -1
  15. package/dist/components/index.d.ts +3 -3
  16. package/dist/components/molecules/Accordion/Accordion.style.d.ts +8 -4
  17. package/dist/components/molecules/AnchorBar/AnchorBar.style.d.ts +5 -1
  18. package/dist/components/molecules/BodyContent/BodyContent.d.ts +9 -0
  19. package/dist/components/molecules/BodyContent/BodyContent.style.d.ts +1 -0
  20. package/dist/components/molecules/BodyContent/index.d.ts +2 -0
  21. package/dist/components/molecules/Card/Card.style.d.ts +1 -1
  22. package/dist/components/molecules/CastFilter/CastFilters.d.ts +4 -0
  23. package/dist/components/molecules/CastFilter/CastFilters.style.d.ts +16 -0
  24. package/dist/components/molecules/CastFilter/index.d.ts +2 -0
  25. package/dist/components/molecules/ContactCard/ContactCard.style.d.ts +5 -4
  26. package/dist/components/molecules/ContentSummary/ContentSummary.d.ts +1 -1
  27. package/dist/components/molecules/ContentSummary/ContentSummary.style.d.ts +1 -2
  28. package/dist/components/molecules/Editorial/Editorial.style.d.ts +2 -2
  29. package/dist/components/molecules/HotFilters/HotFilters.d.ts +4 -0
  30. package/dist/components/molecules/HotFilters/HotFilters.style.d.ts +3 -0
  31. package/dist/components/molecules/HotFilters/index.d.ts +2 -0
  32. package/dist/components/molecules/ImageWithCaption/ImageWithCaption.style.d.ts +1 -1
  33. package/dist/components/molecules/Information/Information.style.d.ts +3 -2
  34. package/dist/components/molecules/NavTop/NavTop.d.ts +1 -1
  35. package/dist/components/molecules/PageHeading/Highlight/Highlight.d.ts +4 -0
  36. package/dist/components/molecules/PageHeading/Highlight/Highlight.style.d.ts +9 -0
  37. package/dist/components/molecules/PageHeading/Highlight/index.d.ts +2 -0
  38. package/dist/components/molecules/PageHeading/HighlightCarousel/HighlightCarousel.d.ts +4 -0
  39. package/dist/components/molecules/PageHeading/HighlightCarousel/HighlightCarousel.style.d.ts +14 -0
  40. package/dist/components/molecules/PageHeading/HighlightCarousel/index.d.ts +2 -0
  41. package/dist/components/molecules/PageHeading/Promo/Promo.d.ts +1 -2
  42. package/dist/components/molecules/PageHeading/index.d.ts +3 -1
  43. package/dist/components/molecules/Pagination/Pagination.d.ts +11 -3
  44. package/dist/components/molecules/Pagination/Pagination.style.d.ts +6 -5
  45. package/dist/components/molecules/Pagination/components/NavButtonOrLink.d.ts +4 -0
  46. package/dist/components/molecules/Pagination/components/PageLinkOrButton.d.ts +4 -0
  47. package/dist/components/molecules/Pagination/components/index.d.ts +2 -0
  48. package/dist/components/molecules/Paywall/Paywall.d.ts +4 -0
  49. package/dist/components/molecules/Paywall/Paywall.styles.d.ts +288 -0
  50. package/dist/components/molecules/Paywall/index.d.ts +2 -0
  51. package/dist/components/molecules/PeopleListing/PeopleListing.d.ts +1 -1
  52. package/dist/components/molecules/PeopleListing/PeopleListing.style.d.ts +2 -2
  53. package/dist/components/molecules/PromoWithTags/PromoWithTags.style.d.ts +273 -6
  54. package/dist/components/molecules/PromoWithTitle/PromoWithTitle.style.d.ts +273 -3
  55. package/dist/components/molecules/Quote/Quote.style.d.ts +3 -4
  56. package/dist/components/molecules/SearchBar/SearchBar.d.ts +1 -1
  57. package/dist/components/molecules/SearchBar/SearchBar.style.d.ts +1 -1
  58. package/dist/components/molecules/SectionTitle/SectionTitle.d.ts +1 -1
  59. package/dist/components/molecules/SkipToMain/SkipToMain.d.ts +20 -0
  60. package/dist/components/molecules/SkipToMain/SkipToMain.style.d.ts +6 -0
  61. package/dist/components/molecules/SkipToMain/index.d.ts +2 -0
  62. package/dist/components/molecules/Table/Table.style.d.ts +1 -8
  63. package/dist/components/molecules/Table/components/DataCells.d.ts +7 -0
  64. package/dist/components/molecules/Table/components/HeaderCells.d.ts +7 -0
  65. package/dist/components/molecules/UpsellCard/UpsellCard.style.d.ts +279 -12
  66. package/dist/components/molecules/index.d.ts +5 -4
  67. package/dist/components/organisms/AnchorTabBar/AnchorTabBar.style.d.ts +8 -3
  68. package/dist/components/organisms/Carousels/Carousel/Carousel.style.d.ts +271 -0
  69. package/dist/components/organisms/Carousels/HighlightsCarousel/helper.d.ts +1 -1
  70. package/dist/components/organisms/Footer/Footer.style.d.ts +5 -5
  71. package/dist/components/organisms/Navigation/Navigation.d.ts +1 -1
  72. package/dist/components/organisms/Navigation/Navigation.style.d.ts +1 -1
  73. package/dist/components/organisms/StickyBar/StickyBar.style.d.ts +1 -1
  74. package/dist/components/organisms/UpsellSection/UpsellSection.style.d.ts +272 -1
  75. package/dist/harmonic.cjs.development.css +50 -24
  76. package/dist/harmonic.cjs.development.js +7386 -6745
  77. package/dist/harmonic.cjs.development.js.map +1 -1
  78. package/dist/harmonic.cjs.production.min.js +1 -1
  79. package/dist/harmonic.cjs.production.min.js.map +1 -1
  80. package/dist/harmonic.esm.js +5395 -4759
  81. package/dist/harmonic.esm.js.map +1 -1
  82. package/dist/helpers/accessibility.d.ts +1 -0
  83. package/dist/index.d.ts +6 -3
  84. package/dist/styles/HarmonicThemeProvider/HarmonicThemeProvider.d.ts +3 -0
  85. package/dist/styles/HarmonicThemeProvider/index.d.ts +2 -1
  86. package/dist/types/anchorBar.d.ts +5 -0
  87. package/dist/types/buttonTypes.d.ts +6 -0
  88. package/dist/types/contactCard.d.ts +8 -22
  89. package/dist/types/creditListing.d.ts +1 -1
  90. package/dist/types/editorial.d.ts +13 -23
  91. package/dist/types/image.d.ts +5 -9
  92. package/dist/types/impactHeader.d.ts +22 -2
  93. package/dist/types/information.d.ts +23 -43
  94. package/dist/types/navigation.d.ts +52 -61
  95. package/dist/types/pagination.d.ts +9 -0
  96. package/dist/types/promoWithTags.d.ts +9 -1
  97. package/dist/types/quote.d.ts +4 -15
  98. package/dist/types/tableTypes.d.ts +8 -25
  99. package/dist/types/types.d.ts +144 -74
  100. package/dist/types/typography.d.ts +9 -1
  101. package/dist/types/upsell.d.ts +22 -16
  102. package/package.json +3 -2
  103. package/dist/components/molecules/TextOnly/TextOnly.d.ts +0 -4
  104. package/dist/components/molecules/TextOnly/TextOnly.style.d.ts +0 -1
  105. package/dist/components/molecules/TextOnly/index.d.ts +0 -2
@@ -0,0 +1 @@
1
+ export declare function useFocusTrap(containerRef: React.RefObject<HTMLElement>, onEscape?: () => void, enabled?: boolean): void;
package/dist/index.d.ts CHANGED
@@ -1,11 +1,14 @@
1
- import { Accordion, Accordions, AnchorBar, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, BodyText, Card, Cards, Carousel, CinemaBadge, ContactCard, ContentSummary, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, Navigation, MinimalCarousel, Overline, PageHeading, PageHeadingCompact, PageHeadingImpact, PageHeadingPanel, PageHeadingPromo, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, SignUpForm, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, Tab, Table, TabLink, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls } from './components';
1
+ import { Accordion, Accordions, AnchorBar, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, BodyText, Card, Cards, Carousel, CinemaBadge, ContactCard, ContentSummary, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, HotFilters, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, Navigation, MinimalCarousel, Overline, PageHeading, PageHeadingCompact, PageHeadingImpact, PageHeadingPanel, PageHeadingHighlight, PageHeadingPromo, PageHeadingHighlightCarousel, Pagination, PasswordStrength, Paywall, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, SignUpForm, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, TertiaryButton, ThemeProvider, TitleWithCTA, Tab, Table, TabLink, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, VideoControls, VideoWithControls } from './components';
2
+ import BodyContent from './components/molecules/BodyContent';
3
+ import Quote from './components/molecules/Quote';
2
4
  import { devices, breakpoints } from './styles/viewports';
3
5
  import zIndexes from './styles/zIndexes';
4
6
  import { AspectRatio, ButtonType, CarouselType, Colors, IconNameType, IntegratedTimerProps, ITimerProps, TickboxMode, ThemeColor, ThemeType, EditorialLink, IInformationTitleProps, IInformationCTAProps } from './types';
5
7
  import { MiniCard } from './components/molecules';
6
8
  import { ModalWindow } from './components/organisms';
7
9
  import AuxiliaryButton from './components/atoms/Buttons/Auxiliary/AuxiliaryButton';
8
- import HarmonicThemeProvider from './styles/HarmonicThemeProvider';
10
+ import HarmonicThemeProvider, { useHarmonicTheme } from './styles/HarmonicThemeProvider';
9
11
  import { HarmonicSize } from './types/typography';
10
12
  import { HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText } from './components/Typography';
11
- export { Accordion, Accordions, AnchorBar, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, BodyText, breakpoints, ButtonType, Card, Cards, CarouselType, Carousel, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, devices, Editorial, EditorialLink, Footer, GlobalStyles, Grid, GridItem, HarmonicSize, HarmonicThemeProvider, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information, IInformationCTAProps, IInformationTitleProps, ITimerProps, IntegratedTimerProps, MinimalCarousel, MiniCard, ModalWindow, Navigation, Overline, PageHeading, PageHeadingCompact, PageHeadingImpact, PageHeadingPanel, PageHeadingPromo, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, SignUpForm, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, Tab, Table, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, TextOnly, ThemeColor, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, zIndexes, HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText, };
13
+ export { useHarmonicTheme };
14
+ export { Accordion, Accordions, AnchorBar, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, BodyContent, BodyText, breakpoints, ButtonType, Card, Cards, CarouselType, Carousel, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, devices, Editorial, EditorialLink, Footer, GlobalStyles, Grid, GridItem, HarmonicSize, HarmonicThemeProvider, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, HotFilters, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information, IInformationCTAProps, IInformationTitleProps, ITimerProps, IntegratedTimerProps, MinimalCarousel, MiniCard, ModalWindow, Navigation, Overline, PageHeading, PageHeadingCompact, PageHeadingImpact, PageHeadingPanel, PageHeadingHighlight, PageHeadingPromo, PageHeadingHighlightCarousel, Pagination, PasswordStrength, Paywall, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, SignUpForm, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, Tab, Table, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, ThemeColor, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, zIndexes, HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText, };
@@ -2,9 +2,12 @@ import React from 'react';
2
2
  import { ThemeType } from '../../types';
3
3
  import './theme/fonts.css';
4
4
  import './theme/typography.css';
5
+ export declare const DEFAULT_THEME = ThemeType.Core;
5
6
  interface HarmonicThemeProviderProps {
6
7
  theme: ThemeType;
7
8
  children: React.ReactNode;
8
9
  }
10
+ export declare const HarmonicThemeContext: React.Context<ThemeType>;
11
+ export declare const useHarmonicTheme: () => ThemeType;
9
12
  declare const HarmonicThemeProvider: React.FC<HarmonicThemeProviderProps>;
10
13
  export default HarmonicThemeProvider;
@@ -1,2 +1,3 @@
1
- import HarmonicThemeProvider from './HarmonicThemeProvider';
1
+ import HarmonicThemeProvider, { useHarmonicTheme } from './HarmonicThemeProvider';
2
2
  export default HarmonicThemeProvider;
3
+ export { useHarmonicTheme };
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { EditorialLink } from './editorial';
3
+ import { IGridItemProps } from './types';
3
4
  export interface IAnchorBarProps {
4
5
  /** CTA for anchor bar */
5
6
  cta: EditorialLink;
@@ -11,4 +12,8 @@ export interface IAnchorBarProps {
11
12
  onCloseHandler?: () => void;
12
13
  /** Custom CSS classes */
13
14
  className?: string;
15
+ /** Flag indicating whether the anchor bar should have a shadow */
16
+ withShadow?: boolean;
17
+ /** Optional grid item props to allow for different page alignments */
18
+ grid?: IGridItemProps;
14
19
  }
@@ -50,6 +50,12 @@ export declare type RotatorButtonsProps = {
50
50
  onClickPrev?: () => void;
51
51
  /** Next button click handler */
52
52
  onClickNext?: () => void;
53
+ /** Show fullscreen button */
54
+ showFullscreen?: boolean;
55
+ /** Fullscreen button click handler */
56
+ onClickFullscreen?: () => void;
57
+ /** Is in fullscreen mode */
58
+ isFullscreen?: boolean;
53
59
  /** Custom CSS classes */
54
60
  className?: string;
55
61
  };
@@ -1,9 +1,12 @@
1
- import { StyledProps } from 'styled-components';
2
1
  export interface IContactCardProps {
3
2
  /**
4
- * Name
3
+ * Title
5
4
  */
6
- name: string;
5
+ title: string;
6
+ /**
7
+ * Title suffix
8
+ */
9
+ titleSuffix?: string;
7
10
  /**
8
11
  * Description
9
12
  */
@@ -25,24 +28,7 @@ export interface IContactCardProps {
25
28
  */
26
29
  address?: string;
27
30
  /**
28
- * Set visibility of the top border
29
- */
30
- hideTopBorder?: boolean;
31
- /**
32
- * Set visibility of the top border
33
- */
34
- hideBottomBorder?: boolean;
35
- }
36
- export interface IContactCardWrapperProps extends StyledProps<{
37
- hideTopBorder: boolean;
38
- hideBottomBorder: boolean;
39
- }> {
40
- /**
41
- * Set visibility of the top border
42
- */
43
- hideTopBorder: boolean;
44
- /**
45
- * Set visibility of the bottom border
31
+ * The component's class name
46
32
  */
47
- hideBottomBorder: boolean;
33
+ className?: string;
48
34
  }
@@ -2,7 +2,7 @@ import { ListingPerson } from './types';
2
2
  export interface ICreditListing {
3
3
  roles: {
4
4
  name: string;
5
- people: ListingPerson[];
5
+ people: ListingPerson[] | ListingPerson[][];
6
6
  description: string;
7
7
  musicTitle: string[];
8
8
  replacement: string;
@@ -3,24 +3,18 @@ import { StyledProps } from 'styled-components';
3
3
  import { ButtonType } from './buttonTypes';
4
4
  import { DirectionType, IconNameType } from './iconTypes';
5
5
  import { IVideoWithControlsSettings, ThemeColor, ThemeType } from './types';
6
- import { HarmonicSize, HeaderHierarchy, TypographyLevel } from './typography';
6
+ import { HarmonicSize, HeaderHierarchy } from './typography';
7
7
  export interface IEditorialProps {
8
- /**
9
- * Text placed in the editorial component
10
- */
8
+ /** Text placed in the editorial component */
11
9
  text: string;
12
- /**
13
- * Subtitle placed in the editorial component
14
- */
10
+ /** Subtitle placed in the editorial component */
15
11
  subtitle?: string;
16
- /**
17
- * Position of the image in the editorial component
18
- */
12
+ /** Position of the image in the editorial component */
19
13
  imagePosition?: 'left' | 'right';
20
- /**
21
- * Image tag or component to be displayed in the editorial component with aspect ratio 1:1
22
- */
14
+ /** Image tag or component to be displayed in the editorial component with aspect ratio 1:1 */
23
15
  children: ReactElement<HTMLImageElement>;
16
+ /** Custom CSS classes */
17
+ className?: string;
24
18
  }
25
19
  export interface IEditorialGridProps {
26
20
  /**
@@ -156,14 +150,6 @@ export interface IThemePageHeadingProps {
156
150
  * Header Hierarchy for the title. Default is h1.
157
151
  */
158
152
  hierarchy: HeaderHierarchy;
159
- /**
160
- * Character limit for the text
161
- */
162
- copyCharLimit?: number;
163
- /**
164
- * Character limit for the title
165
- */
166
- titleCharLimit?: number;
167
153
  /**
168
154
  * Class name for theme styling
169
155
  */
@@ -263,9 +249,13 @@ export interface IContentSummaryProps {
263
249
  */
264
250
  fullyClickable?: boolean;
265
251
  /**
266
- * The base semantic header level for the component: 1 | 2 | 3 | 4 | 5 | 6
252
+ * The semantic header level for the component
253
+ */
254
+ headerSemanticLevel?: HeaderHierarchy;
255
+ /**
256
+ * The component's class name
267
257
  */
268
- baseSemanticLevel?: TypographyLevel;
258
+ className?: string;
269
259
  }
270
260
  export interface IPanelHeadingProps {
271
261
  /**
@@ -38,17 +38,13 @@ export interface IImageAspectRatioWrapperProps {
38
38
  alt?: string;
39
39
  }
40
40
  export interface IImageWithCaptionProps {
41
- /**
42
- * Aspect ratio of the contained image
43
- */
41
+ /** Aspect ratio of the contained image */
44
42
  aspectRatio?: AspectRatio;
45
- /**
46
- * Image caption or credit
47
- */
43
+ /** Image caption or credit */
48
44
  caption: string;
49
- /**
50
- * Image element
51
- */
45
+ /** Alternative text describing the image content for accessibility purposes. */
46
+ altText?: string;
47
+ /** Image element */
52
48
  children: ReactElement<HTMLImageElement>;
53
49
  }
54
50
  export interface IImageWithCaptionWrapperProps extends StyledProps<{
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { EditorialLink } from '../types';
1
+ import { ImgHTMLAttributes, ReactNode } from 'react';
2
+ import { EditorialLink, ThemeColor } from '../types';
3
3
  import { HeaderHierarchy, TypographyLevel } from './typography';
4
4
  export interface CustomSponsorImageData {
5
5
  /**
@@ -187,4 +187,24 @@ export interface IPageHeadingPromoProps {
187
187
  * Badge variant
188
188
  */
189
189
  badge?: PageHeadingPromoBadge;
190
+ /** Custom CSS classes */
191
+ className?: string;
192
+ }
193
+ export interface IPageHeadingHighlightProps {
194
+ /**
195
+ * Image to display in the right hand panel, aspect ratio 4:3
196
+ */
197
+ image: ImgHTMLAttributes<HTMLImageElement>;
198
+ /**
199
+ * Optional change to background color
200
+ */
201
+ background?: ThemeColor;
202
+ /**
203
+ * The component(s) to be wrapped in the page header
204
+ */
205
+ children: ReactNode;
206
+ /**
207
+ * Custom CSS classes
208
+ */
209
+ className?: string;
190
210
  }
@@ -1,6 +1,5 @@
1
1
  import { DirectionType, IconNameType } from './iconTypes';
2
- import { LinkTarget } from './types';
3
- import type { ThemeChildProps } from './types';
2
+ import { LinkTarget, ThemeType } from './types';
4
3
  import type { HarmonicSize } from './typography';
5
4
  export declare const InformationCtaVariants: {
6
5
  readonly Primary: "Primary";
@@ -9,60 +8,41 @@ export declare const InformationCtaVariants: {
9
8
  readonly TextLink: "TextLink";
10
9
  };
11
10
  export declare type InformationCtaVariant = keyof typeof InformationCtaVariants;
12
- declare type ThemeProps = Pick<ThemeChildProps, 'theme'>;
13
- export interface IInformationCTAProps extends ThemeProps {
14
- /**
15
- * Text to display on the CTA
16
- */
11
+ export interface IInformationCTAProps {
12
+ /** Text to display on the CTA */
17
13
  text: string;
18
- /**
19
- * Link for the CTA
20
- */
14
+ /** Link for the CTA */
21
15
  link: string;
22
- /**
23
- * Style of the CTA
24
- */
16
+ /** Style of the CTA */
25
17
  variant?: InformationCtaVariant;
26
- /**
27
- * Name of the icon to be used in the button
28
- */
18
+ /** Name of the icon to be used in the button */
29
19
  iconName?: IconNameType;
30
- /**
31
- * Direction of the icon used in the button
32
- */
20
+ /** Direction of the icon used in the button */
33
21
  iconDirection?: DirectionType;
34
- /**
35
- * Attribute to specify where to open the link
36
- */
22
+ /** Attribute to specify where to open the link */
37
23
  target?: LinkTarget;
24
+ /** Custom CSS classes */
25
+ className?: string;
38
26
  }
39
- export declare type InformationCTAWrapperProps = Pick<IInformationCTAProps, 'variant' | 'theme'>;
27
+ export declare type InformationCTAWrapperProps = {
28
+ /** Style of the CTA */
29
+ variant: InformationCtaVariant;
30
+ /** Theme options */
31
+ theme?: ThemeType;
32
+ };
40
33
  export interface IInformationTitleProps {
41
- /**
42
- * Title text to display
43
- */
34
+ /** Title text to display */
44
35
  text: string;
45
- /**
46
- * The size of the title text
47
- */
36
+ /** The size of the title text */
48
37
  textSize: HarmonicSize;
49
38
  }
50
- export interface IInformationProps extends ThemeProps {
51
- /**
52
- * Main body text to display in the Information Component
53
- */
39
+ export interface IInformationProps {
40
+ /** Main body text to display in the Information Component */
54
41
  body: string;
55
- /**
56
- * Optional CTA to display underneath the body text
57
- */
42
+ /** Optional CTA to display underneath the body text */
58
43
  cta?: IInformationCTAProps;
59
- /**
60
- * Title options for the component
61
- */
44
+ /** Title options for the component */
62
45
  title?: IInformationTitleProps;
63
- /**
64
- * Additional CSS class names to apply to component.
65
- */
46
+ /** Custom CSS classes */
66
47
  className?: string;
67
48
  }
68
- export {};
@@ -1,4 +1,4 @@
1
- import React, { AnchorHTMLAttributes, MouseEvent, MouseEventHandler, ReactNode } from 'react';
1
+ import React, { AnchorHTMLAttributes, MouseEventHandler, ReactNode } from 'react';
2
2
  import { DirectionType, IconNameType } from './iconTypes';
3
3
  import { Colors, IOptionItem, ThemeColor } from './types';
4
4
  export interface IAccountProps {
@@ -79,6 +79,10 @@ export interface ISearchProps {
79
79
  * Additional CSS class names to apply to the navigation component.
80
80
  */
81
81
  className?: string;
82
+ /**
83
+ * Reference to the search icon element for focusing
84
+ */
85
+ ref?: React.Ref<HTMLButtonElement>;
82
86
  }
83
87
  export interface INavigationWrapperProps {
84
88
  /**
@@ -145,6 +149,10 @@ export interface INavTopProps {
145
149
  * Additional CSS class names to apply to the navigation component.
146
150
  */
147
151
  className?: string;
152
+ /**
153
+ * Search button ref for focus management
154
+ */
155
+ searchButtonRef?: React.Ref<HTMLButtonElement>;
148
156
  }
149
157
  export interface IMenuOptionProps {
150
158
  /**
@@ -195,6 +203,10 @@ export interface INavigationProps {
195
203
  * Additional CSS class names to apply to the navigation component.
196
204
  */
197
205
  className?: string;
206
+ /**
207
+ * Defines which tag the button should skip to. Default: 'main-content'.
208
+ */
209
+ skipToId?: string;
198
210
  }
199
211
  export interface ISearchBarProps {
200
212
  /**
@@ -205,6 +217,15 @@ export interface ISearchBarProps {
205
217
  * Function to be called when is closed
206
218
  */
207
219
  onClose?: (e?: React.MouseEvent) => void;
220
+ /**
221
+ * If true, traps keyboard focus inside the search bar.
222
+ * Set to false when used inline on a page.
223
+ */
224
+ trapFocus?: boolean;
225
+ /**
226
+ * Reference to the input element for focusing
227
+ */
228
+ inputRef?: React.RefObject<HTMLInputElement>;
208
229
  /**
209
230
  * Additional CSS class names to apply to the navigation component.
210
231
  */
@@ -258,26 +279,20 @@ export interface IAnchorBarAbsolutePositionParams {
258
279
  topOffset: number;
259
280
  }
260
281
  export interface IAnchorBarProps {
261
- /**
262
- * Tabs displayed in the anchor bar
263
- */
282
+ /** Tabs displayed in the anchor bar */
264
283
  tabs: AnchorBarTab[];
265
- /**
266
- * Function to be called when a tab is clicked
267
- */
268
- onTabClick?: (e: MouseEvent, id: string) => void;
269
- /**
270
- * Set the id of the tab actived
271
- */
284
+ /** Function to be called when a tab is clicked */
285
+ onTabClick?: (e: React.MouseEvent<HTMLAnchorElement>, id: string) => void;
286
+ /** Set the id of the active tab */
272
287
  activeTab?: string;
273
- /**
274
- * Only for IOS devices that do not fully support sticky position, in case a keyboard is opened on the device
275
- */
288
+ /** Only for IOS devices that do not fully support sticky position, in case a keyboard is opened on the device */
276
289
  absolutePositionParams?: IAnchorBarAbsolutePositionParams;
277
- /**
278
- * Boolean to set bottom border
279
- */
290
+ /** Boolean to set bottom border */
280
291
  bottomBorder?: boolean;
292
+ /** Flag indicating whether the bar should have a shadow */
293
+ withShadow?: boolean;
294
+ /** Custom CSS classes */
295
+ className?: string;
281
296
  }
282
297
  export interface ITitleCTAProps {
283
298
  /**
@@ -314,64 +329,40 @@ export interface IAnchorTabsListProps {
314
329
  hasTwoArrows: boolean;
315
330
  }
316
331
  export interface IAnchorTabBarBorderProps {
317
- /**
318
- * Boolean to set bottom border
319
- */
320
- bottomBorder: boolean;
321
- }
322
- export interface IAnchorTabArrowsBoxProps {
323
- /**
324
- * Boolean to determine width of the arrows container
325
- */
326
- fullWidth: boolean;
332
+ /** Boolean to set bottom border */
333
+ bottomBorder?: boolean;
334
+ /** Flag indicating whether the anchor bar should have a shadow */
335
+ withShadow?: boolean;
327
336
  }
328
337
  export interface ITabLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
329
338
  children: ReactNode;
330
- /**
331
- * Function to be called when a button is clicked
332
- */
339
+ /** Function to be called when a button is clicked */
333
340
  onClick?: MouseEventHandler<HTMLAnchorElement>;
334
- /**
335
- * Name of the icon to be used in the button
336
- */
341
+ /** Name of the icon to be used in the button */
337
342
  iconName?: IconNameType;
338
- /**
339
- * Direction of the icon used in the button
340
- */
343
+ /** Direction of the icon used in the button */
341
344
  iconDirection?: DirectionType;
342
- /**
343
- * Color of text and icon
344
- */
345
+ /** Color of text and icon */
345
346
  color?: ThemeColor;
346
- /**
347
- * Color of text and icon on hover
348
- */
347
+ /** Color of text and icon on hover */
349
348
  hoverColor?: ThemeColor;
350
- /**
351
- * Set if tab is selected or not
352
- */
349
+ /** Set if tab is selected or not */
353
350
  selected?: boolean;
351
+ /** Custom CSS classes */
352
+ className?: string;
354
353
  }
355
354
  export interface IStickyBarProps {
356
355
  children: ReactNode;
357
- /**
358
- * Set columnstart in Desktop
359
- */
356
+ /** Set columnStart in Desktop */
360
357
  columnStartDesktop?: number;
361
- /**
362
- * Set columnSpan in Desktop
363
- */
358
+ /** Set columnSpan in Desktop */
364
359
  columnSpanDesktop?: number;
365
- /**
366
- * Set columnstart in Device
367
- */
360
+ /** Set columnStart in Device */
368
361
  columnStartDevice?: number;
369
- /**
370
- * Set columnSpam in Device
371
- */
362
+ /** Set columnSpan in Device */
372
363
  columnSpanDevice?: number;
373
- /**
374
- * Hide bottom border line
375
- */
376
- hideBottomBorder?: boolean;
364
+ /** Boolean to set bottom border */
365
+ bottomBorder?: boolean;
366
+ /** Custom CSS classes */
367
+ className?: string;
377
368
  }
@@ -0,0 +1,9 @@
1
+ export declare type PaginationNavProps = {
2
+ page: number;
3
+ children: React.ReactNode;
4
+ onPageChange?: (page: number) => void;
5
+ baseUrl?: string;
6
+ keyProp?: string;
7
+ testId?: string;
8
+ ariaLabel?: string;
9
+ };
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { EditorialLink, PromoLinks } from './editorial';
2
+ import { EditorialLink, PromoLinks, PromoTitleHierarchy } from './editorial';
3
3
  import { IntegratedTimerProps } from './timer';
4
4
  import { Image } from './types';
5
5
  export interface IPromoWithTagsProps {
@@ -15,6 +15,10 @@ export interface IPromoWithTagsProps {
15
15
  * Title size
16
16
  */
17
17
  titleSize?: 'small' | 'large';
18
+ /**
19
+ * Semantic level of the promo title header - h2 or h3.
20
+ */
21
+ titleHierarchy: PromoTitleHierarchy;
18
22
  /**
19
23
  * Subtitle placed in the editorial component
20
24
  */
@@ -82,4 +86,8 @@ export interface IPromoWithTagsStyledProps {
82
86
  * Sets margin for the tags container
83
87
  */
84
88
  marginBottom?: number;
89
+ /**
90
+ * Sets mobile margin for the tags container
91
+ */
92
+ mobileMarginBottom?: number;
85
93
  }
@@ -1,19 +1,8 @@
1
- import { StyledProps } from 'styled-components';
2
1
  export interface IQuoteProps {
3
- /**
4
- * Text placed in the Quote component
5
- */
2
+ /** Text placed in the Quote component */
6
3
  text: string;
7
- /**
8
- * Attribution under the main text
9
- */
4
+ /** Attribution under the main text */
10
5
  attribution?: string;
11
- }
12
- export interface IQuoteAttributionBlockProps extends StyledProps<{
13
- displayAttribution: boolean;
14
- }> {
15
- /**
16
- * Set visibility of the attribution block
17
- */
18
- displayAttribution: boolean;
6
+ /** Custom CSS classes */
7
+ className?: string;
19
8
  }
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from 'react';
2
- import { Colors } from './types';
3
2
  export interface ContentProps {
4
3
  content: string | ReactNode;
5
4
  }
@@ -7,42 +6,26 @@ export interface CellProps {
7
6
  cell: ReactNode;
8
7
  cellIndex: number;
9
8
  columns: number;
10
- lineColor: Colors;
11
9
  }
12
10
  export declare type TableRowData = Array<Record<string, unknown>>;
13
11
  export interface RowProps {
14
12
  row: TableRowData;
15
13
  rowIndex: number;
16
14
  columns: number;
17
- lineColor: Colors;
18
15
  }
19
16
  export interface ITableProps {
20
- /**
21
- * Number of columns in table
22
- */
17
+ /** Number of columns in table */
23
18
  columns: number;
24
- /**
25
- * Headings array
26
- */
19
+ /** Headings array */
27
20
  headings?: string[];
28
- /**
29
- * Table content
30
- */
21
+ /** Table content */
31
22
  children: ReactNode;
32
- /**
33
- * Line divider color
34
- */
35
- lineColors?: Colors;
36
- /**
37
- * Rows in table per page for pagination
38
- */
23
+ /** Rows in table per page for pagination */
39
24
  rowsPerPage: number;
40
- /**
41
- * Pagination
42
- */
25
+ /** Enable pagination */
43
26
  pagination?: boolean;
44
- /**
45
- * Description - for Accessibility, aria-describedby prop
46
- */
27
+ /** Description for accessibility (aria-describedby) */
47
28
  description?: string;
29
+ /** Custom CSS classes */
30
+ className?: string;
48
31
  }