@royaloperahouse/harmonic 0.1.7 → 0.1.8-b
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/README.md +252 -43
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/utils.d.ts +7 -0
- package/dist/components/atoms/Buttons/Primary/utils.d.ts +2 -0
- package/dist/components/atoms/Buttons/Secondary/utils.d.ts +2 -1
- package/dist/components/atoms/Buttons/Tertiary/utils.d.ts +1 -1
- package/dist/components/index.d.ts +3 -3
- package/dist/components/molecules/AnnouncementBanner/AnnouncementBanner.style.d.ts +1 -1
- package/dist/components/molecules/Information/Information.style.d.ts +4 -10
- package/dist/components/molecules/Information/utils.d.ts +10 -0
- package/dist/components/molecules/PageHeading/Promo/Promo.d.ts +5 -0
- package/dist/components/molecules/PageHeading/Promo/Promo.style.d.ts +28 -0
- package/dist/components/molecules/PageHeading/Promo/components/Badge.d.ts +10 -0
- package/dist/components/molecules/PageHeading/Promo/components/Button.d.ts +10 -0
- package/dist/components/molecules/PageHeading/Promo/components/Image.d.ts +4 -0
- package/dist/components/molecules/PageHeading/Promo/index.d.ts +2 -0
- package/dist/components/molecules/PageHeading/index.d.ts +2 -1
- package/dist/components/molecules/Swipe/Swipe.d.ts +12 -0
- package/dist/components/molecules/Swipe/Swipe.style.d.ts +8 -0
- package/dist/components/molecules/Swipe/helper.d.ts +1 -0
- package/dist/components/molecules/Swipe/index.d.ts +2 -0
- package/dist/components/molecules/index.d.ts +2 -2
- package/dist/components/organisms/Carousels/Carousel/Carousel.d.ts +4 -0
- package/dist/components/organisms/Carousels/Carousel/Carousel.style.d.ts +11 -0
- package/dist/components/organisms/Carousels/Carousel/helper.d.ts +24 -0
- package/dist/components/organisms/Carousels/Carousel/index.d.ts +2 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCarousel.d.ts +4 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCarousel.style.d.ts +21 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCinema.d.ts +4 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCore.d.ts +4 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsStream.d.ts +4 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/components/Buttons.d.ts +5 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/components/InfoSection.d.ts +10 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/components/SwipeCarousel.d.ts +12 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/helper.d.ts +291 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/index.d.ts +5 -0
- package/dist/components/organisms/Carousels/MinimalCarousel/MinimalCarousel.d.ts +4 -0
- package/dist/components/organisms/Carousels/MinimalCarousel/MinimalCarousel.style.d.ts +4 -0
- package/dist/components/organisms/Carousels/MinimalCarousel/index.d.ts +2 -0
- package/dist/components/organisms/index.d.ts +4 -1
- package/dist/harmonic.cjs.development.css +71 -31
- package/dist/harmonic.cjs.development.js +1107 -550
- package/dist/harmonic.cjs.development.js.map +1 -1
- package/dist/harmonic.cjs.production.min.js +1 -1
- package/dist/harmonic.cjs.production.min.js.map +1 -1
- package/dist/harmonic.esm.js +1120 -565
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/types/buttonTypes.d.ts +6 -2
- package/dist/types/carousel.d.ts +64 -9
- package/dist/types/editorial.d.ts +15 -3
- package/dist/types/image.d.ts +9 -3
- package/dist/types/impactHeader.d.ts +52 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/information.d.ts +11 -37
- package/dist/types/progress.d.ts +4 -0
- package/dist/types/types.d.ts +5 -1
- package/dist/types/typography.d.ts +11 -5
- package/package.json +2 -1
- package/README.GIT +0 -278
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, BodyText, Card, Cards, CinemaBadge, ContactCard, ContentSummary, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, 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, SignUpForm } from './components';
|
|
1
|
+
import { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, BodyText, Card, Cards, CinemaBadge, ContactCard, ContentSummary, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingPromo, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, 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, SignUpForm } from './components';
|
|
2
2
|
import { devices, breakpoints } from './styles/viewports';
|
|
3
3
|
import zIndexes from './styles/zIndexes';
|
|
4
|
-
import { AspectRatio, ButtonType, CarouselType, Colors, IconNameType, IntegratedTimerProps, ITimerProps, TickboxMode, ThemeType, EditorialLink, IInformationTitleProps, IInformationCTAProps
|
|
4
|
+
import { AspectRatio, ButtonType, CarouselType, Colors, IconNameType, IntegratedTimerProps, ITimerProps, TickboxMode, ThemeType, EditorialLink, IInformationTitleProps, IInformationCTAProps } from './types';
|
|
5
5
|
import { MiniCard } from './components/molecules';
|
|
6
6
|
import { ModalWindow } from './components/organisms';
|
|
7
7
|
import AuxiliaryButton from './components/atoms/Buttons/Auxiliary/AuxiliaryButton';
|
|
8
8
|
import HarmonicThemeProvider from './styles/HarmonicThemeProvider';
|
|
9
|
-
export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, BodyText, breakpoints, ButtonType, Card, Cards, CarouselType, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, devices, Editorial, EditorialLink, Footer, GlobalStyles, Grid, GridItem, HarmonicThemeProvider, Header, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information,
|
|
9
|
+
export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, BodyText, breakpoints, ButtonType, Card, Cards, CarouselType, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, devices, Editorial, EditorialLink, Footer, GlobalStyles, Grid, GridItem, HarmonicThemeProvider, Header, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information, IInformationCTAProps, IInformationTitleProps, ITimerProps, IntegratedTimerProps, MiniCard, ModalWindow, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingPromo, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, Tab, Table, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, TextOnly, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, zIndexes, SignUpForm, };
|
|
@@ -29,13 +29,17 @@ declare type StyleProps = {
|
|
|
29
29
|
backgroundColor?: ThemeColor;
|
|
30
30
|
/** Border color from theme */
|
|
31
31
|
borderColor?: ThemeColor;
|
|
32
|
+
/** Hovered color from theme */
|
|
33
|
+
hoveredColor?: ThemeColor;
|
|
34
|
+
/** Pressed element color from theme */
|
|
35
|
+
pressedColor?: ThemeColor;
|
|
32
36
|
/** Disabled state */
|
|
33
37
|
disabled?: boolean;
|
|
34
38
|
};
|
|
35
39
|
export declare type ButtonProps = BaseProps & IconProps & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
36
40
|
export declare type AuxiliaryButtonProps = ButtonProps & Pick<StyleProps, 'textColor' | 'backgroundColor'>;
|
|
37
|
-
export declare type PrimaryButtonProps = ButtonProps & Pick<StyleProps, 'textColor' | 'backgroundColor' | 'disabled'>;
|
|
38
|
-
export declare type SecondaryButtonProps = ButtonProps & Pick<StyleProps, 'textColor' | 'borderColor' | 'disabled'>;
|
|
41
|
+
export declare type PrimaryButtonProps = ButtonProps & Pick<StyleProps, 'textColor' | 'backgroundColor' | 'hoveredColor' | 'pressedColor' | 'disabled'>;
|
|
42
|
+
export declare type SecondaryButtonProps = ButtonProps & Pick<StyleProps, 'textColor' | 'borderColor' | 'hoveredColor' | 'pressedColor' | 'disabled'>;
|
|
39
43
|
export declare type TertiaryButtonProps = BaseProps & AnchorHTMLAttributes<HTMLAnchorElement> & Pick<StyleProps, 'textColor' | 'disabled'>;
|
|
40
44
|
export declare type RotatorButtonsProps = {
|
|
41
45
|
/** Enable/disable prev button */
|
package/dist/types/carousel.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ImgHTMLAttributes, ReactElement } from 'react';
|
|
2
2
|
import { ICardProps } from './card';
|
|
3
|
-
import { EditorialLink } from './editorial';
|
|
4
3
|
import { IImageWithCaptionProps } from './image';
|
|
5
4
|
import { IntegratedTimerProps } from './timer';
|
|
6
5
|
import { ILogosProps } from './types';
|
|
6
|
+
import { EditorialLink } from './editorial';
|
|
7
|
+
import { TypographyLevel } from './typography';
|
|
7
8
|
export declare enum CarouselType {
|
|
8
9
|
Image = "image",
|
|
9
10
|
SmallCard = "SmallCard",
|
|
@@ -14,6 +15,10 @@ export interface ICarouselProps {
|
|
|
14
15
|
* Carousel title
|
|
15
16
|
*/
|
|
16
17
|
title?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Carousel description
|
|
20
|
+
*/
|
|
21
|
+
description?: string;
|
|
17
22
|
/**
|
|
18
23
|
* Carousel type.
|
|
19
24
|
*/
|
|
@@ -34,12 +39,20 @@ export interface ICarouselProps {
|
|
|
34
39
|
* Defines if there should be offset added at the beginning of the container. True by default;
|
|
35
40
|
*/
|
|
36
41
|
useOffset?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface ICarouselWrapperProps {
|
|
39
42
|
/**
|
|
40
|
-
*
|
|
43
|
+
* Semantic level of the title
|
|
44
|
+
*/
|
|
45
|
+
titleSemanticLevel?: TypographyLevel;
|
|
46
|
+
/**
|
|
47
|
+
* Sets infinite mode ON/OFF
|
|
41
48
|
*/
|
|
42
|
-
|
|
49
|
+
infinite?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* CSS class name
|
|
52
|
+
*/
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface ICarouselWrapperProps {
|
|
43
56
|
/**
|
|
44
57
|
* Carousel type.
|
|
45
58
|
*/
|
|
@@ -64,6 +77,30 @@ export interface ICarouselWrapperProps {
|
|
|
64
77
|
export declare type HighlightsCarouselSlideImage = ImgHTMLAttributes<HTMLImageElement> & {
|
|
65
78
|
key: string;
|
|
66
79
|
};
|
|
80
|
+
interface SlideVideo {
|
|
81
|
+
desktop: string;
|
|
82
|
+
mobile: string;
|
|
83
|
+
}
|
|
84
|
+
interface SlidePoster {
|
|
85
|
+
desktop: string;
|
|
86
|
+
mobile: string;
|
|
87
|
+
altText: string;
|
|
88
|
+
}
|
|
89
|
+
export interface HighlightsCarouselSlideVideo {
|
|
90
|
+
video: SlideVideo;
|
|
91
|
+
poster: SlidePoster;
|
|
92
|
+
key: string;
|
|
93
|
+
autoPlay: boolean;
|
|
94
|
+
muted: boolean;
|
|
95
|
+
soundControl: boolean;
|
|
96
|
+
fullScreenOption: boolean;
|
|
97
|
+
loop: boolean;
|
|
98
|
+
}
|
|
99
|
+
export interface HighlightsCarouselVideoSlideProps {
|
|
100
|
+
index: number;
|
|
101
|
+
isCurrentSlide: boolean;
|
|
102
|
+
settings: HighlightsCarouselSlideVideo;
|
|
103
|
+
}
|
|
67
104
|
export declare type HighlightsCarouselSlide = {
|
|
68
105
|
/**
|
|
69
106
|
* heder in info section
|
|
@@ -90,13 +127,17 @@ export declare type HighlightsCarouselSlide = {
|
|
|
90
127
|
*/
|
|
91
128
|
links: EditorialLink[];
|
|
92
129
|
/**
|
|
93
|
-
* Slide
|
|
130
|
+
* Slide media
|
|
94
131
|
*/
|
|
95
|
-
|
|
132
|
+
mediaContent: HighlightsCarouselSlideImage | HighlightsCarouselSlideVideo;
|
|
96
133
|
/**
|
|
97
134
|
* Params for Timer component
|
|
98
135
|
*/
|
|
99
136
|
timerParams?: IntegratedTimerProps;
|
|
137
|
+
/**
|
|
138
|
+
* Renders an auxiliary button when passed
|
|
139
|
+
*/
|
|
140
|
+
auxiliaryCTA?: EditorialLink;
|
|
100
141
|
};
|
|
101
142
|
export interface IHighlightsCarouselProps {
|
|
102
143
|
/**
|
|
@@ -111,9 +152,16 @@ export interface IHighlightsCarouselProps {
|
|
|
111
152
|
* slides to be displayed in the carousel
|
|
112
153
|
*/
|
|
113
154
|
slides: HighlightsCarouselSlide[];
|
|
155
|
+
/**
|
|
156
|
+
* Semantic level of the title
|
|
157
|
+
*/
|
|
158
|
+
titleSemanticLevel?: TypographyLevel;
|
|
159
|
+
/**
|
|
160
|
+
* Additional CSS class names to apply to the navigation component.
|
|
161
|
+
*/
|
|
162
|
+
className?: string;
|
|
114
163
|
}
|
|
115
|
-
export
|
|
116
|
-
}
|
|
164
|
+
export declare type IHighlightsCoreCarouselProps = Omit<IHighlightsCarouselProps, 'logo'>;
|
|
117
165
|
export interface IHighlightsCinemaCarouselProps extends Omit<IHighlightsCarouselProps, 'logo'> {
|
|
118
166
|
/**
|
|
119
167
|
* Renders logo or not
|
|
@@ -126,3 +174,10 @@ export interface IHighlightsStreamCarouselProps extends Omit<IHighlightsCarousel
|
|
|
126
174
|
*/
|
|
127
175
|
logo: boolean;
|
|
128
176
|
}
|
|
177
|
+
export interface IMinimalCarouselProps {
|
|
178
|
+
/**
|
|
179
|
+
* Carousel children (only Card and ImageAspectRatioWrapper children are allowed).
|
|
180
|
+
*/
|
|
181
|
+
children: ReactElement[];
|
|
182
|
+
}
|
|
183
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { AnchorHTMLAttributes, ImgHTMLAttributes, MouseEventHandler, ReactElemen
|
|
|
2
2
|
import { StyledProps } from 'styled-components';
|
|
3
3
|
import { ButtonType } from './buttonTypes';
|
|
4
4
|
import { DirectionType, IconNameType } from './iconTypes';
|
|
5
|
-
import { Colors, IVideoWithControlsSettings } from './types';
|
|
5
|
+
import { Colors, IVideoWithControlsSettings, ThemeColor } from './types';
|
|
6
6
|
import { TypographyLevel } from './typography';
|
|
7
7
|
export interface IEditorialProps {
|
|
8
8
|
/**
|
|
@@ -68,11 +68,23 @@ export declare type EditorialLink = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
|
68
68
|
/**
|
|
69
69
|
* Color of text and icon
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
textColor?: ThemeColor;
|
|
72
72
|
/**
|
|
73
73
|
* background color
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
backgroundColor?: ThemeColor;
|
|
76
|
+
/**
|
|
77
|
+
* Border color
|
|
78
|
+
*/
|
|
79
|
+
borderColor?: ThemeColor;
|
|
80
|
+
/**
|
|
81
|
+
* Hovered color
|
|
82
|
+
*/
|
|
83
|
+
hoveredColor?: ThemeColor;
|
|
84
|
+
/**
|
|
85
|
+
* Pressed color
|
|
86
|
+
*/
|
|
87
|
+
pressedColor?: ThemeColor;
|
|
76
88
|
/**
|
|
77
89
|
* type of the button to be rendered; When not passed the Primary and Tetriary are displayed by default;
|
|
78
90
|
*/
|
package/dist/types/image.d.ts
CHANGED
|
@@ -5,21 +5,27 @@ export declare enum AspectRatio {
|
|
|
5
5
|
'3:4' = "3 / 4",
|
|
6
6
|
'4:3' = "4 / 3",
|
|
7
7
|
'8:3' = "8 / 3",
|
|
8
|
-
'16:9' = "16 / 9"
|
|
8
|
+
'16:9' = "16 / 9",
|
|
9
|
+
'90:17' = "90 / 17",
|
|
10
|
+
'75:32' = "75 / 32"
|
|
9
11
|
}
|
|
10
12
|
export declare enum AspectRatioLegacy {
|
|
11
13
|
'1 / 1' = "100",
|
|
12
14
|
'3 / 4' = "133",
|
|
13
15
|
'4 / 3' = "75",
|
|
14
16
|
'8 / 3' = "37.5",
|
|
15
|
-
'16 / 9' = "56.25"
|
|
17
|
+
'16 / 9' = "56.25",
|
|
18
|
+
'90 / 17' = "18.88",
|
|
19
|
+
'75 / 32' = "15"
|
|
16
20
|
}
|
|
17
21
|
export declare enum AspectRatioWidth {
|
|
18
22
|
'1 / 1' = "1",
|
|
19
23
|
'3 / 4' = "0.75",
|
|
20
24
|
'4 / 3' = "1.33",
|
|
21
25
|
'8 / 3' = "2.67",
|
|
22
|
-
'16 / 9' = "1.78"
|
|
26
|
+
'16 / 9' = "1.78",
|
|
27
|
+
'90 / 17' = "5.29",
|
|
28
|
+
'75 / 32' = "2.34"
|
|
23
29
|
}
|
|
24
30
|
export interface IImageAspectRatioWrapperProps {
|
|
25
31
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { EditorialLink } from '../types';
|
|
3
|
-
import { TypographyLevel } from './typography';
|
|
3
|
+
import { TypographyHierarchy, TypographyLevel } from './typography';
|
|
4
4
|
export interface CustomSponsorImageData {
|
|
5
5
|
/**
|
|
6
6
|
* Source URL for Sponsorship logo
|
|
@@ -133,3 +133,54 @@ export interface IPageHeadingCompactProps {
|
|
|
133
133
|
*/
|
|
134
134
|
semanticLevel?: TypographyLevel;
|
|
135
135
|
}
|
|
136
|
+
export declare type PageHeadingPromoImageProps = {
|
|
137
|
+
/**
|
|
138
|
+
* Image url for desktops
|
|
139
|
+
*/
|
|
140
|
+
desktop: string;
|
|
141
|
+
/**
|
|
142
|
+
* Image url for devices
|
|
143
|
+
*/
|
|
144
|
+
mobile: string;
|
|
145
|
+
/**
|
|
146
|
+
* Alt text for the main image
|
|
147
|
+
*/
|
|
148
|
+
alt: string;
|
|
149
|
+
};
|
|
150
|
+
export declare enum PageHeadingPromoBadge {
|
|
151
|
+
Stream = "Stream",
|
|
152
|
+
Cinema = "Cinema"
|
|
153
|
+
}
|
|
154
|
+
export declare type PageHeadingPromoAdditionalLink = EditorialLink & {
|
|
155
|
+
isTextLink?: boolean;
|
|
156
|
+
};
|
|
157
|
+
export interface IPageHeadingPromoProps {
|
|
158
|
+
/**
|
|
159
|
+
* Title text
|
|
160
|
+
*/
|
|
161
|
+
title?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Semantic level of the header
|
|
164
|
+
*/
|
|
165
|
+
titleSemanticLevel?: TypographyHierarchy;
|
|
166
|
+
/**
|
|
167
|
+
* Boolean to show/hide sponsorship logo (default true)
|
|
168
|
+
*/
|
|
169
|
+
sponsor?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Link placed in the impact component
|
|
172
|
+
*/
|
|
173
|
+
mainLink?: EditorialLink;
|
|
174
|
+
/**
|
|
175
|
+
* Link placed in the impact component
|
|
176
|
+
*/
|
|
177
|
+
additionalLink?: PageHeadingPromoAdditionalLink;
|
|
178
|
+
/**
|
|
179
|
+
* Heading image
|
|
180
|
+
*/
|
|
181
|
+
image: PageHeadingPromoImageProps;
|
|
182
|
+
/**
|
|
183
|
+
* Badge variant
|
|
184
|
+
*/
|
|
185
|
+
badge?: PageHeadingPromoBadge;
|
|
186
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,6 +11,6 @@ import { IPageHeadingCompactProps } from './impactHeader';
|
|
|
11
11
|
import { IntegratedTimerProps, ITimerProps } from './timer';
|
|
12
12
|
import { ICreditListing } from './creditListing';
|
|
13
13
|
import { ModalWindowProps } from './modalWindow';
|
|
14
|
-
import { IInformationTitleProps, IInformationCTAProps
|
|
15
|
-
export { AspectRatio, ButtonType, CarouselType, Colors, EditorialLink, IconNameType, ICreditListing, IPageHeadingCompactProps, INavigationProps, INavTopProps, IntegratedTimerProps, ITimerProps, ModalWindowProps, TickboxMode, ThemeType, IInformationTitleProps, IInformationCTAProps,
|
|
14
|
+
import { IInformationTitleProps, IInformationCTAProps } from './information';
|
|
15
|
+
export { AspectRatio, ButtonType, CarouselType, Colors, EditorialLink, IconNameType, ICreditListing, IPageHeadingCompactProps, INavigationProps, INavTopProps, IntegratedTimerProps, ITimerProps, ModalWindowProps, TickboxMode, ThemeType, IInformationTitleProps, IInformationCTAProps, };
|
|
16
16
|
export type { FooterData };
|
|
@@ -1,27 +1,13 @@
|
|
|
1
1
|
import { DirectionType, IconNameType } from './iconTypes';
|
|
2
2
|
import { LinkTarget } from './types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Core = "Core",
|
|
12
|
-
Stream = "Stream"
|
|
13
|
-
}
|
|
14
|
-
export declare enum IInformationTitleVariant {
|
|
15
|
-
Header = "Header",
|
|
16
|
-
AltHeader = "AltHeader"
|
|
17
|
-
}
|
|
18
|
-
export declare enum IInformationBackgroundColour {
|
|
19
|
-
Cinema = "cinema",
|
|
20
|
-
Core = "core",
|
|
21
|
-
Stream = "stream",
|
|
22
|
-
White = "white"
|
|
23
|
-
}
|
|
24
|
-
export declare type TitleTextSize = 3 | 4 | 5 | 6;
|
|
3
|
+
import type { HarmonicSize } from './typography';
|
|
4
|
+
export declare const InformationCtaVariants: {
|
|
5
|
+
readonly Primary: "Primary";
|
|
6
|
+
readonly Secondary: "Secondary";
|
|
7
|
+
readonly Tertiary: "Tertiary";
|
|
8
|
+
readonly TextLink: "TextLink";
|
|
9
|
+
};
|
|
10
|
+
export declare type InformationCtaVariant = keyof typeof InformationCtaVariants;
|
|
25
11
|
export interface IInformationCTAProps {
|
|
26
12
|
/**
|
|
27
13
|
* Text to display on the CTA
|
|
@@ -35,11 +21,7 @@ export interface IInformationCTAProps {
|
|
|
35
21
|
* Style of the CTA. Choices are "Primary" (solid button background), "Secondary" (transparent button background)
|
|
36
22
|
* or "Tertiary" (text only)
|
|
37
23
|
*/
|
|
38
|
-
variant?:
|
|
39
|
-
/**
|
|
40
|
-
* Flag to decide whether to adjust the CTA colours for display on coloured backgrounds
|
|
41
|
-
*/
|
|
42
|
-
infoThemed: boolean;
|
|
24
|
+
variant?: InformationCtaVariant;
|
|
43
25
|
/**
|
|
44
26
|
* Name of the icon to be used in the button
|
|
45
27
|
*/
|
|
@@ -58,14 +40,10 @@ export interface IInformationTitleProps {
|
|
|
58
40
|
* Title text to display
|
|
59
41
|
*/
|
|
60
42
|
text: string;
|
|
61
|
-
/**
|
|
62
|
-
* Title typography type. Choices are Heading or AltHeader
|
|
63
|
-
*/
|
|
64
|
-
variant: IInformationTitleVariant;
|
|
65
43
|
/**
|
|
66
44
|
* The size of the title text
|
|
67
45
|
*/
|
|
68
|
-
textSize:
|
|
46
|
+
textSize: HarmonicSize;
|
|
69
47
|
}
|
|
70
48
|
export interface IInformationProps {
|
|
71
49
|
/**
|
|
@@ -79,11 +57,7 @@ export interface IInformationProps {
|
|
|
79
57
|
/**
|
|
80
58
|
* Title options for the component
|
|
81
59
|
*/
|
|
82
|
-
title
|
|
83
|
-
/**
|
|
84
|
-
* Background Colour. Choices: None, Core, Cinema, Stream
|
|
85
|
-
*/
|
|
86
|
-
background?: IInformationBackgroundColour;
|
|
60
|
+
title?: IInformationTitleProps;
|
|
87
61
|
/**
|
|
88
62
|
* Additional CSS class names to apply to component.
|
|
89
63
|
*/
|
package/dist/types/progress.d.ts
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -52,6 +52,10 @@ export declare enum ThemeType {
|
|
|
52
52
|
Cinema = "cinema",
|
|
53
53
|
Schools = "schools"
|
|
54
54
|
}
|
|
55
|
+
export declare type ThemeChildProps = {
|
|
56
|
+
className?: string;
|
|
57
|
+
theme?: ThemeType;
|
|
58
|
+
};
|
|
55
59
|
export interface IThemeProviderProps {
|
|
56
60
|
/**
|
|
57
61
|
* The theme to use for the child elements
|
|
@@ -424,7 +428,7 @@ export interface ITextLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>
|
|
|
424
428
|
/**
|
|
425
429
|
* Color of text and icon
|
|
426
430
|
*/
|
|
427
|
-
|
|
431
|
+
textColor?: ThemeColor;
|
|
428
432
|
}
|
|
429
433
|
export interface ISectionSplitterProps {
|
|
430
434
|
/**
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StyledProps } from 'styled-components';
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export declare const HarmonicSizes: {
|
|
4
|
+
readonly Small: "small";
|
|
5
|
+
readonly Medium: "medium";
|
|
6
|
+
readonly Large: "large";
|
|
7
|
+
};
|
|
8
|
+
export declare type HarmonicSize = (typeof HarmonicSizes)[keyof typeof HarmonicSizes];
|
|
9
|
+
export declare type HarmonicColors = 'primary' | 'black' | 'white' | 'red' | 'grey' | 'inherit';
|
|
10
|
+
export interface IGenericTypographyProps<T extends HTMLElement = HTMLParagraphElement> extends React.HTMLAttributes<T> {
|
|
11
|
+
children?: ReactNode;
|
|
7
12
|
size?: HarmonicSize;
|
|
8
13
|
serif?: boolean;
|
|
9
14
|
color?: HarmonicColors;
|
|
@@ -11,8 +16,9 @@ export interface IGenericTypographyProps {
|
|
|
11
16
|
bold?: boolean;
|
|
12
17
|
className?: string;
|
|
13
18
|
}
|
|
19
|
+
export declare type TypographyHierarchy = 'h1' | 'h2' | 'h3';
|
|
14
20
|
export interface IHarmonicHeaderProps extends IGenericTypographyProps {
|
|
15
|
-
hierarchy:
|
|
21
|
+
hierarchy: TypographyHierarchy;
|
|
16
22
|
}
|
|
17
23
|
export declare type TypographyLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
18
24
|
export declare type AltHeaderLevel = 3 | 4 | 5 | 6;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@royaloperahouse/harmonic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8-b",
|
|
4
4
|
"author": "Royal Opera House",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"@types/react-modal": "^3.16.3",
|
|
89
89
|
"@types/react-select": "^5.0.1",
|
|
90
90
|
"@types/react-test-renderer": "^17.0.1",
|
|
91
|
+
"@types/resize-observer-browser": "^0.1.11",
|
|
91
92
|
"@types/styled-components": "5.1.26",
|
|
92
93
|
"@types/testing-library__jest-dom": "^5.9.1",
|
|
93
94
|
"@typescript-eslint/eslint-plugin": "^5.0.0",
|