@royaloperahouse/harmonic 0.12.0-c → 0.12.1

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 (60) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.GIT +278 -0
  3. package/README.md +43 -252
  4. package/dist/components/Typography/Typography.d.ts +5 -5
  5. package/dist/components/atoms/Buttons/Secondary/utils.d.ts +4 -4
  6. package/dist/components/atoms/Dropdown/Dropdown.d.ts +1 -1
  7. package/dist/components/atoms/RotatorButtons/RotatorButtons.d.ts +1 -1
  8. package/dist/components/atoms/RotatorButtons/RotatorButtons.style.d.ts +0 -1
  9. package/dist/components/atoms/SectionSplitter/SectionSplitter.d.ts +1 -1
  10. package/dist/components/atoms/Tab/Tab.d.ts +1 -1
  11. package/dist/components/atoms/TextField/TextField.style.d.ts +1 -1
  12. package/dist/components/index.d.ts +2 -2
  13. package/dist/components/molecules/Accordion/Accordion.style.d.ts +3 -5
  14. package/dist/components/molecules/Card/Card.style.d.ts +1 -1
  15. package/dist/components/molecules/ContactCard/ContactCard.style.d.ts +4 -5
  16. package/dist/components/molecules/ContentSummary/ContentSummary.style.d.ts +1 -1
  17. package/dist/components/molecules/Editorial/Editorial.style.d.ts +2 -2
  18. package/dist/components/molecules/ImageWithCaption/ImageWithCaption.style.d.ts +1 -1
  19. package/dist/components/molecules/Information/Information.style.d.ts +2 -3
  20. package/dist/components/molecules/PageHeading/Promo/Promo.d.ts +2 -1
  21. package/dist/components/molecules/PageHeading/index.d.ts +1 -2
  22. package/dist/components/molecules/Pagination/Pagination.style.d.ts +1 -1
  23. package/dist/components/molecules/PromoWithTags/PromoWithTags.style.d.ts +6 -3
  24. package/dist/components/molecules/PromoWithTitle/PromoWithTitle.style.d.ts +2 -2
  25. package/dist/components/molecules/SectionTitle/SectionTitle.d.ts +1 -1
  26. package/dist/components/molecules/TextOnly/TextOnly.d.ts +4 -0
  27. package/dist/components/molecules/TextOnly/index.d.ts +2 -0
  28. package/dist/components/molecules/index.d.ts +3 -2
  29. package/dist/components/organisms/AnchorTabBar/AnchorTabBar.style.d.ts +3 -8
  30. package/dist/components/organisms/Carousels/Carousel/Carousel.style.d.ts +0 -1
  31. package/dist/components/organisms/StickyBar/StickyBar.style.d.ts +1 -1
  32. package/dist/harmonic.cjs.development.css +16 -345
  33. package/dist/harmonic.cjs.development.js +888 -885
  34. package/dist/harmonic.cjs.development.js.map +1 -1
  35. package/dist/harmonic.cjs.production.min.js +1 -1
  36. package/dist/harmonic.cjs.production.min.js.map +1 -1
  37. package/dist/harmonic.esm.js +901 -899
  38. package/dist/harmonic.esm.js.map +1 -1
  39. package/dist/index.d.ts +3 -5
  40. package/dist/styles/HarmonicThemeProvider/HarmonicThemeProvider.d.ts +0 -4
  41. package/dist/styles/HarmonicThemeProvider/index.d.ts +1 -2
  42. package/dist/types/buttonTypes.d.ts +2 -6
  43. package/dist/types/contactCard.d.ts +22 -8
  44. package/dist/types/editorial.d.ts +12 -6
  45. package/dist/types/impactHeader.d.ts +2 -22
  46. package/dist/types/information.d.ts +43 -23
  47. package/dist/types/navigation.d.ts +61 -31
  48. package/dist/types/promoWithTags.d.ts +1 -9
  49. package/dist/types/types.d.ts +72 -91
  50. package/dist/types/typography.d.ts +0 -4
  51. package/package.json +1 -1
  52. package/dist/components/molecules/BodyContent/BodyContent.d.ts +0 -4
  53. package/dist/components/molecules/BodyContent/index.d.ts +0 -2
  54. package/dist/components/molecules/CastFilter/CastFilters.d.ts +0 -4
  55. package/dist/components/molecules/CastFilter/CastFilters.style.d.ts +0 -14
  56. package/dist/components/molecules/CastFilter/index.d.ts +0 -2
  57. package/dist/components/molecules/PageHeading/Highlight/Highlight.d.ts +0 -4
  58. package/dist/components/molecules/PageHeading/Highlight/Highlight.style.d.ts +0 -9
  59. package/dist/components/molecules/PageHeading/Highlight/index.d.ts +0 -2
  60. /package/dist/components/molecules/{BodyContent/BodyContent.style.d.ts → TextOnly/TextOnly.style.d.ts} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,13 +1,11 @@
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, 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, ThemeProvider, TitleWithCTA, Tab, Table, TabLink, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls } from './components';
2
- import BodyContent from './components/molecules/BodyContent';
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, 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';
3
2
  import { devices, breakpoints } from './styles/viewports';
4
3
  import zIndexes from './styles/zIndexes';
5
4
  import { AspectRatio, ButtonType, CarouselType, Colors, IconNameType, IntegratedTimerProps, ITimerProps, TickboxMode, ThemeColor, ThemeType, EditorialLink, IInformationTitleProps, IInformationCTAProps } from './types';
6
5
  import { MiniCard } from './components/molecules';
7
6
  import { ModalWindow } from './components/organisms';
8
7
  import AuxiliaryButton from './components/atoms/Buttons/Auxiliary/AuxiliaryButton';
9
- import HarmonicThemeProvider, { useHarmonicTheme } from './styles/HarmonicThemeProvider';
8
+ import HarmonicThemeProvider from './styles/HarmonicThemeProvider';
10
9
  import { HarmonicSize } from './types/typography';
11
10
  import { HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText } from './components/Typography';
12
- export { useHarmonicTheme };
13
- 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, 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, ThemeColor, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, zIndexes, HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText, };
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, HotFilters, 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, };
@@ -1,13 +1,9 @@
1
1
  import React from 'react';
2
2
  import { ThemeType } from '../../types';
3
3
  import './theme/fonts.css';
4
- import './theme/typography.css';
5
- export declare const DEFAULT_THEME = ThemeType.Core;
6
4
  interface HarmonicThemeProviderProps {
7
5
  theme: ThemeType;
8
6
  children: React.ReactNode;
9
7
  }
10
- export declare const HarmonicThemeContext: React.Context<ThemeType>;
11
- export declare const useHarmonicTheme: () => ThemeType;
12
8
  declare const HarmonicThemeProvider: React.FC<HarmonicThemeProviderProps>;
13
9
  export default HarmonicThemeProvider;
@@ -1,3 +1,2 @@
1
- import HarmonicThemeProvider, { useHarmonicTheme } from './HarmonicThemeProvider';
1
+ import HarmonicThemeProvider from './HarmonicThemeProvider';
2
2
  export default HarmonicThemeProvider;
3
- export { useHarmonicTheme };
@@ -13,6 +13,8 @@ declare type BaseProps = {
13
13
  onClick?: MouseEventHandler<HTMLAnchorElement>;
14
14
  /** Custom CSS classes */
15
15
  className?: string;
16
+ /** Styled Components theme */
17
+ theme?: unknown;
16
18
  };
17
19
  declare type IconProps = {
18
20
  /** Icon identifier */
@@ -50,12 +52,6 @@ export declare type RotatorButtonsProps = {
50
52
  onClickPrev?: () => void;
51
53
  /** Next button click handler */
52
54
  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;
59
55
  /** Custom CSS classes */
60
56
  className?: string;
61
57
  };
@@ -1,12 +1,9 @@
1
+ import { StyledProps } from 'styled-components';
1
2
  export interface IContactCardProps {
2
3
  /**
3
- * Title
4
+ * Name
4
5
  */
5
- title: string;
6
- /**
7
- * Title suffix
8
- */
9
- titleSuffix?: string;
6
+ name: string;
10
7
  /**
11
8
  * Description
12
9
  */
@@ -28,7 +25,24 @@ export interface IContactCardProps {
28
25
  */
29
26
  address?: string;
30
27
  /**
31
- * The component's class name
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
32
46
  */
33
- className?: string;
47
+ hideBottomBorder: boolean;
34
48
  }
@@ -5,16 +5,22 @@ import { DirectionType, IconNameType } from './iconTypes';
5
5
  import { IVideoWithControlsSettings, ThemeColor, ThemeType } from './types';
6
6
  import { HarmonicSize, HeaderHierarchy } from './typography';
7
7
  export interface IEditorialProps {
8
- /** Text placed in the editorial component */
8
+ /**
9
+ * Text placed in the editorial component
10
+ */
9
11
  text: string;
10
- /** Subtitle placed in the editorial component */
12
+ /**
13
+ * Subtitle placed in the editorial component
14
+ */
11
15
  subtitle?: string;
12
- /** Position of the image in the editorial component */
16
+ /**
17
+ * Position of the image in the editorial component
18
+ */
13
19
  imagePosition?: 'left' | 'right';
14
- /** Image tag or component to be displayed in the editorial component with aspect ratio 1:1 */
20
+ /**
21
+ * Image tag or component to be displayed in the editorial component with aspect ratio 1:1
22
+ */
15
23
  children: ReactElement<HTMLImageElement>;
16
- /** Custom CSS classes */
17
- className?: string;
18
24
  }
19
25
  export interface IEditorialGridProps {
20
26
  /**
@@ -1,5 +1,5 @@
1
- import { ImgHTMLAttributes, ReactNode } from 'react';
2
- import { EditorialLink, ThemeColor } from '../types';
1
+ import { ReactNode } from 'react';
2
+ import { EditorialLink } from '../types';
3
3
  import { HeaderHierarchy, TypographyLevel } from './typography';
4
4
  export interface CustomSponsorImageData {
5
5
  /**
@@ -187,24 +187,4 @@ 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;
210
190
  }
@@ -1,5 +1,6 @@
1
1
  import { DirectionType, IconNameType } from './iconTypes';
2
- import { LinkTarget, ThemeType } from './types';
2
+ import { LinkTarget } from './types';
3
+ import type { ThemeChildProps } from './types';
3
4
  import type { HarmonicSize } from './typography';
4
5
  export declare const InformationCtaVariants: {
5
6
  readonly Primary: "Primary";
@@ -8,41 +9,60 @@ export declare const InformationCtaVariants: {
8
9
  readonly TextLink: "TextLink";
9
10
  };
10
11
  export declare type InformationCtaVariant = keyof typeof InformationCtaVariants;
11
- export interface IInformationCTAProps {
12
- /** Text to display on the CTA */
12
+ declare type ThemeProps = Pick<ThemeChildProps, 'theme'>;
13
+ export interface IInformationCTAProps extends ThemeProps {
14
+ /**
15
+ * Text to display on the CTA
16
+ */
13
17
  text: string;
14
- /** Link for the CTA */
18
+ /**
19
+ * Link for the CTA
20
+ */
15
21
  link: string;
16
- /** Style of the CTA */
22
+ /**
23
+ * Style of the CTA
24
+ */
17
25
  variant?: InformationCtaVariant;
18
- /** Name of the icon to be used in the button */
26
+ /**
27
+ * Name of the icon to be used in the button
28
+ */
19
29
  iconName?: IconNameType;
20
- /** Direction of the icon used in the button */
30
+ /**
31
+ * Direction of the icon used in the button
32
+ */
21
33
  iconDirection?: DirectionType;
22
- /** Attribute to specify where to open the link */
34
+ /**
35
+ * Attribute to specify where to open the link
36
+ */
23
37
  target?: LinkTarget;
24
- /** Custom CSS classes */
25
- className?: string;
26
38
  }
27
- export declare type InformationCTAWrapperProps = {
28
- /** Style of the CTA */
29
- variant: InformationCtaVariant;
30
- /** Theme options */
31
- theme?: ThemeType;
32
- };
39
+ export declare type InformationCTAWrapperProps = Pick<IInformationCTAProps, 'variant' | 'theme'>;
33
40
  export interface IInformationTitleProps {
34
- /** Title text to display */
41
+ /**
42
+ * Title text to display
43
+ */
35
44
  text: string;
36
- /** The size of the title text */
45
+ /**
46
+ * The size of the title text
47
+ */
37
48
  textSize: HarmonicSize;
38
49
  }
39
- export interface IInformationProps {
40
- /** Main body text to display in the Information Component */
50
+ export interface IInformationProps extends ThemeProps {
51
+ /**
52
+ * Main body text to display in the Information Component
53
+ */
41
54
  body: string;
42
- /** Optional CTA to display underneath the body text */
55
+ /**
56
+ * Optional CTA to display underneath the body text
57
+ */
43
58
  cta?: IInformationCTAProps;
44
- /** Title options for the component */
59
+ /**
60
+ * Title options for the component
61
+ */
45
62
  title?: IInformationTitleProps;
46
- /** Custom CSS classes */
63
+ /**
64
+ * Additional CSS class names to apply to component.
65
+ */
47
66
  className?: string;
48
67
  }
68
+ export {};
@@ -1,4 +1,4 @@
1
- import React, { AnchorHTMLAttributes, MouseEventHandler, ReactNode } from 'react';
1
+ import React, { AnchorHTMLAttributes, MouseEvent, MouseEventHandler, ReactNode } from 'react';
2
2
  import { DirectionType, IconNameType } from './iconTypes';
3
3
  import { Colors, IOptionItem, ThemeColor } from './types';
4
4
  export interface IAccountProps {
@@ -275,20 +275,26 @@ export interface IAnchorBarAbsolutePositionParams {
275
275
  topOffset: number;
276
276
  }
277
277
  export interface IAnchorBarProps {
278
- /** Tabs displayed in the anchor bar */
278
+ /**
279
+ * Tabs displayed in the anchor bar
280
+ */
279
281
  tabs: AnchorBarTab[];
280
- /** Function to be called when a tab is clicked */
281
- onTabClick?: (e: React.MouseEvent<HTMLAnchorElement>, id: string) => void;
282
- /** Set the id of the active tab */
282
+ /**
283
+ * Function to be called when a tab is clicked
284
+ */
285
+ onTabClick?: (e: MouseEvent, id: string) => void;
286
+ /**
287
+ * Set the id of the tab actived
288
+ */
283
289
  activeTab?: string;
284
- /** Only for IOS devices that do not fully support sticky position, in case a keyboard is opened on the device */
290
+ /**
291
+ * Only for IOS devices that do not fully support sticky position, in case a keyboard is opened on the device
292
+ */
285
293
  absolutePositionParams?: IAnchorBarAbsolutePositionParams;
286
- /** Boolean to set bottom border */
294
+ /**
295
+ * Boolean to set bottom border
296
+ */
287
297
  bottomBorder?: boolean;
288
- /** Flag indicating whether the bar should have a shadow */
289
- withShadow?: boolean;
290
- /** Custom CSS classes */
291
- className?: string;
292
298
  }
293
299
  export interface ITitleCTAProps {
294
300
  /**
@@ -325,40 +331,64 @@ export interface IAnchorTabsListProps {
325
331
  hasTwoArrows: boolean;
326
332
  }
327
333
  export interface IAnchorTabBarBorderProps {
328
- /** Boolean to set bottom border */
329
- bottomBorder?: boolean;
330
- /** Flag indicating whether the anchor bar should have a shadow */
331
- withShadow?: boolean;
334
+ /**
335
+ * Boolean to set bottom border
336
+ */
337
+ bottomBorder: boolean;
338
+ }
339
+ export interface IAnchorTabArrowsBoxProps {
340
+ /**
341
+ * Boolean to determine width of the arrows container
342
+ */
343
+ fullWidth: boolean;
332
344
  }
333
345
  export interface ITabLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
334
346
  children: ReactNode;
335
- /** Function to be called when a button is clicked */
347
+ /**
348
+ * Function to be called when a button is clicked
349
+ */
336
350
  onClick?: MouseEventHandler<HTMLAnchorElement>;
337
- /** Name of the icon to be used in the button */
351
+ /**
352
+ * Name of the icon to be used in the button
353
+ */
338
354
  iconName?: IconNameType;
339
- /** Direction of the icon used in the button */
355
+ /**
356
+ * Direction of the icon used in the button
357
+ */
340
358
  iconDirection?: DirectionType;
341
- /** Color of text and icon */
359
+ /**
360
+ * Color of text and icon
361
+ */
342
362
  color?: ThemeColor;
343
- /** Color of text and icon on hover */
363
+ /**
364
+ * Color of text and icon on hover
365
+ */
344
366
  hoverColor?: ThemeColor;
345
- /** Set if tab is selected or not */
367
+ /**
368
+ * Set if tab is selected or not
369
+ */
346
370
  selected?: boolean;
347
- /** Custom CSS classes */
348
- className?: string;
349
371
  }
350
372
  export interface IStickyBarProps {
351
373
  children: ReactNode;
352
- /** Set columnStart in Desktop */
374
+ /**
375
+ * Set columnstart in Desktop
376
+ */
353
377
  columnStartDesktop?: number;
354
- /** Set columnSpan in Desktop */
378
+ /**
379
+ * Set columnSpan in Desktop
380
+ */
355
381
  columnSpanDesktop?: number;
356
- /** Set columnStart in Device */
382
+ /**
383
+ * Set columnstart in Device
384
+ */
357
385
  columnStartDevice?: number;
358
- /** Set columnSpan in Device */
386
+ /**
387
+ * Set columnSpam in Device
388
+ */
359
389
  columnSpanDevice?: number;
360
- /** Boolean to set bottom border */
361
- bottomBorder?: boolean;
362
- /** Custom CSS classes */
363
- className?: string;
390
+ /**
391
+ * Hide bottom border line
392
+ */
393
+ hideBottomBorder?: boolean;
364
394
  }
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { EditorialLink, PromoLinks, PromoTitleHierarchy } from './editorial';
2
+ import { EditorialLink, PromoLinks } from './editorial';
3
3
  import { IntegratedTimerProps } from './timer';
4
4
  import { Image } from './types';
5
5
  export interface IPromoWithTagsProps {
@@ -15,10 +15,6 @@ 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;
22
18
  /**
23
19
  * Subtitle placed in the editorial component
24
20
  */
@@ -86,8 +82,4 @@ export interface IPromoWithTagsStyledProps {
86
82
  * Sets margin for the tags container
87
83
  */
88
84
  marginBottom?: number;
89
- /**
90
- * Sets mobile margin for the tags container
91
- */
92
- mobileMarginBottom?: number;
93
85
  }
@@ -1,6 +1,7 @@
1
1
  import { ReactNode, AnchorHTMLAttributes, MouseEventHandler, ReactElement } from 'react';
2
2
  import { StyledProps } from 'styled-components';
3
3
  import { IconNameType, DirectionType } from './iconTypes';
4
+ import { TypographyLevel, TypographyType } from './typography';
4
5
  import type { ExternalLink } from './links';
5
6
  export declare enum Colors {
6
7
  White = "white",
@@ -52,8 +53,14 @@ export declare enum ThemeType {
52
53
  Cinema = "cinema",
53
54
  Schools = "schools"
54
55
  }
56
+ export declare type ThemeChildProps = {
57
+ className?: string;
58
+ theme?: ThemeType;
59
+ };
55
60
  export interface IThemeProviderProps {
56
- /** The theme to use for the child elements */
61
+ /**
62
+ * The theme to use for the child elements
63
+ */
57
64
  theme: ThemeType;
58
65
  children: ReactNode;
59
66
  }
@@ -147,10 +154,6 @@ export interface ITabProps {
147
154
  * Additional CSS class names to apply to the navigation component.
148
155
  */
149
156
  className?: string;
150
- /**
151
- * The unique ID to assign to the link element.
152
- */
153
- tabLinkId?: string;
154
157
  /**
155
158
  * Defines the ARIA role of the element for accessibility purposes.
156
159
  */
@@ -218,11 +221,7 @@ export interface IDropdownProps {
218
221
  */
219
222
  ariaLabel?: string;
220
223
  /**
221
- * The unique ID to assign to the link element inside the tab.
222
- */
223
- tabLinkId?: string;
224
- /**
225
- * Defines if it is needed to trim the text of the Tab and add 3 dots in the end
224
+ * Defines if it is needed to trim the text of the Tab and add 3 dots in the end
226
225
  */
227
226
  trimTabText?: boolean;
228
227
  }
@@ -425,62 +424,6 @@ export declare type IHotFilterProps = {
425
424
  selectedIndex?: number;
426
425
  onSelect?: (index: number) => void;
427
426
  };
428
- export declare type ICastFilterItem = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'aria-label' | 'role'> & {
429
- /**
430
- * Name of the cast member shown below the image circle. Required.
431
- */
432
- name: string;
433
- /**
434
- * Image source for the image to be shown. Optional but if not included an unaesthetic placeholder will show.
435
- */
436
- image?: string;
437
- onClick?: () => void;
438
- };
439
- export declare type ICastFiltersProps = {
440
- /**
441
- * Array of cast to filter by.
442
- */
443
- cast: ICastFilterItem[];
444
- /**
445
- * A classname is required for the HarmonicThemeProvider to provide styles properly.
446
- * If it is not provided here it will default to 'cast-filters'.
447
- */
448
- className?: string;
449
- /**
450
- * Indices of currently selected cast in the `cast` array.
451
- */
452
- selectedIndices?: number[];
453
- /**
454
- * Text shown at the top of the component, e.g. 'Filter by cast'. If this is not provided
455
- * the component will render without any.
456
- */
457
- headingText?: string;
458
- /**
459
- * Override the text of the primary CTA. Default is 'Apply'.
460
- */
461
- ctaText?: string;
462
- /**
463
- * Override the text of the text link. Default is 'Clear'.
464
- */
465
- textLinkText?: string;
466
- /**
467
- * Default image to show in cases where a cast member image prop is missing.
468
- * If this is undefined then a light grey background will be displayed instead.
469
- */
470
- placeholderImage?: string;
471
- /**
472
- * Handle selecting individual cast filters.
473
- */
474
- onSelect?: (index: number) => void;
475
- /**
476
- * Handle clicking the primary CTA.
477
- */
478
- onApply?: (indices: number[]) => void;
479
- /**
480
- * Handle clicking the text link.
481
- */
482
- onClear?: () => void;
483
- };
484
427
  export interface ISponsorshipProps {
485
428
  /**
486
429
  * Source URL for Sponsorship IFRAME.
@@ -515,10 +458,10 @@ export interface ITextLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>
515
458
  textColor?: ThemeColor;
516
459
  }
517
460
  export interface ISectionSplitterProps {
518
- /** Set the width of the Section to full */
461
+ /**
462
+ * Set the width of the Section to full
463
+ */
519
464
  fullWidth?: boolean;
520
- /** Custom CSS classes */
521
- className?: string;
522
465
  }
523
466
  export interface ITypeTagsProps {
524
467
  /**
@@ -526,30 +469,46 @@ export interface ITypeTagsProps {
526
469
  */
527
470
  list: string[];
528
471
  }
529
- export interface IBodyContentProps {
530
- /** Text placed in the BodyContent component */
472
+ export interface ITextOnlyProps {
473
+ /**
474
+ * Text placed in the TextOnly component
475
+ */
531
476
  text: string;
532
- /** Set columnStart in Desktop */
477
+ /**
478
+ * Set columnstart in Desktop
479
+ */
533
480
  columnStartDesktop?: number;
534
- /** Set columnSpan in Desktop */
481
+ /**
482
+ * Set columnSpan in Desktop
483
+ */
535
484
  columnSpanDesktop?: number;
536
- /** Set columnStart in Device */
485
+ /**
486
+ * Set columnstart in Device
487
+ */
537
488
  columnStartDevice?: number;
538
- /** Set columnSpan in Device */
489
+ /**
490
+ * Set columnSpam in Device
491
+ */
539
492
  columnSpanDevice?: number;
540
- /** Custom CSS classes */
541
- className?: string;
542
493
  }
543
494
  export declare type SectionTitleSize = 'small' | 'large';
544
495
  export interface ISectionTitleProps {
545
- /** Title to display. */
496
+ /**
497
+ * Title to display.
498
+ */
546
499
  title: string;
547
- /** Size of title to display - by default small, which renders as an H2 (and large is an H1). */
500
+ /**
501
+ * Size of title to display - by default small, which renders as an H2 (and large is an H1).
502
+ */
548
503
  size?: SectionTitleSize;
549
- /** Optional description that can be rendered below the title. */
504
+ /**
505
+ * Optional description that can be rendered below the title.
506
+ */
550
507
  description?: string;
551
- /** Custom CSS classes */
552
- className?: string;
508
+ /**
509
+ * Semantic level of the title.
510
+ */
511
+ semanticLevel?: TypographyLevel;
553
512
  }
554
513
  export interface ILogosProps {
555
514
  /**
@@ -572,22 +531,44 @@ export interface ILogosStyledProps extends StyledProps<any> {
572
531
  fillColor?: Colors.White | Colors.Black;
573
532
  }
574
533
  export interface IAccordionProps {
575
- /** Title to display. */
534
+ /**
535
+ * Title to display.
536
+ */
576
537
  title?: string;
577
- /** The component to be wrapped into the accordion */
538
+ /**
539
+ * The component to be wrapped into the accordion
540
+ */
578
541
  children?: ReactNode;
579
- /** Set if accordions are stacked */
542
+ /**
543
+ * Components wrapped into the accordion that are always visible
544
+ */
545
+ visibleStandfirst?: ReactNode;
546
+ /**
547
+ * Set if accordions are stacked
548
+ */
580
549
  showLine?: boolean;
581
- /** Set init open */
550
+ /**
551
+ * Set init open
552
+ */
582
553
  initOpen?: boolean;
583
- /** Custom CSS classes */
584
- className?: string;
554
+ /**
555
+ * Set content type - header or subtitle
556
+ */
557
+ contentType?: TypographyType;
558
+ /**
559
+ * Set display level - aesthetic
560
+ */
561
+ displayLevel?: TypographyLevel;
562
+ /**
563
+ * Set semantic level - not to be used for aesthetic
564
+ */
565
+ semanticLevel?: TypographyLevel;
585
566
  }
586
567
  export interface IAccordionsProps {
587
- /** Array of Accordion component */
568
+ /**
569
+ * Array of Accordion component
570
+ */
588
571
  items: IAccordionProps[];
589
- /** Custom CSS classes */
590
- className?: string;
591
572
  }
592
573
  export declare const BannerVariants: {
593
574
  readonly 'service-persistent': "service-persistent";
@@ -25,10 +25,6 @@ export interface IGenericTypographyProps<T extends HTMLElement = HTMLParagraphEl
25
25
  export interface IHarmonicHeaderProps extends IGenericTypographyProps {
26
26
  hierarchy: HeaderHierarchy;
27
27
  }
28
- export interface ITaggedTypographyProps extends IGenericTypographyProps {
29
- /** Specifies the HTML tag for rendering typography. The default is 'p'. */
30
- tag?: React.ElementType;
31
- }
32
28
  export declare type TypographyLevel = 1 | 2 | 3 | 4 | 5 | 6;
33
29
  export declare type AltHeaderLevel = 3 | 4 | 5 | 6;
34
30
  export declare type BodyLevel = 1 | 2 | 3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/harmonic",
3
- "version": "0.12.0-c",
3
+ "version": "0.12.1",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",